src/video/SDL_sysvideo.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 29 May 2006 04:04:35 +0000
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1666 6e7ec5cb83c3
child 1669 9857d21967bb
permissions -rw-r--r--
more tweaking indent options
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@1662
    42
/* Define the SDL window structure, corresponding to toplevel windows */
slouken@1662
    43
typedef struct SDL_Window SDL_Window;
slouken@1662
    44
slouken@1662
    45
struct SDL_Window
slouken@1662
    46
{
slouken@1662
    47
    Uint32 id;
slouken@1662
    48
slouken@1662
    49
    char *title;
slouken@1662
    50
    int x, y;
slouken@1662
    51
    int w, h;
slouken@1662
    52
    Uint32 flags;
slouken@1662
    53
slouken@1662
    54
    SDL_Surface *surface;
slouken@1662
    55
    SDL_Surface *shadow;
slouken@1662
    56
    Uint16 *gamma;
slouken@1662
    57
slouken@1662
    58
    void *userdata;
slouken@1662
    59
    void *driverdata;
slouken@1662
    60
};
slouken@1662
    61
slouken@1662
    62
/* Define the SDL display structure
slouken@1662
    63
   This corresponds to physical monitors attached to the system.
slouken@1662
    64
 */
slouken@1662
    65
typedef struct SDL_VideoDisplay
slouken@1662
    66
{
slouken@1662
    67
    int num_display_modes;
slouken@1662
    68
    SDL_DisplayMode *display_modes;
slouken@1662
    69
    SDL_DisplayMode desktop_mode;
slouken@1662
    70
    SDL_DisplayMode current_mode;
slouken@1662
    71
slouken@1662
    72
    int max_windows;
slouken@1662
    73
    int num_windows;
slouken@1662
    74
    SDL_Window *windows;
slouken@1662
    75
slouken@1662
    76
    void *driverdata;
slouken@1662
    77
} SDL_VideoDisplay;
slouken@1662
    78
slouken@0
    79
typedef struct SDL_VideoDevice SDL_VideoDevice;
slouken@0
    80
slouken@0
    81
/* Define the SDL video driver structure */
slouken@0
    82
#define _THIS	SDL_VideoDevice *_this
slouken@0
    83
slouken@1662
    84
