src/video/SDL_sysvideo.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 18 May 2018 13:09:30 -0700
changeset 11983 3a50eb90e4b2
parent 11839 971881e55d61
child 12070 1d65571b57dd
permissions -rw-r--r--
Merged latest changes from Steam Link app
slouken@8582
     1
/*
slouken@8582
     2
  Simple DirectMedia Layer
slouken@11811
     3
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
slouken@8582
     4
slouken@8582
     5
  This software is provided 'as-is', without any express or implied
slouken@8582
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@8582
     7
  arising from the use of this software.
slouken@8582
     8
slouken@8582
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@8582
    10
  including commercial applications, and to alter it and redistribute it
slouken@8582
    11
  freely, subject to the following restrictions:
slouken@8582
    12
slouken@8582
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@8582
    14
     claim that you wrote the original software. If you use this software
slouken@8582
    15
     in a product, an acknowledgment in the product documentation would be
slouken@8582
    16
     appreciated but is not required.
slouken@8582
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@8582
    18
     misrepresented as being the original software.
slouken@8582
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@8582
    20
*/
icculus@8093
    21
#include "../SDL_internal.h"
slouken@8582
    22
slouken@10638
    23
#ifndef SDL_sysvideo_h_
slouken@10638
    24
#define SDL_sysvideo_h_
slouken@8582
    25
slouken@8582
    26
#include "SDL_messagebox.h"
slouken@8582
    27
#include "SDL_shape.h"
slouken@8582
    28
#include "SDL_thread.h"
slouken@11376
    29
slouken@11376
    30
#include "SDL_vulkan_internal.h"
slouken@8582
    31
slouken@8582
    32
/* The SDL video driver */
slouken@8582
    33
slouken@8582
    34
typedef struct SDL_WindowShaper SDL_WindowShaper;
slouken@8582
    35
typedef struct SDL_ShapeDriver SDL_ShapeDriver;
slouken@8582
    36
typedef struct SDL_VideoDisplay SDL_VideoDisplay;
slouken@8582
    37
typedef struct SDL_VideoDevice SDL_VideoDevice;
slouken@8582
    38
slouken@8582
    39
/* Define the SDL window-shaper structure */
slouken@8582
    40
struct SDL_WindowShaper
slouken@8582
    41
{
slouken@8582
    42
    /* The window associated with the shaper */
slouken@8582
    43
    SDL_Window *window;
slouken@8582
    44
slouken@8582
    45
    /* The user's specified coordinates for the window, for once we give it a shape. */
slouken@8582
    46
    Uint32 userx,usery;
slouken@8582
    47
slouken@8582
    48
    /* The parameters for shape calculation. */
slouken@8582
    49
    SDL_WindowShapeMode mode;
slouken@8582
    50
slouken@8582
    51
    /* Has this window been assigned a shape? */
slouken@8582
    52
    SDL_bool hasshape;
slouken@8582
    53
slouken@8582
    54
    void *driverdata;
slouken@8582
    55
};
slouken@8582
    56
slouken@8582
    57
/* Define the SDL shape driver structure */
slouken@8582
    58
