src/video/SDL_sysvideo.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 17 Jun 2006 06:45:14 +0000
branchSDL-1.3
changeset 1683 396a35389351
parent 1682 7ae8018b2e5d
child 1706 1577404809f0
permissions -rw-r--r--
Finished palettized display handling.
Added support for surface palette sharing.
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@0
    28
#define SDL_PROTOTYPES_ONLY
slouken@0
    29
#include "SDL_syswm.h"
slouken@0
    30
#undef SDL_PROTOTYPES_ONLY
slouken@0
    31
slouken@0
    32
/* This file prototypes the video driver implementation.
slouken@0
    33
   This is designed to be easily converted to C++ in the future.
slouken@0
    34
 */
slouken@0
    35
slouken@1361
    36
#if SDL_VIDEO_OPENGL
slouken@1402
    37
#include "SDL_opengl.h"
slouken@1361
    38
#endif /* SDL_VIDEO_OPENGL */
slouken@0
    39
slouken@0
    40
/* The SDL video driver */
slouken@1662
    41
slouken@1670
    42
typedef struct SDL_Window SDL_Window;
slouken@1670
    43
typedef struct SDL_Texture SDL_Texture;
slouken@1670
    44
typedef struct SDL_Renderer SDL_Renderer;
slouken@1670
    45
typedef struct SDL_RenderDriver SDL_RenderDriver;
slouken@1670
    46
typedef struct SDL_VideoDisplay SDL_VideoDisplay;
slouken@1670
    47
typedef struct SDL_VideoDevice SDL_VideoDevice;
slouken@1670
    48
slouken@1670
    49
/* Define the SDL texture structure */
slouken@1670
    50
struct SDL_Texture
slouken@1670
    51
{
slouken@1670
    52
    Uint32 id;
slouken@1670
    53
slouken@1670
    54
    Uint32 format;      /**< The pixel format of the texture */
slouken@1670
    55
    int access;         /**< SDL_TextureAccess */
slouken@1670
    56
    int w;              /**< The width of the texture */
slouken@1670
    57
    int h;              /**< The height of the texture */
slouken@1670
    58
slouken@1670
    59
    SDL_Renderer *renderer;
slouken@1670
    60
slouken@1670
    61
    void *driverdata;   /**< Driver specific texture representation */
slouken@1670
    62
slouken@1670
    63
    SDL_Texture *next;
slouken@1670
    64
};
slouken@1670
    65
slouken@1670
    66
/* Define the SDL renderer structure */
slouken@1670
    67
struct SDL_Renderer
slouken@1670
    68
{
slouken@1676
    69
    int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@1678
    70
    int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1678
    71
                               void **pixels, int *pitch);
slouken@1680
    72
    int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1681
    73
                              const SDL_Color * colors, int firstcolor,
slouken@1681
    74
                              int ncolors);
slouken@1681
    75
    int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1680
    76
                              SDL_Color * colors, int firstcolor,
slouken@1680
    77
                              int ncolors);
slouken@1676
    78
    int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1681
    79
                          const SDL_Rect * rect, const void *pixels,
slouken@1681
    80
                          int pitch);
slouken@1676
    81
    int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1681
    82
                        const SDL_Rect * rect, int markDirty, void **pixels,
slouken@1676
    83
                        int *pitch);
slouken@1676
    84
    void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@1676
    85
    void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1681
    86
                          int numrects, const SDL_Rect * rects);
slouken@1676
    87
    void (*SelectRenderTexture) (SDL_Renderer * renderer,
slouken@1676
    88
                                 SDL_Texture * texture);
slouken@1681
    89
    void (*RenderFill) (SDL_Renderer * renderer, const SDL_Rect * rect,
slouken@1676
    90
                        Uint32 color);
slouken@1676
    91
    int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@1681
    92
                       const SDL_Rect * srcrect, const SDL_Rect * dstrect,
