src/video/x11/SDL_x11dyn.h
changeset 1168 045f186426e1
child 1169 4b3e2294782d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/x11/SDL_x11dyn.h	Sat Nov 05 19:53:37 2005 +0000
     1.3 @@ -0,0 +1,71 @@
     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 +
    1.26 +#ifndef _SDL_x11dyn_h
    1.27 +#define _SDL_x11dyn_h
    1.28 +
    1.29 +#include <X11/Xlib.h>
    1.30 +#include <X11/Xutil.h>
    1.31 +#include <X11/Xatom.h>
    1.32 +#include <X11/Xproto.h>
    1.33 +#include <X11/Xlibint.h>
    1.34 +#include <X11/extensions/extutil.h>
    1.35 +
    1.36 +#ifndef NO_SHARED_MEMORY
    1.37 +#include <sys/ipc.h>
    1.38 +#include <sys/shm.h>
    1.39 +#include <X11/extensions/XShm.h>
    1.40 +#endif
    1.41 +
    1.42 +/*
    1.43 + * Never reference Xlib directly...we might load it dynamically at runtime.
    1.44 + *  Even if we don't, for readability, we still use the function pointers
    1.45 + *  (although the symbol resolution will be done by the loader in that case).
    1.46 + *
    1.47 + * We define SDL_X11_SYM and include SDL_x11sym.h to accomplish various
    1.48 + *  goals, without having to duplicate those function signatures.
    1.49 + */
    1.50 +#ifdef __cplusplus
    1.51 +extern "C" {
    1.52 +#endif
    1.53 +
    1.54 +/* evil function signatures... */
    1.55 +typedef Bool (*SDL_X11_XESetWireToEventRetType)(Display*,XEvent*,xEvent*);
    1.56 +typedef int (*SDL_X11_XSynchronizeRetType)(Display*);
    1.57 +typedef Status (*SDL_X11_XESetEventToWireRetType)(Display*,XEvent*,xEvent*);
    1.58 +
    1.59 +#define SDL_X11_SYM(ret,fn,params) extern ret (*p##fn) params;
    1.60 +#include "SDL_x11sym.h"
    1.61 +#undef SDL_X11_SYM
    1.62 +
    1.63 +/* Macro in the xlib headers, not an actual symbol... */
    1.64 +#define pXDestroyImage XDestroyImage
    1.65 +
    1.66 +int SDL_X11_LoadSymbols(void);
    1.67 +void SDL_X11_UnloadSymbols(void);
    1.68 +
    1.69 +#ifdef __cplusplus
    1.70 +}
    1.71 +#endif
    1.72 +
    1.73 +#endif  /* !defined _SDL_x11dyn_h */
    1.74 +