struct SDL_ShapeDriver
slouken@8582
    59
{
slouken@8582
    60
    SDL_WindowShaper *(*CreateShaper)(SDL_Window * window);
slouken@8582
    61
    int (*SetWindowShape)(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
slouken@8582
    62
    int (*ResizeWindowShape)(SDL_Window *window);
slouken@8582
    63
};
slouken@8582
    64
slouken@8582
    65
typedef struct SDL_WindowUserData
slouken@8582
    66
{
slouken@8582
    67
    char *name;
slouken@8582
    68
    void *data;
slouken@8582
    69
    struct SDL_WindowUserData *next;
slouken@8582
    70
} SDL_WindowUserData;
slouken@8582
    71
slouken@8582
    72
/* Define the SDL window structure, corresponding to toplevel windows */
slouken@8582
    73
struct SDL_Window
slouken@8582
    74
{
slouken@8582
    75
    const void *magic;
slouken@8582
    76
    Uint32 id;
slouken@8582
    77
    char *title;
slouken@8582
    78
    SDL_Surface *icon;
slouken@8582
    79
    int x, y;
slouken@8582
    80
    int w, h;
slouken@8582
    81
    int min_w, min_h;
slouken@8582
    82
    int max_w, max_h;
slouken@8582
    83
    Uint32 flags;
jorgen@8110
    84
    Uint32 last_fullscreen_flags;
slouken@8582
    85
slouken@8582
    86
    /* Stored position and size for windowed mode */
slouken@8582
    87
    SDL_Rect windowed;
slouken@8582
    88
slouken@8582
    89
    SDL_DisplayMode fullscreen_mode;
slouken@8582
    90
icculus@10025
    91
    float opacity;
icculus@10025
    92
slouken@8582
    93
    float brightness;
slouken@8582
    94
    Uint16 *gamma;
slouken@8582
    95
    Uint16 *saved_gamma;        /* (just offset into gamma) */
slouken@8582
    96
slouken@8582
    97
    SDL_Surface *surface;
slouken@8582
    98
    SDL_bool surface_valid;
slouken@8582
    99
alfred@9037
   100
    SDL_bool is_hiding;
jorgen@8112
   101
    SDL_bool is_destroying;
icculus@10022
   102
    SDL_bool is_dropping;       /* drag/drop in progress, expecting SDL_SendDropComplete(). */
jorgen@8112
   103
slouken@8582
   104
    SDL_WindowShaper *shaper;
slouken@8582
   105
icculus@8935
   106
    SDL_HitTest hit_test;
icculus@8935
   107
    void *hit_test_data;
icculus@8931
   108
slouken@8582
   109
    SDL_WindowUserData *data;
slouken@8582
   110
slouken@8582
   111
    void *driverdata;
slouken@8582
   112
slouken@8582
   113
    SDL_Window *prev;
slouken@8582
   114
    SDL_Window *next;
slouken@8582
   115
};
slouken@8582
   116
#define FULLSCREEN_VISIBLE(W) \
slouken@8582
   117
    (((W)->flags & SDL_WINDOW_FULLSCREEN) && \
slouken@8582
   118
     ((W)->flags & SDL_WINDOW_SHOWN) && \
slouken@8582
   119
     !((W)->flags & SDL_WINDOW_MINIMIZED))
slouken@8582
   120
slouken@8582
   121
/*
slouken@8582
   122
 * Define the SDL display structure This corresponds to physical monitors
slouken@8582
   123
 * attached to the system.
slouken@8582
   124
 */
slouken@8582
   125
struct SDL_VideoDisplay
slouken@8582
   126
{
slouken@8582
   127
    char *name;
slouken@8582
   128
    int max_display_modes;
slouken@8582
   129
    int num_display_modes;
slouken@8582
   130
    SDL_DisplayMode *display_modes;
slouken@8582
   131
    SDL_DisplayMode desktop_mode;
slouken@8582
   132
    SDL_DisplayMode current_mode;
slouken@8582
   133
slouken@8582
   134
    SDL_Window *fullscreen_window;
slouken@8582
   135
slouken@8582
   136
    SDL_VideoDevice *device;
slouken@8582
   137
slouken@8582
   138
    void *driverdata;
slouken@8582
   139
};
slouken@8582
   140
slouken@8582
   141
/* Forward declaration */
slouken@8582
   142
struct SDL_SysWMinfo;
slouken@8582
   143
slouken@8582
   144
/* Define the SDL video driver structure */
slouken@8582
   145
#define _THIS   SDL_VideoDevice *_this
slouken@8582
   146
slouken@8582
   147
struct SDL_VideoDevice
slouken@8582
   148
{
slouken@8582
   149
    /* * * */
slouken@8582
   150
    /* The name of this video driver */
slouken@8582
   151
    const char *name;
slouken@8582
   152
slouken@8582
   153
    /* * * */
slouken@8582
   154
    /* Initialization/Query functions */
slouken@8582
   155
slouken@8582
   156
    /*
slouken@8582
   157
     * Initialize the native video subsystem, filling in the list of
slouken@8582
   158
     * displays for this driver, returning 0 or -1 if there's an error.
slouken@8582
   159
     */
slouken@8582
   160
    int (*VideoInit) (_THIS);
slouken@8582
   161
slouken@8582
   162
    /*
slouken@8582
   163
     * Reverse the effects VideoInit() -- called if VideoInit() fails or
slouken@8582
   164
     * if the application is shutting down the video subsystem.
slouken@8582
   165
     */
slouken@8582
   166
    void (*VideoQuit) (_THIS);
slouken@8582
   167
slouken@10880
   168
    /*
slouken@10880
   169
     * Reinitialize the touch devices -- called if an unknown touch ID occurs.
slouken@10880
   170
     */
slouken@10880
   171
    void (*ResetTouch) (_THIS);
slouken@10880
   172
slouken@8582
   173
    /* * * */
slouken@8582
   174
    /*
slouken@8582
   175
     * Display functions
slouken@8582
   176
     */
slouken@8582
   177
slouken@8582
   178
    /*
slouken@8582
   179
     * Get the bounds of a display
slouken@8582
   180
     */
slouken@8582
   181
    int (*GetDisplayBounds) (_THIS, SDL_VideoDisplay * display, SDL_Rect * rect);
slouken@8582
   182
slouken@8582
   183
    /*
alfred@9813
   184
     * Get the dots/pixels-per-inch of a display
alfred@9813
   185
     */
alfred@9813
   186
    int (*GetDisplayDPI) (_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi);
alfred@9813
   187
alfred@9813
   188
    /*
icculus@10019
   189
     * Get the usable bounds of a display (bounds minus menubar or whatever)
icculus@10019
   190
     */
icculus@10019
   191
    int (*GetDisplayUsableBounds) (_THIS, SDL_VideoDisplay * display, SDL_Rect * rect);
icculus@10019
   192
icculus@10019
   193
    /*
slouken@8582
   194
     * Get a list of the available display modes for a display.
slouken@8582
   195
     */
slouken@8582
   196
    void (*GetDisplayModes) (_THIS, SDL_VideoDisplay * display);
slouken@8582
   197
slouken@8582
   198
    /*
slouken@8582
   199
     * Setting the display mode is independent of creating windows, so
slouken@8582
   200
     * when the display mode is changed, all existing windows should have
slouken@8582
   201
     * their data updated accordingly, including the display surfaces
slouken@8582
   202
     * associated with them.
slouken@8582
   203
     */
slouken@8582
   204
    int (*SetDisplayMode) (_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
slouken@8582
   205
slouken@8582
   206
    /* * * */
slouken@8582
   207
    /*
slouken@8582
   208
     * Window functions
slouken@8582
   209
     */
slouken@11383
   210
    int (*CreateSDLWindow) (_THIS, SDL_Window * window);
slouken@11383
   211
    int (*CreateSDLWindowFrom) (_THIS, SDL_Window * window, const void *data);
slouken@8582
   212
    void (*SetWindowTitle) (_THIS, SDL_Window * window);
slouken@8582
   213
    void (*SetWindowIcon) (_THIS, SDL_Window * window, SDL_Surface * icon);
slouken@8582
   214
    void (*SetWindowPosition) (_THIS, SDL_Window * window);
slouken@8582
   215
    void (*SetWindowSize) (_THIS, SDL_Window * window);
slouken@8582
   216
    void (*SetWindowMinimumSize) (_THIS, SDL_Window * window);
slouken@8582
   217
    void (*SetWindowMaximumSize) (_THIS, SDL_Window * window);
icculus@10024
   218
    int (*GetWindowBordersSize) (_THIS, SDL_Window * window, int *top, int *left, int *bottom, int *right);
icculus@10025
   219
    int (*SetWindowOpacity) (_THIS, SDL_Window * window, float opacity);
icculus@10027
   220
    int (*SetWindowModalFor) (_THIS, SDL_Window * modal_window, SDL_Window * parent_window);
icculus@10026
   221
    int (*SetWindowInputFocus) (_THIS, SDL_Window * window);
slouken@8582
   222
    void (*ShowWindow) (_THIS, SDL_Window * window);
slouken@8582
   223
    void (*HideWindow) (_THIS, SDL_Window * window);
slouken@8582
   224
    void (*RaiseWindow) (_THIS, SDL_Window * window);
slouken@8582
   225
    void (*MaximizeWindow) (_THIS, SDL_Window * window);
slouken@8582
   226
    void (*MinimizeWindow) (_THIS, SDL_Window * window);
slouken@8582
   227
    void (*RestoreWindow) (_THIS, SDL_Window * window);
slouken@8582
   228
    void (*SetWindowBordered) (_THIS, SDL_Window * window, SDL_bool bordered);
icculus@10385
   229
    void (*SetWindowResizable) (_THIS, SDL_Window * window, SDL_bool resizable);
slouken@8582
   230
    void (*SetWindowFullscreen) (_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
slouken@8582
   231
    int (*SetWindowGammaRamp) (_THIS, SDL_Window * window, const Uint16 * ramp);
slouken@8582
   232
    int (*GetWindowGammaRamp) (_THIS, SDL_Window * window, Uint16 * ramp);
slouken@8582
   233
    void (*SetWindowGrab) (_THIS, SDL_Window * window, SDL_bool grabbed);
slouken@8582
   234
    void (*DestroyWindow) (_THIS, SDL_Window * window);
slouken@8582
   235
    int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch);
slouken@8582
   236
    int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects);
slouken@8582
   237
    void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);
slouken@8582
   238
    void (*OnWindowEnter) (_THIS, SDL_Window * window);
slouken@8582
   239
slouken@8582
   240
    /* * * */
slouken@8582
   241
    /*
slouken@8582
   242
     * Shaped-window functions
slouken@8582
   243
     */
slouken@8582
   244
    SDL_ShapeDriver shape_driver;
slouken@8582
   245
slouken@8582
   246
    /* Get some platform dependent window information */
icculus@8782
   247
    SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
icculus@8782
   248
                                struct SDL_SysWMinfo * info);
