Python: Add bindings for Brush and Color

cc #4202
This commit is contained in:
Simon Hausmann 2024-02-26 11:41:57 +01:00 committed by Simon Hausmann
parent f62d5e0d4b
commit 80fda11e0f
8 changed files with 289 additions and 12 deletions

View file

@ -4,6 +4,7 @@
mod image;
mod interpreter;
use interpreter::{ComponentCompiler, PyDiagnostic, PyDiagnosticLevel, PyValueType};
mod brush;
mod errors;
mod timer;
mod value;
@ -35,6 +36,8 @@ fn slint(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_class::<PyDiagnostic>()?;
m.add_class::<timer::PyTimerMode>()?;
m.add_class::<timer::PyTimer>()?;
m.add_class::<brush::PyColor>()?;
m.add_class::<brush::PyBrush>()?;
m.add_function(wrap_pyfunction!(run_event_loop, m)?)?;
m.add_function(wrap_pyfunction!(quit_event_loop, m)?)?;