include/SDL_video.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 08 Apr 2011 13:03:26 -0700
changeset 5535 96594ac5fd1a
parent 5504 469da3d31cbd
child 5546 cd2167525827
permissions -rw-r--r--
SDL 1.3 is now under the zlib license.
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
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5504
diff changeset
     3
  Copyright (C) 1997-2011 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
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    24
 *  
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
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
    39
/* *INDENT-OFF* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    40
extern "C" {
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
    41
/* *INDENT-ON* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    42
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    43
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
    44
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    45
 *  \brief  The structure that defines a display mode
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    46
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    47
 *  \sa SDL_GetNumDisplayModes()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    48
 *  \sa SDL_GetDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    49
 *  \sa SDL_GetDesktopDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    50
 *  \sa SDL_GetCurrentDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    51
 *  \sa SDL_GetClosestDisplayMode()
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
    52
 *  \sa SDL_SetWindowDisplayMode()
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
    53
 *  \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
    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
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
    56
{
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
    57
    Uint32 format;              /**< pixel format */
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 w;                      /**< width */
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
    int h;                      /**< height */
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
    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
    61
    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
    62
} SDL_DisplayMode;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    63
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
    64
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    65
 *  \brief The type used to identify a window
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    66
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    67
 *  \sa SDL_CreateWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    68
 *  \sa SDL_CreateWindowFrom()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    69
 *  \sa SDL_DestroyWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    70
 *  \sa SDL_GetWindowData()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    71
 *  \sa SDL_GetWindowFlags()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    72
 *  \sa SDL_GetWindowGrab()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    73
 *  \sa SDL_GetWindowPosition()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    74
 *  \sa SDL_GetWindowSize()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    75
 *  \sa SDL_GetWindowTitle()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    76
 *  \sa SDL_HideWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    77
 *  \sa SDL_MaximizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    78
 *  \sa SDL_MinimizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    79
 *  \sa SDL_RaiseWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    80
 *  \sa SDL_RestoreWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    81
 *  \sa SDL_SetWindowData()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    82
 *  \sa SDL_SetWindowFullscreen()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    83
 *  \sa SDL_SetWindowGrab()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    84
 *  \sa SDL_SetWindowIcon()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    85
 *  \sa SDL_SetWindowPosition()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    86
 *  \sa SDL_SetWindowSize()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    87
 *  \sa SDL_SetWindowTitle()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    88
 *  \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
    89
 */
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
    90
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
    91
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
    92
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    93
 *  \brief The flags on a window
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    94
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    95
 *  \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
    96
 */
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
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
    98
{
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 */
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   110
    SDL_WINDOW_FOREIGN = 0x00000800             /**< window not created by SDL */
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
   111
} 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
   112
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
   113
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   114
 *  \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
   115
 */
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
   116
#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
   117
#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
   118
#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
   119
#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
   120
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   121
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
   122
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   123
 *  \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
   124
 */
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
   125
#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
   126
#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
   127
#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
   128
#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
   129
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   130
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
   131
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   132
 *  \brief Event subtype for window events
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   133
 */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   134