slouken@8582
   249
slouken@8582
   250
    /* * * */
slouken@8582
   251
    /*
slouken@8582
   252
     * OpenGL support
slouken@8582
   253
     */
slouken@8582
   254
    int (*GL_LoadLibrary) (_THIS, const char *path);
slouken@8582
   255
    void *(*GL_GetProcAddress) (_THIS, const char *proc);
slouken@8582
   256
    void (*GL_UnloadLibrary) (_THIS);
slouken@8582
   257
      SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
slouken@8582
   258
    int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
slouken@8582
   259
    void (*GL_GetDrawableSize) (_THIS, SDL_Window * window, int *w, int *h);
slouken@8582
   260
    int (*GL_SetSwapInterval) (_THIS, int interval);
slouken@8582
   261
    int (*GL_GetSwapInterval) (_THIS);
slouken@10690
   262
    int (*GL_SwapWindow) (_THIS, SDL_Window * window);
slouken@8582
   263
    void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
icculus@11444
   264
    void (*GL_DefaultProfileConfig) (_THIS, int *mask, int *major, int *minor);
slouken@8582
   265
slouken@8582
   266
    /* * * */
slouken@8582
   267
    /*
icculus@11365
   268
     * Vulkan support
icculus@11365
   269
     */
icculus@11365
   270
    int (*Vulkan_LoadLibrary) (_THIS, const char *path);
