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