src/video/SDL_sysvideo.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 19 Aug 2007 14:52:52 +0000
changeset 2268 4baee598306d
parent 2245 989fb86ad1ec
child 2303 d87417504c75
permissions -rw-r--r--
Date: Thu, 05 Jul 2007 14:02:33 -0700
From: Sam Lantinga
Subject: SDL 1.3 keyboard plan

After lots of discussion with Christian, this is what we came up with:

> So, to sum up...
> SDLK_* become the physical keys, starting at > (1<<21)
> We create a macro SDLK_INDEX(X)
> We have two functions SDL_GetLayoutKey(SDLKey) and SDL_GetKeyName()
> SDL_GetLayoutKey maps to UCS4 for printable characters, and SDLK* for
non-printable characters
> and does so based on the OS's current keyboard layout
> SDL_GetKeyName() handles both SDLK_* and UCS4, converting UCS4 to UTF-8 and
converting SDLK_* into our names, which are UTF-8 for printable characters.
> WASD folks use SDLK_*, and 'I' folks use SDL_GetLayoutKey(SDLK_*)

Here is the patch he came up with, and his e-mail about it:

Date: Fri, 17 Aug 2007 19:50:28 +0200
From: Christian Walther
Subject: Re: SDL 1.3 keyboard plan

> Sounds great, go ahead and send me a patch.

Here goes! Thanks for having a look. Don't hesitate to comment if
anything does not conform to your ideas.

One caveat: Committing this now may break compilability of some video
drivers - specifically, if they use any of the SDLK_* codes that were
obsoleted and moved into SDL_compat.h. I only tried Cocoa (which did
break, but is already fixed) and X11 (which didn't, but then its key
handling is #iffed out). If that's a problem, it may need to go into
a branch.

-Christian
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@0
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@252
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@1402
    22
#include "SDL_config.h"
slouken@0
    23
slouken@0
    24
#ifndef _SDL_sysvideo_h
slouken@0
    25
#define _SDL_sysvideo_h
slouken@0
    26
slouken@0
    27
#include "SDL_mouse.h"
slouken@2268
    28
#include "SDL_keysym.h"
slouken@0
    29
slouken@0
    30
/* The SDL video driver */
slouken@1895
    31
slouken@1895
    32
typedef struct SDL_Window SDL_Window;
slouken@1895
    33
typedef struct SDL_Texture SDL_Texture;
slouken@1895
    34
typedef struct SDL_Renderer SDL_Renderer;
slouken@1895
    35
typedef struct SDL_RenderDriver SDL_RenderDriver;
slouken@1895
    36
typedef struct SDL_VideoDisplay SDL_VideoDisplay;
slouken@0
    37
typedef struct SDL_VideoDevice SDL_VideoDevice;
slouken@0
    38
slouken@1895
    39
/* Define the SDL texture structure */
slouken@1895
    40
struct SDL_Texture
slouken@1895
    41
{
slouken@1895
    42
    Uint32 id;
slouken@1895
    43
slouken@1895
    44
    Uint32 format;      /**< The pixel format of the texture */
slouken@1895
    45
    int access;         /**< SDL_TextureAccess */
slouken@1895
    46
    int w;              /**< The width of the texture */
slouken@1895
    47
    int h;              /**< The height of the texture */
slouken@1985
    48
    int modMode;        /**< The texture modulation mode */
slouken@1985
    49
    int blendMode;      /**< The texture blend mode */
slouken@1985
    50
    int scaleMode;      /**< The texture scale mode */
slouken@1985
    51
    Uint8 r, g, b, a;   /**< Texture modulation values */
slouken@1895
    52
slouken@1895
    53
    SDL_Renderer *renderer;
slouken@1895
    54
slouken@1895
    55
    void *driverdata;   /**< Driver specific texture representation */
slouken@1895
    56
slouken@1895
    57
    SDL_Texture *next;
slouken@1895
    58
};
slouken@1895
    59
slouken@1895
    60
/* Define the SDL renderer structure */
slouken@1895
    61
struct SDL_Renderer
slouken@1895
    62
{
slouken@1923
    63
    int (*ActivateRenderer) (SDL_Renderer * renderer);
slouken@1970
    64
    int (*DisplayModeChanged) (SDL_Renderer * renderer);
slouken@1895
    65
    int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@1895
    66
    int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1895
    67
                               void **pixels, int *pitch);
slouken@1895
    68
    int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1895
    69
                              const SDL_Color * colors, int firstcolor,
slouken@1895
    70
                              int ncolors);