icculus@11365
   271
    void (*Vulkan_UnloadLibrary) (_THIS);
icculus@11365
   272
    SDL_bool (*Vulkan_GetInstanceExtensions) (_THIS, SDL_Window *window, unsigned *count, const char **names);
icculus@11365
   273
    SDL_bool (*Vulkan_CreateSurface) (_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface);
icculus@11365
   274
    void (*Vulkan_GetDrawableSize) (_THIS, SDL_Window * window, int *w, int *h);
icculus@11365
   275
icculus@11365
   276
    /* * * */
icculus@11365
   277
    /*
slouken@8582
   278
     * Event manager functions
slouken@8582
   279
     */
slouken@8582
   280
    void (*PumpEvents) (_THIS);
slouken@8582
   281
slouken@8582
   282
    /* Suspend the screensaver */
slouken@8582
   283
    void (*SuspendScreenSaver) (_THIS);
slouken@8582
   284
slouken@8582
   285
    /* Text input */
slouken@8582
   286
    void (*StartTextInput) (_THIS);
slouken@8582
   287
    void (*StopTextInput) (_THIS);
slouken@8582
   288
    void (*SetTextInputRect) (_THIS, SDL_Rect *rect);
slouken@8582
   289
slouken@8582
   290
    /* Screen keyboard */
