pub struct TestingBackend {
pub open_url: Rc<RefCell<Option<SharedString>>>,
pub debug_logs: Rc<RefCell<Vec<String>>>,
/* private fields */
}Fields§
§open_url: Rc<RefCell<Option<SharedString>>>§debug_logs: Rc<RefCell<Vec<String>>>Implementations§
Source§impl TestingBackend
impl TestingBackend
pub fn new(options: TestingBackendOptions) -> Self
Trait Implementations§
Source§impl Platform for TestingBackend
impl Platform for TestingBackend
Source§fn create_window_adapter(&self) -> Result<Rc<dyn WindowAdapter>, PlatformError>
fn create_window_adapter(&self) -> Result<Rc<dyn WindowAdapter>, PlatformError>
Instantiate a window for a component.
Source§fn duration_since_start(&self) -> Duration
fn duration_since_start(&self) -> Duration
Returns the current time as a monotonic duration since the start of the program Read more
Source§fn set_clipboard_text(&self, text: &str, clipboard: Clipboard)
fn set_clipboard_text(&self, text: &str, clipboard: Clipboard)
Sends the given text into the system clipboard. Read more
Source§fn clipboard_text(&self, clipboard: Clipboard) -> Option<String>
fn clipboard_text(&self, clipboard: Clipboard) -> Option<String>
Returns a copy of text stored in the system clipboard, if any. Read more
Source§fn run_event_loop(&self) -> Result<(), PlatformError>
fn run_event_loop(&self) -> Result<(), PlatformError>
Spins an event loop and renders the visible windows.
Source§fn new_event_loop_proxy(&self) -> Option<Box<dyn EventLoopProxy>>
fn new_event_loop_proxy(&self) -> Option<Box<dyn EventLoopProxy>>
Return an
EventLoopProxy that can be used to send event to the event loop Read moreSource§fn open_url(&self, url: &str) -> Result<(), PlatformError>
fn open_url(&self, url: &str) -> Result<(), PlatformError>
Opens the given URL in an external browser. Read more
Source§fn debug_log(&self, arguments: Arguments<'_>)
fn debug_log(&self, arguments: Arguments<'_>)
This function is called when debug() is used in .slint files. The implementation
should direct the output to some developer visible terminal. The default implementation
uses stderr if available, or
console.log when targeting wasm.Source§fn click_interval(&self) -> Duration
fn click_interval(&self) -> Duration
Returns the current interval to internal measure the duration to send a double click event. Read more
Source§fn cursor_flash_cycle(&self) -> Duration
fn cursor_flash_cycle(&self) -> Duration
Returns the current rate at which the text cursor should flash or blink. Read more
Auto Trait Implementations§
impl !Freeze for TestingBackend
impl !RefUnwindSafe for TestingBackend
impl !Send for TestingBackend
impl !Sync for TestingBackend
impl !UnwindSafe for TestingBackend
impl Unpin for TestingBackend
impl UnsafeUnpin for TestingBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more