struct SDL_VideoDevice
slouken@1662
    85
{
slouken@1662
    86
    /* * * */
slouken@1662
    87
    /* The name of this video driver */
slouken@1662
    88
    const char *name;
slouken@0
    89
slouken@1662
    90
    /* * * */
slouken@1662
    91
    /* Initialization/Query functions */
slouken@0
    92
slouken@1662
    93
    /* Initialize the native video subsystem, filling in the list
slouken@1662
    94
       of displays for this driver, returning 0 or -1 if there's an error.
slouken@1662
    95
     */
slouken@1662
    96
    int (*VideoInit) (_THIS);
slouken@0
    97
slouken@1662
    98
    /* * * */
slouken@1662
    99
    /* Display functions
slouken@1662
   100
     */
slouken@1662
   101
    /* Setting the display mode is independent of creating windows,
slouken@1662
   102
     * so when the display mode is changed, all existing windows
slouken@1662
   103
     * should have their data updated accordingly, including the
slouken@1662
   104
     * display surfaces associated with them.
slouken@1662
   105
     */
slouken@1662
   106
    int (*SetDisplayMode) (_THIS, const SDL_DisplayMode * mode);
slouken@0
   107
slouken@1662
   108
    /* * * */
slouken@1662
   109
    /* Window functions
slouken@1662
   110
     */
slouken@1662
   111
    int (*CreateWindow) (_THIS, SDL_Window * window);
slouken@1662
   112
    int (*CreateWindowFrom) (_THIS, SDL_Window * window, void *data);
slouken@1662
   113
    void (*SetWindowTitle) (_THIS, SDL_Window * window);
slouken@1662
   114
    void (*SetWindowPosition) (_THIS, SDL_Window * window);
slouken@1662
   115
    void (*SetWindowSize) (_THIS, SDL_Window * window);
slouken@1662
   116
    void (*ShowWindow) (_THIS, SDL_Window * window);
slouken@1662
   117
    void (*HideWindow) (_THIS, SDL_Window * window);
slouken@1662
   118
    void (*RaiseWindow) (_THIS, SDL_Window * window);
slouken@1662
   119
    void (*MaximizeWindow) (_THIS, SDL_Window * window);
slouken@1662
   120
    void (*MinimizeWindow) (_THIS, SDL_Window * window);
slouken@1662
   121
    void (*RestoreWindow) (_THIS, SDL_Window * window);
slouken@1662
   122
    void (*SetWindowGrab) (_THIS, SDL_Window * window);
slouken@1662
   123
    void (*DestroyWindow) (_THIS, SDL_Window * window);
slouken@0
   124
slouken@1666
   125
    void (*CreateWindowSurface) (_THIS, SDL_Window * window, Uint32 flags);
slouken@1662
   126
    void (*UpdateWindowSurface) (_THIS, SDL_Window * window, int numrects,
slouken@1662
   127
                                 SDL_Rect * rects);
slouken@1662
   128
    void (*FlipWindowSurface) (_THIS, SDL_Window * window);
slouken@0
   129
slouken@1662
   130
    /* Sets the color entries { firstcolor .. (firstcolor+ncolors-1) }
slouken@1662
   131
       of the physical palette to those in 'colors'. If the device is
slouken@1662
   132
       using a software palette (SDL_HWPALETTE not set), then the
slouken@1662
   133
       changes are reflected in the logical palette of the screen
slouken@1662
   134
       as well.
slouken@1662
   135
       The return value is 1 if all entries could be set properly
slouken@1662
   136
       or 0 otherwise.
slouken@1662
   137
     */
slouken@1662
   138
    int (*SetWindowColors) (_THIS, SDL_Window * window,
slouken@1662
   139
                            int firstcolor, int ncolors, SDL_Color * colors);
slouken@0
   140
slouken@1662
   141
    /* Get some platform dependent window information */
slouken@1668
   142
      SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
slouken@1668
   143
                                  SDL_SysWMinfo * info);
slouken@0
   144
slouken@1662
   145
    /* Create a YUV video surface (possibly overlay) of the given
slouken@1662
   146
       format.  The hardware should be able to perform at least 2x
slouken@1662
   147
       scaling on display.
slouken@1662
   148
     */
slouken@1662
   149
    SDL_Overlay *(*CreateYUVOverlay) (_THIS, int width, int height,
slouken@1662
   150
                                      Uint32 format, SDL_Surface * display);
slouken@0
   151
slouken@1662
   152
    /* Reverse the effects VideoInit() -- called if VideoInit() fails
slouken@1662
   153
       or if the application is shutting down the video subsystem.
slouken@1662
   154
     */
slouken@1662
   155
    void (*VideoQuit) (_THIS);
slouken@0
   156
slouken@1662
   157
    /* * * */
slouken@1662
   158
    /* Hardware acceleration functions */
slouken@0
   159
slouken@1662
   160
    /* Information about the video hardware */
slouken@1662
   161
    SDL_VideoInfo info;
slouken@0
   162
slouken@1662
   163
    /* The pixel format used when SDL_CreateRGBSurface creates SDL_HWSURFACEs with alpha */
slouken@1662
   164
    SDL_PixelFormat *displayformatalphapixel;
slouken@1658
   165
slouken@1662
   166
    /* Allocates a surface in video memory */
slouken@1662
   167
    int (*AllocHWSurface) (_THIS, SDL_Surface * surface);
slouken@0
   168
slouken@1662
   169
    /* Sets the hardware accelerated blit function, if any, based
slouken@1662
   170
       on the current flags of the surface (colorkey, alpha, etc.)
slouken@1662
   171
     */
slouken@1662
   172
    int (*CheckHWBlit) (_THIS, SDL_Surface * src, SDL_Surface * dst);
slouken@0
   173
slouken@1662
   174
    /* Fills a surface rectangle with the given color */
slouken@1662
   175
    int (*FillHWRect) (_THIS, SDL_Surface * dst, SDL_Rect * rect,
slouken@1662
   176
                       Uint32 color);
