src/video/SDL_sysvideo.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 31 Jan 2011 22:44:43 -0800
changeset 5138 da10636e5eca
parent 5103 797b37c0c046
child 5141 31e7f523ab3d
permissions -rw-r--r--
Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@3697
     3
    Copyright (C) 1997-2010 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"
eligottlieb@4782
    29
#include "SDL_shape.h"
slouken@0
    30
slouken@0
    31
/* The SDL video driver */
slouken@1895
    32
slouken@1895
    33
typedef struct SDL_Renderer SDL_Renderer;
slouken@1895
    34
typedef struct SDL_RenderDriver SDL_RenderDriver;
eligottlieb@4782
    35
typedef struct SDL_WindowShaper SDL_WindowShaper;
eligottlieb@4782
    36
typedef struct SDL_ShapeDriver SDL_ShapeDriver;
slouken@1895
    37
typedef struct SDL_VideoDisplay SDL_VideoDisplay;
slouken@0
    38
typedef struct SDL_VideoDevice SDL_VideoDevice;
slouken@0
    39
slouken@1895
    40
/* Define the SDL texture structure */
slouken@2753
    41
struct SDL_Texture
slouken@2753
    42
{
slouken@3695
    43
    const void *magic;
slouken@2753
    44
    Uint32 format;              /**< The pixel format of the texture */
slouken@2753
    45
    int access;                 /**< SDL_TextureAccess */
slouken@2753
    46
    int w;                      /**< The width of the texture */
slouken@2753
    47
    int h;                      /**< The height of the texture */
slouken@2753
    48
    int modMode;                /**< The texture modulation mode */
slouken@4929
    49
    SDL_BlendMode blendMode;    /**< The texture blend mode */
slouken@3685
    50
    Uint8 r, g, b, a;           /**< Texture modulation values */
slouken@1895
    51
slouken@2753
    52
    SDL_Renderer *renderer;
slouken@1895
    53
slouken@3685
    54
    void *driverdata;           /**< Driver specific texture representation */
slouken@1895
    55
slouken@3685
    56
    SDL_Texture *prev;
slouken@2753
    57
    SDL_Texture *next;
slouken@1895
    58
};
slouken@1895
    59
slouken@1895
    60
/* Define the SDL renderer structure */
slouken@2753
    61
struct SDL_Renderer
slouken@2753
    62
{
slouken@2753
    63
    int (*ActivateRenderer) (SDL_Renderer * renderer);
slouken@2753
    64
    int (*DisplayModeChanged) (SDL_Renderer * renderer);
slouken@2753
    65
    int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@2753
    66
    int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@2753
    67
                               void **pixels, int *pitch);
slouken@2753
    68
    int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@2753
    69
                              const SDL_Color * colors, int firstcolor,
slouken@2753
    70
                              int ncolors);
slouken@2753
    71
    int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@2753
    72
                              SDL_Color * colors, int firstcolor,
slouken@2753
    73
                              int ncolors);
slouken@2753
    74
    int (*SetTextureColorMod) (SDL_Renderer * renderer,
slouken@2753
    75
                               SDL_Texture * texture);
slouken@2753
    76
    int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
slouken@2753
    77
                               SDL_Texture * texture);
slouken@2753
    78
    int (*SetTextureBlendMode) (SDL_Renderer * renderer,
slouken@2753
    79
                                SDL_Texture * texture);
slouken@2753
    80
    int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@2753
    81
                          const SDL_Rect * rect, const void *pixels,
slouken@2753
    82
                          int pitch);
slouken@2753
    83
    int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@2753
    84
                        const SDL_Rect * rect, int markDirty, void **pixels,
slouken@2753
    85
                        int *pitch);
slouken@2753
    86
    void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@2753
    87
    void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@2753
    88
                          int numrects, const SDL_Rect * rects);
slouken@2884
    89
    int (*SetDrawColor) (SDL_Renderer * renderer);
slouken@2884
    90
    int (*SetDrawBlendMode) (SDL_Renderer * renderer);
slouken@3596
    91
    int (*RenderClear) (SDL_Renderer * renderer);
slouken@3596
    92
    int (*RenderDrawPoints) (SDL_Renderer * renderer, const SDL_Point * points,
slouken@3596
    93
                             int count);
slouken@3596
    94
    int (*RenderDrawLines) (SDL_Renderer * renderer, const SDL_Point * points,
slouken@3596
    95
                            int count);
slouken@3596
    96
    int (*RenderDrawRects) (SDL_Renderer * renderer, const SDL_Rect ** rects,
slouken@3596
    97
                            int count);
