File: check_event.rs

package info (click to toggle)
rust-gdk 0.14.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 924 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 410 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[test]
fn check_event() {
    /*gdk::init();
    let base_ev = gdk::Event::new(gdk::EventType::KeyPress);
    let mut ev: gdk::EventKey = base_ev.downcast().unwrap();
    ev.as_mut().keyval = *gdk::keys::constants::A;

    let keyval_unicode = ev.keyval().to_unicode();

    assert_eq!(keyval_unicode, Some('A'));

    let keyval_name = ev.keyval().name();

    assert_eq!(keyval_name, Some("A".into()));*/
}