include/SDL_video.h
author Philipp Wiesemann <philipp.wiesemann@arcor.de>
Fri, 20 May 2016 22:18:15 +0200
changeset 10175 fcf0d3ca1fa2
parent 10168 9e3144cb1032
child 10271 e8281b14970c
permissions -rw-r--r--
Updated documentation of SDL_IsScreenSaverEnabled(). The screensaver is deactivated by default since SDL 2.0.2.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     1
/*
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
     2
  Simple DirectMedia Layer
9998
f67cf37e9cd4 Updated copyright to 2016
Sam Lantinga <slouken@libsdl.org>
parents: 9996
diff changeset
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     4
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
     5
  This software is provided 'as-is', without any express or implied
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
     7
  arising from the use of this software.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     8
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    11
  freely, subject to the following restrictions:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    12
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    14
     claim that you wrote the original software. If you use this software
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    16
     appreciated but is not required.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    18
     misrepresented as being the original software.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    20
*/
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    21
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    22
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    23
 *  \file SDL_video.h
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    24
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    25
 *  Header file for SDL video functions.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    26
 */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    27
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    28
#ifndef _SDL_video_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    29
#define _SDL_video_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    30
1356
67114343400d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
    31
#include "SDL_stdinc.h"
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    32
#include "SDL_pixels.h"
2275
12ea0fdc0df2 Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
    33
#include "SDL_rect.h"
12ea0fdc0df2 Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
    34
