src/video/x11/SDL_x11video.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 26 May 2015 06:27:46 -0700
changeset 9619 b94b6d0bff0f
parent 9319 ad4f430cc9f5
child 9657 fbc01731d914
permissions -rw-r--r--
Updated the copyright year to 2015
slouken@1950
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@9619
     3
  Copyright (C) 1997-2015 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
alex@8889
    56
#include "../../core/linux/SDL_dbus.h"
alex@8889
    57
#include "../../core/linux/SDL_ibus.h"
icculus@6774
    58
slouken@1950
    59
#include "SDL_x11dyn.h"
slouken@1950
    60
slouken@4508
    61
#include "SDL_x11clipboard.h"
slouken@1951
    62
#include "SDL_x11events.h"
slouken@1951
    63
#include "SDL_x11keyboard.h"
slouken@1951
    64
#include "SDL_x11modes.h"
slouken@1951
    65
#include "SDL_x11mouse.h"
slouken@1952
    66
#include "SDL_x11opengl.h"
slouken@1951
    67
#include "SDL_x11window.h"
slouken@1951
    68
slouken@1950
    69
/* Private display data */
slouken@1950
    70
slouken@1950
    71
typedef struct SDL_VideoData
slouken@1950
    72
{
slouken@1950
    73
    Display *display;
slouken@1951
    74
    char *classname;
mail@6167
    75
    pid_t pid;
slouken@1951
    76
    XIM im;
slouken@3025
    77
    Uint32 screensaver_activity;
slouken@1951
    78
    int numwindows;
slouken@1951
    79
    SDL_WindowData **windowlist;
bob@2324
    80
    int windowlistlength;
slouken@4518
    81
slouken@4518
    82
    /* This is true for ICCCM2.0-compliant window managers */
slouken@4518
    83
    SDL_bool net_wm;
slouken@4518
    84
slouken@4518
    85
    /* Useful atoms */
icculus@6637
    86
    Atom WM_PROTOCOLS;
slouken@1951
    87
    Atom WM_DELETE_WINDOW;
slouken@4518
    88
    Atom _NET_WM_STATE;
slouken@4518
    89
    Atom _NET_WM_STATE_HIDDEN;
slouken@6481
    90
    Atom _NET_WM_STATE_FOCUSED;
slouken@4518
    91
    Atom _NET_WM_STATE_MAXIMIZED_VERT;
slouken@4518
    92
    Atom _NET_WM_STATE_MAXIMIZED_HORZ;
slouken@4518
    93
    Atom _NET_WM_STATE_FULLSCREEN;
icculus@6466
    94
    Atom _NET_WM_ALLOWED_ACTIONS;
icculus@6466
    95
    Atom _NET_WM_ACTION_FULLSCREEN;
slouken@4518
    96
    Atom _NET_WM_NAME;
slouken@4518
    97
    Atom _NET_WM_ICON_NAME;
slouken@4518
    98
    Atom _NET_WM_ICON;
icculus@6638
    99
    Atom _NET_WM_PING;
slouken@6970
   100
    Atom _NET_ACTIVE_WINDOW;
slouken@4518
   101
    Atom UTF8_STRING;
slouken@7001
   102
    Atom PRIMARY;
slouken@7001
   103
    Atom XdndEnter;
slouken@7001
   104
    Atom XdndPosition;
slouken@7001
   105
    Atom XdndStatus;
slouken@7001
   106
    Atom XdndTypeList;
slouken@7001
   107
    Atom XdndActionCopy;
slouken@7001
   108
    Atom XdndDrop;
slouken@7001
   109
    Atom XdndFinished;
slouken@7001
   110
    Atom XdndSelection;
slouken@7191
   111
slouken@5218
   112
    SDL_Scancode key_layout[256];
slouken@7191
   113
    SDL_bool selection_waiting;
icculus@6774
   114
icculus@9319
   115
    Uint32 last_mode_change_deadline;
slouken@1950
   116
} SDL_VideoData;
slouken@1950
   117
slouken@5466
   118
extern SDL_bool X11_UseDirectColorVisuals(void);
slouken@5466
   119
slouken@1950
   120
#endif /* _SDL_x11video_h */
slouken@1950
   121
slouken@1950
   122
/* vi: set ts=4 sw=4 expandtab: */