slouken@1681
    93
                       int blendMode, int scaleMode);
slouken@1681
    94
    int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect,
slouken@1676
    95
                             void *pixels, int pitch);
slouken@1681
    96
    int (*RenderWritePixels) (SDL_Renderer * renderer, const SDL_Rect * rect,
slouken@1676
    97
                              const void *pixels, int pitch);
slouken@1676
    98
    void (*RenderPresent) (SDL_Renderer * renderer);
slouken@1676
    99
    void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@1670
   100
slouken@1670
   101
    void (*DestroyRenderer) (SDL_Renderer * renderer);
slouken@1670
   102
slouken@1670
   103
    /* The current renderer info */
slouken@1670
   104
    SDL_RendererInfo info;
slouken@1670
   105
slouken@1670
   106
    /* The window associated with the renderer */
slouken@1670
   107
    SDL_Window *window;
slouken@1670
   108
slouken@1670
   109
    void *driverdata;
slouken@1670
   110
};
slouken@1670
   111
slouken@1670
   112
/* Define the SDL render driver structure */
slouken@1670
   113
struct SDL_RenderDriver
slouken@1670
   114
{
slouken@1670
   115
    SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
slouken@1670
   116
slouken@1670
   117
    /* Info about the renderer capabilities */
slouken@1670
   118
    SDL_RendererInfo info;
slouken@1670
   119
};
slouken@1670
   120
slouken@1662
   121
/* Define the SDL window structure, corresponding to toplevel windows */
slouken@1662
   122
struct SDL_Window
slouken@1662
   123
{
slouken@1662
   124
    Uint32 id;
slouken@1662
   125
slouken@1662
   126
    char *title;
slouken@1662
   127
    int x, y;
slouken@1662
   128
    int w, h;
slouken@1662
   129
    Uint32 flags;
slouken@1662
   130
slouken@1662
   131
    Uint16 *gamma;
slouken@1662
   132
slouken@1676
   133
    SDL_VideoDisplay *display;
slouken@1670
   134
    SDL_Renderer *renderer;
slouken@1670
   135
slouken@1662
   136
    void *userdata;
slouken@1662
   137
    void *driverdata;
slouken@1662
   138
};
slouken@1662
   139
slouken@1662
   140
/* Define the SDL display structure
slouken@1662
   141
   This corresponds to physical monitors attached to the system.
slouken@1662
   142
 */
slouken@1670
   143
struct SDL_VideoDisplay
slouken@1662
   144
{
slouken@1662
   145
    int num_display_modes;
slouken@1662
   146
    SDL_DisplayMode *display_modes;
slouken@1662
   147
    SDL_DisplayMode desktop_mode;
slouken@1662
   148
    SDL_DisplayMode current_mode;
slouken@1683
   149
    SDL_Palette *palette;
slouken@1662
   150
slouken@1670
   151
    int num_render_drivers;
slouken@1670
   152
    SDL_RenderDriver *render_drivers;
slouken@1670
   153
slouken@1662
   154
    int num_windows;
slouken@1662
   155
    SDL_Window *windows;
slouken@1662
   156
slouken@1670
   157
    SDL_Renderer *current_renderer;
slouken@1670
   158
slouken@1670
   159
    /* The hash list of textures */
slouken@1670
   160
    SDL_Texture *textures[64];
slouken@1670
   161
slouken@1682
   162
    SDL_VideoDevice *device;
slouken@1682
   163
slouken@1662
   164
    void *driverdata;
slouken@1670
   165
};
slouken@0
   166
slouken@0
   167
/* Define the SDL video driver structure */
slouken@0
   168
#define _THIS	SDL_VideoDevice *_this
slouken@0
   169
slouken@1662
   170
