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