slouken@0
   177
slouken@1662
   178
    /* Sets video mem colorkey and accelerated blit function */
slouken@1662
   179
    int (*SetHWColorKey) (_THIS, SDL_Surface * surface, Uint32 key);
slouken@0
   180
slouken@1662
   181
    /* Sets per surface hardware alpha value */
slouken@1662
   182
    int (*SetHWAlpha) (_THIS, SDL_Surface * surface, Uint8 value);
slouken@0
   183
slouken@1662
   184
    /* Returns a readable/writable surface */
slouken@1662
   185
    int (*LockHWSurface) (_THIS, SDL_Surface * surface);
slouken@1662
   186
    void (*UnlockHWSurface) (_THIS, SDL_Surface * surface);
slouken@0
   187
slouken@1662
   188
    /* Frees a previously allocated video surface */
slouken@1662
   189
    void (*FreeHWSurface) (_THIS, SDL_Surface * surface);
slouken@0
   190
slouken@1662
   191
    /* * * */
slouken@1662
   192
    /* Gamma support */
slouken@0
   193
slouken@1662
   194
    /* Set the gamma correction directly (emulated with gamma ramps) */
slouken@1662
   195
    int (*SetGamma) (_THIS, float red, float green, float blue);
slouken@0
   196
slouken@1662
   197
    /* Get the gamma correction directly (emulated with gamma ramps) */
slouken@1662
   198
    int (*GetGamma) (_THIS, float *red, float *green, float *blue);
slouken@0
   199
slouken@1662
   200
    /* Set the gamma ramp */
slouken@1662
   201
    int (*SetGammaRamp) (_THIS, Uint16 * ramp);
slouken@0
   202
slouken@1662
   203
    /* Get the gamma ramp */
slouken@1662
   204
    int (*GetGammaRamp) (_THIS, Uint16 * ramp);
slouken@0
   205
slouken@1662
   206
    /* * * */
slouken@1662
   207
    /* OpenGL support */
slouken@0
   208
slouken@1662
   209
    /* Sets the dll to use for OpenGL and loads it */
slouken@1662
   210
    int (*GL_LoadLibrary) (_THIS, const char *path);
slouken@0
   211
slouken@1662
   212
    /* Retrieves the address of a function in the gl library */
slouken@1662
   213
    void *(*GL_GetProcAddress) (_THIS, const char *proc);
slouken@0
   214
slouken@1662
   215
    /* Get attribute information from the windowing system. */
slouken@1662
   216
    int (*GL_GetAttribute) (_THIS, SDL_GLattr attrib, int *value);
slouken@0
   217
slouken@1662
   218
    /* Make the context associated with this driver current */
slouken@1662
   219
    int (*GL_MakeCurrent) (_THIS);
slouken@0
   220
slouken@1662
   221
    /* Swap the current buffers in double buffer mode. */
slouken@1662
   222
    void (*GL_SwapBuffers) (_THIS);
slouken@0
   223
slouken@1662
   224
    /* OpenGL functions for glSDL */
slouken@1361
   225
#if SDL_VIDEO_OPENGL
slouken@1536
   226
#if !defined(__WIN32__)
slouken@0
   227
#define WINAPI
slouken@0
   228
#endif
slouken@0
   229
#define SDL_PROC(ret,func,params) ret (WINAPI *func) params;
slouken@0
   230
#include "SDL_glfuncs.h"
slouken@0
   231
#undef SDL_PROC
slouken@0
   232
slouken@1662
   233
    /* Texture id */
slouken@1662
   234
    GLuint texture;
slouken@1662
   235
slouken@1662
   236
    int is_32bit;
slouken@0
   237
#endif
slouken@0
   238
slouken@1662
   239
    /* * * */
slouken@1662
   240
    /* Cursor manager functions */
slouken@0
   241
slouken@1662
   242
    /* Free a window manager cursor
slouken@1662
   243
       This function can be NULL if CreateWMCursor is also NULL.
slouken@1662
   244
     */
slouken@1662
   245
    void (*FreeWMCursor) (_THIS, WMcursor * cursor);