slouken@3596
    98
    int (*RenderFillRects) (SDL_Renderer * renderer, const SDL_Rect ** rects,
slouken@3596
    99
                            int count);
slouken@2753
   100
    int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
slouken@2753
   101
                       const SDL_Rect * srcrect, const SDL_Rect * dstrect);
slouken@3427
   102
    int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect,
slouken@3435
   103
                             Uint32 format, void * pixels, int pitch);
slouken@3427
   104
    int (*RenderWritePixels) (SDL_Renderer * renderer, const SDL_Rect * rect,
slouken@3435
   105
                              Uint32 format, const void * pixels, int pitch);
slouken@2753
   106
    void (*RenderPresent) (SDL_Renderer * renderer);
slouken@2753
   107
    void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
slouken@1895
   108
slouken@2753
   109
    void (*DestroyRenderer) (SDL_Renderer * renderer);
slouken@1895
   110
slouken@2753
   111
    /* The current renderer info */
slouken@2753
   112
    SDL_RendererInfo info;
slouken@1895
   113
slouken@2753
   114
    /* The window associated with the renderer */
slouken@3685
   115
    SDL_Window *window;
slouken@3685
   116
slouken@3685
   117
    /* The list of textures */
slouken@3685
   118
    SDL_Texture *textures;
slouken@1895
   119
slouken@2884
   120
    Uint8 r, g, b, a;                   /**< Color for drawing operations values */
slouken@4929
   121
    SDL_BlendMode blendMode;            /**< The drawing blend mode */
slouken@2884
   122
slouken@2753
   123
    void *driverdata;
slouken@1895
   124
};
slouken@1895
   125
slouken@1895
   126
/* Define the SDL render driver structure */
slouken@2753
   127
struct SDL_RenderDriver
slouken@2753
   128
{
slouken@2753
   129
    SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
slouken@1895
   130
slouken@2753
   131
    /* Info about the renderer capabilities */
slouken@2753
   132
    SDL_RendererInfo info;
slouken@1895
   133
};
slouken@1895
   134
eligottlieb@4782
   135
/* Define the SDL window-shaper structure */
eligottlieb@4782
   136
struct SDL_WindowShaper
eligottlieb@4782
   137
{   
eligottlieb@4782
   138
    /* The window associated with the shaper */
eligottlieb@4782
   139
    SDL_Window *window;
eligottlieb@4782
   140
    
eligottlieb@4851
   141
    /* The user's specified coordinates for the window, for once we give it a shape. */
eligottlieb@4851
   142
    Uint32 userx,usery;
eligottlieb@4782
   143
    
eligottlieb@4807
   144
    /* The parameters for shape calculation. */
eligottlieb@4807
   145
    SDL_WindowShapeMode mode;
eligottlieb@4782
   146
    
eligottlieb@4782
   147
    /* Has this window been assigned a shape? */
eligottlieb@4782
   148
    SDL_bool hasshape;
eligottlieb@4782
   149
    
eligottlieb@4782
   150
    void *driverdata;
eligottlieb@4782
   151
};
eligottlieb@4782
   152
eligottlieb@4782
   153
/* Define the SDL shape driver structure */
eligottlieb@4782
   154