slouken@1895
    71
    int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1895
    72
                              SDL_Color * colors, int firstcolor,
slouken@1895
    73
                              int ncolors);
slouken@1985
    74
    int (*SetTextureColorMod) (SDL_Renderer * renderer,
slouken@1985
    75
                               SDL_Texture * texture);
slouken@1985
    76
    int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
slouken@1985
    77
                               SDL_Texture * texture);
slouken@1985
    78
    int (*SetTextureBlendMode) (SDL_Renderer * renderer,
slouken@1985
    79
                                SDL_Texture * texture);
slouken@1985
    80
    int (*SetTextureScaleMode) (SDL_Renderer * renderer,
slouken@1985
    81
                                SDL_Texture * texture);
slouken@1895
    82
    int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1895
    83
                          const SDL_Rect * rect, const void *pixels,
slouken@1895
    84
                          int pitch);
slouken@1895
    85
    int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1895
    86
                        const SDL_Rect * rect, int markDirty, void **pixels,
slouken@1895
    87
                        int *pitch);
slouken@1895
    88
    void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@1895
    89
    void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1895
    90
                          int numrects, const SDL_Rect * rects);
slouken@1985
    91
    int (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
slouken@1985
    92
                       Uint8 a, const SDL_Rect * rect);
slouken@1895
    93
    int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1985
    94
                       const SDL_Rect * srcrect, const SDL_Rect * dstrect);
slouken@1895
    95
    void (*RenderPresent) (SDL_Renderer * renderer);
slouken@1895
    96
    void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@1895
    97
slouken@1895
    98
    void (*DestroyRenderer) (SDL_Renderer * renderer);
slouken@1895
    99
slouken@1895
   100
    /* The current renderer info */
slouken@1895
   101
    SDL_RendererInfo info;
slouken@1895
   102
slouken@1895
   103
    /* The window associated with the renderer */
slouken@1895
   104
    SDL_WindowID window;
slouken@1895
   105
slouken@1895
   106
    void *driverdata;
slouken@1895
   107
};
slouken@1895
   108
slouken@1895
   109
/* Define the SDL render driver structure */
slouken@1895
   110
struct SDL_RenderDriver
slouken@1895
   111
{
slouken@1895
   112
    SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
slouken@1895
   113
slouken@1895
   114
    /* Info about the renderer capabilities */
slouken@1895
   115
    SDL_RendererInfo info;
slouken@1895
   116
};
slouken@1895
   117
slouken@1895
   118
/* Define the SDL window structure, corresponding to toplevel windows */
slouken@1895
   119
struct SDL_Window
slouken@1895
   120
{
slouken@1895
   121
    Uint32 id;
slouken@1895
   122
slouken@1895
   123
    char *title;
slouken@1895
   124
    int x, y;
slouken@1895
   125
    int w, h;
slouken@1895
   126
    Uint32 flags;
slouken@1895
   127
slouken@1895
   128
    int display;
slouken@1895
   129
    SDL_Renderer *renderer;
slouken@2245
   130
    SDL_GLContext context;
slouken@1895
   131
slouken@1895
   132
    void *userdata;
slouken@1895
   133
    void *driverdata;
slouken@1895
   134
};
slouken@1895
   135
#define FULLSCREEN_VISIBLE(W) \
slouken@1895
   136
    (((W)->flags & SDL_WINDOW_FULLSCREEN) && \
slouken@1895
   137
     ((W)->flags & SDL_WINDOW_SHOWN) && \
slouken@1895
   138
     !((W)->flags & SDL_WINDOW_MINIMIZED))
slouken@1895
   139
slouken@1895
   140
/* Define the SDL display structure
slouken@1895
   141
   This corresponds to physical monitors attached to the system.
slouken@1895
   142
 */
slouken@1895
   143