typedef enum
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   135
{
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   136
    SDL_WINDOWEVENT_NONE,           /**< Never used */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   137
    SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   138
    SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   139
    SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   140
                                         redrawn */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   141
    SDL_WINDOWEVENT_MOVED,          /**< Window has been moved to data1, data2 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   142
                                     */
5276
8e421890cdb8 Fixed bug #1117
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   143
    SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */
8e421890cdb8 Fixed bug #1117
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   144
    SDL_WINDOWEVENT_SIZE_CHANGED,   /**< The window size has changed, either as a result of an API call or through the system or user changing the window size. */
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   145
    SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   146
    SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   147
    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
   148
                                         and position */
3691
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   149
    SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   150
    SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   151
    SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   152
    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   153
    SDL_WINDOWEVENT_CLOSE           /**< The window manager requests that the 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   154
                                         window be closed */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   155
} SDL_WindowEventID;
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   156
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   157
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   158
 *  \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
   159
 */
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
   160
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
   161
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
   162
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   163
 *  \brief OpenGL configuration attributes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   164
 */
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
   165
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
   166
{
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   167
    SDL_GL_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   168
    SDL_GL_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   169
    SDL_GL_BLUE_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   170
    SDL_GL_ALPHA_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   171
    SDL_GL_BUFFER_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   172
    SDL_GL_DOUBLEBUFFER,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   173
    SDL_GL_DEPTH_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   174
    SDL_GL_STENCIL_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   175
    SDL_GL_ACCUM_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   176
    SDL_GL_ACCUM_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   177
    SDL_GL_ACCUM_BLUE_SIZE,
450
8a43e0cbf02f Added SDL_GL_STEREO for stereoscopic OpenGL contexts
Sam Lantinga <slouken@libsdl.org>
parents: 432
diff changeset
   178
    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
   179
    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
   180
    SDL_GL_MULTISAMPLEBUFFERS,
1736
3b2a92126f4d Implemented bug #2, 117:
Sam Lantinga <slouken@libsdl.org>
parents: 1545
diff changeset
   181
    SDL_GL_MULTISAMPLESAMPLES,
2747
47519ce71def Added SDL_GL_RETAINED_BACKING attribute to SDL_GLattr
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2275
diff changeset
   182
    SDL_GL_ACCELERATED_VISUAL,
3100
7dc982143c06 Date: Sun, 22 Mar 2009 12:52:29 +0000
Sam Lantinga <slouken@libsdl.org>
parents: 3091
diff changeset
   183
    SDL_GL_RETAINED_BACKING,
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3100
diff changeset
   184
    SDL_GL_CONTEXT_MAJOR_VERSION,
Sam Lantinga <slouken@libsdl.org>
parents: 3100
diff changeset
   185
    SDL_GL_CONTEXT_MINOR_VERSION
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   186
} SDL_GLattr;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   187
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   188
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   189
/* Function prototypes */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   190
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
   191
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   192
 *  \brief Get the number of video drivers compiled into SDL
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   193
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   194
 *  \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
   195
 */
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
   196
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
   197
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
   198
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   199
 *  \brief Get the name of a built in video driver.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   200
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   201
 *  \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
   202
 *        normally checked during initialization.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   203
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   204
 *  \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
   205
 */
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
   206
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
   207
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
   208
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   209
 *  \brief Initialize the video subsystem, optionally specifying a video driver.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   210
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   211
 *  \param driver_name Initialize a specific driver by name, or NULL for the 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   212
 *                     default video driver.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   213
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   214
 *  \return 0 on success, -1 on error
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   215
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   216
 *  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
   217
 *  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
   218
 *  and pixel formats, but does not initialize a window or graphics mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   219
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   220
 *  \sa SDL_VideoQuit()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   221
 */
5123
dc0dfdd58f27 Removed completely non-portable event thread hack.
Sam Lantinga <slouken@libsdl.org>
parents: 4971
diff changeset
   222
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
   223
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
   224
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   225
 *  \brief Shuts down the video subsystem.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   226
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   227
 *  This function closes all windows, and restores the original video mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   228
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   229
 *  \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
   230
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   231
extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   232
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
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   234
 *  \brief Returns the name of the currently initialized video driver.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   235
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   236
 *  \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
   237
 *          has been initialized
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   238
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   239
 *  \sa SDL_GetNumVideoDrivers()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   240
 *  \sa SDL_GetVideoDriver()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   241
 */
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
   242
extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   243
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
   244
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   245
 *  \brief Returns the number of available video displays.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   246
 *  
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   247
 *  \sa SDL_GetDisplayBounds()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   248
 */
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
   249
extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   250
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
   251
