src/video/x11/SDL_x11dyn.h
changeset 1950 a344e42bce3b
child 2325 c7bcf84ba1b9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/x11/SDL_x11dyn.h	Wed Jul 26 06:34:54 2006 +0000
     1.3 @@ -0,0 +1,89 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2004 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Library General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Library General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Library General Public
    1.19 +    License along with this library; if not, write to the Free
    1.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +#include "SDL_config.h"
    1.26 +
    1.27 +#ifndef _SDL_x11dyn_h
    1.28 +#define _SDL_x11dyn_h
    1.29 +
    1.30 +#include <X11/Xlib.h>
    1.31 +#include <X11/Xutil.h>
    1.32 +#include <X11/Xatom.h>
    1.33 +#include <X11/Xlibint.h>
    1.34 +#include <X11/Xproto.h>
    1.35 +
    1.36 +#include "../Xext/extensions/Xext.h"
    1.37 +#include "../Xext/extensions/extutil.h"
    1.38 +
    1.39 +#ifndef NO_SHARED_MEMORY
    1.40 +#include <sys/ipc.h>
    1.41 +#include <sys/shm.h>
    1.42 +#include <X11/extensions/XShm.h>
    1.43 +#endif
    1.44 +
    1.45 +#if SDL_VIDEO_DRIVER_X11_XRANDR
    1.46 +#include <X11/extensions/Xrandr.h>
    1.47 +#endif
    1.48 +
    1.49 +/*
    1.50 + * When using the "dynamic X11" functionality, we duplicate all the Xlib
    1.51 + *  symbols that would be referenced by SDL inside of SDL itself.
    1.52 + *  These duplicated symbols just serve as passthroughs to the functions
    1.53 + *  in Xlib, that was dynamically loaded.
    1.54 + *
    1.55 + * This allows us to use Xlib as-is when linking against it directly, but
    1.56 + *  also handles all the strange cases where there was code in the Xlib
    1.57 + *  headers that may or may not exist or vary on a given platform.
    1.58 + */
    1.59 +#ifdef __cplusplus
    1.60 +extern "C"
    1.61 +{
    1.62 +#endif
    1.63 +
    1.64 +/* evil function signatures... */
    1.65 +    typedef Bool(*SDL_X11_XESetWireToEventRetType) (Display *, XEvent *,
    1.66 +                                                    xEvent *);
    1.67 +    typedef int (*SDL_X11_XSynchronizeRetType) (Display *);
    1.68 +    typedef Status(*SDL_X11_XESetEventToWireRetType) (Display *, XEvent *,
    1.69 +                                                      xEvent *);
    1.70 +
    1.71 +    int SDL_X11_LoadSymbols(void);
    1.72 +    void SDL_X11_UnloadSymbols(void);
    1.73 +
    1.74 +/* That's really annoying...make this a function pointer no matter what. */
    1.75 +#ifdef X_HAVE_UTF8_STRING
    1.76 +    extern XIC(*pXCreateIC) (XIM, ...);
    1.77 +#endif
    1.78 +
    1.79 +/* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
    1.80 +#define SDL_X11_MODULE(modname) extern int SDL_X11_HAVE_##modname;
    1.81 +#define SDL_X11_SYM(rc,fn,params,args,ret)
    1.82 +#include "SDL_x11sym.h"
    1.83 +#undef SDL_X11_MODULE
    1.84 +#undef SDL_X11_SYM
    1.85 +
    1.86 +
    1.87 +#ifdef __cplusplus
    1.88 +}
    1.89 +#endif
    1.90 +
    1.91 +#endif                          /* !defined _SDL_x11dyn_h */
    1.92 +/* vi: set ts=4 sw=4 expandtab: */