pub trait CxPlatformCommon {
    fn show_text_ime(&mut self, x: f32, y: f32);
fn hide_text_ime(&mut self);
fn start_timer(&mut self, interval: f64, repeats: bool) -> Timer;
fn stop_timer(&mut self, timer: &mut Timer);
fn post_signal(signal: Signal, status: StatusId);
fn update_menu(&mut self, menu: &Menu);
fn copy_text_to_clipboard(&mut self, text: &str);
fn send_event_from_any_thread(event: Event); }
Expand description

A bunch of traits that are common between the different target platforms. This trait makes sure that there is consistency in the interface, and provides one place for documentation.

Required methods

Show an Input Method Editor (IME) at a particular location, typically with everything but the cursor hidden.

Hide the IME shown by CxPlatformCommon::show_text_ime.

Start a new Timer with the given interval, and which may repeat if required.

Stop zapTimer] given by CxPlatformCommon::start_timer.

Post a Signal from any thread. If you don’t need to use this from a thread, you may instead use Cx::send_signal, which might be faster.

Set a Menu.

Copy the given text to the clipboard, if possible.

Send zaplib Event for processing from any thread

Implementors