pub fn get_event_type(event: *const c_void) -> EventType
10
11
12
13
14
15
16
17
extern "C" fn handle_event(event: *const c_void) {
match wx_rs::get_event_type(event) {
e if e != wx_rs::EventType::Timer => {
wx_rs::set_status_text(&format!("Got event: {:?}", e));
}
_ => (),
}
}
More examples
Hide additional examples
13
14
15
16
17
18
19
20
21
22
extern "C" fn handle_event(event: *const c_void) {
match wx_rs::get_event_type(event) {
EventType::MouseLeftUp => {
let cursor = CURSORS.with(|r| unsafe { r.get().as_mut().unwrap().next().unwrap() });
println!("set_cursor: {:?}", cursor);
wx_rs::set_cursor(*cursor);
}
_ => (),
}
}