struct SDL_VideoDisplay
slouken@1895
   144
{
slouken@1895
   145
    int max_display_modes;
slouken@1895
   146
    int num_display_modes;
slouken@1895
   147
    SDL_DisplayMode *display_modes;
slouken@1895
   148
    SDL_DisplayMode desktop_mode;
slouken@1895
   149
    SDL_DisplayMode current_mode;
slouken@1970
   150
    SDL_DisplayMode fullscreen_mode;
slouken@1895
   151
    SDL_Palette *palette;
slouken@1895
   152
slouken@1895
   153
    Uint16 *gamma;
slouken@1895
   154
    Uint16 *saved_gamma;        /* (just offset into gamma) */
slouken@1895
   155
slouken@1895
   156
    int num_render_drivers;
slouken@1895
   157
    SDL_RenderDriver *render_drivers;
slouken@1895
   158
slouken@1895
   159
    int num_windows;
slouken@1895
   160
    SDL_Window *windows;
slouken@1895
   161
slouken@1895
   162
    SDL_Renderer *current_renderer;
slouken@1895
   163
slouken@1895
   164
    /* The hash list of textures */
slouken@1895
   165
    SDL_Texture *textures[64];
slouken@1895
   166
slouken@1895
   167
    SDL_VideoDevice *device;
slouken@1895
   168
slouken@1895
   169
    void *driverdata;
slouken@1895
   170
};
slouken@1895
   171
slouken@0
   172
/* Define the SDL video driver structure */
slouken@0
   173
#define _THIS	SDL_VideoDevice *_this
slouken@0
   174
slouken@1895
   175
