src/video/x11/SDL_x11dyn.h
author Sam Lantinga
Tue, 08 Feb 2011 16:50:51 -0800
changeset 5229 c015d3e63631
parent 5183 227d81a4b66c
child 5262 b530ef003506
permissions -rw-r--r--
Fixed setting the texture unit, still doesn't work.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2010 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 
    24 #ifndef _SDL_x11dyn_h
    25 #define _SDL_x11dyn_h
    26 
    27 #include <X11/Xlib.h>
    28 #include <X11/Xutil.h>
    29 #include <X11/Xatom.h>
    30 
    31 /* Apparently some X11 systems can't include this multiple times... */
    32 #ifndef SDL_INCLUDED_XLIBINT_H
    33 #define SDL_INCLUDED_XLIBINT_H 1
    34 #include <X11/Xlibint.h>
    35 #endif
    36 
    37 #include <X11/Xproto.h>
    38 #include "../Xext/extensions/Xext.h"
    39 #include "../Xext/extensions/extutil.h"
    40 
    41 #ifndef NO_SHARED_MEMORY
    42 #include <sys/ipc.h>
    43 #include <sys/shm.h>
    44 #include <X11/extensions/XShm.h>
    45 #endif
    46 
    47 #if SDL_VIDEO_DRIVER_X11_XRANDR
    48 #include <X11/extensions/Xrandr.h>
    49 #endif
    50 
    51 #if SDL_VIDEO_DRIVER_X11_XINPUT
    52 #include <X11/extensions/XInput.h>
    53 #endif
    54 
    55 /*
    56  * When using the "dynamic X11" functionality, we duplicate all the Xlib
    57  *  symbols that would be referenced by SDL inside of SDL itself.
    58  *  These duplicated symbols just serve as passthroughs to the functions
    59  *  in Xlib, that was dynamically loaded.
    60  *
    61  * This allows us to use Xlib as-is when linking against it directly, but
    62  *  also handles all the strange cases where there was code in the Xlib
    63  *  headers that may or may not exist or vary on a given platform.
    64  */
    65 #ifdef __cplusplus
    66 extern "C"
    67 {
    68 #endif
    69 
    70 /* evil function signatures... */
    71     typedef Bool(*SDL_X11_XESetWireToEventRetType) (Display *, XEvent *,
    72                                                     xEvent *);
    73     typedef int (*SDL_X11_XSynchronizeRetType) (Display *);
    74     typedef Status(*SDL_X11_XESetEventToWireRetType) (Display *, XEvent *,
    75                                                       xEvent *);
    76 
    77     int SDL_X11_LoadSymbols(void);
    78     void SDL_X11_UnloadSymbols(void);
    79 
    80 /* That's really annoying...make these function pointers no matter what. */
    81 #ifdef X_HAVE_UTF8_STRING
    82     extern XIC(*pXCreateIC) (XIM, ...);
    83     extern char *(*pXGetICValues) (XIC, ...);
    84 #endif
    85 
    86 /* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
    87 #define SDL_X11_MODULE(modname) extern int SDL_X11_HAVE_##modname;
    88 #define SDL_X11_SYM(rc,fn,params,args,ret)
    89 #include "SDL_x11sym.h"
    90 #undef SDL_X11_MODULE
    91 #undef SDL_X11_SYM
    92 
    93 
    94 #ifdef __cplusplus
    95 }
    96 #endif
    97 
    98 #endif                          /* !defined _SDL_x11dyn_h */
    99 /* vi: set ts=4 sw=4 expandtab: */