Fixed FormatMessage[A|16] against some buffer overflow cases.
[wine.git] / tsx11 / ts_xshm.c
blob87ad78d5f3c0a760792c90e3fb4cc17d16ee4d1d
1 /*
2 * Thread safe wrappers around XShm calls.
3 * This file was generated automatically by tools/make_X11wrappers
4 * DO NOT EDIT!
5 */
7 #include "config.h"
9 #ifdef HAVE_LIBXXSHM
11 #include <X11/Xlib.h>
12 #include <X11/extensions/XShm.h>
14 #include "debugtools.h"
15 #include "ts_xshm.h"
16 #include "x11drv.h"
18 DEFAULT_DEBUG_CHANNEL(x11)
20 Bool TSXShmQueryExtension(Display *a0)
22 Bool r;
23 TRACE("Call XShmQueryExtension\n");
24 EnterCriticalSection( &X11DRV_CritSection );
25 r = XShmQueryExtension(a0);
26 LeaveCriticalSection( &X11DRV_CritSection );
27 TRACE("Ret XShmQueryExtension\n");
28 return r;
31 Bool TSXShmQueryVersion(Display *a0, int *a1, int *a2, Bool *a3)
33 Bool r;
34 TRACE("Call XShmQueryVersion\n");
35 EnterCriticalSection( &X11DRV_CritSection );
36 r = XShmQueryVersion(a0, a1, a2, a3);
37 LeaveCriticalSection( &X11DRV_CritSection );
38 TRACE("Ret XShmQueryVersion\n");
39 return r;
42 int TSXShmPixmapFormat(Display *a0)
44 int r;
45 TRACE("Call XShmPixmapFormat\n");
46 EnterCriticalSection( &X11DRV_CritSection );
47 r = XShmPixmapFormat(a0);
48 LeaveCriticalSection( &X11DRV_CritSection );
49 TRACE("Ret XShmPixmapFormat\n");
50 return r;
53 Status TSXShmAttach(Display *a0, XShmSegmentInfo *a1)
55 Status r;
56 TRACE("Call XShmAttach\n");
57 EnterCriticalSection( &X11DRV_CritSection );
58 r = XShmAttach(a0, a1);
59 LeaveCriticalSection( &X11DRV_CritSection );
60 TRACE("Ret XShmAttach\n");
61 return r;
64 Status TSXShmDetach(Display *a0, XShmSegmentInfo *a1)
66 Status r;
67 TRACE("Call XShmDetach\n");
68 EnterCriticalSection( &X11DRV_CritSection );
69 r = XShmDetach(a0, a1);
70 LeaveCriticalSection( &X11DRV_CritSection );
71 TRACE("Ret XShmDetach\n");
72 return r;
75 Status TSXShmPutImage(Display *a0, Drawable a1, GC a2, XImage *a3, int a4, int a5, int a6, int a7, unsigned int a8, unsigned int a9, Bool a10)
77 Status r;
78 TRACE("Call XShmPutImage\n");
79 EnterCriticalSection( &X11DRV_CritSection );
80 r = XShmPutImage(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
81 LeaveCriticalSection( &X11DRV_CritSection );
82 TRACE("Ret XShmPutImage\n");
83 return r;
86 Status TSXShmGetImage(Display *a0, Drawable a1, XImage *a2, int a3, int a4, unsigned long a5)
88 Status r;
89 TRACE("Call XShmGetImage\n");
90 EnterCriticalSection( &X11DRV_CritSection );
91 r = XShmGetImage(a0, a1, a2, a3, a4, a5);
92 LeaveCriticalSection( &X11DRV_CritSection );
93 TRACE("Ret XShmGetImage\n");
94 return r;
97 XImage * TSXShmCreateImage(Display *a0, Visual *a1, unsigned int a2, int a3, char *a4, XShmSegmentInfo *a5, unsigned int a6, unsigned int a7)
99 XImage * r;
100 TRACE("Call XShmCreateImage\n");
101 EnterCriticalSection( &X11DRV_CritSection );
102 r = XShmCreateImage(a0, a1, a2, a3, a4, a5, a6, a7);
103 LeaveCriticalSection( &X11DRV_CritSection );
104 TRACE("Ret XShmCreateImage\n");
105 return r;
108 Pixmap TSXShmCreatePixmap(Display *a0, Drawable a1, char *a2, XShmSegmentInfo *a3, unsigned int a4, unsigned int a5, unsigned int a6)
110 Pixmap r;
111 TRACE("Call XShmCreatePixmap\n");
112 EnterCriticalSection( &X11DRV_CritSection );
113 r = XShmCreatePixmap(a0, a1, a2, a3, a4, a5, a6);
114 LeaveCriticalSection( &X11DRV_CritSection );
115 TRACE("Ret XShmCreatePixmap\n");
116 return r;
119 #endif /* defined(HAVE_LIBXXSHM) */