struct SDL_VideoDevice
slouken@1895
   176
{
slouken@1895
   177
    /* * * */
slouken@1895
   178
    /* The name of this video driver */
slouken@1895
   179
    const char *name;
slouken@0
   180
slouken@1895
   181
    /* * * */
slouken@1895
   182
    /* Initialization/Query functions */
slouken@0
   183
slouken@1895
   184
    /* Initialize the native video subsystem, filling in the list
slouken@1895
   185
       of displays for this driver, returning 0 or -1 if there's an error.
slouken@1895
   186
     */
slouken@1895
   187
    int (*VideoInit) (_THIS);
slouken@0
   188
slouken@1913
   189
    /* Reverse the effects VideoInit() -- called if VideoInit() fails
slouken@1913
   190
       or if the application is shutting down the video subsystem.
slouken@1913
   191
     */
slouken@1913
   192
    void (*VideoQuit) (_THIS);
slouken@1913
   193
slouken@1895
   194
    /* * * */
slouken@1895
   195
    /* Display functions
slouken@1895
   196
     */
slouken@0
   197
slouken@1895
   198
    /* Get a list of the available display modes.
slouken@1895
   199
     * e.g.  SDL_AddDisplayMode(_this->current_display, mode)
slouken@1895
   200
     */
slouken@1895
   201
    void (*GetDisplayModes) (_THIS);
slouken@0
   202
slouken@1895
   203
    /* Setting the display mode is independent of creating windows,
slouken@1895
   204
     * so when the display mode is changed, all existing windows
slouken@1895
   205
     * should have their data updated accordingly, including the
slouken@1895
   206
     * display surfaces associated with them.
slouken@1895
   207
     */
slouken@1895
   208
    int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
slouken@0
   209
slouken@1895
   210
    /* Set the color entries of the display palette */
slouken@1895
   211
    int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
slouken@0
   212
slouken@1895
   213
    /* Get the color entries of the display palette */
slouken@1895
   214
    int (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
slouken@0
   215
slouken@1895
   216
    /* Set the gamma ramp */
slouken@1895
   217
    int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
slouken@0
   218
slouken@1895
   219
    /* Get the gamma ramp */
slouken@1895
   220
    int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
slouken@0
   221
slouken@1895
   222
    /* * * */
slouken@1895
   223
    /* Window functions
slouken@1895
   224
     */
slouken@1895
   225
    int (*CreateWindow) (_THIS, SDL_Window * window);
slouken@1895
   226
    int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
slouken@1895
   227
    void (*SetWindowTitle) (_THIS, SDL_Window * window);
slouken@1895
   228
    void (*SetWindowPosition) (_THIS, SDL_Window * window);
slouken@1895
   229
    void (*SetWindowSize) (_THIS, SDL_Window * window);
slouken@1895
   230
    void (*ShowWindow) (_THIS, SDL_Window * window);
slouken@1895
   231
    void (*HideWindow) (_THIS, SDL_Window * window);
slouken@1895
   232
    void (*RaiseWindow) (_THIS, SDL_Window * window);
slouken@1895
   233
    void (*MaximizeWindow) (_THIS, SDL_Window * window);
slouken@1895
   234
    void (*MinimizeWindow) (_THIS, SDL_Window * window);
slouken@1895
   235
    void (*RestoreWindow) (_THIS, SDL_Window * window);
slouken@1895
   236
    void (*SetWindowGrab) (_THIS, SDL_Window * window);
slouken@1895
   237
    void (*DestroyWindow) (_THIS, SDL_Window * window);
slouken@0
   238
slouken@1895
   239
    /* Get some platform dependent window information */
slouken@1895
   240
      SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
slouken@1895
   241
                                  struct SDL_SysWMinfo * info);
slouken@0
   242
slouken@1895
   243
    /* * * */
slouken@1912
   244
    /* OpenGL support
slouken@1912
   245
     */
slouken@1895
   246
    int (*GL_LoadLibrary) (_THIS, const char *path);
slouken@1895
   247
    void *(*GL_GetProcAddress) (_THIS, const char *proc);
slouken@1912
   248
      SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
slouken@1912
   249
    int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
slouken@1912
   250
    int (*GL_SetSwapInterval) (_THIS, int interval);
slouken@1912
   251
    int (*GL_GetSwapInterval) (_THIS);
slouken@1912
   252
    void (*GL_SwapWindow) (_THIS, SDL_Window * window);
slouken@1912
   253
    void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
slouken@0
   254
slouken@1895
   255
    /* * * */
slouken@1912
   256
    /* Event manager functions
slouken@1912
   257
     */
slouken@1895
   258
    void (*PumpEvents) (_THIS);
slouken@0
   259
slouken@2268
   260
    /* Get the layout key code corresponding to the given physical key code
slouken@2268
   261
     * according to the OS' current keyboard layout.
slouken@2268
   262
     *
slouken@2268
   263
     * - For character keys, this should return the Unicode code point of the
slouken@2268
   264
     * character that is generated when the key is pressed without shift or
slouken@2268
   265
     * any other modifiers.
slouken@2268
   266
     * - For non-character keys, this should return one of the SDLK_* constants
slouken@2268
   267
     * (usually the argument itself since these keys are typically layout-
slouken@2268
   268
     * independent). Make sure that all of these values returned by this
slouken@2268
   269
     * function have a suitable name defined, either the default from
slouken@2268
   270
     * SDL_keynames.h, or one set using SDL_SetKeyName() in VideoInit(). In
slouken@2268
   271
     * particular, if this function can return any of the codes whose default
slouken@2268
   272
     * names start with "SDLK_" (usually, it shouldn't, since these are layout-
slouken@2268
   273
     * dependent character keys), these names should be replaced by proper
slouken@2268
   274
     * user-readable names.
slouken@2268
   275
     * - If there are keys that cannot be adequately described by either a
slouken@2268
   276
     * single Unicode character or an SDLK_* constant, this function may return
slouken@2268
   277
     * a code with SDL_KEY_LAYOUT_SPECIAL_BIT set in the most significant byte
slouken@2268
   278
     * and an arbitrary value in the less significant 3 bytes. The
slouken@2268
   279
     * GetSpecialKeyName() function must then be implemented to take this code
slouken@2268
   280
     * and return a human-readable key name for it.
slouken@2268
   281
     * If the argument is not a physical key code or if translation of the key
slouken@2268
   282
     * code by the OS' keyboard layout fails for any reason, the argument must
slouken@2268
   283
     * be returned unchanged.
slouken@2268
   284
     *
slouken@2268
   285
     * On platforms that don't have the notion of a user-configurable keyboard
slouken@2268
   286
     * layout, this may be left unimplemented. The default implementation of
slouken@2268
   287
     * SDL_GetLayoutKey() then acts as the identity. The note about defining
slouken@2268
   288
     * key names above particularly applies in this case.
slouken@2268
   289
     */
slouken@2268
   290
      SDLKey(*GetLayoutKey) (_THIS, SDLKey physicalKey);
slouken@2268
   291
slouken@2268
   292
    /* Get a human-readable name for a special layout key code.
slouken@2268
   293
     * This only needs to be implemented if this driver's implementation of
slouken@2268
   294
     * GetLayoutKey() generates such codes (with SDL_KEY_LAYOUT_SPECIAL_BIT
slouken@2268
   295
     * set) - see above.
slouken@2268
   296
     */
slouken@2268
   297
    const char *(*GetSpecialKeyName) (_THIS, SDLKey layoutKey);
slouken@2268
   298
slouken@1895
   299
    /* * * */
slouken@1895
   300
    /* Data common to all drivers */
slouken@1895
   301
    int num_displays;
slouken@1895
   302
    SDL_VideoDisplay *displays;
slouken@1895
   303
    int current_display;
slouken@1895
   304
    Uint32 next_object_id;
slouken@0
   305
slouken@1895
   306
    /* * * */
slouken@1895
   307
    /* Data used by the GL drivers */
slouken@1895
   308
    struct
slouken@1895
   309
    {
slouken@1895
   310
        int red_size;
slouken@1895
   311
        int green_size;
slouken@1895
   312
        int blue_size;
slouken@1895
   313
        int alpha_size;
slouken@1895
   314
        int depth_size;
slouken@1895
   315
        int buffer_size;
slouken@1895
   316
        int stencil_size;
slouken@1895
   317
        int double_buffer;
slouken@1895
   318
        int accum_red_size;
slouken@1895
   319
        int accum_green_size;
slouken@1895
   320
        int accum_blue_size;
slouken@1895
   321
        int accum_alpha_size;
slouken@1895
   322
        int stereo;
slouken@1895
   323
        int multisamplebuffers;
slouken@1895
   324
        int multisamplesamples;
slouken@1895
   325
        int accelerated;
slouken@1895
   326
        int driver_loaded;
slouken@1895
   327
        char driver_path[256];
slouken@1895
   328
        void *dll_handle;
slouken@1895
   329
    } gl_config;
slouken@0
   330
slouken@1895
   331
    /* * * */
slouken@1895
   332
    /* Data private to this driver */
slouken@1895
   333
    void *driverdata;
slouken@1913
   334
    struct SDL_GLDriverData *gl_data;
slouken@0
   335
slouken@1895
   336
    /* * * */
slouken@1895
   337
    /* The function used to dispose of this structure */
slouken@1895
   338
    void (*free) (_THIS);
slouken@1895
   339
};
slouken@0
   340
