include/SDL_video.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 22 Mar 2011 10:48:33 -0700
changeset 5504 469da3d31cbd
parent 5466 006883d5fa51
child 5535 96594ac5fd1a
permissions -rw-r--r--
Fixed related function documentation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     1
/*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     2
    SDL - Simple DirectMedia Layer
5262
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5246
diff changeset
     3
    Copyright (C) 1997-2011 Sam Lantinga
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     4
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     5
    This library is free software; you can redistribute it and/or
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1020
diff changeset
     6
    modify it under the terms of the GNU Lesser General Public
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     7
    License as published by the Free Software Foundation; either
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1020
diff changeset
     8
    version 2.1 of the License, or (at your option) any later version.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     9
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    10
    This library is distributed in the hope that it will be useful,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1020
diff changeset
    13
    Lesser General Public License for more details.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    14
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1020
diff changeset
    15
    You should have received a copy of the GNU Lesser General Public
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1020
diff changeset
    16
    License along with this library; if not, write to the Free Software
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1020
diff changeset
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    18
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    19
    Sam Lantinga
251
b8688cfdc232 Updated the headers with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents: 130
diff changeset
    20
    slouken@libsdl.org
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    21
*/
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    22
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
    23
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    24
 *  \file SDL_video.h
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    25
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    26
 *  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
    27
 */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    28
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    29
#ifndef _SDL_video_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    30
#define _SDL_video_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    31
1356
67114343400d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
    32
#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
    33
#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
    34
#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
    35
#include "SDL_surface.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    36
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    37
#include "begin_code.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    38
/* Set up for C function definitions, even when using C++ */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    39
#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
    40
/* *INDENT-OFF* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    41
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
    42
/* *INDENT-ON* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    43
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    44
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
    45
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    46
 *  \brief  The structure that defines a display mode
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    47
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    48
 *  \sa SDL_GetNumDisplayModes()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    49
 *  \sa SDL_GetDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    50
 *  \sa SDL_GetDesktopDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    51
 *  \sa SDL_GetCurrentDisplayMode()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    52
 *  \sa SDL_GetClosestDisplayMode()
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
    53
 *  \sa SDL_SetWindowDisplayMode()
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
    54
 *  \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
    55
 */
c121d94672cb SDL 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
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
    57
{
c121d94672cb SDL 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
    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
    59
    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
    60
    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
    61
    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
    62
    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
    63
} SDL_DisplayMode;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    64
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
    65
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    66
 *  \brief The type used to identify a window
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    67
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    68
 *  \sa SDL_CreateWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    69
 *  \sa SDL_CreateWindowFrom()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    70
 *  \sa SDL_DestroyWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    71
 *  \sa SDL_GetWindowData()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    72
 *  \sa SDL_GetWindowFlags()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    73
 *  \sa SDL_GetWindowGrab()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    74
 *  \sa SDL_GetWindowPosition()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    75
 *  \sa SDL_GetWindowSize()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    76
 *  \sa SDL_GetWindowTitle()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    77
 *  \sa SDL_HideWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    78
 *  \sa SDL_MaximizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    79
 *  \sa SDL_MinimizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    80
 *  \sa SDL_RaiseWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    81
 *  \sa SDL_RestoreWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    82
 *  \sa SDL_SetWindowData()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    83
 *  \sa SDL_SetWindowFullscreen()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    84
 *  \sa SDL_SetWindowGrab()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    85
 *  \sa SDL_SetWindowIcon()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    86
 *  \sa SDL_SetWindowPosition()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    87
 *  \sa SDL_SetWindowSize()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    88
 *  \sa SDL_SetWindowTitle()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    89
 *  \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
    90
 */
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
    91
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
    92
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
    93
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    94
 *  \brief The flags on a window
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    95
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    96
 *  \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
    97
 */
