Make some dynamic X11 symbols option. _XData32 and _XRead32 are only available
authorRyan C. Gordon <icculus@icculus.org>
Fri, 06 Jan 2006 20:56:13 +0000
changeset 1235f60f6f4ffc6f
parent 1234 73676c1f56ee
child 1236 ed252764287a
Make some dynamic X11 symbols option. _XData32 and _XRead32 are only available
on 64-bit systems, and are chosen with macros in the X11 headers. So on
32-bit systems, it should fail to find these symbols and keep going anyhow.
src/video/x11/SDL_x11dyn.c
src/video/x11/SDL_x11dyn.h
src/video/x11/SDL_x11sym.h
     1.1 --- a/src/video/x11/SDL_x11dyn.c	Fri Jan 06 13:20:10 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11dyn.c	Fri Jan 06 20:56:13 2006 +0000
     1.3 @@ -20,7 +20,9 @@
     1.4      slouken@libsdl.org
     1.5  */
     1.6  
     1.7 -/*#define DEBUG_DYNAMIC_X11 1*/
     1.8 +#if 0
     1.9 +#define DEBUG_DYNAMIC_X11 1
    1.10 +#endif
    1.11  
    1.12  #define __SDL_NO_REDEFINE_X11_HEADER_SYMS 1
    1.13  #include "SDL_x11dyn.h"
    1.14 @@ -38,7 +40,7 @@
    1.15  static const char *x11ext_library = X11EXT_DYNAMIC;
    1.16  static void *x11ext_handle = NULL;
    1.17  
    1.18 -static void *X11_GetSym(const char *fnname, int *rc)
    1.19 +static void *X11_GetSym(int required, const char *fnname, int *rc)
    1.20  {
    1.21  	void *fn = NULL;
    1.22  	if (*rc) {  /* haven't already failed on a previous lookup? */
    1.23 @@ -57,7 +59,7 @@
    1.24  				printf("X11: Symbol '%s' NOT FOUND!\n", fnname);
    1.25  			#endif
    1.26  		}
    1.27 -		*rc = (fn != NULL);
    1.28 +		*rc = ((fn != NULL) || (!required));
    1.29  	}
    1.30  
    1.31  	return fn;
    1.32 @@ -65,7 +67,7 @@
    1.33  #endif  /* defined X11_DYNAMIC */
    1.34  
    1.35  /* Define all the function pointers... */
    1.36 -#define SDL_X11_SYM(ret,fn,params) ret (*p##fn) params = NULL;
    1.37 +#define SDL_X11_SYM(req,ret,fn,params) ret (*p##fn) params = NULL;
    1.38  #include "SDL_x11sym.h"
    1.39  #undef SDL_X11_SYM
    1.40  
    1.41 @@ -77,7 +79,7 @@
    1.42  	if (x11_load_refcount > 0) {
    1.43  		if (--x11_load_refcount == 0) {
    1.44  			/* set all the function pointers to NULL. */
    1.45 -			#define SDL_X11_SYM(ret,fn,params) p##fn = NULL;
    1.46 +			#define SDL_X11_SYM(req,ret,fn,params) p##fn = NULL;
    1.47  			#include "SDL_x11sym.h"
    1.48  			#undef SDL_X11_SYM
    1.49  
    1.50 @@ -106,7 +108,7 @@
    1.51  			x11_handle = SDL_LoadObject(x11_library);
    1.52  			x11ext_handle = SDL_LoadObject(x11ext_library);
    1.53  			rc = ((x11_handle != NULL) && (x11ext_handle != NULL));
    1.54 -			#define SDL_X11_SYM(r,fn,arg) p##fn = X11_GetSym(#fn, &rc);
    1.55 +			#define SDL_X11_SYM(req,r,fn,arg) p##fn = X11_GetSym(req,#fn, &rc);
    1.56  			#include "SDL_x11sym.h"
    1.57  			#undef SDL_X11_SYM
    1.58  
    1.59 @@ -114,7 +116,7 @@
    1.60  				SDL_X11_UnloadSymbols();  /* in case one of these loaded... */
    1.61  
    1.62  		#else
    1.63 -			#define SDL_X11_SYM(r,fn,arg) p##fn = fn;
    1.64 +			#define SDL_X11_SYM(req,r,fn,arg) p##fn = fn;
    1.65  			#include "SDL_x11sym.h"
    1.66  			#undef SDL_X11_SYM
    1.67  		#endif
     2.1 --- a/src/video/x11/SDL_x11dyn.h	Fri Jan 06 13:20:10 2006 +0000
     2.2 +++ b/src/video/x11/SDL_x11dyn.h	Fri Jan 06 20:56:13 2006 +0000
     2.3 @@ -58,7 +58,7 @@
     2.4  typedef int (*SDL_X11_XSynchronizeRetType)(Display*);
     2.5  typedef Status (*SDL_X11_XESetEventToWireRetType)(Display*,XEvent*,xEvent*);
     2.6  
     2.7 -#define SDL_X11_SYM(ret,fn,params) extern ret (*p##fn) params;
     2.8 +#define SDL_X11_SYM(req,ret,fn,params) extern ret (*p##fn) params;
     2.9  #include "SDL_x11sym.h"
    2.10  #undef SDL_X11_SYM
    2.11  
     3.1 --- a/src/video/x11/SDL_x11sym.h	Fri Jan 06 13:20:10 2006 +0000
     3.2 +++ b/src/video/x11/SDL_x11sym.h	Fri Jan 06 20:56:13 2006 +0000
     3.3 @@ -20,136 +20,136 @@
     3.4      slouken@libsdl.org
     3.5  */
     3.6  
     3.7 -SDL_X11_SYM(XClassHint*,XAllocClassHint,(void))
     3.8 -SDL_X11_SYM(Status,XAllocColor,(Display*,Colormap,XColor*))
     3.9 -SDL_X11_SYM(XSizeHints*,XAllocSizeHints,(void))
    3.10 -SDL_X11_SYM(XWMHints*,XAllocWMHints,(void))
    3.11 -SDL_X11_SYM(int,XChangePointerControl,(Display*,Bool,Bool,int,int,int))
    3.12 -SDL_X11_SYM(int,XChangeProperty,(Display*,Window,Atom,Atom,int,int,_Xconst unsigned char*,int))
    3.13 -SDL_X11_SYM(int,XChangeWindowAttributes,(Display*,Window,unsigned long,XSetWindowAttributes*))
    3.14 -SDL_X11_SYM(Bool,XCheckTypedEvent,(Display*,int,XEvent*))
    3.15 -SDL_X11_SYM(int,XClearWindow,(Display*,Window))
    3.16 -SDL_X11_SYM(int,XCloseDisplay,(Display*))
    3.17 -SDL_X11_SYM(Colormap,XCreateColormap,(Display*,Window,Visual*,int))
    3.18 -SDL_X11_SYM(Cursor,XCreatePixmapCursor,(Display*,Pixmap,Pixmap,XColor*,XColor*,unsigned int,unsigned int))
    3.19 -SDL_X11_SYM(GC,XCreateGC,(Display*,Drawable,unsigned long,XGCValues*))
    3.20 -SDL_X11_SYM(XImage*,XCreateImage,(Display*,Visual*,unsigned int,int,int,char*,unsigned int,unsigned int,int,int))
    3.21 -SDL_X11_SYM(Pixmap,XCreatePixmap,(Display*,Drawable,unsigned int,unsigned int,unsigned int))
    3.22 -SDL_X11_SYM(Pixmap,XCreatePixmapFromBitmapData,(Display*,Drawable,char*,unsigned int,unsigned int,unsigned long,unsigned long,unsigned int))
    3.23 -SDL_X11_SYM(Window,XCreateSimpleWindow,(Display*,Window,int,int,unsigned int,unsigned int,unsigned int,unsigned long,unsigned long))
    3.24 -SDL_X11_SYM(Window,XCreateWindow,(Display*,Window,int,int,unsigned int,unsigned int,unsigned int,int,unsigned int,Visual*,unsigned long,XSetWindowAttributes*))
    3.25 -SDL_X11_SYM(int,XDefineCursor,(Display*,Window,Cursor))
    3.26 -SDL_X11_SYM(int,XDeleteProperty,(Display*,Window,Atom))
    3.27 -SDL_X11_SYM(int,XDestroyWindow,(Display*,Window))
    3.28 -SDL_X11_SYM(char*,XDisplayName,(_Xconst char*))
    3.29 -SDL_X11_SYM(int,XEventsQueued,(Display*,int))
    3.30 -SDL_X11_SYM(int,XFlush,(Display*))
    3.31 -SDL_X11_SYM(int,XFree,(void*))
    3.32 -SDL_X11_SYM(int,XFreeColormap,(Display*,Colormap))
    3.33 -SDL_X11_SYM(int,XFreeColors,(Display*,Colormap,unsigned long*,int,unsigned long))
    3.34 -SDL_X11_SYM(int,XFreeCursor,(Display*,Cursor))
    3.35 -SDL_X11_SYM(int,XFreeGC,(Display*,GC))
    3.36 -SDL_X11_SYM(int,XFreeModifiermap,(XModifierKeymap*))
    3.37 -SDL_X11_SYM(int,XFreePixmap,(Display*,Pixmap))
    3.38 -SDL_X11_SYM(int,XGetErrorDatabaseText,(Display*,_Xconst char*,_Xconst char*,_Xconst char*,char*,int))
    3.39 -SDL_X11_SYM(XModifierKeymap*,XGetModifierMapping,(Display*))
    3.40 -SDL_X11_SYM(int,XGetPointerControl,(Display*,int*,int*,int*))
    3.41 -SDL_X11_SYM(XVisualInfo*,XGetVisualInfo,(Display*,long,XVisualInfo*,int*))
    3.42 -SDL_X11_SYM(XWMHints*,XGetWMHints,(Display*,Window))
    3.43 -SDL_X11_SYM(Status,XGetWMIconName,(Display*,Window,XTextProperty*))
    3.44 -SDL_X11_SYM(Status,XGetWMName,(Display*,Window,XTextProperty*))
    3.45 -SDL_X11_SYM(Status,XGetWindowAttributes,(Display*,Window,XWindowAttributes*))
    3.46 -SDL_X11_SYM(int,XGrabKeyboard,(Display*,Window,Bool,int,int,Time))
    3.47 -SDL_X11_SYM(int,XGrabPointer,(Display*,Window,Bool,unsigned int,int,int,Window,Cursor,Time))
    3.48 -SDL_X11_SYM(Status,XIconifyWindow,(Display*,Window,int))
    3.49 -SDL_X11_SYM(int,XInstallColormap,(Display*,Colormap))
    3.50 -SDL_X11_SYM(KeyCode,XKeysymToKeycode,(Display*,KeySym))
    3.51 -SDL_X11_SYM(Atom,XInternAtom,(Display*,_Xconst char*,Bool))
    3.52 -SDL_X11_SYM(XPixmapFormatValues*,XListPixmapFormats,(Display*,int*))
    3.53 -SDL_X11_SYM(int,XLookupString,(XKeyEvent*,char*,int,KeySym*,XComposeStatus*))
    3.54 -SDL_X11_SYM(int,XMapRaised,(Display*,Window))
    3.55 -SDL_X11_SYM(int,XMapWindow,(Display*,Window))
    3.56 -SDL_X11_SYM(int,XMaskEvent,(Display*,long,XEvent*))
    3.57 -SDL_X11_SYM(Status,XMatchVisualInfo,(Display*,int,int,int,XVisualInfo*))
    3.58 -SDL_X11_SYM(int,XMissingExtension,(Display*,_Xconst char*))
    3.59 -SDL_X11_SYM(int,XMoveResizeWindow,(Display*,Window,int,int,unsigned int,unsigned int))
    3.60 -SDL_X11_SYM(int,XMoveWindow,(Display*,Window,int,int))
    3.61 -SDL_X11_SYM(int,XNextEvent,(Display*,XEvent*))
    3.62 -SDL_X11_SYM(Display*,XOpenDisplay,(_Xconst char*))
    3.63 -SDL_X11_SYM(int,XPeekEvent,(Display*,XEvent*))
    3.64 -SDL_X11_SYM(int,XPending,(Display*))
    3.65 -SDL_X11_SYM(int,XPutImage,(Display*,Drawable,GC,XImage*,int,int,int,int,unsigned int,unsigned int))
    3.66 -SDL_X11_SYM(int,XQueryColors,(Display*,Colormap,XColor*,int))
    3.67 -SDL_X11_SYM(int,XQueryKeymap,(Display*,char [32]))
    3.68 -SDL_X11_SYM(Bool,XQueryPointer,(Display*,Window,Window*,Window*,int*,int*,int*,int*,unsigned int*))
    3.69 -SDL_X11_SYM(int,XRaiseWindow,(Display*,Window))
    3.70 -SDL_X11_SYM(int,XReparentWindow,(Display*,Window,Window,int,int))
    3.71 -SDL_X11_SYM(int,XResizeWindow,(Display*,Window,unsigned int,unsigned int))
    3.72 -SDL_X11_SYM(int,XSelectInput,(Display*,Window,long))
    3.73 -SDL_X11_SYM(Status,XSendEvent,(Display*,Window,Bool,long,XEvent*))
    3.74 -SDL_X11_SYM(int,XSetClassHint,(Display*,Window,XClassHint*))
    3.75 -SDL_X11_SYM(XErrorHandler,XSetErrorHandler,(XErrorHandler))
    3.76 -SDL_X11_SYM(XIOErrorHandler,XSetIOErrorHandler,(XIOErrorHandler))
    3.77 -SDL_X11_SYM(int,XSetTransientForHint,(Display*,Window,Window))
    3.78 -SDL_X11_SYM(int,XSetWMHints,(Display*,Window,XWMHints*))
    3.79 -SDL_X11_SYM(void,XSetWMIconName,(Display*,Window,XTextProperty*))
    3.80 -SDL_X11_SYM(void,XSetWMName,(Display*,Window,XTextProperty*))
    3.81 -SDL_X11_SYM(void,XSetWMNormalHints,(Display*,Window,XSizeHints*))
    3.82 -SDL_X11_SYM(Status,XSetWMProtocols,(Display*,Window,Atom*,int))
    3.83 -SDL_X11_SYM(int,XSetWindowBackground,(Display*,Window,unsigned long))
    3.84 -SDL_X11_SYM(int,XSetWindowBackgroundPixmap,(Display*,Window,Pixmap))
    3.85 -SDL_X11_SYM(int,XSetWindowColormap,(Display*,Window,Colormap))
    3.86 -SDL_X11_SYM(int,XStoreColors,(Display*,Colormap,XColor*,int))
    3.87 -SDL_X11_SYM(Status,XStringListToTextProperty,(char**,int,XTextProperty*))
    3.88 -SDL_X11_SYM(int,XSync,(Display*,Bool))
    3.89 -SDL_X11_SYM(int,XUngrabKeyboard,(Display*,Time))
    3.90 -SDL_X11_SYM(int,XUngrabPointer,(Display*,Time))
    3.91 -SDL_X11_SYM(int,XUnmapWindow,(Display*,Window))
    3.92 -SDL_X11_SYM(int,XWarpPointer,(Display*,Window,Window,int,int,unsigned int,unsigned int,int,int))
    3.93 -SDL_X11_SYM(VisualID,XVisualIDFromVisual,(Visual*))
    3.94 -SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo*,Display*,char*,XExtensionHooks*,int,XPointer))
    3.95 -SDL_X11_SYM(XExtensionInfo*,XextCreateExtension,(void))
    3.96 -SDL_X11_SYM(void,XextDestroyExtension,(XExtensionInfo*))
    3.97 -SDL_X11_SYM(XExtDisplayInfo*,XextFindDisplay,(XExtensionInfo*,Display*))
    3.98 -SDL_X11_SYM(int,XextRemoveDisplay,(XExtensionInfo*,Display*))
    3.99 +SDL_X11_SYM(1,XClassHint*,XAllocClassHint,(void))
   3.100 +SDL_X11_SYM(1,Status,XAllocColor,(Display*,Colormap,XColor*))
   3.101 +SDL_X11_SYM(1,XSizeHints*,XAllocSizeHints,(void))
   3.102 +SDL_X11_SYM(1,XWMHints*,XAllocWMHints,(void))
   3.103 +SDL_X11_SYM(1,int,XChangePointerControl,(Display*,Bool,Bool,int,int,int))
   3.104 +SDL_X11_SYM(1,int,XChangeProperty,(Display*,Window,Atom,Atom,int,int,_Xconst unsigned char*,int))
   3.105 +SDL_X11_SYM(1,int,XChangeWindowAttributes,(Display*,Window,unsigned long,XSetWindowAttributes*))
   3.106 +SDL_X11_SYM(1,Bool,XCheckTypedEvent,(Display*,int,XEvent*))
   3.107 +SDL_X11_SYM(1,int,XClearWindow,(Display*,Window))
   3.108 +SDL_X11_SYM(1,int,XCloseDisplay,(Display*))
   3.109 +SDL_X11_SYM(1,Colormap,XCreateColormap,(Display*,Window,Visual*,int))
   3.110 +SDL_X11_SYM(1,Cursor,XCreatePixmapCursor,(Display*,Pixmap,Pixmap,XColor*,XColor*,unsigned int,unsigned int))
   3.111 +SDL_X11_SYM(1,GC,XCreateGC,(Display*,Drawable,unsigned long,XGCValues*))
   3.112 +SDL_X11_SYM(1,XImage*,XCreateImage,(Display*,Visual*,unsigned int,int,int,char*,unsigned int,unsigned int,int,int))
   3.113 +SDL_X11_SYM(1,Pixmap,XCreatePixmap,(Display*,Drawable,unsigned int,unsigned int,unsigned int))
   3.114 +SDL_X11_SYM(1,Pixmap,XCreatePixmapFromBitmapData,(Display*,Drawable,char*,unsigned int,unsigned int,unsigned long,unsigned long,unsigned int))
   3.115 +SDL_X11_SYM(1,Window,XCreateSimpleWindow,(Display*,Window,int,int,unsigned int,unsigned int,unsigned int,unsigned long,unsigned long))
   3.116 +SDL_X11_SYM(1,Window,XCreateWindow,(Display*,Window,int,int,unsigned int,unsigned int,unsigned int,int,unsigned int,Visual*,unsigned long,XSetWindowAttributes*))
   3.117 +SDL_X11_SYM(1,int,XDefineCursor,(Display*,Window,Cursor))
   3.118 +SDL_X11_SYM(1,int,XDeleteProperty,(Display*,Window,Atom))
   3.119 +SDL_X11_SYM(1,int,XDestroyWindow,(Display*,Window))
   3.120 +SDL_X11_SYM(1,char*,XDisplayName,(_Xconst char*))
   3.121 +SDL_X11_SYM(1,int,XEventsQueued,(Display*,int))
   3.122 +SDL_X11_SYM(1,int,XFlush,(Display*))
   3.123 +SDL_X11_SYM(1,int,XFree,(void*))
   3.124 +SDL_X11_SYM(1,int,XFreeColormap,(Display*,Colormap))
   3.125 +SDL_X11_SYM(1,int,XFreeColors,(Display*,Colormap,unsigned long*,int,unsigned long))
   3.126 +SDL_X11_SYM(1,int,XFreeCursor,(Display*,Cursor))
   3.127 +SDL_X11_SYM(1,int,XFreeGC,(Display*,GC))
   3.128 +SDL_X11_SYM(1,int,XFreeModifiermap,(XModifierKeymap*))
   3.129 +SDL_X11_SYM(1,int,XFreePixmap,(Display*,Pixmap))
   3.130 +SDL_X11_SYM(1,int,XGetErrorDatabaseText,(Display*,_Xconst char*,_Xconst char*,_Xconst char*,char*,int))
   3.131 +SDL_X11_SYM(1,XModifierKeymap*,XGetModifierMapping,(Display*))
   3.132 +SDL_X11_SYM(1,int,XGetPointerControl,(Display*,int*,int*,int*))
   3.133 +SDL_X11_SYM(1,XVisualInfo*,XGetVisualInfo,(Display*,long,XVisualInfo*,int*))
   3.134 +SDL_X11_SYM(1,XWMHints*,XGetWMHints,(Display*,Window))
   3.135 +SDL_X11_SYM(1,Status,XGetWMIconName,(Display*,Window,XTextProperty*))
   3.136 +SDL_X11_SYM(1,Status,XGetWMName,(Display*,Window,XTextProperty*))
   3.137 +SDL_X11_SYM(1,Status,XGetWindowAttributes,(Display*,Window,XWindowAttributes*))
   3.138 +SDL_X11_SYM(1,int,XGrabKeyboard,(Display*,Window,Bool,int,int,Time))
   3.139 +SDL_X11_SYM(1,int,XGrabPointer,(Display*,Window,Bool,unsigned int,int,int,Window,Cursor,Time))
   3.140 +SDL_X11_SYM(1,Status,XIconifyWindow,(Display*,Window,int))
   3.141 +SDL_X11_SYM(1,int,XInstallColormap,(Display*,Colormap))
   3.142 +SDL_X11_SYM(1,KeyCode,XKeysymToKeycode,(Display*,KeySym))
   3.143 +SDL_X11_SYM(1,Atom,XInternAtom,(Display*,_Xconst char*,Bool))
   3.144 +SDL_X11_SYM(1,XPixmapFormatValues*,XListPixmapFormats,(Display*,int*))
   3.145 +SDL_X11_SYM(1,int,XLookupString,(XKeyEvent*,char*,int,KeySym*,XComposeStatus*))
   3.146 +SDL_X11_SYM(1,int,XMapRaised,(Display*,Window))
   3.147 +SDL_X11_SYM(1,int,XMapWindow,(Display*,Window))
   3.148 +SDL_X11_SYM(1,int,XMaskEvent,(Display*,long,XEvent*))
   3.149 +SDL_X11_SYM(1,Status,XMatchVisualInfo,(Display*,int,int,int,XVisualInfo*))
   3.150 +SDL_X11_SYM(1,int,XMissingExtension,(Display*,_Xconst char*))
   3.151 +SDL_X11_SYM(1,int,XMoveResizeWindow,(Display*,Window,int,int,unsigned int,unsigned int))
   3.152 +SDL_X11_SYM(1,int,XMoveWindow,(Display*,Window,int,int))
   3.153 +SDL_X11_SYM(1,int,XNextEvent,(Display*,XEvent*))
   3.154 +SDL_X11_SYM(1,Display*,XOpenDisplay,(_Xconst char*))
   3.155 +SDL_X11_SYM(1,int,XPeekEvent,(Display*,XEvent*))
   3.156 +SDL_X11_SYM(1,int,XPending,(Display*))
   3.157 +SDL_X11_SYM(1,int,XPutImage,(Display*,Drawable,GC,XImage*,int,int,int,int,unsigned int,unsigned int))
   3.158 +SDL_X11_SYM(1,int,XQueryColors,(Display*,Colormap,XColor*,int))
   3.159 +SDL_X11_SYM(1,int,XQueryKeymap,(Display*,char [32]))
   3.160 +SDL_X11_SYM(1,Bool,XQueryPointer,(Display*,Window,Window*,Window*,int*,int*,int*,int*,unsigned int*))
   3.161 +SDL_X11_SYM(1,int,XRaiseWindow,(Display*,Window))
   3.162 +SDL_X11_SYM(1,int,XReparentWindow,(Display*,Window,Window,int,int))
   3.163 +SDL_X11_SYM(1,int,XResizeWindow,(Display*,Window,unsigned int,unsigned int))
   3.164 +SDL_X11_SYM(1,int,XSelectInput,(Display*,Window,long))
   3.165 +SDL_X11_SYM(1,Status,XSendEvent,(Display*,Window,Bool,long,XEvent*))
   3.166 +SDL_X11_SYM(1,int,XSetClassHint,(Display*,Window,XClassHint*))
   3.167 +SDL_X11_SYM(1,XErrorHandler,XSetErrorHandler,(XErrorHandler))
   3.168 +SDL_X11_SYM(1,XIOErrorHandler,XSetIOErrorHandler,(XIOErrorHandler))
   3.169 +SDL_X11_SYM(1,int,XSetTransientForHint,(Display*,Window,Window))
   3.170 +SDL_X11_SYM(1,int,XSetWMHints,(Display*,Window,XWMHints*))
   3.171 +SDL_X11_SYM(1,void,XSetWMIconName,(Display*,Window,XTextProperty*))
   3.172 +SDL_X11_SYM(1,void,XSetWMName,(Display*,Window,XTextProperty*))
   3.173 +SDL_X11_SYM(1,void,XSetWMNormalHints,(Display*,Window,XSizeHints*))
   3.174 +SDL_X11_SYM(1,Status,XSetWMProtocols,(Display*,Window,Atom*,int))
   3.175 +SDL_X11_SYM(1,int,XSetWindowBackground,(Display*,Window,unsigned long))
   3.176 +SDL_X11_SYM(1,int,XSetWindowBackgroundPixmap,(Display*,Window,Pixmap))
   3.177 +SDL_X11_SYM(1,int,XSetWindowColormap,(Display*,Window,Colormap))
   3.178 +SDL_X11_SYM(1,int,XStoreColors,(Display*,Colormap,XColor*,int))
   3.179 +SDL_X11_SYM(1,Status,XStringListToTextProperty,(char**,int,XTextProperty*))
   3.180 +SDL_X11_SYM(1,int,XSync,(Display*,Bool))
   3.181 +SDL_X11_SYM(1,int,XUngrabKeyboard,(Display*,Time))
   3.182 +SDL_X11_SYM(1,int,XUngrabPointer,(Display*,Time))
   3.183 +SDL_X11_SYM(1,int,XUnmapWindow,(Display*,Window))
   3.184 +SDL_X11_SYM(1,int,XWarpPointer,(Display*,Window,Window,int,int,unsigned int,unsigned int,int,int))
   3.185 +SDL_X11_SYM(1,VisualID,XVisualIDFromVisual,(Visual*))
   3.186 +SDL_X11_SYM(1,XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo*,Display*,char*,XExtensionHooks*,int,XPointer))
   3.187 +SDL_X11_SYM(1,XExtensionInfo*,XextCreateExtension,(void))
   3.188 +SDL_X11_SYM(1,void,XextDestroyExtension,(XExtensionInfo*))
   3.189 +SDL_X11_SYM(1,XExtDisplayInfo*,XextFindDisplay,(XExtensionInfo*,Display*))
   3.190 +SDL_X11_SYM(1,int,XextRemoveDisplay,(XExtensionInfo*,Display*))
   3.191  #ifdef X_HAVE_UTF8_STRING
   3.192 -SDL_X11_SYM(int,Xutf8TextListToTextProperty,(Display*,char**,int,XICCEncodingStyle,XTextProperty*))
   3.193 -SDL_X11_SYM(int,Xutf8LookupString,(XIC,XKeyPressedEvent*,char*,int,KeySym*,Status*))
   3.194 -SDL_X11_SYM(XIC,XCreateIC,(XIM, ...))
   3.195 -SDL_X11_SYM(void,XDestroyIC,(XIC))
   3.196 -SDL_X11_SYM(void,XSetICFocus,(XIC))
   3.197 -SDL_X11_SYM(void,XUnsetICFocus,(XIC))
   3.198 -SDL_X11_SYM(XIM,XOpenIM,(Display*,struct _XrmHashBucketRec*,char*,char*))
   3.199 -SDL_X11_SYM(Status,XCloseIM,(XIM))
   3.200 +SDL_X11_SYM(1,int,Xutf8TextListToTextProperty,(Display*,char**,int,XICCEncodingStyle,XTextProperty*))
   3.201 +SDL_X11_SYM(1,int,Xutf8LookupString,(XIC,XKeyPressedEvent*,char*,int,KeySym*,Status*))
   3.202 +SDL_X11_SYM(1,XIC,XCreateIC,(XIM, ...))
   3.203 +SDL_X11_SYM(1,void,XDestroyIC,(XIC))
   3.204 +SDL_X11_SYM(1,void,XSetICFocus,(XIC))
   3.205 +SDL_X11_SYM(1,void,XUnsetICFocus,(XIC))
   3.206 +SDL_X11_SYM(1,XIM,XOpenIM,(Display*,struct _XrmHashBucketRec*,char*,char*))
   3.207 +SDL_X11_SYM(1,Status,XCloseIM,(XIM))
   3.208  #endif
   3.209 -SDL_X11_SYM(void,_XEatData,(Display*,unsigned long))
   3.210 -SDL_X11_SYM(void,_XFlush,(Display*))
   3.211 -SDL_X11_SYM(void,_XFlushGCCache,(Display*,GC))
   3.212 -SDL_X11_SYM(int,_XRead,(Display*,char*,long))
   3.213 -SDL_X11_SYM(void,_XReadPad,(Display*,char*,long))
   3.214 -SDL_X11_SYM(void,_XSend,(Display*,_Xconst char*,long))
   3.215 -SDL_X11_SYM(Status,_XReply,(Display*,xReply*,int,Bool))
   3.216 -SDL_X11_SYM(unsigned long,_XSetLastRequestRead,(Display*,xGenericReply*))
   3.217 -SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len))
   3.218 -SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len))
   3.219 +SDL_X11_SYM(1,void,_XEatData,(Display*,unsigned long))
   3.220 +SDL_X11_SYM(1,void,_XFlush,(Display*))
   3.221 +SDL_X11_SYM(1,void,_XFlushGCCache,(Display*,GC))
   3.222 +SDL_X11_SYM(1,int,_XRead,(Display*,char*,long))
   3.223 +SDL_X11_SYM(1,void,_XReadPad,(Display*,char*,long))
   3.224 +SDL_X11_SYM(1,void,_XSend,(Display*,_Xconst char*,long))
   3.225 +SDL_X11_SYM(1,Status,_XReply,(Display*,xReply*,int,Bool))
   3.226 +SDL_X11_SYM(1,unsigned long,_XSetLastRequestRead,(Display*,xGenericReply*))
   3.227 +SDL_X11_SYM(0,int,_XData32,(Display *dpy,register long *data,unsigned len))
   3.228 +SDL_X11_SYM(0,void,_XRead32,(Display *dpy,register long *data,long len))
   3.229  
   3.230  #if NeedWidePrototypes
   3.231 -SDL_X11_SYM(KeySym,XKeycodeToKeysym,(Display*,unsigned int,int))
   3.232 +SDL_X11_SYM(1,KeySym,XKeycodeToKeysym,(Display*,unsigned int,int))
   3.233  #else
   3.234 -SDL_X11_SYM(KeySym,XKeycodeToKeysym,(Display*,KeyCode,int))
   3.235 +SDL_X11_SYM(1,KeySym,XKeycodeToKeysym,(Display*,KeyCode,int))
   3.236  #endif
   3.237  
   3.238  #ifndef NO_SHARED_MEMORY
   3.239 -SDL_X11_SYM(Status,XShmAttach,(Display*,XShmSegmentInfo*))
   3.240 -SDL_X11_SYM(Status,XShmDetach,(Display*,XShmSegmentInfo*))
   3.241 -SDL_X11_SYM(Status,XShmPutImage,(Display*,Drawable,GC,XImage*,int,int,int,int,unsigned int,unsigned int,Bool))
   3.242 -SDL_X11_SYM(XImage*,XShmCreateImage,(Display*,Visual*,unsigned int,int,char*,XShmSegmentInfo*,unsigned int,unsigned int))
   3.243 -SDL_X11_SYM(Bool,XShmQueryExtension,(Display*))
   3.244 +SDL_X11_SYM(1,Status,XShmAttach,(Display*,XShmSegmentInfo*))
   3.245 +SDL_X11_SYM(1,Status,XShmDetach,(Display*,XShmSegmentInfo*))
   3.246 +SDL_X11_SYM(1,Status,XShmPutImage,(Display*,Drawable,GC,XImage*,int,int,int,int,unsigned int,unsigned int,Bool))
   3.247 +SDL_X11_SYM(1,XImage*,XShmCreateImage,(Display*,Visual*,unsigned int,int,char*,XShmSegmentInfo*,unsigned int,unsigned int))
   3.248 +SDL_X11_SYM(1,Bool,XShmQueryExtension,(Display*))
   3.249  #endif
   3.250  
   3.251 -SDL_X11_SYM(SDL_X11_XSynchronizeRetType,XSynchronize,(Display*,Bool))
   3.252 -SDL_X11_SYM(SDL_X11_XESetWireToEventRetType,XESetWireToEvent,(Display*,int,SDL_X11_XESetWireToEventRetType))
   3.253 -SDL_X11_SYM(SDL_X11_XESetEventToWireRetType,XESetEventToWire,(Display*,int,SDL_X11_XESetEventToWireRetType))
   3.254 +SDL_X11_SYM(1,SDL_X11_XSynchronizeRetType,XSynchronize,(Display*,Bool))
   3.255 +SDL_X11_SYM(1,SDL_X11_XESetWireToEventRetType,XESetWireToEvent,(Display*,int,SDL_X11_XESetWireToEventRetType))
   3.256 +SDL_X11_SYM(1,SDL_X11_XESetEventToWireRetType,XESetEventToWire,(Display*,int,SDL_X11_XESetEventToWireRetType))
   3.257  
   3.258  /* end of SDL_x11sym.h ... */
   3.259