aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/ffi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11/ffi.rs')
-rw-r--r--src/x11/ffi.rs35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs
index 39a6ae5..6fbfd81 100644
--- a/src/x11/ffi.rs
+++ b/src/x11/ffi.rs
@@ -8,12 +8,25 @@ use libc;
/// GLX bindings
pub mod glx {
- generate_gl_bindings!("glx", "core", "1.4", "static")
+ generate_gl_bindings! {
+ api: "glx",
+ profile: "core",
+ version: "1.4",
+ generator: "static"
+ }
}
/// Functions that are not necessarly always available
pub mod glx_extra {
- generate_gl_bindings!("glx", "core", "1.4", "struct", [ "GLX_ARB_create_context" ])
+ generate_gl_bindings! {
+ api: "glx",
+ profile: "core",
+ version: "1.4",
+ generator: "struct",
+ extensions: [
+ "GLX_ARB_create_context"
+ ]
+ }
}
pub type Atom = libc::c_ulong;
@@ -1325,6 +1338,23 @@ pub struct XButtonEvent {
}
#[repr(C)]
+pub struct XConfigureEvent {
+ pub type_: libc::c_int,
+ pub serial: libc::c_ulong,
+ pub send_event: Bool,
+ pub display: *mut Display,
+ pub event: Window,
+ pub window: Window,
+ pub x: libc::c_int,
+ pub y: libc::c_int,
+ pub width: libc::c_int,
+ pub height: libc::c_int,
+ pub border_width: libc::c_int,
+ pub above: Window,
+ pub override_redirect: Bool,
+}
+
+#[repr(C)]
pub struct XF86VidModeModeInfo {
pub dotclock: libc::c_uint,
pub hdisplay: libc::c_ushort,
@@ -1397,6 +1427,7 @@ extern "C" {
pub fn XMoveWindow(display: *mut Display, w: Window, x: libc::c_int, y: libc::c_int);
pub fn XMapWindow(display: *mut Display, w: Window);
pub fn XNextEvent(display: *mut Display, event_return: *mut XEvent);
+ pub fn XInitThreads() -> Status;
pub fn XOpenDisplay(display_name: *const libc::c_char) -> *mut Display;
pub fn XPeekEvent(display: *mut Display, event_return: *mut XEvent);
pub fn XRefreshKeyboardMapping(event_map: *const XEvent);