Mercurial > sdl-ios-xcode
annotate include/SDL_video.h @ 1668:4da1ee79c9af SDL-1.3
more tweaking indent options
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 29 May 2006 04:04:35 +0000 |
parents | 782fd950bd46 |
children | 9857d21967bb |
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 | |
49 /* Useful data types */ | |
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
|
50 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
|
51 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
52 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
|
53 Uint16 w, h; |
0 | 54 } SDL_Rect; |
55 | |
56 /* This structure should be treated as read-only, except for 'pixels', | |
57 which, if not NULL, contains the raw pixel data for the surface. | |
58 */ | |
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
|
59 typedef struct SDL_Surface |
782fd950bd46
Revamp of the video system in 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 Uint32 flags; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 SDL_PixelFormat *format; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 int w, h; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 Uint16 pitch; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 void *pixels; /* Read-write */ |
782fd950bd46
Revamp of the video system in 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 int offset; /* Private */ |
0 | 67 |
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
|
68 /* Hardware-specific surface info */ |
782fd950bd46
Revamp of the video system in 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 struct private_hwdata *hwdata; |
0 | 70 |
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
|
71 /* clipping information */ |
782fd950bd46
Revamp of the video system in 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 SDL_Rect clip_rect; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 Uint32 unused1; /* for binary compatibility */ |
782fd950bd46
Revamp of the video system in 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 |
782fd950bd46
Revamp of the video system in 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 /* Allow recursive locks */ |
782fd950bd46
Revamp of the video system in 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 Uint32 locked; /* Private */ |
0 | 77 |
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
|
78 /* info for fast blit mapping to other surfaces */ |
782fd950bd46
Revamp of the video system in 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 struct SDL_BlitMap *map; /* Private */ |
0 | 80 |
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
|
81 /* format version, bumped at every change to invalidate blit maps */ |
782fd950bd46
Revamp of the video system in 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 unsigned int format_version; /* Private */ |
0 | 83 |
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
|
84 /* Reference count -- used when freeing surface */ |
782fd950bd46
Revamp of the video system in 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 int refcount; /* Read-mostly */ |
782fd950bd46
Revamp of the video system in 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 } SDL_Surface; |
0 | 87 |
88 /* The most common video overlay formats. | |
89 For an explanation of these pixel formats, see: | |
90 http://www.webartz.com/fourcc/indexyuv.htm | |
91 | |
92 For information on the relationship between color spaces, see: | |
93 http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html | |
94 */ | |
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
|
95 #define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U (3 planes) */ |
782fd950bd46
Revamp of the video system in 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 #define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V (3 planes) */ |
782fd950bd46
Revamp of the video system in 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 #define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 (1 plane) */ |
782fd950bd46
Revamp of the video system in 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 #define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 (1 plane) */ |
782fd950bd46
Revamp of the video system in 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 #define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 (1 plane) */ |
0 | 100 |
101 /* The YUV hardware video overlay */ | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
102 typedef struct SDL_Overlay |
782fd950bd46
Revamp of the video system in 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 { |
782fd950bd46
Revamp of the video system in 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 Uint32 format; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 int w, h; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 int planes; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 Uint16 *pitches; /* Read-only */ |
782fd950bd46
Revamp of the video system in 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 Uint8 **pixels; /* Read-write */ |
0 | 109 |
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
|
110 /* Hardware-specific surface info */ |
782fd950bd46
Revamp of the video system in 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 struct private_yuvhwfuncs *hwfuncs; |
782fd950bd46
Revamp of the video system in 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 struct private_yuvhwdata *hwdata; |
0 | 113 |
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
|
114 /* Special 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
|
115 Uint32 hw_overlay:1; /* Flag: This overlay hardware accelerated? */ |
782fd950bd46
Revamp of the video system in 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 Uint32 UnusedBits:31; |
0 | 117 } SDL_Overlay; |
118 | |
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
|
119 /* Evaluates to true if the surface needs to be locked before access */ |
782fd950bd46
Revamp of the video system in 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 #define SDL_MUSTLOCK(surface) \ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
121 (surface->offset || \ |
782fd950bd46
Revamp of the video system in 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 ((surface->flags & (SDL_HWSURFACE|SDL_RLEACCEL)) != 0)) |
0 | 123 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
124 /* typedef for private surface blitting functions */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
125 typedef int (*SDL_blit) (struct 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
|
126 struct SDL_Surface * dst, SDL_Rect * dstrect); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
127 |
782fd950bd46
Revamp of the video system in 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 |
782fd950bd46
Revamp of the video system in 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 /* Useful for determining the video hardware capabilities */ |
782fd950bd46
Revamp of the video system in 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 typedef struct SDL_VideoInfo |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
131 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
132 Uint32 hw_available:1; /* Flag: Can you create hardware surfaces? */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
133 Uint32 wm_available:1; /* Flag: Can you talk to a window manager? */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
134 Uint32 UnusedBits1:6; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
135 Uint32 UnusedBits2: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
|
136 Uint32 blit_hw:1; /* Flag: Accelerated blits HW --> HW */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
137 Uint32 blit_hw_CC:1; /* Flag: Accelerated blits with Colorkey */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
138 Uint32 blit_hw_A:1; /* Flag: Accelerated blits with Alpha */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
139 Uint32 blit_sw:1; /* Flag: Accelerated blits SW --> HW */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
140 Uint32 blit_sw_CC:1; /* Flag: Accelerated blits with Colorkey */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
141 Uint32 blit_sw_A:1; /* Flag: Accelerated blits with Alpha */ |
782fd950bd46
Revamp of the video system in 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 Uint32 blit_fill:1; /* Flag: Accelerated color fill */ |
782fd950bd46
Revamp of the video system in 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 Uint32 UnusedBits3:16; |
782fd950bd46
Revamp of the video system in 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 Uint32 video_mem; /* The total amount of video memory (in K) */ |
782fd950bd46
Revamp of the video system in 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 } SDL_VideoInfo; |
782fd950bd46
Revamp of the video system in 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 |
782fd950bd46
Revamp of the video system in 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 * \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
|
149 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
150 * \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
|
151 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
153 * \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
|
154 * \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
|
155 * \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
|
156 * \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
|
157 * \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
|
158 */ |
782fd950bd46
Revamp of the video system in 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 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
|
160 { |
782fd950bd46
Revamp of the video system in 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 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
|
162 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
|
163 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
|
164 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
|
165 } 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
|
166 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
167 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
168 * \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
|
169 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
170 * \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
|
171 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
172 * \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
|
173 * \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
|
174 * \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
|
175 * \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
|
176 * \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
|
177 * \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
|
178 * \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
|
179 * \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
|
180 * \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
|
181 * \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
|
182 * \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
|
183 * \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
|
184 * \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
|
185 * \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
|
186 * \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
|
187 * \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
|
188 * \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
|
189 * \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
|
190 * \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
|
191 * \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
|
192 * \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
|
193 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
194 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
|
195 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
196 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
197 * \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
|
198 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
199 * \brief The flags on 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
|
200 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
201 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
|
202 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
203 SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window, implies borderless */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
204 SDL_WINDOW_BORDERLESS = 0x00000002, /**< no window decoration */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
205 SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
206 SDL_WINDOW_OPENGL = 0x00000008, /**< window usable with OpenGL context */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
207 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
|
208 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
|
209 SDL_WINDOW_MINIMIZED = 0x00000040, /**< 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
|
210 SDL_WINDOW_INPUT_GRABBED = 0x00000080, /**< window has grabbed input 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
|
211 SDL_WINDOW_KEYBOARD_FOCUS = 0x00000100, /**< window has 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
|
212 SDL_WINDOW_MOUSE_FOCUS = 0x00000200, /**< window has 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
|
213 } 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
|
214 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
215 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
216 * \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
|
217 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
218 * \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
|
219 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
220 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
|
221 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
222 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
|
223 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
|
224 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
|
225 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
|
226 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
|
227 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
|
228 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
|
229 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
|
230 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
|
231 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
|
232 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
|
233 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
|
234 } 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
|
235 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
236 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
237 * \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
|
238 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
239 * \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
|
240 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
241 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
|
242 { |
0 | 243 SDL_GL_RED_SIZE, |
244 SDL_GL_GREEN_SIZE, | |
245 SDL_GL_BLUE_SIZE, | |
246 SDL_GL_ALPHA_SIZE, | |
247 SDL_GL_BUFFER_SIZE, | |
248 SDL_GL_DOUBLEBUFFER, | |
249 SDL_GL_DEPTH_SIZE, | |
250 SDL_GL_STENCIL_SIZE, | |
251 SDL_GL_ACCUM_RED_SIZE, | |
252 SDL_GL_ACCUM_GREEN_SIZE, | |
253 SDL_GL_ACCUM_BLUE_SIZE, | |
450
8a43e0cbf02f
Added SDL_GL_STEREO for stereoscopic OpenGL contexts
Sam Lantinga <slouken@libsdl.org>
parents:
432
diff
changeset
|
254 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
|
255 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
|
256 SDL_GL_MULTISAMPLEBUFFERS, |
1656 | 257 SDL_GL_MULTISAMPLESAMPLES, |
258 SDL_GL_ACCELERATED_VISUAL, | |
259 SDL_GL_SWAP_CONTROL | |
0 | 260 } SDL_GLattr; |
261 | |
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
|
262 /* These are the currently supported flags for the SDL_surface */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
263 #define SDL_SWSURFACE 0x00000000 /* Surface is in system memory */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
264 #define SDL_HWSURFACE 0x00000001 /* Surface is in video memory */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
265 /* Available for SDL_CreateWindowSurface() */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
266 #define SDL_ANYFORMAT 0x10000000 /* Allow any video depth/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
|
267 #define SDL_HWPALETTE 0x20000000 /* Surface has exclusive palette */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
268 #define SDL_DOUBLEBUF 0x40000000 /* Set up double-buffered surface */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
269 /* Used internally (read-only) */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
270 #define SDL_HWACCEL 0x00000100 /* Blit uses hardware acceleration */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
271 #define SDL_SRCCOLORKEY 0x00001000 /* Blit uses a source color key */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
272 #define SDL_RLEACCELOK 0x00002000 /* Private flag */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
273 #define SDL_RLEACCEL 0x00004000 /* Surface is RLE encoded */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
274 #define SDL_SRCALPHA 0x00010000 /* Blit uses source alpha blending */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
275 #define SDL_PREALLOC 0x00100000 /* Surface uses preallocated memory */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
276 #define SDL_SCREEN_SURFACE 0x01000000 /* Surface is a window screen surface */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
277 #define SDL_SHADOW_SURFACE 0x02000000 /* Surface is a window shadow surface */ |
0 | 278 |
279 /* Function prototypes */ | |
280 | |
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
|
281 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
282 * \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
|
283 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
284 * \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
|
285 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
286 * \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
|
287 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
288 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
|
289 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
290 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
291 * \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
|
292 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
294 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
296 * 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
|
297 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
298 * \sa SDL_GetNumVideoDrivers() |
1660
8b9d79e7eacf
Added API requested in bug #43:
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
299 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
300 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
|
301 |
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
|
302 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
303 * \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
|
304 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
305 * \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
|
306 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
307 * \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
|
308 * \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
|
309 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
310 * \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
|
311 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
312 * 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
|
313 * 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
|
314 * 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
|
315 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
316 * \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
|
317 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
318 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
319 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
323 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
325 * |
782fd950bd46
Revamp of the video system in 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 * This function closes all windows, and restores the original video mode. |
0 | 327 * |
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 * \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
|
329 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
330 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
334 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
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 * \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
|
338 * 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
|
339 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
340 * \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
|
341 * \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
|
342 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
343 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
|
344 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
345 /** |
782fd950bd46
Revamp of the video system in 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 * \fn const SDL_VideoInfo *SDL_GetVideoInfo(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
|
347 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
348 * \brief Returns information about the currently initialized video driver. |
0 | 349 * |
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
|
350 * \return A read-only pointer to information about the video hardware, |
782fd950bd46
Revamp of the video system in 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 * or NULL if no video driver 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
|
352 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
353 extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
357 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
358 * \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
|
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 * \sa SDL_SelectVideoDisplay() |
0 | 361 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
362 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void); |
0 | 363 |
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
|
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 * \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
|
366 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
368 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
369 * \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
|
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 * \sa SDL_GetNumVideoDisplays() |
0 | 372 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
373 extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index); |
0 | 374 |
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
|
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 * \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
|
377 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
379 * |
782fd950bd46
Revamp of the video system in 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_GetDisplayMode() |
0 | 381 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
382 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void); |
0 | 383 |
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
|
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 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
|
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 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
|
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 * \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
|
390 * \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
|
391 * \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
|
392 * \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
|
393 * \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
|
394 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
395 * \sa SDL_GetNumDisplayModes() |
0 | 396 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
397 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
|
398 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
399 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
400 * \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
|
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 * \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
|
403 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
404 extern DECLSPEC const SDL_DisplayMode *SDLCALL |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
405 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
409 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
411 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
412 extern DECLSPEC const SDL_DisplayMode *SDLCALL |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
413 SDL_GetCurrentDisplayMode(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 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
|
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 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
|
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 * \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
|
421 * \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
|
422 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
424 * |
782fd950bd46
Revamp of the video system in 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 * 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
|
426 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
427 * \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
|
428 * \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
|
429 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
430 extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
431 SDL_DisplayMode |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
432 * mode, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
433 SDL_DisplayMode |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
434 * 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
|
435 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
436 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
437 * \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
|
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 * \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
|
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 * \param mode The desired display mode |
0 | 442 * |
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
|
443 * \return 0 on success, or -1 if setting the display mode failed. |
0 | 444 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
445 extern DECLSPEC int SDLCALL SDL_SetDisplayMode(const SDL_DisplayMode * mode); |
0 | 446 |
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
|
447 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
449 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
450 * \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
|
451 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
452 * \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
|
453 * \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
|
454 * \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
|
455 * \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
|
456 * \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
|
457 * \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
|
458 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
460 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
461 * \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
|
462 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
463 * \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
|
464 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
465 extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow(const char *title, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
466 int x, int y, int w, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
467 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
|
468 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
469 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
471 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
472 * \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
|
473 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
475 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
476 * \return The id of the window created, or zero if window creation failed. |
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 * \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
|
479 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
480 * \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
|
481 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
482 extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindowFrom(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
|
483 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
484 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
485 * \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
|
486 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
487 * \brief Get the window flags. |
0 | 488 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
489 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
|
490 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
491 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
492 * \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
|
493 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
494 * \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
|
495 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
496 * \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
|
497 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
498 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
499 const char *title); |
0 | 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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
503 * |
782fd950bd46
Revamp of the video system in 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 * \brief Get the title of the window, in UTF-8 format. |
0 | 505 * |
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
|
506 * \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
|
507 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
508 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
|
509 |
782fd950bd46
Revamp of the video system in 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 /** |
782fd950bd46
Revamp of the video system in 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 * \fn void SDL_SetWindowIcon(SDL_Surface *icon) |
0 | 512 * |
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
|
513 * \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
|
514 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
516 * |
782fd950bd46
Revamp of the video system in 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 * 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
|
518 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
519 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
|
520 |
782fd950bd46
Revamp of the video system in 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 * \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
|
523 * |
782fd950bd46
Revamp of the video system in 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 * \brief Associate an arbitrary pointer with the window. |
0 | 525 * |
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
|
526 * \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
|
527 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
528 extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
529 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
|
530 |
782fd950bd46
Revamp of the video system in 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 /** |
782fd950bd46
Revamp of the video system in 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 * \fn void *SDL_GetWindowData(SDL_WindowID windowID) |
0 | 533 * |
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
|
534 * \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
|
535 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
537 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
538 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
|
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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
541 * \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
|
542 * |
782fd950bd46
Revamp of the video system in 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 * \brief Set the position of the window. |
0 | 544 * |
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
|
545 * \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
|
546 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
547 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
548 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
|
549 |
782fd950bd46
Revamp of the video system in 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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
551 * \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
|
552 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
553 * \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
|
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 * \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
|
556 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
557 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
558 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
|
559 |
782fd950bd46
Revamp of the video system in 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 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
561 * \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
|
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 * \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
|
564 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
565 * \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
|
566 * 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
|
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 * \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
|
569 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
570 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
|
571 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
|
572 |
782fd950bd46
Revamp of the video system in 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 * \fn void SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *w) |
0 | 575 * |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
576 * \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
|
577 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
578 * \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
|
579 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
580 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
|
581 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
|
582 |
782fd950bd46
Revamp of the video system in 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 * \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
|
585 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
586 * \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
|
587 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
589 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
590 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
|
591 |
782fd950bd46
Revamp of the video system in 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 * \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
|
594 * |
782fd950bd46
Revamp of the video system in 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 * \brief Hide the window |
0 | 596 * |
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
|
597 * \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
|
598 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
599 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
|
600 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
601 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
602 * \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
|
603 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
604 * \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
|
605 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
606 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
|
607 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
608 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
610 * |
782fd950bd46
Revamp of the video system in 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 * \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
|
612 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
613 * \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
|
614 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
615 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
|
616 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
617 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
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 * \brief Minimize the window to an iconic representation. |
0 | 621 * |
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
|
622 * \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
|
623 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
624 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
|
625 |
782fd950bd46
Revamp of the video system in 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 * \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
|
628 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
629 * \brief Restore the size and position of a minimized or maximized window. |
0 | 630 * |
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 * \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
|
632 * \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
|
633 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
634 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
|
635 |
782fd950bd46
Revamp of the video system in 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 * \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
|
638 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
639 * \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
|
640 * |
782fd950bd46
Revamp of the video system in 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 * \param mode This is 1 to grab input, and 0 to release input. |
0 | 642 * |
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
|
643 * \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
|
644 * \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
|
645 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
646 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_WindowID windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
647 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
|
648 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
649 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
650 * \fn 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
|
651 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
652 * \brief 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
|
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 * \return This returns 1 if input is grabbed, and 0 otherwise. |
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_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
|
657 * \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
|
658 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
659 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
|
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 /** |
782fd950bd46
Revamp of the video system in 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 * \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
|
663 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
664 * \brief Destroy a window. |
0 | 665 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
666 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
|
667 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
668 /** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
669 * \fn SDL_Surface *SDL_CreateWindowSurface (SDL_WindowID windowID, Uint32 format, 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
|
670 * |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
671 * \brief Create an SDL_Surface representing the drawing area 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
|
672 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
673 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateWindowSurface(SDL_WindowID |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
674 windowID, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
675 Uint32 format, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
676 Uint32 flags); |
0 | 677 |
678 /* | |
679 * Makes sure the given list of rectangles is updated on the given screen. | |
680 * If 'x', 'y', 'w' and 'h' are all 0, SDL_UpdateRect will update the entire | |
681 * screen. | |
682 * These functions should not be called while 'screen' is locked. | |
683 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
684 extern DECLSPEC void SDLCALL SDL_UpdateRects |
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
|
685 (SDL_Surface * screen, int numrects, SDL_Rect * rects); |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
686 extern DECLSPEC void SDLCALL SDL_UpdateRect |
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
|
687 (SDL_Surface * screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h); |
0 | 688 |
689 /* | |
690 * On hardware that supports double-buffering, this function sets up a flip | |
691 * and returns. The hardware will wait for vertical retrace, and then swap | |
692 * video buffers before the next video surface blit or lock will return. | |
693 * On hardware that doesn not support double-buffering, this is equivalent | |
694 * to calling SDL_UpdateRect(screen, 0, 0, 0, 0); | |
695 * The SDL_DOUBLEBUF flag must have been passed to SDL_SetVideoMode() when | |
696 * setting the video mode for this function to perform hardware flipping. | |
697 * This function returns 0 if successful, or -1 if there was an error. | |
698 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
699 extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen); |
0 | 700 |
701 /* | |
702 * Set the gamma correction for each of the color channels. | |
703 * The gamma values range (approximately) between 0.1 and 10.0 | |
704 * | |
705 * If this function isn't supported directly by the hardware, it will | |
706 * be emulated using gamma ramps, if available. If successful, this | |
707 * function returns 0, otherwise it returns -1. | |
708 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
709 extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue); |
0 | 710 |
711 /* | |
712 * Set the gamma translation table for the red, green, and blue channels | |
713 * of the video hardware. Each table is an array of 256 16-bit quantities, | |
714 * representing a mapping between the input and output for that channel. | |
715 * The input is the index into the array, and the output is the 16-bit | |
716 * gamma value at that index, scaled to the output color precision. | |
717 * | |
718 * You may pass NULL for any of the channels to leave it unchanged. | |
719 * If the call succeeds, it will return 0. If the display driver or | |
720 * hardware does not support gamma translation, or otherwise fails, | |
721 * this function will return -1. | |
722 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
723 extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
724 const Uint16 * green, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
725 const Uint16 * blue); |
0 | 726 |
727 /* | |
728 * Retrieve the current values of the gamma translation tables. | |
729 * | |
730 * You must pass in valid pointers to arrays of 256 16-bit quantities. | |
731 * Any of the pointers may be NULL to ignore that channel. | |
732 * If the call succeeds, it will return 0. If the display driver or | |
733 * hardware does not support gamma translation, or otherwise fails, | |
734 * this function will return -1. | |
735 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
736 extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
737 Uint16 * blue); |
0 | 738 |
739 /* | |
740 * Sets a portion of the colormap for the given 8-bit surface. If 'surface' | |
741 * is not a palettized surface, this function does nothing, returning 0. | |
742 * If all of the colors were set as passed to SDL_SetColors(), it will | |
743 * return 1. If not all the color entries were set exactly as given, | |
744 * it will return 0, and you should look at the surface palette to | |
745 * determine the actual color palette. | |
746 * | |
747 * When 'surface' is the surface associated with the current display, the | |
748 * display colormap will be updated with the requested colors. If | |
749 * SDL_HWPALETTE was set in SDL_SetVideoMode() flags, SDL_SetColors() | |
750 * will always return 1, and the palette is guaranteed to be set the way | |
751 * you desire, even if the window colormap has to be warped or run under | |
752 * emulation. | |
753 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
754 extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
755 SDL_Color * colors, int firstcolor, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
756 int ncolors); |
0 | 757 |
758 /* | |
759 * Maps an RGB triple to an opaque pixel value for a given pixel format | |
760 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
761 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
|
762 (SDL_PixelFormat * format, Uint8 r, Uint8 g, Uint8 b); |
0 | 763 |
764 /* | |
765 * Maps an RGBA quadruple to a pixel value for a given pixel format | |
766 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
767 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(SDL_PixelFormat * format, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
768 Uint8 r, Uint8 g, Uint8 b, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
769 Uint8 a); |
0 | 770 |
771 /* | |
772 * Maps a pixel value into the RGB components for a given pixel format | |
773 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
774 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
|
775 Uint8 * r, Uint8 * g, Uint8 * b); |
0 | 776 |
777 /* | |
778 * Maps a pixel value into the RGBA components for a given pixel format | |
779 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
780 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
|
781 Uint8 * r, Uint8 * g, Uint8 * b, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
782 Uint8 * a); |
0 | 783 |
784 /* | |
785 * Allocate and free an RGB surface (must be called after SDL_SetVideoMode) | |
786 * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. | |
787 * If the depth is greater than 8 bits, the pixel format is set using the | |
788 * flags '[RGB]mask'. | |
789 * If the function runs out of memory, it will return NULL. | |
790 * | |
791 * The 'flags' tell what kind of surface to create. | |
792 * SDL_SWSURFACE means that the surface should be created in system memory. | |
793 * SDL_HWSURFACE means that the surface should be created in video memory, | |
794 * with the same format as the display surface. This is useful for surfaces | |
795 * that will not change much, to take advantage of hardware acceleration | |
796 * when being blitted to the display surface. | |
797 * SDL_ASYNCBLIT means that SDL will try to perform asynchronous blits with | |
798 * this surface, but you must always lock it before accessing the pixels. | |
799 * SDL will wait for current blits to finish before returning from the lock. | |
800 * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits. | |
801 * If the hardware supports acceleration of colorkey blits between | |
802 * two surfaces in video memory, SDL will try to place the surface in | |
803 * video memory. If this isn't possible or if there is no hardware | |
804 * acceleration available, the surface will be placed in system memory. | |
805 * SDL_SRCALPHA means that the surface will be used for alpha blits and | |
806 * if the hardware supports hardware acceleration of alpha blits between | |
807 * two surfaces in video memory, to place the surface in video memory | |
808 * if possible, otherwise it will be placed in system memory. | |
809 * If the surface is created in video memory, blits will be _much_ faster, | |
810 * but the surface format must be identical to the video surface format, | |
811 * and the only way to access the pixels member of the surface is to use | |
812 * the SDL_LockSurface() and SDL_UnlockSurface() calls. | |
813 * If the requested surface actually resides in video memory, SDL_HWSURFACE | |
814 * will be set in the flags member of the returned surface. If for some | |
815 * reason the surface could not be placed in video memory, it will not have | |
816 * the SDL_HWSURFACE flag set, and will be created in system memory instead. | |
817 */ | |
818 #define SDL_AllocSurface SDL_CreateRGBSurface | |
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
|
819 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
|
820 (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
|
821 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
822 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
823 int width, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
824 int height, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
825 int depth, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
826 int pitch, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
827 Uint32 Rmask, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
828 Uint32 Gmask, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
829 Uint32 Bmask, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
830 Uint32 Amask); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
831 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); |
0 | 832 |
833 /* | |
834 * SDL_LockSurface() sets up a surface for directly accessing the pixels. | |
835 * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write | |
836 * to and read from 'surface->pixels', using the pixel format stored in | |
837 * 'surface->format'. Once you are done accessing the surface, you should | |
838 * use SDL_UnlockSurface() to release it. | |
839 * | |
840 * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates | |
841 * to 0, then you can read and write to the surface at any time, and the | |
842 * pixel format of the surface will not change. In particular, if the | |
843 * SDL_HWSURFACE flag is not given when calling SDL_SetVideoMode(), you | |
844 * will not need to lock the display surface before accessing it. | |
845 * | |
846 * No operating system or library calls should be made between lock/unlock | |
847 * pairs, as critical system locks may be held during this time. | |
848 * | |
849 * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. | |
850 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
851 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
852 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); |
0 | 853 |
854 /* | |
855 * Load a surface from a seekable SDL data source (memory or file.) | |
856 * If 'freesrc' is non-zero, the source will be closed after being read. | |
857 * Returns the new surface, or NULL if there was an error. | |
858 * The new surface should be freed with SDL_FreeSurface(). | |
859 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
860 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
|
861 int freesrc); |
0 | 862 |
863 /* Convenience macro -- load a surface from a file */ | |
864 #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) | |
865 | |
866 /* | |
867 * Save a surface to a seekable SDL data source (memory or file.) | |
868 * If 'freedst' is non-zero, the source will be closed after being written. | |
869 * Returns 0 if successful or -1 if there was an error. | |
870 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
871 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
|
872 (SDL_Surface * surface, SDL_RWops * dst, int freedst); |
0 | 873 |
874 /* Convenience macro -- save a surface to a file */ | |
875 #define SDL_SaveBMP(surface, file) \ | |
876 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) | |
877 | |
878 /* | |
879 * Sets the color key (transparent pixel) in a blittable surface. | |
880 * If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL), | |
881 * 'key' will be the transparent pixel in the source image of a blit. | |
882 * SDL_RLEACCEL requests RLE acceleration for the surface if present, | |
883 * and removes RLE acceleration if absent. | |
884 * If 'flag' is 0, this function clears any current color key. | |
885 * This function returns 0, or -1 if there was an error. | |
886 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
887 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
|
888 (SDL_Surface * surface, Uint32 flag, Uint32 key); |
0 | 889 |
890 /* | |
891 * This function sets the alpha value for the entire surface, as opposed to | |
892 * using the alpha component of each pixel. This value measures the range | |
893 * of transparency of the surface, 0 being completely transparent to 255 | |
894 * being completely opaque. An 'alpha' value of 255 causes blits to be | |
895 * opaque, the source pixels copied to the destination (the default). Note | |
896 * that per-surface alpha can be combined with colorkey transparency. | |
897 * | |
898 * If 'flag' is 0, alpha blending is disabled for the surface. | |
899 * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface. | |
900 * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the | |
901 * 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
|
902 * |
80a35d43a58f
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
431
diff
changeset
|
903 * The 'alpha' parameter is ignored for surfaces that have an alpha channel. |
0 | 904 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
905 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
|
906 Uint8 alpha); |
0 | 907 |
908 /* | |
909 * Sets the clipping rectangle for the destination surface in a blit. | |
910 * | |
911 * If the clip rectangle is NULL, clipping will be disabled. | |
912 * If the clip rectangle doesn't intersect the surface, the function will | |
913 * return SDL_FALSE and blits will be completely clipped. Otherwise the | |
914 * function returns SDL_TRUE and blits to the surface will be clipped to | |
915 * the intersection of the surface area and the clipping rectangle. | |
916 * | |
917 * Note that blits are automatically clipped to the edges of the source | |
918 * and destination surfaces. | |
919 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
920 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
921 const SDL_Rect * rect); |
0 | 922 |
923 /* | |
924 * Gets the clipping rectangle for the destination surface in a blit. | |
925 * 'rect' must be a pointer to a valid rectangle which will be filled | |
926 * with the correct values. | |
927 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
928 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
929 SDL_Rect * rect); |
0 | 930 |
931 /* | |
932 * Creates a new surface of the specified format, and then copies and maps | |
933 * the given surface to it so the blit of the converted surface will be as | |
934 * fast as possible. If this function fails, it returns NULL. | |
935 * | |
936 * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those | |
937 * semantics. You can also pass SDL_RLEACCEL in the flags parameter and | |
938 * SDL will try to RLE accelerate colorkey and alpha blits in the resulting | |
939 * surface. | |
940 * | |
941 * This function is used internally by SDL_DisplayFormat(). | |
942 */ | |
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
|
943 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
|
944 (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags); |
0 | 945 |
946 /* | |
947 * This performs a fast blit from the source surface to the destination | |
948 * surface. It assumes that the source and destination rectangles are | |
949 * the same size. If either 'srcrect' or 'dstrect' are NULL, the entire | |
950 * surface (src or dst) is copied. The final blit rectangles are saved | |
951 * in 'srcrect' and 'dstrect' after all clipping is performed. | |
952 * If the blit is successful, it returns 0, otherwise it returns -1. | |
953 * | |
954 * The blit function should not be called on a locked surface. | |
955 * | |
956 * The blit semantics for surfaces with and without alpha and colorkey | |
957 * are defined as follows: | |
958 * | |
959 * RGBA->RGB: | |
960 * SDL_SRCALPHA set: | |
961 * alpha-blend (using alpha-channel). | |
962 * SDL_SRCCOLORKEY ignored. | |
963 * SDL_SRCALPHA not set: | |
964 * copy RGB. | |
965 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
966 * RGB values of the source colour key, ignoring alpha in the | |
967 * comparison. | |
968 * | |
969 * RGB->RGBA: | |
970 * SDL_SRCALPHA set: | |
971 * alpha-blend (using the source per-surface alpha value); | |
972 * set destination alpha to opaque. | |
973 * SDL_SRCALPHA not set: | |
431
41cadcba32e8
Fixed SDL_DisplayFormatAlpha() on RGB surfaces with alpha
Sam Lantinga <slouken@libsdl.org>
parents:
337
diff
changeset
|
974 * copy RGB, set destination alpha to source per-surface alpha value. |
0 | 975 * both: |
976 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
977 * source colour key. | |
978 * | |
979 * RGBA->RGBA: | |
980 * SDL_SRCALPHA set: | |
981 * alpha-blend (using the source alpha channel) the RGB values; | |
982 * leave destination alpha untouched. [Note: is this correct?] | |
983 * SDL_SRCCOLORKEY ignored. | |
984 * SDL_SRCALPHA not set: | |
985 * copy all of RGBA to the destination. | |
986 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
987 * RGB values of the source colour key, ignoring alpha in the | |
988 * comparison. | |
989 * | |
990 * RGB->RGB: | |
991 * SDL_SRCALPHA set: | |
992 * alpha-blend (using the source per-surface alpha value). | |
993 * SDL_SRCALPHA not set: | |
994 * copy RGB. | |
995 * both: | |
996 * if SDL_SRCCOLORKEY set, only copy the pixels matching the | |
997 * source colour key. | |
998 * | |
999 * If either of the surfaces were in video memory, and the blit returns -2, | |
1000 * the video memory was lost, so it should be reloaded with artwork and | |
1001 * re-blitted: | |
1002 while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { | |
1003 while ( SDL_LockSurface(image) < 0 ) | |
1004 Sleep(10); | |
1005 -- Write image pixels to image->pixels -- | |
1006 SDL_UnlockSurface(image); | |
1007 } | |
1008 * This happens under DirectX 5.0 when the system switches away from your | |
1009 * fullscreen application. The lock will also fail until you have access | |
1010 * to the video memory again. | |
1011 */ | |
1012 /* You should call SDL_BlitSurface() unless you know exactly how SDL | |
1013 blitting works internally and how to use the other blit functions. | |
1014 */ | |
1015 #define SDL_BlitSurface SDL_UpperBlit | |
1016 | |
1017 /* This is the public blit function, SDL_BlitSurface(), and it performs | |
1018 rectangle validation and clipping before passing it to SDL_LowerBlit() | |
1019 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1020 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
|
1021 (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
|
1022 SDL_Surface * dst, SDL_Rect * dstrect); |
0 | 1023 /* This is a semi-private blit function and it performs low-level surface |
1024 blitting only. | |
1025 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1026 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
|
1027 (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
|
1028 SDL_Surface * dst, SDL_Rect * dstrect); |
0 | 1029 |
1030 /* | |
1031 * This function performs a fast fill of the given rectangle with 'color' | |
1032 * The given rectangle is clipped to the destination surface clip area | |
1033 * and the final fill rectangle is saved in the passed in pointer. | |
1034 * If 'dstrect' is NULL, the whole surface will be filled with 'color' | |
1035 * The color should be a pixel of the format used by the surface, and | |
1036 * can be generated by the SDL_MapRGB() function. | |
1037 * This function returns 0 on success, or -1 on error. | |
1038 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1039 extern DECLSPEC int SDLCALL SDL_FillRect |
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
|
1040 (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color); |
0 | 1041 |
1042 /* | |
1043 * This function takes a surface and copies it to a new surface of the | |
1044 * pixel format and colors of the video framebuffer, suitable for fast | |
1045 * blitting onto the display surface. It calls SDL_ConvertSurface() | |
1046 * | |
1047 * If you want to take advantage of hardware colorkey or alpha blit | |
1048 * acceleration, you should set the colorkey and alpha value before | |
1049 * calling this function. | |
1050 * | |
1051 * If the conversion fails or runs out of memory, it returns NULL | |
1052 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1053 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface); |
0 | 1054 |
1055 /* | |
1056 * This function takes a surface and copies it to a new surface of the | |
1057 * pixel format and colors of the video framebuffer (if possible), | |
1058 * suitable for fast alpha blitting onto the display surface. | |
1059 * The new surface will always have an alpha channel. | |
1060 * | |
1061 * If you want to take advantage of hardware colorkey or alpha blit | |
1062 * acceleration, you should set the colorkey and alpha value before | |
1063 * calling this function. | |
1064 * | |
1065 * If the conversion fails or runs out of memory, it returns NULL | |
1066 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1067 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface * |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1068 surface); |
0 | 1069 |
1070 | |
1071 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
1072 /* YUV video surface overlay functions */ | |
1073 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
1074 | |
1075 /* This function creates a video output overlay | |
1076 Calling the returned surface an overlay is something of a misnomer because | |
1077 the contents of the display surface underneath the area where the overlay | |
1078 is shown is undefined - it may be overwritten with the converted YUV data. | |
1079 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1080 extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1081 int height, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1082 Uint32 format, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1083 SDL_Surface * |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1084 display); |
0 | 1085 |
1086 /* Lock an overlay for direct access, and unlock it when you are done */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1087 extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1088 extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay); |
0 | 1089 |
1090 /* Blit a video overlay to the display surface. | |
1091 The contents of the video surface underneath the blit destination are | |
1092 not defined. | |
1093 The width and height of the destination rectangle may be different from | |
1094 that of the overlay, but currently only 2x scaling is supported. | |
1095 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1096 extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1097 SDL_Rect * dstrect); |
0 | 1098 |
1099 /* Free a video overlay */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1100 extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay); |
0 | 1101 |
1102 | |
1103 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
1104 /* OpenGL support functions. */ | |
1105 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
1106 | |
1107 /* | |
1490
8f3e602904d1
Dynamic OpenGL loading is the default now. :)
Sam Lantinga <slouken@libsdl.org>
parents:
1358
diff
changeset
|
1108 * Dynamically load an OpenGL library, or the default one if path is NULL |
0 | 1109 * |
1110 * If you do this, you need to retrieve all of the GL functions used in | |
1111 * your program from the dynamic library using SDL_GL_GetProcAddress(). | |
1112 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1113 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path); |
0 | 1114 |
1115 /* | |
1490
8f3e602904d1
Dynamic OpenGL loading is the default now. :)
Sam Lantinga <slouken@libsdl.org>
parents:
1358
diff
changeset
|
1116 * Get the address of a GL function |
0 | 1117 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1118 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc); |
0 | 1119 |
1120 /* | |
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
|
1121 * Set an attribute of the OpenGL subsystem before window creation. |
0 | 1122 */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1123 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); |
0 | 1124 |
1125 /* | |
1126 * Get an attribute of the OpenGL subsystem from the windowing | |
1127 * interface, such as glX. This is of course different from getting | |
1128 * the values from SDL's internal OpenGL subsystem, which only | |
1129 * stores the values you request before initialization. | |
1130 * | |
1131 * Developers should track the values they pass into SDL_GL_SetAttribute | |
1132 * themselves if they want to retrieve these values. | |
1133 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1134 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value); |
0 | 1135 |
1136 /* | |
1137 * Swap the OpenGL buffers, if double-buffering is supported. | |
1138 */ | |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1139 extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void); |
0 | 1140 |
47
45b1c4303f87
Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1141 /* Not in public API at the moment - do not use! */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1142 extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1143 SDL_Rect * srcrect, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1144 SDL_Surface * dst, |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
1145 SDL_Rect * dstrect); |
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
|
1146 |
0 | 1147 /* Ends C function definitions when using C++ */ |
1148 #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
|
1149 /* *INDENT-OFF* */ |
0 | 1150 } |
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
|
1151 /* *INDENT-ON* */ |
0 | 1152 #endif |
1153 #include "close_code.h" | |
1154 | |
1155 #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
|
1156 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1660
diff
changeset
|
1157 /* vi: set ts=4 sw=4 expandtab: */ |