diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2014-07-28 13:25:28 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2014-07-28 13:25:28 +0200 |
commit | 433c5b956ee83e2a1c3be67e5333db90c9c3cb8a (patch) | |
tree | d52f8fad4e03bb265da799fd0898ea3d2f050cff /src/x11/ffi.rs | |
parent | 5764b9c243e0c1732fdce186e4de4e34540b95e3 (diff) | |
download | glutin-433c5b956ee83e2a1c3be67e5333db90c9c3cb8a.tar.gz glutin-433c5b956ee83e2a1c3be67e5333db90c9c3cb8a.zip |
Implement CursorPositionChanged event for X11
Diffstat (limited to 'src/x11/ffi.rs')
-rw-r--r-- | src/x11/ffi.rs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs index 5caabc5..c021867 100644 --- a/src/x11/ffi.rs +++ b/src/x11/ffi.rs @@ -18,6 +18,7 @@ pub type GLXPixmap = XID; pub type GLXWindow = XID; pub type Pixmap = XID; pub type Status = libc::c_int; // TODO: not sure +pub type Time = libc::c_ulong; pub type Visual = (); // TODO: not sure pub type VisualID = libc::c_ulong; // TODO: not sure pub type Window = XID; @@ -241,7 +242,7 @@ pub struct XClientMessageEvent { pub l: [libc::c_long, ..5], } -#[reprc(C)] +#[repr(C)] pub struct XResizeRequestEvent { pub type_: libc::c_int, pub serial: libc::c_ulong, @@ -252,6 +253,25 @@ pub struct XResizeRequestEvent { pub height: libc::c_int, } +#[repr(C)] +pub struct XMotionEvent { + pub type_: libc::c_int, + pub serial: libc::c_ulong, + pub send_event: Bool, + pub display: *mut Display, + pub window: Window, + pub root: Window, + pub subwindow: Window, + pub time: Time, + pub x: libc::c_int, + pub y: libc::c_int, + pub x_root: libc::c_int, + pub y_root: libc::c_int, + pub state: libc::c_uint, + pub is_hint: libc::c_char, + pub same_screen: Bool, +} + #[link(name = "GL")] #[link(name = "X11")] extern "C" { |