struct SDL_VideoDevice
slouken@1662
   171
{
slouken@1662
   172
    /* * * */
slouken@1662
   173
    /* The name of this video driver */
slouken@1662
   174
    const char *name;
slouken@0
   175
slouken@1662
   176
    /* * * */
slouken@1662
   177
    /* Initialization/Query functions */
slouken@0
   178
slouken@1662
   179
    /* Initialize the native video subsystem, filling in the list
slouken@1662
   180
       of displays for this driver, returning 0 or -1 if there's an error.
slouken@1662
   181
     */
slouken@1662
   182
    int (*VideoInit) (_THIS);
slouken@0
   183
slouken@1662
   184
    /* * * */
slouken@1662
   185
    /* Display functions
slouken@1662
   186
     */
slouken@1662
   187
    /* Setting the display mode is independent of creating windows,
slouken@1662
   188
     * so when the display mode is changed, all existing windows
slouken@1662
   189
     * should have their data updated accordingly, including the
slouken@1662
   190
     * display surfaces associated with them.
slouken@1662
   191
     */
slouken@1662
   192
    int (*SetDisplayMode) (_THIS, const SDL_DisplayMode * mode);
slouken@0
   193
slouken@1681
   194
    /* Sets the color entries of the display palette to those in 'colors'.
slouken@1681
   195
       The return value is 0 if all entries could be set properly or -1
slouken@1681
   196
       otherwise.
slouken@1670
   197
     */
slouken@1681
   198
    int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
slouken@1670
   199
slouken@1662
   200
    /* * * */
slouken@1662
   201
    /* Window functions
slouken@1662
   202
     */
slouken@1662
   203
    int (*CreateWindow) (_THIS, SDL_Window * window);
slouken@1681
   204
    int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
slouken@1662
   205
    void (*SetWindowTitle) (_THIS, SDL_Window * window);
slouken@1662
   206
    void (*SetWindowPosition) (_THIS, SDL_Window * window);
slouken@1662
   207
    void (*SetWindowSize) (_THIS, SDL_Window * window);
slouken@1662
   208
    void (*ShowWindow) (_THIS, SDL_Window * window);
slouken@1662
   209
    void (*HideWindow) (_THIS, SDL_Window * window);
slouken@1662
   210
    void (*RaiseWindow) (_THIS, SDL_Window * window);
slouken@1662
   211
    void (*MaximizeWindow) (_THIS, SDL_Window * window);
slouken@1662
   212
    void (*MinimizeWindow) (_THIS, SDL_Window * window);
slouken@1662
   213
    void (*RestoreWindow) (_THIS, SDL_Window * window);
slouken@1662
   214
    void (*SetWindowGrab) (_THIS, SDL_Window * window);
slouken@1662
   215
    void (*DestroyWindow) (_THIS, SDL_Window * window);
slouken@0
   216
slouken@1662
   217
    /* Get some platform dependent window information */
slouken@1668
   218
      SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
slouken@1668
   219
                                  SDL_SysWMinfo * info);
slouken@0
   220
slouken@1662
   221
    /* Reverse the effects VideoInit() -- called if VideoInit() fails
slouken@1662
   222
       or if the application is shutting down the video subsystem.
slouken@1662
   223
     */
slouken@1662
   224
    void (*VideoQuit) (_THIS);
slouken@0
   225
slouken@1662
   226
    /* * * */
slouken@1662
   227
    /* Gamma support */
slouken@0
   228
slouken@1662
   229
    /* Set the gamma correction directly (emulated with gamma ramps) */
slouken@1662
   230
    int (*SetGamma) (_THIS, float red, float green, float blue);
slouken@0
   231
slouken@1662
   232
    /* Get the gamma correction directly (emulated with gamma ramps) */
slouken@1662
   233
    int (*GetGamma) (_THIS, float *red, float *green, float *blue);
slouken@0
   234
slouken@1662
   235
    /* Set the gamma ramp */
slouken@1662
   236
    int (*SetGammaRamp) (_THIS, Uint16 * ramp);
slouken@0
   237