slouken@8582
   291
    SDL_bool (*HasScreenKeyboardSupport) (_THIS);
slouken@8582
   292
    void (*ShowScreenKeyboard) (_THIS, SDL_Window *window);
slouken@8582
   293
    void (*HideScreenKeyboard) (_THIS, SDL_Window *window);
slouken@8582
   294
    SDL_bool (*IsScreenKeyboardShown) (_THIS, SDL_Window *window);
slouken@8582
   295
slouken@8582
   296
    /* Clipboard */
slouken@8582
   297
    int (*SetClipboardText) (_THIS, const char *text);
slouken@8582
   298
    char * (*GetClipboardText) (_THIS);
slouken@8582
   299
    SDL_bool (*HasClipboardText) (_THIS);
slouken@8582
   300
slouken@8582
   301
    /* MessageBox */
slouken@8582
   302
    int (*ShowMessageBox) (_THIS, const SDL_MessageBoxData *messageboxdata, int *buttonid);
slouken@8582
   303
icculus@8935
   304
    /* Hit-testing */
icculus@8935
   305
    int (*SetWindowHitTest)(SDL_Window * window, SDL_bool enabled);
icculus@8931
   306
slouken@8582
   307
    /* * * */
slouken@8582
   308
    /* Data common to all drivers */
slouken@10699
   309
    SDL_bool is_dummy;
slouken@8582
   310
    SDL_bool suspend_screensaver;
slouken@8582
   311
    int num_displays;
slouken@8582
   312
    SDL_VideoDisplay *displays;
slouken@8582
   313
    SDL_Window *windows;
icculus@9447
   314
    SDL_Window *grabbed_window;
slouken@8582
   315
    Uint8 window_magic;
slouken@8582
   316
    Uint32 next_object_id;
slouken@10699
   317
    char *clipboard_text;
slouken@8582
   318
slouken@8582
   319
    /* * * */
slouken@8582
   320
    /* Data used by the GL drivers */
slouken@8582
   321
    struct