/**
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   252
 *  \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
   253
 *         display located at 0,0
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   254
 *  
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   255
 *  \return 0 on success, or -1 if the index is out of range.
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   256
 *  
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   257
 *  \sa SDL_GetNumVideoDisplays()
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   258
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   259
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
   260
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   261
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   262
 *  \brief Returns the number of available display modes.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   263
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   264
 *  \sa SDL_GetDisplayMode()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   265
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   266
extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   267
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
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   269
 *  \brief Fill in information about a specific display mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   270
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   271
 *  \note The display modes are sorted in this priority:
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   272
 *        \li bits per pixel -> more colors to fewer colors
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   273
 *        \li width -> largest to smallest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   274
 *        \li height -> largest to smallest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   275
 *        \li refresh rate -> highest to lowest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   276
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   277
 *  \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
   278
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   279
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
   280
                                               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
   281
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
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   283
 *  \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
   284
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   285
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
   286
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
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   288
 *  \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
   289
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   290
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
   291
3400
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 3227
diff changeset
   292
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
   293
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   294
 *  \brief Get the closest match to the requested display mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   295
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   296
 *  \param mode The desired display mode
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   297
 *  \param closest A pointer to a display mode to be filled in with the closest 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   298
 *                 match of the available display modes.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   299
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   300
 *  \return The passed in value \c closest, or NULL if no matching video mode 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   301
 *          was available.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   302
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   303
 *  The available display modes are scanned, and \c closest is filled in with the
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   304
 *  closest mode matching the requested mode and returned.  The mode format and 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   305
 *  refresh_rate default to the desktop mode if they are 0.  The modes are 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   306
 *  scanned with size being first priority, format being second priority, and 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   307
 *  finally checking the refresh_rate.  If all the available modes are too 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   308
 *  small, then NULL is returned.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   309
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   310
 *  \sa SDL_GetNumDisplayModes()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   311
 *  \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
   312
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   313
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
   314
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
   315
/**
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
   316
 *  \brief Get the display index associated with a window.
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
   317
 *  
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
   318
 *  \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
   319
 *          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
   320
 */
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
   321
extern DECLSPEC int SDLCALL SDL_GetWindowDisplay(SDL_Window * window);
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
   322
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
   323
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   324
 *  \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
   325
 *
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   326
 *  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
   327
 *  are used.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   328
 *  
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
   329
 *  \param mode The mode to use, or NULL for the default mode.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   330
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   331
 *  \return 0 on success, or -1 if setting the display mode failed.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   332
 *  
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   333
 *  \sa SDL_GetWindowDisplayMode()
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   334
 *  \sa SDL_SetWindowFullscreen()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   335
 */
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
   336
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
   337
                                                     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
   338
                                                         * mode);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   339
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
   340
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   341
 *  \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
   342
 *         window is visible.
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   343
 *
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   344
 *  \sa SDL_SetWindowDisplayMode()
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   345
 *  \sa SDL_SetWindowFullscreen()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   346
 */
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
   347
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
   348
                                                     SDL_DisplayMode * mode);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   349
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
   350
/**
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
   351
 *  \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
   352
 */
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
   353
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
   354
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
   355
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   356
 *  \brief Create a window with the specified position, dimensions, and flags.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   357
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   358
 *  \param title The title of the window, in UTF-8 encoding.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   359
 *  \param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   360
 *               ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   361
 *  \param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   362
 *               ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   363
 *  \param w     The width of the window.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   364
 *  \param h     The height of the window.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   365
 *  \param flags The flags for the window, a mask of any of the following: 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   366
 *               ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   367
 *               ::SDL_WINDOW_SHOWN,      ::SDL_WINDOW_BORDERLESS, 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   368
 *               ::SDL_WINDOW_RESIZABLE,  ::SDL_WINDOW_MAXIMIZED, 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   369
 *               ::SDL_WINDOW_MINIMIZED,  ::SDL_WINDOW_INPUT_GRABBED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   370
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   371
 *  \return The id of the window created, or zero if window creation failed.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   372
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   373
 *  \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
   374
 */
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
   375
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
   376
                                                      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
   377
                                                      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
   378
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
   379
/**
3493
40b1f7cb2062 SDL_CreateWindowFrom() is actually going to be supported. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3492
diff changeset
   380
 *  \brief Create an SDL window from an existing native window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   381
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   382
 *  \param data A pointer to driver-dependent window creation data
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   383
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   384
 *  \return The id of the window created, or zero if window creation failed.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   385
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   386
 *  \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
   387
 */
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
   388
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
   389
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
   390
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   391
 *  \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
   392
 */
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
   393
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
   394
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
   395
