Python: Add more type stubs to the internal Rust API

This commit is contained in:
Simon Hausmann 2025-02-12 11:32:26 +01:00 committed by Simon Hausmann
parent 7c75720c9a
commit c111098e49
4 changed files with 29 additions and 1 deletions

View file

@ -1,7 +1,7 @@
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
use pyo3_stub_gen::define_stub_info_gatherer;
use pyo3_stub_gen::{define_stub_info_gatherer, derive::gen_stub_pyfunction};
mod image;
mod interpreter;
@ -22,6 +22,7 @@ fn quit_event_loop() -> Result<(), errors::PyEventLoopError> {
slint_interpreter::quit_event_loop().map_err(|e| e.into())
}
#[gen_stub_pyfunction]
#[pyfunction]
fn set_xdg_app_id(app_id: String) -> Result<(), errors::PyPlatformError> {
slint_interpreter::set_xdg_app_id(app_id).map_err(|e| e.into())