1 | // x11-rs: Rust bindings for X11 libraries |
2 | // The X11 libraries are available under the MIT license. |
3 | // These bindings are public domain. |
4 | |
5 | use std::fmt; |
6 | use std::os::raw::{ |
7 | c_char, c_double, c_int, c_long, c_schar, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, |
8 | }; |
9 | use std::slice; |
10 | |
11 | use libc::wchar_t; |
12 | |
13 | use super::internal::{mem_eq, transmute_union}; |
14 | use super::xf86vmode; |
15 | use super::xrandr; |
16 | use super::xss; |
17 | |
18 | // deprecated |
19 | pub mod xkb {} |
20 | |
21 | // |
22 | // functions |
23 | // |
24 | |
25 | x11_link! { Xlib, x11, ["libX11.so.6" , "libX11.so" ], 767, |
26 | pub fn XActivateScreenSaver (_1: *mut Display) -> c_int, |
27 | pub fn XAddConnectionWatch (_3: *mut Display, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, c_int, c_int, *mut *mut c_char)>, _1: *mut c_char) -> c_int, |
28 | pub fn XAddExtension (_1: *mut Display) -> *mut XExtCodes, |
29 | pub fn XAddHost (_2: *mut Display, _1: *mut XHostAddress) -> c_int, |
30 | pub fn XAddHosts (_3: *mut Display, _2: *mut XHostAddress, _1: c_int) -> c_int, |
31 | pub fn XAddPixel (_2: *mut XImage, _1: c_long) -> c_int, |
32 | pub fn XAddToExtensionList (_2: *mut *mut XExtData, _1: *mut XExtData) -> c_int, |
33 | pub fn XAddToSaveSet (_2: *mut Display, _1: c_ulong) -> c_int, |
34 | pub fn XAllocClassHint () -> *mut XClassHint, |
35 | pub fn XAllocColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int, |
36 | pub fn XAllocColorCells (_7: *mut Display, _6: c_ulong, _5: c_int, _4: *mut c_ulong, _3: c_uint, _2: *mut c_ulong, _1: c_uint) -> c_int, |
37 | pub fn XAllocColorPlanes (_11: *mut Display, _10: c_ulong, _9: c_int, _8: *mut c_ulong, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> c_int, |
38 | pub fn XAllocIconSize () -> *mut XIconSize, |
39 | pub fn XAllocNamedColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut XColor, _1: *mut XColor) -> c_int, |
40 | pub fn XAllocSizeHints () -> *mut XSizeHints, |
41 | pub fn XAllocStandardColormap () -> *mut XStandardColormap, |
42 | pub fn XAllocWMHints () -> *mut XWMHints, |
43 | pub fn XAllowEvents (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int, |
44 | pub fn XAllPlanes () -> c_ulong, |
45 | pub fn XAutoRepeatOff (_1: *mut Display) -> c_int, |
46 | pub fn XAutoRepeatOn (_1: *mut Display) -> c_int, |
47 | pub fn XBaseFontNameListOfFontSet (_1: XFontSet) -> *mut c_char, |
48 | pub fn XBell (_2: *mut Display, _1: c_int) -> c_int, |
49 | pub fn XBitmapBitOrder (_1: *mut Display) -> c_int, |
50 | pub fn XBitmapPad (_1: *mut Display) -> c_int, |
51 | pub fn XBitmapUnit (_1: *mut Display) -> c_int, |
52 | pub fn XBlackPixel (_2: *mut Display, _1: c_int) -> c_ulong, |
53 | pub fn XBlackPixelOfScreen (_1: *mut Screen) -> c_ulong, |
54 | pub fn XCellsOfScreen (_1: *mut Screen) -> c_int, |
55 | pub fn XChangeActivePointerGrab (_4: *mut Display, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int, |
56 | pub fn XChangeGC (_4: *mut Display, _3: GC, _2: c_ulong, _1: *mut XGCValues) -> c_int, |
57 | pub fn XChangeKeyboardControl (_3: *mut Display, _2: c_ulong, _1: *mut XKeyboardControl) -> c_int, |
58 | pub fn XChangeKeyboardMapping (_5: *mut Display, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: c_int) -> c_int, |
59 | pub fn XChangePointerControl (_6: *mut Display, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
60 | pub fn XChangeProperty (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: *const c_uchar, _1: c_int) -> c_int, |
61 | pub fn XChangeSaveSet (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, |
62 | pub fn XChangeWindowAttributes (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *mut XSetWindowAttributes) -> c_int, |
63 | pub fn XCheckIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int, |
64 | pub fn XCheckMaskEvent (_3: *mut Display, _2: c_long, _1: *mut XEvent) -> c_int, |
65 | pub fn XCheckTypedEvent (_3: *mut Display, _2: c_int, _1: *mut XEvent) -> c_int, |
66 | pub fn XCheckTypedWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut XEvent) -> c_int, |
67 | pub fn XCheckWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_long, _1: *mut XEvent) -> c_int, |
68 | pub fn XCirculateSubwindows (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, |
69 | pub fn XCirculateSubwindowsDown (_2: *mut Display, _1: c_ulong) -> c_int, |
70 | pub fn XCirculateSubwindowsUp (_2: *mut Display, _1: c_ulong) -> c_int, |
71 | pub fn XClearArea (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_uint, _2: c_uint, _1: c_int) -> c_int, |
72 | pub fn XClearWindow (_2: *mut Display, _1: c_ulong) -> c_int, |
73 | pub fn XClipBox (_2: Region, _1: *mut XRectangle) -> c_int, |
74 | pub fn XCloseDisplay (_1: *mut Display) -> c_int, |
75 | pub fn XCloseIM (_1: XIM) -> c_int, |
76 | pub fn XCloseOM (_1: XOM) -> c_int, |
77 | pub fn XcmsAddColorSpace (_1: *mut XcmsColorSpace) -> c_int, |
78 | pub fn XcmsAddFunctionSet (_1: *mut XcmsFunctionSet) -> c_int, |
79 | pub fn XcmsAllocColor (_4: *mut Display, _3: c_ulong, _2: *mut XcmsColor, _1: c_ulong) -> c_int, |
80 | pub fn XcmsAllocNamedColor (_6: *mut Display, _5: c_ulong, _4: *const c_char, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_ulong) -> c_int, |
81 | pub fn XcmsCCCOfColormap (_2: *mut Display, _1: c_ulong) -> XcmsCCC, |
82 | pub fn XcmsCIELabClipab (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
83 | pub fn XcmsCIELabClipL (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
84 | pub fn XcmsCIELabClipLab (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
85 | pub fn XcmsCIELabQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
86 | pub fn XcmsCIELabQueryMaxL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
87 | pub fn XcmsCIELabQueryMaxLC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int, |
88 | pub fn XcmsCIELabQueryMinL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
89 | pub fn XcmsCIELabToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
90 | pub fn XcmsCIELabWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
91 | pub fn XcmsCIELuvClipL (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
92 | pub fn XcmsCIELuvClipLuv (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
93 | pub fn XcmsCIELuvClipuv (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
94 | pub fn XcmsCIELuvQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
95 | pub fn XcmsCIELuvQueryMaxL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
96 | pub fn XcmsCIELuvQueryMaxLC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int, |
97 | pub fn XcmsCIELuvQueryMinL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
98 | pub fn XcmsCIELuvToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
99 | pub fn XcmsCIELuvWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
100 | pub fn XcmsCIEuvYToCIELuv (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
101 | pub fn XcmsCIEuvYToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
102 | pub fn XcmsCIEuvYToTekHVC (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
103 | pub fn XcmsCIExyYToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
104 | pub fn XcmsCIEXYZToCIELab (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
105 | pub fn XcmsCIEXYZToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
106 | pub fn XcmsCIEXYZToCIExyY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
107 | pub fn XcmsCIEXYZToRGBi (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
108 | pub fn XcmsClientWhitePointOfCCC (_1: XcmsCCC) -> *mut XcmsColor, |
109 | pub fn XcmsConvertColors (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_ulong, _1: *mut c_int) -> c_int, |
110 | pub fn XcmsCreateCCC (_8: *mut Display, _7: c_int, _6: *mut Visual, _5: *mut XcmsColor, _4: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, c_uint, c_uint, *mut c_int) -> c_int>, _3: *mut c_char, _2: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, *mut XcmsColor, c_ulong, *mut XcmsColor, c_uint, *mut c_int) -> c_int>, _1: *mut c_char) -> XcmsCCC, |
111 | pub fn XcmsDefaultCCC (_2: *mut Display, _1: c_int) -> XcmsCCC, |
112 | pub fn XcmsDisplayOfCCC (_1: XcmsCCC) -> *mut Display, |
113 | pub fn XcmsFormatOfPrefix (_1: *mut c_char) -> c_ulong, |
114 | pub fn XcmsFreeCCC (_1: XcmsCCC) -> (), |
115 | pub fn XcmsLookupColor (_6: *mut Display, _5: c_ulong, _4: *const c_char, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_ulong) -> c_int, |
116 | pub fn XcmsPrefixOfFormat (_1: c_ulong) -> *mut c_char, |
117 | pub fn XcmsQueryBlack (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, |
118 | pub fn XcmsQueryBlue (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, |
119 | pub fn XcmsQueryColor (_4: *mut Display, _3: c_ulong, _2: *mut XcmsColor, _1: c_ulong) -> c_int, |
120 | pub fn XcmsQueryColors (_5: *mut Display, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: c_ulong) -> c_int, |
121 | pub fn XcmsQueryGreen (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, |
122 | pub fn XcmsQueryRed (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, |
123 | pub fn XcmsQueryWhite (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, |
124 | pub fn XcmsRGBiToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
125 | pub fn XcmsRGBiToRGB (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
126 | pub fn XcmsRGBToRGBi (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
127 | pub fn XcmsScreenNumberOfCCC (_1: XcmsCCC) -> c_int, |
128 | pub fn XcmsScreenWhitePointOfCCC (_1: XcmsCCC) -> *mut XcmsColor, |
129 | pub fn XcmsSetCCCOfColormap (_3: *mut Display, _2: c_ulong, _1: XcmsCCC) -> XcmsCCC, |
130 | pub fn XcmsSetCompressionProc (_3: XcmsCCC, _2: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, c_uint, c_uint, *mut c_int) -> c_int>, _1: *mut c_char) -> Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, c_uint, c_uint, *mut c_int) -> c_int>, |
131 | pub fn XcmsSetWhiteAdjustProc (_3: XcmsCCC, _2: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, *mut XcmsColor, c_ulong, *mut XcmsColor, c_uint, *mut c_int) -> c_int>, _1: *mut c_char) -> Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, *mut XcmsColor, c_ulong, *mut XcmsColor, c_uint, *mut c_int) -> c_int>, |
132 | pub fn XcmsSetWhitePoint (_2: XcmsCCC, _1: *mut XcmsColor) -> c_int, |
133 | pub fn XcmsStoreColor (_3: *mut Display, _2: c_ulong, _1: *mut XcmsColor) -> c_int, |
134 | pub fn XcmsStoreColors (_5: *mut Display, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
135 | pub fn XcmsTekHVCClipC (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
136 | pub fn XcmsTekHVCClipV (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
137 | pub fn XcmsTekHVCClipVC (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, |
138 | pub fn XcmsTekHVCQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
139 | pub fn XcmsTekHVCQueryMaxV (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
140 | pub fn XcmsTekHVCQueryMaxVC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int, |
141 | pub fn XcmsTekHVCQueryMaxVSamples (_4: XcmsCCC, _3: c_double, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
142 | pub fn XcmsTekHVCQueryMinV (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, |
143 | pub fn XcmsTekHVCToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, |
144 | pub fn XcmsTekHVCWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, |
145 | pub fn XcmsVisualOfCCC (_1: XcmsCCC) -> *mut Visual, |
146 | pub fn XConfigureWindow (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: *mut XWindowChanges) -> c_int, |
147 | pub fn XConnectionNumber (_1: *mut Display) -> c_int, |
148 | pub fn XContextDependentDrawing (_1: XFontSet) -> c_int, |
149 | pub fn XContextualDrawing (_1: XFontSet) -> c_int, |
150 | pub fn XConvertCase (_3: c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> (), |
151 | pub fn XConvertSelection (_6: *mut Display, _5: c_ulong, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int, |
152 | pub fn XCopyArea (_10: *mut Display, _9: c_ulong, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, |
153 | pub fn XCopyColormapAndFree (_2: *mut Display, _1: c_ulong) -> c_ulong, |
154 | pub fn XCopyGC (_4: *mut Display, _3: GC, _2: c_ulong, _1: GC) -> c_int, |
155 | pub fn XCopyPlane (_11: *mut Display, _10: c_ulong, _9: c_ulong, _8: GC, _7: c_int, _6: c_int, _5: c_uint, _4: c_uint, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, |
156 | pub fn XCreateBitmapFromData (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: c_uint, _1: c_uint) -> c_ulong, |
157 | pub fn XCreateColormap (_4: *mut Display, _3: c_ulong, _2: *mut Visual, _1: c_int) -> c_ulong, |
158 | pub fn XCreateFontCursor (_2: *mut Display, _1: c_uint) -> c_ulong, |
159 | pub fn XCreateFontSet (_5: *mut Display, _4: *const c_char, _3: *mut *mut *mut c_char, _2: *mut c_int, _1: *mut *mut c_char) -> XFontSet, |
160 | pub fn XCreateGC (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *mut XGCValues) -> GC, |
161 | pub fn XCreateGlyphCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *const XColor, _1: *const XColor) -> c_ulong, |
162 | pub fn XCreateImage (_10: *mut Display, _9: *mut Visual, _8: c_uint, _7: c_int, _6: c_int, _5: *mut c_char, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> *mut XImage, |
163 | pub fn XCreatePixmap (_5: *mut Display, _4: c_ulong, _3: c_uint, _2: c_uint, _1: c_uint) -> c_ulong, |
164 | pub fn XCreatePixmapCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: *mut XColor, _3: *mut XColor, _2: c_uint, _1: c_uint) -> c_ulong, |
165 | pub fn XCreatePixmapFromBitmapData (_8: *mut Display, _7: c_ulong, _6: *mut c_char, _5: c_uint, _4: c_uint, _3: c_ulong, _2: c_ulong, _1: c_uint) -> c_ulong, |
166 | pub fn XCreateRegion () -> Region, |
167 | pub fn XCreateSimpleWindow (_9: *mut Display, _8: c_ulong, _7: c_int, _6: c_int, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_ulong, |
168 | pub fn XCreateWindow (_12: *mut Display, _11: c_ulong, _10: c_int, _9: c_int, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_int, _4: c_uint, _3: *mut Visual, _2: c_ulong, _1: *mut XSetWindowAttributes) -> c_ulong, |
169 | pub fn XDefaultColormap (_2: *mut Display, _1: c_int) -> c_ulong, |
170 | pub fn XDefaultColormapOfScreen (_1: *mut Screen) -> c_ulong, |
171 | pub fn XDefaultDepth (_2: *mut Display, _1: c_int) -> c_int, |
172 | pub fn XDefaultDepthOfScreen (_1: *mut Screen) -> c_int, |
173 | pub fn XDefaultGC (_2: *mut Display, _1: c_int) -> GC, |
174 | pub fn XDefaultGCOfScreen (_1: *mut Screen) -> GC, |
175 | pub fn XDefaultRootWindow (_1: *mut Display) -> c_ulong, |
176 | pub fn XDefaultScreen (_1: *mut Display) -> c_int, |
177 | pub fn XDefaultScreenOfDisplay (_1: *mut Display) -> *mut Screen, |
178 | pub fn XDefaultString () -> *const c_char, |
179 | pub fn XDefaultVisual (_2: *mut Display, _1: c_int) -> *mut Visual, |
180 | pub fn XDefaultVisualOfScreen (_1: *mut Screen) -> *mut Visual, |
181 | pub fn XDefineCursor (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
182 | pub fn XDeleteContext (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, |
183 | pub fn XDeleteModifiermapEntry (_3: *mut XModifierKeymap, _2: c_uchar, _1: c_int) -> *mut XModifierKeymap, |
184 | pub fn XDeleteProperty (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
185 | pub fn XDestroyIC (_1: XIC) -> (), |
186 | pub fn XDestroyImage (_1: *mut XImage) -> c_int, |
187 | pub fn XDestroyOC (_1: XFontSet) -> (), |
188 | pub fn XDestroyRegion (_1: Region) -> c_int, |
189 | pub fn XDestroySubwindows (_2: *mut Display, _1: c_ulong) -> c_int, |
190 | pub fn XDestroyWindow (_2: *mut Display, _1: c_ulong) -> c_int, |
191 | pub fn XDirectionalDependentDrawing (_1: XFontSet) -> c_int, |
192 | pub fn XDisableAccessControl (_1: *mut Display) -> c_int, |
193 | pub fn XDisplayCells (_2: *mut Display, _1: c_int) -> c_int, |
194 | pub fn XDisplayHeight (_2: *mut Display, _1: c_int) -> c_int, |
195 | pub fn XDisplayHeightMM (_2: *mut Display, _1: c_int) -> c_int, |
196 | pub fn XDisplayKeycodes (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, |
197 | pub fn XDisplayMotionBufferSize (_1: *mut Display) -> c_ulong, |
198 | pub fn XDisplayName (_1: *const c_char) -> *mut c_char, |
199 | pub fn XDisplayOfIM (_1: XIM) -> *mut Display, |
200 | pub fn XDisplayOfOM (_1: XOM) -> *mut Display, |
201 | pub fn XDisplayOfScreen (_1: *mut Screen) -> *mut Display, |
202 | pub fn XDisplayPlanes (_2: *mut Display, _1: c_int) -> c_int, |
203 | pub fn XDisplayString (_1: *mut Display) -> *mut c_char, |
204 | pub fn XDisplayWidth (_2: *mut Display, _1: c_int) -> c_int, |
205 | pub fn XDisplayWidthMM (_2: *mut Display, _1: c_int) -> c_int, |
206 | pub fn XDoesBackingStore (_1: *mut Screen) -> c_int, |
207 | pub fn XDoesSaveUnders (_1: *mut Screen) -> c_int, |
208 | pub fn XDrawArc (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, |
209 | pub fn XDrawArcs (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XArc, _1: c_int) -> c_int, |
210 | pub fn XDrawImageString (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> c_int, |
211 | pub fn XDrawImageString16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const XChar2b, _1: c_int) -> c_int, |
212 | pub fn XDrawLine (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
213 | pub fn XDrawLines (_6: *mut Display, _5: c_ulong, _4: GC, _3: *mut XPoint, _2: c_int, _1: c_int) -> c_int, |
214 | pub fn XDrawPoint (_5: *mut Display, _4: c_ulong, _3: GC, _2: c_int, _1: c_int) -> c_int, |
215 | pub fn XDrawPoints (_6: *mut Display, _5: c_ulong, _4: GC, _3: *mut XPoint, _2: c_int, _1: c_int) -> c_int, |
216 | pub fn XDrawRectangle (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, |
217 | pub fn XDrawRectangles (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XRectangle, _1: c_int) -> c_int, |
218 | pub fn XDrawSegments (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XSegment, _1: c_int) -> c_int, |
219 | pub fn XDrawString (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> c_int, |
220 | pub fn XDrawString16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const XChar2b, _1: c_int) -> c_int, |
221 | pub fn XDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XTextItem, _1: c_int) -> c_int, |
222 | pub fn XDrawText16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XTextItem16, _1: c_int) -> c_int, |
223 | pub fn XEHeadOfExtensionList (_1: XEDataObject) -> *mut *mut XExtData, |
224 | pub fn XEmptyRegion (_1: Region) -> c_int, |
225 | pub fn XEnableAccessControl (_1: *mut Display) -> c_int, |
226 | pub fn XEqualRegion (_2: Region, _1: Region) -> c_int, |
227 | pub fn XESetBeforeFlush (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes, *const c_char, c_long)>) -> Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes, *const c_char, c_long)>, |
228 | pub fn XESetCloseDisplay (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes) -> c_int>, |
229 | pub fn XESetCopyEventCookie (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut XGenericEventCookie) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut XGenericEventCookie) -> c_int>, |
230 | pub fn XESetCopyGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>, |
231 | pub fn XESetCreateFont (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>, |
232 | pub fn XESetCreateGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>, |
233 | pub fn XESetError (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut xError, *mut XExtCodes, *mut c_int) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut xError, *mut XExtCodes, *mut c_int) -> c_int>, |
234 | pub fn XESetErrorString (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, c_int, *mut XExtCodes, *mut c_char, c_int) -> *mut c_char>) -> Option<unsafe extern "C" fn (*mut Display, c_int, *mut XExtCodes, *mut c_char, c_int) -> *mut c_char>, |
235 | pub fn XESetEventToWire (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>, |
236 | pub fn XESetFlushGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>, |
237 | pub fn XESetFreeFont (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>, |
238 | pub fn XESetFreeGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>, |
239 | pub fn XESetPrintErrorValues (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut c_void)>) -> Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut c_void)>, |
240 | pub fn XESetWireToError (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut xError) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut xError) -> c_int>, |
241 | pub fn XESetWireToEvent (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>, |
242 | pub fn XESetWireToEventCookie (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut xEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut xEvent) -> c_int>, |
243 | pub fn XEventMaskOfScreen (_1: *mut Screen) -> c_long, |
244 | pub fn XEventsQueued (_2: *mut Display, _1: c_int) -> c_int, |
245 | pub fn XExtendedMaxRequestSize (_1: *mut Display) -> c_long, |
246 | pub fn XExtentsOfFontSet (_1: XFontSet) -> *mut XFontSetExtents, |
247 | pub fn XFetchBuffer (_3: *mut Display, _2: *mut c_int, _1: c_int) -> *mut c_char, |
248 | pub fn XFetchBytes (_2: *mut Display, _1: *mut c_int) -> *mut c_char, |
249 | pub fn XFetchName (_3: *mut Display, _2: c_ulong, _1: *mut *mut c_char) -> c_int, |
250 | pub fn XFillArc (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, |
251 | pub fn XFillArcs (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XArc, _1: c_int) -> c_int, |
252 | pub fn XFillPolygon (_7: *mut Display, _6: c_ulong, _5: GC, _4: *mut XPoint, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
253 | pub fn XFillRectangle (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, |
254 | pub fn XFillRectangles (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XRectangle, _1: c_int) -> c_int, |
255 | pub fn XFilterEvent (_2: *mut XEvent, _1: c_ulong) -> c_int, |
256 | pub fn XFindContext (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut *mut c_char) -> c_int, |
257 | pub fn XFindOnExtensionList (_2: *mut *mut XExtData, _1: c_int) -> *mut XExtData, |
258 | pub fn XFlush (_1: *mut Display) -> c_int, |
259 | pub fn XFlushGC (_2: *mut Display, _1: GC) -> (), |
260 | pub fn XFontsOfFontSet (_3: XFontSet, _2: *mut *mut *mut XFontStruct, _1: *mut *mut *mut c_char) -> c_int, |
261 | pub fn XForceScreenSaver (_2: *mut Display, _1: c_int) -> c_int, |
262 | pub fn XFree (_1: *mut c_void) -> c_int, |
263 | pub fn XFreeColormap (_2: *mut Display, _1: c_ulong) -> c_int, |
264 | pub fn XFreeColors (_5: *mut Display, _4: c_ulong, _3: *mut c_ulong, _2: c_int, _1: c_ulong) -> c_int, |
265 | pub fn XFreeCursor (_2: *mut Display, _1: c_ulong) -> c_int, |
266 | pub fn XFreeEventData (_2: *mut Display, _1: *mut XGenericEventCookie) -> (), |
267 | pub fn XFreeExtensionList (_1: *mut *mut c_char) -> c_int, |
268 | pub fn XFreeFont (_2: *mut Display, _1: *mut XFontStruct) -> c_int, |
269 | pub fn XFreeFontInfo (_3: *mut *mut c_char, _2: *mut XFontStruct, _1: c_int) -> c_int, |
270 | pub fn XFreeFontNames (_1: *mut *mut c_char) -> c_int, |
271 | pub fn XFreeFontPath (_1: *mut *mut c_char) -> c_int, |
272 | pub fn XFreeFontSet (_2: *mut Display, _1: XFontSet) -> (), |
273 | pub fn XFreeGC (_2: *mut Display, _1: GC) -> c_int, |
274 | pub fn XFreeModifiermap (_1: *mut XModifierKeymap) -> c_int, |
275 | pub fn XFreePixmap (_2: *mut Display, _1: c_ulong) -> c_int, |
276 | pub fn XFreeStringList (_1: *mut *mut c_char) -> (), |
277 | pub fn XGContextFromGC (_1: GC) -> c_ulong, |
278 | pub fn XGeometry (_13: *mut Display, _12: c_int, _11: *const c_char, _10: *const c_char, _9: c_uint, _8: c_uint, _7: c_uint, _6: c_int, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, |
279 | pub fn XGetAtomName (_2: *mut Display, _1: c_ulong) -> *mut c_char, |
280 | pub fn XGetAtomNames (_4: *mut Display, _3: *mut c_ulong, _2: c_int, _1: *mut *mut c_char) -> c_int, |
281 | pub fn XGetClassHint (_3: *mut Display, _2: c_ulong, _1: *mut XClassHint) -> c_int, |
282 | pub fn XGetCommand (_4: *mut Display, _3: c_ulong, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, |
283 | pub fn XGetDefault (_3: *mut Display, _2: *const c_char, _1: *const c_char) -> *mut c_char, |
284 | pub fn XGetErrorDatabaseText (_6: *mut Display, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut c_char, _1: c_int) -> c_int, |
285 | pub fn XGetErrorText (_4: *mut Display, _3: c_int, _2: *mut c_char, _1: c_int) -> c_int, |
286 | pub fn XGetEventData (_2: *mut Display, _1: *mut XGenericEventCookie) -> c_int, |
287 | pub fn XGetFontPath (_2: *mut Display, _1: *mut c_int) -> *mut *mut c_char, |
288 | pub fn XGetFontProperty (_3: *mut XFontStruct, _2: c_ulong, _1: *mut c_ulong) -> c_int, |
289 | pub fn XGetGCValues (_4: *mut Display, _3: GC, _2: c_ulong, _1: *mut XGCValues) -> c_int, |
290 | pub fn XGetGeometry (_9: *mut Display, _8: c_ulong, _7: *mut c_ulong, _6: *mut c_int, _5: *mut c_int, _4: *mut c_uint, _3: *mut c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
291 | pub fn XGetIconName (_3: *mut Display, _2: c_ulong, _1: *mut *mut c_char) -> c_int, |
292 | pub fn XGetIconSizes (_4: *mut Display, _3: c_ulong, _2: *mut *mut XIconSize, _1: *mut c_int) -> c_int, |
293 | pub fn XGetImage (_8: *mut Display, _7: c_ulong, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_int) -> *mut XImage, |
294 | pub fn XGetInputFocus (_3: *mut Display, _2: *mut c_ulong, _1: *mut c_int) -> c_int, |
295 | pub fn XGetKeyboardControl (_2: *mut Display, _1: *mut XKeyboardState) -> c_int, |
296 | pub fn XGetKeyboardMapping (_4: *mut Display, _3: c_uchar, _2: c_int, _1: *mut c_int) -> *mut c_ulong, |
297 | pub fn XGetModifierMapping (_1: *mut Display) -> *mut XModifierKeymap, |
298 | pub fn XGetMotionEvents (_5: *mut Display, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: *mut c_int) -> *mut XTimeCoord, |
299 | pub fn XGetNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, |
300 | pub fn XGetPixel (_3: *mut XImage, _2: c_int, _1: c_int) -> c_ulong, |
301 | pub fn XGetPointerControl (_4: *mut Display, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, |
302 | pub fn XGetPointerMapping (_3: *mut Display, _2: *mut c_uchar, _1: c_int) -> c_int, |
303 | pub fn XGetRGBColormaps (_5: *mut Display, _4: c_ulong, _3: *mut *mut XStandardColormap, _2: *mut c_int, _1: c_ulong) -> c_int, |
304 | pub fn XGetScreenSaver (_5: *mut Display, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, |
305 | pub fn XGetSelectionOwner (_2: *mut Display, _1: c_ulong) -> c_ulong, |
306 | pub fn XGetSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> c_int, |
307 | pub fn XGetStandardColormap (_4: *mut Display, _3: c_ulong, _2: *mut XStandardColormap, _1: c_ulong) -> c_int, |
308 | pub fn XGetSubImage (_11: *mut Display, _10: c_ulong, _9: c_int, _8: c_int, _7: c_uint, _6: c_uint, _5: c_ulong, _4: c_int, _3: *mut XImage, _2: c_int, _1: c_int) -> *mut XImage, |
309 | pub fn XGetTextProperty (_4: *mut Display, _3: c_ulong, _2: *mut XTextProperty, _1: c_ulong) -> c_int, |
310 | pub fn XGetTransientForHint (_3: *mut Display, _2: c_ulong, _1: *mut c_ulong) -> c_int, |
311 | pub fn XGetVisualInfo (_4: *mut Display, _3: c_long, _2: *mut XVisualInfo, _1: *mut c_int) -> *mut XVisualInfo, |
312 | pub fn XGetWindowAttributes (_3: *mut Display, _2: c_ulong, _1: *mut XWindowAttributes) -> c_int, |
313 | pub fn XGetWindowProperty (_12: *mut Display, _11: c_ulong, _10: c_ulong, _9: c_long, _8: c_long, _7: c_int, _6: c_ulong, _5: *mut c_ulong, _4: *mut c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut *mut c_uchar) -> c_int, |
314 | pub fn XGetWMClientMachine (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int, |
315 | pub fn XGetWMColormapWindows (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_ulong, _1: *mut c_int) -> c_int, |
316 | pub fn XGetWMHints (_2: *mut Display, _1: c_ulong) -> *mut XWMHints, |
317 | pub fn XGetWMIconName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int, |
318 | pub fn XGetWMName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int, |
319 | pub fn XGetWMNormalHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: *mut c_long) -> c_int, |
320 | pub fn XGetWMProtocols (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_ulong, _1: *mut c_int) -> c_int, |
321 | pub fn XGetWMSizeHints (_5: *mut Display, _4: c_ulong, _3: *mut XSizeHints, _2: *mut c_long, _1: c_ulong) -> c_int, |
322 | pub fn XGetZoomHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, |
323 | pub fn XGrabButton (_10: *mut Display, _9: c_uint, _8: c_uint, _7: c_ulong, _6: c_int, _5: c_uint, _4: c_int, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int, |
324 | pub fn XGrabKey (_7: *mut Display, _6: c_int, _5: c_uint, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
325 | pub fn XGrabKeyboard (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, |
326 | pub fn XGrabPointer (_9: *mut Display, _8: c_ulong, _7: c_int, _6: c_uint, _5: c_int, _4: c_int, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int, |
327 | pub fn XGrabServer (_1: *mut Display) -> c_int, |
328 | pub fn XHeightMMOfScreen (_1: *mut Screen) -> c_int, |
329 | pub fn XHeightOfScreen (_1: *mut Screen) -> c_int, |
330 | pub fn XIconifyWindow (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, |
331 | pub fn XIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int, |
332 | pub fn XImageByteOrder (_1: *mut Display) -> c_int, |
333 | pub fn XIMOfIC (_1: XIC) -> XIM, |
334 | pub fn XInitExtension (_2: *mut Display, _1: *const c_char) -> *mut XExtCodes, |
335 | pub fn XInitImage (_1: *mut XImage) -> c_int, |
336 | pub fn XInitThreads () -> c_int, |
337 | pub fn XInsertModifiermapEntry (_3: *mut XModifierKeymap, _2: c_uchar, _1: c_int) -> *mut XModifierKeymap, |
338 | pub fn XInstallColormap (_2: *mut Display, _1: c_ulong) -> c_int, |
339 | pub fn XInternalConnectionNumbers (_3: *mut Display, _2: *mut *mut c_int, _1: *mut c_int) -> c_int, |
340 | pub fn XInternAtom (_3: *mut Display, _2: *const c_char, _1: c_int) -> c_ulong, |
341 | pub fn XInternAtoms (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: c_int, _1: *mut c_ulong) -> c_int, |
342 | pub fn XIntersectRegion (_3: Region, _2: Region, _1: Region) -> c_int, |
343 | pub fn XkbAddDeviceLedInfo (_3: XkbDeviceInfoPtr, _2: c_uint, _1: c_uint) -> XkbDeviceLedInfoPtr, |
344 | pub fn XkbAddGeomColor (_3: XkbGeometryPtr, _2: *mut c_char, _1: c_uint) -> XkbColorPtr, |
345 | pub fn XkbAddGeomDoodad (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: c_ulong) -> XkbDoodadPtr, |
346 | pub fn XkbAddGeomKey (_1: XkbRowPtr) -> XkbKeyPtr, |
347 | pub fn XkbAddGeomKeyAlias (_3: XkbGeometryPtr, _2: *mut c_char, _1: *mut c_char) -> XkbKeyAliasPtr, |
348 | pub fn XkbAddGeomOutline (_2: XkbShapePtr, _1: c_int) -> XkbOutlinePtr, |
349 | pub fn XkbAddGeomOverlay (_3: XkbSectionPtr, _2: c_ulong, _1: c_int) -> XkbOverlayPtr, |
350 | pub fn XkbAddGeomOverlayKey (_4: XkbOverlayPtr, _3: XkbOverlayRowPtr, _2: *mut c_char, _1: *mut c_char) -> XkbOverlayKeyPtr, |
351 | pub fn XkbAddGeomOverlayRow (_3: XkbOverlayPtr, _2: c_int, _1: c_int) -> XkbOverlayRowPtr, |
352 | pub fn XkbAddGeomProperty (_3: XkbGeometryPtr, _2: *mut c_char, _1: *mut c_char) -> XkbPropertyPtr, |
353 | pub fn XkbAddGeomRow (_2: XkbSectionPtr, _1: c_int) -> XkbRowPtr, |
354 | pub fn XkbAddGeomSection (_5: XkbGeometryPtr, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> XkbSectionPtr, |
355 | pub fn XkbAddGeomShape (_3: XkbGeometryPtr, _2: c_ulong, _1: c_int) -> XkbShapePtr, |
356 | pub fn XkbAddKeyType (_5: XkbDescPtr, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> XkbKeyTypePtr, |
357 | pub fn XkbAllocClientMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int, |
358 | pub fn XkbAllocCompatMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int, |
359 | pub fn XkbAllocControls (_2: XkbDescPtr, _1: c_uint) -> c_int, |
360 | pub fn XkbAllocDeviceInfo (_3: c_uint, _2: c_uint, _1: c_uint) -> XkbDeviceInfoPtr, |
361 | pub fn XkbAllocGeomColors (_2: XkbGeometryPtr, _1: c_int) -> c_int, |
362 | pub fn XkbAllocGeomDoodads (_2: XkbGeometryPtr, _1: c_int) -> c_int, |
363 | pub fn XkbAllocGeometry (_2: XkbDescPtr, _1: XkbGeometrySizesPtr) -> c_int, |
364 | pub fn XkbAllocGeomKeyAliases (_2: XkbGeometryPtr, _1: c_int) -> c_int, |
365 | pub fn XkbAllocGeomKeys (_2: XkbRowPtr, _1: c_int) -> c_int, |
366 | pub fn XkbAllocGeomOutlines (_2: XkbShapePtr, _1: c_int) -> c_int, |
367 | pub fn XkbAllocGeomOverlayKeys (_2: XkbOverlayRowPtr, _1: c_int) -> c_int, |
368 | pub fn XkbAllocGeomOverlayRows (_2: XkbOverlayPtr, _1: c_int) -> c_int, |
369 | pub fn XkbAllocGeomOverlays (_2: XkbSectionPtr, _1: c_int) -> c_int, |
370 | pub fn XkbAllocGeomPoints (_2: XkbOutlinePtr, _1: c_int) -> c_int, |
371 | pub fn XkbAllocGeomProps (_2: XkbGeometryPtr, _1: c_int) -> c_int, |
372 | pub fn XkbAllocGeomRows (_2: XkbSectionPtr, _1: c_int) -> c_int, |
373 | pub fn XkbAllocGeomSectionDoodads (_2: XkbSectionPtr, _1: c_int) -> c_int, |
374 | pub fn XkbAllocGeomSections (_2: XkbGeometryPtr, _1: c_int) -> c_int, |
375 | pub fn XkbAllocGeomShapes (_2: XkbGeometryPtr, _1: c_int) -> c_int, |
376 | pub fn XkbAllocIndicatorMaps (_1: XkbDescPtr) -> c_int, |
377 | pub fn XkbAllocKeyboard () -> XkbDescPtr, |
378 | pub fn XkbAllocNames (_4: XkbDescPtr, _3: c_uint, _2: c_int, _1: c_int) -> c_int, |
379 | pub fn XkbAllocServerMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int, |
380 | pub fn XkbApplyCompatMapToKey (_3: XkbDescPtr, _2: c_uchar, _1: XkbChangesPtr) -> c_int, |
381 | pub fn XkbApplyVirtualModChanges (_3: XkbDescPtr, _2: c_uint, _1: XkbChangesPtr) -> c_int, |
382 | pub fn XkbBell (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, |
383 | pub fn XkbBellEvent (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, |
384 | pub fn XkbChangeDeviceInfo (_3: *mut Display, _2: XkbDeviceInfoPtr, _1: XkbDeviceChangesPtr) -> c_int, |
385 | pub fn XkbChangeEnabledControls (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
386 | pub fn XkbChangeKeycodeRange (_4: XkbDescPtr, _3: c_int, _2: c_int, _1: XkbChangesPtr) -> c_int, |
387 | pub fn XkbChangeMap (_3: *mut Display, _2: XkbDescPtr, _1: XkbMapChangesPtr) -> c_int, |
388 | pub fn XkbChangeNames (_3: *mut Display, _2: XkbDescPtr, _1: XkbNameChangesPtr) -> c_int, |
389 | pub fn XkbChangeTypesOfKey (_6: XkbDescPtr, _5: c_int, _4: c_int, _3: c_uint, _2: *mut c_int, _1: XkbMapChangesPtr) -> c_int, |
390 | pub fn XkbComputeEffectiveMap (_3: XkbDescPtr, _2: XkbKeyTypePtr, _1: *mut c_uchar) -> c_int, |
391 | pub fn XkbComputeRowBounds (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: XkbRowPtr) -> c_int, |
392 | pub fn XkbComputeSectionBounds (_2: XkbGeometryPtr, _1: XkbSectionPtr) -> c_int, |
393 | pub fn XkbComputeShapeBounds (_1: XkbShapePtr) -> c_int, |
394 | pub fn XkbComputeShapeTop (_2: XkbShapePtr, _1: XkbBoundsPtr) -> c_int, |
395 | pub fn XkbCopyKeyType (_2: XkbKeyTypePtr, _1: XkbKeyTypePtr) -> c_int, |
396 | pub fn XkbCopyKeyTypes (_3: XkbKeyTypePtr, _2: XkbKeyTypePtr, _1: c_int) -> c_int, |
397 | pub fn XkbDeviceBell (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, |
398 | pub fn XkbDeviceBellEvent (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, |
399 | pub fn XkbFindOverlayForKey (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: *mut c_char) -> *mut c_char, |
400 | pub fn XkbForceBell (_2: *mut Display, _1: c_int) -> c_int, |
401 | pub fn XkbForceDeviceBell (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
402 | pub fn XkbFreeClientMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), |
403 | pub fn XkbFreeCompatMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), |
404 | pub fn XkbFreeComponentList (_1: XkbComponentListPtr) -> (), |
405 | pub fn XkbFreeControls (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), |
406 | pub fn XkbFreeDeviceInfo (_3: XkbDeviceInfoPtr, _2: c_uint, _1: c_int) -> (), |
407 | pub fn XkbFreeGeomColors (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
408 | pub fn XkbFreeGeomDoodads (_3: XkbDoodadPtr, _2: c_int, _1: c_int) -> (), |
409 | pub fn XkbFreeGeometry (_3: XkbGeometryPtr, _2: c_uint, _1: c_int) -> (), |
410 | pub fn XkbFreeGeomKeyAliases (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
411 | pub fn XkbFreeGeomKeys (_4: XkbRowPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
412 | pub fn XkbFreeGeomOutlines (_4: XkbShapePtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
413 | pub fn XkbFreeGeomOverlayKeys (_4: XkbOverlayRowPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
414 | pub fn XkbFreeGeomOverlayRows (_4: XkbOverlayPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
415 | pub fn XkbFreeGeomOverlays (_4: XkbSectionPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
416 | pub fn XkbFreeGeomPoints (_4: XkbOutlinePtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
417 | pub fn XkbFreeGeomProperties (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
418 | pub fn XkbFreeGeomRows (_4: XkbSectionPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
419 | pub fn XkbFreeGeomSections (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
420 | pub fn XkbFreeGeomShapes (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), |
421 | pub fn XkbFreeIndicatorMaps (_1: XkbDescPtr) -> (), |
422 | pub fn XkbFreeKeyboard (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), |
423 | pub fn XkbFreeNames (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), |
424 | pub fn XkbFreeServerMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), |
425 | pub fn XkbGetAutoRepeatRate (_4: *mut Display, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
426 | pub fn XkbGetAutoResetControls (_3: *mut Display, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
427 | pub fn XkbGetCompatMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, |
428 | pub fn XkbGetControls (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, |
429 | pub fn XkbGetDetectableAutoRepeat (_2: *mut Display, _1: *mut c_int) -> c_int, |
430 | pub fn XkbGetDeviceButtonActions (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, |
431 | pub fn XkbGetDeviceInfo (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> XkbDeviceInfoPtr, |
432 | pub fn XkbGetDeviceInfoChanges (_3: *mut Display, _2: XkbDeviceInfoPtr, _1: XkbDeviceChangesPtr) -> c_int, |
433 | pub fn XkbGetDeviceLedInfo (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
434 | pub fn XkbGetGeometry (_2: *mut Display, _1: XkbDescPtr) -> c_int, |
435 | pub fn XkbGetIndicatorMap (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, |
436 | pub fn XkbGetIndicatorState (_3: *mut Display, _2: c_uint, _1: *mut c_uint) -> c_int, |
437 | pub fn XkbGetKeyActions (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
438 | pub fn XkbGetKeyBehaviors (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
439 | pub fn XkbGetKeyboard (_3: *mut Display, _2: c_uint, _1: c_uint) -> XkbDescPtr, |
440 | pub fn XkbGetKeyboardByName (_6: *mut Display, _5: c_uint, _4: XkbComponentNamesPtr, _3: c_uint, _2: c_uint, _1: c_int) -> XkbDescPtr, |
441 | pub fn XkbGetKeyExplicitComponents (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
442 | pub fn XkbGetKeyModifierMap (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
443 | pub fn XkbGetKeySyms (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
444 | pub fn XkbGetKeyTypes (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
445 | pub fn XkbGetKeyVirtualModMap (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
446 | pub fn XkbGetMap (_3: *mut Display, _2: c_uint, _1: c_uint) -> XkbDescPtr, |
447 | pub fn XkbGetMapChanges (_3: *mut Display, _2: XkbDescPtr, _1: XkbMapChangesPtr) -> c_int, |
448 | pub fn XkbGetNamedDeviceIndicator (_9: *mut Display, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_ulong, _4: *mut c_int, _3: *mut c_int, _2: XkbIndicatorMapPtr, _1: *mut c_int) -> c_int, |
449 | pub fn XkbGetNamedGeometry (_3: *mut Display, _2: XkbDescPtr, _1: c_ulong) -> c_int, |
450 | pub fn XkbGetNamedIndicator (_6: *mut Display, _5: c_ulong, _4: *mut c_int, _3: *mut c_int, _2: XkbIndicatorMapPtr, _1: *mut c_int) -> c_int, |
451 | pub fn XkbGetNames (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, |
452 | pub fn XkbGetPerClientControls (_2: *mut Display, _1: *mut c_uint) -> c_int, |
453 | pub fn XkbGetState (_3: *mut Display, _2: c_uint, _1: XkbStatePtr) -> c_int, |
454 | pub fn XkbGetUpdatedMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, |
455 | pub fn XkbGetVirtualMods (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, |
456 | pub fn XkbGetXlibControls (_1: *mut Display) -> c_uint, |
457 | pub fn XkbIgnoreExtension (_1: c_int) -> c_int, |
458 | pub fn XkbInitCanonicalKeyTypes (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> c_int, |
459 | pub fn XkbKeycodeToKeysym (_4: *mut Display, _3: c_uchar, _2: c_int, _1: c_int) -> c_ulong, |
460 | pub fn XkbKeysymToModifiers (_2: *mut Display, _1: c_ulong) -> c_uint, |
461 | pub fn XkbKeyTypesForCoreSymbols (_6: XkbDescPtr, _5: c_int, _4: *mut c_ulong, _3: c_uint, _2: *mut c_int, _1: *mut c_ulong) -> c_int, |
462 | pub fn XkbLatchGroup (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_int, |
463 | pub fn XkbLatchModifiers (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
464 | pub fn XkbLibraryVersion (_2: *mut c_int, _1: *mut c_int) -> c_int, |
465 | pub fn XkbListComponents (_4: *mut Display, _3: c_uint, _2: XkbComponentNamesPtr, _1: *mut c_int) -> XkbComponentListPtr, |
466 | pub fn XkbLockGroup (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_int, |
467 | pub fn XkbLockModifiers (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
468 | pub fn XkbLookupKeyBinding (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: *mut c_char, _2: c_int, _1: *mut c_int) -> c_int, |
469 | pub fn XkbLookupKeySym (_5: *mut Display, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> c_int, |
470 | pub fn XkbNoteControlsChanges (_3: XkbControlsChangesPtr, _2: *mut XkbControlsNotifyEvent, _1: c_uint) -> (), |
471 | pub fn XkbNoteDeviceChanges (_3: XkbDeviceChangesPtr, _2: *mut XkbExtensionDeviceNotifyEvent, _1: c_uint) -> (), |
472 | pub fn XkbNoteMapChanges (_3: XkbMapChangesPtr, _2: *mut XkbMapNotifyEvent, _1: c_uint) -> (), |
473 | pub fn XkbNoteNameChanges (_3: XkbNameChangesPtr, _2: *mut XkbNamesNotifyEvent, _1: c_uint) -> (), |
474 | pub fn XkbOpenDisplay (_6: *mut c_char, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> *mut Display, |
475 | pub fn XkbQueryExtension (_6: *mut Display, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, |
476 | pub fn XkbRefreshKeyboardMapping (_1: *mut XkbMapNotifyEvent) -> c_int, |
477 | pub fn XkbResizeDeviceButtonActions (_2: XkbDeviceInfoPtr, _1: c_uint) -> c_int, |
478 | pub fn XkbResizeKeyActions (_3: XkbDescPtr, _2: c_int, _1: c_int) -> *mut XkbAction, |
479 | pub fn XkbResizeKeySyms (_3: XkbDescPtr, _2: c_int, _1: c_int) -> *mut c_ulong, |
480 | pub fn XkbResizeKeyType (_5: XkbDescPtr, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
481 | pub fn XkbSelectEventDetails (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int, |
482 | pub fn XkbSelectEvents (_4: *mut Display, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int, |
483 | pub fn XkbSetAtomFuncs (_2: Option<unsafe extern "C" fn (*mut Display, *const c_char, c_int) -> c_ulong>, _1: Option<unsafe extern "C" fn (*mut Display, c_ulong) -> *mut c_char>) -> (), |
484 | pub fn XkbSetAutoRepeatRate (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
485 | pub fn XkbSetAutoResetControls (_4: *mut Display, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
486 | pub fn XkbSetCompatMap (_4: *mut Display, _3: c_uint, _2: XkbDescPtr, _1: c_int) -> c_int, |
487 | pub fn XkbSetControls (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, |
488 | pub fn XkbSetDebuggingFlags (_8: *mut Display, _7: c_uint, _6: c_uint, _5: *mut c_char, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
489 | pub fn XkbSetDetectableAutoRepeat (_3: *mut Display, _2: c_int, _1: *mut c_int) -> c_int, |
490 | pub fn XkbSetDeviceButtonActions (_4: *mut Display, _3: XkbDeviceInfoPtr, _2: c_uint, _1: c_uint) -> c_int, |
491 | pub fn XkbSetDeviceInfo (_3: *mut Display, _2: c_uint, _1: XkbDeviceInfoPtr) -> c_int, |
492 | pub fn XkbSetDeviceLedInfo (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
493 | pub fn XkbSetGeometry (_3: *mut Display, _2: c_uint, _1: XkbGeometryPtr) -> c_int, |
494 | pub fn XkbSetIgnoreLockMods (_6: *mut Display, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
495 | pub fn XkbSetIndicatorMap (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, |
496 | pub fn XkbSetMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, |
497 | pub fn XkbSetNamedDeviceIndicator (_9: *mut Display, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: XkbIndicatorMapPtr) -> c_int, |
498 | pub fn XkbSetNamedIndicator (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: XkbIndicatorMapPtr) -> c_int, |
499 | pub fn XkbSetNames (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, |
500 | pub fn XkbSetPerClientControls (_3: *mut Display, _2: c_uint, _1: *mut c_uint) -> c_int, |
501 | pub fn XkbSetServerInternalMods (_6: *mut Display, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, |
502 | pub fn XkbSetXlibControls (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_uint, |
503 | pub fn XkbToControl (_1: c_char) -> c_char, |
504 | pub fn XkbTranslateKeyCode (_5: XkbDescPtr, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> c_int, |
505 | pub fn XkbTranslateKeySym (_6: *mut Display, _5: *mut c_ulong, _4: c_uint, _3: *mut c_char, _2: c_int, _1: *mut c_int) -> c_int, |
506 | pub fn XkbUpdateActionVirtualMods (_3: XkbDescPtr, _2: *mut XkbAction, _1: c_uint) -> c_int, |
507 | pub fn XkbUpdateKeyTypeVirtualMods (_4: XkbDescPtr, _3: XkbKeyTypePtr, _2: c_uint, _1: XkbChangesPtr) -> (), |
508 | pub fn XkbUpdateMapFromCore (_6: XkbDescPtr, _5: c_uchar, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: XkbChangesPtr) -> c_int, |
509 | pub fn XkbUseExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, |
510 | pub fn XkbVirtualModsToReal (_3: XkbDescPtr, _2: c_uint, _1: *mut c_uint) -> c_int, |
511 | pub fn XkbXlibControlsImplemented () -> c_uint, |
512 | pub fn XKeycodeToKeysym (_3: *mut Display, _2: c_uchar, _1: c_int) -> c_ulong, |
513 | pub fn XKeysymToKeycode (_2: *mut Display, _1: c_ulong) -> c_uchar, |
514 | pub fn XKeysymToString (_1: c_ulong) -> *mut c_char, |
515 | pub fn XKillClient (_2: *mut Display, _1: c_ulong) -> c_int, |
516 | pub fn XLastKnownRequestProcessed (_1: *mut Display) -> c_ulong, |
517 | pub fn XListDepths (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut c_int, |
518 | pub fn XListExtensions (_2: *mut Display, _1: *mut c_int) -> *mut *mut c_char, |
519 | pub fn XListFonts (_4: *mut Display, _3: *const c_char, _2: c_int, _1: *mut c_int) -> *mut *mut c_char, |
520 | pub fn XListFontsWithInfo (_5: *mut Display, _4: *const c_char, _3: c_int, _2: *mut c_int, _1: *mut *mut XFontStruct) -> *mut *mut c_char, |
521 | pub fn XListHosts (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> *mut XHostAddress, |
522 | pub fn XListInstalledColormaps (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong, |
523 | pub fn XListPixmapFormats (_2: *mut Display, _1: *mut c_int) -> *mut XPixmapFormatValues, |
524 | pub fn XListProperties (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong, |
525 | pub fn XLoadFont (_2: *mut Display, _1: *const c_char) -> c_ulong, |
526 | pub fn XLoadQueryFont (_2: *mut Display, _1: *const c_char) -> *mut XFontStruct, |
527 | pub fn XLocaleOfFontSet (_1: XFontSet) -> *mut c_char, |
528 | pub fn XLocaleOfIM (_1: XIM) -> *mut c_char, |
529 | pub fn XLocaleOfOM (_1: XOM) -> *mut c_char, |
530 | pub fn XLockDisplay (_1: *mut Display) -> (), |
531 | pub fn XLookupColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut XColor, _1: *mut XColor) -> c_int, |
532 | pub fn XLookupKeysym (_2: *mut XKeyEvent, _1: c_int) -> c_ulong, |
533 | pub fn XLookupString (_5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
534 | pub fn XLowerWindow (_2: *mut Display, _1: c_ulong) -> c_int, |
535 | pub fn XMapRaised (_2: *mut Display, _1: c_ulong) -> c_int, |
536 | pub fn XMapSubwindows (_2: *mut Display, _1: c_ulong) -> c_int, |
537 | pub fn XMapWindow (_2: *mut Display, _1: c_ulong) -> c_int, |
538 | pub fn XMaskEvent (_3: *mut Display, _2: c_long, _1: *mut XEvent) -> c_int, |
539 | pub fn XMatchVisualInfo (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: *mut XVisualInfo) -> c_int, |
540 | pub fn XMaxCmapsOfScreen (_1: *mut Screen) -> c_int, |
541 | pub fn XMaxRequestSize (_1: *mut Display) -> c_long, |
542 | pub fn XmbDrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), |
543 | pub fn XmbDrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), |
544 | pub fn XmbDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XmbTextItem, _1: c_int) -> (), |
545 | pub fn XmbLookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int, |
546 | pub fn XmbResetIC (_1: XIC) -> *mut c_char, |
547 | pub fn XmbSetWMProperties (_9: *mut Display, _8: c_ulong, _7: *const c_char, _6: *const c_char, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (), |
548 | pub fn XmbTextEscapement (_3: XFontSet, _2: *const c_char, _1: c_int) -> c_int, |
549 | pub fn XmbTextExtents (_5: XFontSet, _4: *const c_char, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, |
550 | pub fn XmbTextListToTextProperty (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int, |
551 | pub fn XmbTextPerCharExtents (_9: XFontSet, _8: *const c_char, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, |
552 | pub fn XmbTextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, |
553 | pub fn XMinCmapsOfScreen (_1: *mut Screen) -> c_int, |
554 | pub fn XMoveResizeWindow (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, |
555 | pub fn XMoveWindow (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_int) -> c_int, |
556 | pub fn XNewModifiermap (_1: c_int) -> *mut XModifierKeymap, |
557 | pub fn XNextEvent (_2: *mut Display, _1: *mut XEvent) -> c_int, |
558 | pub fn XNextRequest (_1: *mut Display) -> c_ulong, |
559 | pub fn XNoOp (_1: *mut Display) -> c_int, |
560 | pub fn XOffsetRegion (_3: Region, _2: c_int, _1: c_int) -> c_int, |
561 | pub fn XOMOfOC (_1: XFontSet) -> XOM, |
562 | pub fn XOpenDisplay (_1: *const c_char) -> *mut Display, |
563 | pub fn XOpenIM (_4: *mut Display, _3: XrmDatabase, _2: *mut c_char, _1: *mut c_char) -> XIM, |
564 | pub fn XOpenOM (_4: *mut Display, _3: XrmDatabase, _2: *const c_char, _1: *const c_char) -> XOM, |
565 | pub fn XParseColor (_4: *mut Display, _3: c_ulong, _2: *const c_char, _1: *mut XColor) -> c_int, |
566 | pub fn XParseGeometry (_5: *const c_char, _4: *mut c_int, _3: *mut c_int, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
567 | pub fn XPeekEvent (_2: *mut Display, _1: *mut XEvent) -> c_int, |
568 | pub fn XPeekIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int, |
569 | pub fn XPending (_1: *mut Display) -> c_int, |
570 | pub fn Xpermalloc (_1: c_uint) -> *mut c_char, |
571 | pub fn XPlanesOfScreen (_1: *mut Screen) -> c_int, |
572 | pub fn XPointInRegion (_3: Region, _2: c_int, _1: c_int) -> c_int, |
573 | pub fn XPolygonRegion (_3: *mut XPoint, _2: c_int, _1: c_int) -> Region, |
574 | pub fn XProcessInternalConnection (_2: *mut Display, _1: c_int) -> (), |
575 | pub fn XProtocolRevision (_1: *mut Display) -> c_int, |
576 | pub fn XProtocolVersion (_1: *mut Display) -> c_int, |
577 | pub fn XPutBackEvent (_2: *mut Display, _1: *mut XEvent) -> c_int, |
578 | pub fn XPutImage (_10: *mut Display, _9: c_ulong, _8: GC, _7: *mut XImage, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, |
579 | pub fn XPutPixel (_4: *mut XImage, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, |
580 | pub fn XQLength (_1: *mut Display) -> c_int, |
581 | pub fn XQueryBestCursor (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
582 | pub fn XQueryBestSize (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
583 | pub fn XQueryBestStipple (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
584 | pub fn XQueryBestTile (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, |
585 | pub fn XQueryColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int, |
586 | pub fn XQueryColors (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: c_int) -> c_int, |
587 | pub fn XQueryExtension (_5: *mut Display, _4: *const c_char, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, |
588 | pub fn XQueryFont (_2: *mut Display, _1: c_ulong) -> *mut XFontStruct, |
589 | pub fn XQueryKeymap (_2: *mut Display, _1: *mut c_char) -> c_int, |
590 | pub fn XQueryPointer (_9: *mut Display, _8: c_ulong, _7: *mut c_ulong, _6: *mut c_ulong, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_uint) -> c_int, |
591 | pub fn XQueryTextExtents (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, |
592 | pub fn XQueryTextExtents16 (_8: *mut Display, _7: c_ulong, _6: *const XChar2b, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, |
593 | pub fn XQueryTree (_6: *mut Display, _5: c_ulong, _4: *mut c_ulong, _3: *mut c_ulong, _2: *mut *mut c_ulong, _1: *mut c_uint) -> c_int, |
594 | pub fn XRaiseWindow (_2: *mut Display, _1: c_ulong) -> c_int, |
595 | pub fn XReadBitmapFile (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut c_ulong, _2: *mut c_int, _1: *mut c_int) -> c_int, |
596 | pub fn XReadBitmapFileData (_6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int, |
597 | pub fn XRebindKeysym (_6: *mut Display, _5: c_ulong, _4: *mut c_ulong, _3: c_int, _2: *const c_uchar, _1: c_int) -> c_int, |
598 | pub fn XRecolorCursor (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: *mut XColor) -> c_int, |
599 | pub fn XReconfigureWMWindow (_5: *mut Display, _4: c_ulong, _3: c_int, _2: c_uint, _1: *mut XWindowChanges) -> c_int, |
600 | pub fn XRectInRegion (_5: Region, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, |
601 | pub fn XRefreshKeyboardMapping (_1: *mut XMappingEvent) -> c_int, |
602 | pub fn XRegisterIMInstantiateCallback (_6: *mut Display, _5: XrmDatabase, _4: *mut c_char, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_char)>, _1: *mut c_char) -> c_int, |
603 | pub fn XRemoveConnectionWatch (_3: *mut Display, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, c_int, c_int, *mut *mut c_char)>, _1: *mut c_char) -> (), |
604 | pub fn XRemoveFromSaveSet (_2: *mut Display, _1: c_ulong) -> c_int, |
605 | pub fn XRemoveHost (_2: *mut Display, _1: *mut XHostAddress) -> c_int, |
606 | pub fn XRemoveHosts (_3: *mut Display, _2: *mut XHostAddress, _1: c_int) -> c_int, |
607 | pub fn XReparentWindow (_5: *mut Display, _4: c_ulong, _3: c_ulong, _2: c_int, _1: c_int) -> c_int, |
608 | pub fn XResetScreenSaver (_1: *mut Display) -> c_int, |
609 | pub fn XResizeWindow (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> c_int, |
610 | pub fn XResourceManagerString (_1: *mut Display) -> *mut c_char, |
611 | pub fn XRestackWindows (_3: *mut Display, _2: *mut c_ulong, _1: c_int) -> c_int, |
612 | pub fn XrmCombineDatabase (_3: XrmDatabase, _2: *mut XrmDatabase, _1: c_int) -> (), |
613 | pub fn XrmCombineFileDatabase (_3: *const c_char, _2: *mut XrmDatabase, _1: c_int) -> c_int, |
614 | pub fn XrmDestroyDatabase (_1: XrmDatabase) -> (), |
615 | pub fn XrmEnumerateDatabase (_6: XrmDatabase, _5: *mut c_int, _4: *mut c_int, _3: c_int, _2: Option<unsafe extern "C" fn (*mut XrmDatabase, *mut XrmBinding, *mut c_int, *mut c_int, *mut XrmValue, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int, |
616 | pub fn XrmGetDatabase (_1: *mut Display) -> XrmDatabase, |
617 | pub fn XrmGetFileDatabase (_1: *const c_char) -> XrmDatabase, |
618 | pub fn XrmGetResource (_5: XrmDatabase, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut XrmValue) -> c_int, |
619 | pub fn XrmGetStringDatabase (_1: *const c_char) -> XrmDatabase, |
620 | pub fn XrmInitialize () -> (), |
621 | pub fn XrmLocaleOfDatabase (_1: XrmDatabase) -> *const c_char, |
622 | pub fn XrmMergeDatabases (_2: XrmDatabase, _1: *mut XrmDatabase) -> (), |
623 | pub fn XrmParseCommand (_6: *mut XrmDatabase, _5: XrmOptionDescList, _4: c_int, _3: *const c_char, _2: *mut c_int, _1: *mut *mut c_char) -> (), |
624 | pub fn XrmPermStringToQuark (_1: *const c_char) -> c_int, |
625 | pub fn XrmPutFileDatabase (_2: XrmDatabase, _1: *const c_char) -> (), |
626 | pub fn XrmPutLineResource (_2: *mut XrmDatabase, _1: *const c_char) -> (), |
627 | pub fn XrmPutResource (_4: *mut XrmDatabase, _3: *const c_char, _2: *const c_char, _1: *mut XrmValue) -> (), |
628 | pub fn XrmPutStringResource (_3: *mut XrmDatabase, _2: *const c_char, _1: *const c_char) -> (), |
629 | pub fn XrmQGetResource (_5: XrmDatabase, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XrmValue) -> c_int, |
630 | pub fn XrmQGetSearchList (_5: XrmDatabase, _4: *mut c_int, _3: *mut c_int, _2: *mut *mut XrmDatabase, _1: c_int) -> c_int, |
631 | pub fn XrmQGetSearchResource (_5: *mut *mut XrmDatabase, _4: c_int, _3: c_int, _2: *mut c_int, _1: *mut XrmValue) -> c_int, |
632 | pub fn XrmQPutResource (_5: *mut XrmDatabase, _4: *mut XrmBinding, _3: *mut c_int, _2: c_int, _1: *mut XrmValue) -> (), |
633 | pub fn XrmQPutStringResource (_4: *mut XrmDatabase, _3: *mut XrmBinding, _2: *mut c_int, _1: *const c_char) -> (), |
634 | pub fn XrmQuarkToString (_1: c_int) -> *mut c_char, |
635 | pub fn XrmSetDatabase (_2: *mut Display, _1: XrmDatabase) -> (), |
636 | pub fn XrmStringToBindingQuarkList (_3: *const c_char, _2: *mut XrmBinding, _1: *mut c_int) -> (), |
637 | pub fn XrmStringToQuark (_1: *const c_char) -> c_int, |
638 | pub fn XrmStringToQuarkList (_2: *const c_char, _1: *mut c_int) -> (), |
639 | pub fn XrmUniqueQuark () -> c_int, |
640 | pub fn XRootWindow (_2: *mut Display, _1: c_int) -> c_ulong, |
641 | pub fn XRootWindowOfScreen (_1: *mut Screen) -> c_ulong, |
642 | pub fn XRotateBuffers (_2: *mut Display, _1: c_int) -> c_int, |
643 | pub fn XRotateWindowProperties (_5: *mut Display, _4: c_ulong, _3: *mut c_ulong, _2: c_int, _1: c_int) -> c_int, |
644 | pub fn XSaveContext (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *const c_char) -> c_int, |
645 | pub fn XScreenCount (_1: *mut Display) -> c_int, |
646 | pub fn XScreenNumberOfScreen (_1: *mut Screen) -> c_int, |
647 | pub fn XScreenOfDisplay (_2: *mut Display, _1: c_int) -> *mut Screen, |
648 | pub fn XScreenResourceString (_1: *mut Screen) -> *mut c_char, |
649 | pub fn XSelectInput (_3: *mut Display, _2: c_ulong, _1: c_long) -> c_int, |
650 | pub fn XSendEvent (_5: *mut Display, _4: c_ulong, _3: c_int, _2: c_long, _1: *mut XEvent) -> c_int, |
651 | pub fn XServerVendor (_1: *mut Display) -> *mut c_char, |
652 | pub fn XSetAccessControl (_2: *mut Display, _1: c_int) -> c_int, |
653 | pub fn XSetAfterFunction (_2: *mut Display, _1: Option<unsafe extern "C" fn (*mut Display) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display) -> c_int>, |
654 | pub fn XSetArcMode (_3: *mut Display, _2: GC, _1: c_int) -> c_int, |
655 | pub fn XSetAuthorization (_4: *mut c_char, _3: c_int, _2: *mut c_char, _1: c_int) -> (), |
656 | pub fn XSetBackground (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, |
657 | pub fn XSetClassHint (_3: *mut Display, _2: c_ulong, _1: *mut XClassHint) -> c_int, |
658 | pub fn XSetClipMask (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, |
659 | pub fn XSetClipOrigin (_4: *mut Display, _3: GC, _2: c_int, _1: c_int) -> c_int, |
660 | pub fn XSetClipRectangles (_7: *mut Display, _6: GC, _5: c_int, _4: c_int, _3: *mut XRectangle, _2: c_int, _1: c_int) -> c_int, |
661 | pub fn XSetCloseDownMode (_2: *mut Display, _1: c_int) -> c_int, |
662 | pub fn XSetCommand (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_char, _1: c_int) -> c_int, |
663 | pub fn XSetDashes (_5: *mut Display, _4: GC, _3: c_int, _2: *const c_char, _1: c_int) -> c_int, |
664 | pub fn XSetErrorHandler (_1: Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent) -> c_int>, |
665 | pub fn XSetFillRule (_3: *mut Display, _2: GC, _1: c_int) -> c_int, |
666 | pub fn XSetFillStyle (_3: *mut Display, _2: GC, _1: c_int) -> c_int, |
667 | pub fn XSetFont (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, |
668 | pub fn XSetFontPath (_3: *mut Display, _2: *mut *mut c_char, _1: c_int) -> c_int, |
669 | pub fn XSetForeground (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, |
670 | pub fn XSetFunction (_3: *mut Display, _2: GC, _1: c_int) -> c_int, |
671 | pub fn XSetGraphicsExposures (_3: *mut Display, _2: GC, _1: c_int) -> c_int, |
672 | pub fn XSetICFocus (_1: XIC) -> (), |
673 | pub fn XSetIconName (_3: *mut Display, _2: c_ulong, _1: *const c_char) -> c_int, |
674 | pub fn XSetIconSizes (_4: *mut Display, _3: c_ulong, _2: *mut XIconSize, _1: c_int) -> c_int, |
675 | pub fn XSetInputFocus (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, |
676 | pub fn XSetIOErrorHandler (_1: Option<unsafe extern "C" fn (*mut Display) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display) -> c_int>, |
677 | pub fn XSetLineAttributes (_6: *mut Display, _5: GC, _4: c_uint, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
678 | pub fn XSetLocaleModifiers (_1: *const c_char) -> *mut c_char, |
679 | pub fn XSetModifierMapping (_2: *mut Display, _1: *mut XModifierKeymap) -> c_int, |
680 | pub fn XSetNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, |
681 | pub fn XSetPlaneMask (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, |
682 | pub fn XSetPointerMapping (_3: *mut Display, _2: *const c_uchar, _1: c_int) -> c_int, |
683 | pub fn XSetRegion (_3: *mut Display, _2: GC, _1: Region) -> c_int, |
684 | pub fn XSetRGBColormaps (_5: *mut Display, _4: c_ulong, _3: *mut XStandardColormap, _2: c_int, _1: c_ulong) -> (), |
685 | pub fn XSetScreenSaver (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, |
686 | pub fn XSetSelectionOwner (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int, |
687 | pub fn XSetSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> c_int, |
688 | pub fn XSetStandardColormap (_4: *mut Display, _3: c_ulong, _2: *mut XStandardColormap, _1: c_ulong) -> (), |
689 | pub fn XSetStandardProperties (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: *const c_char, _4: c_ulong, _3: *mut *mut c_char, _2: c_int, _1: *mut XSizeHints) -> c_int, |
690 | pub fn XSetState (_6: *mut Display, _5: GC, _4: c_ulong, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, |
691 | pub fn XSetStipple (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, |
692 | pub fn XSetSubwindowMode (_3: *mut Display, _2: GC, _1: c_int) -> c_int, |
693 | pub fn XSetTextProperty (_4: *mut Display, _3: c_ulong, _2: *mut XTextProperty, _1: c_ulong) -> (), |
694 | pub fn XSetTile (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, |
695 | pub fn XSetTransientForHint (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
696 | pub fn XSetTSOrigin (_4: *mut Display, _3: GC, _2: c_int, _1: c_int) -> c_int, |
697 | pub fn XSetWindowBackground (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
698 | pub fn XSetWindowBackgroundPixmap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
699 | pub fn XSetWindowBorder (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
700 | pub fn XSetWindowBorderPixmap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
701 | pub fn XSetWindowBorderWidth (_3: *mut Display, _2: c_ulong, _1: c_uint) -> c_int, |
702 | pub fn XSetWindowColormap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, |
703 | pub fn XSetWMClientMachine (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (), |
704 | pub fn XSetWMColormapWindows (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, |
705 | pub fn XSetWMHints (_3: *mut Display, _2: c_ulong, _1: *mut XWMHints) -> c_int, |
706 | pub fn XSetWMIconName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (), |
707 | pub fn XSetWMName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (), |
708 | pub fn XSetWMNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> (), |
709 | pub fn XSetWMProperties (_9: *mut Display, _8: c_ulong, _7: *mut XTextProperty, _6: *mut XTextProperty, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (), |
710 | pub fn XSetWMProtocols (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, |
711 | pub fn XSetWMSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> (), |
712 | pub fn XSetZoomHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, |
713 | pub fn XShrinkRegion (_3: Region, _2: c_int, _1: c_int) -> c_int, |
714 | pub fn XStoreBuffer (_4: *mut Display, _3: *const c_char, _2: c_int, _1: c_int) -> c_int, |
715 | pub fn XStoreBytes (_3: *mut Display, _2: *const c_char, _1: c_int) -> c_int, |
716 | pub fn XStoreColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int, |
717 | pub fn XStoreColors (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: c_int) -> c_int, |
718 | pub fn XStoreName (_3: *mut Display, _2: c_ulong, _1: *const c_char) -> c_int, |
719 | pub fn XStoreNamedColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: c_ulong, _1: c_int) -> c_int, |
720 | pub fn XStringListToTextProperty (_3: *mut *mut c_char, _2: c_int, _1: *mut XTextProperty) -> c_int, |
721 | pub fn XStringToKeysym (_1: *const c_char) -> c_ulong, |
722 | pub fn XSubImage (_5: *mut XImage, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> *mut XImage, |
723 | pub fn XSubtractRegion (_3: Region, _2: Region, _1: Region) -> c_int, |
724 | pub fn XSupportsLocale () -> c_int, |
725 | pub fn XSync (_2: *mut Display, _1: c_int) -> c_int, |
726 | pub fn XSynchronize (_2: *mut Display, _1: c_int) -> Option<unsafe extern "C" fn (*mut Display) -> c_int>, |
727 | pub fn XTextExtents (_7: *mut XFontStruct, _6: *const c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, |
728 | pub fn XTextExtents16 (_7: *mut XFontStruct, _6: *const XChar2b, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, |
729 | pub fn XTextPropertyToStringList (_3: *mut XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, |
730 | pub fn XTextWidth (_3: *mut XFontStruct, _2: *const c_char, _1: c_int) -> c_int, |
731 | pub fn XTextWidth16 (_3: *mut XFontStruct, _2: *const XChar2b, _1: c_int) -> c_int, |
732 | pub fn XTranslateCoordinates (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_int, _4: c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_ulong) -> c_int, |
733 | pub fn XUndefineCursor (_2: *mut Display, _1: c_ulong) -> c_int, |
734 | pub fn XUngrabButton (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_ulong) -> c_int, |
735 | pub fn XUngrabKey (_4: *mut Display, _3: c_int, _2: c_uint, _1: c_ulong) -> c_int, |
736 | pub fn XUngrabKeyboard (_2: *mut Display, _1: c_ulong) -> c_int, |
737 | pub fn XUngrabPointer (_2: *mut Display, _1: c_ulong) -> c_int, |
738 | pub fn XUngrabServer (_1: *mut Display) -> c_int, |
739 | pub fn XUninstallColormap (_2: *mut Display, _1: c_ulong) -> c_int, |
740 | pub fn XUnionRectWithRegion (_3: *mut XRectangle, _2: Region, _1: Region) -> c_int, |
741 | pub fn XUnionRegion (_3: Region, _2: Region, _1: Region) -> c_int, |
742 | pub fn XUnloadFont (_2: *mut Display, _1: c_ulong) -> c_int, |
743 | pub fn XUnlockDisplay (_1: *mut Display) -> (), |
744 | pub fn XUnmapSubwindows (_2: *mut Display, _1: c_ulong) -> c_int, |
745 | pub fn XUnmapWindow (_2: *mut Display, _1: c_ulong) -> c_int, |
746 | pub fn XUnregisterIMInstantiateCallback (_6: *mut Display, _5: XrmDatabase, _4: *mut c_char, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_char)>, _1: *mut c_char) -> c_int, |
747 | pub fn XUnsetICFocus (_1: XIC) -> (), |
748 | pub fn Xutf8DrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), |
749 | pub fn Xutf8DrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), |
750 | pub fn Xutf8DrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XmbTextItem, _1: c_int) -> (), |
751 | pub fn Xutf8LookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int, |
752 | pub fn Xutf8ResetIC (_1: XIC) -> *mut c_char, |
753 | pub fn Xutf8SetWMProperties (_9: *mut Display, _8: c_ulong, _7: *const c_char, _6: *const c_char, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (), |
754 | pub fn Xutf8TextEscapement (_3: XFontSet, _2: *const c_char, _1: c_int) -> c_int, |
755 | pub fn Xutf8TextExtents (_5: XFontSet, _4: *const c_char, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, |
756 | pub fn Xutf8TextListToTextProperty (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int, |
757 | pub fn Xutf8TextPerCharExtents (_9: XFontSet, _8: *const c_char, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, |
758 | pub fn Xutf8TextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, |
759 | pub fn XVendorRelease (_1: *mut Display) -> c_int, |
760 | pub fn XVisualIDFromVisual (_1: *mut Visual) -> c_ulong, |
761 | pub fn XWarpPointer (_9: *mut Display, _8: c_ulong, _7: c_ulong, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, |
762 | pub fn XwcDrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const wchar_t, _1: c_int) -> (), |
763 | pub fn XwcDrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const wchar_t, _1: c_int) -> (), |
764 | pub fn XwcDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XwcTextItem, _1: c_int) -> (), |
765 | pub fn XwcFreeStringList (_1: *mut *mut wchar_t) -> (), |
766 | pub fn XwcLookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut wchar_t, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int, |
767 | pub fn XwcResetIC (_1: XIC) -> *mut wchar_t, |
768 | pub fn XwcTextEscapement (_3: XFontSet, _2: *const wchar_t, _1: c_int) -> c_int, |
769 | pub fn XwcTextExtents (_5: XFontSet, _4: *const wchar_t, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, |
770 | pub fn XwcTextListToTextProperty (_5: *mut Display, _4: *mut *mut wchar_t, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int, |
771 | pub fn XwcTextPerCharExtents (_9: XFontSet, _8: *const wchar_t, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, |
772 | pub fn XwcTextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut wchar_t, _1: *mut c_int) -> c_int, |
773 | pub fn XWhitePixel (_2: *mut Display, _1: c_int) -> c_ulong, |
774 | pub fn XWhitePixelOfScreen (_1: *mut Screen) -> c_ulong, |
775 | pub fn XWidthMMOfScreen (_1: *mut Screen) -> c_int, |
776 | pub fn XWidthOfScreen (_1: *mut Screen) -> c_int, |
777 | pub fn XWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_long, _1: *mut XEvent) -> c_int, |
778 | pub fn XWithdrawWindow (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, |
779 | pub fn XWMGeometry (_11: *mut Display, _10: c_int, _9: *const c_char, _8: *const c_char, _7: c_uint, _6: *mut XSizeHints, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, |
780 | pub fn XWriteBitmapFile (_7: *mut Display, _6: *const c_char, _5: c_ulong, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, |
781 | pub fn XXorRegion (_3: Region, _2: Region, _1: Region) -> c_int, |
782 | variadic: |
783 | pub fn XCreateIC (_1: XIM) -> XIC, |
784 | pub fn XCreateOC (_1: XOM) -> XFontSet, |
785 | pub fn XGetICValues (_1: XIC) -> *mut c_char, |
786 | pub fn XGetIMValues (_1: XIM) -> *mut c_char, |
787 | pub fn XGetOCValues (_1: XFontSet) -> *mut c_char, |
788 | pub fn XGetOMValues (_1: XOM) -> *mut c_char, |
789 | pub fn XSetICValues (_1: XIC) -> *mut c_char, |
790 | pub fn XSetIMValues (_1: XIM) -> *mut c_char, |
791 | pub fn XSetOCValues (_1: XFontSet) -> *mut c_char, |
792 | pub fn XSetOMValues (_1: XOM) -> *mut c_char, |
793 | pub fn XVaCreateNestedList (_1: c_int) -> *mut c_void, |
794 | globals: |
795 | } |
796 | |
797 | // |
798 | // types |
799 | // |
800 | |
801 | // common types |
802 | pub type Atom = XID; |
803 | pub type Bool = c_int; |
804 | pub type Colormap = XID; |
805 | pub type Cursor = XID; |
806 | pub type Drawable = XID; |
807 | pub type Font = XID; |
808 | pub type GContext = XID; |
809 | pub type KeyCode = c_uchar; |
810 | pub type KeySym = XID; |
811 | pub type Mask = c_ulong; |
812 | pub type Pixmap = XID; |
813 | pub type Status = Bool; |
814 | pub type Time = c_ulong; |
815 | pub type VisualID = XID; |
816 | pub type Window = XID; |
817 | pub type XID = c_ulong; |
818 | pub type XPointer = *mut c_char; |
819 | |
820 | // opaque structures |
821 | pub enum _XDisplay {} |
822 | pub enum xError {} |
823 | pub enum xEvent {} |
824 | pub enum _XGC {} |
825 | pub enum _XIC {} |
826 | pub enum _XIM {} |
827 | pub enum _XRegion {} |
828 | pub enum _XOC {} |
829 | pub enum _XOM {} |
830 | pub enum _XrmHashBucketRec {} |
831 | |
832 | // TODO structs |
833 | #[repr (C)] |
834 | pub struct _XcmsCCC; |
835 | #[repr (C)] |
836 | pub struct XcmsColor; |
837 | #[repr (C)] |
838 | pub struct _XcmsColorSpace; |
839 | #[repr (C)] |
840 | pub struct _XcmsFunctionSet; |
841 | #[repr (C)] |
842 | pub struct _XkbAction; |
843 | #[repr (C)] |
844 | pub struct _XkbBounds; |
845 | #[repr (C)] |
846 | pub struct _XkbChanges; |
847 | #[repr (C)] |
848 | pub struct _XkbClientMapRec; |
849 | #[repr (C)] |
850 | pub struct _XkbColor; |
851 | #[repr (C)] |
852 | pub struct _XkbComponentList; |
853 | #[repr (C)] |
854 | pub struct _XkbComponentNames; |
855 | #[repr (C)] |
856 | pub struct _XkbControls { |
857 | pub mk_dflt_btn: c_uchar, |
858 | pub num_groups: c_uchar, |
859 | pub groups_wrap: c_uchar, |
860 | pub internal: XkbModsRec, |
861 | pub ignore_loc: XkbModsRec, |
862 | pub enabled_ctrls: c_uint, |
863 | pub repeat_delay: c_ushort, |
864 | pub repeat_interval: c_ushort, |
865 | pub slow_keys_delay: c_ushort, |
866 | pub debounce_delay: c_ushort, |
867 | pub mk_delay: c_ushort, |
868 | pub mk_interval: c_ushort, |
869 | pub mk_time_to_max: c_ushort, |
870 | pub mk_max_speed: c_ushort, |
871 | pub mk_curve: c_short, |
872 | pub ax_options: c_ushort, |
873 | pub ax_timeout: c_ushort, |
874 | pub axt_opts_mask: c_ushort, |
875 | pub axt_opts_values: c_ushort, |
876 | pub axt_ctrls_mask: c_uint, |
877 | pub axt_ctrls_values: c_uint, |
878 | pub per_key_repeat: [c_uchar; 32], |
879 | } |
880 | #[repr (C)] |
881 | pub struct _XkbControlsChanges; |
882 | #[repr (C)] |
883 | pub struct _XkbControlsNotify; |
884 | #[repr (C)] |
885 | pub struct _XkbDeviceChanges; |
886 | #[repr (C)] |
887 | pub struct _XkbDeviceInfo; |
888 | #[repr (C)] |
889 | pub struct _XkbDeviceLedInfo; |
890 | #[repr (C)] |
891 | pub struct _XkbDoodad; |
892 | #[repr (C)] |
893 | pub struct _XkbExtensionDeviceNotify; |
894 | #[repr (C)] |
895 | pub struct _XkbGeometry; |
896 | #[repr (C)] |
897 | pub struct _XkbGeometrySizes; |
898 | #[repr (C)] |
899 | pub struct _XkbIndicatorMapRec; |
900 | #[repr (C)] |
901 | pub struct _XkbKey; |
902 | #[repr (C)] |
903 | pub struct _XkbKeyType; |
904 | #[repr (C)] |
905 | pub struct _XkbMapChanges; |
906 | #[repr (C)] |
907 | pub struct _XkbMods { |
908 | pub mask: c_uchar, |
909 | pub real_mods: c_uchar, |
910 | pub vmods: c_ushort, |
911 | } |
912 | #[repr (C)] |
913 | pub struct _XkbNameChanges; |
914 | #[repr (C)] |
915 | pub struct _XkbNamesNotify; |
916 | #[repr (C)] |
917 | pub struct _XkbOutline; |
918 | #[repr (C)] |
919 | pub struct _XkbOverlay; |
920 | #[repr (C)] |
921 | pub struct _XkbOverlayKey; |
922 | #[repr (C)] |
923 | pub struct _XkbOverlayRow; |
924 | #[repr (C)] |
925 | pub struct _XkbProperty; |
926 | #[repr (C)] |
927 | pub struct _XkbRow; |
928 | #[repr (C)] |
929 | pub struct _XkbSection; |
930 | #[repr (C)] |
931 | pub struct _XkbServerMapRec; |
932 | #[repr (C)] |
933 | pub struct _XkbShape; |
934 | #[repr (C)] |
935 | pub struct _XkbSymInterpretRec; |
936 | |
937 | // union placeholders |
938 | pub type XEDataObject = *mut c_void; |
939 | |
940 | // misc typedefs |
941 | pub type Display = _XDisplay; |
942 | pub type GC = *mut _XGC; |
943 | pub type Region = *mut _XRegion; |
944 | pub type XcmsCCC = *mut _XcmsCCC; |
945 | pub type XcmsColorSpace = _XcmsColorSpace; |
946 | pub type XcmsFunctionSet = _XcmsFunctionSet; |
947 | pub type XContext = c_int; |
948 | pub type XFontSet = *mut _XOC; |
949 | pub type XIC = *mut _XIC; |
950 | pub type XIM = *mut _XIM; |
951 | pub type XkbAction = _XkbAction; |
952 | pub type XkbBoundsPtr = *mut _XkbBounds; |
953 | pub type XkbChangesPtr = *mut _XkbChanges; |
954 | pub type XkbClientMapPtr = *mut _XkbClientMapRec; |
955 | pub type XkbColorPtr = *mut _XkbColor; |
956 | pub type XkbCompatMapPtr = *mut _XkbCompatMapRec; |
957 | pub type XkbComponentListPtr = *mut _XkbComponentList; |
958 | pub type XkbComponentNamesPtr = *mut _XkbComponentNames; |
959 | pub type XkbControlsChangesPtr = *mut _XkbControlsChanges; |
960 | pub type XkbControlsNotifyEvent = _XkbControlsNotify; |
961 | pub type XkbControlsPtr = *mut _XkbControls; |
962 | pub type XkbDescPtr = *mut _XkbDesc; |
963 | pub type XkbDeviceChangesPtr = *mut _XkbDeviceChanges; |
964 | pub type XkbDeviceInfoPtr = *mut _XkbDeviceInfo; |
965 | pub type XkbDeviceLedInfoPtr = *mut _XkbDeviceLedInfo; |
966 | pub type XkbDoodadPtr = *mut _XkbDoodad; |
967 | pub type XkbExtensionDeviceNotifyEvent = _XkbExtensionDeviceNotify; |
968 | pub type XkbGeometryPtr = *mut _XkbGeometry; |
969 | pub type XkbGeometrySizesPtr = *mut _XkbGeometrySizes; |
970 | pub type XkbIndicatorMapPtr = *mut _XkbIndicatorMapRec; |
971 | pub type XkbIndicatorMapRec = _XkbIndicatorMapRec; |
972 | pub type XkbIndicatorPtr = *mut _XkbIndicatorRec; |
973 | pub type XkbKeyTypePtr = *mut _XkbKeyType; |
974 | pub type XkbMapChangesPtr = *mut _XkbMapChanges; |
975 | pub type XkbMapNotifyEvent = _XkbMapNotifyEvent; |
976 | pub type XkbModsPtr = *mut _XkbMods; |
977 | pub type XkbModsRec = _XkbMods; |
978 | pub type XkbNameChangesPtr = *mut _XkbNameChanges; |
979 | pub type XkbNamesNotifyEvent = _XkbNamesNotify; |
980 | pub type XkbNamesPtr = *mut _XkbNamesRec; |
981 | pub type XkbKeyAliasPtr = *mut _XkbKeyAliasRec; |
982 | pub type XkbKeyNamePtr = *mut _XkbKeyNameRec; |
983 | pub type XkbKeyPtr = *mut _XkbKey; |
984 | pub type XkbOutlinePtr = *mut _XkbOutline; |
985 | pub type XkbOverlayKeyPtr = *mut _XkbOverlayKey; |
986 | pub type XkbOverlayPtr = *mut _XkbOverlay; |
987 | pub type XkbOverlayRowPtr = *mut _XkbOverlayRow; |
988 | pub type XkbPropertyPtr = *mut _XkbProperty; |
989 | pub type XkbRowPtr = *mut _XkbRow; |
990 | pub type XkbSectionPtr = *mut _XkbSection; |
991 | pub type XkbServerMapPtr = *mut _XkbServerMapRec; |
992 | pub type XkbShapePtr = *mut _XkbShape; |
993 | pub type XkbStatePtr = *mut _XkbStateRec; |
994 | pub type XkbStateRec = _XkbStateRec; |
995 | pub type XkbSymInterpretPtr = *mut _XkbSymInterpretRec; |
996 | pub type XOM = *mut _XOM; |
997 | pub type XrmDatabase = *mut _XrmHashBucketRec; |
998 | pub type XrmOptionDescList = *mut XrmOptionDescRec; |
999 | |
1000 | // function pointers |
1001 | pub type XConnectionWatchProc = |
1002 | Option<unsafe extern "C" fn(*mut Display, XPointer, c_int, Bool, XPointer)>; |
1003 | pub type XIMProc = Option<unsafe extern "C" fn(XIM, XPointer, XPointer)>; |
1004 | pub type XICProc = Option<unsafe extern "C" fn(XIC, XPointer, XPointer) -> Bool>; |
1005 | |
1006 | // C enums |
1007 | pub type XICCEncodingStyle = c_int; |
1008 | pub type XOrientation = c_int; |
1009 | pub type XrmBinding = c_int; |
1010 | pub type XrmOptionKind = c_int; |
1011 | |
1012 | #[allow (dead_code)] |
1013 | #[cfg (test)] |
1014 | #[repr (C)] |
1015 | enum TestEnum { |
1016 | Variant1, |
1017 | Variant2, |
1018 | } |
1019 | |
1020 | #[test ] |
1021 | fn enum_size_test() { |
1022 | assert!(::std::mem::size_of::<TestEnum>() == ::std::mem::size_of::<c_int>()); |
1023 | } |
1024 | |
1025 | // |
1026 | // event structures |
1027 | // |
1028 | |
1029 | #[derive (Clone, Copy)] |
1030 | #[repr (C)] |
1031 | pub union XEvent { |
1032 | pub type_: c_int, |
1033 | pub any: XAnyEvent, |
1034 | pub button: XButtonEvent, |
1035 | pub circulate: XCirculateEvent, |
1036 | pub circulate_request: XCirculateRequestEvent, |
1037 | pub client_message: XClientMessageEvent, |
1038 | pub colormap: XColormapEvent, |
1039 | pub configure: XConfigureEvent, |
1040 | pub configure_request: XConfigureRequestEvent, |
1041 | pub create_window: XCreateWindowEvent, |
1042 | pub crossing: XCrossingEvent, |
1043 | pub destroy_window: XDestroyWindowEvent, |
1044 | pub error: XErrorEvent, |
1045 | pub expose: XExposeEvent, |
1046 | pub focus_change: XFocusChangeEvent, |
1047 | pub generic_event_cookie: XGenericEventCookie, |
1048 | pub graphics_expose: XGraphicsExposeEvent, |
1049 | pub gravity: XGravityEvent, |
1050 | pub key: XKeyEvent, |
1051 | pub keymap: XKeymapEvent, |
1052 | pub map: XMapEvent, |
1053 | pub mapping: XMappingEvent, |
1054 | pub map_request: XMapRequestEvent, |
1055 | pub motion: XMotionEvent, |
1056 | pub no_expose: XNoExposeEvent, |
1057 | pub property: XPropertyEvent, |
1058 | pub reparent: XReparentEvent, |
1059 | pub resize_request: XResizeRequestEvent, |
1060 | pub selection_clear: XSelectionClearEvent, |
1061 | pub selection: XSelectionEvent, |
1062 | pub selection_request: XSelectionRequestEvent, |
1063 | pub unmap: XUnmapEvent, |
1064 | pub visibility: XVisibilityEvent, |
1065 | pub pad: [c_long; 24], |
1066 | // xf86vidmode |
1067 | pub xf86vm_notify: xf86vmode::XF86VidModeNotifyEvent, |
1068 | // xrandr |
1069 | pub xrr_screen_change_notify: xrandr::XRRScreenChangeNotifyEvent, |
1070 | pub xrr_notify: xrandr::XRRNotifyEvent, |
1071 | pub xrr_output_change_notify: xrandr::XRROutputChangeNotifyEvent, |
1072 | pub xrr_crtc_change_notify: xrandr::XRRCrtcChangeNotifyEvent, |
1073 | pub xrr_output_property_notify: xrandr::XRROutputPropertyNotifyEvent, |
1074 | pub xrr_provider_change_notify: xrandr::XRRProviderChangeNotifyEvent, |
1075 | pub xrr_provider_property_notify: xrandr::XRRProviderPropertyNotifyEvent, |
1076 | pub xrr_resource_change_notify: xrandr::XRRResourceChangeNotifyEvent, |
1077 | // xscreensaver |
1078 | pub xss_notify: xss::XScreenSaverNotifyEvent, |
1079 | } |
1080 | |
1081 | impl XEvent { |
1082 | pub fn get_type(&self) -> c_int { |
1083 | unsafe { self.type_ } |
1084 | } |
1085 | } |
1086 | |
1087 | impl fmt::Debug for XEvent { |
1088 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
1089 | let mut d = f.debug_struct("XEvent" ); |
1090 | unsafe { |
1091 | match self.type_ { |
1092 | KeyPress => d.field("key" , &self.key), |
1093 | KeyRelease => d.field("key" , &self.key), |
1094 | ButtonPress => d.field("button" , &self.button), |
1095 | ButtonRelease => d.field("button" , &self.button), |
1096 | MotionNotify => d.field("motion" , &self.motion), |
1097 | EnterNotify => d.field("crossing" , &self.crossing), |
1098 | LeaveNotify => d.field("crossing" , &self.crossing), |
1099 | FocusIn => d.field("focus_change" , &self.focus_change), |
1100 | FocusOut => d.field("focus_change" , &self.focus_change), |
1101 | KeymapNotify => d.field("keymap" , &self.keymap), |
1102 | Expose => d.field("expose" , &self.expose), |
1103 | GraphicsExpose => d.field("graphics_expose" , &self.graphics_expose), |
1104 | NoExpose => d.field("no_expose" , &self.no_expose), |
1105 | VisibilityNotify => d.field("visibility" , &self.visibility), |
1106 | CreateNotify => d.field("create_window" , &self.create_window), |
1107 | DestroyNotify => d.field("destroy_window" , &self.destroy_window), |
1108 | UnmapNotify => d.field("unmap" , &self.unmap), |
1109 | MapNotify => d.field("map" , &self.map), |
1110 | MapRequest => d.field("map_request" , &self.map_request), |
1111 | ReparentNotify => d.field("reparent" , &self.reparent), |
1112 | ConfigureNotify => d.field("configure" , &self.configure), |
1113 | ConfigureRequest => d.field("configure_request" , &self.configure_request), |
1114 | GravityNotify => d.field("gravity" , &self.gravity), |
1115 | ResizeRequest => d.field("resize_request" , &self.resize_request), |
1116 | CirculateNotify => d.field("circulate" , &self.circulate), |
1117 | CirculateRequest => d.field("circulate_request" , &self.circulate_request), |
1118 | PropertyNotify => d.field("property" , &self.property), |
1119 | SelectionClear => d.field("selection_clear" , &self.selection_clear), |
1120 | SelectionRequest => d.field("selection_request" , &self.selection_request), |
1121 | SelectionNotify => d.field("selection" , &self.selection), |
1122 | ColormapNotify => d.field("colormap" , &self.colormap), |
1123 | ClientMessage => d.field("client_message" , &self.client_message), |
1124 | MappingNotify => d.field("mapping" , &self.mapping), |
1125 | GenericEvent => d.field("generic_event_cookie" , &self.generic_event_cookie), |
1126 | _ => d.field("any" , &self.any), |
1127 | } |
1128 | } |
1129 | .finish() |
1130 | } |
1131 | } |
1132 | |
1133 | macro_rules! event_conversions_and_tests { |
1134 | { $($field:ident: $ty:ty,)* } => { |
1135 | #[test] |
1136 | fn xevent_size_test () { |
1137 | use std::mem::size_of; |
1138 | let xevent_size = size_of::<XEvent>(); |
1139 | $(assert!(xevent_size >= size_of::<$ty>());)* |
1140 | } |
1141 | |
1142 | $( |
1143 | impl AsMut<$ty> for XEvent { |
1144 | fn as_mut (&mut self) -> &mut $ty { |
1145 | unsafe { &mut self.$field } |
1146 | } |
1147 | } |
1148 | |
1149 | impl AsRef<$ty> for XEvent { |
1150 | fn as_ref (&self) -> &$ty { |
1151 | unsafe { &self.$field } |
1152 | } |
1153 | } |
1154 | |
1155 | impl From<$ty> for XEvent { |
1156 | fn from (other: $ty) -> XEvent { |
1157 | XEvent{ $field: other } |
1158 | } |
1159 | } |
1160 | |
1161 | impl<'a> From<&'a $ty> for XEvent { |
1162 | fn from (other: &'a $ty) -> XEvent { |
1163 | XEvent{ $field: other.clone() } |
1164 | } |
1165 | } |
1166 | |
1167 | impl From<XEvent> for $ty { |
1168 | fn from (xevent: XEvent) -> $ty { |
1169 | unsafe { xevent.$field } |
1170 | } |
1171 | } |
1172 | |
1173 | impl<'a> From<&'a XEvent> for $ty { |
1174 | fn from (xevent: &'a XEvent) -> $ty { |
1175 | unsafe { xevent.$field } |
1176 | } |
1177 | } |
1178 | )* |
1179 | }; |
1180 | } |
1181 | |
1182 | event_conversions_and_tests! { |
1183 | any: XAnyEvent, |
1184 | button: XButtonEvent, |
1185 | circulate: XCirculateEvent, |
1186 | circulate_request: XCirculateRequestEvent, |
1187 | client_message: XClientMessageEvent, |
1188 | colormap: XColormapEvent, |
1189 | configure: XConfigureEvent, |
1190 | configure_request: XConfigureRequestEvent, |
1191 | create_window: XCreateWindowEvent, |
1192 | crossing: XCrossingEvent, |
1193 | destroy_window: XDestroyWindowEvent, |
1194 | error: XErrorEvent, |
1195 | expose: XExposeEvent, |
1196 | focus_change: XFocusChangeEvent, |
1197 | generic_event_cookie: XGenericEventCookie, |
1198 | graphics_expose: XGraphicsExposeEvent, |
1199 | gravity: XGravityEvent, |
1200 | key: XKeyEvent, |
1201 | keymap: XKeymapEvent, |
1202 | map: XMapEvent, |
1203 | mapping: XMappingEvent, |
1204 | map_request: XMapRequestEvent, |
1205 | motion: XMotionEvent, |
1206 | no_expose: XNoExposeEvent, |
1207 | property: XPropertyEvent, |
1208 | reparent: XReparentEvent, |
1209 | resize_request: XResizeRequestEvent, |
1210 | selection_clear: XSelectionClearEvent, |
1211 | selection: XSelectionEvent, |
1212 | selection_request: XSelectionRequestEvent, |
1213 | unmap: XUnmapEvent, |
1214 | visibility: XVisibilityEvent, |
1215 | } |
1216 | |
1217 | #[derive (Debug, Clone, Copy, PartialEq)] |
1218 | #[repr (C)] |
1219 | pub struct XAnyEvent { |
1220 | pub type_: c_int, |
1221 | pub serial: c_ulong, |
1222 | pub send_event: Bool, |
1223 | pub display: *mut Display, |
1224 | pub window: Window, |
1225 | } |
1226 | |
1227 | #[derive (Debug, Clone, Copy, PartialEq)] |
1228 | #[repr (C)] |
1229 | pub struct XButtonEvent { |
1230 | pub type_: c_int, |
1231 | pub serial: c_ulong, |
1232 | pub send_event: Bool, |
1233 | pub display: *mut Display, |
1234 | pub window: Window, |
1235 | pub root: Window, |
1236 | pub subwindow: Window, |
1237 | pub time: Time, |
1238 | pub x: c_int, |
1239 | pub y: c_int, |
1240 | pub x_root: c_int, |
1241 | pub y_root: c_int, |
1242 | pub state: c_uint, |
1243 | pub button: c_uint, |
1244 | pub same_screen: Bool, |
1245 | } |
1246 | pub type XButtonPressedEvent = XButtonEvent; |
1247 | pub type XButtonReleasedEvent = XButtonEvent; |
1248 | |
1249 | #[derive (Debug, Clone, Copy, PartialEq)] |
1250 | #[repr (C)] |
1251 | pub struct XCirculateEvent { |
1252 | pub type_: c_int, |
1253 | pub serial: c_ulong, |
1254 | pub send_event: Bool, |
1255 | pub display: *mut Display, |
1256 | pub event: Window, |
1257 | pub window: Window, |
1258 | pub place: c_int, |
1259 | } |
1260 | |
1261 | #[derive (Debug, Clone, Copy, PartialEq)] |
1262 | #[repr (C)] |
1263 | pub struct XCirculateRequestEvent { |
1264 | pub type_: c_int, |
1265 | pub serial: c_ulong, |
1266 | pub send_event: Bool, |
1267 | pub display: *mut Display, |
1268 | pub parent: Window, |
1269 | pub window: Window, |
1270 | pub place: c_int, |
1271 | } |
1272 | |
1273 | #[derive (Debug, Clone, Copy, PartialEq)] |
1274 | #[repr (C)] |
1275 | pub struct XClientMessageEvent { |
1276 | pub type_: c_int, |
1277 | pub serial: c_ulong, |
1278 | pub send_event: Bool, |
1279 | pub display: *mut Display, |
1280 | pub window: Window, |
1281 | pub message_type: Atom, |
1282 | pub format: c_int, |
1283 | pub data: ClientMessageData, |
1284 | } |
1285 | |
1286 | #[derive (Debug, Clone, Copy, PartialEq)] |
1287 | #[repr (C)] |
1288 | pub struct XColormapEvent { |
1289 | pub type_: c_int, |
1290 | pub serial: c_ulong, |
1291 | pub send_event: Bool, |
1292 | pub display: *mut Display, |
1293 | pub window: Window, |
1294 | pub colormap: Colormap, |
1295 | pub new: Bool, |
1296 | pub state: c_int, |
1297 | } |
1298 | |
1299 | #[derive (Debug, Clone, Copy, PartialEq)] |
1300 | #[repr (C)] |
1301 | pub struct XConfigureEvent { |
1302 | pub type_: c_int, |
1303 | pub serial: c_ulong, |
1304 | pub send_event: Bool, |
1305 | pub display: *mut Display, |
1306 | pub event: Window, |
1307 | pub window: Window, |
1308 | pub x: c_int, |
1309 | pub y: c_int, |
1310 | pub width: c_int, |
1311 | pub height: c_int, |
1312 | pub border_width: c_int, |
1313 | pub above: Window, |
1314 | pub override_redirect: Bool, |
1315 | } |
1316 | |
1317 | #[derive (Debug, Clone, Copy, PartialEq)] |
1318 | #[repr (C)] |
1319 | pub struct XConfigureRequestEvent { |
1320 | pub type_: c_int, |
1321 | pub serial: c_ulong, |
1322 | pub send_event: Bool, |
1323 | pub display: *mut Display, |
1324 | pub parent: Window, |
1325 | pub window: Window, |
1326 | pub x: c_int, |
1327 | pub y: c_int, |
1328 | pub width: c_int, |
1329 | pub height: c_int, |
1330 | pub border_width: c_int, |
1331 | pub above: Window, |
1332 | pub detail: c_int, |
1333 | pub value_mask: c_ulong, |
1334 | } |
1335 | |
1336 | #[derive (Debug, Clone, Copy, PartialEq)] |
1337 | #[repr (C)] |
1338 | pub struct XCreateWindowEvent { |
1339 | pub type_: c_int, |
1340 | pub serial: c_ulong, |
1341 | pub send_event: Bool, |
1342 | pub display: *mut Display, |
1343 | pub parent: Window, |
1344 | pub window: Window, |
1345 | pub x: c_int, |
1346 | pub y: c_int, |
1347 | pub width: c_int, |
1348 | pub height: c_int, |
1349 | pub border_width: c_int, |
1350 | pub override_redirect: Bool, |
1351 | } |
1352 | |
1353 | #[derive (Debug, Clone, Copy, PartialEq)] |
1354 | #[repr (C)] |
1355 | pub struct XCrossingEvent { |
1356 | pub type_: c_int, |
1357 | pub serial: c_ulong, |
1358 | pub send_event: Bool, |
1359 | pub display: *mut Display, |
1360 | pub window: Window, |
1361 | pub root: Window, |
1362 | pub subwindow: Window, |
1363 | pub time: Time, |
1364 | pub x: c_int, |
1365 | pub y: c_int, |
1366 | pub x_root: c_int, |
1367 | pub y_root: c_int, |
1368 | pub mode: c_int, |
1369 | pub detail: c_int, |
1370 | pub same_screen: Bool, |
1371 | pub focus: Bool, |
1372 | pub state: c_uint, |
1373 | } |
1374 | pub type XEnterWindowEvent = XCrossingEvent; |
1375 | pub type XLeaveWindowEvent = XCrossingEvent; |
1376 | |
1377 | #[derive (Debug, Clone, Copy, PartialEq)] |
1378 | #[repr (C)] |
1379 | pub struct XDestroyWindowEvent { |
1380 | pub type_: c_int, |
1381 | pub serial: c_ulong, |
1382 | pub send_event: Bool, |
1383 | pub display: *mut Display, |
1384 | pub event: Window, |
1385 | pub window: Window, |
1386 | } |
1387 | |
1388 | #[derive (Debug, Clone, Copy, PartialEq)] |
1389 | #[repr (C)] |
1390 | pub struct XErrorEvent { |
1391 | pub type_: c_int, |
1392 | pub display: *mut Display, |
1393 | pub resourceid: XID, |
1394 | pub serial: c_ulong, |
1395 | pub error_code: c_uchar, |
1396 | pub request_code: c_uchar, |
1397 | pub minor_code: c_uchar, |
1398 | } |
1399 | |
1400 | #[derive (Debug, Clone, Copy, PartialEq)] |
1401 | #[repr (C)] |
1402 | pub struct XExposeEvent { |
1403 | pub type_: c_int, |
1404 | pub serial: c_ulong, |
1405 | pub send_event: Bool, |
1406 | pub display: *mut Display, |
1407 | pub window: Window, |
1408 | pub x: c_int, |
1409 | pub y: c_int, |
1410 | pub width: c_int, |
1411 | pub height: c_int, |
1412 | pub count: c_int, |
1413 | } |
1414 | |
1415 | #[derive (Debug, Clone, Copy, PartialEq)] |
1416 | #[repr (C)] |
1417 | pub struct XFocusChangeEvent { |
1418 | pub type_: c_int, |
1419 | pub serial: c_ulong, |
1420 | pub send_event: Bool, |
1421 | pub display: *mut Display, |
1422 | pub window: Window, |
1423 | pub mode: c_int, |
1424 | pub detail: c_int, |
1425 | } |
1426 | pub type XFocusInEvent = XFocusChangeEvent; |
1427 | pub type XFocusOutEvent = XFocusChangeEvent; |
1428 | |
1429 | #[derive (Debug, Clone, Copy, PartialEq)] |
1430 | #[repr (C)] |
1431 | pub struct XGraphicsExposeEvent { |
1432 | pub type_: c_int, |
1433 | pub serial: c_ulong, |
1434 | pub send_event: Bool, |
1435 | pub display: *mut Display, |
1436 | pub drawable: Drawable, |
1437 | pub x: c_int, |
1438 | pub y: c_int, |
1439 | pub width: c_int, |
1440 | pub height: c_int, |
1441 | pub count: c_int, |
1442 | pub major_code: c_int, |
1443 | pub minor_code: c_int, |
1444 | } |
1445 | |
1446 | #[derive (Debug, Clone, Copy, PartialEq)] |
1447 | #[repr (C)] |
1448 | pub struct XGravityEvent { |
1449 | pub type_: c_int, |
1450 | pub serial: c_ulong, |
1451 | pub send_event: Bool, |
1452 | pub display: *mut Display, |
1453 | pub event: Window, |
1454 | pub window: Window, |
1455 | pub x: c_int, |
1456 | pub y: c_int, |
1457 | } |
1458 | |
1459 | #[derive (Debug, Clone, Copy, PartialEq)] |
1460 | #[repr (C)] |
1461 | pub struct XKeyEvent { |
1462 | pub type_: c_int, |
1463 | pub serial: c_ulong, |
1464 | pub send_event: Bool, |
1465 | pub display: *mut Display, |
1466 | pub window: Window, |
1467 | pub root: Window, |
1468 | pub subwindow: Window, |
1469 | pub time: Time, |
1470 | pub x: c_int, |
1471 | pub y: c_int, |
1472 | pub x_root: c_int, |
1473 | pub y_root: c_int, |
1474 | pub state: c_uint, |
1475 | pub keycode: c_uint, |
1476 | pub same_screen: Bool, |
1477 | } |
1478 | pub type XKeyPressedEvent = XKeyEvent; |
1479 | pub type XKeyReleasedEvent = XKeyEvent; |
1480 | |
1481 | #[derive (Debug, Clone, Copy, PartialEq)] |
1482 | #[repr (C)] |
1483 | pub struct XKeymapEvent { |
1484 | pub type_: c_int, |
1485 | pub serial: c_ulong, |
1486 | pub send_event: Bool, |
1487 | pub display: *mut Display, |
1488 | pub window: Window, |
1489 | pub key_vector: [c_char; 32], |
1490 | } |
1491 | |
1492 | #[derive (Debug, Clone, Copy, PartialEq)] |
1493 | #[repr (C)] |
1494 | pub struct XMapEvent { |
1495 | pub type_: c_int, |
1496 | pub serial: c_ulong, |
1497 | pub send_event: Bool, |
1498 | pub display: *mut Display, |
1499 | pub event: Window, |
1500 | pub window: Window, |
1501 | pub override_redirect: Bool, |
1502 | } |
1503 | |
1504 | #[derive (Debug, Clone, Copy, PartialEq)] |
1505 | #[repr (C)] |
1506 | pub struct XMappingEvent { |
1507 | pub type_: c_int, |
1508 | pub serial: c_ulong, |
1509 | pub send_event: Bool, |
1510 | pub display: *mut Display, |
1511 | pub event: Window, |
1512 | pub request: c_int, |
1513 | pub first_keycode: c_int, |
1514 | pub count: c_int, |
1515 | } |
1516 | |
1517 | #[derive (Debug, Clone, Copy, PartialEq)] |
1518 | #[repr (C)] |
1519 | pub struct XMapRequestEvent { |
1520 | pub type_: c_int, |
1521 | pub serial: c_ulong, |
1522 | pub send_event: Bool, |
1523 | pub display: *mut Display, |
1524 | pub parent: Window, |
1525 | pub window: Window, |
1526 | } |
1527 | |
1528 | #[derive (Debug, Clone, Copy, PartialEq)] |
1529 | #[repr (C)] |
1530 | pub struct XMotionEvent { |
1531 | pub type_: c_int, |
1532 | pub serial: c_ulong, |
1533 | pub send_event: Bool, |
1534 | pub display: *mut Display, |
1535 | pub window: Window, |
1536 | pub root: Window, |
1537 | pub subwindow: Window, |
1538 | pub time: Time, |
1539 | pub x: c_int, |
1540 | pub y: c_int, |
1541 | pub x_root: c_int, |
1542 | pub y_root: c_int, |
1543 | pub state: c_uint, |
1544 | pub is_hint: c_char, |
1545 | pub same_screen: Bool, |
1546 | } |
1547 | pub type XPointerMovedEvent = XMotionEvent; |
1548 | |
1549 | #[derive (Debug, Clone, Copy, PartialEq)] |
1550 | #[repr (C)] |
1551 | pub struct XNoExposeEvent { |
1552 | pub type_: c_int, |
1553 | pub serial: c_ulong, |
1554 | pub send_event: Bool, |
1555 | pub display: *mut Display, |
1556 | pub drawable: Drawable, |
1557 | pub major_code: c_int, |
1558 | pub minor_code: c_int, |
1559 | } |
1560 | |
1561 | #[derive (Debug, Clone, Copy, PartialEq)] |
1562 | #[repr (C)] |
1563 | pub struct XPropertyEvent { |
1564 | pub type_: c_int, |
1565 | pub serial: c_ulong, |
1566 | pub send_event: Bool, |
1567 | pub display: *mut Display, |
1568 | pub window: Window, |
1569 | pub atom: Atom, |
1570 | pub time: Time, |
1571 | pub state: c_int, |
1572 | } |
1573 | |
1574 | #[derive (Debug, Clone, Copy, PartialEq)] |
1575 | #[repr (C)] |
1576 | pub struct XReparentEvent { |
1577 | pub type_: c_int, |
1578 | pub serial: c_ulong, |
1579 | pub send_event: Bool, |
1580 | pub display: *mut Display, |
1581 | pub event: Window, |
1582 | pub window: Window, |
1583 | pub parent: Window, |
1584 | pub x: c_int, |
1585 | pub y: c_int, |
1586 | pub override_redirect: Bool, |
1587 | } |
1588 | |
1589 | #[derive (Debug, Clone, Copy, PartialEq)] |
1590 | #[repr (C)] |
1591 | pub struct XResizeRequestEvent { |
1592 | pub type_: c_int, |
1593 | pub serial: c_ulong, |
1594 | pub send_event: Bool, |
1595 | pub display: *mut Display, |
1596 | pub window: Window, |
1597 | pub width: c_int, |
1598 | pub height: c_int, |
1599 | } |
1600 | |
1601 | #[derive (Debug, Clone, Copy, PartialEq)] |
1602 | #[repr (C)] |
1603 | pub struct XSelectionClearEvent { |
1604 | pub type_: c_int, |
1605 | pub serial: c_ulong, |
1606 | pub send_event: Bool, |
1607 | pub display: *mut Display, |
1608 | pub window: Window, |
1609 | pub selection: Atom, |
1610 | pub time: Time, |
1611 | } |
1612 | |
1613 | #[derive (Debug, Clone, Copy, PartialEq)] |
1614 | #[repr (C)] |
1615 | pub struct XSelectionEvent { |
1616 | pub type_: c_int, |
1617 | pub serial: c_ulong, |
1618 | pub send_event: Bool, |
1619 | pub display: *mut Display, |
1620 | pub requestor: Window, |
1621 | pub selection: Atom, |
1622 | pub target: Atom, |
1623 | pub property: Atom, |
1624 | pub time: Time, |
1625 | } |
1626 | |
1627 | #[derive (Debug, Clone, Copy, PartialEq)] |
1628 | #[repr (C)] |
1629 | pub struct XSelectionRequestEvent { |
1630 | pub type_: c_int, |
1631 | pub serial: c_ulong, |
1632 | pub send_event: Bool, |
1633 | pub display: *mut Display, |
1634 | pub owner: Window, |
1635 | pub requestor: Window, |
1636 | pub selection: Atom, |
1637 | pub target: Atom, |
1638 | pub property: Atom, |
1639 | pub time: Time, |
1640 | } |
1641 | |
1642 | #[derive (Debug, Clone, Copy, PartialEq)] |
1643 | #[repr (C)] |
1644 | pub struct XUnmapEvent { |
1645 | pub type_: c_int, |
1646 | pub serial: c_ulong, |
1647 | pub send_event: Bool, |
1648 | pub display: *mut Display, |
1649 | pub event: Window, |
1650 | pub window: Window, |
1651 | pub from_configure: Bool, |
1652 | } |
1653 | |
1654 | #[derive (Debug, Clone, Copy, PartialEq)] |
1655 | #[repr (C)] |
1656 | pub struct XVisibilityEvent { |
1657 | pub type_: c_int, |
1658 | pub serial: c_ulong, |
1659 | pub send_event: Bool, |
1660 | pub display: *mut Display, |
1661 | pub window: Window, |
1662 | pub state: c_int, |
1663 | } |
1664 | |
1665 | // |
1666 | // Xkb structs |
1667 | // |
1668 | |
1669 | #[repr (C)] |
1670 | pub struct _XkbCompatMapRec { |
1671 | pub sym_interpret: XkbSymInterpretPtr, |
1672 | pub groups: [XkbModsRec; XkbNumKbdGroups], |
1673 | pub num_si: c_ushort, |
1674 | pub size_si: c_ushort, |
1675 | } |
1676 | |
1677 | #[derive (Debug, Clone, Copy, PartialEq)] |
1678 | #[repr (C)] |
1679 | pub struct _XkbDesc { |
1680 | pub dpy: *mut Display, |
1681 | pub flags: c_ushort, |
1682 | pub device_spec: c_ushort, |
1683 | pub min_key_code: KeyCode, |
1684 | pub max_key_code: KeyCode, |
1685 | pub ctrls: XkbControlsPtr, |
1686 | pub server: XkbServerMapPtr, |
1687 | pub map: XkbClientMapPtr, |
1688 | pub indicators: XkbIndicatorPtr, |
1689 | pub names: XkbNamesPtr, |
1690 | pub compat: XkbCompatMapPtr, |
1691 | pub geom: XkbGeometryPtr, |
1692 | } |
1693 | |
1694 | #[repr (C)] |
1695 | pub struct _XkbIndicatorRec { |
1696 | pub phys_indicators: c_ulong, |
1697 | pub maps: [XkbIndicatorMapRec; XkbNumIndicators], |
1698 | } |
1699 | |
1700 | #[derive (Debug, Clone, Copy, PartialEq)] |
1701 | #[repr (C)] |
1702 | pub struct _XkbKeyAliasRec { |
1703 | pub real: [c_char; XkbKeyNameLength], |
1704 | pub alias: [c_char; XkbKeyNameLength], |
1705 | } |
1706 | |
1707 | #[derive (Debug, Clone, Copy, PartialEq)] |
1708 | #[repr (C)] |
1709 | pub struct _XkbKeyNameRec { |
1710 | pub name: [c_char; XkbKeyNameLength], |
1711 | } |
1712 | |
1713 | #[derive (Debug, Clone, Copy, PartialEq)] |
1714 | #[repr (C)] |
1715 | pub struct _XkbNamesRec { |
1716 | pub keycodes: Atom, |
1717 | pub geometry: Atom, |
1718 | pub symbols: Atom, |
1719 | pub types: Atom, |
1720 | pub compat: Atom, |
1721 | pub vmods: [Atom; XkbNumVirtualMods], |
1722 | pub indicators: [Atom; XkbNumIndicators], |
1723 | pub groups: [Atom; XkbNumKbdGroups], |
1724 | pub keys: XkbKeyNamePtr, |
1725 | pub key_aliases: XkbKeyAliasPtr, |
1726 | pub radio_groups: *mut Atom, |
1727 | pub phys_symbols: Atom, |
1728 | pub num_keys: c_uchar, |
1729 | pub num_key_aliases: c_uchar, |
1730 | pub num_rg: c_ushort, |
1731 | } |
1732 | |
1733 | #[derive (Debug, Clone, Copy, PartialEq)] |
1734 | #[repr (C)] |
1735 | pub struct _XkbStateRec { |
1736 | pub group: c_uchar, |
1737 | pub base_group: c_ushort, |
1738 | pub latched_group: c_ushort, |
1739 | pub locked_group: c_uchar, |
1740 | |
1741 | pub mods: c_uchar, |
1742 | pub base_mods: c_uchar, |
1743 | pub latched_mods: c_uchar, |
1744 | pub locked_mods: c_uchar, |
1745 | |
1746 | pub compat_state: c_uchar, |
1747 | |
1748 | pub grab_mods: c_uchar, |
1749 | pub compat_grab_mods: c_uchar, |
1750 | |
1751 | pub lookup_mods: c_uchar, |
1752 | pub compat_lookup_mods: c_uchar, |
1753 | |
1754 | pub ptr_buttons: c_ushort, |
1755 | } |
1756 | |
1757 | // |
1758 | // Xkb event structs |
1759 | // |
1760 | |
1761 | #[derive (Debug, Clone, Copy, PartialEq)] |
1762 | #[repr (C)] |
1763 | pub struct XkbAnyEvent { |
1764 | pub type_: c_int, |
1765 | pub serial: c_ulong, |
1766 | pub send_event: Bool, |
1767 | pub display: *mut Display, |
1768 | pub time: Time, |
1769 | pub xkb_type: c_int, |
1770 | pub device: c_uint, |
1771 | } |
1772 | |
1773 | #[derive (Debug, Clone, Copy, PartialEq)] |
1774 | #[repr (C)] |
1775 | pub struct XkbNewKeyboardNotifyEvent { |
1776 | pub type_: c_int, |
1777 | pub serial: c_ulong, |
1778 | pub send_event: Bool, |
1779 | pub display: *mut Display, |
1780 | pub time: Time, |
1781 | pub xkb_type: c_int, |
1782 | pub device: c_int, |
1783 | pub old_device: c_int, |
1784 | pub min_key_code: c_int, |
1785 | pub max_key_code: c_int, |
1786 | pub old_min_key_code: c_int, |
1787 | pub old_max_key_code: c_int, |
1788 | pub changed: c_uint, |
1789 | pub req_major: c_char, |
1790 | pub req_minor: c_char, |
1791 | } |
1792 | |
1793 | #[derive (Debug, Clone, Copy, PartialEq)] |
1794 | #[repr (C)] |
1795 | pub struct _XkbMapNotifyEvent { |
1796 | pub type_: c_int, |
1797 | pub serial: c_ulong, |
1798 | pub send_event: Bool, |
1799 | pub display: *mut Display, |
1800 | pub time: Time, |
1801 | pub xkb_type: c_int, |
1802 | pub device: c_int, |
1803 | pub changed: c_uint, |
1804 | pub flags: c_uint, |
1805 | pub first_type: c_int, |
1806 | pub num_types: c_int, |
1807 | pub min_key_code: KeyCode, |
1808 | pub max_key_code: KeyCode, |
1809 | pub first_key_sym: KeyCode, |
1810 | pub first_key_act: KeyCode, |
1811 | pub first_key_bahavior: KeyCode, |
1812 | pub first_key_explicit: KeyCode, |
1813 | pub first_modmap_key: KeyCode, |
1814 | pub first_vmodmap_key: KeyCode, |
1815 | pub num_key_syms: c_int, |
1816 | pub num_key_acts: c_int, |
1817 | pub num_key_behaviors: c_int, |
1818 | pub num_key_explicit: c_int, |
1819 | pub num_modmap_keys: c_int, |
1820 | pub num_vmodmap_keys: c_int, |
1821 | pub vmods: c_uint, |
1822 | } |
1823 | |
1824 | #[derive (Debug, Clone, Copy, PartialEq)] |
1825 | #[repr (C)] |
1826 | pub struct XkbStateNotifyEvent { |
1827 | pub type_: c_int, |
1828 | pub serial: c_ulong, |
1829 | pub send_event: Bool, |
1830 | pub display: *mut Display, |
1831 | pub time: Time, |
1832 | pub xkb_type: c_int, |
1833 | pub device: c_int, |
1834 | pub changed: c_uint, |
1835 | pub group: c_int, |
1836 | pub base_group: c_int, |
1837 | pub latched_group: c_int, |
1838 | pub locked_group: c_int, |
1839 | pub mods: c_uint, |
1840 | pub base_mods: c_uint, |
1841 | pub latched_mods: c_uint, |
1842 | pub locked_mods: c_uint, |
1843 | pub compat_state: c_int, |
1844 | pub grab_mods: c_uchar, |
1845 | pub compat_grab_mods: c_uchar, |
1846 | pub lookup_mods: c_uchar, |
1847 | pub compat_lookup_mods: c_uchar, |
1848 | pub ptr_buttons: c_int, |
1849 | pub keycode: KeyCode, |
1850 | pub event_type: c_char, |
1851 | pub req_major: c_char, |
1852 | pub req_minor: c_char, |
1853 | } |
1854 | |
1855 | #[derive (Debug, Clone, Copy, PartialEq)] |
1856 | #[repr (C)] |
1857 | pub struct _XkbControlsNotifyEvent { |
1858 | pub type_: c_int, |
1859 | pub serial: c_ulong, |
1860 | pub send_event: Bool, |
1861 | pub display: *mut Display, |
1862 | pub time: Time, |
1863 | pub xkb_type: c_int, |
1864 | pub device: c_int, |
1865 | pub changed_ctrls: c_uint, |
1866 | pub enabled_ctrls: c_uint, |
1867 | pub enabled_ctrl_changes: c_uint, |
1868 | pub num_groups: c_int, |
1869 | pub keycode: KeyCode, |
1870 | pub event_type: c_char, |
1871 | pub req_major: c_char, |
1872 | pub req_minor: c_char, |
1873 | } |
1874 | |
1875 | #[derive (Debug, Clone, Copy, PartialEq)] |
1876 | #[repr (C)] |
1877 | pub struct XkbIndicatorNotifyEvent { |
1878 | pub type_: c_int, |
1879 | pub serial: c_ulong, |
1880 | pub send_event: Bool, |
1881 | pub display: *mut Display, |
1882 | pub time: Time, |
1883 | pub xkb_type: c_int, |
1884 | pub device: c_int, |
1885 | pub changed: c_uint, |
1886 | pub state: c_uint, |
1887 | } |
1888 | |
1889 | #[derive (Debug, Clone, Copy, PartialEq)] |
1890 | #[repr (C)] |
1891 | pub struct _XkbNamesNotifyEvent { |
1892 | pub type_: c_int, |
1893 | pub serial: c_ulong, |
1894 | pub send_event: Bool, |
1895 | pub display: *mut Display, |
1896 | pub time: Time, |
1897 | pub xkb_type: c_int, |
1898 | pub device: c_int, |
1899 | pub changed: c_uint, |
1900 | pub first_type: c_int, |
1901 | pub num_types: c_int, |
1902 | pub first_lvl: c_int, |
1903 | pub num_lvls: c_int, |
1904 | pub num_aliases: c_int, |
1905 | pub num_radio_groups: c_int, |
1906 | pub changed_vmods: c_uint, |
1907 | pub changed_groups: c_uint, |
1908 | pub changed_indicators: c_uint, |
1909 | pub first_key: c_int, |
1910 | pub num_keys: c_int, |
1911 | } |
1912 | |
1913 | #[derive (Debug, Clone, Copy, PartialEq)] |
1914 | #[repr (C)] |
1915 | pub struct XkbCompatMapNotifyEvent { |
1916 | pub type_: c_int, |
1917 | pub serial: c_ulong, |
1918 | pub send_event: Bool, |
1919 | pub display: *mut Display, |
1920 | pub time: Time, |
1921 | pub xkb_type: c_int, |
1922 | pub device: c_int, |
1923 | pub changed_groups: c_uint, |
1924 | pub first_si: c_int, |
1925 | pub num_si: c_int, |
1926 | pub num_total_si: c_int, |
1927 | } |
1928 | |
1929 | #[derive (Debug, Clone, Copy, PartialEq)] |
1930 | #[repr (C)] |
1931 | pub struct XkbBellNotifyEvent { |
1932 | pub type_: c_int, |
1933 | pub serial: c_ulong, |
1934 | pub send_event: Bool, |
1935 | pub display: *mut Display, |
1936 | pub time: Time, |
1937 | pub xkb_type: c_int, |
1938 | pub device: c_int, |
1939 | pub percent: c_int, |
1940 | pub pitch: c_int, |
1941 | pub duration: c_int, |
1942 | pub bell_class: c_int, |
1943 | pub bell_id: c_int, |
1944 | pub name: Atom, |
1945 | pub window: Window, |
1946 | pub event_only: Bool, |
1947 | } |
1948 | |
1949 | #[derive (Debug, Clone, Copy, PartialEq)] |
1950 | #[repr (C)] |
1951 | pub struct XkbActionMessageEvent { |
1952 | pub type_: c_int, |
1953 | pub serial: c_ulong, |
1954 | pub send_event: Bool, |
1955 | pub display: *mut Display, |
1956 | pub time: Time, |
1957 | pub xkb_type: c_int, |
1958 | pub device: c_int, |
1959 | pub keycode: KeyCode, |
1960 | pub press: Bool, |
1961 | pub key_event_follows: Bool, |
1962 | pub group: c_int, |
1963 | pub mods: c_uint, |
1964 | pub message: [c_char; XkbActionMessageLength + 1], |
1965 | } |
1966 | |
1967 | #[derive (Debug, Clone, Copy, PartialEq)] |
1968 | #[repr (C)] |
1969 | pub struct XkbAccessXNotifyEvent { |
1970 | pub type_: c_int, |
1971 | pub serial: c_ulong, |
1972 | pub send_event: Bool, |
1973 | pub display: *mut Display, |
1974 | pub time: Time, |
1975 | pub xkb_type: c_int, |
1976 | pub device: c_int, |
1977 | pub detail: c_int, |
1978 | pub keycode: c_int, |
1979 | pub sk_delay: c_int, |
1980 | pub debounce_delay: c_int, |
1981 | } |
1982 | |
1983 | #[derive (Debug, Clone, Copy, PartialEq)] |
1984 | #[repr (C)] |
1985 | pub struct _XkbExtensionDeviceNotifyEvent { |
1986 | pub type_: c_int, |
1987 | pub serial: c_ulong, |
1988 | pub send_event: Bool, |
1989 | pub display: *mut Display, |
1990 | pub time: Time, |
1991 | pub xkb_type: c_int, |
1992 | pub device: c_int, |
1993 | pub reason: c_uint, |
1994 | pub supported: c_uint, |
1995 | pub unsupported: c_uint, |
1996 | pub first_btn: c_int, |
1997 | pub num_btns: c_int, |
1998 | pub leds_defined: c_uint, |
1999 | pub led_state: c_uint, |
2000 | pub led_class: c_int, |
2001 | pub led_id: c_int, |
2002 | } |
2003 | |
2004 | #[derive (Debug, Clone, Copy, PartialEq)] |
2005 | #[repr (C)] |
2006 | pub struct XkbEvent { |
2007 | _pad: [c_long; 24], |
2008 | } |
2009 | |
2010 | #[cfg (test)] |
2011 | macro_rules! test_xkb_event_size { |
2012 | { $($ty:ty,)* } => { $( |
2013 | assert!(::std::mem::size_of::<XkbEvent>() >= ::std::mem::size_of::<$ty>()); |
2014 | )* }; |
2015 | } |
2016 | |
2017 | #[test ] |
2018 | fn xkb_event_size_test() { |
2019 | test_xkb_event_size! { |
2020 | XkbAnyEvent, |
2021 | XkbNewKeyboardNotifyEvent, |
2022 | XkbMapNotifyEvent, |
2023 | XkbStateNotifyEvent, |
2024 | XkbControlsNotifyEvent, |
2025 | XkbIndicatorNotifyEvent, |
2026 | XkbNamesNotifyEvent, |
2027 | XkbCompatMapNotifyEvent, |
2028 | XkbBellNotifyEvent, |
2029 | XkbActionMessageEvent, |
2030 | XkbAccessXNotifyEvent, |
2031 | XkbExtensionDeviceNotifyEvent, |
2032 | } |
2033 | } |
2034 | |
2035 | pub enum XkbKbdDpyStateRec {} |
2036 | pub type XkbKbdDpyStatePtr = *mut XkbKbdDpyStateRec; |
2037 | |
2038 | // |
2039 | // other structures |
2040 | // |
2041 | |
2042 | #[derive (Debug, Clone, Copy, PartialEq)] |
2043 | #[repr (C)] |
2044 | pub struct Depth { |
2045 | pub depth: c_int, |
2046 | pub nvisuals: c_int, |
2047 | pub visuals: *mut Visual, |
2048 | } |
2049 | |
2050 | #[derive (Debug, Clone, Copy, PartialEq)] |
2051 | #[repr (C)] |
2052 | pub struct Screen { |
2053 | pub ext_data: *mut XExtData, |
2054 | pub display: *mut Display, |
2055 | pub root: Window, |
2056 | pub width: c_int, |
2057 | pub height: c_int, |
2058 | pub mwidth: c_int, |
2059 | pub mheight: c_int, |
2060 | pub ndepths: c_int, |
2061 | pub depths: *mut Depth, |
2062 | pub root_depth: c_int, |
2063 | pub root_visual: *mut Visual, |
2064 | pub default_gc: GC, |
2065 | pub cmap: Colormap, |
2066 | pub white_pixel: c_ulong, |
2067 | pub black_pixel: c_ulong, |
2068 | pub max_maps: c_int, |
2069 | pub min_maps: c_int, |
2070 | pub backing_store: c_int, |
2071 | pub save_unders: Bool, |
2072 | pub root_input_mask: c_long, |
2073 | } |
2074 | |
2075 | #[derive (Debug, Clone, Copy, PartialEq)] |
2076 | #[repr (C)] |
2077 | pub struct ScreenFormat { |
2078 | pub ext_data: *mut XExtData, |
2079 | pub depth: c_int, |
2080 | pub bits_per_pixel: c_int, |
2081 | pub scanline_pad: c_int, |
2082 | } |
2083 | |
2084 | #[derive (Debug, Clone, Copy, PartialEq)] |
2085 | #[repr (C)] |
2086 | pub struct Visual { |
2087 | pub ext_data: *mut XExtData, |
2088 | pub visualid: VisualID, |
2089 | pub class: c_int, |
2090 | pub red_mask: c_ulong, |
2091 | pub green_mask: c_ulong, |
2092 | pub blue_mask: c_ulong, |
2093 | pub bits_per_rgb: c_int, |
2094 | pub map_entries: c_int, |
2095 | } |
2096 | |
2097 | #[derive (Debug, Clone, Copy, PartialEq)] |
2098 | #[repr (C)] |
2099 | pub struct XArc { |
2100 | pub x: c_short, |
2101 | pub y: c_short, |
2102 | pub width: c_ushort, |
2103 | pub height: c_ushort, |
2104 | pub angle1: c_short, |
2105 | pub angle2: c_short, |
2106 | } |
2107 | |
2108 | #[derive (Debug, Clone, Copy, PartialEq)] |
2109 | #[repr (C)] |
2110 | pub struct XChar2b { |
2111 | pub byte1: c_uchar, |
2112 | pub byte2: c_uchar, |
2113 | } |
2114 | |
2115 | #[derive (Debug, Clone, Copy, PartialEq)] |
2116 | #[repr (C)] |
2117 | pub struct XCharStruct { |
2118 | pub lbearing: c_short, |
2119 | pub rbearing: c_short, |
2120 | pub width: c_short, |
2121 | pub ascent: c_short, |
2122 | pub descent: c_short, |
2123 | pub attributes: c_ushort, |
2124 | } |
2125 | |
2126 | #[derive (Debug, Clone, Copy, PartialEq)] |
2127 | #[repr (C)] |
2128 | pub struct XClassHint { |
2129 | pub res_name: *mut c_char, |
2130 | pub res_class: *mut c_char, |
2131 | } |
2132 | |
2133 | #[derive (Debug, Clone, Copy, PartialEq)] |
2134 | #[repr (C)] |
2135 | pub struct XColor { |
2136 | pub pixel: c_ulong, |
2137 | pub red: c_ushort, |
2138 | pub green: c_ushort, |
2139 | pub blue: c_ushort, |
2140 | pub flags: c_char, |
2141 | pub pad: c_char, |
2142 | } |
2143 | |
2144 | #[derive (Debug, Clone, Copy, PartialEq)] |
2145 | #[repr (C)] |
2146 | pub struct XComposeStatus { |
2147 | pub compose_ptr: XPointer, |
2148 | pub chars_matched: c_int, |
2149 | } |
2150 | |
2151 | #[derive (Debug, Clone, Copy, PartialEq)] |
2152 | #[repr (C)] |
2153 | pub struct XExtCodes { |
2154 | pub extension: c_int, |
2155 | pub major_opcode: c_int, |
2156 | pub first_event: c_int, |
2157 | pub first_error: c_int, |
2158 | } |
2159 | |
2160 | #[repr (C)] |
2161 | pub struct XExtData { |
2162 | pub number: c_int, |
2163 | pub next: *mut XExtData, |
2164 | pub free_private: Option<unsafe extern "C" fn() -> c_int>, |
2165 | pub private_data: XPointer, |
2166 | } |
2167 | |
2168 | #[derive (Debug, Clone, Copy, PartialEq)] |
2169 | #[repr (C)] |
2170 | pub struct XFontProp { |
2171 | pub name: Atom, |
2172 | pub card32: c_ulong, |
2173 | } |
2174 | |
2175 | #[derive (Debug, Clone, Copy, PartialEq)] |
2176 | #[repr (C)] |
2177 | pub struct XFontSetExtents { |
2178 | pub max_ink_extent: XRectangle, |
2179 | pub max_logical_extent: XRectangle, |
2180 | } |
2181 | |
2182 | #[derive (Debug, Clone, Copy, PartialEq)] |
2183 | #[repr (C)] |
2184 | pub struct XFontStruct { |
2185 | pub ext_data: *mut XExtData, |
2186 | pub fid: Font, |
2187 | pub direction: c_uint, |
2188 | pub min_char_or_byte2: c_uint, |
2189 | pub max_char_or_byte2: c_uint, |
2190 | pub min_byte1: c_uint, |
2191 | pub max_byte1: c_uint, |
2192 | pub all_chars_exist: Bool, |
2193 | pub default_char: c_uint, |
2194 | pub n_properties: c_int, |
2195 | pub properties: *mut XFontProp, |
2196 | pub min_bounds: XCharStruct, |
2197 | pub max_bounds: XCharStruct, |
2198 | pub per_char: *mut XCharStruct, |
2199 | pub ascent: c_int, |
2200 | pub descent: c_int, |
2201 | } |
2202 | |
2203 | #[derive (Debug, Clone, Copy, PartialEq)] |
2204 | #[repr (C)] |
2205 | pub struct XGCValues { |
2206 | pub function: c_int, |
2207 | pub plane_mask: c_ulong, |
2208 | pub foreground: c_ulong, |
2209 | pub background: c_ulong, |
2210 | pub line_width: c_int, |
2211 | pub line_style: c_int, |
2212 | pub cap_style: c_int, |
2213 | pub join_style: c_int, |
2214 | pub fill_style: c_int, |
2215 | pub fill_rule: c_int, |
2216 | pub arc_mode: c_int, |
2217 | pub tile: Pixmap, |
2218 | pub stipple: Pixmap, |
2219 | pub ts_x_origin: c_int, |
2220 | pub ts_y_origin: c_int, |
2221 | pub font: Font, |
2222 | pub subwindow_mode: c_int, |
2223 | pub graphics_exposures: Bool, |
2224 | pub clip_x_origin: c_int, |
2225 | pub clip_y_origin: c_int, |
2226 | pub clip_mask: Pixmap, |
2227 | pub dash_offset: c_int, |
2228 | pub dashes: c_char, |
2229 | } |
2230 | |
2231 | #[derive (Debug, Clone, Copy, PartialEq)] |
2232 | #[repr (C)] |
2233 | pub struct XGenericEventCookie { |
2234 | pub type_: c_int, |
2235 | pub serial: c_ulong, |
2236 | pub send_event: Bool, |
2237 | pub display: *mut Display, |
2238 | pub extension: c_int, |
2239 | pub evtype: c_int, |
2240 | pub cookie: c_uint, |
2241 | pub data: *mut c_void, |
2242 | } |
2243 | |
2244 | #[derive (Debug, Clone, Copy, PartialEq)] |
2245 | #[repr (C)] |
2246 | pub struct XHostAddress { |
2247 | pub family: c_int, |
2248 | pub length: c_int, |
2249 | pub address: *mut c_char, |
2250 | } |
2251 | |
2252 | #[repr (C)] |
2253 | #[derive (Debug, Copy, Clone, PartialEq)] |
2254 | pub struct XServerInterpretedAddress { |
2255 | pub typelength: c_int, |
2256 | pub valuelength: c_int, |
2257 | pub type_: *mut c_char, |
2258 | pub value: *mut c_char, |
2259 | } |
2260 | |
2261 | #[derive (Debug, Clone, Copy, PartialEq)] |
2262 | #[repr (C)] |
2263 | pub struct XIconSize { |
2264 | pub min_width: c_int, |
2265 | pub min_height: c_int, |
2266 | pub max_width: c_int, |
2267 | pub max_height: c_int, |
2268 | pub width_inc: c_int, |
2269 | pub height_inc: c_int, |
2270 | } |
2271 | |
2272 | #[derive (Debug, Clone, Copy, PartialEq)] |
2273 | #[repr (C)] |
2274 | pub struct XImage { |
2275 | pub width: c_int, |
2276 | pub height: c_int, |
2277 | pub xoffset: c_int, |
2278 | pub format: c_int, |
2279 | pub data: *mut c_char, |
2280 | pub byte_order: c_int, |
2281 | pub bitmap_unit: c_int, |
2282 | pub bitmap_bit_order: c_int, |
2283 | pub bitmap_pad: c_int, |
2284 | pub depth: c_int, |
2285 | pub bytes_per_line: c_int, |
2286 | pub bits_per_pixel: c_int, |
2287 | pub red_mask: c_ulong, |
2288 | pub green_mask: c_ulong, |
2289 | pub blue_mask: c_ulong, |
2290 | pub obdata: XPointer, |
2291 | pub funcs: ImageFns, |
2292 | } |
2293 | |
2294 | #[derive (Debug, Clone, Copy, PartialEq)] |
2295 | #[repr (C)] |
2296 | pub struct XKeyboardControl { |
2297 | pub key_click_percent: c_int, |
2298 | pub bell_percent: c_int, |
2299 | pub bell_pitch: c_int, |
2300 | pub bell_duration: c_int, |
2301 | pub led: c_int, |
2302 | pub led_mode: c_int, |
2303 | pub key: c_int, |
2304 | pub auto_repeat_mode: c_int, |
2305 | } |
2306 | |
2307 | #[derive (Debug, Clone, Copy, PartialEq)] |
2308 | #[repr (C)] |
2309 | pub struct XKeyboardState { |
2310 | pub key_click_percent: c_int, |
2311 | pub bell_percent: c_int, |
2312 | pub bell_pitch: c_uint, |
2313 | pub bell_duration: c_uint, |
2314 | pub led_mask: c_ulong, |
2315 | pub global_auto_repeat: c_int, |
2316 | pub auto_repeats: [c_char; 32], |
2317 | } |
2318 | |
2319 | #[derive (Debug, Clone, Copy, PartialEq)] |
2320 | #[repr (C)] |
2321 | pub struct XmbTextItem { |
2322 | pub chars: *mut c_char, |
2323 | pub nchars: c_int, |
2324 | pub delta: c_int, |
2325 | pub font_set: XFontSet, |
2326 | } |
2327 | |
2328 | #[derive (Debug, Clone, Copy, PartialEq)] |
2329 | #[repr (C)] |
2330 | pub struct XModifierKeymap { |
2331 | pub max_keypermod: c_int, |
2332 | pub modifiermap: *mut KeyCode, |
2333 | } |
2334 | |
2335 | #[derive (Debug, Clone, Copy, PartialEq)] |
2336 | #[repr (C)] |
2337 | pub struct XOMCharSetList { |
2338 | pub charset_count: c_int, |
2339 | pub charset_list: *mut *mut c_char, |
2340 | } |
2341 | |
2342 | #[derive (Debug, Clone, Copy, PartialEq)] |
2343 | #[repr (C)] |
2344 | pub struct XPixmapFormatValues { |
2345 | pub depth: c_int, |
2346 | pub bits_per_pixel: c_int, |
2347 | pub scanline_pad: c_int, |
2348 | } |
2349 | |
2350 | #[derive (Debug, Clone, Copy, PartialEq)] |
2351 | #[repr (C)] |
2352 | pub struct XPoint { |
2353 | pub x: c_short, |
2354 | pub y: c_short, |
2355 | } |
2356 | |
2357 | #[derive (Debug, Clone, Copy, PartialEq)] |
2358 | #[repr (C)] |
2359 | pub struct XRectangle { |
2360 | pub x: c_short, |
2361 | pub y: c_short, |
2362 | pub width: c_ushort, |
2363 | pub height: c_ushort, |
2364 | } |
2365 | |
2366 | #[derive (Debug, Clone, Copy, PartialEq)] |
2367 | #[repr (C)] |
2368 | pub struct XrmOptionDescRec { |
2369 | pub option: *mut c_char, |
2370 | pub specifier: *mut c_char, |
2371 | pub argKind: XrmOptionKind, |
2372 | pub value: XPointer, |
2373 | } |
2374 | |
2375 | #[derive (Debug, Clone, Copy, PartialEq)] |
2376 | #[repr (C)] |
2377 | pub struct XrmValue { |
2378 | pub size: c_uint, |
2379 | pub addr: XPointer, |
2380 | } |
2381 | |
2382 | #[derive (Debug, Clone, Copy, PartialEq)] |
2383 | #[repr (C)] |
2384 | pub struct XSegment { |
2385 | pub x1: c_short, |
2386 | pub y1: c_short, |
2387 | pub x2: c_short, |
2388 | pub y2: c_short, |
2389 | } |
2390 | |
2391 | #[derive (Debug, Clone, Copy, PartialEq)] |
2392 | #[repr (C)] |
2393 | pub struct XSetWindowAttributes { |
2394 | pub background_pixmap: Pixmap, |
2395 | pub background_pixel: c_ulong, |
2396 | pub border_pixmap: Pixmap, |
2397 | pub border_pixel: c_ulong, |
2398 | pub bit_gravity: c_int, |
2399 | pub win_gravity: c_int, |
2400 | pub backing_store: c_int, |
2401 | pub backing_planes: c_ulong, |
2402 | pub backing_pixel: c_ulong, |
2403 | pub save_under: Bool, |
2404 | pub event_mask: c_long, |
2405 | pub do_not_propagate_mask: c_long, |
2406 | pub override_redirect: Bool, |
2407 | pub colormap: Colormap, |
2408 | pub cursor: Cursor, |
2409 | } |
2410 | |
2411 | #[derive (Debug, Clone, Copy, PartialEq)] |
2412 | #[repr (C)] |
2413 | pub struct XSizeHints { |
2414 | pub flags: c_long, |
2415 | pub x: c_int, |
2416 | pub y: c_int, |
2417 | pub width: c_int, |
2418 | pub height: c_int, |
2419 | pub min_width: c_int, |
2420 | pub min_height: c_int, |
2421 | pub max_width: c_int, |
2422 | pub max_height: c_int, |
2423 | pub width_inc: c_int, |
2424 | pub height_inc: c_int, |
2425 | pub min_aspect: AspectRatio, |
2426 | pub max_aspect: AspectRatio, |
2427 | pub base_width: c_int, |
2428 | pub base_height: c_int, |
2429 | pub win_gravity: c_int, |
2430 | } |
2431 | |
2432 | #[derive (Debug, Clone, Copy, PartialEq)] |
2433 | #[repr (C)] |
2434 | pub struct XStandardColormap { |
2435 | pub colormap: Colormap, |
2436 | pub red_max: c_ulong, |
2437 | pub red_mult: c_ulong, |
2438 | pub green_max: c_ulong, |
2439 | pub green_mult: c_ulong, |
2440 | pub blue_max: c_ulong, |
2441 | pub blue_mult: c_ulong, |
2442 | pub base_pixel: c_ulong, |
2443 | pub visualid: VisualID, |
2444 | pub killid: XID, |
2445 | } |
2446 | |
2447 | #[derive (Debug, Clone, Copy, PartialEq)] |
2448 | #[repr (C)] |
2449 | pub struct XTextItem { |
2450 | pub chars: *mut c_char, |
2451 | pub nchars: c_int, |
2452 | pub delta: c_int, |
2453 | pub font: Font, |
2454 | } |
2455 | |
2456 | #[derive (Debug, Clone, Copy, PartialEq)] |
2457 | #[repr (C)] |
2458 | pub struct XTextItem16 { |
2459 | pub chars: *mut XChar2b, |
2460 | pub nchars: c_int, |
2461 | pub delta: c_int, |
2462 | pub font: Font, |
2463 | } |
2464 | |
2465 | #[derive (Debug, Clone, Copy, PartialEq)] |
2466 | #[repr (C)] |
2467 | pub struct XTextProperty { |
2468 | pub value: *mut c_uchar, |
2469 | pub encoding: Atom, |
2470 | pub format: c_int, |
2471 | pub nitems: c_ulong, |
2472 | } |
2473 | |
2474 | #[derive (Debug, Clone, Copy, PartialEq)] |
2475 | #[repr (C)] |
2476 | pub struct XTimeCoord { |
2477 | pub time: Time, |
2478 | pub x: c_short, |
2479 | pub y: c_short, |
2480 | } |
2481 | |
2482 | #[derive (Debug, Clone, Copy, PartialEq)] |
2483 | #[repr (C)] |
2484 | pub struct XVisualInfo { |
2485 | pub visual: *mut Visual, |
2486 | pub visualid: VisualID, |
2487 | pub screen: c_int, |
2488 | pub depth: c_int, |
2489 | pub class: c_int, |
2490 | pub red_mask: c_ulong, |
2491 | pub green_mask: c_ulong, |
2492 | pub blue_mask: c_ulong, |
2493 | pub colormap_size: c_int, |
2494 | pub bits_per_rgb: c_int, |
2495 | } |
2496 | |
2497 | #[derive (Debug, Clone, Copy, PartialEq)] |
2498 | #[repr (C)] |
2499 | pub struct XwcTextItem { |
2500 | pub chars: *mut wchar_t, |
2501 | pub nchars: c_int, |
2502 | pub delta: c_int, |
2503 | pub font_set: XFontSet, |
2504 | } |
2505 | |
2506 | #[derive (Debug, Clone, Copy, PartialEq)] |
2507 | #[repr (C)] |
2508 | pub struct XWindowAttributes { |
2509 | pub x: c_int, |
2510 | pub y: c_int, |
2511 | pub width: c_int, |
2512 | pub height: c_int, |
2513 | pub border_width: c_int, |
2514 | pub depth: c_int, |
2515 | pub visual: *mut Visual, |
2516 | pub root: Window, |
2517 | pub class: c_int, |
2518 | pub bit_gravity: c_int, |
2519 | pub win_gravity: c_int, |
2520 | pub backing_store: c_int, |
2521 | pub backing_planes: c_ulong, |
2522 | pub backing_pixel: c_ulong, |
2523 | pub save_under: Bool, |
2524 | pub colormap: Colormap, |
2525 | pub map_installed: Bool, |
2526 | pub map_state: c_int, |
2527 | pub all_event_masks: c_long, |
2528 | pub your_event_mask: c_long, |
2529 | pub do_not_propagate_mask: c_long, |
2530 | pub override_redirect: Bool, |
2531 | pub screen: *mut Screen, |
2532 | } |
2533 | |
2534 | #[derive (Debug, Clone, Copy, PartialEq)] |
2535 | #[repr (C)] |
2536 | pub struct XWindowChanges { |
2537 | pub x: c_int, |
2538 | pub y: c_int, |
2539 | pub width: c_int, |
2540 | pub height: c_int, |
2541 | pub border_width: c_int, |
2542 | pub sibling: Window, |
2543 | pub stack_mode: c_int, |
2544 | } |
2545 | |
2546 | #[derive (Debug, Clone, Copy, PartialEq)] |
2547 | #[repr (C)] |
2548 | pub struct XWMHints { |
2549 | pub flags: c_long, |
2550 | pub input: Bool, |
2551 | pub initial_state: c_int, |
2552 | pub icon_pixmap: Pixmap, |
2553 | pub icon_window: Window, |
2554 | pub icon_x: c_int, |
2555 | pub icon_y: c_int, |
2556 | pub icon_mask: Pixmap, |
2557 | pub window_group: XID, |
2558 | } |
2559 | |
2560 | #[repr (C)] |
2561 | pub struct XIMCallback { |
2562 | pub client_data: XPointer, |
2563 | pub callback: XIMProc, |
2564 | } |
2565 | |
2566 | #[derive (Debug, Clone, Copy, PartialEq)] |
2567 | #[repr (C)] |
2568 | pub enum XIMCaretDirection { |
2569 | XIMForwardChar, |
2570 | XIMBackwardChar, |
2571 | XIMForwardWord, |
2572 | XIMBackwardWord, |
2573 | XIMCaretUp, |
2574 | XIMCaretDown, |
2575 | XIMNextLine, |
2576 | XIMPreviousLine, |
2577 | XIMLineStart, |
2578 | XIMLineEnd, |
2579 | XIMAbsolutePosition, |
2580 | XIMDontChange, |
2581 | } |
2582 | |
2583 | #[derive (Debug, Clone, Copy, PartialEq)] |
2584 | #[repr (C)] |
2585 | pub enum XIMCaretStyle { |
2586 | XIMIsInvisible, |
2587 | XIMIsPrimary, |
2588 | XIMIsSecondary, |
2589 | } |
2590 | |
2591 | pub type XIMFeedback = c_ulong; |
2592 | |
2593 | #[derive (Debug, Clone, Copy, PartialEq)] |
2594 | #[repr (C)] |
2595 | pub struct XIMPreeditDrawCallbackStruct { |
2596 | pub caret: c_int, |
2597 | pub chg_first: c_int, |
2598 | pub chg_length: c_int, |
2599 | pub text: *mut XIMText, |
2600 | } |
2601 | |
2602 | #[derive (Debug, Clone, Copy, PartialEq)] |
2603 | #[repr (C)] |
2604 | pub struct XIMPreeditCaretCallbackStruct { |
2605 | pub position: c_int, |
2606 | pub direction: XIMCaretDirection, |
2607 | pub style: XIMCaretStyle, |
2608 | } |
2609 | |
2610 | #[derive (Clone, Copy)] |
2611 | #[repr (C)] |
2612 | pub union XIMTextString { |
2613 | pub multi_byte: *mut c_char, |
2614 | pub wide_char: wchar_t, |
2615 | } |
2616 | |
2617 | #[derive (Clone, Copy)] |
2618 | #[repr (C)] |
2619 | pub struct XIMText { |
2620 | pub length: c_ushort, |
2621 | pub feedback: *mut XIMFeedback, |
2622 | pub encoding_is_wchar: Bool, |
2623 | pub string: XIMTextString, |
2624 | } |
2625 | |
2626 | #[repr (C)] |
2627 | pub struct XICCallback { |
2628 | pub client_data: XPointer, |
2629 | pub callback: XICProc, |
2630 | } |
2631 | |
2632 | // |
2633 | // anonymous structures |
2634 | // |
2635 | |
2636 | #[derive (Debug, Clone, Copy, PartialEq)] |
2637 | #[repr (C)] |
2638 | pub struct AspectRatio { |
2639 | pub x: c_int, |
2640 | pub y: c_int, |
2641 | } |
2642 | |
2643 | #[derive (Debug, Clone, Copy, Default, PartialEq)] |
2644 | #[repr (C)] |
2645 | pub struct ClientMessageData { |
2646 | longs: [c_long; 5], |
2647 | } |
2648 | |
2649 | impl ClientMessageData { |
2650 | pub fn as_bytes(&self) -> &[c_char] { |
2651 | self.as_ref() |
2652 | } |
2653 | |
2654 | pub fn as_bytes_mut(&mut self) -> &mut [c_char] { |
2655 | self.as_mut() |
2656 | } |
2657 | |
2658 | pub fn as_longs(&self) -> &[c_long] { |
2659 | self.as_ref() |
2660 | } |
2661 | |
2662 | pub fn as_longs_mut(&mut self) -> &mut [c_long] { |
2663 | self.as_mut() |
2664 | } |
2665 | |
2666 | pub fn as_shorts(&self) -> &[c_short] { |
2667 | self.as_ref() |
2668 | } |
2669 | |
2670 | pub fn as_shorts_mut(&mut self) -> &mut [c_short] { |
2671 | self.as_mut() |
2672 | } |
2673 | |
2674 | pub fn get_byte(&self, index: usize) -> c_char { |
2675 | self.as_bytes()[index] |
2676 | } |
2677 | |
2678 | pub fn get_long(&self, index: usize) -> c_long { |
2679 | self.longs[index] |
2680 | } |
2681 | |
2682 | pub fn get_short(&self, index: usize) -> c_short { |
2683 | self.as_shorts()[index] |
2684 | } |
2685 | |
2686 | pub fn new() -> ClientMessageData { |
2687 | ClientMessageData { longs: [0; 5] } |
2688 | } |
2689 | |
2690 | pub fn set_byte(&mut self, index: usize, value: c_char) { |
2691 | self.as_bytes_mut()[index] = value; |
2692 | } |
2693 | |
2694 | pub fn set_long(&mut self, index: usize, value: c_long) { |
2695 | self.longs[index] = value; |
2696 | } |
2697 | |
2698 | pub fn set_short(&mut self, index: usize, value: c_short) { |
2699 | self.as_shorts_mut()[index] = value; |
2700 | } |
2701 | } |
2702 | |
2703 | macro_rules! client_message_data_conversions { |
2704 | { $($ty:ty[$n:expr],)* } => { |
2705 | $( |
2706 | impl AsMut<[$ty]> for ClientMessageData { |
2707 | fn as_mut (&mut self) -> &mut [$ty] { |
2708 | unsafe { slice::from_raw_parts_mut(self.longs.as_mut_ptr() as *mut $ty, $n) } |
2709 | } |
2710 | } |
2711 | |
2712 | impl AsRef<[$ty]> for ClientMessageData { |
2713 | fn as_ref (&self) -> &[$ty] { |
2714 | unsafe { slice::from_raw_parts(self.longs.as_ptr() as *mut $ty, $n) } |
2715 | } |
2716 | } |
2717 | |
2718 | impl From<[$ty; $n]> for ClientMessageData { |
2719 | fn from (array: [$ty; $n]) -> ClientMessageData { |
2720 | unsafe { transmute_union(&array) } |
2721 | } |
2722 | } |
2723 | )* |
2724 | }; |
2725 | } |
2726 | |
2727 | client_message_data_conversions! { |
2728 | c_schar[20], |
2729 | c_uchar[20], |
2730 | c_short[10], |
2731 | c_ushort[10], |
2732 | c_long[5], |
2733 | c_ulong[5], |
2734 | } |
2735 | |
2736 | #[test ] |
2737 | fn client_message_size_test() { |
2738 | assert!(::std::mem::size_of::<ClientMessageData>() >= ::std::mem::size_of::<[c_char; 20]>()); |
2739 | assert!(::std::mem::size_of::<ClientMessageData>() >= ::std::mem::size_of::<[c_short; 10]>()); |
2740 | } |
2741 | |
2742 | #[derive (Debug, Copy)] |
2743 | #[repr (C)] |
2744 | pub struct ImageFns { |
2745 | pub create_image: Option< |
2746 | unsafe extern "C" fn( |
2747 | *mut Display, |
2748 | *mut Visual, |
2749 | c_uint, |
2750 | c_int, |
2751 | c_int, |
2752 | *mut c_char, |
2753 | c_uint, |
2754 | c_uint, |
2755 | c_int, |
2756 | c_int, |
2757 | ) -> *mut XImage, |
2758 | >, |
2759 | pub destroy_image: Option<unsafe extern "C" fn(*mut XImage) -> c_int>, |
2760 | pub get_pixel: Option<unsafe extern "C" fn(*mut XImage, c_int, c_int) -> c_ulong>, |
2761 | pub put_pixel: Option<unsafe extern "C" fn(*mut XImage, c_int, c_int, c_ulong) -> c_int>, |
2762 | pub sub_image: |
2763 | Option<unsafe extern "C" fn(*mut XImage, c_int, c_int, c_uint, c_uint) -> *mut XImage>, |
2764 | pub add_pixel: Option<unsafe extern "C" fn(*mut XImage, c_long) -> c_int>, |
2765 | } |
2766 | |
2767 | impl Clone for ImageFns { |
2768 | fn clone(&self) -> ImageFns { |
2769 | *self |
2770 | } |
2771 | } |
2772 | |
2773 | impl PartialEq for ImageFns { |
2774 | fn eq(&self, rhs: &ImageFns) -> bool { |
2775 | unsafe { mem_eq(self, b:rhs) } |
2776 | } |
2777 | } |
2778 | |
2779 | // |
2780 | // constants |
2781 | // |
2782 | |
2783 | // allocate colormap |
2784 | pub const AllocNone: c_int = 0; |
2785 | pub const AllocAll: c_int = 1; |
2786 | |
2787 | // array sizes |
2788 | pub const XkbKeyNameLength: usize = 4; |
2789 | pub const XkbNumIndicators: usize = 32; |
2790 | pub const XkbNumKbdGroups: usize = 4; |
2791 | pub const XkbNumVirtualMods: usize = 16; |
2792 | |
2793 | // atoms |
2794 | pub const XA_PRIMARY: Atom = 1; |
2795 | pub const XA_SECONDARY: Atom = 2; |
2796 | pub const XA_ARC: Atom = 3; |
2797 | pub const XA_ATOM: Atom = 4; |
2798 | pub const XA_BITMAP: Atom = 5; |
2799 | pub const XA_CARDINAL: Atom = 6; |
2800 | pub const XA_COLORMAP: Atom = 7; |
2801 | pub const XA_CURSOR: Atom = 8; |
2802 | pub const XA_CUT_BUFFER0: Atom = 9; |
2803 | pub const XA_CUT_BUFFER1: Atom = 10; |
2804 | pub const XA_CUT_BUFFER2: Atom = 11; |
2805 | pub const XA_CUT_BUFFER3: Atom = 12; |
2806 | pub const XA_CUT_BUFFER4: Atom = 13; |
2807 | pub const XA_CUT_BUFFER5: Atom = 14; |
2808 | pub const XA_CUT_BUFFER6: Atom = 15; |
2809 | pub const XA_CUT_BUFFER7: Atom = 16; |
2810 | pub const XA_DRAWABLE: Atom = 17; |
2811 | pub const XA_FONT: Atom = 18; |
2812 | pub const XA_INTEGER: Atom = 19; |
2813 | pub const XA_PIXMAP: Atom = 20; |
2814 | pub const XA_POINT: Atom = 21; |
2815 | pub const XA_RECTANGLE: Atom = 22; |
2816 | pub const XA_RESOURCE_MANAGER: Atom = 23; |
2817 | pub const XA_RGB_COLOR_MAP: Atom = 24; |
2818 | pub const XA_RGB_BEST_MAP: Atom = 25; |
2819 | pub const XA_RGB_BLUE_MAP: Atom = 26; |
2820 | pub const XA_RGB_DEFAULT_MAP: Atom = 27; |
2821 | pub const XA_RGB_GRAY_MAP: Atom = 28; |
2822 | pub const XA_RGB_GREEN_MAP: Atom = 29; |
2823 | pub const XA_RGB_RED_MAP: Atom = 30; |
2824 | pub const XA_STRING: Atom = 31; |
2825 | pub const XA_VISUALID: Atom = 32; |
2826 | pub const XA_WINDOW: Atom = 33; |
2827 | pub const XA_WM_COMMAND: Atom = 34; |
2828 | pub const XA_WM_HINTS: Atom = 35; |
2829 | pub const XA_WM_CLIENT_MACHINE: Atom = 36; |
2830 | pub const XA_WM_ICON_NAME: Atom = 37; |
2831 | pub const XA_WM_ICON_SIZE: Atom = 38; |
2832 | pub const XA_WM_NAME: Atom = 39; |
2833 | pub const XA_WM_NORMAL_HINTS: Atom = 40; |
2834 | pub const XA_WM_SIZE_HINTS: Atom = 41; |
2835 | pub const XA_WM_ZOOM_HINTS: Atom = 42; |
2836 | pub const XA_MIN_SPACE: Atom = 43; |
2837 | pub const XA_NORM_SPACE: Atom = 44; |
2838 | pub const XA_MAX_SPACE: Atom = 45; |
2839 | pub const XA_END_SPACE: Atom = 46; |
2840 | pub const XA_SUPERSCRIPT_X: Atom = 47; |
2841 | pub const XA_SUPERSCRIPT_Y: Atom = 48; |
2842 | pub const XA_SUBSCRIPT_X: Atom = 49; |
2843 | pub const XA_SUBSCRIPT_Y: Atom = 50; |
2844 | pub const XA_UNDERLINE_POSITION: Atom = 51; |
2845 | pub const XA_UNDERLINE_THICKNESS: Atom = 52; |
2846 | pub const XA_STRIKEOUT_ASCENT: Atom = 53; |
2847 | pub const XA_STRIKEOUT_DESCENT: Atom = 54; |
2848 | pub const XA_ITALIC_ANGLE: Atom = 55; |
2849 | pub const XA_X_HEIGHT: Atom = 56; |
2850 | pub const XA_QUAD_WIDTH: Atom = 57; |
2851 | pub const XA_WEIGHT: Atom = 58; |
2852 | pub const XA_POINT_SIZE: Atom = 59; |
2853 | pub const XA_RESOLUTION: Atom = 60; |
2854 | pub const XA_COPYRIGHT: Atom = 61; |
2855 | pub const XA_NOTICE: Atom = 62; |
2856 | pub const XA_FONT_NAME: Atom = 63; |
2857 | pub const XA_FAMILY_NAME: Atom = 64; |
2858 | pub const XA_FULL_NAME: Atom = 65; |
2859 | pub const XA_CAP_HEIGHT: Atom = 66; |
2860 | pub const XA_WM_CLASS: Atom = 67; |
2861 | pub const XA_WM_TRANSIENT_FOR: Atom = 68; |
2862 | |
2863 | // boolean values |
2864 | pub const False: Bool = 0; |
2865 | pub const True: Bool = 1; |
2866 | |
2867 | // clip rect ordering |
2868 | pub const Unsorted: c_int = 0; |
2869 | pub const YSorted: c_int = 1; |
2870 | pub const YXSorted: c_int = 2; |
2871 | pub const YXBanded: c_int = 3; |
2872 | |
2873 | // color component mask |
2874 | pub const DoRed: c_char = 1; |
2875 | pub const DoGreen: c_char = 2; |
2876 | pub const DoBlue: c_char = 4; |
2877 | |
2878 | // error codes |
2879 | pub const Success: c_uchar = 0; |
2880 | pub const BadRequest: c_uchar = 1; |
2881 | pub const BadValue: c_uchar = 2; |
2882 | pub const BadWindow: c_uchar = 3; |
2883 | pub const BadPixmap: c_uchar = 4; |
2884 | pub const BadAtom: c_uchar = 5; |
2885 | pub const BadCursor: c_uchar = 6; |
2886 | pub const BadFont: c_uchar = 7; |
2887 | pub const BadMatch: c_uchar = 8; |
2888 | pub const BadDrawable: c_uchar = 9; |
2889 | pub const BadAccess: c_uchar = 10; |
2890 | pub const BadAlloc: c_uchar = 11; |
2891 | pub const BadColor: c_uchar = 12; |
2892 | pub const BadGC: c_uchar = 13; |
2893 | pub const BadIDChoice: c_uchar = 14; |
2894 | pub const BadName: c_uchar = 15; |
2895 | pub const BadLength: c_uchar = 16; |
2896 | pub const BadImplementation: c_uchar = 17; |
2897 | pub const FirstExtensionError: c_uchar = 128; |
2898 | pub const LastExtensionError: c_uchar = 255; |
2899 | |
2900 | // event kinds |
2901 | pub const KeyPress: c_int = 2; |
2902 | pub const KeyRelease: c_int = 3; |
2903 | pub const ButtonPress: c_int = 4; |
2904 | pub const ButtonRelease: c_int = 5; |
2905 | pub const MotionNotify: c_int = 6; |
2906 | pub const EnterNotify: c_int = 7; |
2907 | pub const LeaveNotify: c_int = 8; |
2908 | pub const FocusIn: c_int = 9; |
2909 | pub const FocusOut: c_int = 10; |
2910 | pub const KeymapNotify: c_int = 11; |
2911 | pub const Expose: c_int = 12; |
2912 | pub const GraphicsExpose: c_int = 13; |
2913 | pub const NoExpose: c_int = 14; |
2914 | pub const VisibilityNotify: c_int = 15; |
2915 | pub const CreateNotify: c_int = 16; |
2916 | pub const DestroyNotify: c_int = 17; |
2917 | pub const UnmapNotify: c_int = 18; |
2918 | pub const MapNotify: c_int = 19; |
2919 | pub const MapRequest: c_int = 20; |
2920 | pub const ReparentNotify: c_int = 21; |
2921 | pub const ConfigureNotify: c_int = 22; |
2922 | pub const ConfigureRequest: c_int = 23; |
2923 | pub const GravityNotify: c_int = 24; |
2924 | pub const ResizeRequest: c_int = 25; |
2925 | pub const CirculateNotify: c_int = 26; |
2926 | pub const CirculateRequest: c_int = 27; |
2927 | pub const PropertyNotify: c_int = 28; |
2928 | pub const SelectionClear: c_int = 29; |
2929 | pub const SelectionRequest: c_int = 30; |
2930 | pub const SelectionNotify: c_int = 31; |
2931 | pub const ColormapNotify: c_int = 32; |
2932 | pub const ClientMessage: c_int = 33; |
2933 | pub const MappingNotify: c_int = 34; |
2934 | pub const GenericEvent: c_int = 35; |
2935 | pub const LASTEvent: c_int = 36; |
2936 | |
2937 | // event mask |
2938 | pub const NoEventMask: c_long = 0; |
2939 | pub const KeyPressMask: c_long = 0x0000_0001; |
2940 | pub const KeyReleaseMask: c_long = 0x0000_0002; |
2941 | pub const ButtonPressMask: c_long = 0x0000_0004; |
2942 | pub const ButtonReleaseMask: c_long = 0x0000_0008; |
2943 | pub const EnterWindowMask: c_long = 0x0000_0010; |
2944 | pub const LeaveWindowMask: c_long = 0x0000_0020; |
2945 | pub const PointerMotionMask: c_long = 0x0000_0040; |
2946 | pub const PointerMotionHintMask: c_long = 0x0000_0080; |
2947 | pub const Button1MotionMask: c_long = 0x0000_0100; |
2948 | pub const Button2MotionMask: c_long = 0x0000_0200; |
2949 | pub const Button3MotionMask: c_long = 0x0000_0400; |
2950 | pub const Button4MotionMask: c_long = 0x0000_0800; |
2951 | pub const Button5MotionMask: c_long = 0x0000_1000; |
2952 | pub const ButtonMotionMask: c_long = 0x0000_2000; |
2953 | pub const KeymapStateMask: c_long = 0x0000_4000; |
2954 | pub const ExposureMask: c_long = 0x0000_8000; |
2955 | pub const VisibilityChangeMask: c_long = 0x0001_0000; |
2956 | pub const StructureNotifyMask: c_long = 0x0002_0000; |
2957 | pub const ResizeRedirectMask: c_long = 0x0004_0000; |
2958 | pub const SubstructureNotifyMask: c_long = 0x0008_0000; |
2959 | pub const SubstructureRedirectMask: c_long = 0x0010_0000; |
2960 | pub const FocusChangeMask: c_long = 0x0020_0000; |
2961 | pub const PropertyChangeMask: c_long = 0x0040_0000; |
2962 | pub const ColormapChangeMask: c_long = 0x0080_0000; |
2963 | pub const OwnerGrabButtonMask: c_long = 0x0100_0000; |
2964 | |
2965 | // property modes |
2966 | pub const PropModeReplace: c_int = 0; |
2967 | pub const PropModePrepend: c_int = 1; |
2968 | pub const PropModeAppend: c_int = 2; |
2969 | |
2970 | // modifier names |
2971 | pub const ShiftMapIndex: c_int = 0; |
2972 | pub const LockMapIndex: c_int = 1; |
2973 | pub const ControlMapIndex: c_int = 2; |
2974 | pub const Mod1MapIndex: c_int = 3; |
2975 | pub const Mod2MapIndex: c_int = 4; |
2976 | pub const Mod3MapIndex: c_int = 5; |
2977 | pub const Mod4MapIndex: c_int = 6; |
2978 | pub const Mod5MapIndex: c_int = 7; |
2979 | |
2980 | // button masks |
2981 | pub const Button1Mask: c_uint = 1 << 8; |
2982 | pub const Button2Mask: c_uint = 1 << 9; |
2983 | pub const Button3Mask: c_uint = 1 << 10; |
2984 | pub const Button4Mask: c_uint = 1 << 11; |
2985 | pub const Button5Mask: c_uint = 1 << 12; |
2986 | pub const AnyModifier: c_uint = 1 << 15; |
2987 | |
2988 | // Notify modes |
2989 | pub const NotifyNormal: c_int = 0; |
2990 | pub const NotifyGrab: c_int = 1; |
2991 | pub const NotifyUngrab: c_int = 2; |
2992 | pub const NotifyWhileGrabbed: c_int = 3; |
2993 | |
2994 | pub const NotifyHint: c_int = 1; |
2995 | |
2996 | // Notify detail |
2997 | pub const NotifyAncestor: c_int = 0; |
2998 | pub const NotifyVirtual: c_int = 1; |
2999 | pub const NotifyInferior: c_int = 2; |
3000 | pub const NotifyNonlinear: c_int = 3; |
3001 | pub const NotifyNonlinearVirtual: c_int = 4; |
3002 | pub const NotifyPointer: c_int = 5; |
3003 | pub const NotifyPointerRoot: c_int = 6; |
3004 | pub const NotifyDetailNone: c_int = 7; |
3005 | |
3006 | // Visibility notify |
3007 | pub const VisibilityUnobscured: c_int = 0; |
3008 | pub const VisibilityPartiallyObscured: c_int = 1; |
3009 | pub const VisibilityFullyObscured: c_int = 2; |
3010 | |
3011 | // Circulation request |
3012 | pub const PlaceOnTop: c_int = 0; |
3013 | pub const PlaceOnBottom: c_int = 1; |
3014 | |
3015 | // protocol families |
3016 | pub const FamilyInternet: c_int = 0; |
3017 | pub const FamilyDECnet: c_int = 1; |
3018 | pub const FamilyChaos: c_int = 2; |
3019 | pub const FamilyInternet6: c_int = 6; |
3020 | |
3021 | // authentication families not tied to a specific protocol |
3022 | pub const FamilyServerInterpreted: c_int = 5; |
3023 | |
3024 | // property notification |
3025 | pub const PropertyNewValue: c_int = 0; |
3026 | pub const PropertyDelete: c_int = 1; |
3027 | |
3028 | // Color Map notification |
3029 | pub const ColormapUninstalled: c_int = 0; |
3030 | pub const ColormapInstalled: c_int = 1; |
3031 | |
3032 | // grab modes |
3033 | pub const GrabModeSync: c_int = 0; |
3034 | pub const GrabModeAsync: c_int = 1; |
3035 | |
3036 | // grab status |
3037 | pub const GrabSuccess: c_int = 0; |
3038 | pub const AlreadyGrabbed: c_int = 1; |
3039 | pub const GrabInvalidTime: c_int = 2; |
3040 | pub const GrabNotViewable: c_int = 3; |
3041 | pub const GrabFrozen: c_int = 4; |
3042 | |
3043 | // AllowEvents modes |
3044 | pub const AsyncPointer: c_int = 0; |
3045 | pub const SyncPointer: c_int = 1; |
3046 | pub const ReplayPointer: c_int = 2; |
3047 | pub const AsyncKeyboard: c_int = 3; |
3048 | pub const SyncKeyboard: c_int = 4; |
3049 | pub const ReplayKeyboard: c_int = 5; |
3050 | pub const AsyncBoth: c_int = 6; |
3051 | pub const SyncBoth: c_int = 7; |
3052 | |
3053 | // Used in SetInputFocus, GetInputFocus |
3054 | pub const RevertToNone: c_int = 0; |
3055 | pub const RevertToPointerRoot: c_int = 1; |
3056 | pub const RevertToParent: c_int = 2; |
3057 | |
3058 | // ConfigureWindow structure |
3059 | pub const CWX: c_ushort = 1 << 0; |
3060 | pub const CWY: c_ushort = 1 << 1; |
3061 | pub const CWWidth: c_ushort = 1 << 2; |
3062 | pub const CWHeight: c_ushort = 1 << 3; |
3063 | pub const CWBorderWidth: c_ushort = 1 << 4; |
3064 | pub const CWSibling: c_ushort = 1 << 5; |
3065 | pub const CWStackMode: c_ushort = 1 << 6; |
3066 | |
3067 | // gravity |
3068 | pub const ForgetGravity: c_int = 0; |
3069 | pub const UnmapGravity: c_int = 0; |
3070 | pub const NorthWestGravity: c_int = 1; |
3071 | pub const NorthGravity: c_int = 2; |
3072 | pub const NorthEastGravity: c_int = 3; |
3073 | pub const WestGravity: c_int = 4; |
3074 | pub const CenterGravity: c_int = 5; |
3075 | pub const EastGravity: c_int = 6; |
3076 | pub const SouthWestGravity: c_int = 7; |
3077 | pub const SouthGravity: c_int = 8; |
3078 | pub const SouthEastGravity: c_int = 9; |
3079 | pub const StaticGravity: c_int = 10; |
3080 | |
3081 | // image format |
3082 | pub const XYBitmap: c_int = 0; |
3083 | pub const XYPixmap: c_int = 1; |
3084 | pub const ZPixmap: c_int = 2; |
3085 | |
3086 | // Used in CreateWindow for backing-store hint |
3087 | pub const NotUseful: c_int = 0; |
3088 | pub const WhenMapped: c_int = 1; |
3089 | pub const Always: c_int = 2; |
3090 | |
3091 | // map state |
3092 | pub const IsUnmapped: c_int = 0; |
3093 | pub const IsUnviewable: c_int = 1; |
3094 | pub const IsViewable: c_int = 2; |
3095 | |
3096 | // modifier keys mask |
3097 | pub const ShiftMask: c_uint = 0x01; |
3098 | pub const LockMask: c_uint = 0x02; |
3099 | pub const ControlMask: c_uint = 0x04; |
3100 | pub const Mod1Mask: c_uint = 0x08; |
3101 | pub const Mod2Mask: c_uint = 0x10; |
3102 | pub const Mod3Mask: c_uint = 0x20; |
3103 | pub const Mod4Mask: c_uint = 0x40; |
3104 | pub const Mod5Mask: c_uint = 0x80; |
3105 | |
3106 | // mouse buttons |
3107 | pub const Button1: c_uint = 1; |
3108 | pub const Button2: c_uint = 2; |
3109 | pub const Button3: c_uint = 3; |
3110 | pub const Button4: c_uint = 4; |
3111 | pub const Button5: c_uint = 5; |
3112 | |
3113 | // size hints mask |
3114 | pub const USPosition: c_long = 0x0001; |
3115 | pub const USSize: c_long = 0x0002; |
3116 | pub const PPosition: c_long = 0x0004; |
3117 | pub const PSize: c_long = 0x0008; |
3118 | pub const PMinSize: c_long = 0x0010; |
3119 | pub const PMaxSize: c_long = 0x0020; |
3120 | pub const PResizeInc: c_long = 0x0040; |
3121 | pub const PAspect: c_long = 0x0080; |
3122 | pub const PBaseSize: c_long = 0x0100; |
3123 | pub const PWinGravity: c_long = 0x0200; |
3124 | pub const PAllHints: c_long = PPosition | PSize | PMinSize | PMaxSize | PResizeInc | PAspect; |
3125 | |
3126 | // Used in ChangeSaveSet |
3127 | pub const SetModeInsert: c_int = 0; |
3128 | pub const SetModeDelete: c_int = 1; |
3129 | |
3130 | // Used in ChangeCloseDownMode |
3131 | pub const DestroyAll: c_int = 0; |
3132 | pub const RetainPermanent: c_int = 1; |
3133 | pub const RetainTemporary: c_int = 2; |
3134 | |
3135 | // Window stacking method (in configureWindow) |
3136 | pub const Above: c_int = 0; |
3137 | pub const Below: c_int = 1; |
3138 | pub const TopIf: c_int = 2; |
3139 | pub const BottomIf: c_int = 3; |
3140 | pub const Opposite: c_int = 4; |
3141 | |
3142 | // Circulation direction |
3143 | pub const RaiseLowest: c_int = 0; |
3144 | pub const LowerHighest: c_int = 1; |
3145 | |
3146 | // graphics functions |
3147 | pub const GXclear: c_int = 0x0; |
3148 | pub const GXand: c_int = 0x1; |
3149 | pub const GXandReverse: c_int = 0x2; |
3150 | pub const GXcopy: c_int = 0x3; |
3151 | pub const GXandInverted: c_int = 0x4; |
3152 | pub const GXnoop: c_int = 0x5; |
3153 | pub const GXxor: c_int = 0x6; |
3154 | pub const GXor: c_int = 0x7; |
3155 | pub const GXnor: c_int = 0x8; |
3156 | pub const GXequiv: c_int = 0x9; |
3157 | pub const GXinvert: c_int = 0xa; |
3158 | pub const GXorReverse: c_int = 0xb; |
3159 | pub const GXcopyInverted: c_int = 0xc; |
3160 | pub const GXorInverted: c_int = 0xd; |
3161 | pub const GXnand: c_int = 0xe; |
3162 | pub const GXset: c_int = 0xf; |
3163 | |
3164 | // LineStyle |
3165 | pub const LineSolid: c_int = 0; |
3166 | pub const LineOnOffDash: c_int = 1; |
3167 | pub const LineDoubleDash: c_int = 2; |
3168 | |
3169 | // capStyle |
3170 | pub const CapNotLast: c_int = 0; |
3171 | pub const CapButt: c_int = 1; |
3172 | pub const CapRound: c_int = 2; |
3173 | pub const CapProjecting: c_int = 3; |
3174 | |
3175 | // joinStyle |
3176 | pub const JoinMiter: c_int = 0; |
3177 | pub const JoinRound: c_int = 1; |
3178 | pub const JoinBevel: c_int = 2; |
3179 | |
3180 | // fillStyle |
3181 | pub const FillSolid: c_int = 0; |
3182 | pub const FillTiled: c_int = 1; |
3183 | pub const FillStippled: c_int = 2; |
3184 | pub const FillOpaqueStippled: c_int = 3; |
3185 | |
3186 | // fillRule |
3187 | pub const EvenOddRule: c_int = 0; |
3188 | pub const WindingRule: c_int = 1; |
3189 | |
3190 | // subwindow mode |
3191 | pub const ClipByChildren: c_int = 0; |
3192 | pub const IncludeInferiors: c_int = 1; |
3193 | |
3194 | // CoordinateMode for drawing routines |
3195 | pub const CoordModeOrigin: c_int = 0; |
3196 | pub const CoordModePrevious: c_int = 1; |
3197 | |
3198 | // Polygon shapes |
3199 | pub const Complex: c_int = 0; |
3200 | pub const Nonconvex: c_int = 1; |
3201 | pub const Convex: c_int = 2; |
3202 | |
3203 | // Arc modes for PolyFillArc |
3204 | pub const ArcChord: c_int = 0; |
3205 | pub const ArcPieSlice: c_int = 1; |
3206 | |
3207 | // GC components |
3208 | pub const GCFunction: c_uint = 1 << 0; |
3209 | pub const GCPlaneMask: c_uint = 1 << 1; |
3210 | pub const GCForeground: c_uint = 1 << 2; |
3211 | pub const GCBackground: c_uint = 1 << 3; |
3212 | pub const GCLineWidth: c_uint = 1 << 4; |
3213 | pub const GCLineStyle: c_uint = 1 << 5; |
3214 | pub const GCCapStyle: c_uint = 1 << 6; |
3215 | pub const GCJoinStyle: c_uint = 1 << 7; |
3216 | pub const GCFillStyle: c_uint = 1 << 8; |
3217 | pub const GCFillRule: c_uint = 1 << 9; |
3218 | pub const GCTile: c_uint = 1 << 10; |
3219 | pub const GCStipple: c_uint = 1 << 11; |
3220 | pub const GCTileStipXOrigin: c_uint = 1 << 12; |
3221 | pub const GCTileStipYOrigin: c_uint = 1 << 13; |
3222 | pub const GCFont: c_uint = 1 << 14; |
3223 | pub const GCSubwindowMode: c_uint = 1 << 15; |
3224 | pub const GCGraphicsExposures: c_uint = 1 << 16; |
3225 | pub const GCClipXOrigin: c_uint = 1 << 17; |
3226 | pub const GCClipYOrigin: c_uint = 1 << 18; |
3227 | pub const GCClipMask: c_uint = 1 << 19; |
3228 | pub const GCDashOffset: c_uint = 1 << 20; |
3229 | pub const GCDashList: c_uint = 1 << 21; |
3230 | pub const GCArcMode: c_uint = 1 << 22; |
3231 | |
3232 | pub const GCLastBit: c_uint = 22; |
3233 | |
3234 | // draw direction |
3235 | pub const FontLeftToRight: c_int = 0; |
3236 | pub const FontRightToLeft: c_int = 1; |
3237 | |
3238 | pub const FontChange: c_uchar = 255; |
3239 | |
3240 | // QueryBestSize Class |
3241 | pub const CursorShape: c_int = 0; |
3242 | pub const TileShape: c_int = 1; |
3243 | pub const StippleShape: c_int = 2; |
3244 | |
3245 | // keyboard autorepeat |
3246 | pub const AutoRepeatModeOff: c_int = 0; |
3247 | pub const AutoRepeatModeOn: c_int = 1; |
3248 | pub const AutoRepeatModeDefault: c_int = 2; |
3249 | |
3250 | pub const LedModeOff: c_int = 0; |
3251 | pub const LedModeOn: c_int = 1; |
3252 | |
3253 | // masks for ChangeKeyboardControl |
3254 | pub const KBKeyClickPercent: c_ulong = 1 << 0; |
3255 | pub const KBBellPercent: c_ulong = 1 << 1; |
3256 | pub const KBBellPitch: c_ulong = 1 << 2; |
3257 | pub const KBBellDuration: c_ulong = 1 << 3; |
3258 | pub const KBLed: c_ulong = 1 << 4; |
3259 | pub const KBLedMode: c_ulong = 1 << 5; |
3260 | pub const KBKey: c_ulong = 1 << 6; |
3261 | pub const KBAutoRepeatMode: c_ulong = 1 << 7; |
3262 | |
3263 | pub const MappingSuccess: c_uchar = 0; |
3264 | pub const MappingBusy: c_uchar = 1; |
3265 | pub const MappingFailed: c_uchar = 2; |
3266 | |
3267 | pub const MappingModifier: c_int = 0; |
3268 | pub const MappingKeyboard: c_int = 1; |
3269 | pub const MappingPointer: c_int = 2; |
3270 | |
3271 | // screensaver |
3272 | pub const DontPreferBlanking: c_int = 0; |
3273 | pub const PreferBlanking: c_int = 1; |
3274 | pub const DefaultBlanking: c_int = 2; |
3275 | |
3276 | pub const DisableScreenSaver: c_int = 0; |
3277 | pub const DisableScreenInterval: c_int = 0; |
3278 | |
3279 | pub const DontAllowExposures: c_int = 0; |
3280 | pub const AllowExposures: c_int = 1; |
3281 | pub const DefaultExposures: c_int = 2; |
3282 | |
3283 | pub const ScreenSaverReset: c_int = 0; |
3284 | pub const ScreenSaverActive: c_int = 1; |
3285 | |
3286 | // hosts and connections |
3287 | pub const HostInsert: c_uchar = 0; |
3288 | pub const HostDelete: c_uchar = 1; |
3289 | |
3290 | pub const EnableAccess: c_int = 1; |
3291 | pub const DisableAccess: c_int = 0; |
3292 | |
3293 | // visual class |
3294 | pub const StaticGray: c_int = 0; |
3295 | pub const GrayScale: c_int = 1; |
3296 | pub const StaticColor: c_int = 2; |
3297 | pub const PseudoColor: c_int = 3; |
3298 | pub const TrueColor: c_int = 4; |
3299 | pub const DirectColor: c_int = 5; |
3300 | |
3301 | // visual info mask |
3302 | pub const VisualNoMask: c_long = 0x0000; |
3303 | pub const VisualIDMask: c_long = 0x0001; |
3304 | pub const VisualScreenMask: c_long = 0x0002; |
3305 | pub const VisualDepthMask: c_long = 0x0004; |
3306 | pub const VisualClassMask: c_long = 0x0008; |
3307 | pub const VisualRedMaskMask: c_long = 0x0010; |
3308 | pub const VisualGreenMaskMask: c_long = 0x0020; |
3309 | pub const VisualBlueMaskMask: c_long = 0x0040; |
3310 | pub const VisualColormapSizeMask: c_long = 0x0080; |
3311 | pub const VisualBitsPerRGBMask: c_long = 0x0100; |
3312 | pub const VisualAllMask: c_long = 0x01ff; |
3313 | |
3314 | // window attributes |
3315 | pub const CWBackPixmap: c_ulong = 0x0001; |
3316 | pub const CWBackPixel: c_ulong = 0x0002; |
3317 | pub const CWBorderPixmap: c_ulong = 0x0004; |
3318 | pub const CWBorderPixel: c_ulong = 0x0008; |
3319 | pub const CWBitGravity: c_ulong = 0x0010; |
3320 | pub const CWWinGravity: c_ulong = 0x0020; |
3321 | pub const CWBackingStore: c_ulong = 0x0040; |
3322 | pub const CWBackingPlanes: c_ulong = 0x0080; |
3323 | pub const CWBackingPixel: c_ulong = 0x0100; |
3324 | pub const CWOverrideRedirect: c_ulong = 0x0200; |
3325 | pub const CWSaveUnder: c_ulong = 0x0400; |
3326 | pub const CWEventMask: c_ulong = 0x0800; |
3327 | pub const CWDontPropagate: c_ulong = 0x1000; |
3328 | pub const CWColormap: c_ulong = 0x2000; |
3329 | pub const CWCursor: c_ulong = 0x4000; |
3330 | |
3331 | // window classes |
3332 | pub const InputOutput: c_int = 1; |
3333 | pub const InputOnly: c_int = 2; |
3334 | |
3335 | // XCreateIC values |
3336 | pub const XIMPreeditArea: c_int = 0x0001; |
3337 | pub const XIMPreeditCallbacks: c_int = 0x0002; |
3338 | pub const XIMPreeditPosition: c_int = 0x0004; |
3339 | pub const XIMPreeditNothing: c_int = 0x0008; |
3340 | pub const XIMPreeditNone: c_int = 0x0010; |
3341 | pub const XIMStatusArea: c_int = 0x0100; |
3342 | pub const XIMStatusCallbacks: c_int = 0x0200; |
3343 | pub const XIMStatusNothing: c_int = 0x0400; |
3344 | pub const XIMStatusNone: c_int = 0x0800; |
3345 | |
3346 | // Byte order used in imageByteOrder and bitmapBitOrder |
3347 | pub const LSBFirst: c_int = 0; |
3348 | pub const MSBFirst: c_int = 1; |
3349 | |
3350 | // Reserved resource and constant definitions |
3351 | //pub const None: c_int = 0; |
3352 | pub const ParentRelative: c_int = 1; |
3353 | pub const CopyFromParent: c_int = 0; |
3354 | pub const PointerWindow: c_int = 0; |
3355 | pub const InputFocus: c_int = 1; |
3356 | pub const PointerRoot: c_int = 1; |
3357 | pub const AnyPropertyType: c_int = 0; |
3358 | pub const AnyKey: c_int = 0; |
3359 | pub const AnyButton: c_int = 0; |
3360 | pub const AllTemporary: c_int = 0; |
3361 | pub const CurrentTime: Time = 0; |
3362 | pub const NoSymbol: c_int = 0; |
3363 | |
3364 | /* Definitions for the X window system likely to be used by applications */ |
3365 | pub const X_PROTOCOL: c_int = 11; |
3366 | pub const X_PROTOCOL_REVISION: c_int = 0; |
3367 | |
3368 | pub const XNVaNestedList: &str = "XNVaNestedList" ; |
3369 | pub const XNQueryInputStyle: &str = "queryInputStyle" ; |
3370 | pub const XNClientWindow: &str = "clientWindow" ; |
3371 | pub const XNInputStyle: &str = "inputStyle" ; |
3372 | pub const XNFocusWindow: &str = "focusWindow" ; |
3373 | pub const XNResourceName: &str = "resourceName" ; |
3374 | pub const XNResourceClass: &str = "resourceClass" ; |
3375 | pub const XNGeometryCallback: &str = "geometryCallback" ; |
3376 | pub const XNDestroyCallback: &str = "destroyCallback" ; |
3377 | pub const XNFilterEvents: &str = "filterEvents" ; |
3378 | pub const XNPreeditStartCallback: &str = "preeditStartCallback" ; |
3379 | pub const XNPreeditDoneCallback: &str = "preeditDoneCallback" ; |
3380 | pub const XNPreeditDrawCallback: &str = "preeditDrawCallback" ; |
3381 | pub const XNPreeditCaretCallback: &str = "preeditCaretCallback" ; |
3382 | pub const XNPreeditStateNotifyCallback: &str = "preeditStateNotifyCallback" ; |
3383 | pub const XNPreeditAttributes: &str = "preeditAttributes" ; |
3384 | pub const XNStatusStartCallback: &str = "statusStartCallback" ; |
3385 | pub const XNStatusDoneCallback: &str = "statusDoneCallback" ; |
3386 | pub const XNStatusDrawCallback: &str = "statusDrawCallback" ; |
3387 | pub const XNStatusAttributes: &str = "statusAttributes" ; |
3388 | pub const XNArea: &str = "area" ; |
3389 | pub const XNAreaNeeded: &str = "areaNeeded" ; |
3390 | pub const XNSpotLocation: &str = "spotLocation" ; |
3391 | pub const XNColormap: &str = "colorMap" ; |
3392 | pub const XNStdColormap: &str = "stdColorMap" ; |
3393 | pub const XNForeground: &str = "foreground" ; |
3394 | pub const XNBackground: &str = "background" ; |
3395 | pub const XNBackgroundPixmap: &str = "backgroundPixmap" ; |
3396 | pub const XNFontSet: &str = "fontSet" ; |
3397 | pub const XNLineSpace: &str = "lineSpace" ; |
3398 | pub const XNCursor: &str = "cursor" ; |
3399 | |
3400 | pub const XNVaNestedList_0: &[u8] = b"XNVaNestedList \0" ; |
3401 | pub const XNQueryInputStyle_0: &[u8] = b"queryInputStyle \0" ; |
3402 | pub const XNClientWindow_0: &[u8] = b"clientWindow \0" ; |
3403 | pub const XNInputStyle_0: &[u8] = b"inputStyle \0" ; |
3404 | pub const XNFocusWindow_0: &[u8] = b"focusWindow \0" ; |
3405 | pub const XNResourceName_0: &[u8] = b"resourceName \0" ; |
3406 | pub const XNResourceClass_0: &[u8] = b"resourceClass \0" ; |
3407 | pub const XNGeometryCallback_0: &[u8] = b"geometryCallback \0" ; |
3408 | pub const XNDestroyCallback_0: &[u8] = b"destroyCallback \0" ; |
3409 | pub const XNFilterEvents_0: &[u8] = b"filterEvents \0" ; |
3410 | pub const XNPreeditStartCallback_0: &[u8] = b"preeditStartCallback \0" ; |
3411 | pub const XNPreeditDoneCallback_0: &[u8] = b"preeditDoneCallback \0" ; |
3412 | pub const XNPreeditDrawCallback_0: &[u8] = b"preeditDrawCallback \0" ; |
3413 | pub const XNPreeditCaretCallback_0: &[u8] = b"preeditCaretCallback \0" ; |
3414 | pub const XNPreeditStateNotifyCallback_0: &[u8] = b"preeditStateNotifyCallback \0" ; |
3415 | pub const XNPreeditAttributes_0: &[u8] = b"preeditAttributes \0" ; |
3416 | pub const XNStatusStartCallback_0: &[u8] = b"statusStartCallback \0" ; |
3417 | pub const XNStatusDoneCallback_0: &[u8] = b"statusDoneCallback \0" ; |
3418 | pub const XNStatusDrawCallback_0: &[u8] = b"statusDrawCallback \0" ; |
3419 | pub const XNStatusAttributes_0: &[u8] = b"statusAttributes \0" ; |
3420 | pub const XNArea_0: &[u8] = b"area \0" ; |
3421 | pub const XNAreaNeeded_0: &[u8] = b"areaNeeded \0" ; |
3422 | pub const XNSpotLocation_0: &[u8] = b"spotLocation \0" ; |
3423 | pub const XNColormap_0: &[u8] = b"colorMap \0" ; |
3424 | pub const XNStdColormap_0: &[u8] = b"stdColorMap \0" ; |
3425 | pub const XNForeground_0: &[u8] = b"foreground \0" ; |
3426 | pub const XNBackground_0: &[u8] = b"background \0" ; |
3427 | pub const XNBackgroundPixmap_0: &[u8] = b"backgroundPixmap \0" ; |
3428 | pub const XNFontSet_0: &[u8] = b"fontSet \0" ; |
3429 | pub const XNLineSpace_0: &[u8] = b"lineSpace \0" ; |
3430 | pub const XNCursor_0: &[u8] = b"cursor \0" ; |
3431 | |
3432 | pub const XNQueryIMValuesList: &str = "queryIMValuesList" ; |
3433 | pub const XNQueryICValuesList: &str = "queryICValuesList" ; |
3434 | pub const XNVisiblePosition: &str = "visiblePosition" ; |
3435 | pub const XNR6PreeditCallback: &str = "r6PreeditCallback" ; |
3436 | pub const XNStringConversionCallback: &str = "stringConversionCallback" ; |
3437 | pub const XNStringConversion: &str = "stringConversion" ; |
3438 | pub const XNResetState: &str = "resetState" ; |
3439 | pub const XNHotKey: &str = "hotKey" ; |
3440 | pub const XNHotKeyState: &str = "hotKeyState" ; |
3441 | pub const XNPreeditState: &str = "preeditState" ; |
3442 | pub const XNSeparatorofNestedList: &str = "separatorofNestedList" ; |
3443 | |
3444 | pub const XNQueryIMValuesList_0: &[u8] = b"queryIMValuesList \0" ; |
3445 | pub const XNQueryICValuesList_0: &[u8] = b"queryICValuesList \0" ; |
3446 | pub const XNVisiblePosition_0: &[u8] = b"visiblePosition \0" ; |
3447 | pub const XNR6PreeditCallback_0: &[u8] = b"r6PreeditCallback \0" ; |
3448 | pub const XNStringConversionCallback_0: &[u8] = b"stringConversionCallback \0" ; |
3449 | pub const XNStringConversion_0: &[u8] = b"stringConversion \0" ; |
3450 | pub const XNResetState_0: &[u8] = b"resetState \0" ; |
3451 | pub const XNHotKey_0: &[u8] = b"hotKey \0" ; |
3452 | pub const XNHotKeyState_0: &[u8] = b"hotKeyState \0" ; |
3453 | pub const XNPreeditState_0: &[u8] = b"preeditState \0" ; |
3454 | pub const XNSeparatorofNestedList_0: &[u8] = b"separatorofNestedList \0" ; |
3455 | |
3456 | pub const XBufferOverflow: i32 = -1; |
3457 | pub const XLookupNone: i32 = 1; |
3458 | pub const XLookupChars: i32 = 2; |
3459 | pub const XLookupKeySym: i32 = 3; |
3460 | pub const XLookupBoth: i32 = 4; |
3461 | |
3462 | // Xkb constants |
3463 | pub const XkbActionMessageLength: usize = 6; |
3464 | |
3465 | pub const XkbOD_Success: c_int = 0; |
3466 | pub const XkbOD_BadLibraryVersion: c_int = 1; |
3467 | pub const XkbOD_ConnectionRefused: c_int = 2; |
3468 | pub const XkbOD_NonXkbServer: c_int = 3; |
3469 | pub const XkbOD_BadServerVersion: c_int = 4; |
3470 | |
3471 | pub const XkbLC_ForceLatinLookup: c_uint = 1 << 0; |
3472 | pub const XkbLC_ConsumeLookupMods: c_uint = 1 << 1; |
3473 | pub const XkbLC_AlwaysConsumeShiftAndLock: c_uint = 1 << 2; |
3474 | pub const XkbLC_IgnoreNewKeyboards: c_uint = 1 << 3; |
3475 | pub const XkbLC_ControlFallback: c_uint = 1 << 4; |
3476 | pub const XkbLC_ConsumeKeysOnComposeFail: c_uint = 1 << 29; |
3477 | pub const XkbLC_ComposeLED: c_uint = 1 << 30; |
3478 | pub const XkbLC_BeepOnComposeFail: c_uint = 1 << 31; |
3479 | |
3480 | pub const XkbLC_AllComposeControls: c_uint = 0xc000_0000; |
3481 | pub const XkbLC_AllControls: c_uint = 0xc000_001f; |
3482 | |
3483 | pub const XkbNewKeyboardNotify: c_int = 0; |
3484 | pub const XkbMapNotify: c_int = 1; |
3485 | pub const XkbStateNotify: c_int = 2; |
3486 | pub const XkbControlsNotify: c_int = 3; |
3487 | pub const XkbIndicatorStateNotify: c_int = 4; |
3488 | pub const XkbIndicatorMapNotify: c_int = 5; |
3489 | pub const XkbNamesNotify: c_int = 6; |
3490 | pub const XkbCompatMapNotify: c_int = 7; |
3491 | pub const XkbBellNotify: c_int = 8; |
3492 | pub const XkbActionMessage: c_int = 9; |
3493 | pub const XkbAccessXNotify: c_int = 10; |
3494 | pub const XkbExtensionDeviceNotify: c_int = 11; |
3495 | |
3496 | pub const XkbNewKeyboardNotifyMask: c_ulong = 1 << 0; |
3497 | pub const XkbMapNotifyMask: c_ulong = 1 << 1; |
3498 | pub const XkbStateNotifyMask: c_ulong = 1 << 2; |
3499 | pub const XkbControlsNotifyMask: c_ulong = 1 << 3; |
3500 | pub const XkbIndicatorStateNotifyMask: c_ulong = 1 << 4; |
3501 | pub const XkbIndicatorMapNotifyMask: c_ulong = 1 << 5; |
3502 | pub const XkbNamesNotifyMask: c_ulong = 1 << 6; |
3503 | pub const XkbCompatMapNotifyMask: c_ulong = 1 << 7; |
3504 | pub const XkbBellNotifyMask: c_ulong = 1 << 8; |
3505 | pub const XkbActionMessageMask: c_ulong = 1 << 9; |
3506 | pub const XkbAccessXNotifyMask: c_ulong = 1 << 10; |
3507 | pub const XkbExtensionDeviceNotifyMask: c_ulong = 1 << 11; |
3508 | pub const XkbAllEventsMask: c_ulong = 0xfff; |
3509 | |
3510 | pub const XkbModifierStateMask: c_ulong = 1 << 0; |
3511 | pub const XkbModifierBaseMask: c_ulong = 1 << 1; |
3512 | pub const XkbModifierLatchMask: c_ulong = 1 << 2; |
3513 | pub const XkbModifierLockMask: c_ulong = 1 << 3; |
3514 | pub const XkbGroupStateMask: c_ulong = 1 << 4; |
3515 | pub const XkbGroupBaseMask: c_ulong = 1 << 5; |
3516 | pub const XkbGroupLatchMask: c_ulong = 1 << 6; |
3517 | pub const XkbGroupLockMask: c_ulong = 1 << 7; |
3518 | pub const XkbCompatStateMask: c_ulong = 1 << 8; |
3519 | pub const XkbGrabModsMask: c_ulong = 1 << 9; |
3520 | pub const XkbCompatGrabModsMask: c_ulong = 1 << 10; |
3521 | pub const XkbLookupModsMask: c_ulong = 1 << 11; |
3522 | pub const XkbCompatLookupModsMask: c_ulong = 1 << 12; |
3523 | pub const XkbPointerButtonMask: c_ulong = 1 << 13; |
3524 | pub const XkbAllStateComponentsMask: c_ulong = 0x3fff; |
3525 | |
3526 | // Bitmask returned by XParseGeometry |
3527 | pub const NoValue: c_int = 0x0000; |
3528 | pub const XValue: c_int = 0x0001; |
3529 | pub const YValue: c_int = 0x0002; |
3530 | pub const WidthValue: c_int = 0x0004; |
3531 | pub const HeightValue: c_int = 0x0008; |
3532 | pub const AllValues: c_int = 0x000f; |
3533 | pub const XNegative: c_int = 0x0010; |
3534 | pub const YNegative: c_int = 0x0020; |
3535 | |
3536 | // Definition for flags of XWMHints |
3537 | pub const InputHint: c_long = 1 << 0; |
3538 | pub const StateHint: c_long = 1 << 1; |
3539 | pub const IconPixmapHint: c_long = 1 << 2; |
3540 | pub const IconWindowHint: c_long = 1 << 3; |
3541 | pub const IconPositionHint: c_long = 1 << 4; |
3542 | pub const IconMaskHint: c_long = 1 << 5; |
3543 | pub const WindowGroupHint: c_long = 1 << 6; |
3544 | pub const AllHints: c_long = InputHint |
3545 | | StateHint |
3546 | | IconPixmapHint |
3547 | | IconWindowHint |
3548 | | IconPositionHint |
3549 | | IconMaskHint |
3550 | | WindowGroupHint; |
3551 | pub const XUrgencyHint: c_long = 1 << 8; |
3552 | |
3553 | // XICCEncodingStyle |
3554 | pub const XStringStyle: c_int = 0; |
3555 | pub const XCompoundTextStyle: c_int = 1; |
3556 | pub const XTextStyle: c_int = 2; |
3557 | pub const XStdICCTextStyle: c_int = 3; |
3558 | pub const XUTF8StringStyle: c_int = 4; |
3559 | |
3560 | // |
3561 | // inline functions |
3562 | // |
3563 | |
3564 | #[cfg (feature = "xlib" )] |
3565 | #[inline ] |
3566 | pub unsafe fn XUniqueContext() -> XContext { |
3567 | XrmUniqueQuark() |
3568 | } |
3569 | |