#include "SDL_surface.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    35
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    36
#include "begin_code.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    37
/* Set up for C function definitions, even when using C++ */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    38
#ifdef __cplusplus
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    39
extern "C" {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    40
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    41
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    42
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    43
 *  \brief  The structure that defines a display mode
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    44
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    45
 *  \sa SDL_GetNumDisplayModes()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    46
 *  \sa SDL_GetDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    47
 *  \sa SDL_GetDesktopDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    48
 *  \sa SDL_GetCurrentDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    49
 *  \sa SDL_GetClosestDisplayMode()
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
    50
 *  \sa SDL_SetWindowDisplayMode()
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
    51
 *  \sa SDL_GetWindowDisplayMode()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    52
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    53
typedef struct
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    54
{
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    55
    Uint32 format;              /**< pixel format */
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
    56
    int w;                      /**< width, in screen coordinates */
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
    57
    int h;                      /**< height, in screen coordinates */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    58
    int refresh_rate;           /**< refresh rate (or zero for unspecified) */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    59
    void *driverdata;           /**< driver-specific data, initialize to 0 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    60
} SDL_DisplayMode;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    61
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    62
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    63
 *  \brief The type used to identify a window
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    64
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    65
 *  \sa SDL_CreateWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    66
 *  \sa SDL_CreateWindowFrom()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    67
 *  \sa SDL_DestroyWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    68
 *  \sa SDL_GetWindowData()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    69
 *  \sa SDL_GetWindowFlags()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    70
 *  \sa SDL_GetWindowGrab()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    71
 *  \sa SDL_GetWindowPosition()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    72
 *  \sa SDL_GetWindowSize()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    73
 *  \sa SDL_GetWindowTitle()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    74
 *  \sa SDL_HideWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    75
 *  \sa SDL_MaximizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    76
 *  \sa SDL_MinimizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    77
 *  \sa SDL_RaiseWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    78
 *  \sa SDL_RestoreWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    79
 *  \sa SDL_SetWindowData()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    80
 *  \sa SDL_SetWindowFullscreen()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    81
 *  \sa SDL_SetWindowGrab()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    82
 *  \sa SDL_SetWindowIcon()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    83
 *  \sa SDL_SetWindowPosition()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    84
 *  \sa SDL_SetWindowSize()
6429
ff5e34883bf8 Fixed a typo in the docs.
Ryan C. Gordon <icculus@icculus.org>
parents: 6422
diff changeset
    85
 *  \sa SDL_SetWindowBordered()
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    86
 *  \sa SDL_SetWindowTitle()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    87
 *  \sa SDL_ShowWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    88
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
    89
typedef struct SDL_Window SDL_Window;
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    90
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    91
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    92
 *  \brief The flags on a window
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    93
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    94
 *  \sa SDL_GetWindowFlags()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    95
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    96
typedef enum
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    97
{
10010
cc07869515b2 Added a few FIXMEs.
Ryan C. Gordon <icculus@icculus.org>
parents: 9998
diff changeset
    98
    /* !!! FIXME: change this to name = (1<<x). */
5380
2de85077eb0b Simplified and unified the window creation process a little.
Sam Lantinga <slouken@libsdl.org>
parents: 5297
diff changeset
    99
    SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   100
    SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   101
    SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
5380
2de85077eb0b Simplified and unified the window creation process a little.
Sam Lantinga <slouken@libsdl.org>
parents: 5297
diff changeset
   102
    SDL_WINDOW_HIDDEN = 0x00000008,             /**< window is not visible */
2de85077eb0b Simplified and unified the window creation process a little.
Sam Lantinga <slouken@libsdl.org>
parents: 5297
diff changeset
   103
    SDL_WINDOW_BORDERLESS = 0x00000010,         /**< no window decoration */
2de85077eb0b Simplified and unified the window creation process a little.
Sam Lantinga <slouken@libsdl.org>
parents: 5297
diff changeset
   104
    SDL_WINDOW_RESIZABLE = 0x00000020,          /**< window can be resized */
2de85077eb0b Simplified and unified the window creation process a little.
Sam Lantinga <slouken@libsdl.org>
parents: 5297
diff changeset
   105
    SDL_WINDOW_MINIMIZED = 0x00000040,          /**< window is minimized */
2de85077eb0b Simplified and unified the window creation process a little.
Sam Lantinga <slouken@libsdl.org>
parents: 5297
diff changeset
   106
    SDL_WINDOW_MAXIMIZED = 0x00000080,          /**< window is maximized */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   107
    SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   108
    SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
3057
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   109
    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   110
    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
7746
6a05d7352575 add in High DPI support (aka Retina)
Edward Rudd <urkle@outoforder.cc>
parents: 7678
diff changeset
   111
    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
8927
be64f5daf64b Implemented SDL_CaptureMouse().
Ryan C. Gordon <icculus@icculus.org>
parents: 8777
diff changeset
   112
    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported */
10021
3beca914a2ad Added special window type flags.
Ryan C. Gordon <icculus@icculus.org>
parents: 10019
diff changeset
   113
    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */
3beca914a2ad Added special window type flags.
Ryan C. Gordon <icculus@icculus.org>
parents: 10019
diff changeset
   114
    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */
3beca914a2ad Added special window type flags.
Ryan C. Gordon <icculus@icculus.org>
parents: 10019
diff changeset
   115
    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */
3beca914a2ad Added special window type flags.
Ryan C. Gordon <icculus@icculus.org>
parents: 10019
diff changeset
   116
    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */
3beca914a2ad Added special window type flags.
Ryan C. Gordon <icculus@icculus.org>
parents: 10019
diff changeset
   117
    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */
3beca914a2ad Added special window type flags.
Ryan C. Gordon <icculus@icculus.org>
parents: 10019
diff changeset
   118
    SDL_WINDOW_POPUP_MENU    = 0x00080000       /**< window should be treated as a popup menu */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   119
} SDL_WindowFlags;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   120
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   121
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   122
 *  \brief Used to indicate that you don't care what the window position is.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   123
 */
5246
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   124
#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   125
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   126
#define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   127
#define SDL_WINDOWPOS_ISUNDEFINED(X)    \
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   128
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   129
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   130
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   131
 *  \brief Used to indicate that the window position should be centered.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   132
 */
5246
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   133
#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   134
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   135
#define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   136
#define SDL_WINDOWPOS_ISCENTERED(X)    \
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   137
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   138
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   139
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   140
 *  \brief Event subtype for window events
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   141
 */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   142
typedef enum
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   143
{
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   144
    SDL_WINDOWEVENT_NONE,           /**< Never used */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   145
    SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   146
    SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   147
    SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   148
                                         redrawn */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   149
    SDL_WINDOWEVENT_MOVED,          /**< Window has been moved to data1, data2
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   150
                                     */
5276
8e421890cdb8 Fixed bug #1117
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   151
    SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   152
    SDL_WINDOWEVENT_SIZE_CHANGED,   /**< The window size has changed, either as
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   153
                                         a result of an API call or through the
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   154
                                         system or user changing the window size. */
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   155
    SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   156
    SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   157
    SDL_WINDOWEVENT_RESTORED,       /**< Window has been restored to normal size
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   158
                                         and position */
3691
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   159
    SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   160
    SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   161
    SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   162
    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
10028
da668b612d10 Added SDL_WINDOWEVENT_HIT_TEST.
Ryan C. Gordon <icculus@icculus.org>
parents: 10027
diff changeset
   163
    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */
10029
4c992fd19316 Added SDL_WINDOWEVENT_TAKE_FOCUS.
Ryan C. Gordon <icculus@icculus.org>
parents: 10028
diff changeset
   164
    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
4c992fd19316 Added SDL_WINDOWEVENT_TAKE_FOCUS.
Ryan C. Gordon <icculus@icculus.org>
parents: 10028
diff changeset
   165
    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   166
} SDL_WindowEventID;
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   167
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   168
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   169
 *  \brief An opaque handle to an OpenGL context.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   170
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   171
typedef void *SDL_GLContext;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   172
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   173
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   174
 *  \brief OpenGL configuration attributes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   175
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   176
typedef enum
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   177
{
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   178
    SDL_GL_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   179
    SDL_GL_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   180
    SDL_GL_BLUE_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   181
    SDL_GL_ALPHA_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   182
    SDL_GL_BUFFER_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   183
    SDL_GL_DOUBLEBUFFER,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   184
    SDL_GL_DEPTH_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   185
    SDL_GL_STENCIL_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   186
    SDL_GL_ACCUM_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   187
    SDL_GL_ACCUM_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   188
    SDL_GL_ACCUM_BLUE_SIZE,
450
8a43e0cbf02f Added SDL_GL_STEREO for stereoscopic OpenGL contexts
Sam Lantinga <slouken@libsdl.org>
parents: 432
diff changeset
   189
    SDL_GL_ACCUM_ALPHA_SIZE,
655
9c42ee1b7d77 Date: Thu, 24 Apr 2003 15:13:47 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 639
diff changeset
   190
    SDL_GL_STEREO,
656
864e2d2a9a55 Merged in Ryan's multisample code for MacOS, and changed the constants to match.
Sam Lantinga <slouken@libsdl.org>
parents: 655
diff changeset
   191
    SDL_GL_MULTISAMPLEBUFFERS,
1736
3b2a92126f4d Implemented bug #2, 117:
Sam Lantinga <slouken@libsdl.org>
parents: 1545
diff changeset
   192
    SDL_GL_MULTISAMPLESAMPLES,
2747
47519ce71def Added SDL_GL_RETAINED_BACKING attribute to SDL_GLattr
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2275
diff changeset
   193
    SDL_GL_ACCELERATED_VISUAL,
3100
7dc982143c06 Date: Sun, 22 Mar 2009 12:52:29 +0000
Sam Lantinga <slouken@libsdl.org>
parents: 3091
diff changeset
   194
    SDL_GL_RETAINED_BACKING,
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3100
diff changeset
   195
    SDL_GL_CONTEXT_MAJOR_VERSION,
6296
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   196
    SDL_GL_CONTEXT_MINOR_VERSION,
6370
93187f7f7d5d Improved simultaneous support for OpenGL and OpenGL ES
Sam Lantinga <slouken@libsdl.org>
parents: 6296
diff changeset
   197
    SDL_GL_CONTEXT_EGL,
6296
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   198
    SDL_GL_CONTEXT_FLAGS,
6393
a773384edf20 Fixed bug 1565 - some small GL context creation enhancements
Sam Lantinga <slouken@libsdl.org>
parents: 6382
diff changeset
   199
    SDL_GL_CONTEXT_PROFILE_MASK,
7853
4861edda71d1 Added SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (thanks, David!).
Ryan C. Gordon <icculus@icculus.org>
parents: 7769
diff changeset
   200
    SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
9412
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   201
    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   202
    SDL_GL_CONTEXT_RELEASE_BEHAVIOR
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   203
} SDL_GLattr;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   204
6296
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   205
typedef enum
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   206
{
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   207
    SDL_GL_CONTEXT_PROFILE_CORE           = 0x0001,
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   208
    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 0x0002,
7659
ac4ce59c40e7 Fixes bug #2037, common EGL code for Android and X11
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7459
diff changeset
   209
    SDL_GL_CONTEXT_PROFILE_ES             = 0x0004 /* GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
6296
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   210
} SDL_GLprofile;
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   211
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   212
typedef enum
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   213
{
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   214
    SDL_GL_CONTEXT_DEBUG_FLAG              = 0x0001,
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   215
    SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
6393
a773384edf20 Fixed bug 1565 - some small GL context creation enhancements
Sam Lantinga <slouken@libsdl.org>
parents: 6382
diff changeset
   216
    SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG      = 0x0004,
a773384edf20 Fixed bug 1565 - some small GL context creation enhancements
Sam Lantinga <slouken@libsdl.org>
parents: 6382
diff changeset
   217
    SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008
6296
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   218
} SDL_GLcontextFlag;
b42657486c0d Add OpenGL 3.X context creation support
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   219
9412
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   220
typedef enum
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   221
{
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   222
    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE   = 0x0000,
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   223
    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH  = 0x0001
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   224
} SDL_GLcontextReleaseFlag;
8b1436ce1028 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
Marc Di Luzio <mdiluzio@feralinteractive.com>
parents: 8946
diff changeset
   225
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   226
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   227
/* Function prototypes */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   228
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   229
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   230
 *  \brief Get the number of video drivers compiled into SDL
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   231
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   232
 *  \sa SDL_GetVideoDriver()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   233
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   234
extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   235
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   236
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   237
 *  \brief Get the name of a built in video driver.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   238
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   239
 *  \note The video drivers are presented in the order in which they are
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   240
 *        normally checked during initialization.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   241
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   242
 *  \sa SDL_GetNumVideoDrivers()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   243
 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   244
extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   245
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   246
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   247
 *  \brief Initialize the video subsystem, optionally specifying a video driver.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   248
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   249
 *  \param driver_name Initialize a specific driver by name, or NULL for the
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   250
 *                     default video driver.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   251
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   252
 *  \return 0 on success, -1 on error
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   253
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   254
 *  This function initializes the video subsystem; setting up a connection
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   255
 *  to the window manager, etc, and determines the available display modes
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   256
 *  and pixel formats, but does not initialize a window or graphics mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   257
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   258
 *  \sa SDL_VideoQuit()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   259
 */
5123
dc0dfdd58f27 Removed completely non-portable event thread hack.
Sam Lantinga <slouken@libsdl.org>
parents: 4971
diff changeset
   260
extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   261
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   262
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   263
 *  \brief Shuts down the video subsystem.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   264
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   265
 *  This function closes all windows, and restores the original video mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   266
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   267
 *  \sa SDL_VideoInit()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   268
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   269
extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   270
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   271
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   272
 *  \brief Returns the name of the currently initialized video driver.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   273
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   274
 *  \return The name of the current video driver or NULL if no driver
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   275
 *          has been initialized
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   276
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   277
 *  \sa SDL_GetNumVideoDrivers()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   278
 *  \sa SDL_GetVideoDriver()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   279
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   280
extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   281
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   282
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   283
 *  \brief Returns the number of available video displays.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   284
 *
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   285
 *  \sa SDL_GetDisplayBounds()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   286
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   287
extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   288
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   289
/**
6787
95a4c5a5464c Added SDL_GetDisplayName(), with implementation for Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 6786
diff changeset
   290
 *  \brief Get the name of a display in UTF-8 encoding
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   291
 *
6787
95a4c5a5464c Added SDL_GetDisplayName(), with implementation for Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 6786
diff changeset
   292
 *  \return The name of a display, or NULL for an invalid display index.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   293
 *
6787
95a4c5a5464c Added SDL_GetDisplayName(), with implementation for Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 6786
diff changeset
   294
 *  \sa SDL_GetNumVideoDisplays()
95a4c5a5464c Added SDL_GetDisplayName(), with implementation for Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 6786
diff changeset
   295
 */
95a4c5a5464c Added SDL_GetDisplayName(), with implementation for Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 6786
diff changeset
   296
extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
95a4c5a5464c Added SDL_GetDisplayName(), with implementation for Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 6786
diff changeset
   297
95a4c5a5464c Added SDL_GetDisplayName(), with implementation for Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 6786
diff changeset
   298
/**
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   299
 *  \brief Get the desktop area represented by a display, with the primary
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   300
 *         display located at 0,0
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   301
 *
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   302
 *  \return 0 on success, or -1 if the index is out of range.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   303
 *
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   304
 *  \sa SDL_GetNumVideoDisplays()
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   305
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   306
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   307
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   308
/**
9813
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   309
 *  \brief Get the dots/pixels-per-inch for a display
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   310
 *
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   311
 *  \note Diagonal, horizontal and vertical DPI can all be optionally
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   312
 *        returned if the parameter is non-NULL.
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   313
 *
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   314
 *  \return 0 on success, or -1 if no DPI information is available or the index is out of range.
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   315
 *
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   316
 *  \sa SDL_GetNumVideoDisplays()
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   317
 */
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   318
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   319
0652406e46c6 Add SDL_GetDisplayDPI routine and implement for Windows.
Alfred Reynolds <alfred@valvesoftware.com>
parents: 9619
diff changeset
   320
/**
10019
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   321
 *  \brief Get the usable desktop area represented by a display, with the
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   322
 *         primary display located at 0,0
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   323
 *
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   324
 *  This is the same area as SDL_GetDisplayBounds() reports, but with portions
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   325
 *  reserved by the system removed. For example, on Mac OS X, this subtracts
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   326
 *  the area occupied by the menu bar and dock.
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   327
 *
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   328
 *  Setting a window to be fullscreen generally bypasses these unusable areas,
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   329
 *  so these are good guidelines for the maximum space available to a
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   330
 *  non-fullscreen window.
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   331
 *
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   332
 *  \return 0 on success, or -1 if the index is out of range.
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   333
 *
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   334
 *  \sa SDL_GetDisplayBounds()
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   335
 *  \sa SDL_GetNumVideoDisplays()
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   336
 */
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   337
extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   338
36f7e8084508 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon <icculus@icculus.org>
parents: 10010
diff changeset
   339
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   340
 *  \brief Returns the number of available display modes.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   341
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   342
 *  \sa SDL_GetDisplayMode()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   343
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   344
extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   345
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   346
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   347
 *  \brief Fill in information about a specific display mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   348
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   349
 *  \note The display modes are sorted in this priority:
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   350
 *        \li bits per pixel -> more colors to fewer colors
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   351
 *        \li width -> largest to smallest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   352
 *        \li height -> largest to smallest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   353
 *        \li refresh rate -> highest to lowest
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   354
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   355
 *  \sa SDL_GetNumDisplayModes()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   356
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   357
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
1967
01e29c3e9a29 In general, fill in pointers to structures, rather than return them.
Sam Lantinga <slouken@libsdl.org>
parents: 1966
diff changeset
   358
                                               SDL_DisplayMode * mode);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   359
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   360
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   361
 *  \brief Fill in information about the desktop display mode.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   362
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   363
extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   364
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   365
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   366
 *  \brief Fill in information about the current display mode.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   367
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   368
extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   369
3400
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 3227
diff changeset
   370
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   371
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   372
 *  \brief Get the closest match to the requested display mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   373
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   374
 *  \param displayIndex The index of display from which mode should be queried.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   375
 *  \param mode The desired display mode
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   376
 *  \param closest A pointer to a display mode to be filled in with the closest
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   377
 *                 match of the available display modes.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   378
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   379
 *  \return The passed in value \c closest, or NULL if no matching video mode
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   380
 *          was available.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   381
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   382
 *  The available display modes are scanned, and \c closest is filled in with the
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   383
 *  closest mode matching the requested mode and returned.  The mode format and
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   384
 *  refresh_rate default to the desktop mode if they are 0.  The modes are
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   385
 *  scanned with size being first priority, format being second priority, and
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   386
 *  finally checking the refresh_rate.  If all the available modes are too
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   387
 *  small, then NULL is returned.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   388
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   389
 *  \sa SDL_GetNumDisplayModes()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   390
 *  \sa SDL_GetDisplayMode()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   391
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   392
extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   393
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   394
/**
5246
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   395
 *  \brief Get the display index associated with a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   396
 *
5246
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   397
 *  \return the display index of the display containing the center of the
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   398
 *          window, or -1 on error.
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   399
 */
6786
7174fb08017a Renamed SDL_GetWindowDisplay() to SDL_GetWindowDisplayIndex()
Sam Lantinga <slouken@libsdl.org>
parents: 6755
diff changeset
   400
extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
5246
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   401
58265e606e4e Window coordinates are in the global space and windows are not tied to a particular display.
Sam Lantinga <slouken@libsdl.org>
parents: 5244
diff changeset
   402
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   403
 *  \brief Set the display mode used when a fullscreen window is visible.
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   404
 *
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   405
 *  By default the window's dimensions and the desktop format and refresh rate
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   406
 *  are used.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   407
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   408
 *  \param window The window for which the display mode should be set.
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
   409
 *  \param mode The mode to use, or NULL for the default mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   410
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   411
 *  \return 0 on success, or -1 if setting the display mode failed.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   412
 *
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   413
 *  \sa SDL_GetWindowDisplayMode()
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   414
 *  \sa SDL_SetWindowFullscreen()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   415
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   416
extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
   417
                                                     const SDL_DisplayMode
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   418
                                                         * mode);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   419
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   420
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   421
 *  \brief Fill in information about the display mode used when a fullscreen
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   422
 *         window is visible.
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   423
 *
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   424
 *  \sa SDL_SetWindowDisplayMode()
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   425
 *  \sa SDL_SetWindowFullscreen()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   426
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   427
extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
   428
                                                     SDL_DisplayMode * mode);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   429
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   430
/**
5154
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   431
 *  \brief Get the pixel format associated with the window.
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   432
 */
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   433
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   434
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   435
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   436
 *  \brief Create a window with the specified position, dimensions, and flags.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   437
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   438
 *  \param title The title of the window, in UTF-8 encoding.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   439
 *  \param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   440
 *               ::SDL_WINDOWPOS_UNDEFINED.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   441
 *  \param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   442
 *               ::SDL_WINDOWPOS_UNDEFINED.
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   443
 *  \param w     The width of the window, in screen coordinates.
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   444
 *  \param h     The height of the window, in screen coordinates.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   445
 *  \param flags The flags for the window, a mask of any of the following:
