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 libc::FILE; |
6 | use std::os::raw::{c_char, c_int, c_uchar, c_uint, c_ulong, c_void}; |
7 | |
8 | use super::xlib::{ |
9 | Display, Screen, XColor, XComposeStatus, XErrorEvent, XEvent, XKeyEvent, XSizeHints, |
10 | XStandardColormap, XVisualInfo, XrmValue, GC, |
11 | }; |
12 | use super::xt::{Widget, XtAppContext}; |
13 | |
14 | // |
15 | // functions |
16 | // |
17 | |
18 | x11_link! { Xmu, xmu, ["libXmu.so.6" , "libXmu.so" ], 132, |
19 | pub fn XmuAddCloseDisplayHook (_3: *mut Display, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char) -> c_int>, _1: *mut c_char) -> *mut c_char, |
20 | pub fn XmuAddInitializer (_2: Option<unsafe extern "C" fn (XtAppContext, *mut c_char)>, _1: *mut c_char) -> (), |
21 | pub fn XmuAllStandardColormaps (_1: *mut Display) -> c_int, |
22 | pub fn XmuAppendSegment (_2: *mut XmuSegment, _1: *mut XmuSegment) -> c_int, |
23 | pub fn XmuAreaAnd (_2: *mut XmuArea, _1: *mut XmuArea) -> *mut XmuArea, |
24 | pub fn XmuAreaCopy (_2: *mut XmuArea, _1: *mut XmuArea) -> *mut XmuArea, |
25 | pub fn XmuAreaDup (_1: *mut XmuArea) -> *mut XmuArea, |
26 | pub fn XmuAreaNot (_5: *mut XmuArea, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> *mut XmuArea, |
27 | pub fn XmuAreaOrXor (_3: *mut XmuArea, _2: *mut XmuArea, _1: c_int) -> *mut XmuArea, |
28 | pub fn XmuCallInitializers (_1: XtAppContext) -> (), |
29 | pub fn XmuClientWindow (_2: *mut Display, _1: c_ulong) -> c_ulong, |
30 | pub fn XmuCompareISOLatin1 (_2: *const c_char, _1: *const c_char) -> c_int, |
31 | pub fn XmuConvertStandardSelection (_8: Widget, _7: c_ulong, _6: *mut c_ulong, _5: *mut c_ulong, _4: *mut c_ulong, _3: *mut *mut c_char, _2: *mut c_ulong, _1: *mut c_int) -> c_char, |
32 | pub fn XmuCopyISOLatin1Lowered (_2: *mut c_char, _1: *const c_char) -> (), |
33 | pub fn XmuCopyISOLatin1Uppered (_2: *mut c_char, _1: *const c_char) -> (), |
34 | pub fn XmuCreateColormap (_2: *mut Display, _1: *mut XStandardColormap) -> c_int, |
35 | pub fn XmuCreatePixmapFromBitmap (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_ulong, |
36 | pub fn XmuCreateStippledPixmap (_4: *mut Screen, _3: c_ulong, _2: c_ulong, _1: c_uint) -> c_ulong, |
37 | pub fn XmuCursorNameToIndex (_1: *const c_char) -> c_int, |
38 | pub fn XmuCvtBackingStoreToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
39 | pub fn XmuCvtFunctionToCallback (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
40 | pub fn XmuCvtGravityToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
41 | pub fn XmuCvtJustifyToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
42 | pub fn XmuCvtLongToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
43 | pub fn XmuCvtOrientationToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
44 | pub fn XmuCvtShapeStyleToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
45 | pub fn XmuCvtStringToBackingStore (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
46 | pub fn XmuCvtStringToBitmap (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
47 | pub fn XmuCvtStringToColorCursor (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
48 | pub fn XmuCvtStringToCursor (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
49 | pub fn XmuCvtStringToGravity (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
50 | pub fn XmuCvtStringToJustify (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
51 | pub fn XmuCvtStringToLong (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
52 | pub fn XmuCvtStringToOrientation (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
53 | pub fn XmuCvtStringToShapeStyle (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
54 | pub fn XmuCvtStringToWidget (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), |
55 | pub fn XmuCvtWidgetToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
56 | pub fn XmuDeleteStandardColormap (_3: *mut Display, _2: c_int, _1: c_ulong) -> (), |
57 | pub fn XmuDestroyScanlineList (_1: *mut XmuScanline) -> (), |
58 | pub fn XmuDestroySegmentList (_1: *mut XmuSegment) -> (), |
59 | pub fn XmuDistinguishableColors (_2: *mut XColor, _1: c_int) -> c_int, |
60 | pub fn XmuDistinguishablePixels (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, |
61 | pub fn XmuDQAddDisplay (_3: *mut XmuDisplayQueue, _2: *mut Display, _1: *mut c_char) -> *mut XmuDisplayQueueEntry, |
62 | pub fn XmuDQCreate (_3: Option<unsafe extern "C" fn (*mut XmuDisplayQueue, *mut XmuDisplayQueueEntry) -> c_int>, _2: Option<unsafe extern "C" fn (*mut XmuDisplayQueue) -> c_int>, _1: *mut c_char) -> *mut XmuDisplayQueue, |
63 | pub fn XmuDQDestroy (_2: *mut XmuDisplayQueue, _1: c_int) -> c_int, |
64 | pub fn XmuDQLookupDisplay (_2: *mut XmuDisplayQueue, _1: *mut Display) -> *mut XmuDisplayQueueEntry, |
65 | pub fn XmuDQRemoveDisplay (_2: *mut XmuDisplayQueue, _1: *mut Display) -> c_int, |
66 | pub fn XmuDrawLogo (_8: *mut Display, _7: c_ulong, _6: GC, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (), |
67 | pub fn XmuDrawRoundedRectangle (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> (), |
68 | pub fn XmuFillRoundedRectangle (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> (), |
69 | pub fn XmuGetAtomName (_2: *mut Display, _1: c_ulong) -> *mut c_char, |
70 | pub fn XmuGetColormapAllocation (_5: *mut XVisualInfo, _4: c_ulong, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> c_int, |
71 | pub fn XmuGetHostname (_2: *mut c_char, _1: c_int) -> c_int, |
72 | pub fn XmuInternAtom (_2: *mut Display, _1: AtomPtr) -> c_ulong, |
73 | pub fn XmuInternStrings (_4: *mut Display, _3: *mut *mut c_char, _2: c_uint, _1: *mut c_ulong) -> (), |
74 | pub fn XmuLocateBitmapFile (_8: *mut Screen, _7: *const c_char, _6: *mut c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_ulong, |
75 | pub fn XmuLocatePixmapFile (_11: *mut Screen, _10: *const c_char, _9: c_ulong, _8: c_ulong, _7: c_uint, _6: *mut c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_ulong, |
76 | pub fn XmuLookupAPL (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
77 | pub fn XmuLookupArabic (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
78 | pub fn XmuLookupCloseDisplayHook (_4: *mut Display, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int, |
79 | pub fn XmuLookupCyrillic (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
80 | pub fn XmuLookupGreek (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
81 | pub fn XmuLookupHebrew (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
82 | pub fn XmuLookupJISX0201 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
83 | pub fn XmuLookupKana (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
84 | pub fn XmuLookupLatin1 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
85 | pub fn XmuLookupLatin2 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
86 | pub fn XmuLookupLatin3 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
87 | pub fn XmuLookupLatin4 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, |
88 | pub fn XmuLookupStandardColormap (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_uint, _3: c_ulong, _2: c_int, _1: c_int) -> c_int, |
89 | pub fn XmuLookupString (_6: *mut XKeyEvent, _5: *mut c_uchar, _4: c_int, _3: *mut c_ulong, _2: *mut XComposeStatus, _1: c_ulong) -> c_int, |
90 | pub fn XmuMakeAtom (_1: *const c_char) -> AtomPtr, |
91 | pub fn XmuNameOfAtom (_1: AtomPtr) -> *mut c_char, |
92 | pub fn XmuNCopyISOLatin1Lowered (_3: *mut c_char, _2: *const c_char, _1: c_int) -> (), |
93 | pub fn XmuNCopyISOLatin1Uppered (_3: *mut c_char, _2: *const c_char, _1: c_int) -> (), |
94 | pub fn XmuNewArea (_4: c_int, _3: c_int, _2: c_int, _1: c_int) -> *mut XmuArea, |
95 | pub fn XmuNewCvtStringToWidget (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, |
96 | pub fn XmuNewScanline (_3: c_int, _2: c_int, _1: c_int) -> *mut XmuScanline, |
97 | pub fn XmuNewSegment (_2: c_int, _1: c_int) -> *mut XmuSegment, |
98 | pub fn XmuOptimizeArea (_1: *mut XmuArea) -> *mut XmuArea, |
99 | pub fn XmuOptimizeScanline (_1: *mut XmuScanline) -> *mut XmuScanline, |
100 | pub fn XmuPrintDefaultErrorMessage (_3: *mut Display, _2: *mut XErrorEvent, _1: *mut FILE) -> c_int, |
101 | pub fn XmuReadBitmapData (_6: *mut FILE, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int, |
102 | pub fn XmuReadBitmapDataFromFile (_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, |
103 | pub fn XmuRegisterExternalAgent (_4: Widget, _3: *mut c_void, _2: *mut XEvent, _1: *mut c_char) -> (), |
104 | pub fn XmuReleaseStippledPixmap (_2: *mut Screen, _1: c_ulong) -> (), |
105 | pub fn XmuRemoveCloseDisplayHook (_4: *mut Display, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int, |
106 | pub fn XmuReshapeWidget (_4: Widget, _3: c_int, _2: c_int, _1: c_int) -> c_char, |
107 | pub fn XmuScanlineAnd (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, |
108 | pub fn XmuScanlineAndSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline, |
109 | pub fn XmuScanlineCopy (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, |
110 | pub fn XmuScanlineEqu (_2: *mut XmuScanline, _1: *mut XmuScanline) -> c_int, |
111 | pub fn XmuScanlineNot (_3: *mut XmuScanline, _2: c_int, _1: c_int) -> *mut XmuScanline, |
112 | pub fn XmuScanlineOr (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, |
113 | pub fn XmuScanlineOrSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline, |
114 | pub fn XmuScanlineXor (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, |
115 | pub fn XmuScanlineXorSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline, |
116 | pub fn XmuScreenOfWindow (_2: *mut Display, _1: c_ulong) -> *mut Screen, |
117 | pub fn XmuSimpleErrorHandler (_2: *mut Display, _1: *mut XErrorEvent) -> c_int, |
118 | pub fn XmuStandardColormap (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_uint, _5: c_ulong, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> *mut XStandardColormap, |
119 | pub fn XmuUpdateMapHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, |
120 | pub fn XmuValidArea (_1: *mut XmuArea) -> c_int, |
121 | pub fn XmuValidScanline (_1: *mut XmuScanline) -> c_int, |
122 | pub fn XmuVisualStandardColormaps (_6: *mut Display, _5: c_int, _4: c_ulong, _3: c_uint, _2: c_int, _1: c_int) -> c_int, |
123 | pub fn XmuWnCountOwnedResources (_3: *mut XmuWidgetNode, _2: *mut XmuWidgetNode, _1: c_int) -> c_int, |
124 | pub fn XmuWnFetchResources (_3: *mut XmuWidgetNode, _2: Widget, _1: *mut XmuWidgetNode) -> (), |
125 | pub fn XmuWnInitializeNodes (_2: *mut XmuWidgetNode, _1: c_int) -> (), |
126 | pub fn XmuWnNameToNode (_3: *mut XmuWidgetNode, _2: c_int, _1: *const c_char) -> *mut XmuWidgetNode, |
127 | variadic: |
128 | pub fn XmuSnprintf (_3: *mut c_char, _2: c_int, _1: *const c_char) -> c_int, |
129 | globals: |
130 | pub static _XA_ATOM_PAIR: AtomPtr, |
131 | pub static _XA_CHARACTER_POSITION: AtomPtr, |
132 | pub static _XA_CLASS: AtomPtr, |
133 | pub static _XA_CLIENT_WINDOW: AtomPtr, |
134 | pub static _XA_CLIPBOARD: AtomPtr, |
135 | pub static _XA_COMPOUND_TEXT: AtomPtr, |
136 | pub static _XA_DECNET_ADDRESS: AtomPtr, |
137 | pub static _XA_DELETE: AtomPtr, |
138 | pub static _XA_FILENAME: AtomPtr, |
139 | pub static _XA_HOSTNAME: AtomPtr, |
140 | pub static _XA_IP_ADDRESS: AtomPtr, |
141 | pub static _XA_LENGTH: AtomPtr, |
142 | pub static _XA_LIST_LENGTH: AtomPtr, |
143 | pub static _XA_NAME: AtomPtr, |
144 | pub static _XA_NET_ADDRESS: AtomPtr, |
145 | pub static _XA_NULL: AtomPtr, |
146 | pub static _XA_OWNER_OS: AtomPtr, |
147 | pub static _XA_SPAN: AtomPtr, |
148 | pub static _XA_TARGETS: AtomPtr, |
149 | pub static _XA_TEXT: AtomPtr, |
150 | pub static _XA_TIMESTAMP: AtomPtr, |
151 | pub static _XA_USER: AtomPtr, |
152 | pub static _XA_UTF8_STRING: AtomPtr, |
153 | } |
154 | |
155 | // |
156 | // types |
157 | // |
158 | |
159 | // TODO structs |
160 | #[repr (C)] |
161 | pub struct _AtomRec; |
162 | #[repr (C)] |
163 | pub struct _XmuArea; |
164 | #[repr (C)] |
165 | pub struct _XmuDisplayQueue; |
166 | #[repr (C)] |
167 | pub struct _XmuDisplayQueueEntry; |
168 | #[repr (C)] |
169 | pub struct _XmuScanline; |
170 | #[repr (C)] |
171 | pub struct _XmuSegment; |
172 | #[repr (C)] |
173 | pub struct _XmuWidgetNode; |
174 | |
175 | // struct typedefs |
176 | pub type AtomPtr = *mut _AtomRec; |
177 | pub type XmuArea = _XmuArea; |
178 | pub type XmuDisplayQueue = _XmuDisplayQueue; |
179 | pub type XmuDisplayQueueEntry = _XmuDisplayQueueEntry; |
180 | pub type XmuScanline = _XmuScanline; |
181 | pub type XmuSegment = _XmuSegment; |
182 | pub type XmuWidgetNode = _XmuWidgetNode; |
183 | |