Subversion Repositories Games.Prince of Persia

Rev

Rev 1 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 8
Line 1... Line 1...
1
/*
1
/*
2
  Simple DirectMedia Layer
2
  Simple DirectMedia Layer
3
  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
3
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
4
 
4
 
5
  This software is provided 'as-is', without any express or implied
5
  This software is provided 'as-is', without any express or implied
6
  warranty.  In no event will the authors be held liable for any damages
6
  warranty.  In no event will the authors be held liable for any damages
7
  arising from the use of this software.
7
  arising from the use of this software.
8
 
8
 
Line 108... Line 108...
108
    SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */
108
    SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */
109
    SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
109
    SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
110
    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
110
    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
111
    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
111
    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
112
    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
112
    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
113
    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported */
113
    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported.
-
 
114
                                                     On macOS NSHighResolutionCapable must be set true in the
-
 
115
                                                     application's Info.plist for this to have any effect. */
114
    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */
116
    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */
115
    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */
117
    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */
116
    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */
118
    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */
117
    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */
119
    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */
118
    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */
120
    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */
Line 164... Line 166...
164
    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
166
    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
165
    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */
167
    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */
166
    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
168
    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
167
    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
169
    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
168
} SDL_WindowEventID;
170
} SDL_WindowEventID;
-
 
171
 
-
 
172
/**
-
 
173
 *  \brief Event subtype for display events
-
 
174
 */
-
 
175
typedef enum
-
 
176
{
-
 
177
    SDL_DISPLAYEVENT_NONE,          /**< Never used */
-
 
178
    SDL_DISPLAYEVENT_ORIENTATION    /**< Display orientation has changed to data1 */
-
 
179
} SDL_DisplayEventID;
-
 
180
 
-
 
181
typedef enum
-
 
182
{
-
 
183
    SDL_ORIENTATION_UNKNOWN,            /**< The display orientation can't be determined */
-
 
184
    SDL_ORIENTATION_LANDSCAPE,          /**< The display is in landscape mode, with the right side up, relative to portrait mode */
-
 
185
    SDL_ORIENTATION_LANDSCAPE_FLIPPED,  /**< The display is in landscape mode, with the left side up, relative to portrait mode */
-
 
186
    SDL_ORIENTATION_PORTRAIT,           /**< The display is in portrait mode */
-
 
187
    SDL_ORIENTATION_PORTRAIT_FLIPPED    /**< The display is in portrait mode, upside down */
-
 
188
} SDL_DisplayOrientation;
169
 
189
 
170
/**
190
/**
171
 *  \brief An opaque handle to an OpenGL context.
191
 *  \brief An opaque handle to an OpenGL context.
172
 */
192
 */
173
typedef void *SDL_GLContext;
193
typedef void *SDL_GLContext;
Line 311... Line 331...
311
 *  \return 0 on success, or -1 if the index is out of range.
331
 *  \return 0 on success, or -1 if the index is out of range.
312
 *
332
 *
313
 *  \sa SDL_GetNumVideoDisplays()
333
 *  \sa SDL_GetNumVideoDisplays()
314
 */
334
 */
315
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
335
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
316
 
-
 
317
/**
-
 
318
 *  \brief Get the dots/pixels-per-inch for a display
-
 
319
 *
-
 
320
 *  \note Diagonal, horizontal and vertical DPI can all be optionally
-
 
321
 *        returned if the parameter is non-NULL.
-
 
322
 *
-
 
323
 *  \return 0 on success, or -1 if no DPI information is available or the index is out of range.
-
 
324
 *
-
 
325
 *  \sa SDL_GetNumVideoDisplays()
-
 
326
 */
-
 
327
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
-
 
328
 
336
 
329
/**
337
/**
330
 *  \brief Get the usable desktop area represented by a display, with the
338
 *  \brief Get the usable desktop area represented by a display, with the
331
 *         primary display located at 0,0
339
 *         primary display located at 0,0
332
 *
340
 *
Line 342... Line 350...
342
 *
350
 *
343
 *  \sa SDL_GetDisplayBounds()
351
 *  \sa SDL_GetDisplayBounds()
344
 *  \sa SDL_GetNumVideoDisplays()
352
 *  \sa SDL_GetNumVideoDisplays()
345
 */
353
 */
346
extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
354
extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
-
 
355
 
-
 
356
/**
-
 
357
 *  \brief Get the dots/pixels-per-inch for a display
-
 
358
 *
-
 
359
 *  \note Diagonal, horizontal and vertical DPI can all be optionally
-
 
360
 *        returned if the parameter is non-NULL.
-
 
361
 *
-
 
362
 *  \return 0 on success, or -1 if no DPI information is available or the index is out of range.
-
 
363
 *
-
 
364
 *  \sa SDL_GetNumVideoDisplays()
-
 
365
 */
-
 
366
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
-
 
367
 
-
 
368
/**
-
 
369
 *  \brief Get the orientation of a display
-
 
370
 *
-
 
371
 *  \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.
-
 
372
 *
-
 
373
 *  \sa SDL_GetNumVideoDisplays()
-
 
374
 */
-
 
375
extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
347
 
376
 
348
/**
377
/**
349
 *  \brief Returns the number of available display modes.
378
 *  \brief Returns the number of available display modes.
350
 *
379
 *
351
 *  \sa SDL_GetDisplayMode()
380
 *  \sa SDL_GetDisplayMode()
Line 468... Line 497...
468
 *  drawable size in pixels.
497
 *  drawable size in pixels.
469
 *
498
 *
470
 *  If the window is created with any of the SDL_WINDOW_OPENGL or
499
 *  If the window is created with any of the SDL_WINDOW_OPENGL or
471
 *  SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
500
 *  SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
472
 *  (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
501
 *  (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
473
 *  corrensponding UnloadLibrary function is called by SDL_DestroyWindow().
502
 *  corresponding UnloadLibrary function is called by SDL_DestroyWindow().
474
 *
503
 *
475
 *  If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
504
 *  If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
476
 *  SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
505
 *  SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
477
 *
506
 *
478
 *  \note On non-Apple devices, SDL requires you to either not link to the
507
 *  \note On non-Apple devices, SDL requires you to either not link to the