slouken@1662
   238
    /* Get the gamma ramp */
slouken@1662
   239
    int (*GetGammaRamp) (_THIS, Uint16 * ramp);
slouken@0
   240
slouken@1662
   241
    /* * * */
slouken@1662
   242
    /* OpenGL support */
slouken@0
   243
slouken@1662
   244
    /* Sets the dll to use for OpenGL and loads it */
slouken@1662
   245
    int (*GL_LoadLibrary) (_THIS, const char *path);
slouken@0
   246
slouken@1662
   247
    /* Retrieves the address of a function in the gl library */
slouken@1662
   248
    void *(*GL_GetProcAddress) (_THIS, const char *proc);
slouken@0
   249
slouken@1662
   250
    /* Get attribute information from the windowing system. */
slouken@1662
   251
    int (*GL_GetAttribute) (_THIS, SDL_GLattr attrib, int *value);
slouken@0
   252
slouken@1662
   253
    /* Make the context associated with this driver current */
slouken@1662
   254
    int (*GL_MakeCurrent) (_THIS);
slouken@0
   255
slouken@1662
   256
    /* Swap the current buffers in double buffer mode. */
slouken@1662
   257
    void (*GL_SwapBuffers) (_THIS);
slouken@0
   258
slouken@1662
   259
    /* OpenGL functions for glSDL */
slouken@1361
   260
#if SDL_VIDEO_OPENGL
slouken@1536
   261
#if !defined(__WIN32__)
slouken@0
   262
#define WINAPI
slouken@0
   263
#endif
slouken@0
   264
#define SDL_PROC(ret,func,params) ret (WINAPI *func) params;
slouken@0
   265
#include "SDL_glfuncs.h"
slouken@0
   266
#undef SDL_PROC
slouken@0
   267
slouken@1662
   268
    /* Texture id */
slouken@1662
   269
    GLuint texture;
slouken@1662
   270
slouken@1662
   271
    int is_32bit;
slouken@0
   272
#endif
slouken@0
   273
slouken@1662
   274
    /* Determine whether the mouse should be in relative mode or not.
slouken@1662
   275
       This function is called when the input grab state or cursor
slouken@1662
   276
       visibility state changes.
slouken@1662
   277
       If the cursor is not visible, and the input is grabbed, the
slouken@1662
   278
       driver can place the mouse in relative mode, which may result
slouken@1662
   279
       in higher accuracy sampling of the pointer motion.
slouken@1662
   280
     */
slouken@1662
   281
    void (*CheckMouseMode) (_THIS);
slouken@0
   282
slouken@1662
   283
    /* * * */
slouken@1662
   284
    /* Event manager functions */
slouken@0
   285
slouken@1662
   286
    /* Handle any queued OS events */
slouken@1662
   287
    void (*PumpEvents) (_THIS);
slouken@0
   288
slouken@1662
   289
    /* * * */
slouken@1662
   290
    /* Data common to all drivers */
slouken@1662
   291
    int num_displays;
slouken@1662
   292
    SDL_VideoDisplay *displays;
slouken@1662
   293
    int current_display;
slouken@1670
   294
    Uint32 next_object_id;
slouken@0
   295
slouken@1662
   296
    /* Driver information flags */
slouken@0
   297
slouken@1662
   298
    /* * * */
slouken@1662
   299
    /* Data used by the GL drivers */
slouken@1662
   300
    struct
