aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/ffi.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-01-22 21:37:07 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-01-22 21:37:07 +0100
commit1d6b863cd454839b8e3cf1e296cbf8f31fb70029 (patch)
tree3f4523dd782cb5d4ee554cc38ee9b7fff68705ee /src/x11/ffi.rs
parent13be9b2598c1fdce7af61ab05933ba687c95e64c (diff)
parentde3f354566981c8d03a4283a621ac08ae74fc90f (diff)
downloadglutin-1d6b863cd454839b8e3cf1e296cbf8f31fb70029.tar.gz
glutin-1d6b863cd454839b8e3cf1e296cbf8f31fb70029.zip
Merge pull request #217 from glennw/context-fallback
Some GPU/driver combinations have glxCreateContextAttribsARB present, bu...
Diffstat (limited to 'src/x11/ffi.rs')
-rw-r--r--src/x11/ffi.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs
index 5e7b5a1..1d9e7de 100644
--- a/src/x11/ffi.rs
+++ b/src/x11/ffi.rs
@@ -1358,6 +1358,17 @@ pub struct XF86VidModeModeInfo {
private: libc::c_long,
}
+#[repr(C)]
+pub struct XErrorEvent {
+ pub type_: libc::c_int,
+ pub display: *mut Display,
+ pub serial: libc::c_ulong,
+ pub error_code: libc::c_char,
+ pub request_code: libc::c_char,
+ pub minor_code: libc::c_char,
+ pub resourceid: XID,
+}
+
#[cfg(feature = "headless")]
#[link(name = "OSMesa")]
extern "C" {
@@ -1430,6 +1441,7 @@ extern "C" {
pub fn XScreenOfDisplay(display: *mut Display, screen_number: libc::c_int) -> *const Screen;
pub fn XWidthOfScreen(screen: *const Screen) -> libc::c_int;
pub fn XHeightOfScreen(screen: *const Screen) -> libc::c_int;
+ pub fn XSetErrorHandler(callback: fn(display: *mut Display, event: *mut XErrorEvent) -> libc::c_int) -> libc::c_int;
pub fn XCloseIM(im: XIM) -> Status;
pub fn XOpenIM(display: *mut Display, db: XrmDatabase, res_name: *mut libc::c_char,