7746
6a05d7352575 add in High DPI support (aka Retina)
Edward Rudd <urkle@outoforder.cc>
parents: 7678
diff changeset
   446
 *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,
6a05d7352575 add in High DPI support (aka Retina)
Edward Rudd <urkle@outoforder.cc>
parents: 7678
diff changeset
   447
 *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,
6a05d7352575 add in High DPI support (aka Retina)
Edward Rudd <urkle@outoforder.cc>
parents: 7678
diff changeset
   448
 *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,
6a05d7352575 add in High DPI support (aka Retina)
Edward Rudd <urkle@outoforder.cc>
parents: 7678
diff changeset
   449
 *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
6a05d7352575 add in High DPI support (aka Retina)
Edward Rudd <urkle@outoforder.cc>
parents: 7678
diff changeset
   450
 *               ::SDL_WINDOW_ALLOW_HIGHDPI.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   451
 *
10168
9e3144cb1032 Updated documentation of SDL_CreateWindow() and SDL_CreateWindowFrom().
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 10035
diff changeset
   452
 *  \return The created window, or NULL if window creation failed.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   453
 *
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   454
 *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   455
 *  in pixels may differ from its size in screen coordinates on platforms with
9996
11cba4a517a9 Added brackets to function names in header comments so doxygen links them.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9995
diff changeset
   456
 *  high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query
11cba4a517a9 Added brackets to function names in header comments so doxygen links them.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9995
diff changeset
   457
 *  the client area's size in screen coordinates, and SDL_GL_GetDrawableSize()
11cba4a517a9 Added brackets to function names in header comments so doxygen links them.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9995
diff changeset
   458
 *  or SDL_GetRendererOutputSize() to query the drawable size in pixels.
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   459
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   460
 *  \sa SDL_DestroyWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   461
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   462
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   463
                                                      int x, int y, int w,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   464
                                                      int h, Uint32 flags);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   465
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   466
/**
3493
40b1f7cb2062 SDL_CreateWindowFrom() is actually going to be supported. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3492
diff changeset
   467
 *  \brief Create an SDL window from an existing native window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   468
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   469
 *  \param data A pointer to driver-dependent window creation data
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   470
 *
10168
9e3144cb1032 Updated documentation of SDL_CreateWindow() and SDL_CreateWindowFrom().
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 10035
diff changeset
   471
 *  \return The created window, or NULL if window creation failed.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   472
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   473
 *  \sa SDL_DestroyWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   474
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   475
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   476
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   477
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   478
 *  \brief Get the numeric ID of a window, for logging purposes.
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   479
 */
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   480
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   481
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   482
/**
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   483
 *  \brief Get a window from a stored ID, or NULL if it doesn't exist.
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   484
 */
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   485
extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   486
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   487
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   488
 *  \brief Get the window flags.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   489
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   490
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   491
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   492
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   493
 *  \brief Set the title of a window, in UTF-8 format.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   494
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   495
 *  \sa SDL_GetWindowTitle()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   496
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   497
extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   498
                                                const char *title);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   499
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   500
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   501
 *  \brief Get the title of a window, in UTF-8 format.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   502
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   503
 *  \sa SDL_SetWindowTitle()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   504
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   505
extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   506
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   507
/**
4887
0a77d2fc95ad Fixed grammar, thanks to Sheena's suggestion.
Sam Lantinga <slouken@libsdl.org>
parents: 4883
diff changeset
   508
 *  \brief Set the icon for a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   509
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   510
 *  \param window The window for which the icon should be set.
4887
0a77d2fc95ad Fixed grammar, thanks to Sheena's suggestion.
Sam Lantinga <slouken@libsdl.org>
parents: 4883
diff changeset
   511
 *  \param icon The icon for the window.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   512
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   513
extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
2990
Sam Lantinga <slouken@libsdl.org>
parents: 2967
diff changeset
   514
                                               SDL_Surface * icon);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   515
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   516
/**
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   517
 *  \brief Associate an arbitrary named pointer with a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   518
 *
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   519
 *  \param window   The window to associate with the pointer.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   520
 *  \param name     The name of the pointer.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   521
 *  \param userdata The associated pointer.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   522
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   523
 *  \return The previous value associated with 'name'
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   524
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   525
 *  \note The name is case-sensitive.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   526
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   527
 *  \sa SDL_GetWindowData()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   528
 */
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   529
extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   530
                                                const char *name,
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   531
                                                void *userdata);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   532
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   533
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   534
 *  \brief Retrieve the data pointer associated with a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   535
 *
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   536
 *  \param window   The window to query.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   537
 *  \param name     The name of the pointer.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   538
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   539
 *  \return The value associated with 'name'
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   540
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   541
 *  \sa SDL_SetWindowData()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   542
 */
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   543
extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   544
                                                const char *name);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   545
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   546
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   547
 *  \brief Set the position of a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   548
 *
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   549
 *  \param window   The window to reposition.
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   550
 *  \param x        The x coordinate of the window in screen coordinates, or
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   551
 *                  ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   552
 *  \param y        The y coordinate of the window in screen coordinates, or
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   553
 *                  ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   554
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   555
 *  \note The window coordinate origin is the upper left of the display.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   556
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   557
 *  \sa SDL_GetWindowPosition()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   558
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   559
extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   560
                                                   int x, int y);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   561
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   562
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   563
 *  \brief Get the position of a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   564
 *
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7014
diff changeset
   565
 *  \param window   The window to query.
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   566
 *  \param x        Pointer to variable for storing the x position, in screen
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   567
 *                  coordinates. May be NULL.
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   568
 *  \param y        Pointer to variable for storing the y position, in screen
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   569
 *                  coordinates. May be NULL.
