mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
parent
473103dc95
commit
a3ec320bfb
8 changed files with 4 additions and 72 deletions
|
@ -254,14 +254,6 @@ pub use i_slint_core::sharedvector::SharedVector;
|
|||
pub use i_slint_core::timers::{Timer, TimerMode};
|
||||
pub use i_slint_core::{format, string::SharedString};
|
||||
|
||||
#[deprecated(note = "Use platform::PointerEventButton instead")]
|
||||
/// Deprecated type alias for [`slint::platform::PointerEventButton`](`crate::platform::PointerEventButton`).
|
||||
pub type PointerEventButton = crate::platform::PointerEventButton;
|
||||
|
||||
#[deprecated(note = "Use platform::WindowEvent instead")]
|
||||
/// Deprecated type alias for [`slint::platform::WindowEvent`](`crate::platform::WindowEvent`).
|
||||
pub type WindowEvent = crate::platform::WindowEvent;
|
||||
|
||||
pub mod private_unstable_api;
|
||||
|
||||
/// Enters the main event loop. This is necessary in order to receive
|
||||
|
|
|
@ -197,7 +197,7 @@ rendering and possibly putting the device into a low-power sleep state. Below is
|
|||
```rust,no_run
|
||||
use slint::platform::{software_renderer::MinimalSoftwareWindow};
|
||||
let window = MinimalSoftwareWindow::<0>::new();
|
||||
# fn check_for_touch_event() -> Option<slint::WindowEvent> { todo!() }
|
||||
# fn check_for_touch_event() -> Option<slint::platform::WindowEvent> { todo!() }
|
||||
# mod hal { pub fn wfi() {} }
|
||||
//...
|
||||
loop {
|
||||
|
@ -206,7 +206,7 @@ loop {
|
|||
|
||||
// Check the touch screen or input device using your driver.
|
||||
if let Some(event) = check_for_touch_event(/*...*/) {
|
||||
// convert the event from the driver into a `slint::WindowEvent`
|
||||
// convert the event from the driver into a `slint::platform::WindowEvent`
|
||||
// and pass it to the window.
|
||||
window.dispatch_event(event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue