sapp_linux/
x.rs

1pub use bits_dlfcn_h::{RTLD_GLOBAL, RTLD_LAZY};
2pub use dlfcn_h::{dlopen, dlsym};
3pub use stdlib_h::atof;
4pub use string_h::{memset, strcmp, strlen, strstr};
5pub use XKBlib_h::XkbSetDetectableAutoRepeat;
6pub use X_h::{
7    AllocNone, Atom, Button1MotionMask, Button2MotionMask, Button3MotionMask, Button4MotionMask,
8    Button5MotionMask, ButtonMotionMask, ButtonPressMask, ButtonReleaseMask, CWBorderPixel,
9    CWColormap, CWEventMask, Colormap, ControlMask, Cursor, EnterWindowMask, ExposureMask,
10    FocusChangeMask, GrabModeAsync, InputOutput, IsViewable, KeyCode, KeyPressMask, KeyReleaseMask,
11    KeySym, KeymapStateMask, LeaveWindowMask, Mod1Mask, Mod4Mask, Pixmap, PointerMotionHintMask,
12    PointerMotionMask, PropModeReplace, PropertyChangeMask, PropertyNewValue, ShiftMask,
13    StaticGravity, StructureNotifyMask, Success, VisibilityChangeMask, Window, XID, Time
14};
15pub use Xlib_h::{
16    ClientMessageData, Display, Screen, Visual, XChangeProperty, XClientMessageEvent,
17    XCloseDisplay, XCreateColormap, XCreateWindow, XDestroyWindow, XErrorEvent, XErrorHandler,
18    XEvent, XFlush, XFree, XFreeColormap, XGetKeyboardMapping, XGetWindowAttributes,
19    XGetWindowProperty, XGrabPointer, XInitThreads, XInternAtom, XKeyEvent, XLowerWindow,
20    XMapWindow, XNextEvent, XOpenDisplay, XPending, XPointer, XRaiseWindow, XResourceManagerString,
21    XSelectionEvent, XSelectionRequestEvent, XSetErrorHandler, XSetWMProtocols,
22    XSetWindowAttributes, XSync, XUngrabPointer, XUnmapWindow, XWindowAttributes, XrmInitialize,
23    _XEvent, _XPrivDisplay, _XrmHashBucketRec,
24};
25pub use Xmd_h::CARD32;
26pub use Xresource_h::{
27    XrmDatabase, XrmDestroyDatabase, XrmGetResource, XrmGetStringDatabase, XrmValue,
28};
29pub use Xutil_h::{
30    IconicState, NormalState, PMinSize, PMaxSize, PWinGravity, WithdrawnState, XAllocSizeHints, XClassHint,
31    XComposeStatus, XLookupString, XSetWMNormalHints, XSizeHints, XVisualInfo, XWMHints,
32    Xutf8SetWMProperties,
33};
34pub type __GLXcontext = ();
35pub type __GLXFBConfig = ();
36
37pub mod Xlib_h {
38    pub type Display = _XDisplay;
39    pub type XEvent = _XEvent;
40    #[derive(Copy, Clone)]
41    #[repr(C)]
42    pub union _XEvent {
43        pub type_0: libc::c_int,
44        pub xany: XAnyEvent,
45        pub xkey: XKeyEvent,
46        pub xbutton: XButtonEvent,
47        pub xmotion: XMotionEvent,
48        pub xcrossing: XCrossingEvent,
49        pub xfocus: XFocusChangeEvent,
50        pub xexpose: XExposeEvent,
51        pub xgraphicsexpose: XGraphicsExposeEvent,
52        pub xnoexpose: XNoExposeEvent,
53        pub xvisibility: XVisibilityEvent,
54        pub xcreatewindow: XCreateWindowEvent,
55        pub xdestroywindow: XDestroyWindowEvent,
56        pub xunmap: XUnmapEvent,
57        pub xmap: XMapEvent,
58        pub xmaprequest: XMapRequestEvent,
59        pub xreparent: XReparentEvent,
60        pub xconfigure: XConfigureEvent,
61        pub xgravity: XGravityEvent,
62        pub xresizerequest: XResizeRequestEvent,
63        pub xconfigurerequest: XConfigureRequestEvent,
64        pub xcirculate: XCirculateEvent,
65        pub xcirculaterequest: XCirculateRequestEvent,
66        pub xproperty: XPropertyEvent,
67        pub xselectionclear: XSelectionClearEvent,
68        pub xselectionrequest: XSelectionRequestEvent,
69        pub xselection: XSelectionEvent,
70        pub xcolormap: XColormapEvent,
71        pub xclient: XClientMessageEvent,
72        pub xmapping: XMappingEvent,
73        pub xerror: XErrorEvent,
74        pub xkeymap: XKeymapEvent,
75        pub xgeneric: XGenericEvent,
76        pub xcookie: XGenericEventCookie,
77        pub pad: [libc::c_long; 24],
78    }
79    #[derive(Copy, Clone)]
80    #[repr(C)]
81    pub struct XGenericEventCookie {
82        pub type_0: libc::c_int,
83        pub serial: libc::c_ulong,
84        pub send_event: libc::c_int,
85        pub display: *mut Display,
86        pub extension: libc::c_int,
87        pub evtype: libc::c_int,
88        pub cookie: libc::c_uint,
89        pub data: *mut libc::c_void,
90    }
91    #[derive(Copy, Clone)]
92    #[repr(C)]
93    pub struct XGenericEvent {
94        pub type_0: libc::c_int,
95        pub serial: libc::c_ulong,
96        pub send_event: libc::c_int,
97        pub display: *mut Display,
98        pub extension: libc::c_int,
99        pub evtype: libc::c_int,
100    }
101    #[derive(Copy, Clone)]
102    #[repr(C)]
103    pub struct XKeymapEvent {
104        pub type_0: libc::c_int,
105        pub serial: libc::c_ulong,
106        pub send_event: libc::c_int,
107        pub display: *mut Display,
108        pub window: Window,
109        pub key_vector: [libc::c_char; 32],
110    }
111    #[derive(Copy, Clone)]
112    #[repr(C)]
113    pub struct XErrorEvent {
114        pub type_0: libc::c_int,
115        pub display: *mut Display,
116        pub resourceid: XID,
117        pub serial: libc::c_ulong,
118        pub error_code: libc::c_uchar,
119        pub request_code: libc::c_uchar,
120        pub minor_code: libc::c_uchar,
121    }
122    #[derive(Copy, Clone)]
123    #[repr(C)]
124    pub struct XMappingEvent {
125        pub type_0: libc::c_int,
126        pub serial: libc::c_ulong,
127        pub send_event: libc::c_int,
128        pub display: *mut Display,
129        pub window: Window,
130        pub request: libc::c_int,
131        pub first_keycode: libc::c_int,
132        pub count: libc::c_int,
133    }
134    #[derive(Copy, Clone)]
135    #[repr(C)]
136    pub struct XClientMessageEvent {
137        pub type_0: libc::c_int,
138        pub serial: libc::c_ulong,
139        pub send_event: libc::c_int,
140        pub display: *mut Display,
141        pub window: Window,
142        pub message_type: Atom,
143        pub format: libc::c_int,
144        pub data: ClientMessageData,
145    }
146    #[derive(Copy, Clone)]
147    #[repr(C)]
148    pub union ClientMessageData {
149        pub b: [libc::c_char; 20],
150        pub s: [libc::c_short; 10],
151        pub l: [libc::c_long; 5],
152    }
153    #[derive(Copy, Clone)]
154    #[repr(C)]
155    pub struct XColormapEvent {
156        pub type_0: libc::c_int,
157        pub serial: libc::c_ulong,
158        pub send_event: libc::c_int,
159        pub display: *mut Display,
160        pub window: Window,
161        pub colormap: Colormap,
162        pub new: libc::c_int,
163        pub state: libc::c_int,
164    }
165    #[derive(Copy, Clone)]
166    #[repr(C)]
167    pub struct XSelectionEvent {
168        pub type_0: libc::c_int,
169        pub serial: libc::c_ulong,
170        pub send_event: libc::c_int,
171        pub display: *mut Display,
172        pub requestor: Window,
173        pub selection: Atom,
174        pub target: Atom,
175        pub property: Atom,
176        pub time: Time,
177    }
178    #[derive(Copy, Clone)]
179    #[repr(C)]
180    pub struct XSelectionRequestEvent {
181        pub type_0: libc::c_int,
182        pub serial: libc::c_ulong,
183        pub send_event: libc::c_int,
184        pub display: *mut Display,
185        pub owner: Window,
186        pub requestor: Window,
187        pub selection: Atom,
188        pub target: Atom,
189        pub property: Atom,
190        pub time: Time,
191    }
192    #[derive(Copy, Clone)]
193    #[repr(C)]
194    pub struct XSelectionClearEvent {
195        pub type_0: libc::c_int,
196        pub serial: libc::c_ulong,
197        pub send_event: libc::c_int,
198        pub display: *mut Display,
199        pub window: Window,
200        pub selection: Atom,
201        pub time: Time,
202    }
203    #[derive(Copy, Clone)]
204    #[repr(C)]
205    pub struct XPropertyEvent {
206        pub type_0: libc::c_int,
207        pub serial: libc::c_ulong,
208        pub send_event: libc::c_int,
209        pub display: *mut Display,
210        pub window: Window,
211        pub atom: Atom,
212        pub time: Time,
213        pub state: libc::c_int,
214    }
215    #[derive(Copy, Clone)]
216    #[repr(C)]
217    pub struct XCirculateRequestEvent {
218        pub type_0: libc::c_int,
219        pub serial: libc::c_ulong,
220        pub send_event: libc::c_int,
221        pub display: *mut Display,
222        pub parent: Window,
223        pub window: Window,
224        pub place: libc::c_int,
225    }
226    #[derive(Copy, Clone)]
227    #[repr(C)]
228    pub struct XCirculateEvent {
229        pub type_0: libc::c_int,
230        pub serial: libc::c_ulong,
231        pub send_event: libc::c_int,
232        pub display: *mut Display,
233        pub event: Window,
234        pub window: Window,
235        pub place: libc::c_int,
236    }
237    #[derive(Copy, Clone)]
238    #[repr(C)]
239    pub struct XConfigureRequestEvent {
240        pub type_0: libc::c_int,
241        pub serial: libc::c_ulong,
242        pub send_event: libc::c_int,
243        pub display: *mut Display,
244        pub parent: Window,
245        pub window: Window,
246        pub x: libc::c_int,
247        pub y: libc::c_int,
248        pub width: libc::c_int,
249        pub height: libc::c_int,
250        pub border_width: libc::c_int,
251        pub above: Window,
252        pub detail: libc::c_int,
253        pub value_mask: libc::c_ulong,
254    }
255    #[derive(Copy, Clone)]
256    #[repr(C)]
257    pub struct XResizeRequestEvent {
258        pub type_0: libc::c_int,
259        pub serial: libc::c_ulong,
260        pub send_event: libc::c_int,
261        pub display: *mut Display,
262        pub window: Window,
263        pub width: libc::c_int,
264        pub height: libc::c_int,
265    }
266    #[derive(Copy, Clone)]
267    #[repr(C)]
268    pub struct XGravityEvent {
269        pub type_0: libc::c_int,
270        pub serial: libc::c_ulong,
271        pub send_event: libc::c_int,
272        pub display: *mut Display,
273        pub event: Window,
274        pub window: Window,
275        pub x: libc::c_int,
276        pub y: libc::c_int,
277    }
278    #[derive(Copy, Clone)]
279    #[repr(C)]
280    pub struct XConfigureEvent {
281        pub type_0: libc::c_int,
282        pub serial: libc::c_ulong,
283        pub send_event: libc::c_int,
284        pub display: *mut Display,
285        pub event: Window,
286        pub window: Window,
287        pub x: libc::c_int,
288        pub y: libc::c_int,
289        pub width: libc::c_int,
290        pub height: libc::c_int,
291        pub border_width: libc::c_int,
292        pub above: Window,
293        pub override_redirect: libc::c_int,
294    }
295    #[derive(Copy, Clone)]
296    #[repr(C)]
297    pub struct XReparentEvent {
298        pub type_0: libc::c_int,
299        pub serial: libc::c_ulong,
300        pub send_event: libc::c_int,
301        pub display: *mut Display,
302        pub event: Window,
303        pub window: Window,
304        pub parent: Window,
305        pub x: libc::c_int,
306        pub y: libc::c_int,
307        pub override_redirect: libc::c_int,
308    }
309    #[derive(Copy, Clone)]
310    #[repr(C)]
311    pub struct XMapRequestEvent {
312        pub type_0: libc::c_int,
313        pub serial: libc::c_ulong,
314        pub send_event: libc::c_int,
315        pub display: *mut Display,
316        pub parent: Window,
317        pub window: Window,
318    }
319    #[derive(Copy, Clone)]
320    #[repr(C)]
321    pub struct XMapEvent {
322        pub type_0: libc::c_int,
323        pub serial: libc::c_ulong,
324        pub send_event: libc::c_int,
325        pub display: *mut Display,
326        pub event: Window,
327        pub window: Window,
328        pub override_redirect: libc::c_int,
329    }
330    #[derive(Copy, Clone)]
331    #[repr(C)]
332    pub struct XUnmapEvent {
333        pub type_0: libc::c_int,
334        pub serial: libc::c_ulong,
335        pub send_event: libc::c_int,
336        pub display: *mut Display,
337        pub event: Window,
338        pub window: Window,
339        pub from_configure: libc::c_int,
340    }
341    #[derive(Copy, Clone)]
342    #[repr(C)]
343    pub struct XDestroyWindowEvent {
344        pub type_0: libc::c_int,
345        pub serial: libc::c_ulong,
346        pub send_event: libc::c_int,
347        pub display: *mut Display,
348        pub event: Window,
349        pub window: Window,
350    }
351    #[derive(Copy, Clone)]
352    #[repr(C)]
353    pub struct XCreateWindowEvent {
354        pub type_0: libc::c_int,
355        pub serial: libc::c_ulong,
356        pub send_event: libc::c_int,
357        pub display: *mut Display,
358        pub parent: Window,
359        pub window: Window,
360        pub x: libc::c_int,
361        pub y: libc::c_int,
362        pub width: libc::c_int,
363        pub height: libc::c_int,
364        pub border_width: libc::c_int,
365        pub override_redirect: libc::c_int,
366    }
367    #[derive(Copy, Clone)]
368    #[repr(C)]
369    pub struct XVisibilityEvent {
370        pub type_0: libc::c_int,
371        pub serial: libc::c_ulong,
372        pub send_event: libc::c_int,
373        pub display: *mut Display,
374        pub window: Window,
375        pub state: libc::c_int,
376    }
377    #[derive(Copy, Clone)]
378    #[repr(C)]
379    pub struct XNoExposeEvent {
380        pub type_0: libc::c_int,
381        pub serial: libc::c_ulong,
382        pub send_event: libc::c_int,
383        pub display: *mut Display,
384        pub drawable: Drawable,
385        pub major_code: libc::c_int,
386        pub minor_code: libc::c_int,
387    }
388    #[derive(Copy, Clone)]
389    #[repr(C)]
390    pub struct XGraphicsExposeEvent {
391        pub type_0: libc::c_int,
392        pub serial: libc::c_ulong,
393        pub send_event: libc::c_int,
394        pub display: *mut Display,
395        pub drawable: Drawable,
396        pub x: libc::c_int,
397        pub y: libc::c_int,
398        pub width: libc::c_int,
399        pub height: libc::c_int,
400        pub count: libc::c_int,
401        pub major_code: libc::c_int,
402        pub minor_code: libc::c_int,
403    }
404    #[derive(Copy, Clone)]
405    #[repr(C)]
406    pub struct XExposeEvent {
407        pub type_0: libc::c_int,
408        pub serial: libc::c_ulong,
409        pub send_event: libc::c_int,
410        pub display: *mut Display,
411        pub window: Window,
412        pub x: libc::c_int,
413        pub y: libc::c_int,
414        pub width: libc::c_int,
415        pub height: libc::c_int,
416        pub count: libc::c_int,
417    }
418    #[derive(Copy, Clone)]
419    #[repr(C)]
420    pub struct XFocusChangeEvent {
421        pub type_0: libc::c_int,
422        pub serial: libc::c_ulong,
423        pub send_event: libc::c_int,
424        pub display: *mut Display,
425        pub window: Window,
426        pub mode: libc::c_int,
427        pub detail: libc::c_int,
428    }
429    #[derive(Copy, Clone)]
430    #[repr(C)]
431    pub struct XCrossingEvent {
432        pub type_0: libc::c_int,
433        pub serial: libc::c_ulong,
434        pub send_event: libc::c_int,
435        pub display: *mut Display,
436        pub window: Window,
437        pub root: Window,
438        pub subwindow: Window,
439        pub time: Time,
440        pub x: libc::c_int,
441        pub y: libc::c_int,
442        pub x_root: libc::c_int,
443        pub y_root: libc::c_int,
444        pub mode: libc::c_int,
445        pub detail: libc::c_int,
446        pub same_screen: libc::c_int,
447        pub focus: libc::c_int,
448        pub state: libc::c_uint,
449    }
450    #[derive(Copy, Clone)]
451    #[repr(C)]
452    pub struct XMotionEvent {
453        pub type_0: libc::c_int,
454        pub serial: libc::c_ulong,
455        pub send_event: libc::c_int,
456        pub display: *mut Display,
457        pub window: Window,
458        pub root: Window,
459        pub subwindow: Window,
460        pub time: Time,
461        pub x: libc::c_int,
462        pub y: libc::c_int,
463        pub x_root: libc::c_int,
464        pub y_root: libc::c_int,
465        pub state: libc::c_uint,
466        pub is_hint: libc::c_char,
467        pub same_screen: libc::c_int,
468    }
469    #[derive(Copy, Clone)]
470    #[repr(C)]
471    pub struct XButtonEvent {
472        pub type_0: libc::c_int,
473        pub serial: libc::c_ulong,
474        pub send_event: libc::c_int,
475        pub display: *mut Display,
476        pub window: Window,
477        pub root: Window,
478        pub subwindow: Window,
479        pub time: Time,
480        pub x: libc::c_int,
481        pub y: libc::c_int,
482        pub x_root: libc::c_int,
483        pub y_root: libc::c_int,
484        pub state: libc::c_uint,
485        pub button: libc::c_uint,
486        pub same_screen: libc::c_int,
487    }
488    #[derive(Copy, Clone)]
489    #[repr(C)]
490    pub struct XKeyEvent {
491        pub type_0: libc::c_int,
492        pub serial: libc::c_ulong,
493        pub send_event: libc::c_int,
494        pub display: *mut Display,
495        pub window: Window,
496        pub root: Window,
497        pub subwindow: Window,
498        pub time: Time,
499        pub x: libc::c_int,
500        pub y: libc::c_int,
501        pub x_root: libc::c_int,
502        pub y_root: libc::c_int,
503        pub state: libc::c_uint,
504        pub keycode: libc::c_uint,
505        pub same_screen: libc::c_int,
506    }
507    #[derive(Copy, Clone)]
508    #[repr(C)]
509    pub struct XAnyEvent {
510        pub type_0: libc::c_int,
511        pub serial: libc::c_ulong,
512        pub send_event: libc::c_int,
513        pub display: *mut Display,
514        pub window: Window,
515    }
516    pub type XPointer = *mut libc::c_char;
517    pub type XErrorHandler =
518        Option<unsafe extern "C" fn(_: *mut Display, _: *mut XErrorEvent) -> libc::c_int>;
519    #[derive(Copy, Clone)]
520    #[repr(C)]
521    pub struct XWindowAttributes {
522        pub x: libc::c_int,
523        pub y: libc::c_int,
524        pub width: libc::c_int,
525        pub height: libc::c_int,
526        pub border_width: libc::c_int,
527        pub depth: libc::c_int,
528        pub visual: *mut Visual,
529        pub root: Window,
530        pub class: libc::c_int,
531        pub bit_gravity: libc::c_int,
532        pub win_gravity: libc::c_int,
533        pub backing_store: libc::c_int,
534        pub backing_planes: libc::c_ulong,
535        pub backing_pixel: libc::c_ulong,
536        pub save_under: libc::c_int,
537        pub colormap: Colormap,
538        pub map_installed: libc::c_int,
539        pub map_state: libc::c_int,
540        pub all_event_masks: libc::c_long,
541        pub your_event_mask: libc::c_long,
542        pub do_not_propagate_mask: libc::c_long,
543        pub override_redirect: libc::c_int,
544        pub screen: *mut Screen,
545    }
546    #[derive(Copy, Clone)]
547    #[repr(C)]
548    pub struct Screen {
549        pub ext_data: *mut XExtData,
550        pub display: *mut _XDisplay,
551        pub root: Window,
552        pub width: libc::c_int,
553        pub height: libc::c_int,
554        pub mwidth: libc::c_int,
555        pub mheight: libc::c_int,
556        pub ndepths: libc::c_int,
557        pub depths: *mut Depth,
558        pub root_depth: libc::c_int,
559        pub root_visual: *mut Visual,
560        pub default_gc: GC,
561        pub cmap: Colormap,
562        pub white_pixel: libc::c_ulong,
563        pub black_pixel: libc::c_ulong,
564        pub max_maps: libc::c_int,
565        pub min_maps: libc::c_int,
566        pub backing_store: libc::c_int,
567        pub save_unders: libc::c_int,
568        pub root_input_mask: libc::c_long,
569    }
570    pub type GC = *mut _XGC;
571    #[derive(Copy, Clone)]
572    #[repr(C)]
573    pub struct Visual {
574        pub ext_data: *mut XExtData,
575        pub visualid: VisualID,
576        pub class: libc::c_int,
577        pub red_mask: libc::c_ulong,
578        pub green_mask: libc::c_ulong,
579        pub blue_mask: libc::c_ulong,
580        pub bits_per_rgb: libc::c_int,
581        pub map_entries: libc::c_int,
582    }
583    pub type XExtData = _XExtData;
584    #[derive(Copy, Clone)]
585    #[repr(C)]
586    pub struct _XExtData {
587        pub number: libc::c_int,
588        pub next: *mut _XExtData,
589        pub free_private: Option<unsafe extern "C" fn(_: *mut _XExtData) -> libc::c_int>,
590        pub private_data: XPointer,
591    }
592    #[derive(Copy, Clone)]
593    #[repr(C)]
594    pub struct Depth {
595        pub depth: libc::c_int,
596        pub nvisuals: libc::c_int,
597        pub visuals: *mut Visual,
598    }
599    #[derive(Copy, Clone)]
600    #[repr(C)]
601    pub struct XSetWindowAttributes {
602        pub background_pixmap: Pixmap,
603        pub background_pixel: libc::c_ulong,
604        pub border_pixmap: Pixmap,
605        pub border_pixel: libc::c_ulong,
606        pub bit_gravity: libc::c_int,
607        pub win_gravity: libc::c_int,
608        pub backing_store: libc::c_int,
609        pub backing_planes: libc::c_ulong,
610        pub backing_pixel: libc::c_ulong,
611        pub save_under: libc::c_int,
612        pub event_mask: libc::c_long,
613        pub do_not_propagate_mask: libc::c_long,
614        pub override_redirect: libc::c_int,
615        pub colormap: Colormap,
616        pub cursor: Cursor,
617    }
618    pub type _XPrivDisplay = *mut C2RustUnnamed_3;
619    #[derive(Copy, Clone)]
620    #[repr(C)]
621    pub struct C2RustUnnamed_3 {
622        pub ext_data: *mut XExtData,
623        pub private1: *mut _XPrivate,
624        pub fd: libc::c_int,
625        pub private2: libc::c_int,
626        pub proto_major_version: libc::c_int,
627        pub proto_minor_version: libc::c_int,
628        pub vendor: *mut libc::c_char,
629        pub private3: XID,
630        pub private4: XID,
631        pub private5: XID,
632        pub private6: libc::c_int,
633        pub resource_alloc: Option<unsafe extern "C" fn(_: *mut _XDisplay) -> XID>,
634        pub byte_order: libc::c_int,
635        pub bitmap_unit: libc::c_int,
636        pub bitmap_pad: libc::c_int,
637        pub bitmap_bit_order: libc::c_int,
638        pub nformats: libc::c_int,
639        pub pixmap_format: *mut ScreenFormat,
640        pub private8: libc::c_int,
641        pub release: libc::c_int,
642        pub private9: *mut _XPrivate,
643        pub private10: *mut _XPrivate,
644        pub qlen: libc::c_int,
645        pub last_request_read: libc::c_ulong,
646        pub request: libc::c_ulong,
647        pub private11: XPointer,
648        pub private12: XPointer,
649        pub private13: XPointer,
650        pub private14: XPointer,
651        pub max_request_size: libc::c_uint,
652        pub db: *mut _XrmHashBucketRec,
653        pub private15: Option<unsafe extern "C" fn(_: *mut _XDisplay) -> libc::c_int>,
654        pub display_name: *mut libc::c_char,
655        pub default_screen: libc::c_int,
656        pub nscreens: libc::c_int,
657        pub screens: *mut Screen,
658        pub motion_buffer: libc::c_ulong,
659        pub private16: libc::c_ulong,
660        pub min_keycode: libc::c_int,
661        pub max_keycode: libc::c_int,
662        pub private17: XPointer,
663        pub private18: XPointer,
664        pub private19: libc::c_int,
665        pub xdefaults: *mut libc::c_char,
666    }
667    #[derive(Copy, Clone)]
668    #[repr(C)]
669    pub struct ScreenFormat {
670        pub ext_data: *mut XExtData,
671        pub depth: libc::c_int,
672        pub bits_per_pixel: libc::c_int,
673        pub scanline_pad: libc::c_int,
674    }
675
676    use super::X_h::{
677        Atom, Colormap, Cursor, Drawable, KeyCode, KeySym, Pixmap, Time, VisualID, Window, XID,
678    };
679    pub type _XDisplay = ();
680    pub type _XGC = ();
681    pub type _XrmHashBucketRec = ();
682    pub type _XPrivate = ();
683
684    extern "C" {
685        pub fn XInitThreads() -> libc::c_int;
686        pub fn XrmInitialize();
687        pub fn XOpenDisplay(_: *const libc::c_char) -> *mut Display;
688        pub fn XResourceManagerString(_: *mut Display) -> *mut libc::c_char;
689        pub fn XInternAtom(_: *mut Display, _: *const libc::c_char, _: libc::c_int) -> Atom;
690        pub fn XCreateColormap(
691            _: *mut Display,
692            _: Window,
693            _: *mut Visual,
694            _: libc::c_int,
695        ) -> Colormap;
696        pub fn XCreateWindow(
697            _: *mut Display,
698            _: Window,
699            _: libc::c_int,
700            _: libc::c_int,
701            _: libc::c_uint,
702            _: libc::c_uint,
703            _: libc::c_uint,
704            _: libc::c_int,
705            _: libc::c_uint,
706            _: *mut Visual,
707            _: libc::c_ulong,
708            _: *mut XSetWindowAttributes,
709        ) -> Window;
710        pub fn XSetWMProtocols(
711            _: *mut Display,
712            _: Window,
713            _: *mut Atom,
714            _: libc::c_int,
715        ) -> libc::c_int;
716        pub fn XChangeProperty(
717            _: *mut Display,
718            _: Window,
719            _: Atom,
720            _: Atom,
721            _: libc::c_int,
722            _: libc::c_int,
723            _: *const libc::c_uchar,
724            _: libc::c_int,
725        ) -> libc::c_int;
726        pub fn XSync(_: *mut Display, _: libc::c_int) -> libc::c_int;
727        pub fn XSetErrorHandler(_: XErrorHandler) -> XErrorHandler;
728        pub fn XGetWindowAttributes(
729            _: *mut Display,
730            _: Window,
731            _: *mut XWindowAttributes,
732        ) -> libc::c_int;
733        pub fn XMapWindow(_: *mut Display, _: Window) -> libc::c_int;
734        pub fn XLowerWindow(_: *mut Display, _: Window) -> libc::c_int;
735        pub fn XRaiseWindow(_: *mut Display, _: Window) -> libc::c_int;
736        pub fn XPending(_: *mut Display) -> libc::c_int;
737        pub fn XNextEvent(_: *mut Display, _: *mut XEvent) -> libc::c_int;
738        pub fn XGetKeyboardMapping(
739            _: *mut Display,
740            _: KeyCode,
741            _: libc::c_int,
742            _: *mut libc::c_int,
743        ) -> *mut KeySym;
744        pub fn XGetWindowProperty(
745            _: *mut Display,
746            _: Window,
747            _: Atom,
748            _: libc::c_long,
749            _: libc::c_long,
750            _: libc::c_int,
751            _: Atom,
752            _: *mut Atom,
753            _: *mut libc::c_int,
754            _: *mut libc::c_ulong,
755            _: *mut libc::c_ulong,
756            _: *mut *mut libc::c_uchar,
757        ) -> libc::c_int;
758        pub fn XFree(_: *mut libc::c_void) -> libc::c_int;
759        pub fn XUnmapWindow(_: *mut Display, _: Window) -> libc::c_int;
760        pub fn XDestroyWindow(_: *mut Display, _: Window) -> libc::c_int;
761        pub fn XFreeColormap(_: *mut Display, _: Colormap) -> libc::c_int;
762        pub fn XFlush(_: *mut Display) -> libc::c_int;
763        pub fn XCloseDisplay(_: *mut Display) -> libc::c_int;
764        pub fn XGrabPointer(
765            _: *mut Display,
766            _: Window,
767            _: libc::c_int,
768            _: libc::c_uint,
769            _: libc::c_int,
770            _: libc::c_int,
771            _: Window,
772            _: Cursor,
773            _: Time,
774        ) -> libc::c_int;
775        pub fn XUngrabPointer(_: *mut Display, _: Time) -> libc::c_int;
776
777    }
778}
779pub mod X_h {
780    pub type Colormap = XID;
781    pub type XID = libc::c_ulong;
782    pub type Window = XID;
783    pub type Atom = libc::c_ulong;
784    pub type Time = libc::c_ulong;
785    pub type Drawable = XID;
786    pub type Pixmap = XID;
787    pub type KeySym = XID;
788    pub type KeyCode = libc::c_uchar;
789    pub type VisualID = libc::c_ulong;
790    pub type Cursor = XID;
791    pub const AllocNone: libc::c_int = 0 as libc::c_int;
792    pub const StructureNotifyMask: libc::c_long = (1 as libc::c_long) << 17 as libc::c_int;
793    pub const KeyPressMask: libc::c_long = (1 as libc::c_long) << 0 as libc::c_int;
794    pub const KeyReleaseMask: libc::c_long = (1 as libc::c_long) << 1 as libc::c_int;
795    pub const PointerMotionMask: libc::c_long = (1 as libc::c_long) << 6 as libc::c_int;
796    pub const PointerMotionHintMask: libc::c_long = (1 as libc::c_long) << 7 as libc::c_int;
797    pub const Button1MotionMask: libc::c_long = (1 as libc::c_long) << 8 as libc::c_int;
798    pub const Button2MotionMask: libc::c_long = (1 as libc::c_long) << 9 as libc::c_int;
799    pub const Button3MotionMask: libc::c_long = (1 as libc::c_long) << 10 as libc::c_int;
800    pub const Button4MotionMask: libc::c_long = (1 as libc::c_long) << 11 as libc::c_int;
801    pub const Button5MotionMask: libc::c_long = (1 as libc::c_long) << 12 as libc::c_int;
802    pub const ButtonMotionMask: libc::c_long = (1 as libc::c_long) << 13 as libc::c_int;
803    pub const KeymapStateMask: libc::c_long = (1 as libc::c_long) << 14 as libc::c_int;
804
805    pub const GrabModeAsync: libc::c_int = 1 as libc::c_int;
806
807    pub const ButtonPressMask: libc::c_long = (1 as libc::c_long) << 2 as libc::c_int;
808    pub const ButtonReleaseMask: libc::c_long = (1 as libc::c_long) << 3 as libc::c_int;
809    pub const ExposureMask: libc::c_long = (1 as libc::c_long) << 15 as libc::c_int;
810    pub const FocusChangeMask: libc::c_long = (1 as libc::c_long) << 21 as libc::c_int;
811    pub const VisibilityChangeMask: libc::c_long = (1 as libc::c_long) << 16 as libc::c_int;
812    pub const EnterWindowMask: libc::c_long = (1 as libc::c_long) << 4 as libc::c_int;
813    pub const LeaveWindowMask: libc::c_long = (1 as libc::c_long) << 5 as libc::c_int;
814    pub const PropertyChangeMask: libc::c_long = (1 as libc::c_long) << 22 as libc::c_int;
815    pub const InputOutput: libc::c_int = 1 as libc::c_int;
816    pub const CWBorderPixel: libc::c_long = (1 as libc::c_long) << 3 as libc::c_int;
817    pub const CWColormap: libc::c_long = (1 as libc::c_long) << 13 as libc::c_int;
818    pub const CWEventMask: libc::c_long = (1 as libc::c_long) << 11 as libc::c_int;
819    pub const StaticGravity: libc::c_int = 10 as libc::c_int;
820    pub const PropModeReplace: libc::c_int = 0 as libc::c_int;
821    pub const Success: libc::c_int = 0 as libc::c_int;
822    pub const IsViewable: libc::c_int = 2 as libc::c_int;
823    pub const ShiftMask: libc::c_int = (1 as libc::c_int) << 0 as libc::c_int;
824    pub const ControlMask: libc::c_int = (1 as libc::c_int) << 2 as libc::c_int;
825    pub const Mod1Mask: libc::c_int = (1 as libc::c_int) << 3 as libc::c_int;
826    pub const Mod4Mask: libc::c_int = (1 as libc::c_int) << 6 as libc::c_int;
827    pub const PropertyNewValue: libc::c_int = 0 as libc::c_int;
828}
829pub mod Xmd_h {
830    pub type CARD32 = libc::c_uint;
831}
832pub mod Xutil_h {
833    pub type XComposeStatus = _XComposeStatus;
834    #[derive(Copy, Clone)]
835    #[repr(C)]
836    pub struct _XComposeStatus {
837        pub compose_ptr: XPointer,
838        pub chars_matched: libc::c_int,
839    }
840    #[derive(Copy, Clone)]
841    #[repr(C)]
842    pub struct XClassHint {
843        pub res_name: *mut libc::c_char,
844        pub res_class: *mut libc::c_char,
845    }
846    #[derive(Copy, Clone)]
847    #[repr(C)]
848    pub struct XWMHints {
849        pub flags: libc::c_long,
850        pub input: libc::c_int,
851        pub initial_state: libc::c_int,
852        pub icon_pixmap: Pixmap,
853        pub icon_window: Window,
854        pub icon_x: libc::c_int,
855        pub icon_y: libc::c_int,
856        pub icon_mask: Pixmap,
857        pub window_group: XID,
858    }
859    #[derive(Copy, Clone)]
860    #[repr(C)]
861    pub struct XSizeHints {
862        pub flags: libc::c_long,
863        pub x: libc::c_int,
864        pub y: libc::c_int,
865        pub width: libc::c_int,
866        pub height: libc::c_int,
867        pub min_width: libc::c_int,
868        pub min_height: libc::c_int,
869        pub max_width: libc::c_int,
870        pub max_height: libc::c_int,
871        pub width_inc: libc::c_int,
872        pub height_inc: libc::c_int,
873        pub min_aspect: C2RustUnnamed_2,
874        pub max_aspect: C2RustUnnamed_2,
875        pub base_width: libc::c_int,
876        pub base_height: libc::c_int,
877        pub win_gravity: libc::c_int,
878    }
879    #[derive(Copy, Clone)]
880    #[repr(C)]
881    pub struct C2RustUnnamed_2 {
882        pub x: libc::c_int,
883        pub y: libc::c_int,
884    }
885    #[derive(Copy, Clone)]
886    #[repr(C)]
887    pub struct XVisualInfo {
888        pub visual: *mut Visual,
889        pub visualid: VisualID,
890        pub screen: libc::c_int,
891        pub depth: libc::c_int,
892        pub class: libc::c_int,
893        pub red_mask: libc::c_ulong,
894        pub green_mask: libc::c_ulong,
895        pub blue_mask: libc::c_ulong,
896        pub colormap_size: libc::c_int,
897        pub bits_per_rgb: libc::c_int,
898    }
899    pub const PMinSize: libc::c_long = (1 as libc::c_long) << 4 as libc::c_int;
900    pub const PMaxSize: libc::c_long = (1 as libc::c_long) << 5 as libc::c_int;
901    pub const PWinGravity: libc::c_long = (1 as libc::c_long) << 9 as libc::c_int;
902    pub const IconicState: libc::c_int = 3 as libc::c_int;
903    pub const WithdrawnState: libc::c_int = 0 as libc::c_int;
904    pub const NormalState: libc::c_int = 1 as libc::c_int;
905    use super::X_h::{KeySym, Pixmap, VisualID, Window, XID};
906    use super::Xlib_h::{Display, Visual, XKeyEvent, XPointer};
907    extern "C" {
908        pub fn XSetWMNormalHints(_: *mut Display, _: Window, _: *mut XSizeHints);
909        pub fn XAllocSizeHints() -> *mut XSizeHints;
910        pub fn Xutf8SetWMProperties(
911            _: *mut Display,
912            _: Window,
913            _: *const libc::c_char,
914            _: *const libc::c_char,
915            _: *mut *mut libc::c_char,
916            _: libc::c_int,
917            _: *mut XSizeHints,
918            _: *mut XWMHints,
919            _: *mut XClassHint,
920        );
921        pub fn XLookupString(
922            _: *mut XKeyEvent,
923            _: *mut libc::c_char,
924            _: libc::c_int,
925            _: *mut KeySym,
926            _: *mut XComposeStatus,
927        ) -> libc::c_int;
928    }
929}
930pub mod Xresource_h {
931    pub type XrmDatabase = *mut _XrmHashBucketRec;
932    #[derive(Copy, Clone)]
933    #[repr(C)]
934    pub struct XrmValue {
935        pub size: libc::c_uint,
936        pub addr: XPointer,
937    }
938    use super::Xlib_h::{XPointer, _XrmHashBucketRec};
939    extern "C" {
940        pub fn XrmGetResource(
941            _: XrmDatabase,
942            _: *const libc::c_char,
943            _: *const libc::c_char,
944            _: *mut *mut libc::c_char,
945            _: *mut XrmValue,
946        ) -> libc::c_int;
947        pub fn XrmDestroyDatabase(_: XrmDatabase);
948        pub fn XrmGetStringDatabase(_: *const libc::c_char) -> XrmDatabase;
949    }
950}
951pub mod XKBlib_h {
952    use super::Xlib_h::Display;
953    extern "C" {
954        pub fn XkbSetDetectableAutoRepeat(
955            _: *mut Display,
956            _: libc::c_int,
957            _: *mut libc::c_int,
958        ) -> libc::c_int;
959    }
960}
961pub mod stdlib_h {
962    extern "C" {
963        pub fn atof(__nptr: *const libc::c_char) -> libc::c_double;
964
965    }
966}
967pub mod dlfcn_h {
968    extern "C" {
969        pub fn dlopen(__file: *const libc::c_char, __mode: libc::c_int) -> *mut libc::c_void;
970        pub fn dlsym(__handle: *mut libc::c_void, __name: *const libc::c_char)
971            -> *mut libc::c_void;
972    }
973}
974pub mod bits_dlfcn_h {
975    pub const RTLD_LAZY: libc::c_int = 0x1 as libc::c_int;
976    pub const RTLD_GLOBAL: libc::c_int = 0x100 as libc::c_int;
977}
978pub mod string_h {
979    extern "C" {
980        pub fn strstr(_: *const libc::c_char, _: *const libc::c_char) -> *mut libc::c_char;
981        pub fn strlen(_: *const libc::c_char) -> libc::c_ulong;
982        pub fn strcmp(_: *const libc::c_char, _: *const libc::c_char) -> libc::c_int;
983        pub fn memset(_: *mut libc::c_void, _: libc::c_int, _: libc::c_ulong) -> *mut libc::c_void;
984    }
985}
986
987extern "C" {
988    pub fn XSendEvent(
989        _: *mut Display,
990        _: Window,
991        _: libc::c_int,
992        _: libc::c_long,
993        _: *mut XEvent,
994    ) -> libc::c_int;
995
996    pub fn XConvertSelection(
997        _: *mut Display,
998        _: Atom,
999        _: Atom,
1000        _: Atom,
1001        _: Window,
1002        _: Time,
1003    ) -> libc::c_int;
1004
1005    pub fn XSetSelectionOwner(
1006        _: *mut Display,
1007        _: Atom,
1008        _: Window,
1009        _: Time
1010    ) -> libc::c_int;
1011}