/**
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
   396
 *  \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
   397
 */
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
   398
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
   399
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
   400
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   401
 *  \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
   402
 */
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
   403
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
   404
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
   405
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   406
 *  \brief Set the title of a window, in UTF-8 format.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   407
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   408
 *  \sa SDL_GetWindowTitle()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   409
 */
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
   410
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
   411
                                                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
   412
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
   413
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   414
 *  \brief Get the title of a window, in UTF-8 format.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   415
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   416
 *  \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
   417
 */
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
   418
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
   419
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
/**
4887
0a77d2fc95ad Fixed grammar, thanks to Sheena's suggestion.
Sam Lantinga <slouken@libsdl.org>
parents: 4883
diff changeset
   421
 *  \brief Set the icon for a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   422
 *  
4887
0a77d2fc95ad Fixed grammar, thanks to Sheena's suggestion.
Sam Lantinga <slouken@libsdl.org>
parents: 4883
diff changeset
   423
 *  \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
   424
 */
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
   425
extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
2990
Sam Lantinga <slouken@libsdl.org>
parents: 2967
diff changeset
   426
                                               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
   427
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
   428
/**
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   429
 *  \brief Associate an arbitrary named pointer with a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   430
 *  
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   431
 *  \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
   432
 *  \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
   433
 *  \param userdata The associated pointer.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   434
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   435
 *  \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
   436
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   437
 *  \note The name is case-sensitive.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   438
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   439
 *  \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
   440
 */
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   441
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
   442
                                                const char *name,
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   443
                                                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
   444
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
   445
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   446
 *  \brief Retrieve the data pointer associated with a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   447
 *  
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   448
 *  \param window   The window to query.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   449
 *  \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
   450
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   451
 *  \return The value associated with 'name'
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   452
 *  
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   453
 *  \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
   454
 */
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   455
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
   456
                                                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
   457
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
   458
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   459
 *  \brief Set the position of a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   460
 *  
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   461
 *  \param window   The window to reposition.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   462
 *  \param x        The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   463
                    ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   464
 *  \param y        The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   465
                    ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   466
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   467
 *  \note The window coordinate origin is the upper left of the display.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   468
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   469
 *  \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
   470
 */
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
   471
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
   472
                                                   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
   473
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
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   475
 *  \brief Get the position of a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   476
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   477
 *  \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
   478
 */
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
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
   480
                                                   int *x, int *y);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   481
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
   482
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   483
 *  \brief Set the size of a window's client area.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   484
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   485
 *  \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
   486
 *        matches the size of the display mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   487
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   488
 *  \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
   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 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
   491
                                               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
   492
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
   493
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   494
 *  \brief Get the size of a window's client area.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   495
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   496
 *  \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
   497
 */
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
   498
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
   499
                                               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
   500
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
   501
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   502
 *  \brief Show a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   503
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   504
 *  \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
   505
 */
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
   506
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
   507
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
   508
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   509
 *  \brief Hide a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   510
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   511
 *  \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
   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_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
   514
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
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   516
 *  \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
   517
 */
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
   518
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
   519
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
   520
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   521
 *  \brief Make a window as large as possible.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   522
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   523
 *  \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
   524
 */
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
   525
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
   526
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
   527
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   528
 *  \brief Minimize a window to an iconic representation.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   529
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   530
 *  \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
   531
 */
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
   532
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
   533
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
   534
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   535
 *  \brief Restore the size and position of a minimized or maximized window.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   536
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   537
 *  \sa SDL_MaximizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   538
 *  \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
   539
 */
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
   540
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
   541
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
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   543
 *  \brief Set a window's fullscreen state.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   544
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   545
 *  \return 0 on success, or -1 if setting the display mode failed.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   546
 *  
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   547
 *  \sa SDL_SetWindowDisplayMode()
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   548
 *  \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
   549
 */
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
   550
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(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
   551
                                                    SDL_bool fullscreen);
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
   552
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
   553