c121d94672cb SDL 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
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
    99
{
5380
2de85077eb0b Simplified and unified the window creation process a little.
Sam Lantinga <slouken@libsdl.org>
parents: 5297
diff changeset
   100
    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
   101
    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
   102
    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
   103
    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
   104
    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
   105
    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
   106
    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
   107
    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
   108
    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
   109
    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
   110
    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
   111
    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
   112
} 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
   113
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   114
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   115
 *  \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
   116
 */
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
   117
#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
   118
#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
   119
#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
   120
#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
   121
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   122
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   123
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   124
 *  \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
   125
 */
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
   126
#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
   127
#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
   128
#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
   129
#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
   130
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   131
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   132
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   133
 *  \brief Event subtype for window events
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   134
 */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   135
typedef enum
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   136
{
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   137
    SDL_WINDOWEVENT_NONE,           /**< Never used */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   138
    SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   139
    SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   140
    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
   141
                                         redrawn */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   142
    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
   143
                                     */
5276
8e421890cdb8 Fixed bug #1117
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   144
    SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */
8e421890cdb8 Fixed bug #1117
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   145
    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
   146
    SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   147
    SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   148
    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
   149
                                         and position */
3691
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   150
    SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   151
    SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   152
    SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
9fed2aa469ed Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents: 3685
diff changeset
   153
    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
   154
    SDL_WINDOWEVENT_CLOSE           /**< The window manager requests that the 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   155
                                         window be closed */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   156
} SDL_WindowEventID;
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
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   159
 *  \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
   160
 */
c121d94672cb SDL 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
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
   162
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   163
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   164
 *  \brief OpenGL configuration attributes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   165
 */
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
   166
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
   167
{
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   168
    SDL_GL_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   169
    SDL_GL_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   170
    SDL_GL_BLUE_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   171
    SDL_GL_ALPHA_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   172
    SDL_GL_BUFFER_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   173
    SDL_GL_DOUBLEBUFFER,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   174
    SDL_GL_DEPTH_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   175
    SDL_GL_STENCIL_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   176
    SDL_GL_ACCUM_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   177
    SDL_GL_ACCUM_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   178
    SDL_GL_ACCUM_BLUE_SIZE,
450
8a43e0cbf02f Added SDL_GL_STEREO for stereoscopic OpenGL contexts
Sam Lantinga <slouken@libsdl.org>
parents: 432
diff changeset
   179
    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
   180
    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
   181
    SDL_GL_MULTISAMPLEBUFFERS,
1736
3b2a92126f4d Implemented bug #2, 117:
Sam Lantinga <slouken@libsdl.org>
parents: 1545
diff changeset
   182
    SDL_GL_MULTISAMPLESAMPLES,
2747
47519ce71def Added SDL_GL_RETAINED_BACKING attribute to SDL_GLattr
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2275
diff changeset
   183
    SDL_GL_ACCELERATED_VISUAL,
3100
7dc982143c06 Date: Sun, 22 Mar 2009 12:52:29 +0000
Sam Lantinga <slouken@libsdl.org>
parents: 3091
diff changeset
   184
    SDL_GL_RETAINED_BACKING,
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3100
diff changeset
   185
    SDL_GL_CONTEXT_MAJOR_VERSION,
Sam Lantinga <slouken@libsdl.org>
parents: 3100
diff changeset
   186
    SDL_GL_CONTEXT_MINOR_VERSION
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   187
} SDL_GLattr;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   188
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   189
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   190
/* Function prototypes */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   191
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
   192
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   193
 *  \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
   194
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   195
 *  \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
   196
 */
c121d94672cb SDL 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
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
   198
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   199
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   200
 *  \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
   201
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   202
 *  \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
   203
 *        normally checked during initialization.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   204
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   205
 *  \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
   206
 */
c121d94672cb SDL 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
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
   208
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   209
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   210
 *  \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
   211
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   212
 *  \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
   213
 *                     default video driver.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   214
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   215
 *  \return 0 on success, -1 on error
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   216
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   217
 *  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
   218
 *  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
   219
 *  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
   220
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   221
 *  \sa SDL_VideoQuit()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   222
 */