6984
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   570
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   571
 *  \sa SDL_SetWindowPosition()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   572
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   573
extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   574
                                                   int *x, int *y);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   575
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   576
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   577
 *  \brief Set the size of a window's client area.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   578
 *
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7014
diff changeset
   579
 *  \param window   The window to resize.
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   580
 *  \param w        The width of the window, in screen coordinates. Must be >0.
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   581
 *  \param h        The height of the window, in screen coordinates. Must be >0.
6984
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   582
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   583
 *  \note You can't change the size of a fullscreen window, it automatically
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   584
 *        matches the size of the display mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   585
 *
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   586
 *  The window size in screen coordinates may differ from the size in pixels, if
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   587
 *  the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with
9996
11cba4a517a9 Added brackets to function names in header comments so doxygen links them.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9995
diff changeset
   588
 *  high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or
11cba4a517a9 Added brackets to function names in header comments so doxygen links them.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9995
diff changeset
   589
 *  SDL_GetRendererOutputSize() to get the real client area size in pixels.
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   590
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   591
 *  \sa SDL_GetWindowSize()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   592
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   593
extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   594
                                               int h);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   595
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   596
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   597
 *  \brief Get the size of a window's client area.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   598
 *
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7014
diff changeset
   599
 *  \param window   The window to query.
9995
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   600
 *  \param w        Pointer to variable for storing the width, in screen
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   601
 *                  coordinates. May be NULL.
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   602
 *  \param h        Pointer to variable for storing the height, in screen
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   603
 *                  coordinates. May be NULL.
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   604
 *
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   605
 *  The window size in screen coordinates may differ from the size in pixels, if
d79480c1e151 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alex Szpakowski <slime73@gmail.com>
parents: 9813
diff changeset
   606
 *  the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with
9996
11cba4a517a9 Added brackets to function names in header comments so doxygen links them.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9995
diff changeset
   607
 *  high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or
11cba4a517a9 Added brackets to function names in header comments so doxygen links them.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9995
diff changeset
   608
 *  SDL_GetRendererOutputSize() to get the real client area size in pixels.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   609
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   610
 *  \sa SDL_SetWindowSize()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   611
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   612
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   613
                                               int *h);
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   614
6681
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   615
/**
10024
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   616
 *  \brief Get the size of a window's borders (decorations) around the client area.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   617
 *
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   618
 *  \param window The window to query.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   619
 *  \param top Pointer to variable for storing the size of the top border. NULL is permitted.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   620
 *  \param left Pointer to variable for storing the size of the left border. NULL is permitted.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   621
 *  \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   622
 *  \param right Pointer to variable for storing the size of the right border. NULL is permitted.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   623
 *
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   624
 *  \return 0 on success, or -1 if getting this information is not supported.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   625
 *
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   626
 *  \note if this function fails (returns -1), the size values will be
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   627
 *        initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   628
 *        if the window in question was borderless.
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   629
 */
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   630
extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   631
                                                     int *top, int *left,
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   632
                                                     int *bottom, int *right);
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   633
9a1189c7b891 Added SDL_GetWindowBordersSize().
Ryan C. Gordon <icculus@icculus.org>
parents: 10021
diff changeset
   634
