Added atfork support.
[wine/multimedia.git] / tsx11 / ts_xutil.c
blob638a6149c084f9888c58faa34e3f3b8d5dda593d
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"
10 #include <X11/Xlib.h>
11 #include <X11/Xresource.h>
12 #include <X11/Xutil.h>
14 #include "debugtools.h"
15 #include "ts_xutil.h"
16 #include "x11drv.h"
18 DEFAULT_DEBUG_CHANNEL(x11)
20 XClassHint * TSXAllocClassHint(void)
22 XClassHint * r;
23 TRACE("Call XAllocClassHint\n");
24 EnterCriticalSection( &X11DRV_CritSection );
25 r = XAllocClassHint();
26 LeaveCriticalSection( &X11DRV_CritSection );
27 TRACE("Ret XAllocClassHint\n");
28 return r;
31 XSizeHints * TSXAllocSizeHints(void)
33 XSizeHints * r;
34 TRACE("Call XAllocSizeHints\n");
35 EnterCriticalSection( &X11DRV_CritSection );
36 r = XAllocSizeHints();
37 LeaveCriticalSection( &X11DRV_CritSection );
38 TRACE("Ret XAllocSizeHints\n");
39 return r;
42 XWMHints * TSXAllocWMHints(void)
44 XWMHints * r;
45 TRACE("Call XAllocWMHints\n");
46 EnterCriticalSection( &X11DRV_CritSection );
47 r = XAllocWMHints();
48 LeaveCriticalSection( &X11DRV_CritSection );
49 TRACE("Ret XAllocWMHints\n");
50 return r;
53 int TSXClipBox(Region a0, XRectangle* a1)
55 int r;
56 TRACE("Call XClipBox\n");
57 EnterCriticalSection( &X11DRV_CritSection );
58 r = XClipBox(a0, a1);
59 LeaveCriticalSection( &X11DRV_CritSection );
60 TRACE("Ret XClipBox\n");
61 return r;
64 Region TSXCreateRegion(void)
66 Region r;
67 TRACE("Call XCreateRegion\n");
68 EnterCriticalSection( &X11DRV_CritSection );
69 r = XCreateRegion();
70 LeaveCriticalSection( &X11DRV_CritSection );
71 TRACE("Ret XCreateRegion\n");
72 return r;
75 int TSXDeleteContext(Display* a0, XID a1, XContext a2)
77 int r;
78 TRACE("Call XDeleteContext\n");
79 EnterCriticalSection( &X11DRV_CritSection );
80 r = XDeleteContext(a0, a1, a2);
81 LeaveCriticalSection( &X11DRV_CritSection );
82 TRACE("Ret XDeleteContext\n");
83 return r;
86 int TSXDestroyRegion(Region a0)
88 int r;
89 TRACE("Call XDestroyRegion\n");
90 EnterCriticalSection( &X11DRV_CritSection );
91 r = XDestroyRegion(a0);
92 LeaveCriticalSection( &X11DRV_CritSection );
93 TRACE("Ret XDestroyRegion\n");
94 return r;
97 int TSXEmptyRegion(Region a0)
99 int r;
100 TRACE("Call XEmptyRegion\n");
101 EnterCriticalSection( &X11DRV_CritSection );
102 r = XEmptyRegion(a0);
103 LeaveCriticalSection( &X11DRV_CritSection );
104 TRACE("Ret XEmptyRegion\n");
105 return r;
108 int TSXEqualRegion(Region a0, Region a1)
110 int r;
111 TRACE("Call XEqualRegion\n");
112 EnterCriticalSection( &X11DRV_CritSection );
113 r = XEqualRegion(a0, a1);
114 LeaveCriticalSection( &X11DRV_CritSection );
115 TRACE("Ret XEqualRegion\n");
116 return r;
119 int TSXFindContext(Display* a0, XID a1, XContext a2, XPointer* a3)
121 int r;
122 TRACE("Call XFindContext\n");
123 EnterCriticalSection( &X11DRV_CritSection );
124 r = XFindContext(a0, a1, a2, a3);
125 LeaveCriticalSection( &X11DRV_CritSection );
126 TRACE("Ret XFindContext\n");
127 return r;
130 XVisualInfo * TSXGetVisualInfo(Display* a0, long a1, XVisualInfo* a2, int* a3)
132 XVisualInfo * r;
133 TRACE("Call XGetVisualInfo\n");
134 EnterCriticalSection( &X11DRV_CritSection );
135 r = XGetVisualInfo(a0, a1, a2, a3);
136 LeaveCriticalSection( &X11DRV_CritSection );
137 TRACE("Ret XGetVisualInfo\n");
138 return r;
141 int TSXGetWMSizeHints(Display* a0, Window a1, XSizeHints* a2, long* a3, Atom a4)
143 int r;
144 TRACE("Call XGetWMSizeHints\n");
145 EnterCriticalSection( &X11DRV_CritSection );
146 r = XGetWMSizeHints(a0, a1, a2, a3, a4);
147 LeaveCriticalSection( &X11DRV_CritSection );
148 TRACE("Ret XGetWMSizeHints\n");
149 return r;
152 int TSXIntersectRegion(Region a0, Region a1, Region a2)
154 int r;
155 TRACE("Call XIntersectRegion\n");
156 EnterCriticalSection( &X11DRV_CritSection );
157 r = XIntersectRegion(a0, a1, a2);
158 LeaveCriticalSection( &X11DRV_CritSection );
159 TRACE("Ret XIntersectRegion\n");
160 return r;
163 int TSXLookupString(XKeyEvent* a0, char* a1, int a2, KeySym* a3, XComposeStatus* a4)
165 int r;
166 TRACE("Call XLookupString\n");
167 EnterCriticalSection( &X11DRV_CritSection );
168 r = XLookupString(a0, a1, a2, a3, a4);
169 LeaveCriticalSection( &X11DRV_CritSection );
170 TRACE("Ret XLookupString\n");
171 return r;
174 int TSXOffsetRegion(Region a0, int a1, int a2)
176 int r;
177 TRACE("Call XOffsetRegion\n");
178 EnterCriticalSection( &X11DRV_CritSection );
179 r = XOffsetRegion(a0, a1, a2);
180 LeaveCriticalSection( &X11DRV_CritSection );
181 TRACE("Ret XOffsetRegion\n");
182 return r;
185 int TSXPointInRegion(Region a0, int a1, int a2)
187 int r;
188 TRACE("Call XPointInRegion\n");
189 EnterCriticalSection( &X11DRV_CritSection );
190 r = XPointInRegion(a0, a1, a2);
191 LeaveCriticalSection( &X11DRV_CritSection );
192 TRACE("Ret XPointInRegion\n");
193 return r;
196 Region TSXPolygonRegion(XPoint* a0, int a1, int a2)
198 Region r;
199 TRACE("Call XPolygonRegion\n");
200 EnterCriticalSection( &X11DRV_CritSection );
201 r = XPolygonRegion(a0, a1, a2);
202 LeaveCriticalSection( &X11DRV_CritSection );
203 TRACE("Ret XPolygonRegion\n");
204 return r;
207 int TSXRectInRegion(Region a0, int a1, int a2, unsigned int a3, unsigned int a4)
209 int r;
210 TRACE("Call XRectInRegion\n");
211 EnterCriticalSection( &X11DRV_CritSection );
212 r = XRectInRegion(a0, a1, a2, a3, a4);
213 LeaveCriticalSection( &X11DRV_CritSection );
214 TRACE("Ret XRectInRegion\n");
215 return r;
218 int TSXSaveContext(Display* a0, XID a1, XContext a2, const char* a3)
220 int r;
221 TRACE("Call XSaveContext\n");
222 EnterCriticalSection( &X11DRV_CritSection );
223 r = XSaveContext(a0, a1, a2, a3);
224 LeaveCriticalSection( &X11DRV_CritSection );
225 TRACE("Ret XSaveContext\n");
226 return r;
229 int TSXSetClassHint(Display* a0, Window a1, XClassHint* a2)
231 int r;
232 TRACE("Call XSetClassHint\n");
233 EnterCriticalSection( &X11DRV_CritSection );
234 r = XSetClassHint(a0, a1, a2);
235 LeaveCriticalSection( &X11DRV_CritSection );
236 TRACE("Ret XSetClassHint\n");
237 return r;
240 int TSXSetWMHints(Display* a0, Window a1, XWMHints* a2)
242 int r;
243 TRACE("Call XSetWMHints\n");
244 EnterCriticalSection( &X11DRV_CritSection );
245 r = XSetWMHints(a0, a1, a2);
246 LeaveCriticalSection( &X11DRV_CritSection );
247 TRACE("Ret XSetWMHints\n");
248 return r;
251 void TSXSetWMProperties(Display* a0, Window a1, XTextProperty* a2, XTextProperty* a3, char** a4, int a5, XSizeHints* a6, XWMHints* a7, XClassHint* a8)
253 TRACE("Call XSetWMProperties\n");
254 EnterCriticalSection( &X11DRV_CritSection );
255 XSetWMProperties(a0, a1, a2, a3, a4, a5, a6, a7, a8);
256 LeaveCriticalSection( &X11DRV_CritSection );
257 TRACE("Ret XSetWMProperties\n");
260 void TSXSetWMSizeHints(Display* a0, Window a1, XSizeHints* a2, Atom a3)
262 TRACE("Call XSetWMSizeHints\n");
263 EnterCriticalSection( &X11DRV_CritSection );
264 XSetWMSizeHints(a0, a1, a2, a3);
265 LeaveCriticalSection( &X11DRV_CritSection );
266 TRACE("Ret XSetWMSizeHints\n");
269 int TSXSetRegion(Display* a0, GC a1, Region a2)
271 int r;
272 TRACE("Call XSetRegion\n");
273 EnterCriticalSection( &X11DRV_CritSection );
274 r = XSetRegion(a0, a1, a2);
275 LeaveCriticalSection( &X11DRV_CritSection );
276 TRACE("Ret XSetRegion\n");
277 return r;
280 int TSXShrinkRegion(Region a0, int a1, int a2)
282 int r;
283 TRACE("Call XShrinkRegion\n");
284 EnterCriticalSection( &X11DRV_CritSection );
285 r = XShrinkRegion(a0, a1, a2);
286 LeaveCriticalSection( &X11DRV_CritSection );
287 TRACE("Ret XShrinkRegion\n");
288 return r;
291 int TSXStringListToTextProperty(char** a0, int a1, XTextProperty* a2)
293 int r;
294 TRACE("Call XStringListToTextProperty\n");
295 EnterCriticalSection( &X11DRV_CritSection );
296 r = XStringListToTextProperty(a0, a1, a2);
297 LeaveCriticalSection( &X11DRV_CritSection );
298 TRACE("Ret XStringListToTextProperty\n");
299 return r;
302 int TSXSubtractRegion(Region a0, Region a1, Region a2)
304 int r;
305 TRACE("Call XSubtractRegion\n");
306 EnterCriticalSection( &X11DRV_CritSection );
307 r = XSubtractRegion(a0, a1, a2);
308 LeaveCriticalSection( &X11DRV_CritSection );
309 TRACE("Ret XSubtractRegion\n");
310 return r;
313 int TSXUnionRectWithRegion(XRectangle* a0, Region a1, Region a2)
315 int r;
316 TRACE("Call XUnionRectWithRegion\n");
317 EnterCriticalSection( &X11DRV_CritSection );
318 r = XUnionRectWithRegion(a0, a1, a2);
319 LeaveCriticalSection( &X11DRV_CritSection );
320 TRACE("Ret XUnionRectWithRegion\n");
321 return r;
324 int TSXUnionRegion(Region a0, Region a1, Region a2)
326 int r;
327 TRACE("Call XUnionRegion\n");
328 EnterCriticalSection( &X11DRV_CritSection );
329 r = XUnionRegion(a0, a1, a2);
330 LeaveCriticalSection( &X11DRV_CritSection );
331 TRACE("Ret XUnionRegion\n");
332 return r;
335 int TSXXorRegion(Region a0, Region a1, Region a2)
337 int r;
338 TRACE("Call XXorRegion\n");
339 EnterCriticalSection( &X11DRV_CritSection );
340 r = XXorRegion(a0, a1, a2);
341 LeaveCriticalSection( &X11DRV_CritSection );
342 TRACE("Ret XXorRegion\n");
343 return r;
346 int TSXDestroyImage(struct _XImage *a0)
348 int r;
349 TRACE("Call XDestroyImage\n");
350 EnterCriticalSection( &X11DRV_CritSection );
351 r = XDestroyImage(a0);
352 LeaveCriticalSection( &X11DRV_CritSection );
353 TRACE("Ret XDestroyImage\n");
354 return r;
357 struct _XImage * TSXSubImage(struct _XImage *a0, int a1, int a2, unsigned int a3, unsigned int a4)
359 struct _XImage * r;
360 TRACE("Call XSubImage\n");
361 EnterCriticalSection( &X11DRV_CritSection );
362 r = XSubImage(a0, a1, a2, a3, a4);
363 LeaveCriticalSection( &X11DRV_CritSection );
364 TRACE("Ret XSubImage\n");
365 return r;
368 int TSXAddPixel(struct _XImage *a0, long a1)
370 int r;
371 TRACE("Call XAddPixel\n");
372 EnterCriticalSection( &X11DRV_CritSection );
373 r = XAddPixel(a0, a1);
374 LeaveCriticalSection( &X11DRV_CritSection );
375 TRACE("Ret XAddPixel\n");
376 return r;
379 XContext TSXUniqueContext(void)
381 XContext r;
382 TRACE("Call XUniqueContext\n");
383 EnterCriticalSection( &X11DRV_CritSection );
384 r = XUniqueContext();
385 LeaveCriticalSection( &X11DRV_CritSection );
386 TRACE("Ret XUniqueContext\n");
387 return r;