2 Simple DirectMedia Layer
3 Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
21 #include "SDL_config.h"
27 #include <X11/Xutil.h>
28 #include <X11/Xatom.h>
30 /* Apparently some X11 systems can't include this multiple times... */
31 #ifndef SDL_INCLUDED_XLIBINT_H
32 #define SDL_INCLUDED_XLIBINT_H 1
33 #include <X11/Xlibint.h>
36 #include <X11/Xproto.h>
37 #include <X11/extensions/Xext.h>
38 #include <X11/extensions/extutil.h>
40 #ifndef NO_SHARED_MEMORY
43 #include <X11/extensions/XShm.h>
46 #if SDL_VIDEO_DRIVER_X11_XCURSOR
47 #include <X11/Xcursor/Xcursor.h>
49 #if SDL_VIDEO_DRIVER_X11_XINERAMA
50 #include <X11/extensions/Xinerama.h>
52 #if SDL_VIDEO_DRIVER_X11_XINPUT
53 #include <X11/extensions/XInput.h>
55 #if SDL_VIDEO_DRIVER_X11_XRANDR
56 #include <X11/extensions/Xrandr.h>
58 #if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
59 #include <X11/extensions/scrnsaver.h>
61 #if SDL_VIDEO_DRIVER_X11_XSHAPE
62 #include <X11/extensions/shape.h>
64 #if SDL_VIDEO_DRIVER_X11_XVIDMODE
65 #include <X11/extensions/xf86vmode.h>
69 * When using the "dynamic X11" functionality, we duplicate all the Xlib
70 * symbols that would be referenced by SDL inside of SDL itself.
71 * These duplicated symbols just serve as passthroughs to the functions
72 * in Xlib, that was dynamically loaded.
74 * This allows us to use Xlib as-is when linking against it directly, but
75 * also handles all the strange cases where there was code in the Xlib
76 * headers that may or may not exist or vary on a given platform.
83 /* evil function signatures... */
84 typedef Bool(*SDL_X11_XESetWireToEventRetType) (Display *, XEvent *,
86 typedef int (*SDL_X11_XSynchronizeRetType) (Display *);
87 typedef Status(*SDL_X11_XESetEventToWireRetType) (Display *, XEvent *,
90 int SDL_X11_LoadSymbols(void);
91 void SDL_X11_UnloadSymbols(void);
93 /* That's really annoying...make these function pointers no matter what. */
94 #ifdef X_HAVE_UTF8_STRING
95 extern XIC(*pXCreateIC) (XIM, ...);
96 extern char *(*pXGetICValues) (XIC, ...);
99 /* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
100 #define SDL_X11_MODULE(modname) extern int SDL_X11_HAVE_##modname;
101 #define SDL_X11_SYM(rc,fn,params,args,ret)
102 #include "SDL_x11sym.h"
103 #undef SDL_X11_MODULE
111 #endif /* !defined _SDL_x11dyn_h */
112 /* vi: set ts=4 sw=4 expandtab: */