slouken@1662
   301
    {
slouken@1662
   302
        int red_size;
slouken@1662
   303
        int green_size;
slouken@1662
   304
        int blue_size;
slouken@1662
   305
        int alpha_size;
slouken@1662
   306
        int depth_size;
slouken@1662
   307
        int buffer_size;
slouken@1662
   308
        int stencil_size;
slouken@1662
   309
        int double_buffer;
slouken@1662
   310
        int accum_red_size;
slouken@1662
   311
        int accum_green_size;
slouken@1662
   312
        int accum_blue_size;
slouken@1662
   313
        int accum_alpha_size;
slouken@1662
   314
        int stereo;
slouken@1662
   315
        int multisamplebuffers;
slouken@1662
   316
        int multisamplesamples;
slouken@1662
   317
        int accelerated;
slouken@1662
   318
        int swap_control;
slouken@1662
   319
        int driver_loaded;
slouken@1662
   320
        char driver_path[256];
slouken@1662
   321
        void *dll_handle;
slouken@1662
   322
    } gl_config;
slouken@0
   323
slouken@1662
   324
    /* * * */
slouken@1662
   325
    /* Data private to this driver */
slouken@1662
   326
    struct SDL_PrivateVideoData *hidden;
slouken@1662
   327
    struct SDL_PrivateGLData *gl_data;
slouken@0
   328
slouken@1662
   329
    /* * * */
slouken@1662
   330
    /* The function used to dispose of this structure */
slouken@1662
   331
    void (*free) (_THIS);
slouken@0
   332
};
slouken@0
   333
#undef _THIS
slouken@0
   334
slouken@1662
   335
typedef struct VideoBootStrap
slouken@1662
   336
{
slouken@1662
   337
    const char *name;
slouken@1662
   338
    const char *desc;
slouken@1662
   339
    int (*available) (void);
slouken@1662
   340
    SDL_VideoDevice *(*create) (int devindex);
slouken@0
   341
} VideoBootStrap;
slouken@0
   342
slouken@1361
   343
#if SDL_VIDEO_DRIVER_QUARTZ
slouken@1361
   344
extern VideoBootStrap QZ_bootstrap;
slouken@1361
   345
#endif
slouken@1361
   346
#if SDL_VIDEO_DRIVER_X11
slouken@0
   347
extern VideoBootStrap X11_bootstrap;
slouken@0
   348
#endif
slouken@1361
   349
#if SDL_VIDEO_DRIVER_DGA
slouken@0
   350
extern VideoBootStrap DGA_bootstrap;
slouken@0
   351
#endif
slouken@1361
   352
#if SDL_VIDEO_DRIVER_NANOX
slouken@30
   353
extern VideoBootStrap NX_bootstrap;
slouken@30
   354
#endif
slouken@1361
   355
#if SDL_VIDEO_DRIVER_IPOD
icculus@1140
   356
extern VideoBootStrap iPod_bootstrap;
icculus@1140
   357
#endif
slouken@1361
   358
#if SDL_VIDEO_DRIVER_QTOPIA
slouken@1361
   359
extern VideoBootStrap Qtopia_bootstrap;
slouken@1361
   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_GGI
slouken@0
   374
extern VideoBootStrap GGI_bootstrap;
slouken@0
   375
#endif
slouken@1361
   376
#if SDL_VIDEO_DRIVER_VGL
slouken@75
   377
extern VideoBootStrap VGL_bootstrap;
slouken@75
   378
#endif
slouken@1361
   379
#if SDL_VIDEO_DRIVER_SVGALIB
slouken@0
   380
extern VideoBootStrap SVGALIB_bootstrap;
slouken@0
   381
#endif
slouken@1361
   382
#if SDL_VIDEO_DRIVER_GAPI
slouken@1361
   383
extern VideoBootStrap GAPI_bootstrap;
slouken@1361
   384
#endif
slouken@1361
   385
#if SDL_VIDEO_DRIVER_WINDIB
slouken@1361
   386
extern VideoBootStrap WINDIB_bootstrap;
slouken@1361
   387
#endif
slouken@1361
   388
#if SDL_VIDEO_DRIVER_DDRAW
slouken@1361
   389
extern VideoBootStrap DIRECTX_bootstrap;
slouken@1361
   390
#endif
slouken@1361
   391
#if SDL_VIDEO_DRIVER_BWINDOW
slouken@1361
   392