/**
6681
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   635
 *  \brief Set the minimum size of a window's client area.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   636
 *
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7014
diff changeset
   637
 *  \param window    The window to set a new minimum size.
6984
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   638
 *  \param min_w     The minimum width of the window, must be >0
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   639
 *  \param min_h     The minimum height of the window, must be >0
6681
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   640
 *
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   641
 *  \note You can't change the minimum size of a fullscreen window, it
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   642
 *        automatically matches the size of the display mode.
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   643
 *
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   644
 *  \sa SDL_GetWindowMinimumSize()
6788
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   645
 *  \sa SDL_SetWindowMaximumSize()
6681
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   646
 */
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   647
extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   648
                                                      int min_w, int min_h);
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   649
6681
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   650
/**
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   651
 *  \brief Get the minimum size of a window's client area.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   652
 *
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7014
diff changeset
   653
 *  \param window   The window to query.
6984
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   654
 *  \param w        Pointer to variable for storing the minimum width, may be NULL
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   655
 *  \param h        Pointer to variable for storing the minimum height, may be NULL
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   656
 *
6788
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   657
 *  \sa SDL_GetWindowMaximumSize()
6681
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   658
 *  \sa SDL_SetWindowMinimumSize()
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   659
 */
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   660
extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
5a0396a933b5 SetMinimumWindowSize for OS X
stopiccot
parents: 6429
diff changeset
   661
                                                      int *w, int *h);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   662
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   663
/**
6788
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   664
 *  \brief Set the maximum size of a window's client area.
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   665
 *
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7014
diff changeset
   666
 *  \param window    The window to set a new maximum size.
6984
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   667
 *  \param max_w     The maximum width of the window, must be >0
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   668
 *  \param max_h     The maximum height of the window, must be >0
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   669
 *
6788
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   670
 *  \note You can't change the maximum size of a fullscreen window, it
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   671
 *        automatically matches the size of the display mode.
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   672
 *
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   673
 *  \sa SDL_GetWindowMaximumSize()
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   674
 *  \sa SDL_SetWindowMinimumSize()
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   675
 */
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   676
extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   677
                                                      int max_w, int max_h);
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   678
6788
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   679
/**
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   680
 *  \brief Get the maximum size of a window's client area.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   681
 *
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7014
diff changeset
   682
 *  \param window   The window to query.
6984
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   683
 *  \param w        Pointer to variable for storing the maximum width, may be NULL
ae9c4b12f3e2 Add parameter checking to SetWindowSize functions; add tests to video suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6885
diff changeset
   684
 *  \param h        Pointer to variable for storing the maximum height, may be NULL
6788
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   685
 *
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   686
 *  \sa SDL_GetWindowMinimumSize()
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   687
 *  \sa SDL_SetWindowMaximumSize()
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   688
 */
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   689
extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   690
                                                      int *w, int *h);
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   691
036f53f2f5aa Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6787
diff changeset
   692
/**
6422
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   693
 *  \brief Set the border state of a window.
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   694
 *
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   695
 *  This will add or remove the window's SDL_WINDOW_BORDERLESS flag and
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   696
 *  add or remove the border from the actual window. This is a no-op if the
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   697
 *  window's border already matches the requested state.
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   698
 *
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   699
 *  \param window The window of which to change the border state.
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   700
 *  \param bordered SDL_FALSE to remove border, SDL_TRUE to add border.
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   701
 *
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   702
 *  \note You can't change the border state of a fullscreen window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   703
 *
6422
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   704
 *  \sa SDL_GetWindowFlags()
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   705
 */
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   706
extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   707
                                                   SDL_bool bordered);
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   708
fd0ac1b56115 Added SDL_SetWindowBordered() API.
Ryan C. Gordon <icculus@icculus.org>
parents: 6394
diff changeset
   709
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   710
 *  \brief Show a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   711
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   712
 *  \sa SDL_HideWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   713
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   714
extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   715
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   716
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   717
 *  \brief Hide a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   718
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   719
 *  \sa SDL_ShowWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   720
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   721
extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   722
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   723
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   724
 *  \brief Raise a window above other windows and set the input focus.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   725
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   726
extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   727
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   728
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   729
 *  \brief Make a window as large as possible.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   730
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   731
 *  \sa SDL_RestoreWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   732
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   733
extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   734
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   735
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   736
 *  \brief Minimize a window to an iconic representation.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   737
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   738
 *  \sa SDL_RestoreWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   739
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   740
extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   741
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   742
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   743
 *  \brief Restore the size and position of a minimized or maximized window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   744
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   745
 *  \sa SDL_MaximizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   746
 *  \sa SDL_MinimizeWindow()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   747
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   748
extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   749
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   750
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   751
 *  \brief Set a window's fullscreen state.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   752
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   753
 *  \return 0 on success, or -1 if setting the display mode failed.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   754
 *
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   755
 *  \sa SDL_SetWindowDisplayMode()
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   756
 *  \sa SDL_GetWindowDisplayMode()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   757
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   758
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
6755
af77e1a6faf0 Improvements from Alfred:
Sam Lantinga <slouken@libsdl.org>
parents: 6681
diff changeset
   759
                                                    Uint32 flags);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   760
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   761
/**
5546
cd2167525827 Clarified SDL_GetWindowSurface() documentation
Sam Lantinga <slouken@libsdl.org>
parents: 5535
diff changeset
   762
 *  \brief Get the SDL surface associated with the window.
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   763
 *
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   764
 *  \return The window's framebuffer surface, or NULL on error.
5546
cd2167525827 Clarified SDL_GetWindowSurface() documentation
Sam Lantinga <slouken@libsdl.org>
parents: 5535
diff changeset
   765
 *
cd2167525827 Clarified SDL_GetWindowSurface() documentation
Sam Lantinga <slouken@libsdl.org>
parents: 5535
diff changeset
   766
 *  A new surface will be created with the optimal format for the window,
cd2167525827 Clarified SDL_GetWindowSurface() documentation
Sam Lantinga <slouken@libsdl.org>
parents: 5535
diff changeset
   767
 *  if necessary. This surface will be freed when the window is destroyed.
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   768
 *
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   769
 *  \note You may not combine this with 3D or the rendering API on this window.
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   770
 *
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   771
 *  \sa SDL_UpdateWindowSurface()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   772
 *  \sa SDL_UpdateWindowSurfaceRects()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   773
 */
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   774
extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   775
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   776
/**
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   777
 *  \brief Copy the window surface to the screen.
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   778
 *
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   779
 *  \return 0 on success, or -1 on error.
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   780
 *
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   781
 *  \sa SDL_GetWindowSurface()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   782
 *  \sa SDL_UpdateWindowSurfaceRects()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   783
 */
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   784
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   785
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   786
/**
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   787
 *  \brief Copy a number of rectangles on the window surface to the screen.
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   788
 *
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   789
 *  \return 0 on success, or -1 on error.
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   790
 *
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   791
 *  \sa SDL_GetWindowSurface()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   792
 *  \sa SDL_UpdateWindowSurfaceRect()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   793
 */
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   794
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
7014
3e0d048e1c14 Fixed bug 1763 - Constify SDL_UpdateWindowSurfaceRects()
Sam Lantinga <slouken@libsdl.org>
parents: 6984
diff changeset
   795
                                                         const SDL_Rect * rects,
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5276
diff changeset
   796
                                                         int numrects);
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   797
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5165
diff changeset
   798
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   799
 *  \brief Set a window's input grab mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   800
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   801
 *  \param window The window for which the input grab mode should be set.
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   802
 *  \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   803
 *
