Fix GetCurrentDirectoryA and W to return the needed space for the CWD,
[wine/multimedia.git] / tsx11 / ts_xutil.c
blob3e7bdc19c63f4dd24d00e627c5ef5968e2c8bd55
1 /*
2 * Thread safe wrappers around Xutil calls.
3 * This file was generated automatically by tools/make_X11wrappers
4 * DO NOT EDIT!
5 */
7 #include "config.h"
9 #ifndef X_DISPLAY_MISSING
12 #include <X11/Xlib.h>
13 #include <X11/Xresource.h>
14 #include <X11/Xutil.h>
16 #include "debugtools.h"
17 #include "ts_xutil.h"
18 #include "x11drv.h"
20 DEFAULT_DEBUG_CHANNEL(x11)
22 XClassHint * TSXAllocClassHint(void)
24 XClassHint * r;
25 TRACE("Call XAllocClassHint\n");
26 EnterCriticalSection( &X11DRV_CritSection );
27 r = XAllocClassHint();
28 LeaveCriticalSection( &X11DRV_CritSection );
29 TRACE("Ret XAllocClassHint\n");
30 return r;
33 XSizeHints * TSXAllocSizeHints(void)
35 XSizeHints * r;
36 TRACE("Call XAllocSizeHints\n");
37 EnterCriticalSection( &X11DRV_CritSection );
38 r = XAllocSizeHints();
39 LeaveCriticalSection( &X11DRV_CritSection );
40 TRACE("Ret XAllocSizeHints\n");
41 return r;
44 XWMHints * TSXAllocWMHints(void)
46 XWMHints * r;
47 TRACE("Call XAllocWMHints\n");
48 EnterCriticalSection( &X11DRV_CritSection );
49 r = XAllocWMHints();
50 LeaveCriticalSection( &X11DRV_CritSection );
51 TRACE("Ret XAllocWMHints\n");
52 return r;
55 int TSXClipBox(Region a0, XRectangle* a1)
57 int r;
58 TRACE("Call XClipBox\n");
59 EnterCriticalSection( &X11DRV_CritSection );
60 r = XClipBox(a0, a1);
61 LeaveCriticalSection( &X11DRV_CritSection );
62 TRACE("Ret XClipBox\n");
63 return r;
66 Region TSXCreateRegion(void)
68 Region r;
69 TRACE("Call XCreateRegion\n");
70 EnterCriticalSection( &X11DRV_CritSection );
71 r = XCreateRegion();
72 LeaveCriticalSection( &X11DRV_CritSection );
73 TRACE("Ret XCreateRegion\n");
74 return r;
77 int TSXDeleteContext(Display* a0, XID a1, XContext a2)
79 int r;
80 TRACE("Call XDeleteContext\n");
81 EnterCriticalSection( &X11DRV_CritSection );
82 r = XDeleteContext(a0, a1, a2);
83 LeaveCriticalSection( &X11DRV_CritSection );
84 TRACE("Ret XDeleteContext\n");
85 return r;
88 int TSXDestroyRegion(Region a0)
90 int r;
91 TRACE("Call XDestroyRegion\n");
92 EnterCriticalSection( &X11DRV_CritSection );
93 r = XDestroyRegion(a0);
94 LeaveCriticalSection( &X11DRV_CritSection );
95 TRACE("Ret XDestroyRegion\n");
96 return r;
99 int TSXEmptyRegion(Region a0)
101 int r;
102 TRACE("Call XEmptyRegion\n");
103 EnterCriticalSection( &X11DRV_CritSection );
104 r = XEmptyRegion(a0);
105 LeaveCriticalSection( &X11DRV_CritSection );
106 TRACE("Ret XEmptyRegion\n");
107 return r;
110 int TSXEqualRegion(Region a0, Region a1)
112 int r;
113 TRACE("Call XEqualRegion\n");
114 EnterCriticalSection( &X11DRV_CritSection );
115 r = XEqualRegion(a0, a1);
116 LeaveCriticalSection( &X11DRV_CritSection );
117 TRACE("Ret XEqualRegion\n");
118 return r;
121 int TSXFindContext(Display* a0, XID a1, XContext a2, XPointer* a3)
123 int r;
124 TRACE("Call XFindContext\n");
125 EnterCriticalSection( &X11DRV_CritSection );
126 r = XFindContext(a0, a1, a2, a3);
127 LeaveCriticalSection( &X11DRV_CritSection );
128 TRACE("Ret XFindContext\n");
129 return r;
132 XVisualInfo * TSXGetVisualInfo(Display* a0, long a1, XVisualInfo* a2, int* a3)
134 XVisualInfo * r;
135 TRACE("Call XGetVisualInfo\n");
136 EnterCriticalSection( &X11DRV_CritSection );
137 r = XGetVisualInfo(a0, a1, a2, a3);
138 LeaveCriticalSection( &X11DRV_CritSection );
139 TRACE("Ret XGetVisualInfo\n");
140 return r;
143 int TSXGetWMSizeHints(Display* a0, Window a1, XSizeHints* a2, long* a3, Atom a4)
145 int r;
146 TRACE("Call XGetWMSizeHints\n");
147 EnterCriticalSection( &X11DRV_CritSection );
148 r = XGetWMSizeHints(a0, a1, a2, a3, a4);
149 LeaveCriticalSection( &X11DRV_CritSection );
150 TRACE("Ret XGetWMSizeHints\n");
151 return r;
154 int TSXIntersectRegion(Region a0, Region a1, Region a2)
156 int r;
157 TRACE("Call XIntersectRegion\n");
158 EnterCriticalSection( &X11DRV_CritSection );
159 r = XIntersectRegion(a0, a1, a2);
160 LeaveCriticalSection( &X11DRV_CritSection );
161 TRACE("Ret XIntersectRegion\n");
162 return r;
165 int TSXLookupString(XKeyEvent* a0, char* a1, int a2, KeySym* a3, XComposeStatus* a4)
167 int r;
168 TRACE("Call XLookupString\n");
169 EnterCriticalSection( &X11DRV_CritSection );
170 r = XLookupString(a0, a1, a2, a3, a4);
171 LeaveCriticalSection( &X11DRV_CritSection );
172 TRACE("Ret XLookupString\n");
173 return r;
176 int TSXOffsetRegion(Region a0, int a1, int a2)
178 int r;
179 TRACE("Call XOffsetRegion\n");
180 EnterCriticalSection( &X11DRV_CritSection );
181 r = XOffsetRegion(a0, a1, a2);
182 LeaveCriticalSection( &X11DRV_CritSection );
183 TRACE("Ret XOffsetRegion\n");
184 return r;
187 int TSXPointInRegion(Region a0, int a1, int a2)
189 int r;
190 TRACE("Call XPointInRegion\n");
191 EnterCriticalSection( &X11DRV_CritSection );
192 r = XPointInRegion(a0, a1, a2);
193 LeaveCriticalSection( &X11DRV_CritSection );
194 TRACE("Ret XPointInRegion\n");
195 return r;
198 Region TSXPolygonRegion(XPoint* a0, int a1, int a2)
200 Region r;
201 TRACE("Call XPolygonRegion\n");
202 EnterCriticalSection( &X11DRV_CritSection );
203 r = XPolygonRegion(a0, a1, a2);
204 LeaveCriticalSection( &X11DRV_CritSection );
205 TRACE("Ret XPolygonRegion\n");
206 return r;
209 int TSXRectInRegion(Region a0, int a1, int a2, unsigned int a3, unsigned int a4)
211 int r;
212 TRACE("Call XRectInRegion\n");
213 EnterCriticalSection( &X11DRV_CritSection );
214 r = XRectInRegion(a0, a1, a2, a3, a4);
215 LeaveCriticalSection( &X11DRV_CritSection );
216 TRACE("Ret XRectInRegion\n");
217 return r;
220 int TSXSaveContext(Display* a0, XID a1, XContext a2, const char* a3)
222 int r;
223 TRACE("Call XSaveContext\n");
224 EnterCriticalSection( &X11DRV_CritSection );
225 r = XSaveContext(a0, a1, a2, a3);
226 LeaveCriticalSection( &X11DRV_CritSection );
227 TRACE("Ret XSaveContext\n");
228 return r;
231 int TSXSetClassHint(Display* a0, Window a1, XClassHint* a2)
233 int r;
234 TRACE("Call XSetClassHint\n");
235 EnterCriticalSection( &X11DRV_CritSection );
236 r = XSetClassHint(a0, a1, a2);
237 LeaveCriticalSection( &X11DRV_CritSection );
238 TRACE("Ret XSetClassHint\n");
239 return r;
242 int TSXSetWMHints(Display* a0, Window a1, XWMHints* a2)
244 int r;
245 TRACE("Call XSetWMHints\n");
246 EnterCriticalSection( &X11DRV_CritSection );
247 r = XSetWMHints(a0, a1, a2);
248 LeaveCriticalSection( &X11DRV_CritSection );
249 TRACE("Ret XSetWMHints\n");
250 return r;
253 void TSXSetWMProperties(Display* a0, Window a1, XTextProperty* a2, XTextProperty* a3, char** a4, int a5, XSizeHints* a6, XWMHints* a7, XClassHint* a8)
255 TRACE("Call XSetWMProperties\n");
256 EnterCriticalSection( &X11DRV_CritSection );
257 XSetWMProperties(a0, a1, a2, a3, a4, a5, a6, a7, a8);
258 LeaveCriticalSection( &X11DRV_CritSection );
259 TRACE("Ret XSetWMProperties\n");
262 void TSXSetWMSizeHints(Display* a0, Window a1, XSizeHints* a2, Atom a3)
264 TRACE("Call XSetWMSizeHints\n");
265 EnterCriticalSection( &X11DRV_CritSection );
266 XSetWMSizeHints(a0, a1, a2, a3);
267 LeaveCriticalSection( &X11DRV_CritSection );
268 TRACE("Ret XSetWMSizeHints\n");
271 int TSXSetRegion(Display* a0, GC a1, Region a2)
273 int r;
274 TRACE("Call XSetRegion\n");
275 EnterCriticalSection( &X11DRV_CritSection );
276 r = XSetRegion(a0, a1, a2);
277 LeaveCriticalSection( &X11DRV_CritSection );
278 TRACE("Ret XSetRegion\n");
279 return r;
282 int TSXShrinkRegion(Region a0, int a1, int a2)
284 int r;
285 TRACE("Call XShrinkRegion\n");
286 EnterCriticalSection( &X11DRV_CritSection );
287 r = XShrinkRegion(a0, a1, a2);
288 LeaveCriticalSection( &X11DRV_CritSection );
289 TRACE("Ret XShrinkRegion\n");
290 return r;
293 int TSXStringListToTextProperty(char** a0, int a1, XTextProperty* a2)
295 int r;
296 TRACE("Call XStringListToTextProperty\n");
297 EnterCriticalSection( &X11DRV_CritSection );
298 r = XStringListToTextProperty(a0, a1, a2);
299 LeaveCriticalSection( &X11DRV_CritSection );
300 TRACE("Ret XStringListToTextProperty\n");
301 return r;
304 int TSXSubtractRegion(Region a0, Region a1, Region a2)
306 int r;
307 TRACE("Call XSubtractRegion\n");
308 EnterCriticalSection( &X11DRV_CritSection );
309 r = XSubtractRegion(a0, a1, a2);
310 LeaveCriticalSection( &X11DRV_CritSection );
311 TRACE("Ret XSubtractRegion\n");
312 return r;
315 int TSXUnionRectWithRegion(XRectangle* a0, Region a1, Region a2)
317 int r;
318 TRACE("Call XUnionRectWithRegion\n");
319 EnterCriticalSection( &X11DRV_CritSection );
320 r = XUnionRectWithRegion(a0, a1, a2);
321 LeaveCriticalSection( &X11DRV_CritSection );
322 TRACE("Ret XUnionRectWithRegion\n");
323 return r;
326 int TSXUnionRegion(Region a0, Region a1, Region a2)
328 int r;
329 TRACE("Call XUnionRegion\n");
330 EnterCriticalSection( &X11DRV_CritSection );
331 r = XUnionRegion(a0, a1, a2);
332 LeaveCriticalSection( &X11DRV_CritSection );
333 TRACE("Ret XUnionRegion\n");
334 return r;
337 int TSXXorRegion(Region a0, Region a1, Region a2)
339 int r;
340 TRACE("Call XXorRegion\n");
341 EnterCriticalSection( &X11DRV_CritSection );
342 r = XXorRegion(a0, a1, a2);
343 LeaveCriticalSection( &X11DRV_CritSection );
344 TRACE("Ret XXorRegion\n");
345 return r;
348 int TSXDestroyImage(struct _XImage *a0)
350 int r;
351 TRACE("Call XDestroyImage\n");
352 EnterCriticalSection( &X11DRV_CritSection );
353 r = XDestroyImage(a0);
354 LeaveCriticalSection( &X11DRV_CritSection );
355 TRACE("Ret XDestroyImage\n");
356 return r;
359 struct _XImage * TSXSubImage(struct _XImage *a0, int a1, int a2, unsigned int a3, unsigned int a4)
361 struct _XImage * r;
362 TRACE("Call XSubImage\n");
363 EnterCriticalSection( &X11DRV_CritSection );
364 r = XSubImage(a0, a1, a2, a3, a4);
365 LeaveCriticalSection( &X11DRV_CritSection );
366 TRACE("Ret XSubImage\n");
367 return r;
370 int TSXAddPixel(struct _XImage *a0, long a1)
372 int r;
373 TRACE("Call XAddPixel\n");
374 EnterCriticalSection( &X11DRV_CritSection );
375 r = XAddPixel(a0, a1);
376 LeaveCriticalSection( &X11DRV_CritSection );
377 TRACE("Ret XAddPixel\n");
378 return r;
381 XContext TSXUniqueContext(void)
383 XContext r;
384 TRACE("Call XUniqueContext\n");
385 EnterCriticalSection( &X11DRV_CritSection );
386 r = XUniqueContext();
387 LeaveCriticalSection( &X11DRV_CritSection );
388 TRACE("Ret XUniqueContext\n");
389 return r;
393 #endif /* !defined(X_DISPLAY_MISSING) */