comparison src/video/x11/SDL_x11sym.h @ 2185:2032348afed1

This code adds support for DirectColor visuals to SDL 1.3. The support uses part of the Xmu library. To ensure that the library is available and to keep people form having to install yet another library I have added the essential parts of Xmu in src/video/extensions/XmuStdCmap and an include file in src/video/extensions. The support makes use of standard X11 mechanisms to create color maps and make sure that an application uses the same color map for each window/visual combination. This should make it possible for gamma support to be implemented based on a single color map per application. Hurm... it looks like "make indent" modified a few extra files. Those are getting committed too.
author Bob Pendleton <bob@pendleton.com>
date Thu, 12 Jul 2007 20:00:50 +0000
parents 420716272158
children a7cbc25071b6
comparison
equal deleted inserted replaced
2184:8f8516e79a13 2185:2032348afed1
23 /* *INDENT-OFF* */ 23 /* *INDENT-OFF* */
24 24
25 SDL_X11_MODULE(BASEXLIB) 25 SDL_X11_MODULE(BASEXLIB)
26 SDL_X11_SYM(XClassHint*,XAllocClassHint,(void),(),return) 26 SDL_X11_SYM(XClassHint*,XAllocClassHint,(void),(),return)
27 SDL_X11_SYM(Status,XAllocColor,(Display* a,Colormap b,XColor* c),(a,b,c),return) 27 SDL_X11_SYM(Status,XAllocColor,(Display* a,Colormap b,XColor* c),(a,b,c),return)
28 SDL_X11_SYM(Status,XAllocColorCells,(Display *a,Colormap b,Bool c,unsigned long d[],unsigned int e,unsigned long f[],unsigned int g),(a,b,c,d,e,f,g),return)
28 SDL_X11_SYM(XSizeHints*,XAllocSizeHints,(void),(),return) 29 SDL_X11_SYM(XSizeHints*,XAllocSizeHints,(void),(),return)
30 SDL_X11_SYM(XStandardColormap *,XAllocStandardColormap,(void),(),return)
29 SDL_X11_SYM(XWMHints*,XAllocWMHints,(void),(),return) 31 SDL_X11_SYM(XWMHints*,XAllocWMHints,(void),(),return)
30 SDL_X11_SYM(int,XChangePointerControl,(Display* a,Bool b,Bool c,int d,int e,int f),(a,b,c,d,e,f),return) 32 SDL_X11_SYM(int,XChangePointerControl,(Display* a,Bool b,Bool c,int d,int e,int f),(a,b,c,d,e,f),return)
31 SDL_X11_SYM(int,XChangeProperty,(Display* a,Window b,Atom c,Atom d,int e,int f,_Xconst unsigned char* g,int h),(a,b,c,d,e,f,g,h),return) 33 SDL_X11_SYM(int,XChangeProperty,(Display* a,Window b,Atom c,Atom d,int e,int f,_Xconst unsigned char* g,int h),(a,b,c,d,e,f,g,h),return)
32 SDL_X11_SYM(int,XChangeWindowAttributes,(Display* a,Window b,unsigned long c,XSetWindowAttributes* d),(a,b,c,d),return) 34 SDL_X11_SYM(int,XChangeWindowAttributes,(Display* a,Window b,unsigned long c,XSetWindowAttributes* d),(a,b,c,d),return)
33 SDL_X11_SYM(Bool,XCheckWindowEvent,(Display* a,Window b,long c,XEvent* d),(a,b,c,d),return) 35 SDL_X11_SYM(Bool,XCheckWindowEvent,(Display* a,Window b,long c,XEvent* d),(a,b,c,d),return)
44 SDL_X11_SYM(int,XDefineCursor,(Display* a,Window b,Cursor c),(a,b,c),return) 46 SDL_X11_SYM(int,XDefineCursor,(Display* a,Window b,Cursor c),(a,b,c),return)
45 SDL_X11_SYM(int,XDeleteProperty,(Display* a,Window b,Atom c),(a,b,c),return) 47 SDL_X11_SYM(int,XDeleteProperty,(Display* a,Window b,Atom c),(a,b,c),return)
46 SDL_X11_SYM(int,XDestroyWindow,(Display* a,Window b),(a,b),return) 48 SDL_X11_SYM(int,XDestroyWindow,(Display* a,Window b),(a,b),return)
47 SDL_X11_SYM(char*,XDisplayName,(_Xconst char* a),(a),return) 49 SDL_X11_SYM(char*,XDisplayName,(_Xconst char* a),(a),return)
48 SDL_X11_SYM(int,XEventsQueued,(Display* a,int b),(a,b),return) 50 SDL_X11_SYM(int,XEventsQueued,(Display* a,int b),(a,b),return)
49 SDL_X11_SYM(Bool,XFilterEvent,(XEvent *event, Window w),(event,w),return) 51 SDL_X11_SYM(Bool,XFilterEvent,(XEvent *event,Window w),(event,w),return)
50 SDL_X11_SYM(int,XFlush,(Display* a),(a),return) 52 SDL_X11_SYM(int,XFlush,(Display* a),(a),return)
51 SDL_X11_SYM(int,XFree,(void*a),(a),return) 53 SDL_X11_SYM(int,XFree,(void*a),(a),return)
52 SDL_X11_SYM(int,XFreeColormap,(Display* a,Colormap b),(a,b),return) 54 SDL_X11_SYM(int,XFreeColormap,(Display* a,Colormap b),(a,b),return)
53 SDL_X11_SYM(int,XFreeColors,(Display* a,Colormap b,unsigned long* c,int d,unsigned long e),(a,b,c,d,e),return) 55 SDL_X11_SYM(int,XFreeColors,(Display* a,Colormap b,unsigned long* c,int d,unsigned long e),(a,b,c,d,e),return)
54 SDL_X11_SYM(int,XFreeCursor,(Display* a,Cursor b),(a,b),return) 56 SDL_X11_SYM(int,XFreeCursor,(Display* a,Cursor b),(a,b),return)
56 SDL_X11_SYM(int,XFreeModifiermap,(XModifierKeymap* a),(a),return) 58 SDL_X11_SYM(int,XFreeModifiermap,(XModifierKeymap* a),(a),return)
57 SDL_X11_SYM(int,XFreePixmap,(Display* a,Pixmap b),(a,b),return) 59 SDL_X11_SYM(int,XFreePixmap,(Display* a,Pixmap b),(a,b),return)
58 SDL_X11_SYM(int,XGetErrorDatabaseText,(Display* a,_Xconst char* b,_Xconst char* c,_Xconst char* d,char* e,int f),(a,b,c,d,e,f),return) 60 SDL_X11_SYM(int,XGetErrorDatabaseText,(Display* a,_Xconst char* b,_Xconst char* c,_Xconst char* d,char* e,int f),(a,b,c,d,e,f),return)
59 SDL_X11_SYM(XModifierKeymap*,XGetModifierMapping,(Display* a),(a),return) 61 SDL_X11_SYM(XModifierKeymap*,XGetModifierMapping,(Display* a),(a),return)
60 SDL_X11_SYM(int,XGetPointerControl,(Display* a,int* b,int* c,int* d),(a,b,c,d),return) 62 SDL_X11_SYM(int,XGetPointerControl,(Display* a,int* b,int* c,int* d),(a,b,c,d),return)
61 SDL_X11_SYM(int,XGetScreenSaver,(Display* a,int* b,int* c,int* d, int* e),(a,b,c,d,e),return) 63 SDL_X11_SYM(int,XGetRGBColormaps,(Display* a,Window b,XStandardColormap **c,int *d,Atom e),(a,b,c,d,e),return)
64 SDL_X11_SYM(int,XGetScreenSaver,(Display* a,int* b,int* c,int* d,int* e),(a,b,c,d,e),return)
62 SDL_X11_SYM(XVisualInfo*,XGetVisualInfo,(Display* a,long b,XVisualInfo* c,int* d),(a,b,c,d),return) 65 SDL_X11_SYM(XVisualInfo*,XGetVisualInfo,(Display* a,long b,XVisualInfo* c,int* d),(a,b,c,d),return)
63 SDL_X11_SYM(XWMHints*,XGetWMHints,(Display* a,Window b),(a,b),return) 66 SDL_X11_SYM(XWMHints*,XGetWMHints,(Display* a,Window b),(a,b),return)
64 SDL_X11_SYM(Status,XGetWindowAttributes,(Display* a,Window b,XWindowAttributes* c),(a,b,c),return) 67 SDL_X11_SYM(Status,XGetWindowAttributes,(Display* a,Window b,XWindowAttributes* c),(a,b,c),return)
65 SDL_X11_SYM(int,XGrabKeyboard,(Display* a,Window b,Bool c,int d,int e,Time f),(a,b,c,d,e,f),return) 68 SDL_X11_SYM(int,XGrabKeyboard,(Display* a,Window b,Bool c,int d,int e,Time f),(a,b,c,d,e,f),return)
66 SDL_X11_SYM(int,XGrabPointer,(Display* a,Window b,Bool c,unsigned int d,int e,int f,Window g,Cursor h,Time i),(a,b,c,d,e,f,g,h,i),return) 69 SDL_X11_SYM(int,XGrabPointer,(Display* a,Window b,Bool c,unsigned int d,int e,int f,Window g,Cursor h,Time i),(a,b,c,d,e,f,g,h,i),return)
70 SDL_X11_SYM(int,XGrabServer,(Display* a),(a),return)
67 SDL_X11_SYM(Status,XIconifyWindow,(Display* a,Window b,int c),(a,b,c),return) 71 SDL_X11_SYM(Status,XIconifyWindow,(Display* a,Window b,int c),(a,b,c),return)
68 SDL_X11_SYM(int,XInstallColormap,(Display* a,Colormap b),(a,b),return) 72 SDL_X11_SYM(int,XInstallColormap,(Display* a,Colormap b),(a,b),return)
69 SDL_X11_SYM(KeyCode,XKeysymToKeycode,(Display* a,KeySym b),(a,b),return) 73 SDL_X11_SYM(KeyCode,XKeysymToKeycode,(Display* a,KeySym b),(a,b),return)
74 SDL_X11_SYM(int,XKillClient,(Display* a,XID b),(a,b),return)
70 SDL_X11_SYM(Atom,XInternAtom,(Display* a,_Xconst char* b,Bool c),(a,b,c),return) 75 SDL_X11_SYM(Atom,XInternAtom,(Display* a,_Xconst char* b,Bool c),(a,b,c),return)
71 SDL_X11_SYM(XPixmapFormatValues*,XListPixmapFormats,(Display* a,int* b),(a,b),return) 76 SDL_X11_SYM(XPixmapFormatValues*,XListPixmapFormats,(Display* a,int* b),(a,b),return)
72 SDL_X11_SYM(int,XLookupString,(XKeyEvent* a,char* b,int c,KeySym* d,XComposeStatus* e),(a,b,c,d,e),return) 77 SDL_X11_SYM(int,XLookupString,(XKeyEvent* a,char* b,int c,KeySym* d,XComposeStatus* e),(a,b,c,d,e),return)
73 SDL_X11_SYM(int,XMapRaised,(Display* a,Window b),(a,b),return) 78 SDL_X11_SYM(int,XMapRaised,(Display* a,Window b),(a,b),return)
74 SDL_X11_SYM(int,XMapWindow,(Display* a,Window b),(a,b),return) 79 SDL_X11_SYM(int,XMapWindow,(Display* a,Window b),(a,b),return)
89 SDL_X11_SYM(int,XReparentWindow,(Display* a,Window b,Window c,int d,int e),(a,b,c,d,e),return) 94 SDL_X11_SYM(int,XReparentWindow,(Display* a,Window b,Window c,int d,int e),(a,b,c,d,e),return)
90 SDL_X11_SYM(int,XResizeWindow,(Display* a,Window b,unsigned int c,unsigned int d),(a,b,c,d),return) 95 SDL_X11_SYM(int,XResizeWindow,(Display* a,Window b,unsigned int c,unsigned int d),(a,b,c,d),return)
91 SDL_X11_SYM(int,XSelectInput,(Display* a,Window b,long c),(a,b,c),return) 96 SDL_X11_SYM(int,XSelectInput,(Display* a,Window b,long c),(a,b,c),return)
92 SDL_X11_SYM(Status,XSendEvent,(Display* a,Window b,Bool c,long d,XEvent* e),(a,b,c,d,e),return) 97 SDL_X11_SYM(Status,XSendEvent,(Display* a,Window b,Bool c,long d,XEvent* e),(a,b,c,d,e),return)
93 SDL_X11_SYM(int,XSetClassHint,(Display* a,Window b,XClassHint* c),(a,b,c),return) 98 SDL_X11_SYM(int,XSetClassHint,(Display* a,Window b,XClassHint* c),(a,b,c),return)
99 SDL_X11_SYM(int,XSetCloseDownMode,(Display *a, int b),(a,b),return)
94 SDL_X11_SYM(XErrorHandler,XSetErrorHandler,(XErrorHandler a),(a),return) 100 SDL_X11_SYM(XErrorHandler,XSetErrorHandler,(XErrorHandler a),(a),return)
95 SDL_X11_SYM(XIOErrorHandler,XSetIOErrorHandler,(XIOErrorHandler a),(a),return) 101 SDL_X11_SYM(XIOErrorHandler,XSetIOErrorHandler,(XIOErrorHandler a),(a),return)
102 SDL_X11_SYM(void,XSetRGBColormaps,( Display *a,Window b,XStandardColormap *c,int d,Atom e),(a,b,c,d,e),return)
96 SDL_X11_SYM(int,XSetScreenSaver,(Display* a,int b,int c,int d,int e),(a,b,c,d,e),return) 103 SDL_X11_SYM(int,XSetScreenSaver,(Display* a,int b,int c,int d,int e),(a,b,c,d,e),return)
97 SDL_X11_SYM(int,XSetTransientForHint,(Display* a,Window b,Window c),(a,b,c),return) 104 SDL_X11_SYM(int,XSetTransientForHint,(Display* a,Window b,Window c),(a,b,c),return)
98 SDL_X11_SYM(int,XSetWMHints,(Display* a,Window b,XWMHints* c),(a,b,c),return) 105 SDL_X11_SYM(int,XSetWMHints,(Display* a,Window b,XWMHints* c),(a,b,c),return)
99 SDL_X11_SYM(void,XSetTextProperty,(Display* a,Window b,XTextProperty* c,Atom d),(a,b,c,d),) 106 SDL_X11_SYM(void,XSetTextProperty,(Display* a,Window b,XTextProperty* c,Atom d),(a,b,c,d),)
100 SDL_X11_SYM(void,XSetWMNormalHints,(Display* a,Window b,XSizeHints* c),(a,b,c),) 107 SDL_X11_SYM(void,XSetWMNormalHints,(Display* a,Window b,XSizeHints* c),(a,b,c),)
105 SDL_X11_SYM(int,XStoreColors,(Display* a,Colormap b,XColor* c,int d),(a,b,c,d),return) 112 SDL_X11_SYM(int,XStoreColors,(Display* a,Colormap b,XColor* c,int d),(a,b,c,d),return)
106 SDL_X11_SYM(Status,XStringListToTextProperty,(char** a,int b,XTextProperty* c),(a,b,c),return) 113 SDL_X11_SYM(Status,XStringListToTextProperty,(char** a,int b,XTextProperty* c),(a,b,c),return)
107 SDL_X11_SYM(int,XSync,(Display* a,Bool b),(a,b),return) 114 SDL_X11_SYM(int,XSync,(Display* a,Bool b),(a,b),return)
108 SDL_X11_SYM(int,XUngrabKeyboard,(Display* a,Time b),(a,b),return) 115 SDL_X11_SYM(int,XUngrabKeyboard,(Display* a,Time b),(a,b),return)
109 SDL_X11_SYM(int,XUngrabPointer,(Display* a,Time b),(a,b),return) 116 SDL_X11_SYM(int,XUngrabPointer,(Display* a,Time b),(a,b),return)
117 SDL_X11_SYM(int,XUngrabServer,(Display* a),(a),return)
110 SDL_X11_SYM(int,XUnmapWindow,(Display* a,Window b),(a,b),return) 118 SDL_X11_SYM(int,XUnmapWindow,(Display* a,Window b),(a,b),return)
111 SDL_X11_SYM(int,XWarpPointer,(Display* a,Window b,Window c,int d,int e,unsigned int f,unsigned int g,int h, int i),(a,b,c,d,e,f,g,h,i),return) 119 SDL_X11_SYM(int,XWarpPointer,(Display* a,Window b,Window c,int d,int e,unsigned int f,unsigned int g,int h,int i),(a,b,c,d,e,f,g,h,i),return)
112 SDL_X11_SYM(VisualID,XVisualIDFromVisual,(Visual* a),(a),return) 120 SDL_X11_SYM(VisualID,XVisualIDFromVisual,(Visual* a),(a),return)
113 SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return) 121 SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return)
114 SDL_X11_SYM(XExtensionInfo*,XextCreateExtension,(void),(),return) 122 SDL_X11_SYM(XExtensionInfo*,XextCreateExtension,(void),(),return)
115 SDL_X11_SYM(void,XextDestroyExtension,(XExtensionInfo* a),(a),) 123 SDL_X11_SYM(void,XextDestroyExtension,(XExtensionInfo* a),(a),)
116 SDL_X11_SYM(XExtDisplayInfo*,XextFindDisplay,(XExtensionInfo* a,Display* b),(a,b),return) 124 SDL_X11_SYM(XExtDisplayInfo*,XextFindDisplay,(XExtensionInfo* a,Display* b),(a,b),return)
172 * These only show up on some variants of Unix. 180 * These only show up on some variants of Unix.
173 */ 181 */
174 #if defined(__osf__) 182 #if defined(__osf__)
175 SDL_X11_MODULE(OSF_ENTRY_POINTS) 183 SDL_X11_MODULE(OSF_ENTRY_POINTS)
176 SDL_X11_SYM(void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr p),(dpy,p),) 184 SDL_X11_SYM(void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr p),(dpy,p),)
177 SDL_X11_SYM(void,_SmtIpError,(Display *dpy,register smtDisplayPtr p, int i),(dpy,p,i),) 185 SDL_X11_SYM(void,_SmtIpError,(Display *dpy,register smtDisplayPtr p,int i),(dpy,p,i),)
178 SDL_X11_SYM(int,ipAllocateData,(ChannelPtr a, IPCard b, IPDataPtr * c),(a,b,c),return) 186 SDL_X11_SYM(int,ipAllocateData,(ChannelPtr a,IPCard b,IPDataPtr * c),(a,b,c),return)
179 SDL_X11_SYM(int,ipUnallocateAndSendData,(ChannelPtr a, IPCard b),(a,b),return) 187 SDL_X11_SYM(int,ipUnallocateAndSendData,(ChannelPtr a,IPCard b),(a,b),return)
180 #endif 188 #endif
181 189
182 /* Xrandr support. */ 190 /* Xrandr support. */
183 #if SDL_VIDEO_DRIVER_X11_XRANDR 191 #if SDL_VIDEO_DRIVER_X11_XRANDR
184 SDL_X11_MODULE(XRANDR) 192 SDL_X11_MODULE(XRANDR)
185 SDL_X11_SYM(Status,XRRQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return) 193 SDL_X11_SYM(Status,XRRQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return)
186 SDL_X11_SYM(XRRScreenConfiguration *,XRRGetScreenInfo,(Display *dpy,Drawable draw),(dpy,draw),return) 194 SDL_X11_SYM(XRRScreenConfiguration *,XRRGetScreenInfo,(Display *dpy,Drawable draw),(dpy,draw),return)
187 SDL_X11_SYM(SizeID,XRRConfigCurrentConfiguration,(XRRScreenConfiguration *config,Rotation *rotation),(config,rotation),return) 195 SDL_X11_SYM(SizeID,XRRConfigCurrentConfiguration,(XRRScreenConfiguration *config,Rotation *rotation),(config,rotation),return)
188 SDL_X11_SYM(XRRScreenSize *,XRRConfigSizes,(XRRScreenConfiguration *config, int *nsizes),(config,nsizes),return) 196 SDL_X11_SYM(XRRScreenSize *,XRRConfigSizes,(XRRScreenConfiguration *config,int *nsizes),(config,nsizes),return)
189 SDL_X11_SYM(Status,XRRSetScreenConfig,(Display *dpy, XRRScreenConfiguration *config, Drawable draw, int size_index, Rotation rotation, Time timestamp),(dpy,config,draw,size_index,rotation,timestamp),return) 197 SDL_X11_SYM(Status,XRRSetScreenConfig,(Display *dpy,XRRScreenConfiguration *config,Drawable draw,int size_index,Rotation rotation,Time timestamp),(dpy,config,draw,size_index,rotation,timestamp),return)
190 SDL_X11_SYM(void,XRRFreeScreenConfigInfo,(XRRScreenConfiguration *config),(config),) 198 SDL_X11_SYM(void,XRRFreeScreenConfigInfo,(XRRScreenConfiguration *config),(config),)
191 #endif 199 #endif
192 200
193 /* DPMS support */ 201 /* DPMS support */
194 #if SDL_VIDEO_DRIVER_X11_DPMS 202 #if SDL_VIDEO_DRIVER_X11_DPMS