9447
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   804
 *  If the caller enables a grab while another window is currently grabbed,
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   805
 *  the other window loses its grab in favor of the caller's window.
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   806
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   807
 *  \sa SDL_GetWindowGrab()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   808
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   809
extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   810
                                               SDL_bool grabbed);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   811
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   812
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   813
 *  \brief Get a window's input grab mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   814
 *
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   815
 *  \return This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   816
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   817
 *  \sa SDL_SetWindowGrab()
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   818
 */
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   819
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   820
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   821
/**
9447
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   822
 *  \brief Get the window that currently has an input grab enabled.
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   823
 *
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   824
 *  \return This returns the window if input is grabbed, and NULL otherwise.
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   825
 *
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   826
 *  \sa SDL_SetWindowGrab()
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   827
 */
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   828
extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   829
728a4bf8e02f Minor input grab clarifications.
Ryan C. Gordon <icculus@icculus.org>
parents: 9412
diff changeset
   830
/**
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   831
 *  \brief Set the brightness (gamma correction) for a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   832
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   833
 *  \return 0 on success, or -1 if setting the brightness isn't supported.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   834
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   835
 *  \sa SDL_GetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   836
 *  \sa SDL_SetWindowGammaRamp()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   837
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   838
extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   839
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   840
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   841
 *  \brief Get the brightness (gamma correction) for a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   842
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   843
 *  \return The last brightness value passed to SDL_SetWindowBrightness()
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   844
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   845
 *  \sa SDL_SetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   846
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   847
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   848
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   849
/**
10025
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   850
 *  \brief Set the opacity for a window
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   851
 *
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   852
 *  \param window The window which will be made transparent or opaque
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   853
 *  \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   854
 *                 clamped internally between 0.0f and 1.0f.
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   855
 * 
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   856
 *  \return 0 on success, or -1 if setting the opacity isn't supported.
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   857
 *
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   858
 *  \sa SDL_GetWindowOpacity()
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   859
 */
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   860
extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   861
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   862
/**
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   863
 *  \brief Get the opacity of a window.
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   864
 *
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   865
 *  If transparency isn't supported on this platform, opacity will be reported
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   866
 *  as 1.0f without error.
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   867
 *
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   868
 *  \param window The window in question.
10035
dd72e6df3655 Fixed doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 10029
diff changeset
   869
 *  \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
10025
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   870
 *
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   871
 *  \return 0 on success, or -1 on error (invalid window, etc).
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   872
 *
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   873
 *  \sa SDL_SetWindowOpacity()
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   874
 */
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   875
extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   876
bf4f8cde1c54 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
Ryan C. Gordon <icculus@icculus.org>
parents: 10024
diff changeset
   877
/**
10035
dd72e6df3655 Fixed doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 10029
diff changeset
   878
 *  \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
10027
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   879
 *
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   880
 *  \param modal_window The window that should be modal
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   881
 *  \param parent_window The parent window
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   882
 * 
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   883
 *  \return 0 on success, or -1 otherwise.
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   884
 */
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   885
extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   886
f7ab0613164a Added SDL_SetWindowModalFor().
Ryan C. Gordon <icculus@icculus.org>
parents: 10026
diff changeset
   887
/**
10026
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   888
 *  \brief Explicitly sets input focus to the window.
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   889
 *
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   890
 *  You almost certainly want SDL_RaiseWindow() instead of this function. Use
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   891
 *  this with caution, as you might give focus to a window that's completely
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   892
 *  obscured by other windows.
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   893
 *
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   894
 *  \param window The window that should get the input focus
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   895
 * 
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   896
 *  \return 0 on success, or -1 otherwise.
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   897
 *  \sa SDL_RaiseWindow()
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   898
 */
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   899
extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   900
5f73f513b9f5 Added SDL_SetWindowInputFocus().
Ryan C. Gordon <icculus@icculus.org>
parents: 10025
diff changeset
   901
