39 #include <X11/extensions/Xext.h>
61 #if NeedNestedPrototypes
68 #if NeedNestedPrototypes
75 #if NeedNestedPrototypes
82 #if NeedNestedPrototypes
89 #if NeedNestedPrototypes
96 #if NeedNestedPrototypes
103 #if NeedNestedPrototypes
109 #if NeedNestedPrototypes
116 #if NeedNestedPrototypes
123 #if NeedNestedPrototypes
130 char *(*error_string)(
131 #if NeedNestedPrototypes
142 #
if NeedFunctionPrototypes
147 #
if NeedFunctionPrototypes
152 #
if NeedFunctionPrototypes
162 #
if NeedFunctionPrototypes
168 #
if NeedFunctionPrototypes
174 #define XextHasExtension(i) ((i) && ((i)->codes))
175 #define XextCheckExtension(dpy,i,name,val) \
176 if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
177 #define XextSimpleCheckExtension(dpy,i,name) \
178 if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
187 #define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
188 XExtDisplayInfo *proc (Display *dpy) \
190 XExtDisplayInfo *dpyinfo; \
191 if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
192 if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
193 dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
197 #define XEXT_FIND_DISPLAY_PROTO(proc) \
198 XExtDisplayInfo *proc(Display *dpy)
200 #define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
201 int proc (Display *dpy, XExtCodes *codes) \
203 return XextRemoveDisplay (extinfo, dpy); \
206 #define XEXT_CLOSE_DISPLAY_PROTO(proc) \
207 int proc(Display *dpy, XExtCodes *codes)
209 #define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
210 char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
212 code -= codes->first_error; \
213 if (code >= 0 && code < nerr) { \
215 sprintf (tmp, "%s.%d", extname, code); \
216 XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
222 #define XEXT_ERROR_STRING_PROTO(proc) \
223 char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
struct _XExtensionHooks XExtensionHooks
void XextDestroyExtension()
struct _XExtDisplayInfo XExtDisplayInfo
XExtensionInfo * XextCreateExtension()
struct _XExtensionInfo XExtensionInfo
Status(* event_to_wire)()
struct _XExtDisplayInfo * next
XExtDisplayInfo * XextFindDisplay()
XExtDisplayInfo * XextAddDisplay()