5123
dc0dfdd58f27 Removed completely non-portable event thread hack.
Sam Lantinga <slouken@libsdl.org>
parents: 4971
diff changeset
   223
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
   224
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   225
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   226
 *  \brief Shuts down the video subsystem.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   227
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   228
 *  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
   229
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   230
 *  \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
   231
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   232
extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   233
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
   234
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   235
 *  \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
   236
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   237
 *  \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
   238
 *          has been initialized
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   239
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   240
 *  \sa SDL_GetNumVideoDrivers()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   241
 *  \sa SDL_GetVideoDriver()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   242
 */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   243
extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   244
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
   245
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   246
 *  \brief Returns the number of available video displays.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   247
 *  
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   248
 *  \sa SDL_GetDisplayBounds()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   249
 */
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
   250
extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   251
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
   252
/**
3528
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   253
 *  \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
   254
 *         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
   255
 *  
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   256
 *  \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
   257
 *  
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   258
 *  \sa SDL_GetNumVideoDisplays()
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   259
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   260
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
   261
59ff7a2beb57 Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents: 3523
diff changeset
   262
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   263
 *  \brief Returns the number of available display modes.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   264
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   265
 *  \sa SDL_GetDisplayMode()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   266
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   267
extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   268
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
   269
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   270
 *  \brief Fill in information about a specific display mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   271
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   272
 *  \note The display modes are sorted in this priority:
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   273
 *        \li bits per pixel -> more colors to fewer colors
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   274
 *        \li width -> largest to smallest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   275
 *        \li height -> largest to smallest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   276
 *        \li refresh rate -> highest to lowest
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   277
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   278
 *  \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
   279
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   280
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
   281
                                               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
   282
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   283
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   284
 *  \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
   285
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   286
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
   287
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   288
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   289
 *  \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
   290
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   291
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
   292
3400
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 3227
diff changeset
   293
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
   294
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   295
 *  \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
   296
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   297
 *  \param mode The desired display mode
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   298
 *  \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
   299
 *                 match of the available display modes.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   300
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   301
 *  \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
   302
 *          was available.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   303
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   304
 *  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
   305
 *  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
   306
 *  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
   307
 *  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
   308
 *  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
   309
 *  small, then NULL is returned.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   310
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   311
 *  \sa SDL_GetNumDisplayModes()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   312
 *  \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
   313
 */
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   314
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
   315
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   316
/**
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
   317
 *  \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
   318
 *  
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
 *  \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
   320
 *          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
   321
 */
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
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
   323
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
   324
/**
5244
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   325
 *  \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
   326
 *
762e40fb8e28 Be explicit about what display you're querying. The default display is 0.
Sam Lantinga <slouken@libsdl.org>
parents: 5243
diff changeset
   327
 *  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
   328
 *  are used.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   329
 *  
3500
4b594623401b Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents: 3493
diff changeset
   330
 *  \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
   331
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   332
 *  \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
   333
 *  
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   334
 *  \sa SDL_GetWindowDisplayMode()
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   335
 *  \sa SDL_SetWindowFullscreen()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   336
 */
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
   337
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
   338
                                                     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
   339
                                                         * mode);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   340
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
   341
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   342
 *  \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
   343
 *         window is visible.
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   344
 *
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   345
 *  \sa SDL_SetWindowDisplayMode()
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   346
 *  \sa SDL_SetWindowFullscreen()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   347
 */
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
   348
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
   349
                                                     SDL_DisplayMode * mode);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   350
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
   351