/**
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   902
 *  \brief Set the gamma ramp for a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   903
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   904
 *  \param window The window for which the gamma ramp should be set.
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   905
 *  \param red The translation table for the red channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   906
 *  \param green The translation table for the green channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   907
 *  \param blue The translation table for the blue channel, or NULL.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   908
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   909
 *  \return 0 on success, or -1 if gamma ramps are unsupported.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   910
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   911
 *  Set the gamma translation table for the red, green, and blue channels
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   912
 *  of the video hardware.  Each table is an array of 256 16-bit quantities,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   913
 *  representing a mapping between the input and output for that channel.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   914
 *  The input is the index into the array, and the output is the 16-bit
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   915
 *  gamma value at that index, scaled to the output color precision.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   916
 *
5504
469da3d31cbd Fixed related function documentation
Sam Lantinga <slouken@libsdl.org>
parents: 5466
diff changeset
   917
 *  \sa SDL_GetWindowGammaRamp()
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   918
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   919
extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   920
                                                   const Uint16 * red,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   921
                                                   const Uint16 * green,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   922
                                                   const Uint16 * blue);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   923
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   924
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   925
 *  \brief Get the gamma ramp for a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   926
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   927
 *  \param window The window from which the gamma ramp should be queried.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   928
 *  \param red   A pointer to a 256 element array of 16-bit quantities to hold
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   929
 *               the translation table for the red channel, or NULL.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   930
 *  \param green A pointer to a 256 element array of 16-bit quantities to hold
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   931
 *               the translation table for the green channel, or NULL.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   932
 *  \param blue  A pointer to a 256 element array of 16-bit quantities to hold
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   933
 *               the translation table for the blue channel, or NULL.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   934
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   935
 *  \return 0 on success, or -1 if gamma ramps are unsupported.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   936
 *
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   937
 *  \sa SDL_SetWindowGammaRamp()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   938
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   939
extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   940
                                                   Uint16 * red,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   941
                                                   Uint16 * green,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   942
                                                   Uint16 * blue);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   943
8937
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   944
/**
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   945
 *  \brief Possible return values from the SDL_HitTest callback.
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   946
 *
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   947
 *  \sa SDL_HitTest
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   948
 */
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   949
typedef enum
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   950
{
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   951
    SDL_HITTEST_NORMAL,  /**< Region is normal. No special properties. */
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   952
    SDL_HITTEST_DRAGGABLE,  /**< Region can drag entire window. */
8946
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   953
    SDL_HITTEST_RESIZE_TOPLEFT,
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   954
    SDL_HITTEST_RESIZE_TOP,
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   955
    SDL_HITTEST_RESIZE_TOPRIGHT,
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   956
    SDL_HITTEST_RESIZE_RIGHT,
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   957
    SDL_HITTEST_RESIZE_BOTTOMRIGHT,
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   958
    SDL_HITTEST_RESIZE_BOTTOM,
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   959
    SDL_HITTEST_RESIZE_BOTTOMLEFT,
c9592936dffc Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ionut Leonte <ionut.leonte@gmail.com>
parents: 8937
diff changeset
   960
    SDL_HITTEST_RESIZE_LEFT
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   961
} SDL_HitTestResult;
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   962
8937
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   963
/**
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   964
 *  \brief Callback used for hit-testing.
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   965
 *
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   966
 *  \sa SDL_SetWindowHitTest
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   967
 */
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   968
typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   969
                                                 const SDL_Point *area,
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   970
                                                 void *data);
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   971
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   972
/**
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   973
 *  \brief Provide a callback that decides if a window region has special properties.
8931
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
   974
 *
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   975
 *  Normally windows are dragged and resized by decorations provided by the
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   976
 *  system window manager (a title bar, borders, etc), but for some apps, it
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   977
 *  makes sense to drag them from somewhere else inside the window itself; for
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   978
 *  example, one might have a borderless window that wants to be draggable
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   979
 *  from any part, or simulate its own title bar, etc.
8931
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
   980
 *
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   981
 *  This function lets the app provide a callback that designates pieces of
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   982
 *  a given window as special. This callback is run during event processing
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   983
 *  if we need to tell the OS to treat a region of the window specially; the
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   984
 *  use of this callback is known as "hit testing."
8931
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
   985
 *
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
   986
 *  Mouse input may not be delivered to your application if it is within
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   987
 *  a special area; the OS will often apply that input to moving the window or
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   988
 *  resizing the window and not deliver it to the application.
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   989
 *
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   990
 *  Specifying NULL for a callback disables hit-testing. Hit-testing is
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   991
 *  disabled by default.
8931
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
   992
 *
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
   993
 *  Platforms that don't support this functionality will return -1
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   994
 *  unconditionally, even if you're attempting to disable hit-testing.
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
   995
 *
8937
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   996
 *  Your callback may fire at any time, and its firing does not indicate any
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   997
 *  specific behavior (for example, on Windows, this certainly might fire
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   998
 *  when the OS is deciding whether to drag your window, but it fires for lots
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
   999
 *  of other reasons, too, some unrelated to anything you probably care about
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
  1000
 *  _and when the mouse isn't actually at the location it is testing_).
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
  1001
 *  Since this can fire at any time, you should try to keep your callback
e5caf226926d Tweaked hit-testing documentation.
Ryan C. Gordon <icculus@icculus.org>
parents: 8935
diff changeset
  1002
 *  efficient, devoid of allocations, etc.
8931
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
  1003
 *
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
  1004
 *  \param window The window to set hit-testing on.
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
  1005
 *  \param callback The callback to call when doing a hit-test.
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
  1006
 *  \param callback_data An app-defined void pointer passed to the callback.
8931
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
  1007
 *  \return 0 on success, -1 on error (including unsupported).
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
  1008
 */
8935
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
  1009
extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
  1010
                                                 SDL_HitTest callback,
9d2f0236322b Changed drag area API to a hit-testing API.
Ryan C. Gordon <icculus@icculus.org>
parents: 8931
diff changeset
  1011
                                                 void *callback_data);
8931
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
  1012
44d8a2f4b431 First shot at SDL_SetWindowDragAreas().
Ryan C. Gordon <icculus@icculus.org>
parents: 8927
diff changeset
  1013
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
  1014
 *  \brief Destroy a window.
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
  1015
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
  1016
extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
  1017
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
  1018
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
  1019
/**
10175
fcf0d3ca1fa2 Updated documentation of SDL_IsScreenSaverEnabled().
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 10168
diff changeset
  1020
 *  \brief Returns whether the screensaver is currently enabled (default off).
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
  1021
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
  1022
 *  \sa SDL_EnableScreenSaver()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
  1023
 *  \sa SDL_DisableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
  1024
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
  1025
extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
  1026
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
  1027
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
  1028
 *  \brief Allow the screen to be blanked by a screensaver
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
  1029
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
  1030
 *  \sa SDL_IsScreenSaverEnabled()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
  1031
 *  \sa SDL_DisableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
  1032
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
  1033
extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
  1034
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
  1035
/**
3407