doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Functions
extutil.h File Reference
#include <X11/extensions/Xext.h>

Go to the source code of this file.

Classes

struct  _XExtDisplayInfo
 
struct  _XExtensionInfo
 
struct  _XExtensionHooks
 

Macros

#define XextHasExtension(i)   ((i) && ((i)->codes))
 
#define XextCheckExtension(dpy, i, name, val)   if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
 
#define XextSimpleCheckExtension(dpy, i, name)   if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
 
#define XEXT_GENERATE_FIND_DISPLAY(proc, extinfo, extname, hooks, nev, data)
 
#define XEXT_FIND_DISPLAY_PROTO(proc)   XExtDisplayInfo *proc(Display *dpy)
 
#define XEXT_GENERATE_CLOSE_DISPLAY(proc, extinfo)
 
#define XEXT_CLOSE_DISPLAY_PROTO(proc)   int proc(Display *dpy, XExtCodes *codes)
 
#define XEXT_GENERATE_ERROR_STRING(proc, extname, nerr, errl)
 
#define XEXT_ERROR_STRING_PROTO(proc)   char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
 

Typedefs

typedef struct _XExtDisplayInfo XExtDisplayInfo
 
typedef struct _XExtensionInfo XExtensionInfo
 
typedef struct _XExtensionHooks XExtensionHooks
 

Functions

XExtensionInfoXextCreateExtension ()
 
void XextDestroyExtension ()
 
XExtDisplayInfoXextAddDisplay ()
 
int XextRemoveDisplay ()
 
XExtDisplayInfoXextFindDisplay ()
 

Macro Definition Documentation

#define XEXT_CLOSE_DISPLAY_PROTO (   proc)    int proc(Display *dpy, XExtCodes *codes)

Definition at line 206 of file extutil.h.

#define XEXT_ERROR_STRING_PROTO (   proc)    char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)

Definition at line 222 of file extutil.h.

#define XEXT_FIND_DISPLAY_PROTO (   proc)    XExtDisplayInfo *proc(Display *dpy)

Definition at line 197 of file extutil.h.

#define XEXT_GENERATE_CLOSE_DISPLAY (   proc,
  extinfo 
)
Value:
int proc (Display *dpy, XExtCodes *codes) \
{ \
return XextRemoveDisplay (extinfo, dpy); \
}
int XextRemoveDisplay()
Display * dpy
Definition: glimp.cpp:43

Definition at line 200 of file extutil.h.

#define XEXT_GENERATE_ERROR_STRING (   proc,
  extname,
  nerr,
  errl 
)
Value:
char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
{ \
code -= codes->first_error; \
if (code >= 0 && code < nerr) { \
char tmp[256]; \
sprintf (tmp, "%s.%d", extname, code); \
XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
return buf; \
} \
return (char *)0; \
}
GLenum GLsizei n
Definition: glext.h:3705
Display * dpy
Definition: glimp.cpp:43
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID
int sprintf(idStr &string, const char *fmt,...)
Definition: Str.cpp:1528

Definition at line 209 of file extutil.h.

#define XEXT_GENERATE_FIND_DISPLAY (   proc,
  extinfo,
  extname,
  hooks,
  nev,
  data 
)
Value:
XExtDisplayInfo *proc (Display *dpy) \
{ \
if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
return dpyinfo; \
}
struct _XExtDisplayInfo XExtDisplayInfo
XExtensionInfo * XextCreateExtension()
#define NULL
Definition: Lib.h:88
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:2853
Display * dpy
Definition: glimp.cpp:43
XExtDisplayInfo * XextFindDisplay()
XExtDisplayInfo * XextAddDisplay()
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID

Definition at line 187 of file extutil.h.

#define XextCheckExtension (   dpy,
  i,
  name,
  val 
)    if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }

Definition at line 175 of file extutil.h.

#define XextHasExtension (   i)    ((i) && ((i)->codes))

Definition at line 174 of file extutil.h.

#define XextSimpleCheckExtension (   dpy,
  i,
  name 
)    if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }

Definition at line 177 of file extutil.h.

Typedef Documentation

Function Documentation

XExtDisplayInfo* XextAddDisplay ( )
XExtensionInfo* XextCreateExtension ( )
void XextDestroyExtension ( )
XExtDisplayInfo* XextFindDisplay ( )
int XextRemoveDisplay ( )