/**
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
   352
 *  \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
   353
 */
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
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
   355
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
   356
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   357
 *  \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
   358
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   359
 *  \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
   360
 *  \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
   361
 *               ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   362
 *  \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
   363
 *               ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   364
 *  \param w     The width of the window.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   365
 *  \param h     The height of the window.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   366
 *  \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
   367
 *               ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   368
 *               ::SDL_WINDOW_SHOWN,      ::SDL_WINDOW_BORDERLESS, 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   369
 *               ::SDL_WINDOW_RESIZABLE,  ::SDL_WINDOW_MAXIMIZED, 
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   370
 *               ::SDL_WINDOW_MINIMIZED,  ::SDL_WINDOW_INPUT_GRABBED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   371
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   372
 *  \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
   373
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   374
 *  \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
   375
 */
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
   376
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
   377
                                                      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
   378
                                                      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
   379
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   380
/**
3493
40b1f7cb2062 SDL_CreateWindowFrom() is actually going to be supported. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3492
diff changeset
   381
 *  \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
   382
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   383
 *  \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
   384
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   385
 *  \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
   386
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   387
 *  \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
   388
 */
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
   389
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
   390
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
   391
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   392
 *  \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
   393
 */
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
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
   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
/**
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
 *  \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
   398
 */
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
   399
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
   400
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   401
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   402
 *  \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
   403
 */
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
   404
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
   405
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   406
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   407
 *  \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
   408
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   409
 *  \sa SDL_GetWindowTitle()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   410
 */
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
   411
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
   412
                                                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
   413
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   414
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   415
 *  \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
   416
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   417
 *  \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
   418
 */
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
   419
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
   420
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   421
/**
4887
0a77d2fc95ad Fixed grammar, thanks to Sheena's suggestion.
Sam Lantinga <slouken@libsdl.org>
parents: 4883
diff changeset
   422
 *  \brief Set the icon for a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   423
 *  
4887
0a77d2fc95ad Fixed grammar, thanks to Sheena's suggestion.
Sam Lantinga <slouken@libsdl.org>
parents: 4883
diff changeset
   424
 *  \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
   425
 */
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
   426
extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
2990
Sam Lantinga <slouken@libsdl.org>
parents: 2967
diff changeset
   427
                                               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
   428
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   429
/**
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   430
 *  \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
   431
 *  
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   432
 *  \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
   433
 *  \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
   434
 *  \param userdata The associated pointer.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   435
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   436
 *  \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
   437
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   438
 *  \note The name is case-sensitive.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   439
 *
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   440
 *  \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
   441
 */
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   442
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
   443
                                                const char *name,
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   444
                                                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
   445
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   446
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   447
 *  \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
   448
 *  
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   449
 *  \param window   The window to query.
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   450
 *  \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
   451
 *
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   452
 *  \return The value associated with 'name'
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   453
 *  
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   454
 *  \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
   455
 */
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   456
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
   457
                                                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
   458
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   459
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   460
 *  \brief Set the position of a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   461
 *  
5165
2b1989f59674 Extended SDL_SetWindowData() to allow arbitrary named values.
Sam Lantinga <slouken@libsdl.org>
parents: 5154
diff changeset
   462
 *  \param window   The window to reposition.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   463
 *  \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
   464
                    ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   465
 *  \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
   466
                    ::SDL_WINDOWPOS_UNDEFINED.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   467
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   468
 *  \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
   469
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   470
 *  \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
   471
 */
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
   472
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
   473
                                                   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
   474
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   475
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   476
 *  \brief Get the position of a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   477
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   478
 *  \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
   479
 */
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
   480
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
   481
                                                   int *x, int *y);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   482
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
   483
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   484
 *  \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
   485
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   486
 *  \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
   487
 *        matches the size of the display mode.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   488
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   489
 *  \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
   490
 */
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
   491
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
   492
                                               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
   493
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   494
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   495
 *  \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
   496
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   497
 *  \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
   498
 */
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
   499
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
   500
                                               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
   501
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   502
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   503
 *  \brief Show a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   504
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   505
 *  \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
   506
 */
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
   507
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
   508
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   509
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   510
 *  \brief Hide a window.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   511
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   512
 *  \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
   513
 */
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
   514
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
   515
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   516
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   517
 *  \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
   518
 */
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
   519
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
   520
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   521
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   522
 *  \brief Make a window as large as possible.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   523
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   524
 *  \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
   525
 */
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
   526
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
   527
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   528
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   529
 *  \brief Minimize a window to an iconic representation.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   530
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   531
 *  \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
   532
 */
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
   533
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
   534
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   535
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   536
 *  \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
   537
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   538
 *  \sa SDL_MaximizeWindow()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   539
 *  \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
   540
 */
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
   541
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
   542
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   543
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   544
 *  \brief Set a window's fullscreen state.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   545
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   546
 *  \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
   547
 *  
