src/video/x11/SDL_x11video.h
author Sam Lantinga
Sun, 02 Feb 2014 00:53:27 -0800
changeset 8149 681eb46b8ac4
parent 8093 b43765095a6f
child 8229 437c4e5961e0
permissions -rw-r--r--
Fixed bug 2374 - Update copyright for 2014...

Is it that time already??
     1 /*
     2   Simple DirectMedia Layer
     3   Copyright (C) 1997-2014 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_internal.h"
    22 
    23 #ifndef _SDL_x11video_h
    24 #define _SDL_x11video_h
    25 
    26 #include "SDL_keycode.h"
    27 
    28 #include "../SDL_sysvideo.h"
    29 
    30 #include <X11/Xlib.h>
    31 #include <X11/Xutil.h>
    32 #include <X11/Xatom.h>
    33 
    34 #if SDL_VIDEO_DRIVER_X11_XCURSOR
    35 #include <X11/Xcursor/Xcursor.h>
    36 #endif
    37 #if SDL_VIDEO_DRIVER_X11_XINERAMA
    38 #include <X11/extensions/Xinerama.h>
    39 #endif
    40 #if SDL_VIDEO_DRIVER_X11_XINPUT2
    41 #include <X11/extensions/XInput2.h>
    42 #endif
    43 #if SDL_VIDEO_DRIVER_X11_XRANDR
    44 #include <X11/extensions/Xrandr.h>
    45 #endif
    46 #if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
    47 #include <X11/extensions/scrnsaver.h>
    48 #endif
    49 #if SDL_VIDEO_DRIVER_X11_XSHAPE
    50 #include <X11/extensions/shape.h>
    51 #endif
    52 #if SDL_VIDEO_DRIVER_X11_XVIDMODE
    53 #include <X11/extensions/xf86vmode.h>
    54 #endif
    55 
    56 #ifdef HAVE_DBUS_DBUS_H
    57 #define SDL_USE_LIBDBUS 1
    58 #include <dbus/dbus.h>
    59 #endif
    60 
    61 #include "SDL_x11dyn.h"
    62 
    63 #include "SDL_x11clipboard.h"
    64 #include "SDL_x11events.h"
    65 #include "SDL_x11keyboard.h"
    66 #include "SDL_x11modes.h"
    67 #include "SDL_x11mouse.h"
    68 #include "SDL_x11opengl.h"
    69 #include "SDL_x11window.h"
    70 
    71 /* Private display data */
    72 
    73 typedef struct SDL_VideoData
    74 {
    75     Display *display;
    76     char *classname;
    77     pid_t pid;
    78     XIM im;
    79     Uint32 screensaver_activity;
    80     int numwindows;
    81     SDL_WindowData **windowlist;
    82     int windowlistlength;
    83 
    84     /* This is true for ICCCM2.0-compliant window managers */
    85     SDL_bool net_wm;
    86 
    87     /* Useful atoms */
    88     Atom WM_PROTOCOLS;
    89     Atom WM_DELETE_WINDOW;
    90     Atom _NET_WM_STATE;
    91     Atom _NET_WM_STATE_HIDDEN;
    92     Atom _NET_WM_STATE_FOCUSED;
    93     Atom _NET_WM_STATE_MAXIMIZED_VERT;
    94     Atom _NET_WM_STATE_MAXIMIZED_HORZ;
    95     Atom _NET_WM_STATE_FULLSCREEN;
    96     Atom _NET_WM_ALLOWED_ACTIONS;
    97     Atom _NET_WM_ACTION_FULLSCREEN;
    98     Atom _NET_WM_NAME;
    99     Atom _NET_WM_ICON_NAME;
   100     Atom _NET_WM_ICON;
   101     Atom _NET_WM_PING;
   102     Atom _NET_ACTIVE_WINDOW;
   103     Atom UTF8_STRING;
   104     Atom PRIMARY;
   105     Atom XdndEnter;
   106     Atom XdndPosition;
   107     Atom XdndStatus;
   108     Atom XdndTypeList;
   109     Atom XdndActionCopy;
   110     Atom XdndDrop;
   111     Atom XdndFinished;
   112     Atom XdndSelection;
   113 
   114     SDL_Scancode key_layout[256];
   115     SDL_bool selection_waiting;
   116 
   117 #if SDL_USE_LIBDBUS
   118     DBusConnection *dbus;
   119 #endif
   120 } SDL_VideoData;
   121 
   122 extern SDL_bool X11_UseDirectColorVisuals(void);
   123 
   124 #endif /* _SDL_x11video_h */
   125 
   126 /* vi: set ts=4 sw=4 expandtab: */