Module i_slint_core::api
source · Expand description
This module contains types that are public and re-exported in the slint-rs as well as the slint-interpreter crate as public API.
Re-exports
Structs
A position represented in the coordinate space of logical pixels. That is the space before applying
a display device specific scale factor.
A size represented in the coordinate space of logical pixels. That is the space before applying
a display device specific scale factor.
A position represented in the coordinate space of physical device pixels. That is the space after applying
a display device specific scale factor to pixels from the logical coordinate space.
A size represented in the coordinate space of physical device pixels. That is the space after applying
a display device specific scale factor to pixels from the logical coordinate space.
Struct that’s used to hold weak references of a Slint component
This type represents a window towards the windowing system, that’s used to render the
scene of a component. It provides API to control windowing system specific aspects such
as the position on the screen.
Enums
This enum describes whether a Window is allowed to be hidden when the user tries to close the window.
It is the return type of the callback provided to Window::on_close_requested.
Error returned from the
invoke_from_event_loop() and quit_event_loop() functionThis enum describes a low-level access to specific graphics APIs used
by the renderer.
This enum describes the different rendering states, that will be provided
to the parameter of the callback for
set_rendering_notifier on the slint::Window.This enum describes the different error scenarios that may occur when the application
registers a rendering notifier on a
crate::Window.The position of the window in either physical or logical pixels. This is used
with
Window::set_position.The size of a window represented in either physical or logical pixels. This is used
with
Window::set_size.Traits
This trait describes the common public API of a strongly referenced Slint component.
It allows creating strongly-referenced clones, a conversion into/ a weak pointer as well
as other convenience functions.
This trait is used to obtain references to global singletons exported in
.slint
markup. Alternatively, you can use ComponentHandle::global to obtain access.Internal trait that’s used to map rendering state callbacks to either a Rust-API provided
impl FnMut or a struct that invokes a C callback and implements Drop to release the closure
on the C++ side.
Functions
Adds the specified function to an internal queue, notifies the event loop to wake up.
Once woken up, any queued up functors will be invoked.
Schedules the main event loop for termination. This function is meant
to be called from callbacks triggered by the UI. After calling the function,
it will return immediately and once control is passed back to the event loop,
the initial call to
slint::run_event_loop() will return.