slouken@1895
   341
typedef struct VideoBootStrap
slouken@1895
   342
{
slouken@1895
   343
    const char *name;
slouken@1895
   344
    const char *desc;
slouken@1895
   345
    int (*available) (void);
slouken@1895
   346
    SDL_VideoDevice *(*create) (int devindex);
slouken@0
   347
} VideoBootStrap;
slouken@0
   348
slouken@1931
   349
#if SDL_VIDEO_DRIVER_COCOA
slouken@1931
   350
extern VideoBootStrap COCOA_bootstrap;
slouken@1361
   351
#endif
slouken@1361
   352
#if SDL_VIDEO_DRIVER_X11
slouken@0
   353
extern VideoBootStrap X11_bootstrap;
slouken@0
   354
#endif
slouken@1361
   355
#if SDL_VIDEO_DRIVER_NANOX
slouken@30
   356
extern VideoBootStrap NX_bootstrap;
slouken@30
   357
#endif
slouken@1361
   358
#if SDL_VIDEO_DRIVER_IPOD
icculus@1140
   359
extern VideoBootStrap iPod_bootstrap;
icculus@1140
   360
#endif
slouken@1361
   361
#if SDL_VIDEO_DRIVER_WSCONS
slouken@1361
   362
extern VideoBootStrap WSCONS_bootstrap;
slouken@1361
   363
#endif
slouken@1361
   364
#if SDL_VIDEO_DRIVER_FBCON
slouken@0
   365
extern VideoBootStrap FBCON_bootstrap;
slouken@0
   366
#endif
slouken@1361
   367
#if SDL_VIDEO_DRIVER_DIRECTFB
slouken@167
   368
extern VideoBootStrap DirectFB_bootstrap;
slouken@167
   369
#endif
slouken@1361
   370
#if SDL_VIDEO_DRIVER_PS2GS
slouken@0
   371