slouken@8582
   322
    {
slouken@8582
   323
        int red_size;
slouken@8582
   324
        int green_size;
slouken@8582
   325
        int blue_size;
slouken@8582
   326
        int alpha_size;
slouken@8582
   327
        int depth_size;
slouken@8582
   328
        int buffer_size;
slouken@8582
   329
        int stencil_size;
slouken@8582
   330
        int double_buffer;
slouken@8582
   331
        int accum_red_size;
slouken@8582
   332
        int accum_green_size;
slouken@8582
   333
        int accum_blue_size;
slouken@8582
   334
        int accum_alpha_size;
slouken@8582
   335
        int stereo;
slouken@8582
   336
        int multisamplebuffers;
slouken@8582
   337
        int multisamplesamples;
slouken@8582
   338
        int accelerated;
slouken@8582
   339
        int major_version;
slouken@8582
   340
        int minor_version;
slouken@8582
   341
        int flags;
slouken@8582
   342
        int profile_mask;
slouken@8582
   343
        int share_with_current_context;
mdiluzio@9412
   344
        int release_behavior;
icculus@11332
   345
        int reset_notification;
slouken@8582
   346
        int framebuffer_srgb_capable;
icculus@11346
   347
        int no_error;
slouken@8582
   348
        int retained_backing;
slouken@8582
   349
        int driver_loaded;
slouken@8582
   350
        char driver_path[256];
slouken@8582
   351
        void *dll_handle;
slouken@8582
   352
    } gl_config;
slouken@8582
   353
slouken@8582
   354
    /* * * */
slouken@8582
   355
    /* Cache current GL context; don't call the OS when it hasn't changed. */
slouken@8582
   356
    /* We have the global pointers here so Cocoa continues to work the way
slouken@8582
   357
       it always has, and the thread-local storage for the general case.
slouken@8582
   358
     */
slouken@8582
   359
    SDL_Window *current_glwin;
slouken@8582
   360
    SDL_GLContext current_glctx;
slouken@8582
   361
    SDL_TLSID current_glwin_tls;
slouken@8582
   362
    SDL_TLSID current_glctx_tls;
slouken@8582
   363
slouken@8582
   364
    /* * * */
icculus@11365
   365
    /* Data used by the Vulkan drivers */
icculus@11365
   366
    struct
icculus@11365
   367
    {
slouken@11839
   368
        PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
slouken@11839
   369
        PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties;
icculus@11365
   370
        int loader_loaded;
icculus@11365
   371
        char loader_path[256];
icculus@11365
   372
        void *loader_handle;
icculus@11365
   373
    } vulkan_config;
icculus@11365
   374
icculus@11365
   375
    /* * * */
slouken@8582
   376
    /* Data private to this driver */
slouken@8582
   377
    void *driverdata;
slouken@8582
   378
    struct SDL_GLDriverData *gl_data;
slouken@8582
   379
    
slouken@8582
   380
#if SDL_VIDEO_OPENGL_EGL
slouken@8582
   381
    struct SDL_EGL_VideoData *egl_data;
slouken@8582
   382
#endif
slouken@8582
   383
    
slouken@8582
   384
#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
slouken@8582
   385
    struct SDL_PrivateGLESData *gles_data;
slouken@8582
   386
#endif
slouken@8582
   387
slouken@8582
   388
    /* * * */
slouken@8582
   389
    /* The function used to dispose of this structure */
slouken@8582
   390
    void (*free) (_THIS);
slouken@8582
   391
};
slouken@8582
   392
slouken@8582
   393
typedef struct VideoBootStrap
slouken@8582
   394
{
slouken@8582
   395
    const char *name;
slouken@8582
   396
    const char *desc;
slouken@8582
   397
    int (*available) (void);
slouken@8582
   398
    SDL_VideoDevice *(*create) (int devindex);
slouken@8582
   399
} VideoBootStrap;
slouken@8582
   400
icculus@10914
   401
/* Not all of these are available in a given build. Use #ifdefs, etc. */
slouken@8582
   402
extern VideoBootStrap COCOA_bootstrap;
slouken@8582
   403
extern VideoBootStrap X11_bootstrap;
icculus@8153
   404
extern VideoBootStrap MIR_bootstrap;
slouken@8582
   405
extern VideoBootStrap DirectFB_bootstrap;
slouken@8582
   406