extern VideoBootStrap BWINDOW_bootstrap;
slouken@1361
   393
#endif
slouken@1361
   394
#if SDL_VIDEO_DRIVER_TOOLBOX
slouken@1361
   395
extern VideoBootStrap TOOLBOX_bootstrap;
slouken@1361
   396
#endif
slouken@1361
   397
#if SDL_VIDEO_DRIVER_DRAWSPROCKET
slouken@1361
   398
extern VideoBootStrap DSp_bootstrap;
slouken@1361
   399
#endif
slouken@1361
   400
#if SDL_VIDEO_DRIVER_CYBERGRAPHICS
slouken@1361
   401
extern VideoBootStrap CGX_bootstrap;
slouken@1361
   402
#endif
slouken@1361
   403
#if SDL_VIDEO_DRIVER_PHOTON
slouken@1361
   404
extern VideoBootStrap ph_bootstrap;
slouken@1361
   405
#endif
slouken@1361
   406
#if SDL_VIDEO_DRIVER_EPOC
slouken@1361
   407
extern VideoBootStrap EPOC_bootstrap;
slouken@1361
   408
#endif
slouken@1361
   409
#if SDL_VIDEO_DRIVER_XBIOS
slouken@1361
   410
extern VideoBootStrap XBIOS_bootstrap;
slouken@1361
   411
#endif
slouken@1361
   412
#if SDL_VIDEO_DRIVER_GEM
slouken@1361
   413
extern VideoBootStrap GEM_bootstrap;
slouken@1361
   414
#endif
slouken@1361
   415
#if SDL_VIDEO_DRIVER_PICOGUI
slouken@1361
   416
extern VideoBootStrap PG_bootstrap;
slouken@1361
   417
#endif
slouken@1361
   418
#if SDL_VIDEO_DRIVER_DC
slouken@1361
   419
extern VideoBootStrap DC_bootstrap;
slouken@1361
   420
#endif
slouken@1361
   421
#if SDL_VIDEO_DRIVER_RISCOS
slouken@1361
   422
extern VideoBootStrap RISCOS_bootstrap;
slouken@1361
   423
#endif
slouken@1361
   424
#if SDL_VIDEO_DRIVER_OS2FS
slouken@1361
   425
extern VideoBootStrap OS2FSLib_bootstrap;
slouken@1361
   426
#endif
slouken@1361
   427
#if SDL_VIDEO_DRIVER_AALIB
slouken@0
   428
extern VideoBootStrap AALIB_bootstrap;
slouken@0
   429
#endif
slouken@1361
   430
#if SDL_VIDEO_DRIVER_DUMMY
slouken@173
   431
extern VideoBootStrap DUMMY_bootstrap;
slouken@173
   432
#endif
slouken@1658
   433
#if SDL_VIDEO_DRIVER_GLSDL
slouken@1658
   434
extern VideoBootStrap glSDL_bootstrap;
slouken@1658
   435
#endif
slouken@1361
   436
slouken@1662
   437
#define SDL_CurrentDisplay	(_this->displays[_this->current_display])
slouken@1662
   438
#define SDL_CurrentWindow	(SDL_CurrentDisplay.windows[0])
slouken@0
   439
slouken@1668
   440
extern SDL_VideoDevice *SDL_GetVideoDevice();
slouken@1677
   441
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
slouken@1677
   442
extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
slouken@1670
   443
extern void SDL_AddDisplayMode(int displayIndex,
slouken@1670
   444
                               const SDL_DisplayMode * mode);
slouken@1670
   445
extern void SDL_AddRenderDriver(int displayIndex,
slouken@1670
   446
                                const SDL_RenderDriver * driver);
slouken@0
   447
slouken@0
   448
#endif /* _SDL_sysvideo_h */
slouken@1662
   449
slouken@1662
   450
/* vi: set ts=4 sw=4 expandtab: */