extern VideoBootStrap PS2GS_bootstrap;
slouken@0
   372
#endif
slouken@1361
   373
#if SDL_VIDEO_DRIVER_VGL
slouken@75
   374
extern VideoBootStrap VGL_bootstrap;
slouken@75
   375
#endif
slouken@1361
   376
#if SDL_VIDEO_DRIVER_SVGALIB
slouken@0
   377
extern VideoBootStrap SVGALIB_bootstrap;
slouken@0
   378
#endif
slouken@1361
   379
#if SDL_VIDEO_DRIVER_GAPI
slouken@1361
   380
extern VideoBootStrap GAPI_bootstrap;
slouken@1361
   381
#endif
slouken@1895
   382
#if SDL_VIDEO_DRIVER_WIN32
slouken@1895
   383
extern VideoBootStrap WIN32_bootstrap;
slouken@1361
   384
#endif
slouken@1361
   385
#if SDL_VIDEO_DRIVER_BWINDOW
slouken@1361
   386
extern VideoBootStrap BWINDOW_bootstrap;
slouken@1361
   387
#endif
slouken@1361
   388
#if SDL_VIDEO_DRIVER_PHOTON
slouken@1361
   389
extern VideoBootStrap ph_bootstrap;
slouken@1361
   390
#endif
slouken@1361
   391
#if SDL_VIDEO_DRIVER_EPOC
slouken@1361
   392
extern VideoBootStrap EPOC_bootstrap;
slouken@1361
   393
#endif
slouken@1361
   394
#if SDL_VIDEO_DRIVER_XBIOS
slouken@1361
   395
extern VideoBootStrap XBIOS_bootstrap;
slouken@1361
   396
#endif
slouken@1361
   397
#if SDL_VIDEO_DRIVER_GEM
slouken@1361
   398
extern VideoBootStrap GEM_bootstrap;
slouken@1361
   399
#endif
slouken@1361
   400
#if SDL_VIDEO_DRIVER_DC
slouken@1361
   401
extern VideoBootStrap DC_bootstrap;
slouken@1361
   402
#endif
slouken@1361
   403
#if SDL_VIDEO_DRIVER_RISCOS
slouken@1361
   404
extern VideoBootStrap RISCOS_bootstrap;
slouken@1361
   405
#endif
slouken@1361
   406
#if SDL_VIDEO_DRIVER_OS2FS
slouken@1361
   407
extern VideoBootStrap OS2FSLib_bootstrap;
slouken@1361
   408
#endif
slouken@1361
   409
#if SDL_VIDEO_DRIVER_DUMMY
slouken@173
   410
extern VideoBootStrap DUMMY_bootstrap;
slouken@173
   411
#endif
slouken@1361
   412
slouken@1895
   413
#define SDL_CurrentDisplay	(_this->displays[_this->current_display])
slouken@0
   414
slouken@1895
   415
extern SDL_VideoDevice *SDL_GetVideoDevice();
slouken@1895
   416
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
slouken@1895
   417
extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
slouken@1895
   418
extern SDL_bool SDL_AddDisplayMode(int displayIndex,
slouken@1895
   419
                                   const SDL_DisplayMode * mode);
slouken@1895
   420
extern void SDL_AddRenderDriver(int displayIndex,
slouken@1895
   421
                                const SDL_RenderDriver * driver);
slouken@1895
   422
slouken@1928
   423
extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
slouken@1895
   424
extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID);
slouken@1895
   425
extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window);
slouken@1895
   426
slouken@1895
   427
extern void SDL_OnWindowShown(SDL_Window * window);
slouken@1895
   428
extern void SDL_OnWindowHidden(SDL_Window * window);
slouken@1970
   429
extern void SDL_OnWindowResized(SDL_Window * window);
slouken@1895
   430
extern void SDL_OnWindowFocusGained(SDL_Window * window);
slouken@1895
   431
extern void SDL_OnWindowFocusLost(SDL_Window * window);
slouken@1895
   432
extern SDL_WindowID SDL_GetFocusWindow(void);
slouken@0
   433
slouken@0
   434
#endif /* _SDL_sysvideo_h */
slouken@1895
   435
slouken@1895
   436
/* vi: set ts=4 sw=4 expandtab: */