struct SDL_ShapeDriver
eligottlieb@4782
   155
{
eligottlieb@4782
   156
    SDL_WindowShaper *(*CreateShaper)(SDL_Window * window);
egottlieb@4849
   157
    int (*SetWindowShape)(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
eligottlieb@4782
   158
    int (*ResizeWindowShape)(SDL_Window *window);
eligottlieb@4782
   159
};
eligottlieb@4782
   160
slouken@1895
   161
/* Define the SDL window structure, corresponding to toplevel windows */
slouken@2753
   162
struct SDL_Window
slouken@2753
   163
{
slouken@3695
   164
    const void *magic;
slouken@2753
   165
    Uint32 id;
slouken@2753
   166
    char *title;
slouken@2753
   167
    int x, y;
slouken@2753
   168
    int w, h;
slouken@2753
   169
    Uint32 flags;
slouken@1895
   170
slouken@3685
   171
    SDL_VideoDisplay *display;
slouken@2753
   172
    SDL_Renderer *renderer;
slouken@1895
   173
slouken@3500
   174
    SDL_DisplayMode fullscreen_mode;
eligottlieb@4782
   175
    
eligottlieb@4782
   176
    SDL_WindowShaper *shaper;
slouken@3500
   177
slouken@2753
   178
    void *userdata;
slouken@2753
   179
    void *driverdata;
slouken@3685
   180
slouken@3685
   181
    SDL_Window *prev;
slouken@3685
   182
    SDL_Window *next;
slouken@1895
   183
};
slouken@1895
   184
#define FULLSCREEN_VISIBLE(W) \
slouken@1895
   185
    (((W)->flags & SDL_WINDOW_FULLSCREEN) && \
slouken@1895
   186
     ((W)->flags & SDL_WINDOW_SHOWN) && \
slouken@1895
   187
     !((W)->flags & SDL_WINDOW_MINIMIZED))
slouken@1895
   188
hfutrell@2742
   189
/*
hfutrell@2742
   190
 * Define the SDL display structure This corresponds to physical monitors
hfutrell@2742
   191
 * attached to the system.
slouken@1895
   192
 */
slouken@2753
   193
struct SDL_VideoDisplay
slouken@2753
   194
{
slouken@2753
   195
    int max_display_modes;
slouken@2753
   196
    int num_display_modes;
slouken@2753
   197
    SDL_DisplayMode *display_modes;
slouken@2753
   198
    SDL_DisplayMode desktop_mode;
slouken@2753
   199
    SDL_DisplayMode current_mode;
slouken@3502
   200
    SDL_bool updating_fullscreen;
slouken@2753
   201
    SDL_Palette *palette;
slouken@1895
   202
slouken@2753
   203
    Uint16 *gamma;
slouken@2753
   204
    Uint16 *saved_gamma;        /* (just offset into gamma) */
slouken@1895
   205
slouken@2753
   206
    int num_render_drivers;
slouken@2753
   207
    SDL_RenderDriver *render_drivers;
slouken@1895
   208
slouken@2753
   209
    SDL_Window *windows;
slouken@3517
   210
    SDL_Window *fullscreen_window;
slouken@1895
   211
slouken@2753
   212
    SDL_Renderer *current_renderer;
slouken@1895
   213
slouken@2753
   214
    SDL_VideoDevice *device;
slouken@1895
   215
slouken@2753
   216
    void *driverdata;
slouken@1895
   217
};
slouken@1895
   218
slouken@0
   219
/* Define the SDL video driver structure */
slouken@0
   220
#define _THIS	SDL_VideoDevice *_this
slouken@0
   221
slouken@2753
   222
struct SDL_VideoDevice
slouken@2753
   223
{
slouken@2753
   224
    /* * * */
slouken@2753
   225
    /* The name of this video driver */
slouken@2753
   226
    const char *name;
slouken@0
   227
slouken@2753
   228
    /* * * */
slouken@2753
   229
    /* Initialization/Query functions */
slouken@0
   230
slouken@2753
   231
    /*
slouken@2753
   232
     * Initialize the native video subsystem, filling in the list of
slouken@2753
   233
     * displays for this driver, returning 0 or -1 if there's an error.
slouken@2753
   234
     */
slouken@2753
   235
    int (*VideoInit) (_THIS);
slouken@0
   236
slouken@2753
   237
    /*
slouken@2753
   238
     * Reverse the effects VideoInit() -- called if VideoInit() fails or
slouken@2753
   239
     * if the application is shutting down the video subsystem.
slouken@2753
   240
     */
slouken@2753
   241
    void (*VideoQuit) (_THIS);
slouken@1913
   242
slouken@2753
   243
    /* * * */
slouken@2753
   244
    /*
slouken@2753
   245
     * Display functions
slouken@2753
   246
     */
slouken@0
   247
slouken@2753
   248
    /*
slouken@3528
   249
     * Get the bounds of a display
slouken@3528
   250
     */
slouken@3528
   251
    int (*GetDisplayBounds) (_THIS, SDL_VideoDisplay * display, SDL_Rect * rect);
slouken@3528
   252
slouken@3528
   253
    /*
slouken@2753
   254
     * Get a list of the available display modes. e.g.
slouken@2753
   255
     * SDL_AddDisplayMode(_this->current_display, mode)
slouken@2753
   256
     */
slouken@3500
   257
    void (*GetDisplayModes) (_THIS, SDL_VideoDisplay * display);
slouken@0
   258
slouken@2753
   259
    /*
slouken@2753
   260
     * Setting the display mode is independent of creating windows, so
slouken@2753
   261
     * when the display mode is changed, all existing windows should have
slouken@2753
   262
     * their data updated accordingly, including the display surfaces
slouken@2753
   263
     * associated with them.
slouken@2753
   264
     */
slouken@3500
   265
    int (*SetDisplayMode) (_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
slouken@0
   266
slouken@2753
   267
    /* Set the color entries of the display palette */
slouken@3500
   268
    int (*SetDisplayPalette) (_THIS, SDL_VideoDisplay * display, SDL_Palette * palette);
slouken@0
   269
slouken@2753
   270
    /* Get the color entries of the display palette */
slouken@3500
   271
    int (*GetDisplayPalette) (_THIS, SDL_VideoDisplay * display, SDL_Palette * palette);
slouken@0
   272
slouken@2753
   273
    /* Set the gamma ramp */
slouken@3500
   274
    int (*SetDisplayGammaRamp) (_THIS, SDL_VideoDisplay * display, Uint16 * ramp);
slouken@0
   275
slouken@2753
   276
    /* Get the gamma ramp */
slouken@3500
   277
    int (*GetDisplayGammaRamp) (_THIS, SDL_VideoDisplay * display, Uint16 * ramp);
slouken@0
   278
slouken@2753
   279
    /* * * */
slouken@2753
   280
    /*
slouken@2753
   281
     * Window functions
slouken@2753
   282
     */
slouken@2753
   283
    int (*CreateWindow) (_THIS, SDL_Window * window);
slouken@2753
   284
    int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
slouken@2753
   285
    void (*SetWindowTitle) (_THIS, SDL_Window * window);
slouken@2967
   286
    void (*SetWindowIcon) (_THIS, SDL_Window * window, SDL_Surface * icon);
slouken@2753
   287
    void (*SetWindowPosition) (_THIS, SDL_Window * window);
slouken@2753
   288
    void (*SetWindowSize) (_THIS, SDL_Window * window);
slouken@2753
   289
    void (*ShowWindow) (_THIS, SDL_Window * window);
slouken@2753
   290
    void (*HideWindow) (_THIS, SDL_Window * window);
slouken@2753
   291
    void (*RaiseWindow) (_THIS, SDL_Window * window);
slouken@2753
   292
    void (*MaximizeWindow) (_THIS, SDL_Window * window);
slouken@2753
   293
    void (*MinimizeWindow) (_THIS, SDL_Window * window);
slouken@2753
   294
    void (*RestoreWindow) (_THIS, SDL_Window * window);
slouken@2753
   295
    void (*SetWindowGrab) (_THIS, SDL_Window * window);
slouken@2753
   296
    void (*DestroyWindow) (_THIS, SDL_Window * window);
eligottlieb@4782
   297
    
eligottlieb@4782
   298
    /* * * */
eligottlieb@4782
   299
    /*
eligottlieb@4782
   300
     * Shaped-window functions
eligottlieb@4782
   301
     */
eligottlieb@4782
   302
    SDL_ShapeDriver shape_driver;
slouken@0
   303
slouken@2753
   304
    /* Get some platform dependent window information */
slouken@2753
   305
      SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
slouken@2753
   306
                                  struct SDL_SysWMinfo * info);
slouken@0
   307
slouken@2753
   308
    /* * * */
slouken@2753
   309
    /*
slouken@2753
   310
     * OpenGL support
slouken@2753
   311
     */
slouken@2753
   312
    int (*GL_LoadLibrary) (_THIS, const char *path);
slouken@2753
   313
    void *(*GL_GetProcAddress) (_THIS, const char *proc);
slouken@3057
   314
    void (*GL_UnloadLibrary) (_THIS);
slouken@2753
   315
      SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
slouken@2753
   316
    int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
slouken@2753
   317
    int (*GL_SetSwapInterval) (_THIS, int interval);
slouken@2753
   318
    int (*GL_GetSwapInterval) (_THIS);
slouken@2753
   319
    void (*GL_SwapWindow) (_THIS, SDL_Window * window);
slouken@2753
   320
    void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
slouken@0
   321
slouken@2753
   322
    /* * * */
slouken@2753
   323
    /*
slouken@2753
   324
     * Event manager functions
slouken@2753
   325
     */
slouken@2753
   326
    void (*PumpEvents) (_THIS);
slouken@0
   327
slouken@3025
   328
    /* Suspend the screensaver */
slouken@3025
   329
    void (*SuspendScreenSaver) (_THIS);
slouken@3025
   330
slouken@3280
   331
    /* Text input */
slouken@3280
   332
    void (*StartTextInput) (_THIS);
slouken@3280
   333
    void (*StopTextInput) (_THIS);
slouken@3280
   334
    void (*SetTextInputRect) (_THIS, SDL_Rect *rect);
slouken@3280
   335
slouken@4495
   336
    /* Clipboard */
slouken@4495
   337
    int (*SetClipboardText) (_THIS, const char *text);
slouken@4495
   338
    char * (*GetClipboardText) (_THIS);
slouken@4495
   339
    SDL_bool (*HasClipboardText) (_THIS);
slouken@4495
   340
slouken@2753
   341
    /* * * */
slouken@2753
   342
    /* Data common to all drivers */
slouken@3025
   343
    SDL_bool suspend_screensaver;
slouken@2753
   344
    int num_displays;
slouken@2753
   345
    SDL_VideoDisplay *displays;
slouken@2753
   346
    int current_display;
slouken@3695
   347
    Uint8 window_magic;
slouken@3695
   348
    Uint8 texture_magic;
slouken@2753
   349
    Uint32 next_object_id;
slouken@4495
   350
    char * clipboard_text;
slouken@0
   351
slouken@2753
   352
    /* * * */
slouken@2753
   353
    /* Data used by the GL drivers */
slouken@2753
   354
    struct
slouken@2753
   355
    {
slouken@2753
   356
        int red_size;
slouken@2753
   357
        int green_size;
slouken@2753
   358
        int blue_size;
slouken@2753
   359
        int alpha_size;
slouken@2753
   360
        int depth_size;
slouken@2753
   361
        int buffer_size;
slouken@2753
   362
        int stencil_size;
slouken@2753
   363
        int double_buffer;
slouken@2753
   364
        int accum_red_size;
slouken@2753
   365
        int accum_green_size;
slouken@2753
   366
        int accum_blue_size;
slouken@2753
   367
        int accum_alpha_size;
slouken@2753
   368
        int stereo;
slouken@2753
   369
        int multisamplebuffers;
slouken@2753
   370
        int multisamplesamples;
slouken@2753
   371
        int accelerated;
slouken@3100
   372
        int major_version;
slouken@3100
   373
        int minor_version;
slouken@2753
   374
        int retained_backing;
slouken@2753
   375
        int driver_loaded;
slouken@2753
   376
        char driver_path[256];
slouken@2753
   377
        void *dll_handle;
slouken@2753
   378
    } gl_config;
slouken@0
   379
slouken@2753
   380
    /* * * */
slouken@2753
   381
    /* Data private to this driver */
slouken@2753
   382
    void *driverdata;
slouken@2753
   383
    struct SDL_GLDriverData *gl_data;
slouken@0
   384
slouken@3161
   385
#if SDL_VIDEO_DRIVER_PANDORA
slouken@3161
   386
    struct SDL_PrivateGLESData *gles_data;
slouken@3161
   387
#endif
slouken@3161
   388
slouken@2753
   389
    /* * * */
slouken@2753
   390
    /* The function used to dispose of this structure */
slouken@2753
   391
    void (*free) (_THIS);
slouken@1895
   392
};
slouken@0
   393
slouken@2753
   394
typedef struct VideoBootStrap
slouken@2753
   395
{
slouken@2753
   396
    const char *name;
slouken@2753
   397
    const char *desc;
slouken@2753
   398
    int (*available) (void);
slouken@2753
   399
    SDL_VideoDevice *(*create) (int devindex);
slouken@2753
   400
} VideoBootStrap;
slouken@0
   401
slouken@1931
   402
#if SDL_VIDEO_DRIVER_COCOA
slouken@1931
   403
extern VideoBootStrap COCOA_bootstrap;
slouken@1361
   404
#endif
slouken@1361
   405
#if SDL_VIDEO_DRIVER_X11
slouken@0
   406
extern VideoBootStrap X11_bootstrap;
slouken@0
   407
#endif
slouken@1361
   408
#if SDL_VIDEO_DRIVER_DIRECTFB
slouken@167
   409
extern VideoBootStrap DirectFB_bootstrap;
slouken@167
   410
#endif
slouken@5062
   411
#if SDL_VIDEO_DRIVER_WINDOWS
slouken@5062
   412
extern VideoBootStrap WINDOWS_bootstrap;
slouken@1361
   413
#endif
slouken@1361
   414
#if SDL_VIDEO_DRIVER_BWINDOW
slouken@1361
   415
extern VideoBootStrap BWINDOW_bootstrap;
slouken@1361
   416
#endif
slouken@1361
   417
#if SDL_VIDEO_DRIVER_PHOTON
slouken@3083
   418
extern VideoBootStrap photon_bootstrap;
slouken@3083
   419
#endif
slouken@3083
   420
#if SDL_VIDEO_DRIVER_QNXGF
slouken@3083
   421
extern VideoBootStrap qnxgf_bootstrap;
slouken@1361
   422
#endif
slouken@1361
   423
#if SDL_VIDEO_DRIVER_EPOC
slouken@1361
   424
extern VideoBootStrap EPOC_bootstrap;
slouken@1361
   425
#endif
hfutrell@2742
   426
#if SDL_VIDEO_DRIVER_UIKIT
hfutrell@2742
   427
extern VideoBootStrap UIKIT_bootstrap;
hfutrell@2742
   428
#endif
slouken@1361
   429
#if SDL_VIDEO_DRIVER_DUMMY
slouken@173
   430
extern VideoBootStrap DUMMY_bootstrap;
slouken@173
   431
#endif
slouken@2735
   432
#if SDL_VIDEO_DRIVER_NDS
slouken@2735
   433
extern VideoBootStrap NDS_bootstrap;
slouken@2735
   434
#endif
slouken@3161
   435
#if SDL_VIDEO_DRIVER_PANDORA
slouken@3161
   436
extern VideoBootStrap PND_bootstrap;
slouken@3161
   437
#endif
paul@4701
   438
#if SDL_VIDEO_DRIVER_ANDROID
paul@4701
   439
extern VideoBootStrap Android_bootstrap;
paul@4701
   440
#endif
slouken@1361
   441
slouken@3685
   442
#define SDL_CurrentDisplay	(&_this->displays[_this->current_display])
slouken@3685
   443
#define SDL_CurrentRenderer	(SDL_CurrentDisplay->current_renderer)
slouken@0
   444
slouken@4472
   445
extern SDL_VideoDevice *SDL_GetVideoDevice(void);
slouken@2753
   446
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
slouken@2753
   447
extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
slouken@3500
   448
extern SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode * mode);
slouken@3500
   449