/**
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
   554
 *  \brief Get an SDL surface associated with the 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
   555
 *
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
   556
 *  \return A surface in the optimal format for the window, or NULL 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
   557
 *
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
   558
 *  \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
   559
 *
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
   560
 *  \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
   561
 *  \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
   562
 */
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
   563
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
   564
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
   565
/**
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
   566
 *  \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
   567
 *
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
   568
 *  \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
   569
 *
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
   570
 *  \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
   571
 *  \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
   572
 */
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
   573
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
   574
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
   575
/**
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
   576
 *  \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
   577
 *
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
   578
 *  \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
   579
 *
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
   580
 *  \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
   581
 *  \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
   582
 */
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
   583
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5276
diff changeset
   584
                                                         SDL_Rect * rects,
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5276
diff changeset
   585
                                                         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
   586
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
   587
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   588
 *  \brief Set a window's input grab mode.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   589
 *  
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   590
 *  \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   591
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   592
 *  \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
   593
 */
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
   594
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
   595
                                               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
   596
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
   597
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   598
 *  \brief Get a window's input grab mode.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   599
 *  
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   600
 *  \return This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   601
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   602
 *  \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
   603
 */
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   604
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
   605
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
   606
/**
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   607
 *  \brief Set the brightness (gamma correction) for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   608
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   609
 *  \return 0 on success, or -1 if setting the brightness isn't supported.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   610
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   611
 *  \sa SDL_GetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   612
 *  \sa SDL_SetWindowGammaRamp()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   613
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   614
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
   615
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   616
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   617
 *  \brief Get the brightness (gamma correction) for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   618
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   619
 *  \return The last brightness value passed to SDL_SetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   620
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   621
 *  \sa SDL_SetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   622
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   623
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   624
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   625
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   626
 *  \brief Set the gamma ramp for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   627
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   628
 *  \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
   629
 *  \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
   630
 *  \param blue The translation table for the blue channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   631
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   632
 *  \return 0 on success, or -1 if gamma ramps are unsupported.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   633
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   634
 *  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
   635
 *  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
   636
 *  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
   637
 *  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
   638
 *  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
   639
 *
5504
469da3d31cbd Fixed related function documentation
Sam Lantinga <slouken@libsdl.org>
parents: 5466
diff changeset
   640
 *  \sa SDL_GetWindowGammaRamp()
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   641
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   642
extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   643
                                                   const Uint16 * red,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   644
                                                   const Uint16 * green,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   645
                                                   const Uint16 * blue);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   646
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   647
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   648
 *  \brief Get the gamma ramp for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   649
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   650
 *  \param red   A pointer to a 256 element array of 16-bit quantities to hold 
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   651
 *               the translation table for the red channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   652
 *  \param green A pointer to a 256 element array of 16-bit quantities to hold 
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   653
 *               the translation table for the green channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   654
 *  \param blue  A pointer to a 256 element array of 16-bit quantities to hold 
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   655
 *               the translation table for the blue channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   656
 *   
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   657
 *  \return 0 on success, or -1 if gamma ramps are unsupported.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   658
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   659
 *  \sa SDL_SetWindowGammaRamp()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   660
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   661
extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   662
                                                   Uint16 * red,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   663
                                                   Uint16 * green,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   664
                                                   Uint16 * blue);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   665
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   666
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   667
 *  \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
   668
 */
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
   669
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
   670
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   671
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   672
/**
4875
22ce07e8e824 Suspending the screensaver defaults off.
Sam Lantinga <slouken@libsdl.org>
parents: 4869
diff changeset
   673
 *  \brief Returns whether the screensaver is currently enabled (default on).
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   674
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   675
 *  \sa SDL_EnableScreenSaver()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   676
 *  \sa SDL_DisableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   677
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
   678
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
   679
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   680
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   681
 *  \brief Allow the screen to be blanked by a screensaver
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   682
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   683
 *  \sa SDL_IsScreenSaverEnabled()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   684
 *  \sa SDL_DisableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   685
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
   686
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
   687
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   688
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   689
 *  \brief Prevent the screen from being blanked by a screensaver
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   690
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   691
 *  \sa SDL_IsScreenSaverEnabled()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   692
 *  \sa SDL_EnableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   693
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
   694
extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   695
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   696
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   697
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   698
 *  \name OpenGL support functions
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   699
 */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   700
