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