src/video/x11/SDL_x11video.h
author Philipp Wiesemann <philipp.wiesemann@arcor.de>
Sun, 30 Oct 2016 21:01:33 +0100
changeset 10563 e3d84016cb79
parent 10496 6660aa9120d6
child 10570 251691cfeaa0
permissions -rw-r--r--
Fixed outdated info in README.
slouken@1950
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 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
icculus@9657
    37
#if SDL_VIDEO_DRIVER_X11_XDBE
icculus@9657
    38
#include <X11/extensions/Xdbe.h>
icculus@9657
    39
#endif
slouken@1950
    40
#if SDL_VIDEO_DRIVER_X11_XINERAMA
slouken@5408
    41
#include <X11/extensions/Xinerama.h>
slouken@5408
    42
#endif
slouken@6311
    43
#if SDL_VIDEO_DRIVER_X11_XINPUT2
slouken@6311
    44
#include <X11/extensions/XInput2.h>
slouken@1950
    45
#endif
slouken@1950
    46
#if SDL_VIDEO_DRIVER_X11_XRANDR
slouken@1950
    47
#include <X11/extensions/Xrandr.h>
slouken@1950
    48
#endif
slouken@5408
    49
#if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
slouken@3025
    50
#include <X11/extensions/scrnsaver.h>
slouken@3025
    51
#endif
icculus@4794
    52
#if SDL_VIDEO_DRIVER_X11_XSHAPE
icculus@4794
    53
#include <X11/extensions/shape.h>
icculus@4794
    54
#endif
slouken@5408
    55
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
slouken@5408
    56
#include <X11/extensions/xf86vmode.h>
slouken@5408
    57
#endif
slouken@1950
    58
alex@8889
    59
#include "../../core/linux/SDL_dbus.h"
slouken@10496
    60
#include "../../core/linux/SDL_ime.h"
icculus@6774
    61
slouken@1950
    62
#include "SDL_x11dyn.h"
slouken@1950
    63
slouken@4508
    64
#include "SDL_x11clipboard.h"
slouken@1951
    65
#include "SDL_x11events.h"
slouken@1951
    66
#include "SDL_x11keyboard.h"
slouken@1951
    67
#include "SDL_x11modes.h"
slouken@1951
    68
#include "SDL_x11mouse.h"
slouken@1952
    69
#include "SDL_x11opengl.h"
slouken@1951
    70
#include "SDL_x11window.h"
slouken@1951
    71
slouken@1950
    72
/* Private display data */
slouken@1950
    73
slouken@1950
    74
typedef struct SDL_VideoData
slouken@1950
    75
{
slouken@1950
    76
    Display *display;
slouken@1951
    77
    char *classname;
mail@6167
    78
    pid_t pid;
slouken@1951
    79
    XIM im;
slouken@3025
    80
    Uint32 screensaver_activity;
slouken@1951
    81
    int numwindows;
slouken@1951
    82
    SDL_WindowData **windowlist;
bob@2324
    83
    int windowlistlength;
icculus@10023
    84
    XID window_group;
slouken@4518
    85
slouken@4518
    86
    /* This is true for ICCCM2.0-compliant window managers */
slouken@4518
    87
    SDL_bool net_wm;
slouken@4518
    88
slouken@4518
    89
    /* Useful atoms */
icculus@6637
    90
    Atom WM_PROTOCOLS;
slouken@1951
    91
    Atom WM_DELETE_WINDOW;
icculus@10029
    92
    Atom WM_TAKE_FOCUS;
slouken@4518
    93
    Atom _NET_WM_STATE;
slouken@4518
    94
    Atom _NET_WM_STATE_HIDDEN;
slouken@6481
    95
    Atom _NET_WM_STATE_FOCUSED;
slouken@4518
    96
    Atom _NET_WM_STATE_MAXIMIZED_VERT;
slouken@4518
    97
    Atom _NET_WM_STATE_MAXIMIZED_HORZ;
slouken@4518
    98
    Atom _NET_WM_STATE_FULLSCREEN;
icculus@10021
    99
    Atom _NET_WM_STATE_ABOVE;
icculus@10021
   100
    Atom _NET_WM_STATE_SKIP_TASKBAR;
icculus@10021
   101
    Atom _NET_WM_STATE_SKIP_PAGER;
icculus@6466
   102
    Atom _NET_WM_ALLOWED_ACTIONS;
icculus@6466
   103
    Atom _NET_WM_ACTION_FULLSCREEN;
slouken@4518
   104
    Atom _NET_WM_NAME;
slouken@4518
   105
    Atom _NET_WM_ICON_NAME;
slouken@4518
   106
    Atom _NET_WM_ICON;
icculus@6638
   107
    Atom _NET_WM_PING;
icculus@10025
   108
    Atom _NET_WM_WINDOW_OPACITY;
icculus@10006
   109
    Atom _NET_WM_USER_TIME;
slouken@6970
   110
    Atom _NET_ACTIVE_WINDOW;
icculus@10102
   111
    Atom _NET_FRAME_EXTENTS;
slouken@4518
   112
    Atom UTF8_STRING;
slouken@7001
   113
    Atom PRIMARY;
slouken@7001
   114
    Atom XdndEnter;
slouken@7001
   115
    Atom XdndPosition;
slouken@7001
   116
    Atom XdndStatus;
slouken@7001
   117
    Atom XdndTypeList;
slouken@7001
   118
    Atom XdndActionCopy;
slouken@7001
   119
    Atom XdndDrop;
slouken@7001
   120
    Atom XdndFinished;
slouken@7001
   121
    Atom XdndSelection;
icculus@9845
   122
    Atom XKLAVIER_STATE;
slouken@7191
   123
slouken@5218
   124
    SDL_Scancode key_layout[256];
slouken@7191
   125
    SDL_bool selection_waiting;
icculus@6774
   126
icculus@9319
   127
    Uint32 last_mode_change_deadline;
icculus@10018
   128
icculus@10018
   129
    SDL_bool global_mouse_changed;
icculus@10018
   130
    SDL_Point global_mouse_position;
icculus@10018
   131
    Uint32 global_mouse_buttons;
slouken@10439
   132
slouken@10439
   133
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
slouken@10439
   134
    XkbDescPtr xkb;
slouken@10439
   135
#endif
slouken@1950
   136
} SDL_VideoData;
slouken@1950
   137
slouken@5466
   138
extern SDL_bool X11_UseDirectColorVisuals(void);
slouken@5466
   139
slouken@1950
   140
#endif /* _SDL_x11video_h */
slouken@1950
   141
slouken@1950
   142
/* vi: set ts=4 sw=4 expandtab: */