/*@{*/
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   701
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
   702
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   703
 *  \brief Dynamically load an OpenGL library.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   704
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   705
 *  \param path The platform dependent OpenGL library name, or NULL to open the 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   706
 *              default OpenGL library.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   707
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   708
 *  \return 0 on success, or -1 if the library couldn't be loaded.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   709
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   710
 *  This should be done after initializing the video driver, but before
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   711
 *  creating any OpenGL windows.  If no OpenGL library is loaded, the default
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   712
 *  library will be loaded upon creation of the first OpenGL window.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   713
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   714
 *  \note If you do this, you need to retrieve all of the GL functions used in
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   715
 *        your program from the dynamic library using SDL_GL_GetProcAddress().
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   716
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   717
 *  \sa SDL_GL_GetProcAddress()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   718
 *  \sa SDL_GL_UnloadLibrary()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   719
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   720
extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   721
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
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   723
 *  \brief Get the address of an OpenGL function.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   724
 */
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
extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   726
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
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   728
 *  \brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   729
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   730
 *  \sa SDL_GL_LoadLibrary()
3057
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   731
 */
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   732
extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   733
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   734
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   735
 *  \brief Return true if an OpenGL extension is supported for the current 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   736
 *         context.
1926
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   737
 */
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   738
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   739
                                                           *extension);
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   740
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   741
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   742
 *  \brief Set an OpenGL window attribute before window creation.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   743
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   744
extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   745
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
   746
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   747
 *  \brief Get the actual value for an attribute from the current 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
   748
 */
1936
83946ee0ff1f Implemented OpenGL support on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 1926
diff changeset
   749
extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
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
   750
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
   751
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   752
 *  \brief Create an OpenGL context for use with an OpenGL window, and make it 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   753
 *         current.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   754
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   755
 *  \sa SDL_GL_DeleteContext()
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
   756
 */
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
   757
extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_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
   758
                                                           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
   759
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
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   761
 *  \brief Set up an OpenGL context for rendering into an OpenGL window.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   762
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   763
 *  \note The context must have been created with a compatible 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
   764
 */
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
   765
extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(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
   766
                                               SDL_GLContext 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
   767
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
   768
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   769
 *  \brief Set the swap interval for the current OpenGL context.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   770
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   771
 *  \param interval 0 for immediate updates, 1 for updates synchronized with the
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   772
 *                  vertical retrace.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   773
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   774
 *  \return 0 on success, or -1 if setting the swap interval is not supported.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   775
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   776
 *  \sa SDL_GL_GetSwapInterval()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   777
 */
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
   778
extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   779
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
   780
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   781
 *  \brief Get the swap interval for the current OpenGL context.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   782
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   783
 *  \return 0 if there is no vertical retrace synchronization, 1 if the buffer 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   784
 *          swap is synchronized with the vertical retrace, and -1 if getting 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   785
 *          the swap interval is not supported.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   786
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   787
 *  \sa SDL_GL_SetSwapInterval()
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
   788
 */
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
   789
extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(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
   790
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
   791
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   792
 * \brief Swap the OpenGL buffers for a window, if double-buffering is 
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   793
 *        supported.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   794
 */
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
   795
extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   796
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
   797
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   798
 *  \brief Delete an OpenGL context.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   799
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   800
 *  \sa SDL_GL_CreateContext()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   801
 */
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
   802
extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   803
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   804
/*@}*//*OpenGL support functions*/
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   805
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   806
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   807
/* Ends C function definitions when using C++ */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   808
#ifdef __cplusplus
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
   809
/* *INDENT-OFF* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   810
}
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
/* *INDENT-ON* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   812
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   813
#include "close_code.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   814
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   815
#endif /* _SDL_video_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
   816
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
   817
/* vi: set ts=4 sw=4 expandtab: */