extern int SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay * display);
slouken@3500
   450
extern int SDL_GetDisplayModeForDisplay(SDL_VideoDisplay * display, int index, SDL_DisplayMode * mode);
slouken@3500
   451
extern int SDL_GetDesktopDisplayModeForDisplay(SDL_VideoDisplay * display, SDL_DisplayMode * mode);
slouken@3500
   452
extern int SDL_GetCurrentDisplayModeForDisplay(SDL_VideoDisplay * display, SDL_DisplayMode * mode);
slouken@3500
   453
extern SDL_DisplayMode * SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
slouken@3500
   454
extern int SDL_SetDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode);
slouken@3501
   455
extern int SDL_SetPaletteForDisplay(SDL_VideoDisplay * display, const SDL_Color * colors, int firstcolor, int ncolors);
slouken@3501
   456
extern int SDL_GetPaletteForDisplay(SDL_VideoDisplay * display, SDL_Color * colors, int firstcolor, int ncolors);
slouken@3500
   457
extern int SDL_SetGammaRampForDisplay(SDL_VideoDisplay * display, const Uint16 * red, const Uint16 * green, const Uint16 * blue);
slouken@3500
   458
extern int SDL_GetGammaRampForDisplay(SDL_VideoDisplay * display, Uint16 * red, Uint16 * green, Uint16 * blue);
slouken@3501
   459
extern void SDL_AddRenderDriver(SDL_VideoDisplay *display, const SDL_RenderDriver * driver);
slouken@1895
   460
slouken@2753
   461
extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
slouken@1895
   462
slouken@2753
   463
extern void SDL_OnWindowShown(SDL_Window * window);
slouken@2753
   464
extern void SDL_OnWindowHidden(SDL_Window * window);
slouken@2753
   465
extern void SDL_OnWindowResized(SDL_Window * window);
slouken@3502
   466
extern void SDL_OnWindowMinimized(SDL_Window * window);
slouken@3502
   467
extern void SDL_OnWindowRestored(SDL_Window * window);
slouken@2753
   468
extern void SDL_OnWindowFocusGained(SDL_Window * window);
slouken@2753
   469
extern void SDL_OnWindowFocusLost(SDL_Window * window);
slouken@3685
   470
extern SDL_Window * SDL_GetFocusWindow(void);
slouken@0
   471
slouken@2753
   472
#endif /* _SDL_sysvideo_h */
slouken@1895
   473
slouken@1895
   474
/* vi: set ts=4 sw=4 expandtab: */