slouken@0
   246
slouken@1662
   247
    /* If not NULL, create a black/white window manager cursor */
slouken@1662
   248
    WMcursor *(*CreateWMCursor) (_THIS,
slouken@1662
   249
                                 Uint8 * data, Uint8 * mask, int w, int h,
slouken@1662
   250
                                 int hot_x, int hot_y);
slouken@0
   251
slouken@1662
   252
    /* Show the specified cursor, or hide if cursor is NULL */
slouken@1662
   253
    int (*ShowWMCursor) (_THIS, WMcursor * cursor);
slouken@0
   254
slouken@1662
   255
    /* Warp the window manager cursor to (x,y)
slouken@1662
   256
       If NULL, a mouse motion event is posted internally.
slouken@1662
   257
     */
slouken@1662
   258
    void (*WarpWMCursor) (_THIS, Uint16 x, Uint16 y);
slouken@0
   259
slouken@1662
   260
    /* If not NULL, this is called when a mouse motion event occurs */
slouken@1662
   261
    void (*MoveWMCursor) (_THIS, int x, int y);
slouken@0
   262
slouken@1662
   263
    /* Determine whether the mouse should be in relative mode or not.
slouken@1662
   264
       This function is called when the input grab state or cursor
slouken@1662
   265
       visibility state changes.
slouken@1662
   266
       If the cursor is not visible, and the input is grabbed, the
slouken@1662
   267
       driver can place the mouse in relative mode, which may result
slouken@1662
   268
       in higher accuracy sampling of the pointer motion.
slouken@1662
   269
     */
slouken@1662
   270
    void (*CheckMouseMode) (_THIS);
slouken@0
   271
slouken@1662
   272
    /* * * */
slouken@1662
   273
    /* Event manager functions */
slouken@0
   274
slouken@1662
   275
    /* Initialize keyboard mapping for this driver */
slouken@1662
   276
    void (*InitOSKeymap) (_THIS);
slouken@0
   277
slouken@1662
   278
    /* Handle any queued OS events */
slouken@1662
   279
    void (*PumpEvents) (_THIS);
slouken@0
   280
slouken@1662
   281
    /* * * */
slouken@1662
   282
    /* Data common to all drivers */
slouken@1662
   283
    int num_displays;
slouken@1662
   284
    SDL_VideoDisplay *displays;
slouken@1662
   285
    int current_display;
slouken@1662
   286
    Uint32 next_window_id;
slouken@0
   287
slouken@1662
   288
    /* Driver information flags */
slouken@0
   289
slouken@1662
   290
    /* * * */
slouken@1662
   291
    /* Data used by the GL drivers */
slouken@1662
   292
    struct
slouken@1662
   293
    {
slouken@1662
   294
        int red_size;
slouken@1662
   295
        int green_size;
slouken@1662
   296
        int blue_size;
slouken@1662
   297
        int alpha_size;
slouken@1662
   298
        int depth_size;
slouken@1662
   299
        int buffer_size;
slouken@1662
   300
        int stencil_size;
slouken@1662
   301
        int double_buffer;
slouken@1662
   302
        int accum_red_size;
slouken@1662
   303
        int accum_green_size;
slouken@1662
   304
        int accum_blue_size;
slouken@1662
   305
        int accum_alpha_size;
slouken@1662
   306
        int stereo;
slouken@1662
   307
        int multisamplebuffers;
slouken@1662
   308
        int multisamplesamples;
slouken@1662
   309
        int accelerated;
slouken@1662
   310
        int swap_control;
slouken@1662
   311
        int driver_loaded;
slouken@1662
   312
        char driver_path[256];
slouken@1662
   313
        void *dll_handle;
slouken@1662
   314
    } gl_config;
slouken@0
   315
slouken@1662
   316
    /* * * */
slouken@1662
   317
    /* Data private to this driver */
slouken@1662
   318
    struct SDL_PrivateVideoData *hidden;
slouken@1662
   319
    struct SDL_PrivateGLData *gl_data;
slouken@0
   320
slouken@1662
   321
    /* * * */
