Mercurial > sdl-ios-xcode
annotate include/SDL_video.h @ 1719:5b9f50c957ed SDL-1.3
You can now create multiple windows on Win32
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 28 Jun 2006 08:12:07 +0000 |
parents | 57ce47f033a5 |
children | a1ebb17f9c52 |
rev | line source |
---|---|
0 | 1 /* |
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 | 4 |
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 | 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 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
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 | 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 | 18 |
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 | 21 */ |
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 | 28 |
29 #ifndef _SDL_video_h | |
30 #define _SDL_video_h | |
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 | 35 #include "SDL_rwops.h" |
36 | |
37 #include "begin_code.h" | |
38 /* Set up for C function definitions, even when using C++ */ | |
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 | 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 | 43 #endif |
44 | |
45 /* Transparency definitions: These define alpha as the opacity of a surface */ | |
46 #define SDL_ALPHA_OPAQUE 255 | |
47 #define SDL_ALPHA_TRANSPARENT 0 | |
48 | |
1670 | 49 /** |
50 * \struct SDL_Rect | |
51 * | |
52 * \brief A rectangle, with the origin at the upper left. | |
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 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
56 Sint16 x, 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
|
57 Uint16 w, h; |
0 | 58 } SDL_Rect; |
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) */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
78 } 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
|
79 |
782fd950bd46
Revamp of the video system in 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 * \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
|
82 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
84 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
86 * \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
|
87 * \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
|
88 * \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
|
89 * \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
|
90 * \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
|
91 * \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
|
92 * \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
|
93 * \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
|
94 * \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
|
95 * \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
|
96 * \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
|
97 * \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
|
98 * \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
|
99 * \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
|
100 * \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
|
101 * \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
|
102 * \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
|
103 * \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
|
104 * \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
|
105 * \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
|
106 */ |
782fd950bd46
Revamp of the video system in 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 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
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 * \brief The flags on a window |
1670 | 113 * |
114 * \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
|
115 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
116 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
|
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 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
|
119 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
|
120 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
|
121 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
|
122 SDL_WINDOW_RESIZABLE = 0x00000010, /**< window can be resized */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
123 SDL_WINDOW_MAXIMIZED = 0x00000020, /**< 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
|
124 SDL_WINDOW_MINIMIZED = 0x00000040, /**< minimized */ |
1719
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
125 SDL_WINDOW_INPUT_GRABBED = 0x00000100, /**< window has grabbed input focus */ |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
126 SDL_WINDOW_KEYBOARD_FOCUS = 0x00000200, /**< window has keyboard focus */ |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
127 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
|
128 } 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
|
129 |
782fd950bd46
Revamp of the video system in 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 /** |
1719
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
131 * \def SDL_WINDOWPOS_UNDEFINED |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
132 * \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
|
133 */ |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
134 #define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF |
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 * \def SDL_WINDOWPOS_CENTERED |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
137 * \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
|
138 */ |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
139 #define SDL_WINDOWPOS_CENTERED 0x7FFFFFE |
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 /** |
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
|
142 * \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
|
143 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
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 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
|
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 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
|
149 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
|
150 SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */ |
782fd950bd46
Revamp of the video system in 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_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
|
152 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
|
153 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
|
154 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
|
155 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
|
156 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
|
157 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
|
158 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
|
159 SDL_WINDOWEVENT_FOCUS_LOST, /**< The window has lost 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
|
160 } 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
|
161 |
782fd950bd46
Revamp of the video system in 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 /** |
1670 | 163 * \enum SDL_RendererFlags |
164 * | |
165 * \brief Flags used when initializing a render manager. | |
166 */ | |
167 typedef enum | |
168 { | |
169 SDL_Renderer_PresentDiscard = 0x00000001, /**< Present leaves the contents of the backbuffer undefined */ | |
170 SDL_Renderer_PresentCopy = 0x00000002, /**< Present uses a copy from back buffer to the front buffer */ | |
171 SDL_Renderer_PresentFlip2 = 0x00000004, /**< Present uses a flip, swapping back buffer and front buffer */ | |
172 SDL_Renderer_PresentFlip3 = 0x00000008, /**< Present uses a flip, rotating between two back buffers and a front buffer */ | |
173 SDL_Renderer_PresentVSync = 0x00000010, /**< Present is synchronized with the refresh rate */ | |
174 SDL_Renderer_RenderTarget = 0x00000020, /**< The renderer can create texture render targets */ | |
175 SDL_Renderer_Accelerated = 0x00000040, /**< The renderer uses hardware acceleration */ | |
176 SDL_Renderer_Minimal = 0x00000080, /**< The renderer only supports the read/write pixel and present functions */ | |
177 } SDL_RendererFlags; | |
178 | |
179 /** | |
180 * \struct SDL_RendererInfo | |
181 * | |
182 * \brief Information on the capabilities of a render manager. | |
183 */ | |
184 typedef struct SDL_RendererInfo | |
185 { | |
186 const char *name; /**< The name of the renderer */ | |
187 Uint32 flags; /**< Supported SDL_RendererFlags */ | |
188 Uint32 blend_modes; /**< A mask of supported blend modes */ | |
189 Uint32 scale_modes; /**< A mask of supported scale modes */ | |
190 Uint32 num_texture_formats; /**< The number of available texture formats */ | |
191 Uint32 texture_formats[32]; /**< The available texture formats */ | |
192 int max_texture_width; /**< The maximimum texture width */ | |
193 int max_texture_height; /**< The maximimum texture height */ | |
194 } SDL_RendererInfo; | |
195 | |
196 /** | |
197 * \enum SDL_TextureAccess | |
198 * | |
199 * \brief The access pattern allowed for a texture | |
200 */ | |
201 typedef enum | |
202 { | |
203 SDL_TextureAccess_Render, /**< Unlockable video memory, rendering allowed */ | |
204 SDL_TextureAccess_Remote, /**< Unlockable video memory */ | |
205 SDL_TextureAccess_Local, /**< Lockable system memory */ | |
206 } SDL_TextureAccess; | |
207 | |
208 /** | |
209 * \enum SDL_TextureBlendMode | |
210 * | |
211 * \brief The blend mode used in SDL_RenderCopy() | |
212 */ | |
213 typedef enum | |
214 { | |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
215 SDL_TextureBlendMode_None = 0x00000000, /**< No blending */ |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
216 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
|
217 SDL_TextureBlendMode_Blend = 0x00000002, /**< dst = (src * A) + (dst * (1-A)) */ |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
218 SDL_TextureBlendMode_Add = 0x00000004, /**< dst = (src * A) + dst */ |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
219 SDL_TextureBlendMode_Mod = 0x00000008, /**< dst = src * dst */ |
1670 | 220 } SDL_TextureBlendMode; |
221 | |
222 /** | |
223 * \enum SDL_TextureScaleMode | |
224 * | |
225 * \brief The scale mode used in SDL_RenderCopy() | |
226 */ | |
227 typedef enum | |
228 { | |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
229 SDL_TextureScaleMode_None = 0x00000000, /**< No scaling, rectangles must match dimensions */ |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
230 SDL_TextureScaleMode_Fast = 0x00000001, /**< Point sampling or equivalent algorithm */ |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
231 SDL_TextureScaleMode_Slow = 0x00000002, /**< Linear filtering or equivalent algorithm */ |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
232 SDL_TextureScaleMode_Best = 0x00000004, /**< Bicubic filtering or equivalent algorithm */ |
1670 | 233 } SDL_TextureScaleMode; |
234 | |
235 /** | |
236 * \typedef SDL_TextureID | |
237 * | |
238 * \brief An efficient driver-specific representation of pixel data | |
239 */ | |
240 typedef Uint32 SDL_TextureID; | |
241 | |
242 | |
243 /* These are the currently supported flags for the SDL_surface */ | |
244 /* Used internally (read-only) */ | |
245 #define SDL_HWSURFACE 0x00000001 /* Surface represents a texture */ | |
246 #define SDL_PREALLOC 0x00000002 /* Surface uses preallocated memory */ | |
247 #define SDL_SRCALPHA 0x00000004 /* Blit uses source alpha blending */ | |
248 #define SDL_SRCCOLORKEY 0x00000008 /* Blit uses a source color key */ | |
249 #define SDL_RLEACCELOK 0x00000010 /* Private flag */ | |
250 #define SDL_RLEACCEL 0x00000020 /* Surface is RLE encoded */ | |
251 | |
252 /* Evaluates to true if the surface needs to be locked before access */ | |
253 #define SDL_MUSTLOCK(S) (((S)->flags & (SDL_HWSURFACE|SDL_RLEACCEL)) != 0) | |
254 | |
255 /* This structure should be treated as read-only, except for 'pixels', | |
256 which, if not NULL, contains the raw pixel data for the surface. | |
257 */ | |
258 typedef struct SDL_Surface | |
259 { | |
260 Uint32 flags; /* Read-only */ | |
261 SDL_PixelFormat *format; /* Read-only */ | |
262 int w, h; /* Read-only */ | |
263 int pitch; /* Read-only */ | |
264 void *pixels; /* Read-write */ | |
265 | |
1683
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
266 /* texture associated with the surface, if any */ |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
267 SDL_TextureID textureID; |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
268 |
1670 | 269 /* information needed for surfaces requiring locks */ |
270 int locked; | |
271 void *lock_data; | |
272 | |
273 /* clipping information */ | |
274 SDL_Rect clip_rect; /* Read-only */ | |
275 | |
276 /* info for fast blit mapping to other surfaces */ | |
277 struct SDL_BlitMap *map; /* Private */ | |
278 | |
279 /* format version, bumped at every change to invalidate blit maps */ | |
280 unsigned int format_version; /* Private */ | |
281 | |
282 /* Reference count -- used when freeing surface */ | |
283 int refcount; /* Read-mostly */ | |
284 } SDL_Surface; | |
285 | |
286 /* typedef for private surface blitting functions */ | |
287 typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, | |
288 struct SDL_Surface * dst, SDL_Rect * dstrect); | |
289 | |
290 | |
291 /** | |
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
|
292 * \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
|
293 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
294 * \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
|
295 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
296 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
|
297 { |
0 | 298 SDL_GL_RED_SIZE, |
299 SDL_GL_GREEN_SIZE, | |
300 SDL_GL_BLUE_SIZE, | |
301 SDL_GL_ALPHA_SIZE, | |
302 SDL_GL_BUFFER_SIZE, | |
303 SDL_GL_DOUBLEBUFFER, | |
304 SDL_GL_DEPTH_SIZE, | |
305 SDL_GL_STENCIL_SIZE, | |
306 SDL_GL_ACCUM_RED_SIZE, | |
307 SDL_GL_ACCUM_GREEN_SIZE, | |
308 SDL_GL_ACCUM_BLUE_SIZE, | |
450
8a43e0cbf02f
Added SDL_GL_STEREO for stereoscopic OpenGL contexts
Sam Lantinga <slouken@libsdl.org>
parents:
432
diff
changeset
|
309 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
|
310 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
|
311 SDL_GL_MULTISAMPLEBUFFERS, |
1656 | 312 SDL_GL_MULTISAMPLESAMPLES, |
313 SDL_GL_ACCELERATED_VISUAL, | |
314 SDL_GL_SWAP_CONTROL | |
0 | 315 } SDL_GLattr; |
316 | |
317 | |
318 /* Function prototypes */ | |
319 | |
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
|
320 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
321 * \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
|
322 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
323 * \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
|
324 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
325 * \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
|
326 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
327 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
|
328 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
329 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
330 * \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
|
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 * \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
|
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 * \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
|
335 * 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
|
336 * |
782fd950bd46
Revamp of the video system in 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 * \sa SDL_GetNumVideoDrivers() |
1660
8b9d79e7eacf
Added API requested in bug #43:
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
338 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
339 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
|
340 |
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
|
341 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
343 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
345 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
347 * \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
|
348 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
349 * \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
|
350 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
351 * 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
|
352 * 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
|
353 * 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
|
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 * \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
|
356 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
357 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
358 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
362 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
364 * |
782fd950bd46
Revamp of the video system in 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 * This function closes all windows, and restores the original video mode. |
0 | 366 * |
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
|
367 * \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
|
368 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
369 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
|
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 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
|
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 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
|
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 * \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
|
377 * 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
|
378 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
380 * \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
|
381 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
382 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
|
383 |
782fd950bd46
Revamp of the video system in 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 * \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
|
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 * \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
|
388 * |
782fd950bd46
Revamp of the video system in 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 * \sa SDL_SelectVideoDisplay() |
0 | 390 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
391 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void); |
0 | 392 |
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
|
393 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
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 * \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
|
397 * |
1670 | 398 * \return The index of the currently selected display. |
399 * | |
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
|
400 * \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
|
401 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
402 * \sa SDL_GetNumVideoDisplays() |
0 | 403 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
404 extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index); |
0 | 405 |
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
|
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 * \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
|
408 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
409 * \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
|
410 * |
782fd950bd46
Revamp of the video system in 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 * \sa SDL_GetDisplayMode() |
0 | 412 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
413 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void); |
0 | 414 |
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
|
415 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
416 * \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
|
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 * \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
|
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 * \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
|
421 * \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
|
422 * \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
|
423 * \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
|
424 * \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
|
425 * |
782fd950bd46
Revamp of the video system in 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 * \sa SDL_GetNumDisplayModes() |
0 | 427 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
428 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
|
429 |
782fd950bd46
Revamp of the video system in 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 * \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
|
432 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
434 */ |
782fd950bd46
Revamp of the video system in 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 extern DECLSPEC const SDL_DisplayMode *SDLCALL |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
436 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
|
437 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
438 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
439 * \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
|
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 * \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
|
442 */ |
782fd950bd46
Revamp of the video system in 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 extern DECLSPEC const SDL_DisplayMode *SDLCALL |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
444 SDL_GetCurrentDisplayMode(void); |
0 | 445 |
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
|
446 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
447 * \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
|
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 * \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
|
450 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
452 * \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
|
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 * \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
|
455 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
456 * 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
|
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 * \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
|
459 * \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
|
460 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
461 extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
462 SDL_DisplayMode |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
463 * mode, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
464 SDL_DisplayMode |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
465 * 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \fn int SDL_SetDisplayMode(const SDL_DisplayMode *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
|
469 * |
782fd950bd46
Revamp of the video system in 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 * \brief Set up the closest available mode on 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
|
471 * |
1707
57ce47f033a5
Passing NULL to SDL_SetDisplayMode() will set the desktop mode.
Sam Lantinga <slouken@libsdl.org>
parents:
1706
diff
changeset
|
472 * \param mode The desired display mode, or NULL to set the desktop mode. |
0 | 473 * |
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
|
474 * \return 0 on success, or -1 if setting the display mode failed. |
0 | 475 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
476 extern DECLSPEC int SDLCALL SDL_SetDisplayMode(const SDL_DisplayMode * mode); |
0 | 477 |
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
|
478 /** |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
479 * \fn int SDL_SetDisplayPalette(const SDL_Color *colors, int firstcolor, int ncolors) |
1670 | 480 * |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
481 * \brief Set the palette entries for indexed display modes. |
1670 | 482 * |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
483 * \return 0 on success, or -1 if the display mode isn't palettized or the colors couldn't be set. |
1670 | 484 */ |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
485 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
|
486 int firstcolor, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
487 int ncolors); |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
488 |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
489 /** |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
490 * \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
|
491 * |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
492 * \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
|
493 * |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
494 * \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
|
495 */ |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
496 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
|
497 int firstcolor, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
498 int ncolors); |
1670 | 499 |
500 /** | |
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
|
501 * \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
|
502 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
503 * \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
|
504 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
505 * \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
|
506 * \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
|
507 * \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
|
508 * \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
|
509 * \param h The height 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
|
510 * \param flags The flags 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
|
511 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
512 * \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
|
513 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
514 * \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
|
515 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
516 * \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
|
517 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
518 extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow(const char *title, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
519 int x, int y, int w, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
520 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
|
521 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
522 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
523 * \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
|
524 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
525 * \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
|
526 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
527 * \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
|
528 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
529 * \return The id of the window created, or zero if window creation failed. |
0 | 530 * |
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
|
531 * \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
|
532 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
533 * \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
|
534 */ |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
535 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
|
536 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
537 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
538 * \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
|
539 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
540 * \brief Get the window flags. |
0 | 541 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
542 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
|
543 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
544 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
545 * \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
|
546 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
547 * \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
|
548 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
549 * \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
|
550 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
551 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
552 const char *title); |
0 | 553 |
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
|
554 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
555 * \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
|
556 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
557 * \brief Get the title of the window, in UTF-8 format. |
0 | 558 * |
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
|
559 * \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
|
560 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
561 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
|
562 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
563 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
564 * \fn void SDL_SetWindowIcon(SDL_Surface *icon) |
0 | 565 * |
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
|
566 * \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
|
567 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
568 * \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
|
569 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
570 * 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
|
571 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
572 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
|
573 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
574 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
575 * \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
|
576 * |
782fd950bd46
Revamp of the video system in 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 * \brief Associate an arbitrary pointer with the window. |
0 | 578 * |
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
|
579 * \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
|
580 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
581 extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
582 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
|
583 |
782fd950bd46
Revamp of the video system in 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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
585 * \fn void *SDL_GetWindowData(SDL_WindowID windowID) |
0 | 586 * |
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
|
587 * \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
|
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 * \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
|
590 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
591 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
|
592 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
593 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
594 * \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
|
595 * |
782fd950bd46
Revamp of the video system in 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 * \brief Set the position of the window. |
0 | 597 * |
1719
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
598 * \param windowID The window to reposition |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
599 * \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
|
600 * \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
|
601 * |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
602 * \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
|
603 * |
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
|
604 * \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
|
605 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
606 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
607 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
|
608 |
782fd950bd46
Revamp of the video system in 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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
610 * \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
|
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 * \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
|
613 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
615 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
616 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
617 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
|
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_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
|
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 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
|
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 * \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
|
625 * 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
|
626 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
627 * \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
|
628 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
629 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
|
630 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
|
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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
633 * \fn void SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *w) |
0 | 634 * |
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
|
635 * \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
|
636 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
638 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
639 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
|
640 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
|
641 |
782fd950bd46
Revamp of the video system in 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 * \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
|
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 * \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
|
646 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
647 * \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
|
648 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
649 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
|
650 |
782fd950bd46
Revamp of the video system in 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 * \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
|
653 * |
782fd950bd46
Revamp of the video system in 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 * \brief Hide the window |
0 | 655 * |
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
|
656 * \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
|
657 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
658 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
|
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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
661 * \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
|
662 * |
782fd950bd46
Revamp of the video system in 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 * \brief Raise the window so it's above other windows. |
782fd950bd46
Revamp of the video system in 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 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
665 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
|
666 |
782fd950bd46
Revamp of the video system in 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 * \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
|
669 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
671 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
672 * \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
|
673 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
674 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
|
675 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
676 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
677 * \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
|
678 * |
782fd950bd46
Revamp of the video system in 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 * \brief Minimize the window to an iconic representation. |
0 | 680 * |
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
|
681 * \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
|
682 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
683 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
687 * |
782fd950bd46
Revamp of the video system in 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 * \brief Restore the size and position of a minimized or maximized window. |
0 | 689 * |
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
|
690 * \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
|
691 * \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
|
692 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
693 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
697 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
699 * |
782fd950bd46
Revamp of the video system in 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 * \param mode This is 1 to grab input, and 0 to release input. |
0 | 701 * |
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
|
702 * \sa SDL_GrabMode |
782fd950bd46
Revamp of the video system in 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 * \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
|
704 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
705 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
706 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
|
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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
709 * \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
|
710 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
712 * |
782fd950bd46
Revamp of the video system in 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 * \return This returns 1 if input is grabbed, and 0 otherwise. |
0 | 714 * |
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
|
715 * \sa SDL_GrabMode |
782fd950bd46
Revamp of the video system in 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 * \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
|
717 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
718 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
722 * |
782fd950bd46
Revamp of the video system in 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 * \brief Destroy a window. |
0 | 724 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
725 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
|
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 /** |
1670 | 728 * \fn int SDL_GetNumRenderers(void) |
729 * | |
730 * \brief Get the number of render managers on the current display. | |
731 * | |
732 * A render manager is a set of code that handles rendering and texture | |
733 * management on a particular display. Normally there is only one, but | |
734 * some drivers may have several available with different capabilities. | |
735 * | |
736 * \sa SDL_GetRendererInfo() | |
737 * \sa SDL_CreateRenderer() | |
738 */ | |
739 extern DECLSPEC int SDLCALL SDL_GetNumRenderers(void); | |
740 | |
741 /** | |
742 * \fn SDL_RendererInfo *SDL_GetRendererInfo(int index) | |
743 * | |
744 * \brief Get information about a specific render manager on the current | |
745 * display. | |
746 * | |
747 * \sa SDL_CreateRenderer() | |
748 */ | |
749 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(int index, | |
750 SDL_RendererInfo * info); | |
751 | |
752 /** | |
753 * \fn int SDL_CreateRenderer(SDL_WindowID window, int index, Uint32 flags) | |
754 * | |
755 * \brief Create and make active a 2D rendering context for a window. | |
756 * | |
1719
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1707
diff
changeset
|
757 * \param windowID The window used for rendering |
1670 | 758 * \param index The index of the render manager to initialize, or -1 to initialize the first one supporting the requested flags. |
759 * \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
|
760 * |
1670 | 761 * \return 0 on success, -1 if the flags were not supported, or -2 if |
762 * there isn't enough memory to support the requested flags | |
763 * | |
764 * \sa SDL_SelectRenderer() | |
765 * \sa SDL_DestroyRenderer() | |
766 */ | |
767 extern DECLSPEC int SDLCALL SDL_CreateRenderer(SDL_WindowID windowID, | |
768 int index, Uint32 flags); | |
769 | |
770 /** | |
771 * \fn int SDL_SelectRenderer(SDL_WindowID windowID) | |
772 * | |
773 * \brief Select the rendering context for a particular window. | |
774 * | |
775 * \return 0 on success, -1 if the selected window doesn't have a | |
776 * rendering context. | |
777 */ | |
778 extern DECLSPEC int SDLCALL SDL_SelectRenderer(SDL_WindowID windowID); | |
779 | |
780 /** | |
781 * \fn SDL_TextureID SDL_CreateTexture(Uint32 format, int access, int w, int h) | |
782 * | |
1706
1577404809f0
Added a multi-window version of testsprite using the new API.
Sam Lantinga <slouken@libsdl.org>
parents:
1683
diff
changeset
|
783 * \brief Create a texture for the current rendering context. |
1670 | 784 * |
785 * \param format The format of the texture | |
786 * \param access One of the enumerated values in SDL_TextureAccess | |
787 * \param w The width of the texture in pixels | |
788 * \param h The height of the texture in pixels | |
789 * | |
790 * \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. | |
791 * | |
792 * \sa SDL_QueryTexture() | |
793 * \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
|
794 */ |
1670 | 795 extern DECLSPEC SDL_TextureID SDLCALL SDL_CreateTexture(Uint32 format, |
796 int access, int w, | |
797 int h); | |
798 | |
799 /** | |
800 * \fn SDL_TextureID SDL_CreateTextureFromSurface(Uint32 format, int access, SDL_Surface *surface) | |
801 * | |
1678
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
802 * \brief Create a texture from an existing surface. |
1670 | 803 * |
804 * \param format The format of the texture, or 0 to pick an appropriate format | |
805 * \param access One of the enumerated values in SDL_TextureAccess | |
806 * \param surface The surface containing pixel data used to fill the texture | |
807 * | |
808 * \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. | |
809 * | |
810 * \note The surface is not modified or freed by this function. | |
811 * | |
812 * \sa SDL_QueryTexture() | |
813 * \sa SDL_DestroyTexture() | |
814 */ | |
815 extern DECLSPEC SDL_TextureID SDLCALL SDL_CreateTextureFromSurface(Uint32 | |
816 format, | |
817 int access, | |
818 SDL_Surface | |
819 * surface); | |
0 | 820 |
1670 | 821 /** |
822 * \fn int SDL_QueryTexture(SDL_TextureID textureID, Uint32 *format, int *access, int *w, int *h) | |
823 * | |
824 * \brief Query the attributes of a texture | |
825 * | |
826 * \param texture A texture to be queried | |
827 * \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. | |
828 * \param access A pointer filled in with the actual access to the texture. | |
829 * \param w A pointer filled in with the width of the texture in pixels | |
830 * \param h A pointer filled in with the height of the texture in pixels | |
831 * | |
832 * \return 0 on success, or -1 if the texture is not valid | |
833 */ | |
834 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_TextureID textureID, | |
835 Uint32 * format, int *access, | |
836 int *w, int *h); | |
837 | |
838 /** | |
1678
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
839 * \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
|
840 * |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
841 * \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
|
842 * |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
843 * \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
|
844 * \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
|
845 * \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
|
846 * |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
847 * \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
|
848 */ |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
849 extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_TextureID textureID, |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
850 void **pixels, int *pitch); |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
851 |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
852 /** |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
853 * \fn int SDL_SetTexturePalette(SDL_TextureID textureID, const SDL_Color * colors, int firstcolor, int ncolors) |
1670 | 854 * |
855 * \brief Update an indexed texture with a color palette | |
856 * | |
857 * \param texture The texture to update | |
858 * \param colors The array of RGB color data | |
859 * \param firstcolor The first index to update | |
860 * \param ncolors The number of palette entries to fill with the color data | |
861 * | |
862 * \return 0 on success, or -1 if the texture is not valid or not an indexed texture | |
863 */ | |
864 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
|
865 const SDL_Color * colors, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
866 int firstcolor, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
867 int ncolors); |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
868 |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
869 /** |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
870 * \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
|
871 * |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
872 * \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
|
873 * |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
874 * \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
|
875 * \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
|
876 * \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
|
877 * \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
|
878 * |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
879 * \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
|
880 */ |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
881 extern DECLSPEC int SDLCALL SDL_GetTexturePalette(SDL_TextureID textureID, |
1670 | 882 SDL_Color * colors, |
883 int firstcolor, | |
884 int ncolors); | |
885 | |
886 /** | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
887 * \fn int SDL_UpdateTexture(SDL_TextureID textureID, const SDL_Rect *rect, const void *pixels, int pitch) |
1670 | 888 * |
889 * \brief Update the given texture rectangle with new pixel data. | |
890 * | |
891 * \param texture The texture to update | |
892 * \param rect A pointer to the rectangle of pixels to update, or NULL to update the entire texture. | |
893 * \param pixels The raw pixel data | |
894 * \param pitch The number of bytes between rows of pixel data | |
895 * | |
896 * \return 0 on success, or -1 if the texture is not valid | |
897 * | |
898 * \note This is a very slow function for textures not created with SDL_TextureAccess_Local. | |
0 | 899 */ |
1670 | 900 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
|
901 const SDL_Rect * rect, |
1670 | 902 const void *pixels, int pitch); |
903 | |
904 /** | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
905 * \fn void SDL_LockTexture(SDL_TextureID textureID, const SDL_Rect *rect, int markDirty, void **pixels, int *pitch) |
1670 | 906 * |
907 * \brief Lock a portion of the texture for pixel access. | |
908 * | |
909 * \param texture The texture to lock for access, which must have been created with SDL_TextureAccess_Local. | |
910 * \param rect A pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked. | |
911 * \param markDirty If this is nonzero, the locked area will be marked dirty when the texture is unlocked. | |
912 * \param pixels This is filled in with a pointer to the locked pixels, appropriately offset by the locked area. | |
913 * \param pitch This is filled in with the pitch of the locked pixels. | |
914 * | |
915 * \return 0 on success, or -1 if the texture is not valid or was created with SDL_TextureAccess_Remote | |
916 * | |
917 * \sa SDL_DirtyTexture() | |
918 * \sa SDL_UnlockTexture() | |
919 */ | |
920 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
|
921 const SDL_Rect * rect, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
922 int markDirty, void **pixels, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
923 int *pitch); |
1670 | 924 |
925 /** | |
926 * \fn void SDL_UnlockTexture(SDL_TextureID textureID) | |
927 * | |
928 * \brief Unlock a texture, uploading the changes to video memory, if needed. | |
929 * | |
930 * \sa SDL_LockTexture() | |
931 * \sa SDL_DirtyTexture() | |
932 */ | |
933 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_TextureID textureID); | |
934 | |
935 /** | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
936 * \fn void SDL_DirtyTexture(SDL_TextureID textureID, int numrects, const SDL_Rect * rects) |
1670 | 937 * |
938 * \brief Mark the specified rectangles of the texture as dirty. | |
939 * | |
940 * \note The texture must have been created with SDL_TextureAccess_Local. | |
941 * | |
942 * \sa SDL_LockTexture() | |
943 * \sa SDL_UnlockTexture() | |
944 */ | |
945 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
|
946 int numrects, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
947 const SDL_Rect * rects); |
1670 | 948 |
949 /** | |
950 * \fn void SDL_SelectRenderTexture(SDL_TextureID textureID) | |
951 * | |
952 * \brief Select a texture as the rendering target, or 0 to reselect the current window. | |
953 * | |
954 * \note The texture must have been created with SDL_TextureAccess_Render. | |
955 */ | |
956 extern DECLSPEC void SDLCALL SDL_SelectRenderTexture(SDL_TextureID textureID); | |
957 | |
958 /** | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
959 * \fn void SDL_RenderFill(const SDL_Rect *rect, Uint32 color) |
1670 | 960 * |
961 * \brief Fill the current rendering target with the specified color. | |
962 * | |
963 * \param rect A pointer to the destination rectangle, or NULL for the entire rendering target. | |
964 * \param color An ARGB color value. | |
965 * | |
966 * \return 0 on success, or -1 if there is no renderer current | |
967 */ | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
968 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
|
969 Uint32 color); |
0 | 970 |
1670 | 971 /** |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
972 * \fn int SDL_RenderCopy(SDL_TextureID textureID, const SDL_Rect *srcrect, const SDL_Rect *dstrect, Uint32 blendMode, Uint32 scaleMode) |
1670 | 973 * |
974 * \brief Copy a portion of the texture to the current rendering target. | |
975 * | |
976 * \param texture The source texture. | |
977 * \param srcrect A pointer to the source rectangle, or NULL for the entire texture. | |
978 * \param dstrect A pointer to the destination rectangle, or NULL for the entire rendering target. | |
979 * \param blendMode SDL_TextureBlendMode to be used if the source texture has an alpha channel. | |
980 * \param scaleMode SDL_TextureScaleMode to be used if the source and destination rectangles don't have the same width and height. | |
981 * | |
982 * \return 0 on success, or -1 if there is no renderer current, or the driver doesn't support the requested operation. | |
983 * | |
984 * \note You can check the video driver info to see what operations are supported. | |
985 */ | |
986 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
|
987 const SDL_Rect * srcrect, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
988 const SDL_Rect * dstrect, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
989 int blendMode, int scaleMode); |
1670 | 990 |
991 /** | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
992 * \fn int SDL_RenderReadPixels(const SDL_Rect *rect, void *pixels, int pitch) |
1670 | 993 * |
994 * \brief Read pixels from the current rendering target. | |
995 * | |
996 * \param rect A pointer to the rectangle to read, or NULL for the entire render target | |
997 * \param pixels A pointer to be filled in with the pixel data | |
998 * \param pitch The pitch of the pixels parameter | |
999 * | |
1000 * \return 0 on success, or -1 if pixel reading is not supported. | |
1001 * | |
1002 * \warning This is a very slow operation, and should not be used frequently. | |
0 | 1003 */ |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
1004 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect, |
1670 | 1005 void *pixels, int pitch); |
1006 | |
1007 /** | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
1008 * \fn int SDL_RenderWritePixels(const SDL_Rect *rect, const void *pixels, int pitch) |
1670 | 1009 * |
1010 * \brief Write pixels to the current rendering target. | |
1011 * | |
1012 * \param rect A pointer to the rectangle to write, or NULL for the entire render target | |
1013 * \param pixels A pointer to the pixel data to write | |
1014 * \param pitch The pitch of the pixels parameter | |
1015 * | |
1016 * \return 0 on success, or -1 if pixel writing is not supported. | |
1017 * | |
1018 * \warning This is a very slow operation, and should not be used frequently. | |
1019 */ | |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
1020 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect, |
1670 | 1021 const void *pixels, |
1022 int pitch); | |
1023 | |
1024 /** | |
1025 * \fn void SDL_RenderPresent(void) | |
1026 * | |
1027 * \brief Update the screen with rendering performed. | |
1028 */ | |
1029 extern DECLSPEC void SDLCALL SDL_RenderPresent(void); | |
1030 | |
1031 /** | |
1032 * \fn void SDL_DestroyTexture(SDL_TextureID textureID); | |
1033 * | |
1034 * \brief Destroy the specified texture. | |
1035 * | |
1036 * \sa SDL_CreateTexture() | |
1037 * \sa SDL_CreateTextureFromSurface() | |
1038 */ | |
1039 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_TextureID textureID); | |
1040 | |
1041 /** | |
1042 * \fn void SDL_DestroyRenderer(SDL_WindowID windowID); | |
1043 * | |
1044 * \brief Destroy the rendering context for a window and free associated | |
1045 * textures. | |
1046 * | |
1047 * \sa SDL_CreateRenderer() | |
1048 */ | |
1049 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_WindowID windowID); | |
0 | 1050 |
1051 /* | |
1052 * Set the gamma correction for each of the color channels. | |
1053 * The gamma values range (approximately) between 0.1 and 10.0 | |
1054 * | |
1055 * If this function isn't supported directly by the hardware, it will | |
1056 * be emulated using gamma ramps, if available. If successful, this | |
1057 * function returns 0, otherwise it returns -1. | |
1058 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1059 extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue); |
0 | 1060 |
1061 /* | |
1062 * Set the gamma translation table for the red, green, and blue channels | |
1063 * of the video hardware. Each table is an array of 256 16-bit quantities, | |
1064 * representing a mapping between the input and output for that channel. | |
1065 * The input is the index into the array, and the output is the 16-bit | |
1066 * gamma value at that index, scaled to the output color precision. | |
1067 * | |
1068 * You may pass NULL for any of the channels to leave it unchanged. | |
1069 * If the call succeeds, it will return 0. If the display driver or | |
1070 * hardware does not support gamma translation, or otherwise fails, | |
1071 * this function will return -1. | |
1072 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1073 extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1074 const Uint16 * green, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1075 const Uint16 * blue); |
0 | 1076 |
1077 /* | |
1078 * Retrieve the current values of the gamma translation tables. | |
1079 * | |
1080 * You must pass in valid pointers to arrays of 256 16-bit quantities. | |
1081 * Any of the pointers may be NULL to ignore that channel. | |
1082 * If the call succeeds, it will return 0. If the display driver or | |
1083 * hardware does not support gamma translation, or otherwise fails, | |
1084 * this function will return -1. | |
1085 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1086 extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1087 Uint16 * blue); |
0 | 1088 |
1089 /* | |
1090 * Maps an RGB triple to an opaque pixel value for a given pixel format | |
1091 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1092 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
|
1093 (SDL_PixelFormat * format, Uint8 r, Uint8 g, Uint8 b); |
0 | 1094 |
1095 /* | |
1096 * Maps an RGBA quadruple to a pixel value for a given pixel format | |
1097 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1098 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(SDL_PixelFormat * format, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1099 Uint8 r, Uint8 g, Uint8 b, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1100 Uint8 a); |
0 | 1101 |
1102 /* | |
1103 * Maps a pixel value into the RGB components for a given pixel format | |
1104 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1105 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
|
1106 Uint8 * r, Uint8 * g, Uint8 * b); |
0 | 1107 |
1108 /* | |
1109 * Maps a pixel value into the RGBA components for a given pixel format | |
1110 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1111 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
|
1112 Uint8 * r, Uint8 * g, Uint8 * b, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1113 Uint8 * a); |
0 | 1114 |
1115 /* | |
1116 * Allocate and free an RGB surface (must be called after SDL_SetVideoMode) | |
1117 * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. | |
1118 * If the depth is greater than 8 bits, the pixel format is set using the | |
1119 * flags '[RGB]mask'. | |
1120 * If the function runs out of memory, it will return NULL. | |
1121 * | |
1122 * The 'flags' tell what kind of surface to create. | |
1123 * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits. | |
1670 | 1124 * SDL_SRCALPHA means that the surface will be used for alpha blits. |
0 | 1125 */ |
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
|
1126 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
|
1127 (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
|
1128 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1129 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1130 int width, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1131 int height, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1132 int depth, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1133 int pitch, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1134 Uint32 Rmask, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1135 Uint32 Gmask, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1136 Uint32 Bmask, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1137 Uint32 Amask); |
1670 | 1138 extern DECLSPEC SDL_Surface *SDLCALL |
1139 SDL_CreateRGBSurfaceFromTexture(SDL_TextureID textureID); | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1140 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); |
0 | 1141 |
1683
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1142 /** |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1143 * \fn int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette) |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1144 * |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1145 * \brief Set the palette used by a surface. |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1146 * |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1147 * \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
|
1148 * |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1149 * \note A single palette can be shared with many surfaces. |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1150 */ |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1151 extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1152 SDL_Palette * palette); |
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
1153 |
0 | 1154 /* |
1155 * SDL_LockSurface() sets up a surface for directly accessing the pixels. | |
1156 * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write | |
1157 * to and read from 'surface->pixels', using the pixel format stored in | |
1158 * 'surface->format'. Once you are done accessing the surface, you should | |
1159 * use SDL_UnlockSurface() to release it. | |
1160 * | |
1161 * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates | |
1162 * to 0, then you can read and write to the surface at any time, and the | |
1670 | 1163 * pixel format of the surface will not change. |
0 | 1164 * |
1165 * No operating system or library calls should be made between lock/unlock | |
1166 * pairs, as critical system locks may be held during this time. | |
1167 * | |
1168 * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. | |
1169 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1170 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1171 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); |
0 | 1172 |
1173 /* | |
1174 * Load a surface from a seekable SDL data source (memory or file.) | |
1175 * If 'freesrc' is non-zero, the source will be closed after being read. | |
1176 * Returns the new surface, or NULL if there was an error. | |
1177 * The new surface should be freed with SDL_FreeSurface(). | |
1178 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1179 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
|
1180 int freesrc); |
0 | 1181 |
1182 /* Convenience macro -- load a surface from a file */ | |
1183 #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) | |
1184 | |
1185 /* | |
1186 * Save a surface to a seekable SDL data source (memory or file.) | |
1187 * If 'freedst' is non-zero, the source will be closed after being written. | |
1188 * Returns 0 if successful or -1 if there was an error. | |
1189 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1190 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
|
1191 (SDL_Surface * surface, SDL_RWops * dst, int freedst); |
0 | 1192 |
1193 /* Convenience macro -- save a surface to a file */ | |
1194 #define SDL_SaveBMP(surface, file) \ | |
1195 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) | |
1196 | |
1197 /* | |
1198 * Sets the color key (transparent pixel) in a blittable surface. | |
1199 * If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL), | |
1200 * 'key' will be the transparent pixel in the source image of a blit. | |
1201 * SDL_RLEACCEL requests RLE acceleration for the surface if present, | |
1202 * and removes RLE acceleration if absent. | |
1203 * If 'flag' is 0, this function clears any current color key. | |
1204 * This function returns 0, or -1 if there was an error. | |
1205 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1206 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
|
1207 (SDL_Surface * surface, Uint32 flag, Uint32 key); |
0 | 1208 |
1209 /* | |
1210 * This function sets the alpha value for the entire surface, as opposed to | |
1211 * using the alpha component of each pixel. This value measures the range | |
1212 * of transparency of the surface, 0 being completely transparent to 255 | |
1213 * being completely opaque. An 'alpha' value of 255 causes blits to be | |
1214 * opaque, the source pixels copied to the destination (the default). Note | |
1215 * that per-surface alpha can be combined with colorkey transparency. | |
1216 * | |
1217 * If 'flag' is 0, alpha blending is disabled for the surface. | |
1218 * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface. | |
1219 * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the | |
1220 * 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
|
1221 * |
80a35d43a58f
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
431
diff
changeset
|
1222 * The 'alpha' parameter is ignored for surfaces that have an alpha channel. |
0 | 1223 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1224 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
|
1225 Uint8 alpha); |
0 | 1226 |
1227 /* | |
1228 * Sets the clipping rectangle for the destination surface in a blit. | |
1229 * | |
1230 * If the clip rectangle is NULL, clipping will be disabled. | |
1231 * If the clip rectangle doesn't intersect the surface, the function will | |
1232 * return SDL_FALSE and blits will be completely clipped. Otherwise the | |
1233 * function returns SDL_TRUE and blits to the surface will be clipped to | |
1234 * the intersection of the surface area and the clipping rectangle. | |
1235 * | |
1236 * Note that blits are automatically clipped to the edges of the source | |
1237 * and destination surfaces. | |
1238 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1239 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1240 const SDL_Rect * rect); |
0 | 1241 |
1242 /* | |
1243 * Gets the clipping rectangle for the destination surface in a blit. | |
1244 * 'rect' must be a pointer to a valid rectangle which will be filled | |
1245 * with the correct values. | |
1246 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1247 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1248 SDL_Rect * rect); |
0 | 1249 |
1250 /* | |
1251 * Creates a new surface of the specified format, and then copies and maps | |
1252 * the given surface to it so the blit of the converted surface will be as | |
1253 * fast as possible. If this function fails, it returns NULL. | |
1254 * | |
1255 * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those | |
1256 * semantics. You can also pass SDL_RLEACCEL in the flags parameter and | |
1257 * SDL will try to RLE accelerate colorkey and alpha blits in the resulting | |
1258 * surface. | |
1259 * | |
1260 * This function is used internally by SDL_DisplayFormat(). | |
1261 */ | |
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
|
1262 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
|
1263 (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags); |
0 | 1264 |
1265 /* | |
1670 | 1266 * This function performs a fast fill of the given rectangle with 'color' |
1267 * The given rectangle is clipped to the destination surface clip area | |
1268 * and the final fill rectangle is saved in the passed in pointer. | |
1269 * If 'dstrect' is NULL, the whole surface will be filled with 'color' | |
1270 * The color should be a pixel of the format used by the surface, and | |
1271 * can be generated by the SDL_MapRGB() function. | |
1272 * This function returns 0 on success, or -1 on error. | |
1273 */ | |
1274 extern DECLSPEC int SDLCALL SDL_FillRect | |
1275 (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color); | |
1276 | |
1277 /* | |
0 | 1278 * This performs a fast blit from the source surface to the destination |
1279 * surface. It assumes that the source and destination rectangles are | |
1280 * the same size. If either 'srcrect' or 'dstrect' are NULL, the entire | |
1281 * surface (src or dst) is copied. The final blit rectangles are saved | |
1282 * in 'srcrect' and 'dstrect' after all clipping is performed. | |
1283 * If the blit is successful, it returns 0, otherwise it returns -1. | |
1284 * | |
1285 * The blit function should not be called on a locked surface. | |
1286 * | |
1287 * The blit semantics for surfaces with and without alpha and colorkey | |
1288 * are defined as follows: | |
1289 * | |
1290 * RGBA->RGB: | |
1291 * SDL_SRCALPHA set: | |
1292 * alpha-blend (using alpha-channel). | |
1293 * SDL_SRCCOLORKEY ignored. | |
1294 * SDL_SRCALPHA not set: | |
1295 * copy RGB. | |
1296 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
1297 * RGB values of the source colour key, ignoring alpha in the | |
1298 * comparison. | |
1299 * | |
1300 * RGB->RGBA: | |
1301 * SDL_SRCALPHA set: | |
1302 * alpha-blend (using the source per-surface alpha value); | |
1303 * set destination alpha to opaque. | |
1304 * SDL_SRCALPHA not set: | |
431
41cadcba32e8
Fixed SDL_DisplayFormatAlpha() on RGB surfaces with alpha
Sam Lantinga <slouken@libsdl.org>
parents:
337
diff
changeset
|
1305 * copy RGB, set destination alpha to source per-surface alpha value. |
0 | 1306 * both: |
1307 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
1308 * source colour key. | |
1309 * | |
1310 * RGBA->RGBA: | |
1311 * SDL_SRCALPHA set: | |
1312 * alpha-blend (using the source alpha channel) the RGB values; | |
1313 * leave destination alpha untouched. [Note: is this correct?] | |
1314 * SDL_SRCCOLORKEY ignored. | |
1315 * SDL_SRCALPHA not set: | |
1316 * copy all of RGBA to the destination. | |
1317 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
1318 * RGB values of the source colour key, ignoring alpha in the | |
1319 * comparison. | |
1320 * | |
1321 * RGB->RGB: | |
1322 * SDL_SRCALPHA set: | |
1323 * alpha-blend (using the source per-surface alpha value). | |
1324 * SDL_SRCALPHA not set: | |
1325 * copy RGB. | |
1326 * both: | |
1327 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
1328 * source colour key. | |
1329 * | |
1330 * If either of the surfaces were in video memory, and the blit returns -2, | |
1331 * the video memory was lost, so it should be reloaded with artwork and | |
1332 * re-blitted: | |
1333 while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { | |
1334 while ( SDL_LockSurface(image) < 0 ) | |
1335 Sleep(10); | |
1336 -- Write image pixels to image->pixels -- | |
1337 SDL_UnlockSurface(image); | |
1338 } | |
1339 * This happens under DirectX 5.0 when the system switches away from your | |
1340 * fullscreen application. The lock will also fail until you have access | |
1341 * to the video memory again. | |
1342 */ | |
1343 /* You should call SDL_BlitSurface() unless you know exactly how SDL | |
1344 blitting works internally and how to use the other blit functions. | |
1345 */ | |
1346 #define SDL_BlitSurface SDL_UpperBlit | |
1347 | |
1348 /* This is the public blit function, SDL_BlitSurface(), and it performs | |
1349 rectangle validation and clipping before passing it to SDL_LowerBlit() | |
1350 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1351 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
|
1352 (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
|
1353 SDL_Surface * dst, SDL_Rect * dstrect); |
0 | 1354 /* This is a semi-private blit function and it performs low-level surface |
1355 blitting only. | |
1356 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1357 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
|
1358 (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
|
1359 SDL_Surface * dst, SDL_Rect * dstrect); |
0 | 1360 |
1670 | 1361 /** |
1362 * \fn int SDL_SoftStretch(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect) | |
0 | 1363 * |
1670 | 1364 * \brief Perform a fast, low quality, stretch blit between two surfaces of the same pixel format. |
1365 * \note This function uses a static buffer, and is not thread-safe. | |
0 | 1366 */ |
1670 | 1367 extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, |
1368 SDL_Rect * srcrect, | |
1369 SDL_Surface * dst, | |
1370 SDL_Rect * dstrect); | |
0 | 1371 |
1372 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
1373 /* OpenGL support functions. */ | |
1374 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
1375 | |
1376 /* | |
1490
8f3e602904d1
Dynamic OpenGL loading is the default now. :)
Sam Lantinga <slouken@libsdl.org>
parents:
1358
diff
changeset
|
1377 * Dynamically load an OpenGL library, or the default one if path is NULL |
0 | 1378 * |
1379 * If you do this, you need to retrieve all of the GL functions used in | |
1380 * your program from the dynamic library using SDL_GL_GetProcAddress(). | |
1381 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1382 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path); |
0 | 1383 |
1384 /* | |
1490
8f3e602904d1
Dynamic OpenGL loading is the default now. :)
Sam Lantinga <slouken@libsdl.org>
parents:
1358
diff
changeset
|
1385 * Get the address of a GL function |
0 | 1386 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1387 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc); |
0 | 1388 |
1389 /* | |
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
|
1390 * Set an attribute of the OpenGL subsystem before window creation. |
0 | 1391 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1392 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); |
0 | 1393 |
1394 /* | |
1395 * Get an attribute of the OpenGL subsystem from the windowing | |
1396 * interface, such as glX. This is of course different from getting | |
1397 * the values from SDL's internal OpenGL subsystem, which only | |
1398 * stores the values you request before initialization. | |
1399 * | |
1400 * Developers should track the values they pass into SDL_GL_SetAttribute | |
1401 * themselves if they want to retrieve these values. | |
1402 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1403 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value); |
0 | 1404 |
1405 /* | |
1406 * Swap the OpenGL buffers, if double-buffering is supported. | |
1407 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1408 extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void); |
0 | 1409 |
1410 /* Ends C function definitions when using C++ */ | |
1411 #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
|
1412 /* *INDENT-OFF* */ |
0 | 1413 } |
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
|
1414 /* *INDENT-ON* */ |
0 | 1415 #endif |
1416 #include "close_code.h" | |
1417 | |
1418 #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
|
1419 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
1420 /* vi: set ts=4 sw=4 expandtab: */ |