1 /*
2  * Copyright (C) 2013 James Miller <james@aatch.net>
3  * Copyright (c) 2016
4  *         Remi Thebault <remi.thebault@gmail.com>
5  *         Thomas Bracht Laumann Jespersen <laumann.thomas@gmail.com>
6  *
7  * Permission is hereby granted, free of charge, to any
8  * person obtaining a copy of this software and associated
9  * documentation files (the "Software"), to deal in the
10  * Software without restriction, including without
11  * limitation the rights to use, copy, modify, merge,
12  * publish, distribute, sublicense, and/or sell copies of
13  * the Software, and to permit persons to whom the Software
14  * is furnished to do so, subject to the following
15  * conditions:
16  *
17  * The above copyright notice and this permission notice
18  * shall be included in all copies or substantial portions
19  * of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
22  * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
23  * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24  * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
25  * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
26  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
28  * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  */
31 
32 #![allow(non_upper_case_globals)]
33 #![allow(non_snake_case)]
34 
35 use ffi::xcb_connection_t;
36 use libc::{c_uint, c_void};
37 
38 use x11::xlib;
39 
40 pub type XEventQueueOwner = c_uint;
41 pub static XlibOwnsEventQueue: XEventQueueOwner = 0;
42 pub static XCBOwnsEventQueue: XEventQueueOwner = 1;
43 
44 #[link(name = "X11-xcb")]
45 extern "C" {
XGetXCBConnection(dpy: *mut xlib::Display) -> *mut xcb_connection_t46     pub fn XGetXCBConnection(dpy: *mut xlib::Display) -> *mut xcb_connection_t;
XSetEventQueueOwner(dpy: *mut xlib::Display, owner: XEventQueueOwner)47     pub fn XSetEventQueueOwner(dpy: *mut xlib::Display, owner: XEventQueueOwner);
48 }
49