src/video/x11/SDL_x11dyn.h
author Ryan C. Gordon <icculus@icculus.org>
Mon, 06 Apr 2015 00:10:54 -0400
changeset 9458 543298b36b28
parent 8149 681eb46b8ac4
child 9619 b94b6d0bff0f
permissions -rw-r--r--
This function can be static.
slouken@1950
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@8149
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
slouken@1950
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@1950
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@1950
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@1950
    20
*/
icculus@8093
    21
#include "../../SDL_internal.h"
slouken@1950
    22
slouken@1950
    23
#ifndef _SDL_x11dyn_h
slouken@1950
    24
#define _SDL_x11dyn_h
slouken@1950
    25
slouken@1950
    26
#include <X11/Xlib.h>
slouken@1950
    27
#include <X11/Xutil.h>
slouken@1950
    28
#include <X11/Xatom.h>
icculus@3633
    29
dimitris@6318
    30
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
dimitris@6318
    31
#include <X11/XKBlib.h>
dimitris@6318
    32
#endif
dimitris@6318
    33
icculus@3633
    34
/* Apparently some X11 systems can't include this multiple times... */
icculus@3633
    35
#ifndef SDL_INCLUDED_XLIBINT_H
icculus@3633
    36
#define SDL_INCLUDED_XLIBINT_H 1
slouken@1950
    37
#include <X11/Xlibint.h>
icculus@3633
    38
#endif
icculus@3633
    39
slouken@1950
    40
#include <X11/Xproto.h>
slouken@5408
    41
#include <X11/extensions/Xext.h>
slouken@5408
    42
#include <X11/extensions/extutil.h>
slouken@1950
    43
slouken@1950
    44
#ifndef NO_SHARED_MEMORY
slouken@1950
    45
#include <sys/ipc.h>
slouken@1950
    46
#include <sys/shm.h>
slouken@1950
    47
#include <X11/extensions/XShm.h>
slouken@1950
    48
#endif
slouken@1950
    49
slouken@5471
    50
#if SDL_VIDEO_DRIVER_X11_XCURSOR
slouken@5471
    51
#include <X11/Xcursor/Xcursor.h>
slouken@5471
    52
#endif
slouken@5408
    53
#if SDL_VIDEO_DRIVER_X11_XINERAMA
slouken@5408
    54
#include <X11/extensions/Xinerama.h>
slouken@5408
    55
#endif
slouken@6311
    56
#if SDL_VIDEO_DRIVER_X11_XINPUT2
slouken@6311
    57
#include <X11/extensions/XInput2.h>
slouken@5408
    58
#endif
slouken@1950
    59
#if SDL_VIDEO_DRIVER_X11_XRANDR
slouken@1950
    60
#include <X11/extensions/Xrandr.h>
slouken@1950
    61
#endif
slouken@5408
    62
#if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
slouken@5408
    63
#include <X11/extensions/scrnsaver.h>
slouken@5408
    64
#endif
slouken@5408
    65
#if SDL_VIDEO_DRIVER_X11_XSHAPE
slouken@5408
    66
#include <X11/extensions/shape.h>
slouken@5408
    67
#endif
slouken@5408
    68
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
slouken@5408
    69
#include <X11/extensions/xf86vmode.h>
icculus@2763
    70
#endif
icculus@2763
    71
slouken@1950
    72
#ifdef __cplusplus
slouken@1950
    73
extern "C"
slouken@1950
    74
{
slouken@1950
    75
#endif
slouken@1950
    76
slouken@1950
    77
/* evil function signatures... */
icculus@7827
    78
typedef Bool(*SDL_X11_XESetWireToEventRetType) (Display *, XEvent *, xEvent *);
icculus@7827
    79
typedef int (*SDL_X11_XSynchronizeRetType) (Display *);
icculus@7827
    80
typedef Status(*SDL_X11_XESetEventToWireRetType) (Display *, XEvent *, xEvent *);
slouken@1950
    81
icculus@7827
    82
int SDL_X11_LoadSymbols(void);
icculus@7827
    83
void SDL_X11_UnloadSymbols(void);
slouken@1950
    84
icculus@7827
    85
/* Declare all the function pointers and wrappers... */
icculus@7827
    86
#define SDL_X11_MODULE(modname)
icculus@7827
    87
#define SDL_X11_SYM(rc,fn,params,args,ret) \
icculus@7827
    88
    typedef rc (*SDL_DYNX11FN_##fn) params; \
icculus@7827
    89
    extern SDL_DYNX11FN_##fn X11_##fn;
icculus@7827
    90
#include "SDL_x11sym.h"
icculus@7827
    91
#undef SDL_X11_MODULE
icculus@7827
    92
#undef SDL_X11_SYM
icculus@7827
    93
icculus@7827
    94
/* Annoying varargs entry point... */
slouken@1950
    95
#ifdef X_HAVE_UTF8_STRING
icculus@7827
    96
typedef XIC(*SDL_DYNX11FN_XCreateIC) (XIM,...);
icculus@7827
    97
typedef char *(*SDL_DYNX11FN_XGetICValues) (XIC, ...);
icculus@7827
    98
extern SDL_DYNX11FN_XCreateIC X11_XCreateIC;
icculus@7827
    99
extern SDL_DYNX11FN_XGetICValues X11_XGetICValues;
slouken@1950
   100
#endif
slouken@1950
   101
slouken@1950
   102
/* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
slouken@1950
   103
#define SDL_X11_MODULE(modname) extern int SDL_X11_HAVE_##modname;
slouken@1950
   104
#define SDL_X11_SYM(rc,fn,params,args,ret)
slouken@1950
   105
#include "SDL_x11sym.h"
slouken@1950
   106
#undef SDL_X11_MODULE
slouken@1950
   107
#undef SDL_X11_SYM
slouken@1950
   108
slouken@1950
   109
#ifdef __cplusplus
slouken@1950
   110
}
slouken@1950
   111
#endif
slouken@1950
   112
slouken@1950
   113
#endif                          /* !defined _SDL_x11dyn_h */
slouken@1950
   114
/* vi: set ts=4 sw=4 expandtab: */