3522
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   548
 *  \sa SDL_SetWindowDisplayMode()
fa1abe1ff8b8 Added related functions
Sam Lantinga <slouken@libsdl.org>
parents: 3500
diff changeset
   549
 *  \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
   550
 */
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
   551
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
   552
                                                    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
   553
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   554
/**
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
   555
 *  \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
   556
 *
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
 *  \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
   558
 *
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
 *  \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
   560
 *
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_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
   562
 *  \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
   563
 */
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
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
   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
/**
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
 *  \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
   568
 *
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
 *  \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
   570
 *
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_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
   572
 *  \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
   573
 */
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
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
   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
/**
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
 *  \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
   578
 *
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
 *  \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
   580
 *
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_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
   582
 *  \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
   583
 */
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
   584
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
   585
                                                         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
   586
                                                         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
   587
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
   588
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   589
 *  \brief Set a window's input grab mode.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   590
 *  
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   591
 *  \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
   592
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   593
 *  \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
   594
 */
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
   595
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
   596
                                               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
   597
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   598
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   599
 *  \brief Get a window's input grab mode.
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   600
 *  
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   601
 *  \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
   602
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   603
 *  \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
   604
 */
5403
424f036f7c68 Use boolean value for input grab mode, like we do for fullscreen mode.
Sam Lantinga <slouken@libsdl.org>
parents: 5380
diff changeset
   605
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
   606
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   607
/**
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   608
 *  \brief Set the brightness (gamma correction) for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   609
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   610
 *  \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
   611
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   612
 *  \sa SDL_GetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   613
 *  \sa SDL_SetWindowGammaRamp()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   614
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   615
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
   616
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   617
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   618
 *  \brief Get the brightness (gamma correction) for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   619
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   620
 *  \return The last brightness value passed to SDL_SetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   621
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   622
 *  \sa SDL_SetWindowBrightness()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   623
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   624
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
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
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   627
 *  \brief Set the gamma ramp for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   628
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   629
 *  \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
   630
 *  \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
   631
 *  \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
   632
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   633
 *  \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
   634
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   635
 *  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
   636
 *  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
   637
 *  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
   638
 *  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
   639
 *  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
   640
 *
5504
469da3d31cbd Fixed related function documentation
Sam Lantinga <slouken@libsdl.org>
parents: 5466
diff changeset
   641
 *  \sa SDL_GetWindowGammaRamp()
5466
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   642
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   643
extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   644
                                                   const Uint16 * red,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   645
                                                   const Uint16 * green,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   646
                                                   const Uint16 * blue);
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
/**
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   649
 *  \brief Get the gamma ramp for a window.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   650
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   651
 *  \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
   652
 *               the translation table for the red channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   653
 *  \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
   654
 *               the translation table for the green channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   655
 *  \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
   656
 *               the translation table for the blue channel, or NULL.
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   657
 *   
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   658
 *  \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
   659
 *  
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   660
 *  \sa SDL_SetWindowGammaRamp()
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   661
 */
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   662
extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   663
                                                   Uint16 * red,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   664
                                                   Uint16 * green,
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   665
                                                   Uint16 * blue);
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   666
006883d5fa51 Gamma support is back!
Sam Lantinga <slouken@libsdl.org>
parents: 5403
diff changeset
   667
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   668
 *  \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
   669
 */
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
   670
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
   671
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   672
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   673
/**
4875
22ce07e8e824 Suspending the screensaver defaults off.
Sam Lantinga <slouken@libsdl.org>
parents: 4869
diff changeset
   674
 *  \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
   675
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   676
 *  \sa SDL_EnableScreenSaver()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   677
 *  \sa SDL_DisableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   678
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
   679
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
   680
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   681
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   682
 *  \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
   683
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   684
 *  \sa SDL_IsScreenSaverEnabled()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   685
 *  \sa SDL_DisableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   686
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
   687
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
   688
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   689
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   690
 *  \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
   691
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   692
 *  \sa SDL_IsScreenSaverEnabled()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   693
 *  \sa SDL_EnableScreenSaver()
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 2990
diff changeset
   694
 */
