annotate include/SDL_video.h @ 1735:8dd28c4ef746 SDL-1.3

SDL_Rect now uses int for position and size. Added a few more rectangle functions. Added a dirty rectangle list implementation.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 07:34:50 +0000
parents f7c667ded87d
children
rev   line source
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
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1020
diff changeset
3 Copyright (C) 1997-2006 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
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
23 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
24 * \file SDL_video.h
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
25 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
26 * Header file for access to the SDL raw framebuffer window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
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"
1358
c71e05b4dc2e More header massaging... works great on Windows. ;-)
Sam Lantinga <slouken@libsdl.org>
parents: 1356
diff changeset
33 #include "SDL_error.h"
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
34 #include "SDL_pixels.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
35 #include "SDL_rwops.h"
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
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
40 /* *INDENT-OFF* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
41 extern "C" {
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
45 /* Transparency definitions: These define alpha as the opacity of a surface */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
46 #define SDL_ALPHA_OPAQUE 255
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
47 #define SDL_ALPHA_TRANSPARENT 0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
48
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
49 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
50 * \struct SDL_Rect
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
51 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
52 * \brief A rectangle, with the origin at the upper left.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
53 */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
54 typedef struct SDL_Rect
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
55 {
1735
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
56 int x, y;
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
57 int w, h;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
58 } SDL_Rect;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
59
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
60 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
61 * \struct SDL_DisplayMode
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
62 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
63 * \brief The structure that defines a display mode
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
64 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
65 * \sa SDL_GetNumDisplayModes()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
66 * \sa SDL_GetDisplayMode()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
67 * \sa SDL_GetDesktopDisplayMode()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
68 * \sa SDL_GetCurrentDisplayMode()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
69 * \sa SDL_GetClosestDisplayMode()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
70 * \sa SDL_SetDisplayMode()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
71 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
72 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
73 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
74 Uint32 format; /**< pixel format */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
75 int w; /**< width */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
76 int h; /**< height */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
77 int refresh_rate; /**< refresh rate (or zero for unspecified) */
1725
98a3207ddde8 Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents: 1724
diff changeset
78 void *driverdata; /**< driver-specific data, initialize to 0 */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
79 } SDL_DisplayMode;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
80
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
81 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
82 * \typedef SDL_WindowID
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
83 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
84 * \brief The type used to identify a window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
85 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
86 * \sa SDL_CreateWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
87 * \sa SDL_CreateWindowFrom()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
88 * \sa SDL_DestroyWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
89 * \sa SDL_GetWindowData()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
90 * \sa SDL_GetWindowFlags()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
91 * \sa SDL_GetWindowGrab()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
92 * \sa SDL_GetWindowPosition()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
93 * \sa SDL_GetWindowSize()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
94 * \sa SDL_GetWindowTitle()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
95 * \sa SDL_HideWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
96 * \sa SDL_MaximizeWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
97 * \sa SDL_MinimizeWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
98 * \sa SDL_RaiseWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
99 * \sa SDL_RestoreWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
100 * \sa SDL_SetWindowData()
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
101 * \sa SDL_SetWindowFullscreen()
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
102 * \sa SDL_SetWindowGrab()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
103 * \sa SDL_SetWindowIcon()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
104 * \sa SDL_SetWindowPosition()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
105 * \sa SDL_SetWindowSize()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
106 * \sa SDL_SetWindowTitle()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
107 * \sa SDL_ShowWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
108 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
109 typedef Uint32 SDL_WindowID;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
110
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
111 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
112 * \enum SDL_WindowFlags
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
113 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
114 * \brief The flags on a window
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
115 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
116 * \sa SDL_GetWindowFlags()
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
117 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
118 typedef enum
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
119 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
120 SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window, implies borderless */
1719
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
121 SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
122 SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
1719
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
123 SDL_WINDOW_BORDERLESS = 0x00000008, /**< no window decoration */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
124 SDL_WINDOW_RESIZABLE = 0x00000010, /**< window can be resized */
1722
5daa04d862f1 Added a userdata parameter for event filters.
Sam Lantinga <slouken@libsdl.org>
parents: 1720
diff changeset
125 SDL_WINDOW_MINIMIZED = 0x00000020, /**< minimized */
5daa04d862f1 Added a userdata parameter for event filters.
Sam Lantinga <slouken@libsdl.org>
parents: 1720
diff changeset
126 SDL_WINDOW_MAXIMIZED = 0x00000040, /**< maximized */
1719
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
127 SDL_WINDOW_INPUT_GRABBED = 0x00000100, /**< window has grabbed input focus */
1734
f7c667ded87d The general code handles restoring video mode/gamma/etc. when the window loses focus.
Sam Lantinga <slouken@libsdl.org>
parents: 1733
diff changeset
128 SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
1719
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
129 SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
130 } SDL_WindowFlags;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
131
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
132 /**
1719
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
133 * \def SDL_WINDOWPOS_UNDEFINED
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
134 * \brief Used to indicate that you don't care what the window position is.
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
135 */
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
136 #define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
137 /**
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
138 * \def SDL_WINDOWPOS_CENTERED
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
139 * \brief Used to indicate that the window position should be centered.
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
140 */
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
141 #define SDL_WINDOWPOS_CENTERED 0x7FFFFFE
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
142
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
143 /**
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
144 * \enum SDL_WindowEventID
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
145 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
146 * \brief Event subtype for window events
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
147 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
148 typedef enum
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
149 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
150 SDL_WINDOWEVENT_NONE, /**< Never used */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
151 SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
152 SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */
1724
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1722
diff changeset
153 SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be redrawn */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
154 SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1,data2 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
155 SDL_WINDOWEVENT_RESIZED, /**< Window size changed to data1xdata2 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
156 SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
157 SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
158 SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size and position */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
159 SDL_WINDOWEVENT_ENTER, /**< The window has gained mouse focus */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
160 SDL_WINDOWEVENT_LEAVE, /**< The window has lost mouse focus */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
161 SDL_WINDOWEVENT_FOCUS_GAINED, /**< The window has gained keyboard focus */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
162 SDL_WINDOWEVENT_FOCUS_LOST, /**< The window has lost keyboard focus */
1724
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1722
diff changeset
163 SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
164 } SDL_WindowEventID;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
165
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
166 /**
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
167 * \enum SDL_RendererFlags
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
168 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
169 * \brief Flags used when initializing a render manager.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
170 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
171 typedef enum
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
172 {
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
173 SDL_Renderer_PresentDiscard = 0x00000001, /**< Present leaves the contents of the backbuffer undefined */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
174 SDL_Renderer_PresentCopy = 0x00000002, /**< Present uses a copy from back buffer to the front buffer */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
175 SDL_Renderer_PresentFlip2 = 0x00000004, /**< Present uses a flip, swapping back buffer and front buffer */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
176 SDL_Renderer_PresentFlip3 = 0x00000008, /**< Present uses a flip, rotating between two back buffers and a front buffer */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
177 SDL_Renderer_PresentVSync = 0x00000010, /**< Present is synchronized with the refresh rate */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
178 SDL_Renderer_RenderTarget = 0x00000020, /**< The renderer can create texture render targets */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
179 SDL_Renderer_Accelerated = 0x00000040, /**< The renderer uses hardware acceleration */
1735
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
180 SDL_Renderer_ = 0x00000080, /**< The renderer uses hardware acceleration */
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
181 SDL_Renderer_Minimal = 0x00000100, /**< The renderer only supports the read/write pixel and present functions */
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
182 } SDL_RendererFlags;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
183
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
184 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
185 * \struct SDL_RendererInfo
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
186 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
187 * \brief Information on the capabilities of a render manager.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
188 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
189 typedef struct SDL_RendererInfo
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
190 {
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
191 const char *name; /**< The name of the renderer */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
192 Uint32 flags; /**< Supported SDL_RendererFlags */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
193 Uint32 blend_modes; /**< A mask of supported blend modes */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
194 Uint32 scale_modes; /**< A mask of supported scale modes */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
195 Uint32 num_texture_formats; /**< The number of available texture formats */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
196 Uint32 texture_formats[32]; /**< The available texture formats */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
197 int max_texture_width; /**< The maximimum texture width */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
198 int max_texture_height; /**< The maximimum texture height */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
199 } SDL_RendererInfo;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
200
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
201 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
202 * \enum SDL_TextureAccess
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
203 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
204 * \brief The access pattern allowed for a texture
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
205 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
206 typedef enum
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
207 {
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
208 SDL_TextureAccess_Render, /**< Unlockable video memory, rendering allowed */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
209 SDL_TextureAccess_Remote, /**< Unlockable video memory */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
210 SDL_TextureAccess_Local, /**< Lockable system memory */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
211 } SDL_TextureAccess;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
212
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
213 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
214 * \enum SDL_TextureBlendMode
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
215 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
216 * \brief The blend mode used in SDL_RenderCopy()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
217 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
218 typedef enum
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
219 {
1676
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
220 SDL_TextureBlendMode_None = 0x00000000, /**< No blending */
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
221 SDL_TextureBlendMode_Mask = 0x00000001, /**< dst = A ? src : dst (alpha is mask) */
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
222 SDL_TextureBlendMode_Blend = 0x00000002, /**< dst = (src * A) + (dst * (1-A)) */
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
223 SDL_TextureBlendMode_Add = 0x00000004, /**< dst = (src * A) + dst */
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
224 SDL_TextureBlendMode_Mod = 0x00000008, /**< dst = src * dst */
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
225 } SDL_TextureBlendMode;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
226
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
227 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
228 * \enum SDL_TextureScaleMode
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
229 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
230 * \brief The scale mode used in SDL_RenderCopy()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
231 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
232 typedef enum
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
233 {
1676
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
234 SDL_TextureScaleMode_None = 0x00000000, /**< No scaling, rectangles must match dimensions */
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
235 SDL_TextureScaleMode_Fast = 0x00000001, /**< Point sampling or equivalent algorithm */
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
236 SDL_TextureScaleMode_Slow = 0x00000002, /**< Linear filtering or equivalent algorithm */
e136f3ffdc1b Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
237 SDL_TextureScaleMode_Best = 0x00000004, /**< Bicubic filtering or equivalent algorithm */
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
238 } SDL_TextureScaleMode;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
239
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
240 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
241 * \typedef SDL_TextureID
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
242 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
243 * \brief An efficient driver-specific representation of pixel data
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
244 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
245 typedef Uint32 SDL_TextureID;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
246
1729
0ef52d56e8bb Fixed compile problems with new OpenGL API.
Sam Lantinga <slouken@libsdl.org>
parents: 1727
diff changeset
247 /**
0ef52d56e8bb Fixed compile problems with new OpenGL API.
Sam Lantinga <slouken@libsdl.org>
parents: 1727
diff changeset
248 * \typedef SDL_GLContext
0ef52d56e8bb Fixed compile problems with new OpenGL API.
Sam Lantinga <slouken@libsdl.org>
parents: 1727
diff changeset
249 *
0ef52d56e8bb Fixed compile problems with new OpenGL API.
Sam Lantinga <slouken@libsdl.org>
parents: 1727
diff changeset
250 * \brief An opaque handle to an OpenGL context.
0ef52d56e8bb Fixed compile problems with new OpenGL API.
Sam Lantinga <slouken@libsdl.org>
parents: 1727
diff changeset
251 */
0ef52d56e8bb Fixed compile problems with new OpenGL API.
Sam Lantinga <slouken@libsdl.org>
parents: 1727
diff changeset
252 typedef void *SDL_GLContext;
0ef52d56e8bb Fixed compile problems with new OpenGL API.
Sam Lantinga <slouken@libsdl.org>
parents: 1727
diff changeset
253
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
254
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
255 /* These are the currently supported flags for the SDL_surface */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
256 /* Used internally (read-only) */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
257 #define SDL_HWSURFACE 0x00000001 /* Surface represents a texture */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
258 #define SDL_PREALLOC 0x00000002 /* Surface uses preallocated memory */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
259 #define SDL_SRCALPHA 0x00000004 /* Blit uses source alpha blending */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
260 #define SDL_SRCCOLORKEY 0x00000008 /* Blit uses a source color key */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
261 #define SDL_RLEACCELOK 0x00000010 /* Private flag */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
262 #define SDL_RLEACCEL 0x00000020 /* Surface is RLE encoded */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
263
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
264 /* Evaluates to true if the surface needs to be locked before access */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
265 #define SDL_MUSTLOCK(S) (((S)->flags & (SDL_HWSURFACE|SDL_RLEACCEL)) != 0)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
266
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
267 /* This structure should be treated as read-only, except for 'pixels',
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
268 which, if not NULL, contains the raw pixel data for the surface.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
269 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
270 typedef struct SDL_Surface
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
271 {
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
272 Uint32 flags; /* Read-only */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
273 SDL_PixelFormat *format; /* Read-only */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
274 int w, h; /* Read-only */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
275 int pitch; /* Read-only */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
276 void *pixels; /* Read-write */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
277
1683
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
278 /* texture associated with the surface, if any */
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
279 SDL_TextureID textureID;
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
280
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
281 /* information needed for surfaces requiring locks */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
282 int locked;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
283 void *lock_data;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
284
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
285 /* clipping information */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
286 SDL_Rect clip_rect; /* Read-only */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
287
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
288 /* info for fast blit mapping to other surfaces */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
289 struct SDL_BlitMap *map; /* Private */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
290
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
291 /* format version, bumped at every change to invalidate blit maps */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
292 unsigned int format_version; /* Private */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
293
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
294 /* Reference count -- used when freeing surface */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
295 int refcount; /* Read-mostly */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
296 } SDL_Surface;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
297
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
298 /* typedef for private surface blitting functions */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
299 typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
300 struct SDL_Surface * dst, SDL_Rect * dstrect);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
301
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
302
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
303 /**
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
304 * \enum SDL_GLattr
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
305 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
306 * \brief OpenGL configuration attributes
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
307 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
308 typedef enum
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
309 {
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
310 SDL_GL_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
311 SDL_GL_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
312 SDL_GL_BLUE_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
313 SDL_GL_ALPHA_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
314 SDL_GL_BUFFER_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
315 SDL_GL_DOUBLEBUFFER,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
316 SDL_GL_DEPTH_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
317 SDL_GL_STENCIL_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
318 SDL_GL_ACCUM_RED_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
319 SDL_GL_ACCUM_GREEN_SIZE,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
320 SDL_GL_ACCUM_BLUE_SIZE,
450
8a43e0cbf02f Added SDL_GL_STEREO for stereoscopic OpenGL contexts
Sam Lantinga <slouken@libsdl.org>
parents: 432
diff changeset
321 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
322 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
323 SDL_GL_MULTISAMPLEBUFFERS,
1656
96c2f89cc7e1 SDL-trunk-1.3-merge-1
Sam Lantinga <slouken@libsdl.org>
parents: 1654
diff changeset
324 SDL_GL_MULTISAMPLESAMPLES,
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
325 SDL_GL_ACCELERATED_VISUAL
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
326 } SDL_GLattr;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
327
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
328
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
329 /* Function prototypes */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
330
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
331 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
332 * \fn int SDL_GetNumVideoDrivers(void)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
333 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
334 * \brief Get the number of video drivers compiled into SDL
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
335 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
336 * \sa SDL_GetVideoDriver()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
337 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
338 extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
339
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
340 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
341 * \fn const char *SDL_GetVideoDriver(int index)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
342 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
343 * \brief Get the name of a built in video driver.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
344 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
345 * \note The video drivers are presented in the order in which they are
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
346 * normally checked during initialization.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
347 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
348 * \sa SDL_GetNumVideoDrivers()
1660
8b9d79e7eacf Added API requested in bug #43:
Sam Lantinga <slouken@libsdl.org>
parents: 1658
diff changeset
349 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
350 extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
1660
8b9d79e7eacf Added API requested in bug #43:
Sam Lantinga <slouken@libsdl.org>
parents: 1658
diff changeset
351
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
352 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
353 * \fn int SDL_VideoInit(const char *driver_name, Uint32 flags)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
354 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
355 * \brief Initialize the video subsystem, optionally specifying a video driver.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
356 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
357 * \param driver_name Initialize a specific driver by name, or NULL for the default video driver.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
358 * \param flags FIXME: Still needed?
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
359 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
360 * \return 0 on success, -1 on error
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
361 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
362 * This function initializes the video subsystem; setting up a connection
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
363 * to the window manager, etc, and determines the available display modes
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
364 * and pixel formats, but does not initialize a window or graphics mode.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
365 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
366 * \sa SDL_VideoQuit()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
367 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
368 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
369 Uint32 flags);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
370
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
371 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
372 * \fn void SDL_VideoQuit(void)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
373 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
374 * \brief Shuts down the video subsystem.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
375 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
376 * This function closes all windows, and restores the original video mode.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
377 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
378 * \sa SDL_VideoInit()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
379 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
380 extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
381
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
382 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
383 * \fn const char *SDL_GetCurrentVideoDriver(void)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
384 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
385 * \brief Returns the name of the currently initialized video driver.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
386 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
387 * \return The name of the current video driver or NULL if no driver
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
388 * has been initialized
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
389 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
390 * \sa SDL_GetNumVideoDrivers()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
391 * \sa SDL_GetVideoDriver()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
392 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
393 extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
394
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
395 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
396 * \fn int SDL_GetNumVideoDisplays(void)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
397 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
398 * \brief Returns the number of available video displays.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
399 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
400 * \sa SDL_SelectVideoDisplay()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
401 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
402 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
403
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
404 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
405 * \fn int SDL_SelectVideoDisplay(int index)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
406 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
407 * \brief Set the index of the currently selected display.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
408 *
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
409 * \return The index of the currently selected display.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
410 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
411 * \note You can query the currently selected display by passing an index of -1.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
412 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
413 * \sa SDL_GetNumVideoDisplays()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
414 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
415 extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
416
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
417 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
418 * \fn int SDL_GetNumDisplayModes(void)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
419 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
420 * \brief Returns the number of available display modes for the current display.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
421 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
422 * \sa SDL_GetDisplayMode()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
423 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
424 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
425
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
426 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
427 * \fn const SDL_DisplayMode *SDL_GetDisplayMode(int index)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
428 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
429 * \brief Retrieve information about a specific display mode.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
430 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
431 * \note The display modes are sorted in this priority:
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
432 * \li bits per pixel -> more colors to fewer colors
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
433 * \li width -> largest to smallest
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
434 * \li height -> largest to smallest
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
435 * \li refresh rate -> highest to lowest
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
436 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
437 * \sa SDL_GetNumDisplayModes()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
438 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
439 extern DECLSPEC const SDL_DisplayMode *SDLCALL SDL_GetDisplayMode(int index);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
440
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
441 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
442 * \fn const SDL_DisplayMode *SDL_GetDesktopDisplayMode(void)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
443 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
444 * \brief Retrieve information about the desktop display mode for the current display.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
445 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
446 extern DECLSPEC const SDL_DisplayMode *SDLCALL
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
447 SDL_GetDesktopDisplayMode(void);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
448
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
449 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
450 * \fn const SDL_DisplayMode *SDL_GetCurrentDisplayMode(void)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
451 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
452 * \brief Retrieve information about the current display mode.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
453 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
454 extern DECLSPEC const SDL_DisplayMode *SDLCALL
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
455 SDL_GetCurrentDisplayMode(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
456
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
457 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
458 * \fn SDL_DisplayMode *SDL_GetClosestDisplayMode(const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
459 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
460 * \brief Get the closest match to the requested display mode.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
461 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
462 * \param mode The desired display mode
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
463 * \param closest A pointer to a display mode to be filled in with the closest match of the available display modes.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
464 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
465 * \return The passed in value 'closest', or NULL if no matching video mode was available.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
466 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
467 * The available display modes are scanned, and 'closest' is filled in with the closest mode matching the requested mode and returned. The mode format and refresh_rate default to the desktop mode if they are 0. The modes are scanned with size being first priority, format being second priority, and finally checking the refresh_rate. If all the available modes are too small, then NULL is returned.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
468 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
469 * \sa SDL_GetNumDisplayModes()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
470 * \sa SDL_GetDisplayMode()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
471 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
472 extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
473 SDL_DisplayMode
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
474 * mode,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
475 SDL_DisplayMode
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
476 * closest);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
477
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
478 /**
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
479 * \fn int SDL_SetFullscreenDisplayMode(const SDL_DisplayMode *mode)
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
480 *
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
481 * \brief Set the display mode used when a fullscreen window is visible
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
482 * on the currently selected display.
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
483 *
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
484 * \param mode The mode to use, or NULL for the desktop mode.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
485 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
486 * \return 0 on success, or -1 if setting the display mode failed.
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
487 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
488 * \sa SDL_SetWindowFullscreen()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
489 */
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
490 extern DECLSPEC int SDLCALL SDL_SetFullscreenDisplayMode(const SDL_DisplayMode
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
491 * mode);
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
492
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
493 /**
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
494 * \fn const SDL_DisplayMode *SDL_GetFullscreenDisplayMode(void)
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
495 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
496 * \brief Query the display mode used when a fullscreen window is visible
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
497 * on the currently selected display.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
498 */
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
499 extern DECLSPEC const SDL_DisplayMode *SDLCALL
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
500 SDL_GetFullscreenDisplayMode(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
501
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
502 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
503 * \fn int SDL_SetDisplayPalette(const SDL_Color *colors, int firstcolor, int ncolors)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
504 *
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
505 * \brief Set the palette entries for indexed display modes.
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
506 *
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
507 * \return 0 on success, or -1 if the display mode isn't palettized or the colors couldn't be set.
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
508 */
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
509 extern DECLSPEC int SDLCALL SDL_SetDisplayPalette(const SDL_Color * colors,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
510 int firstcolor,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
511 int ncolors);
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
512
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
513 /**
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
514 * \fn int SDL_GetDisplayPalette(SDL_Color *colors, int firstcolor, int ncolors)
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
515 *
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
516 * \brief Gets the palette entries for indexed display modes.
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
517 *
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
518 * \return 0 on success, or -1 if the display mode isn't palettized
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
519 */
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
520 extern DECLSPEC int SDLCALL SDL_GetDisplayPalette(SDL_Color * colors,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
521 int firstcolor,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
522 int ncolors);
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
523
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
524 /**
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
525 * \fn int SDL_SetGamma(float red, float green, float blue)
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
526 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
527 * \brief Set the gamma correction for each of the color channels on the currently selected display.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
528 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
529 * \return 0 on success, or -1 if setting the gamma isn't supported.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
530 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
531 * \sa SDL_SetGammaRamp()
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
532 */
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
533 extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
534
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
535 /**
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
536 * \fn int SDL_SetGammaRamp(const Uint16 * red, const Uint16 * green, const Uint16 * blue)
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
537 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
538 * \brief Set the gamma ramp for the currently selected display.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
539 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
540 * \param red The translation table for the red channel, or NULL
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
541 * \param green The translation table for the green channel, or NULL
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
542 * \param blue The translation table for the blue channel, or NULL
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
543 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
544 * \return 0 on success, or -1 if gamma ramps are unsupported.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
545 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
546 * Set the gamma translation table for the red, green, and blue channels
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
547 * of the video hardware. Each table is an array of 256 16-bit quantities,
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
548 * representing a mapping between the input and output for that channel.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
549 * The input is the index into the array, and the output is the 16-bit
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
550 * gamma value at that index, scaled to the output color precision.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
551 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
552 * \sa SDL_GetGammaRamp()
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
553 */
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
554 extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
555 const Uint16 * green,
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
556 const Uint16 * blue);
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
557
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
558 /**
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
559 * \fn int SDL_GetGammaRamp(Uint16 * red, Uint16 * green, Uint16 * blue)
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
560 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
561 * \brief Get the gamma ramp for the currently selected display.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
562 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
563 * \param red A pointer to a 256 element array of 16-bit quantities to hold the translation table for the red channel, or NULL.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
564 * \param green A pointer to a 256 element array of 16-bit quantities to hold the translation table for the green channel, or NULL.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
565 * \param blue A pointer to a 256 element array of 16-bit quantities to hold the translation table for the blue channel, or NULL.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
566 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
567 * \return 0 on success, or -1 if gamma ramps are unsupported.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
568 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
569 * \sa SDL_SetGammaRamp()
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
570 */
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
571 extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
572 Uint16 * blue);
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
573
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
574
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
575 /**
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
576 * \fn SDL_WindowID SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
577 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
578 * \brief Create a window with the specified position, dimensions, and flags.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
579 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
580 * \param title The title of the window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
581 * \param x The x position of the window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
582 * \param y The y position of the window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
583 * \param w The width of the window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
584 * \param h The height of the window
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
585 * \param flags The flags for the window, a mask of any of the following: SDL_WINDOW_FULLSCREEN, SDL_WINDOW_OPENGL, SDL_WINDOW_SHOWN, SDL_WINDOW_BORDERLESS, SDL_WINDOW_RESIZABLE, SDL_WINDOW_MAXIMIZED, SDL_WINDOW_MINIMIZED, SDL_WINDOW_INPUT_GRABBED
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
586 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
587 * \return The id of the window created, or zero if window creation failed.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
588 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
589 * \note Setting the position to -1, -1, indicates any position is fine.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
590 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
591 * \sa SDL_DestroyWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
592 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
593 extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow(const char *title,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
594 int x, int y, int w,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
595 int h, Uint32 flags);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
596
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
597 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
598 * \fn SDL_WindowID SDL_CreateWindowFrom(void *data)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
599 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
600 * \brief Create an SDL window struct from an existing native window.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
601 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
602 * \param data A pointer to driver-dependent window creation data
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
603 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
604 * \return The id of the window created, or zero if window creation failed.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
605 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
606 * \warning This function is NOT SUPPORTED, use at your own risk!
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
607 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
608 * \sa SDL_DestroyWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
609 */
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
610 extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindowFrom(const void *data);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
611
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
612 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
613 * \fn Uint32 SDL_GetWindowFlags(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
614 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
615 * \brief Get the window flags.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
616 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
617 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
618
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
619 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
620 * \fn void SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
621 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
622 * \brief Set the title of the window, in UTF-8 format.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
623 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
624 * \sa SDL_GetWindowTitle()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
625 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
626 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_WindowID windowID,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
627 const char *title);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
628
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
629 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
630 * \fn const char *SDL_GetWindowTitle(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
631 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
632 * \brief Get the title of the window, in UTF-8 format.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
633 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
634 * \sa SDL_SetWindowTitle()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
635 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
636 extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
637
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
638 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
639 * \fn void SDL_SetWindowIcon(SDL_Surface *icon)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
640 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
641 * \brief Set the icon of the window.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
642 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
643 * \param icon The icon for the window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
644 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
645 * FIXME: The icon needs to be set before the window is first shown. Should some icon representation be part of the window creation data?
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
646 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
647 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Surface * icon);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
648
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
649 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
650 * \fn void SDL_SetWindowData(SDL_WindowID windowID, void *userdata)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
651 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
652 * \brief Associate an arbitrary pointer with the window.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
653 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
654 * \sa SDL_GetWindowData()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
655 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
656 extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_WindowID windowID,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
657 void *userdata);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
658
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
659 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
660 * \fn void *SDL_GetWindowData(SDL_WindowID windowID)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
661 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
662 * \brief Retrieve the data pointer associated with the window.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
663 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
664 * \sa SDL_SetWindowData()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
665 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
666 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
667
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
668 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
669 * \fn void SDL_SetWindowPosition(SDL_WindowID windowID, int x, int y)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
670 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
671 * \brief Set the position of the window.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
672 *
1719
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
673 * \param windowID The window to reposition
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
674 * \param x The x coordinate of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
675 * \param y The y coordinate of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
676 *
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
677 * \note The window coordinate origin is the upper left of the display.
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
678 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
679 * \sa SDL_GetWindowPosition()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
680 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
681 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_WindowID windowID,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
682 int x, int y);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
683
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
684 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
685 * \fn void SDL_GetWindowPosition(SDL_WindowID windowID, int *x, int *y)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
686 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
687 * \brief Get the position of the window.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
688 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
689 * \sa SDL_SetWindowPosition()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
690 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
691 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_WindowID windowID,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
692 int *x, int *y);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
693
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
694 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
695 * \fn void SDL_SetWindowSize(SDL_WindowID windowID, int w, int w)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
696 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
697 * \brief Set the size of the window's client area.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
698 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
699 * \note You can't change the size of a fullscreen window, it automatically
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
700 * matches the size of the display mode.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
701 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
702 * \sa SDL_GetWindowSize()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
703 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
704 extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_WindowID windowID, int w,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
705 int h);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
706
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
707 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
708 * \fn void SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *w)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
709 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
710 * \brief Get the size of the window's client area.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
711 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
712 * \sa SDL_SetWindowSize()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
713 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
714 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_WindowID windowID, int *w,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
715 int *h);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
716
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
717 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
718 * \fn void SDL_ShowWindow(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
719 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
720 * \brief Show the window
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
721 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
722 * \sa SDL_HideWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
723 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
724 extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
725
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
726 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
727 * \fn void SDL_HideWindow(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
728 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
729 * \brief Hide the window
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
730 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
731 * \sa SDL_ShowWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
732 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
733 extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
734
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
735 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
736 * \fn void SDL_RaiseWindow(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
737 *
1734
f7c667ded87d The general code handles restoring video mode/gamma/etc. when the window loses focus.
Sam Lantinga <slouken@libsdl.org>
parents: 1733
diff changeset
738 * \brief Raise the window above other windows and set the input focus.
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
739 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
740 extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
741
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
742 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
743 * \fn void SDL_MaximizeWindow(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
744 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
745 * \brief Make the window as large as possible.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
746 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
747 * \sa SDL_RestoreWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
748 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
749 extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
750
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
751 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
752 * \fn void SDL_MinimizeWindow(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
753 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
754 * \brief Minimize the window to an iconic representation.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
755 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
756 * \sa SDL_RestoreWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
757 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
758 extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
759
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
760 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
761 * \fn void SDL_RestoreWindow(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
762 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
763 * \brief Restore the size and position of a minimized or maximized window.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
764 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
765 * \sa SDL_MaximizeWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
766 * \sa SDL_MinimizeWindow()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
767 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
768 extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
769
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
770 /**
1733
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
771 * \fn int SDL_SetWindowFullscreen(SDL_WindowID windowID, int fullscreen)
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
772 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
773 * \brief Set the window's fullscreen state.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
774 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
775 * \return 0 on success, or -1 if setting the display mode failed.
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
776 *
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
777 * \sa SDL_SetFullscreenDisplayMode()
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
778 */
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
779 extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_WindowID windowID,
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
780 int fullscreen);
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
781
0b1070f2f94d Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents: 1729
diff changeset
782 /**
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
783 * \fn void SDL_SetWindowGrab(SDL_WindowID windowID, int mode)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
784 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
785 * \brief Set the window's input grab mode.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
786 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
787 * \param mode This is 1 to grab input, and 0 to release input.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
788 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
789 * \sa SDL_GetWindowGrab()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
790 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
791 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_WindowID windowID,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
792 int mode);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
793
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
794 /**
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
795 * \fn int SDL_GetWindowGrab(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
796 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
797 * \brief Get the window's input grab mode.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
798 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
799 * \return This returns 1 if input is grabbed, and 0 otherwise.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
800 *
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
801 * \sa SDL_SetWindowGrab()
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
802 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
803 extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
804
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
805 /**
1720
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
806 * \fn SDL_bool SDL_GetWindowWMInfo(SDL_WindowID windowID, struct SDL_SysWMinfo * info)
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
807 *
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
808 * \brief Get driver specific information about a window.
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
809 *
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
810 * \note Include SDL_syswm.h for the declaration of SDL_SysWMinfo.
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
811 */
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
812 struct SDL_SysWMinfo;
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
813 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_WindowID windowID,
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
814 struct SDL_SysWMinfo
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
815 *info);
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
816
a1ebb17f9c52 Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents: 1719
diff changeset
817 /**
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
818 * \fn void SDL_DestroyWindow(SDL_WindowID windowID)
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
819 *
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
820 * \brief Destroy a window.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
821 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
822 extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_WindowID windowID);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
823
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
824 /**
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
825 * \fn int SDL_GetNumRenderers(void)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
826 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
827 * \brief Get the number of render managers on the current display.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
828 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
829 * A render manager is a set of code that handles rendering and texture
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
830 * management on a particular display. Normally there is only one, but
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
831 * some drivers may have several available with different capabilities.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
832 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
833 * \sa SDL_GetRendererInfo()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
834 * \sa SDL_CreateRenderer()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
835 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
836 extern DECLSPEC int SDLCALL SDL_GetNumRenderers(void);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
837
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
838 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
839 * \fn SDL_RendererInfo *SDL_GetRendererInfo(int index)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
840 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
841 * \brief Get information about a specific render manager on the current
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
842 * display.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
843 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
844 * \sa SDL_CreateRenderer()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
845 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
846 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(int index,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
847 SDL_RendererInfo * info);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
848
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
849 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
850 * \fn int SDL_CreateRenderer(SDL_WindowID window, int index, Uint32 flags)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
851 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
852 * \brief Create and make active a 2D rendering context for a window.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
853 *
1719
5b9f50c957ed You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents: 1707
diff changeset
854 * \param windowID The window used for rendering
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
855 * \param index The index of the render manager to initialize, or -1 to initialize the first one supporting the requested flags.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
856 * \param flags SDL_RendererFlags
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
857 *
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
858 * \return 0 on success, -1 if the flags were not supported, or -2 if
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
859 * there isn't enough memory to support the requested flags
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
860 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
861 * \sa SDL_SelectRenderer()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
862 * \sa SDL_DestroyRenderer()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
863 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
864 extern DECLSPEC int SDLCALL SDL_CreateRenderer(SDL_WindowID windowID,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
865 int index, Uint32 flags);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
866
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
867 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
868 * \fn int SDL_SelectRenderer(SDL_WindowID windowID)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
869 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
870 * \brief Select the rendering context for a particular window.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
871 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
872 * \return 0 on success, -1 if the selected window doesn't have a
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
873 * rendering context.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
874 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
875 extern DECLSPEC int SDLCALL SDL_SelectRenderer(SDL_WindowID windowID);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
876
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
877 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
878 * \fn SDL_TextureID SDL_CreateTexture(Uint32 format, int access, int w, int h)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
879 *
1706
1577404809f0 Added a multi-window version of testsprite using the new API.
Sam Lantinga <slouken@libsdl.org>
parents: 1683
diff changeset
880 * \brief Create a texture for the current rendering context.
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
881 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
882 * \param format The format of the texture
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
883 * \param access One of the enumerated values in SDL_TextureAccess
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
884 * \param w The width of the texture in pixels
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
885 * \param h The height of the texture in pixels
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
886 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
887 * \return The created texture is returned, or 0 if no render manager was active, the format was unsupported, or the width or height were out of range.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
888 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
889 * \sa SDL_QueryTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
890 * \sa SDL_DestroyTexture()
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
891 */
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
892 extern DECLSPEC SDL_TextureID SDLCALL SDL_CreateTexture(Uint32 format,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
893 int access, int w,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
894 int h);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
895
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
896 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
897 * \fn SDL_TextureID SDL_CreateTextureFromSurface(Uint32 format, int access, SDL_Surface *surface)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
898 *
1678
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
899 * \brief Create a texture from an existing surface.
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
900 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
901 * \param format The format of the texture, or 0 to pick an appropriate format
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
902 * \param access One of the enumerated values in SDL_TextureAccess
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
903 * \param surface The surface containing pixel data used to fill the texture
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
904 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
905 * \return The created texture is returned, or 0 if no render manager was active, the format was unsupported, or the surface width or height were out of range.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
906 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
907 * \note The surface is not modified or freed by this function.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
908 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
909 * \sa SDL_QueryTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
910 * \sa SDL_DestroyTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
911 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
912 extern DECLSPEC SDL_TextureID SDLCALL SDL_CreateTextureFromSurface(Uint32
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
913 format,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
914 int access,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
915 SDL_Surface
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
916 * surface);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
917
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
918 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
919 * \fn int SDL_QueryTexture(SDL_TextureID textureID, Uint32 *format, int *access, int *w, int *h)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
920 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
921 * \brief Query the attributes of a texture
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
922 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
923 * \param texture A texture to be queried
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
924 * \param format A pointer filled in with the raw format of the texture. The actual format may differ, but pixel transfers will use this format.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
925 * \param access A pointer filled in with the actual access to the texture.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
926 * \param w A pointer filled in with the width of the texture in pixels
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
927 * \param h A pointer filled in with the height of the texture in pixels
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
928 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
929 * \return 0 on success, or -1 if the texture is not valid
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
930 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
931 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_TextureID textureID,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
932 Uint32 * format, int *access,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
933 int *w, int *h);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
934
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
935 /**
1678
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
936 * \fn int SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int pitch)
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
937 *
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
938 * \brief Query the pixels of a texture, if the texture does not need to be locked for pixel access.
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
939 *
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
940 * \param texture A texture to be queried, which was created with SDL_TextureAccess_Local
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
941 * \param pixels A pointer filled with a pointer to the pixels for the texture
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
942 * \param pitch A pointer filled in with the pitch of the pixel data
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
943 *
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
944 * \return 0 on success, or -1 if the texture is not valid, or must be locked for pixel access.
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
945 */
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
946 extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_TextureID textureID,
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
947 void **pixels, int *pitch);
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
948
90bf530ced8e SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents: 1676
diff changeset
949 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
950 * \fn int SDL_SetTexturePalette(SDL_TextureID textureID, const SDL_Color * colors, int firstcolor, int ncolors)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
951 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
952 * \brief Update an indexed texture with a color palette
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
953 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
954 * \param texture The texture to update
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
955 * \param colors The array of RGB color data
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
956 * \param firstcolor The first index to update
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
957 * \param ncolors The number of palette entries to fill with the color data
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
958 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
959 * \return 0 on success, or -1 if the texture is not valid or not an indexed texture
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
960 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
961 extern DECLSPEC int SDLCALL SDL_SetTexturePalette(SDL_TextureID textureID,
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
962 const SDL_Color * colors,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
963 int firstcolor,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
964 int ncolors);
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
965
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
966 /**
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
967 * \fn int SDL_GetTexturePalette(SDL_TextureID textureID, SDL_Color * colors, int firstcolor, int ncolors)
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
968 *
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
969 * \brief Update an indexed texture with a color palette
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
970 *
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
971 * \param texture The texture to update
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
972 * \param colors The array to fill with RGB color data
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
973 * \param firstcolor The first index to retrieve
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
974 * \param ncolors The number of palette entries to retrieve
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
975 *
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
976 * \return 0 on success, or -1 if the texture is not valid or not an indexed texture
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
977 */
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
978 extern DECLSPEC int SDLCALL SDL_GetTexturePalette(SDL_TextureID textureID,
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
979 SDL_Color * colors,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
980 int firstcolor,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
981 int ncolors);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
982
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
983 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
984 * \fn int SDL_UpdateTexture(SDL_TextureID textureID, const SDL_Rect *rect, const void *pixels, int pitch)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
985 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
986 * \brief Update the given texture rectangle with new pixel data.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
987 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
988 * \param texture The texture to update
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
989 * \param rect A pointer to the rectangle of pixels to update, or NULL to update the entire texture.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
990 * \param pixels The raw pixel data
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
991 * \param pitch The number of bytes between rows of pixel data
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
992 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
993 * \return 0 on success, or -1 if the texture is not valid
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
994 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
995 * \note This is a very slow function for textures not created with SDL_TextureAccess_Local.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
996 */
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
997 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_TextureID textureID,
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
998 const SDL_Rect * rect,
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
999 const void *pixels, int pitch);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1001 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1002 * \fn void SDL_LockTexture(SDL_TextureID textureID, const SDL_Rect *rect, int markDirty, void **pixels, int *pitch)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1003 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1004 * \brief Lock a portion of the texture for pixel access.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1005 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1006 * \param texture The texture to lock for access, which must have been created with SDL_TextureAccess_Local.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1007 * \param rect A pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1008 * \param markDirty If this is nonzero, the locked area will be marked dirty when the texture is unlocked.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1009 * \param pixels This is filled in with a pointer to the locked pixels, appropriately offset by the locked area.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1010 * \param pitch This is filled in with the pitch of the locked pixels.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1011 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1012 * \return 0 on success, or -1 if the texture is not valid or was created with SDL_TextureAccess_Remote
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1013 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1014 * \sa SDL_DirtyTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1015 * \sa SDL_UnlockTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1016 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1017 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_TextureID textureID,
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1018 const SDL_Rect * rect,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1019 int markDirty, void **pixels,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1020 int *pitch);
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1021
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1022 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1023 * \fn void SDL_UnlockTexture(SDL_TextureID textureID)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1024 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1025 * \brief Unlock a texture, uploading the changes to video memory, if needed.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1026 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1027 * \sa SDL_LockTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1028 * \sa SDL_DirtyTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1029 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1030 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_TextureID textureID);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1031
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1032 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1033 * \fn void SDL_DirtyTexture(SDL_TextureID textureID, int numrects, const SDL_Rect * rects)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1034 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1035 * \brief Mark the specified rectangles of the texture as dirty.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1036 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1037 * \note The texture must have been created with SDL_TextureAccess_Local.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1038 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1039 * \sa SDL_LockTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1040 * \sa SDL_UnlockTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1041 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1042 extern DECLSPEC void SDLCALL SDL_DirtyTexture(SDL_TextureID textureID,
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1043 int numrects,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1044 const SDL_Rect * rects);
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1045
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1046 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1047 * \fn void SDL_SelectRenderTexture(SDL_TextureID textureID)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1048 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1049 * \brief Select a texture as the rendering target, or 0 to reselect the current window.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1050 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1051 * \note The texture must have been created with SDL_TextureAccess_Render.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1052 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1053 extern DECLSPEC void SDLCALL SDL_SelectRenderTexture(SDL_TextureID textureID);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1054
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1055 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1056 * \fn void SDL_RenderFill(const SDL_Rect *rect, Uint32 color)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1057 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1058 * \brief Fill the current rendering target with the specified color.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1059 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1060 * \param rect A pointer to the destination rectangle, or NULL for the entire rendering target.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1061 * \param color An ARGB color value.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1062 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1063 * \return 0 on success, or -1 if there is no renderer current
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1064 */
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1065 extern DECLSPEC int SDLCALL SDL_RenderFill(const SDL_Rect * rect,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1066 Uint32 color);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1067
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1068 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1069 * \fn int SDL_RenderCopy(SDL_TextureID textureID, const SDL_Rect *srcrect, const SDL_Rect *dstrect, Uint32 blendMode, Uint32 scaleMode)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1070 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1071 * \brief Copy a portion of the texture to the current rendering target.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1072 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1073 * \param texture The source texture.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1074 * \param srcrect A pointer to the source rectangle, or NULL for the entire texture.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1075 * \param dstrect A pointer to the destination rectangle, or NULL for the entire rendering target.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1076 * \param blendMode SDL_TextureBlendMode to be used if the source texture has an alpha channel.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1077 * \param scaleMode SDL_TextureScaleMode to be used if the source and destination rectangles don't have the same width and height.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1078 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1079 * \return 0 on success, or -1 if there is no renderer current, or the driver doesn't support the requested operation.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1080 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1081 * \note You can check the video driver info to see what operations are supported.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1082 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1083 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_TextureID textureID,
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1084 const SDL_Rect * srcrect,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1085 const SDL_Rect * dstrect,
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1086 int blendMode, int scaleMode);
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1087
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1088 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1089 * \fn int SDL_RenderReadPixels(const SDL_Rect *rect, void *pixels, int pitch)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1090 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1091 * \brief Read pixels from the current rendering target.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1092 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1093 * \param rect A pointer to the rectangle to read, or NULL for the entire render target
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1094 * \param pixels A pointer to be filled in with the pixel data
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1095 * \param pitch The pitch of the pixels parameter
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1096 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1097 * \return 0 on success, or -1 if pixel reading is not supported.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1098 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1099 * \warning This is a very slow operation, and should not be used frequently.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1100 */
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1101 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1102 void *pixels, int pitch);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1103
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1104 /**
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1105 * \fn int SDL_RenderWritePixels(const SDL_Rect *rect, const void *pixels, int pitch)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1106 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1107 * \brief Write pixels to the current rendering target.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1108 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1109 * \param rect A pointer to the rectangle to write, or NULL for the entire render target
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1110 * \param pixels A pointer to the pixel data to write
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1111 * \param pitch The pitch of the pixels parameter
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1112 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1113 * \return 0 on success, or -1 if pixel writing is not supported.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1114 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1115 * \warning This is a very slow operation, and should not be used frequently.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1116 */
1681
80a5e6a4e1e2 Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents: 1678
diff changeset
1117 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect,
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1118 const void *pixels,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1119 int pitch);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1120
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1121 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1122 * \fn void SDL_RenderPresent(void)
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1123 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1124 * \brief Update the screen with rendering performed.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1125 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1126 extern DECLSPEC void SDLCALL SDL_RenderPresent(void);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1127
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1128 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1129 * \fn void SDL_DestroyTexture(SDL_TextureID textureID);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1130 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1131 * \brief Destroy the specified texture.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1132 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1133 * \sa SDL_CreateTexture()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1134 * \sa SDL_CreateTextureFromSurface()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1135 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1136 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_TextureID textureID);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1137
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1138 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1139 * \fn void SDL_DestroyRenderer(SDL_WindowID windowID);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1140 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1141 * \brief Destroy the rendering context for a window and free associated
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1142 * textures.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1143 *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1144 * \sa SDL_CreateRenderer()
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1145 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1146 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_WindowID windowID);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1147
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1148 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1149 * Maps an RGB triple to an opaque pixel value for a given pixel format
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1150 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
1151 extern DECLSPEC Uint32 SDLCALL SDL_MapRGB
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1152 (SDL_PixelFormat * format, Uint8 r, Uint8 g, Uint8 b);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1153
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1154 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1155 * Maps an RGBA quadruple to a pixel value for a given pixel format
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1156 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1157 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(SDL_PixelFormat * format,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1158 Uint8 r, Uint8 g, Uint8 b,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1159 Uint8 a);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1160
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1161 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1162 * Maps a pixel value into the RGB components for a given pixel format
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1163 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1164 extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, SDL_PixelFormat * fmt,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1165 Uint8 * r, Uint8 * g, Uint8 * b);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1166
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1167 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1168 * Maps a pixel value into the RGBA components for a given pixel format
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1169 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1170 extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat * fmt,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1171 Uint8 * r, Uint8 * g, Uint8 * b,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1172 Uint8 * a);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1173
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1174 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1175 * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1176 * If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1177 * If the depth is greater than 8 bits, the pixel format is set using the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1178 * flags '[RGB]mask'.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1179 * If the function runs out of memory, it will return NULL.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1180 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1181 * The 'flags' tell what kind of surface to create.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1182 * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits.
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1183 * SDL_SRCALPHA means that the surface will be used for alpha blits.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1184 */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1185 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1186 (Uint32 flags, int width, int height, int depth,
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1187 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1188 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1189 int width,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1190 int height,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1191 int depth,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1192 int pitch,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1193 Uint32 Rmask,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1194 Uint32 Gmask,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1195 Uint32 Bmask,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1196 Uint32 Amask);
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1197 extern DECLSPEC SDL_Surface *SDLCALL
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1198 SDL_CreateRGBSurfaceFromTexture(SDL_TextureID textureID);
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1199 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1200
1683
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1201 /**
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1202 * \fn int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1203 *
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1204 * \brief Set the palette used by a surface.
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1205 *
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1206 * \return 0, or -1 if the surface format doesn't use a palette.
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1207 *
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1208 * \note A single palette can be shared with many surfaces.
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1209 */
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1210 extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1211 SDL_Palette * palette);
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
1212
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1213 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1214 * SDL_LockSurface() sets up a surface for directly accessing the pixels.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1215 * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1216 * to and read from 'surface->pixels', using the pixel format stored in
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1217 * 'surface->format'. Once you are done accessing the surface, you should
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1218 * use SDL_UnlockSurface() to release it.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1219 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1220 * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1221 * to 0, then you can read and write to the surface at any time, and the
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1222 * pixel format of the surface will not change.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1223 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1224 * No operating system or library calls should be made between lock/unlock
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1225 * pairs, as critical system locks may be held during this time.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1226 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1227 * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1228 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1229 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1230 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1231
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1232 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1233 * Load a surface from a seekable SDL data source (memory or file.)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1234 * If 'freesrc' is non-zero, the source will be closed after being read.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1235 * Returns the new surface, or NULL if there was an error.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1236 * The new surface should be freed with SDL_FreeSurface().
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1237 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1238 extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1239 int freesrc);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1240
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1241 /* Convenience macro -- load a surface from a file */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1242 #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1243
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1244 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1245 * Save a surface to a seekable SDL data source (memory or file.)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1246 * If 'freedst' is non-zero, the source will be closed after being written.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1247 * Returns 0 if successful or -1 if there was an error.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1248 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
1249 extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1250 (SDL_Surface * surface, SDL_RWops * dst, int freedst);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1251
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1252 /* Convenience macro -- save a surface to a file */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1253 #define SDL_SaveBMP(surface, file) \
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1254 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1255
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1256 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1257 * Sets the color key (transparent pixel) in a blittable surface.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1258 * If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL),
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1259 * 'key' will be the transparent pixel in the source image of a blit.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1260 * SDL_RLEACCEL requests RLE acceleration for the surface if present,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1261 * and removes RLE acceleration if absent.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1262 * If 'flag' is 0, this function clears any current color key.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1263 * This function returns 0, or -1 if there was an error.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1264 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
1265 extern DECLSPEC int SDLCALL SDL_SetColorKey
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1266 (SDL_Surface * surface, Uint32 flag, Uint32 key);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1267
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1268 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1269 * This function sets the alpha value for the entire surface, as opposed to
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1270 * using the alpha component of each pixel. This value measures the range
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1271 * of transparency of the surface, 0 being completely transparent to 255
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1272 * being completely opaque. An 'alpha' value of 255 causes blits to be
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1273 * opaque, the source pixels copied to the destination (the default). Note
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1274 * that per-surface alpha can be combined with colorkey transparency.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1275 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1276 * If 'flag' is 0, alpha blending is disabled for the surface.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1277 * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1278 * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1279 * surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed.
432
80a35d43a58f *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 431
diff changeset
1280 *
80a35d43a58f *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 431
diff changeset
1281 * The 'alpha' parameter is ignored for surfaces that have an alpha channel.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1282 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1283 extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface * surface, Uint32 flag,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1284 Uint8 alpha);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1285
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1286 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1287 * Sets the clipping rectangle for the destination surface in a blit.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1288 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1289 * If the clip rectangle is NULL, clipping will be disabled.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1290 * If the clip rectangle doesn't intersect the surface, the function will
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1291 * return SDL_FALSE and blits will be completely clipped. Otherwise the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1292 * function returns SDL_TRUE and blits to the surface will be clipped to
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1293 * the intersection of the surface area and the clipping rectangle.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1294 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1295 * Note that blits are automatically clipped to the edges of the source
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1296 * and destination surfaces.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1297 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1298 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1299 const SDL_Rect * rect);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1300
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1301 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1302 * Gets the clipping rectangle for the destination surface in a blit.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1303 * 'rect' must be a pointer to a valid rectangle which will be filled
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1304 * with the correct values.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1305 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1306 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1307 SDL_Rect * rect);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1308
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1309 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1310 * Creates a new surface of the specified format, and then copies and maps
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1311 * the given surface to it so the blit of the converted surface will be as
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1312 * fast as possible. If this function fails, it returns NULL.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1313 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1314 * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1315 * semantics. You can also pass SDL_RLEACCEL in the flags parameter and
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1316 * SDL will try to RLE accelerate colorkey and alpha blits in the resulting
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1317 * surface.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1318 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1319 * This function is used internally by SDL_DisplayFormat().
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1320 */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1321 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1322 (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1323
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1324 /*
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1325 * This function performs a fast fill of the given rectangle with 'color'
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1326 * The given rectangle is clipped to the destination surface clip area
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1327 * and the final fill rectangle is saved in the passed in pointer.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1328 * If 'dstrect' is NULL, the whole surface will be filled with 'color'
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1329 * The color should be a pixel of the format used by the surface, and
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1330 * can be generated by the SDL_MapRGB() function.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1331 * This function returns 0 on success, or -1 on error.
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1332 */
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1333 extern DECLSPEC int SDLCALL SDL_FillRect
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1334 (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1335
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1336 /*
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1337 * This performs a fast blit from the source surface to the destination
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1338 * surface. It assumes that the source and destination rectangles are
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1339 * the same size. If either 'srcrect' or 'dstrect' are NULL, the entire
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1340 * surface (src or dst) is copied. The final blit rectangles are saved
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1341 * in 'srcrect' and 'dstrect' after all clipping is performed.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1342 * If the blit is successful, it returns 0, otherwise it returns -1.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1343 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1344 * The blit function should not be called on a locked surface.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1345 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1346 * The blit semantics for surfaces with and without alpha and colorkey
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1347 * are defined as follows:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1348 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1349 * RGBA->RGB:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1350 * SDL_SRCALPHA set:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1351 * alpha-blend (using alpha-channel).
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1352 * SDL_SRCCOLORKEY ignored.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1353 * SDL_SRCALPHA not set:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1354 * copy RGB.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1355 * if SDL_SRCCOLORKEY set, only copy the pixels matching the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1356 * RGB values of the source colour key, ignoring alpha in the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1357 * comparison.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1358 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1359 * RGB->RGBA:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1360 * SDL_SRCALPHA set:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1361 * alpha-blend (using the source per-surface alpha value);
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1362 * set destination alpha to opaque.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1363 * SDL_SRCALPHA not set:
431
41cadcba32e8 Fixed SDL_DisplayFormatAlpha() on RGB surfaces with alpha
Sam Lantinga <slouken@libsdl.org>
parents: 337
diff changeset
1364 * copy RGB, set destination alpha to source per-surface alpha value.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1365 * both:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1366 * if SDL_SRCCOLORKEY set, only copy the pixels matching the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1367 * source colour key.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1368 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1369 * RGBA->RGBA:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1370 * SDL_SRCALPHA set:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1371 * alpha-blend (using the source alpha channel) the RGB values;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1372 * leave destination alpha untouched. [Note: is this correct?]
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1373 * SDL_SRCCOLORKEY ignored.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1374 * SDL_SRCALPHA not set:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1375 * copy all of RGBA to the destination.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1376 * if SDL_SRCCOLORKEY set, only copy the pixels matching the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1377 * RGB values of the source colour key, ignoring alpha in the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1378 * comparison.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1379 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1380 * RGB->RGB:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1381 * SDL_SRCALPHA set:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1382 * alpha-blend (using the source per-surface alpha value).
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1383 * SDL_SRCALPHA not set:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1384 * copy RGB.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1385 * both:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1386 * if SDL_SRCCOLORKEY set, only copy the pixels matching the
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1387 * source colour key.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1388 *
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1389 * If either of the surfaces were in video memory, and the blit returns -2,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1390 * the video memory was lost, so it should be reloaded with artwork and
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1391 * re-blitted:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1392 while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1393 while ( SDL_LockSurface(image) < 0 )
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1394 Sleep(10);
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1395 -- Write image pixels to image->pixels --
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1396 SDL_UnlockSurface(image);
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1397 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1398 * This happens under DirectX 5.0 when the system switches away from your
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1399 * fullscreen application. The lock will also fail until you have access
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1400 * to the video memory again.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1401 */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1402 /* You should call SDL_BlitSurface() unless you know exactly how SDL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1403 blitting works internally and how to use the other blit functions.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1404 */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1405 #define SDL_BlitSurface SDL_UpperBlit
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1406
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1407 /* This is the public blit function, SDL_BlitSurface(), and it performs
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1408 rectangle validation and clipping before passing it to SDL_LowerBlit()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1409 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
1410 extern DECLSPEC int SDLCALL SDL_UpperBlit
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1411 (SDL_Surface * src, SDL_Rect * srcrect,
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1412 SDL_Surface * dst, SDL_Rect * dstrect);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1413 /* This is a semi-private blit function and it performs low-level surface
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1414 blitting only.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1415 */
337
9154ec9ca3d2 Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents: 297
diff changeset
1416 extern DECLSPEC int SDLCALL SDL_LowerBlit
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1417 (SDL_Surface * src, SDL_Rect * srcrect,
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1418 SDL_Surface * dst, SDL_Rect * dstrect);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1419
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1420 /**
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1421 * \fn int SDL_SoftStretch(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1422 *
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1423 * \brief Perform a fast, low quality, stretch blit between two surfaces of the same pixel format.
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1424 *
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1425 * \note This function uses a static buffer, and is not thread-safe.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1426 */
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1427 extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1428 SDL_Rect * srcrect,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1429 SDL_Surface * dst,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
1430 SDL_Rect * dstrect);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1431
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1432 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1433 /* OpenGL support functions. */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1434 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1435
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1436 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1437 * \fn int SDL_GL_LoadLibrary(const char *path)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1438 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1439 * \brief Dynamically load an OpenGL library.
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1440 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1441 * \param path The platform dependent OpenGL library name, or NULL to open the default OpenGL library
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1442 *
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1443 * \return 0 on success, or -1 if the library couldn't be loaded
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1444 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1445 * \note If you do this, you need to retrieve all of the GL functions used in
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1446 * your program from the dynamic library using SDL_GL_GetProcAddress().
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1447 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1448 * \sa SDL_GL_GetProcAddress()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1449 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1450 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1451
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1452 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1453 * \fn void *SDL_GL_GetProcAddress(const char *proc)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1454 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1455 * \brief Get the address of an OpenGL function.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1456 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1457 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1458
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1459 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1460 * \fn int SDL_GL_SetAttribute(SDL_GLattr attr, int value)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1461 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1462 * \brief Set an OpenGL window attribute before window creation.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1463 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1464 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1465
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1466 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1467 * \fn int SDL_GL_GetWindowAttribute(SDL_WindowID windowID, SDL_GLattr attr, int *value)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1468 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1469 * \brief Get the actual value for an OpenGL window attribute.
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1470 */
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1471 extern DECLSPEC int SDLCALL SDL_GL_GetWindowAttribute(SDL_WindowID windowID,
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1472 SDL_GLattr attr,
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1473 int *value);
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1474
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1475 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1476 * \fn SDL_GLContext SDL_GL_CreateContext(SDL_WindowID windowID)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1477 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1478 * \brief Create an OpenGL context for use with an OpenGL window, and make it current.
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1479 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1480 * \sa SDL_GL_DeleteContext()
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1481 */
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1482 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_WindowID
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1483 windowID);
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1484
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1485 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1486 * \fn int SDL_GL_MakeCurrent(SDL_WindowID windowID, SDL_GLContext context)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1487 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1488 * \brief Set up an OpenGL context for rendering into an OpenGL window.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1489 *
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1490 * \note The context must have been created with a compatible window.
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1491 */
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1492 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_WindowID windowID,
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1493 SDL_GLContext context);
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1494
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1495 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1496 * \fn int SDL_GL_SetSwapInterval(int interval)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1497 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1498 * \brief Set the swap interval for the current OpenGL context.
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1499 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1500 * \sa SDL_GL_GetSwapInterval()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1501 */
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1502 extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1503
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1504 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1505 * \fn int SDL_GL_GetSwapInterval(void)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1506 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1507 * \brief Get the swap interval for the current OpenGL context.
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1508 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1509 * \sa SDL_GL_SetSwapInterval()
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1510 */
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1511 extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1512
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1513 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1514 * \fn void SDL_GL_SwapBuffers(void)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1515 *
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1516 * Swap the OpenGL buffers, if double-buffering is supported.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1517 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
1518 extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1519
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1520 /**
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1521 * \fn void SDL_GL_DeleteContext(SDL_GLContext context)
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1522 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1523 * \brief Delete an OpenGL context.
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1524 *
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1525 * \sa SDL_GL_CreateContext()
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1526 */
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1527 extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1725
diff changeset
1528
1735
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1529 /**
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1530 * \def SDL_RectEmpty()
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1531 *
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1532 * \brief Returns true if the rectangle has no area.
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1533 */
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1534 #define SDL_RectEmpty(X) (((X)->w <= 0) || ((X)->h <= 0))
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1535
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1536 /**
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1537 * \def SDL_RectEquals()
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1538 *
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1539 * \brief Returns true if the two rectangles are equal.
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1540 */
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1541 #define SDL_RectEquals(A, B) (((A)->x == (B)->x) && ((A)->y == (B)->y) && \
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1542 ((A)->w == (B)->w) && ((A)->h == (B)->h))
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1543
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1544 /**
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1545 * \fn SDL_bool SDL_HasIntersection(const SDL_Rect * A, const SDL_Rect * B);
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1546 *
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1547 * \brief Determine whether two rectangles intersect.
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1548 *
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1549 * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1550 */
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1551 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1552 const SDL_Rect * B);
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1553
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1554 /**
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1555 * \fn SDL_bool SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1556 *
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1557 * \brief Calculate the intersection of two rectangles.
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1558 *
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1559 * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
1724
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1722
diff changeset
1560 */
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1722
diff changeset
1561 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1722
diff changeset
1562 const SDL_Rect * B,
1735
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1563 SDL_Rect * result);
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1564
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1565 /**
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1566 * \fn void SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1567 *
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1568 * \brief Calculate the union of two rectangles
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1569 */
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1570 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1571 const SDL_Rect * B,
8dd28c4ef746 SDL_Rect now uses int for position and size.
Sam Lantinga <slouken@libsdl.org>
parents: 1734
diff changeset
1572 SDL_Rect * result);
1724
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1722
diff changeset
1573
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1574 /* Ends C function definitions when using C++ */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1575 #ifdef __cplusplus
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1576 /* *INDENT-OFF* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1577 }
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1578 /* *INDENT-ON* */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1579 #endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1580 #include "close_code.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1581
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1582 #endif /* _SDL_video_h */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1583
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1660
diff changeset
1584 /* vi: set ts=4 sw=4 expandtab: */