PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/project/jni/sdl-1.3/src/video/x11/SDL_x11dyn.h

https://github.com/aichunyu/FFPlayer
C Header | 112 lines | 63 code | 14 blank | 35 comment | 0 complexity | 971bf37e06e6cb977ec0a4dc3b8a94fa MD5 | raw file
  1/*
  2  Simple DirectMedia Layer
  3  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
  4
  5  This software is provided 'as-is', without any express or implied
  6  warranty.  In no event will the authors be held liable for any damages
  7  arising from the use of this software.
  8
  9  Permission is granted to anyone to use this software for any purpose,
 10  including commercial applications, and to alter it and redistribute it
 11  freely, subject to the following restrictions:
 12
 13  1. The origin of this software must not be misrepresented; you must not
 14     claim that you wrote the original software. If you use this software
 15     in a product, an acknowledgment in the product documentation would be
 16     appreciated but is not required.
 17  2. Altered source versions must be plainly marked as such, and must not be
 18     misrepresented as being the original software.
 19  3. This notice may not be removed or altered from any source distribution.
 20*/
 21#include "SDL_config.h"
 22
 23#ifndef _SDL_x11dyn_h
 24#define _SDL_x11dyn_h
 25
 26#include <X11/Xlib.h>
 27#include <X11/Xutil.h>
 28#include <X11/Xatom.h>
 29
 30/* Apparently some X11 systems can't include this multiple times... */
 31#ifndef SDL_INCLUDED_XLIBINT_H
 32#define SDL_INCLUDED_XLIBINT_H 1
 33#include <X11/Xlibint.h>
 34#endif
 35
 36#include <X11/Xproto.h>
 37#include <X11/extensions/Xext.h>
 38#include <X11/extensions/extutil.h>
 39
 40#ifndef NO_SHARED_MEMORY
 41#include <sys/ipc.h>
 42#include <sys/shm.h>
 43#include <X11/extensions/XShm.h>
 44#endif
 45
 46#if SDL_VIDEO_DRIVER_X11_XCURSOR
 47#include <X11/Xcursor/Xcursor.h>
 48#endif
 49#if SDL_VIDEO_DRIVER_X11_XINERAMA
 50#include <X11/extensions/Xinerama.h>
 51#endif
 52#if SDL_VIDEO_DRIVER_X11_XINPUT
 53#include <X11/extensions/XInput.h>
 54#endif
 55#if SDL_VIDEO_DRIVER_X11_XRANDR
 56#include <X11/extensions/Xrandr.h>
 57#endif
 58#if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
 59#include <X11/extensions/scrnsaver.h>
 60#endif
 61#if SDL_VIDEO_DRIVER_X11_XSHAPE
 62#include <X11/extensions/shape.h>
 63#endif
 64#if SDL_VIDEO_DRIVER_X11_XVIDMODE
 65#include <X11/extensions/xf86vmode.h>
 66#endif
 67
 68/*
 69 * When using the "dynamic X11" functionality, we duplicate all the Xlib
 70 *  symbols that would be referenced by SDL inside of SDL itself.
 71 *  These duplicated symbols just serve as passthroughs to the functions
 72 *  in Xlib, that was dynamically loaded.
 73 *
 74 * This allows us to use Xlib as-is when linking against it directly, but
 75 *  also handles all the strange cases where there was code in the Xlib
 76 *  headers that may or may not exist or vary on a given platform.
 77 */
 78#ifdef __cplusplus
 79extern "C"
 80{
 81#endif
 82
 83/* evil function signatures... */
 84    typedef Bool(*SDL_X11_XESetWireToEventRetType) (Display *, XEvent *,
 85                                                    xEvent *);
 86    typedef int (*SDL_X11_XSynchronizeRetType) (Display *);
 87    typedef Status(*SDL_X11_XESetEventToWireRetType) (Display *, XEvent *,
 88                                                      xEvent *);
 89
 90    int SDL_X11_LoadSymbols(void);
 91    void SDL_X11_UnloadSymbols(void);
 92
 93/* That's really annoying...make these function pointers no matter what. */
 94#ifdef X_HAVE_UTF8_STRING
 95    extern XIC(*pXCreateIC) (XIM, ...);
 96    extern char *(*pXGetICValues) (XIC, ...);
 97#endif
 98
 99/* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
100#define SDL_X11_MODULE(modname) extern int SDL_X11_HAVE_##modname;
101#define SDL_X11_SYM(rc,fn,params,args,ret)
102#include "SDL_x11sym.h"
103#undef SDL_X11_MODULE
104#undef SDL_X11_SYM
105
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif                          /* !defined _SDL_x11dyn_h */
112/* vi: set ts=4 sw=4 expandtab: */