aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/ffi.rs
diff options
context:
space:
mode:
authorDavid Partouche <contact@manateedev.com>2014-09-04 11:38:33 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-09-19 20:26:41 +0200
commitb149fca83d390c9c04277501811a617832edc682 (patch)
treee0129e85b1a59864fecb8a0522fffa650e61a73f /src/x11/ffi.rs
parentd8171a0c73921a28b2005030df741ef11a262900 (diff)
downloadglutin-b149fca83d390c9c04277501811a617832edc682.tar.gz
glutin-b149fca83d390c9c04277501811a617832edc682.zip
Added fullscreen support for X11
Diffstat (limited to 'src/x11/ffi.rs')
-rw-r--r--src/x11/ffi.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs
index 2bd2075..0bc52b5 100644
--- a/src/x11/ffi.rs
+++ b/src/x11/ffi.rs
@@ -1337,8 +1337,26 @@ pub struct XButtonEvent {
pub same_screen: Bool,
}
+#[repr(C)]
+pub struct XF86VidModeModeInfo {
+ pub dotclock: libc::c_uint,
+ pub hdisplay: libc::c_ushort,
+ pub hsyncstart: libc::c_ushort,
+ pub hsyncend: libc::c_ushort,
+ pub htotal: libc::c_ushort,
+ pub hskew: libc::c_ushort,
+ pub vdisplay: libc::c_ushort,
+ pub vsyncstart: libc::c_ushort,
+ pub vsyncend: libc::c_ushort,
+ pub vtotal: libc::c_ushort,
+ pub flags: libc::c_uint,
+ privsize: libc::c_int,
+ private: libc::c_long,
+}
+
#[link(name = "GL")]
#[link(name = "X11")]
+#[link(name = "Xxf86vm")]
extern "C" {
pub fn XCloseDisplay(display: *mut Display);
pub fn XCheckMaskEvent(display: *mut Display, event_mask: libc::c_long,
@@ -1408,6 +1426,12 @@ extern "C" {
pub fn glXSwapBuffers(dpy: *mut Display, drawable: GLXDrawable);
pub fn XkbSetDetectableAutoRepeat(dpy: *mut Display, detectable: bool, supported_rtm: *mut bool) -> bool;
+ pub fn XF86VidModeSwitchToMode(dpy: *mut Display, screen: libc::c_int,
+ modeline: *mut XF86VidModeModeInfo) -> Bool;
+ pub fn XF86VidModeSetViewPort(dpy: *mut Display, screen: libc::c_int,
+ x: libc::c_int, y: libc::c_int) -> Bool;
+ pub fn XF86VidModeGetAllModeLines(dpy: *mut Display, screen: libc::c_int,
+ modecount_return: *mut libc::c_int, modesinfo: *mut *mut *mut XF86VidModeModeInfo) -> Bool;
}
/*