extern VideoBootStrap WINDOWS_bootstrap;
slouken@8582
   407
extern VideoBootStrap WINRT_bootstrap;
slouken@8582
   408
extern VideoBootStrap HAIKU_bootstrap;
slouken@8582
   409
extern VideoBootStrap PND_bootstrap;
slouken@8582
   410
extern VideoBootStrap UIKIT_bootstrap;
slouken@8582
   411
extern VideoBootStrap Android_bootstrap;
slouken@8582
   412
extern VideoBootStrap PSP_bootstrap;
slouken@8582
   413
extern VideoBootStrap RPI_bootstrap;
slouken@11175
   414
extern VideoBootStrap KMSDRM_bootstrap;
slouken@8582
   415
extern VideoBootStrap DUMMY_bootstrap;
gabomdq@8062
   416
extern VideoBootStrap Wayland_bootstrap;
gabomdq@8833
   417
extern VideoBootStrap NACL_bootstrap;
slouken@9164
   418
extern VideoBootStrap VIVANTE_bootstrap;
icculus@9278
   419
extern VideoBootStrap Emscripten_bootstrap;
icculus@11119
   420
extern VideoBootStrap QNX_bootstrap;
slouken@8582
   421
slouken@8582
   422
extern SDL_VideoDevice *SDL_GetVideoDevice(void);
slouken@8582
   423
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
slouken@8582
   424
extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
slouken@8582
   425
extern SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode * mode);
slouken@8582
   426
extern SDL_VideoDisplay *SDL_GetDisplayForWindow(SDL_Window *window);
slouken@8582
   427
extern void *SDL_GetDisplayDriverData( int displayIndex );
slouken@8582
   428
slouken@10806
   429
extern void SDL_GL_DeduceMaxSupportedESProfile(int* major, int* minor);
slouken@10806
   430
slouken@8582
   431
extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
slime73@11305
   432
extern SDL_bool SDL_HasWindows(void);
slouken@8582
   433
slouken@8582
   434
extern void SDL_OnWindowShown(SDL_Window * window);
slouken@8582
   435
extern void SDL_OnWindowHidden(SDL_Window * window);
slouken@8582
   436
extern void SDL_OnWindowResized(SDL_Window * window);
slouken@8582
   437
extern void SDL_OnWindowMinimized(SDL_Window * window);
slouken@8582
   438
extern void SDL_OnWindowRestored(SDL_Window * window);
slouken@8582
   439
extern void SDL_OnWindowEnter(SDL_Window * window);
slouken@8582
   440
extern void SDL_OnWindowLeave(SDL_Window * window);
slouken@8582
   441
extern void SDL_OnWindowFocusGained(SDL_Window * window);
slouken@8582
   442
extern void SDL_OnWindowFocusLost(SDL_Window * window);
slouken@8582
   443
extern void SDL_UpdateWindowGrab(SDL_Window * window);
slouken@8582
   444
extern SDL_Window * SDL_GetFocusWindow(void);
slouken@8582
   445
slouken@8582
   446
extern SDL_bool SDL_ShouldAllowTopmost(void);
slouken@8582
   447
alfred@9813
   448
extern float SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vinches);
alfred@9813
   449
slime73@11147
   450
extern void SDL_OnApplicationWillTerminate(void);
slime73@11147
   451
extern void SDL_OnApplicationDidReceiveMemoryWarning(void);
slime73@11147
   452
extern void SDL_OnApplicationWillResignActive(void);
slime73@11147
   453
extern void SDL_OnApplicationDidEnterBackground(void);
slime73@11147
   454
extern void SDL_OnApplicationWillEnterForeground(void);
slime73@11147
   455
extern void SDL_OnApplicationDidBecomeActive(void);
slouken@10995
   456
slouken@10638
   457
#endif /* SDL_sysvideo_h_ */
slouken@8582
   458
slouken@8582
   459
/* vi: set ts=4 sw=4 expandtab: */