3033
4e4f47c5f941 Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents: 3025
diff changeset
   695
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
   696
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   697
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   698
/**
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   699
 *  \name OpenGL support functions
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   700
 */
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   701
/*@{*/
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   702
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
   703
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   704
 *  \brief Dynamically load an OpenGL library.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   705
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   706
 *  \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
   707
 *              default OpenGL library.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   708
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   709
 *  \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
   710
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   711
 *  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
   712
 *  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
   713
 *  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
   714
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   715
 *  \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
   716
 *        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
   717
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   718
 *  \sa SDL_GL_GetProcAddress()
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   719
 *  \sa SDL_GL_UnloadLibrary()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   720
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   721
extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   722
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
   723
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   724
 *  \brief Get the address of an OpenGL function.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   725
 */
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
   726
extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   727
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
   728
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   729
 *  \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
   730
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   731
 *  \sa SDL_GL_LoadLibrary()
3057
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   732
 */
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   733
extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   734
089a77aebb7d Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents: 3033
diff changeset
   735
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   736
 *  \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
   737
 *         context.
1926
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   738
 */
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   739
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   740
                                                           *extension);
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   741
307355678142 Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents: 1920
diff changeset
   742
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   743
 *  \brief Set an OpenGL window attribute before window creation.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   744
 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
   745
extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   746
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   747
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   748
 *  \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
   749
 */
1936
83946ee0ff1f Implemented OpenGL support on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 1926
diff changeset
   750
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
   751
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   752
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   753
 *  \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
   754
 *         current.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   755
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   756
 *  \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
   757
 */
3685
64ce267332c6 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents: 3677
diff changeset
   758
extern DECLSPEC 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
   759
                                                           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
   760
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   761
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   762
 *  \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
   763
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   764
 *  \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
   765
 */
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
   766
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
   767
                                               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
   768
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   769
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   770
 *  \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
   771
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   772
 *  \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
   773
 *                  vertical retrace.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   774
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   775
 *  \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
   776
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   777
 *  \sa SDL_GL_GetSwapInterval()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   778
 */
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
   779
extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   780
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
   781
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   782
 *  \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
   783
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   784
 *  \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
   785
 *          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
   786
 *          the swap interval is not supported.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   787
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   788
 *  \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
   789
 */
c121d94672cb SDL 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
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
   791
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   792
/**
4883
511948f4919e Fixed documentation
Sam Lantinga <slouken@libsdl.org>
parents: 4879
diff changeset
   793
 * \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
   794
 *        supported.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   795
 */
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
   796
extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   797
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
   798
/**
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   799
 *  \brief Delete an OpenGL context.
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   800
 *  
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   801
 *  \sa SDL_GL_CreateContext()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   802
 */
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
   803
extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   804
3407
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   805
/*@}*//*OpenGL support functions*/
d3baf5ac4e37 Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
   806
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   807
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   808
/* Ends C function definitions when using C++ */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   809
#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
   810
/* *INDENT-OFF* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   811
}
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
   812
/* *INDENT-ON* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   813
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   814
#include "close_code.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   815
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   816
#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
   817
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
   818
/* vi: set ts=4 sw=4 expandtab: */