slouken@1662
   322
    /* The function used to dispose of this structure */
slouken@1662
   323
    void (*free) (_THIS);
slouken@0
   324
};
slouken@0
   325
#undef _THIS
slouken@0
   326
slouken@1662
   327
typedef struct VideoBootStrap
slouken@1662
   328
{
slouken@1662
   329
    const char *name;
slouken@1662
   330
    const char *desc;
slouken@1662
   331
    int (*available) (void);
slouken@1662
   332
    SDL_VideoDevice *(*create) (int devindex);
slouken@0
   333
} VideoBootStrap;
slouken@0
   334
slouken@1361
   335
#if SDL_VIDEO_DRIVER_QUARTZ
slouken@1361
   336
extern VideoBootStrap QZ_bootstrap;
slouken@1361
   337
#endif
slouken@1361
   338
#if SDL_VIDEO_DRIVER_X11
slouken@0
   339
extern VideoBootStrap X11_bootstrap;
slouken@0
   340
#endif
slouken@1361
   341
#if SDL_VIDEO_DRIVER_DGA
slouken@0
   342
extern VideoBootStrap DGA_bootstrap;
slouken@0
   343
#endif
slouken@1361
   344
#if SDL_VIDEO_DRIVER_NANOX
slouken@30
   345
extern VideoBootStrap NX_bootstrap;
slouken@30
   346
#endif
slouken@1361
   347
#if SDL_VIDEO_DRIVER_IPOD
icculus@1140
   348
extern VideoBootStrap iPod_bootstrap;
icculus@1140
   349
#endif
slouken@1361
   350
#if SDL_VIDEO_DRIVER_QTOPIA
slouken@1361
   351
extern VideoBootStrap Qtopia_bootstrap;
slouken@1361
   352
#endif
slouken@1361
   353
#if SDL_VIDEO_DRIVER_WSCONS
slouken@1361
   354
extern VideoBootStrap WSCONS_bootstrap;
slouken@1361
   355
#endif
slouken@1361
   356
#if SDL_VIDEO_DRIVER_FBCON
slouken@0
   357
extern VideoBootStrap FBCON_bootstrap;
slouken@0
   358
#endif
slouken@1361
   359
#if SDL_VIDEO_DRIVER_DIRECTFB
slouken@167
   360
extern VideoBootStrap DirectFB_bootstrap;
slouken@167
   361
#endif
slouken@1361
   362
#if SDL_VIDEO_DRIVER_PS2GS
slouken@0
   363
extern VideoBootStrap PS2GS_bootstrap;
slouken@0
   364
#endif
slouken@1361
   365
#if SDL_VIDEO_DRIVER_GGI
slouken@0
   366
extern VideoBootStrap GGI_bootstrap;
slouken@0
   367
#endif
slouken@1361
   368
#if SDL_VIDEO_DRIVER_VGL
slouken@75
   369
extern VideoBootStrap VGL_bootstrap;
slouken@75
   370
#endif
slouken@1361
   371
#if SDL_VIDEO_DRIVER_SVGALIB
slouken@0
   372
extern VideoBootStrap SVGALIB_bootstrap;
slouken@0
   373
#endif
slouken@1361
   374
#if SDL_VIDEO_DRIVER_GAPI
slouken@1361
   375
extern VideoBootStrap GAPI_bootstrap;
slouken@1361
   376
#endif
slouken@1361
   377
#if SDL_VIDEO_DRIVER_WINDIB
slouken@1361
   378
extern VideoBootStrap WINDIB_bootstrap;
slouken@1361
   379
#endif
slouken@1361
   380
#if SDL_VIDEO_DRIVER_DDRAW
slouken@1361
   381
extern VideoBootStrap DIRECTX_bootstrap;
slouken@1361
   382
#endif
slouken@1361
   383
#if SDL_VIDEO_DRIVER_BWINDOW
slouken@1361
   384
extern VideoBootStrap BWINDOW_bootstrap;
slouken@1361
   385
#endif
slouken@1361
   386
#if SDL_VIDEO_DRIVER_TOOLBOX
slouken@1361
   387
extern VideoBootStrap TOOLBOX_bootstrap;
slouken@1361
   388
#endif
slouken@1361
   389
#if SDL_VIDEO_DRIVER_DRAWSPROCKET
slouken@1361
   390
extern VideoBootStrap DSp_bootstrap;
slouken@1361
   391
#endif
slouken@1361
   392
#if SDL_VIDEO_DRIVER_CYBERGRAPHICS
slouken@1361
   393
extern VideoBootStrap CGX_bootstrap;
slouken@1361
   394
#endif
slouken@1361
   395
#if SDL_VIDEO_DRIVER_PHOTON
slouken@1361
   396
extern VideoBootStrap ph_bootstrap;
slouken@1361
   397
#endif
slouken@1361
   398
#if SDL_VIDEO_DRIVER_EPOC
slouken@1361
   399
extern VideoBootStrap EPOC_bootstrap;
slouken@1361
   400
#endif
slouken@1361
   401
#if SDL_VIDEO_DRIVER_XBIOS
slouken@1361
   402
extern VideoBootStrap XBIOS_bootstrap;
slouken@1361
   403
#endif
slouken@1361
   404
#if SDL_VIDEO_DRIVER_GEM
slouken@1361
   405
extern VideoBootStrap GEM_bootstrap;
slouken@1361
   406
#endif
slouken@1361
   407
#if SDL_VIDEO_DRIVER_PICOGUI
slouken@1361
   408
extern VideoBootStrap PG_bootstrap;
slouken@1361
   409
#endif
slouken@1361
   410
#if SDL_VIDEO_DRIVER_DC
slouken@1361
   411
extern VideoBootStrap DC_bootstrap;
slouken@1361
   412
#endif
slouken@1361
   413
#if SDL_VIDEO_DRIVER_RISCOS
slouken@1361
   414
extern VideoBootStrap RISCOS_bootstrap;
slouken@1361
   415
#endif
slouken@1361
   416
#if SDL_VIDEO_DRIVER_OS2FS
slouken@1361
   417
extern VideoBootStrap OS2FSLib_bootstrap;
slouken@1361
   418
#endif
slouken@1361
   419
#if SDL_VIDEO_DRIVER_AALIB
slouken@0
   420
extern VideoBootStrap AALIB_bootstrap;
slouken@0
   421
#endif
slouken@1361
   422
#if SDL_VIDEO_DRIVER_DUMMY
slouken@173
   423
extern VideoBootStrap DUMMY_bootstrap;
slouken@173
   424
#endif
slouken@1658
   425
#if SDL_VIDEO_DRIVER_GLSDL
slouken@1658
   426
extern VideoBootStrap glSDL_bootstrap;
slouken@1658
   427
#endif
slouken@1361
   428
slouken@1662
   429
#define SDL_CurrentDisplay	(_this->displays[_this->current_display])
slouken@1662
   430
#define SDL_CurrentWindow	(SDL_CurrentDisplay.windows[0])
slouken@1662
   431
#define SDL_VideoSurface	((_this && SDL_CurrentDisplay.num_windows > 0) ? SDL_CurrentWindow.surface : NULL)
slouken@1662
   432
#define SDL_ShadowSurface	((_this && SDL_CurrentDisplay.num_windows > 0) ? SDL_CurrentWindow.shadow : NULL)
slouken@1662
   433
#define SDL_PublicSurface	(SDL_ShadowSurface ? SDL_ShadowSurface : SDL_VideoSurface)
slouken@0
   434
slouken@1668
   435
extern SDL_VideoDevice *SDL_GetVideoDevice();
slouken@1668
   436
extern void SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
slouken@1668
   437
extern void SDL_AddVideoDisplay(SDL_VideoDisplay * display);
slouken@1668
   438
extern void SDL_AddDisplayMode(int display, const SDL_DisplayMode * mode);
slouken@1668
   439
extern SDL_Window *SDL_GetWindowFromSurface(SDL_Surface * surface);
slouken@0
   440
slouken@0
   441
#endif /* _SDL_sysvideo_h */
slouken@1662
   442
slouken@1662
   443
/* vi: set ts=4 sw=4 expandtab: */