Mercurial > sdl-ios-xcode
annotate include/SDL_video.h @ 4447:947201caa46e
Added automated test to Xcode project plus needed changes to SDL_RWFromFile to be OS X bundle aware.
The Mac OS X project has a new target called testsdl which builds the automated test. I looked at using Xcode's native unit test support, but the impedance mismatch between the existing automated test structure and Apple's was more than I could handle.
As such, the testsdl application is a full blown proper OS X application, which means it is a self-contained .app bundle. This immediately revealed some problems from the automated test. The largest problem was the assumption about the current working directory and where to find resources. (I suspect Windows may have a similar problem depending on circumstance.) To open resources, the test was looking in directories relative to the SDL source directory, but this will not work well with self-contained .app bundles and Xcode which can place its built applications almost anywhere. And for real-world situations, this is pretty useless anyway.
So I modified SDL_RWFromFile to do special things on OS X. First, it will look for a file in the .app bundle. If not found, it will fallback and just call fopen as it used to do.
I also had to modify the automated test itself because it had a contrieved test which called fopen directly to do read from an existing FILE pointer. In addition, there was a write test. Since a .app bundle is likely going to be read-only, I added a special case for OS X to write to NSTemporaryDirectory.
I expect these changes should work for both Mac and iPhone OS (which includes iPad).
I will update the iPhone Xcode project next.
Finally, FYI, the X11 automated test seems to be failing. Below is my output.
Pending breakpoint 4 - "-[NSException raise]" resolved
Platform : All tests successful (2)
SDL_RWops : All tests successful (5)
Rect : All tests successful (1)
SDL_Surface : All tests successful (6)
Rendering with cocoa driver : All tests successful (3)
Assert Failed!
Blit output not the same.
Test Case 'Renderer x11'
Test Suite 'Rendering with x11 driver'
Last SDL error ''
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May 8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Rendering with x11 driver : Failed 1 out of 4 testcases!
Rendering with dummy driver : All tests successful (3)
SDL_Audio : All tests successful (1)
Tests run with SDL 1.3.0 revision 1095906
System is running Mac OS X and is little endian
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Sat, 08 May 2010 00:54:22 -0700 |
parents | f7b03b6838cb |
children | 3e69e077cb95 9a5db97cd569 c500594c4246 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
3697 | 3 Copyright (C) 1997-2010 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 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
23 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
24 * \file SDL_video.h |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
25 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
26 * Header file for SDL video functions. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
27 */ |
0 | 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" |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
33 #include "SDL_pixels.h" |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
2267
diff
changeset
|
34 #include "SDL_rect.h" |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
2267
diff
changeset
|
35 #include "SDL_surface.h" |
0 | 36 |
37 #include "begin_code.h" | |
38 /* Set up for C function definitions, even when using C++ */ | |
39 #ifdef __cplusplus | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
40 /* *INDENT-OFF* */ |
0 | 41 extern "C" { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
42 /* *INDENT-ON* */ |
0 | 43 #endif |
44 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
45 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
46 * \brief The structure that defines a display mode |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
47 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
48 * \sa SDL_GetNumDisplayModes() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
49 * \sa SDL_GetDisplayMode() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
50 * \sa SDL_GetDesktopDisplayMode() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
51 * \sa SDL_GetCurrentDisplayMode() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
52 * \sa SDL_GetClosestDisplayMode() |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3493
diff
changeset
|
53 * \sa SDL_SetWindowDisplayMode() |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3493
diff
changeset
|
54 * \sa SDL_GetWindowDisplayMode() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
55 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
56 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
57 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
58 Uint32 format; /**< pixel format */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
59 int w; /**< width */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
60 int h; /**< height */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
61 int refresh_rate; /**< refresh rate (or zero for unspecified) */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
62 void *driverdata; /**< driver-specific data, initialize to 0 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
63 } SDL_DisplayMode; |
0 | 64 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
65 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
66 * \brief The type used to identify a window |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
67 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
68 * \sa SDL_CreateWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
69 * \sa SDL_CreateWindowFrom() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
70 * \sa SDL_DestroyWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
71 * \sa SDL_GetWindowData() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
72 * \sa SDL_GetWindowFlags() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
73 * \sa SDL_GetWindowGrab() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
74 * \sa SDL_GetWindowPosition() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
75 * \sa SDL_GetWindowSize() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
76 * \sa SDL_GetWindowTitle() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
77 * \sa SDL_HideWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
78 * \sa SDL_MaximizeWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
79 * \sa SDL_MinimizeWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
80 * \sa SDL_RaiseWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
81 * \sa SDL_RestoreWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
82 * \sa SDL_SetWindowData() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
83 * \sa SDL_SetWindowFullscreen() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
84 * \sa SDL_SetWindowGrab() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
85 * \sa SDL_SetWindowIcon() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
86 * \sa SDL_SetWindowPosition() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
87 * \sa SDL_SetWindowSize() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
88 * \sa SDL_SetWindowTitle() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
89 * \sa SDL_ShowWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
90 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
91 struct SDL_Window; |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
92 typedef struct SDL_Window SDL_Window; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
93 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
94 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
95 * \brief The flags on a window |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
96 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
97 * \sa SDL_GetWindowFlags() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
98 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
99 typedef enum |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
100 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
101 SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window, implies borderless */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
102 SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
103 SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
104 SDL_WINDOW_BORDERLESS = 0x00000008, /**< no window decoration */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
105 SDL_WINDOW_RESIZABLE = 0x00000010, /**< window can be resized */ |
3523
d38acda781ae
Made the window flag comments more consistent
Sam Lantinga <slouken@libsdl.org>
parents:
3522
diff
changeset
|
106 SDL_WINDOW_MINIMIZED = 0x00000020, /**< window is minimized */ |
d38acda781ae
Made the window flag comments more consistent
Sam Lantinga <slouken@libsdl.org>
parents:
3522
diff
changeset
|
107 SDL_WINDOW_MAXIMIZED = 0x00000040, /**< window is maximized */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
108 SDL_WINDOW_INPUT_GRABBED = 0x00000100, /**< window has grabbed input focus */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
109 SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */ |
3057
089a77aebb7d
Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents:
3033
diff
changeset
|
110 SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */ |
089a77aebb7d
Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents:
3033
diff
changeset
|
111 SDL_WINDOW_FOREIGN = 0x00000800 /**< window not created by SDL */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
112 } SDL_WindowFlags; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
113 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
114 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
115 * \brief Used to indicate that you don't care what the window position is. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
116 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
117 #define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
118 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
119 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
120 * \brief Used to indicate that the window position should be centered. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
121 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
122 #define SDL_WINDOWPOS_CENTERED 0x7FFFFFE |
0 | 123 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
124 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
125 * \brief Event subtype for window events |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
126 */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
127 typedef enum |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
128 { |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
129 SDL_WINDOWEVENT_NONE, /**< Never used */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
130 SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
131 SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
132 SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
133 redrawn */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
134 SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
135 */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
136 SDL_WINDOWEVENT_RESIZED, /**< Window size changed to data1xdata2 */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
137 SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
138 SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
139 SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
140 and position */ |
3691
9fed2aa469ed
Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents:
3685
diff
changeset
|
141 SDL_WINDOWEVENT_ENTER, /**< Window has gained mouse focus */ |
9fed2aa469ed
Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents:
3685
diff
changeset
|
142 SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */ |
9fed2aa469ed
Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents:
3685
diff
changeset
|
143 SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */ |
9fed2aa469ed
Documentation consistency
Sam Lantinga <slouken@libsdl.org>
parents:
3685
diff
changeset
|
144 SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */ |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
145 SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
146 window be closed */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
147 } SDL_WindowEventID; |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
148 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
149 /** |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
150 * \brief Flags used when creating a rendering context |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
151 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
152 typedef enum |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
153 { |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
154 SDL_RENDERER_SINGLEBUFFER = 0x00000001, /**< Render directly to the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
155 window, if possible */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
156 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
157 SDL_RENDERER_PRESENTCOPY = 0x00000002, /**< Present uses a copy from |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
158 back buffer to the front |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
159 buffer */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
160 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
161 SDL_RENDERER_PRESENTFLIP2 = 0x00000004, /**< Present uses a flip, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
162 swapping back buffer and |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
163 front buffer */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
164 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
165 SDL_RENDERER_PRESENTFLIP3 = 0x00000008, /**< Present uses a flip, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
166 rotating between two back |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
167 buffers and a front buffer |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
168 */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
169 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
170 SDL_RENDERER_PRESENTDISCARD = 0x00000010, /**< Present leaves the contents |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
171 of the backbuffer undefined |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
172 */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
173 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
174 SDL_RENDERER_PRESENTVSYNC = 0x00000020, /**< Present is synchronized |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
175 with the refresh rate */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
176 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
177 SDL_RENDERER_ACCELERATED = 0x00000040 /**< The renderer uses hardware |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
178 acceleration */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
179 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
180 } SDL_RendererFlags; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
181 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
182 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
183 * \brief Information on the capabilities of a render driver or context. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
184 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
185 typedef struct SDL_RendererInfo |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
186 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
187 const char *name; /**< The name of the renderer */ |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
188 Uint32 flags; /**< Supported ::SDL_RendererFlags */ |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
189 Uint32 mod_modes; /**< A mask of supported channel modulation */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
190 Uint32 blend_modes; /**< A mask of supported blend modes */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
191 Uint32 scale_modes; /**< A mask of supported scale modes */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
192 Uint32 num_texture_formats; /**< The number of available texture formats */ |
1920
8a162bfdc838
Convert SDL_malloc to SDL_calloc if appropriate, slightly faster on operating systems which map the zero page for memory allocations.
Sam Lantinga <slouken@libsdl.org>
parents:
1912
diff
changeset
|
193 Uint32 texture_formats[20]; /**< The available texture formats */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
194 int max_texture_width; /**< The maximimum texture width */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
195 int max_texture_height; /**< The maximimum texture height */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
196 } SDL_RendererInfo; |
0 | 197 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
198 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
199 * \brief The access pattern allowed for a texture. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
200 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
201 typedef enum |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
202 { |
2222
926294b2bb4e
Emphasized the separation between SDL_Surface and SDL_Texture
Sam Lantinga <slouken@libsdl.org>
parents:
2208
diff
changeset
|
203 SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */ |
926294b2bb4e
Emphasized the separation between SDL_Surface and SDL_Texture
Sam Lantinga <slouken@libsdl.org>
parents:
2208
diff
changeset
|
204 SDL_TEXTUREACCESS_STREAMING /**< Changes frequently, lockable */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
205 } SDL_TextureAccess; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
206 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
207 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
208 * \brief The texture channel modulation used in SDL_RenderCopy(). |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
209 */ |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
210 typedef enum |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
211 { |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
212 SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */ |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
213 SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */ |
2208 | 214 SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */ |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
215 } SDL_TextureModulate; |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
216 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
217 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
218 * \brief The blend mode used in SDL_RenderCopy() and drawing operations. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
219 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
220 typedef enum |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
221 { |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
222 SDL_BLENDMODE_NONE = 0x00000000, /**< No blending */ |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
223 SDL_BLENDMODE_MASK = 0x00000001, /**< dst = A ? src : dst |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
224 (alpha is mask) */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
225 |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
226 SDL_BLENDMODE_BLEND = 0x00000002, /**< dst = (src * A) + (dst * (1-A)) */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
227 SDL_BLENDMODE_ADD = 0x00000004, /**< dst = (src * A) + dst */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
228 SDL_BLENDMODE_MOD = 0x00000008 /**< dst = src * dst */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
229 } SDL_BlendMode; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
230 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
231 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
232 * \brief The texture scale mode used in SDL_RenderCopy(). |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
233 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
234 typedef enum |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
235 { |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
236 SDL_TEXTURESCALEMODE_NONE = 0x00000000, /**< No scaling, rectangles must |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
237 match dimensions */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
238 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
239 SDL_TEXTURESCALEMODE_FAST = 0x00000001, /**< Point sampling or |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
240 equivalent algorithm */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
241 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
242 SDL_TEXTURESCALEMODE_SLOW = 0x00000002, /**< Linear filtering or |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
243 equivalent algorithm */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
244 |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
245 SDL_TEXTURESCALEMODE_BEST = 0x00000004 /**< Bicubic filtering or |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
246 equivalent algorithm */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
247 } SDL_TextureScaleMode; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
248 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
249 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
250 * \brief An efficient driver-specific representation of pixel data |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
251 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
252 struct SDL_Texture; |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
253 typedef struct SDL_Texture SDL_Texture; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
254 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
255 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
256 * \brief An opaque handle to an OpenGL context. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
257 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
258 typedef void *SDL_GLContext; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
259 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
260 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
261 * \brief OpenGL configuration attributes |
0 | 262 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
263 typedef enum |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
264 { |
0 | 265 SDL_GL_RED_SIZE, |
266 SDL_GL_GREEN_SIZE, | |
267 SDL_GL_BLUE_SIZE, | |
268 SDL_GL_ALPHA_SIZE, | |
269 SDL_GL_BUFFER_SIZE, | |
270 SDL_GL_DOUBLEBUFFER, | |
271 SDL_GL_DEPTH_SIZE, | |
272 SDL_GL_STENCIL_SIZE, | |
273 SDL_GL_ACCUM_RED_SIZE, | |
274 SDL_GL_ACCUM_GREEN_SIZE, | |
275 SDL_GL_ACCUM_BLUE_SIZE, | |
450
8a43e0cbf02f
Added SDL_GL_STEREO for stereoscopic OpenGL contexts
Sam Lantinga <slouken@libsdl.org>
parents:
432
diff
changeset
|
276 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
|
277 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
|
278 SDL_GL_MULTISAMPLEBUFFERS, |
1736
3b2a92126f4d
Implemented bug #2, 117:
Sam Lantinga <slouken@libsdl.org>
parents:
1545
diff
changeset
|
279 SDL_GL_MULTISAMPLESAMPLES, |
2747
47519ce71def
Added SDL_GL_RETAINED_BACKING attribute to SDL_GLattr
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2275
diff
changeset
|
280 SDL_GL_ACCELERATED_VISUAL, |
3100
7dc982143c06
Date: Sun, 22 Mar 2009 12:52:29 +0000
Sam Lantinga <slouken@libsdl.org>
parents:
3091
diff
changeset
|
281 SDL_GL_RETAINED_BACKING, |
3139 | 282 SDL_GL_CONTEXT_MAJOR_VERSION, |
283 SDL_GL_CONTEXT_MINOR_VERSION | |
0 | 284 } SDL_GLattr; |
285 | |
286 | |
287 /* Function prototypes */ | |
288 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
289 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
290 * \brief Get the number of video drivers compiled into SDL |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
291 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
292 * \sa SDL_GetVideoDriver() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
293 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
294 extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
295 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
296 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
297 * \brief Get the name of a built in video driver. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
298 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
299 * \note The video drivers are presented in the order in which they are |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
300 * normally checked during initialization. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
301 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
302 * \sa SDL_GetNumVideoDrivers() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
303 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
304 extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
305 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
306 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
307 * \brief Initialize the video subsystem, optionally specifying a video driver. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
308 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
309 * \param driver_name Initialize a specific driver by name, or NULL for the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
310 * default video driver. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
311 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
312 * \param flags FIXME: Still needed? |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
313 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
314 * \return 0 on success, -1 on error |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
315 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
316 * This function initializes the video subsystem; setting up a connection |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
317 * to the window manager, etc, and determines the available display modes |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
318 * and pixel formats, but does not initialize a window or graphics mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
319 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
320 * \sa SDL_VideoQuit() |
0 | 321 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
322 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
323 Uint32 flags); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
324 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
325 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
326 * \brief Shuts down the video subsystem. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
327 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
328 * This function closes all windows, and restores the original video mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
329 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
330 * \sa SDL_VideoInit() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
331 */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
332 extern DECLSPEC void SDLCALL SDL_VideoQuit(void); |
0 | 333 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
334 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
335 * \brief Returns the name of the currently initialized video driver. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
336 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
337 * \return The name of the current video driver or NULL if no driver |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
338 * has been initialized |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
339 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
340 * \sa SDL_GetNumVideoDrivers() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
341 * \sa SDL_GetVideoDriver() |
0 | 342 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
343 extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void); |
0 | 344 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
345 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
346 * \brief Returns the number of available video displays. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
347 * |
3528
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
348 * \sa SDL_GetDisplayBounds() |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
349 * \sa SDL_SelectVideoDisplay() |
0 | 350 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
351 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void); |
0 | 352 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
353 /** |
3528
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
354 * \brief Get the desktop area represented by a display, with the primary |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
355 * display located at 0,0 |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
356 * |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
357 * \return 0 on success, or -1 if the index is out of range. |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
358 * |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
359 * \sa SDL_GetNumVideoDisplays() |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
360 */ |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
361 extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int index, SDL_Rect * rect); |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
362 |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3523
diff
changeset
|
363 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
364 * \brief Set the index of the currently selected display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
365 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
366 * \return 0 on success, or -1 if the index is out of range. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
367 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
368 * \sa SDL_GetNumVideoDisplays() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
369 * \sa SDL_GetCurrentVideoDisplay() |
1963
2590b68531ef
Added SDL_GetCurrentVideoDisplay()
Sam Lantinga <slouken@libsdl.org>
parents:
1956
diff
changeset
|
370 */ |
2590b68531ef
Added SDL_GetCurrentVideoDisplay()
Sam Lantinga <slouken@libsdl.org>
parents:
1956
diff
changeset
|
371 extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index); |
2590b68531ef
Added SDL_GetCurrentVideoDisplay()
Sam Lantinga <slouken@libsdl.org>
parents:
1956
diff
changeset
|
372 |
2590b68531ef
Added SDL_GetCurrentVideoDisplay()
Sam Lantinga <slouken@libsdl.org>
parents:
1956
diff
changeset
|
373 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
374 * \brief Get the index of the currently selected display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
375 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
376 * \return The index of the currently selected display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
377 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
378 * \sa SDL_GetNumVideoDisplays() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
379 * \sa SDL_SelectVideoDisplay() |
0 | 380 */ |
1963
2590b68531ef
Added SDL_GetCurrentVideoDisplay()
Sam Lantinga <slouken@libsdl.org>
parents:
1956
diff
changeset
|
381 extern DECLSPEC int SDLCALL SDL_GetCurrentVideoDisplay(void); |
0 | 382 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
383 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
384 * \brief Returns the number of available display modes for the current display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
385 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
386 * \sa SDL_GetDisplayMode() |
0 | 387 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
388 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void); |
0 | 389 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
390 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
391 * \brief Fill in information about a specific display mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
392 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
393 * \note The display modes are sorted in this priority: |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
394 * \li bits per pixel -> more colors to fewer colors |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
395 * \li width -> largest to smallest |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
396 * \li height -> largest to smallest |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
397 * \li refresh rate -> highest to lowest |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
398 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
399 * \sa SDL_GetNumDisplayModes() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
400 */ |
1967
01e29c3e9a29
In general, fill in pointers to structures, rather than return them.
Sam Lantinga <slouken@libsdl.org>
parents:
1966
diff
changeset
|
401 extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int index, |
01e29c3e9a29
In general, fill in pointers to structures, rather than return them.
Sam Lantinga <slouken@libsdl.org>
parents:
1966
diff
changeset
|
402 SDL_DisplayMode * mode); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
403 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
404 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
405 * \brief Fill in information about the desktop display mode for the current |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
406 * display. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
407 */ |
1967
01e29c3e9a29
In general, fill in pointers to structures, rather than return them.
Sam Lantinga <slouken@libsdl.org>
parents:
1966
diff
changeset
|
408 extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(SDL_DisplayMode * mode); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
409 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
410 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
411 * \brief Fill in information about the current display mode. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
412 */ |
1967
01e29c3e9a29
In general, fill in pointers to structures, rather than return them.
Sam Lantinga <slouken@libsdl.org>
parents:
1966
diff
changeset
|
413 extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
414 |
3400
4ec48602f1db
iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents:
3227
diff
changeset
|
415 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
416 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
417 * \brief Get the closest match to the requested display mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
418 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
419 * \param mode The desired display mode |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
420 * \param closest A pointer to a display mode to be filled in with the closest |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
421 * match of the available display modes. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
422 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
423 * \return The passed in value \c closest, or NULL if no matching video mode |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
424 * was available. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
425 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
426 * The available display modes are scanned, and \c closest is filled in with the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
427 * closest mode matching the requested mode and returned. The mode format and |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
428 * refresh_rate default to the desktop mode if they are 0. The modes are |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
429 * scanned with size being first priority, format being second priority, and |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
430 * finally checking the refresh_rate. If all the available modes are too |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
431 * small, then NULL is returned. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
432 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
433 * \sa SDL_GetNumDisplayModes() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
434 * \sa SDL_GetDisplayMode() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
435 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
436 extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
437 SDL_DisplayMode |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
438 * mode, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
439 SDL_DisplayMode |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
440 * closest); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
441 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
442 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
443 * \brief Set the display mode used when a fullscreen window is visible |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3493
diff
changeset
|
444 * on the currently selected display. By default the window's |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3493
diff
changeset
|
445 * dimensions and the desktop format and refresh rate are used. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
446 * |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3493
diff
changeset
|
447 * \param mode The mode to use, or NULL for the default mode. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
448 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
449 * \return 0 on success, or -1 if setting the display mode failed. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
450 * |
3522 | 451 * \sa SDL_GetWindowDisplayMode() |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
452 * \sa SDL_SetWindowFullscreen() |
0 | 453 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
454 extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window, |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3493
diff
changeset
|
455 const SDL_DisplayMode |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
456 * mode); |
0 | 457 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
458 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
459 * \brief Fill in information about the display mode used when a fullscreen |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
460 * window is visible on the currently selected display. |
3522 | 461 * |
462 * \sa SDL_SetWindowDisplayMode() | |
463 * \sa SDL_SetWindowFullscreen() | |
0 | 464 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
465 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window, |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3493
diff
changeset
|
466 SDL_DisplayMode * mode); |
0 | 467 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
468 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
469 * \brief Set the palette entries for indexed display modes. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
470 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
471 * \return 0 on success, or -1 if the display mode isn't palettized or the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
472 * colors couldn't be set. |
0 | 473 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
474 extern DECLSPEC int SDLCALL SDL_SetDisplayPalette(const SDL_Color * colors, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
475 int firstcolor, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
476 int ncolors); |
0 | 477 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
478 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
479 * \brief Gets the palette entries for indexed display modes. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
480 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
481 * \return 0 on success, or -1 if the display mode isn't palettized |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
482 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
483 extern DECLSPEC int SDLCALL SDL_GetDisplayPalette(SDL_Color * colors, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
484 int firstcolor, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
485 int ncolors); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
486 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
487 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
488 * \brief Set the gamma correction for each of the color channels on the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
489 * currently selected display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
490 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
491 * \return 0 on success, or -1 if setting the gamma isn't supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
492 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
493 * \sa SDL_SetGammaRamp() |
0 | 494 */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
495 extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue); |
0 | 496 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
497 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
498 * \brief Set the gamma ramp for the currently selected display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
499 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
500 * \param red The translation table for the red channel, or NULL. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
501 * \param green The translation table for the green channel, or NULL. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
502 * \param blue The translation table for the blue channel, or NULL. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
503 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
504 * \return 0 on success, or -1 if gamma ramps are unsupported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
505 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
506 * Set the gamma translation table for the red, green, and blue channels |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
507 * of the video hardware. Each table is an array of 256 16-bit quantities, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
508 * representing a mapping between the input and output for that channel. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
509 * The input is the index into the array, and the output is the 16-bit |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
510 * gamma value at that index, scaled to the output color precision. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
511 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
512 * \sa SDL_GetGammaRamp() |
0 | 513 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
514 extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
515 const Uint16 * green, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
516 const Uint16 * blue); |
0 | 517 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
518 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
519 * \brief Get the gamma ramp for the currently selected display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
520 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
521 * \param red A pointer to a 256 element array of 16-bit quantities to hold |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
522 * the translation table for the red channel, or NULL. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
523 * \param green A pointer to a 256 element array of 16-bit quantities to hold |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
524 * the translation table for the green channel, or NULL. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
525 * \param blue A pointer to a 256 element array of 16-bit quantities to hold |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
526 * the translation table for the blue channel, or NULL. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
527 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
528 * \return 0 on success, or -1 if gamma ramps are unsupported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
529 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
530 * \sa SDL_SetGammaRamp() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
531 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
532 extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
533 Uint16 * blue); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
534 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
535 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
536 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
537 * \brief Create a window with the specified position, dimensions, and flags. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
538 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
539 * \param title The title of the window, in UTF-8 encoding. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
540 * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
541 * ::SDL_WINDOWPOS_UNDEFINED. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
542 * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
543 * ::SDL_WINDOWPOS_UNDEFINED. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
544 * \param w The width of the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
545 * \param h The height of the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
546 * \param flags The flags for the window, a mask of any of the following: |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
547 * ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
548 * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_BORDERLESS, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
549 * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
550 * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
551 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
552 * \return The id of the window created, or zero if window creation failed. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
553 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
554 * \sa SDL_DestroyWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
555 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
556 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
557 int x, int y, int w, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
558 int h, Uint32 flags); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
559 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
560 /** |
3493
40b1f7cb2062
SDL_CreateWindowFrom() is actually going to be supported. :)
Sam Lantinga <slouken@libsdl.org>
parents:
3492
diff
changeset
|
561 * \brief Create an SDL window from an existing native window. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
562 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
563 * \param data A pointer to driver-dependent window creation data |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
564 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
565 * \return The id of the window created, or zero if window creation failed. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
566 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
567 * \sa SDL_DestroyWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
568 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
569 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data); |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
570 |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
571 /** |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
572 * \brief Get the numeric ID of the window, for logging purposes. |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
573 */ |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
574 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window); |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
575 |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
576 /** |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
577 * \brief Get a window from a stored ID, or NULL if it doesn't exist. |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
578 */ |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
579 extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
580 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
581 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
582 * \brief Get the window flags. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
583 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
584 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
585 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
586 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
587 * \brief Set the title of the window, in UTF-8 format. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
588 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
589 * \sa SDL_GetWindowTitle() |
0 | 590 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
591 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
592 const char *title); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
593 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
594 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
595 * \brief Get the title of the window, in UTF-8 format. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
596 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
597 * \sa SDL_SetWindowTitle() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
598 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
599 extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
600 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
601 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
602 * \brief Set the icon of the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
603 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
604 * \param icon The icon for the window. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
605 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
606 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window, |
2990 | 607 SDL_Surface * icon); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
608 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
609 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
610 * \brief Associate an arbitrary pointer with the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
611 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
612 * \sa SDL_GetWindowData() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
613 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
614 extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
615 void *userdata); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
616 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
617 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
618 * \brief Retrieve the data pointer associated with the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
619 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
620 * \sa SDL_SetWindowData() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
621 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
622 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
623 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
624 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
625 * \brief Set the position of the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
626 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
627 * \param window The window to reposition. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
628 * \param x The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
629 ::SDL_WINDOWPOS_UNDEFINED. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
630 * \param y The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
631 ::SDL_WINDOWPOS_UNDEFINED. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
632 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
633 * \note The window coordinate origin is the upper left of the display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
634 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
635 * \sa SDL_GetWindowPosition() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
636 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
637 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
638 int x, int y); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
639 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
640 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
641 * \brief Get the position of the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
642 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
643 * \sa SDL_SetWindowPosition() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
644 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
645 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
646 int *x, int *y); |
0 | 647 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
648 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
649 * \brief Set the size of the window's client area. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
650 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
651 * \note You can't change the size of a fullscreen window, it automatically |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
652 * matches the size of the display mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
653 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
654 * \sa SDL_GetWindowSize() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
655 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
656 extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
657 int h); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
658 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
659 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
660 * \brief Get the size of the window's client area. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
661 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
662 * \sa SDL_SetWindowSize() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
663 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
664 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
665 int *h); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
666 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
667 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
668 * \brief Show the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
669 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
670 * \sa SDL_HideWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
671 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
672 extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
673 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
674 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
675 * \brief Hide the window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
676 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
677 * \sa SDL_ShowWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
678 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
679 extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
680 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
681 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
682 * \brief Raise the window above other windows and set the input focus. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
683 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
684 extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
685 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
686 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
687 * \brief Make the window as large as possible. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
688 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
689 * \sa SDL_RestoreWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
690 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
691 extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
692 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
693 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
694 * \brief Minimize the window to an iconic representation. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
695 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
696 * \sa SDL_RestoreWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
697 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
698 extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
699 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
700 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
701 * \brief Restore the size and position of a minimized or maximized window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
702 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
703 * \sa SDL_MaximizeWindow() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
704 * \sa SDL_MinimizeWindow() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
705 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
706 extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
707 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
708 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
709 * \brief Set the window's fullscreen state. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
710 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
711 * \return 0 on success, or -1 if setting the display mode failed. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
712 * |
3522 | 713 * \sa SDL_SetWindowDisplayMode() |
714 * \sa SDL_GetWindowDisplayMode() | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
715 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
716 extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
717 int fullscreen); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
718 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
719 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
720 * \brief Set the window's input grab mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
721 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
722 * \param mode This is 1 to grab input, and 0 to release input. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
723 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
724 * \sa SDL_GetWindowGrab() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
725 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
726 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
727 int mode); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
728 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
729 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
730 * \brief Get the window's input grab mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
731 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
732 * \return This returns 1 if input is grabbed, and 0 otherwise. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
733 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
734 * \sa SDL_SetWindowGrab() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
735 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
736 extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
737 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
738 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
739 * \brief Get driver specific information about a window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
740 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
741 * \note Include SDL_syswm.h for the declaration of SDL_SysWMinfo. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
742 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
743 struct SDL_SysWMinfo; |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
744 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
745 struct SDL_SysWMinfo |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
746 *info); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
747 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
748 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
749 * \brief Destroy a window. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
750 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
751 extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
752 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
753 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
754 * \brief Get the number of 2D rendering drivers available for the current |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
755 * display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
756 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
757 * A render driver is a set of code that handles rendering and texture |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
758 * management on a particular display. Normally there is only one, but |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
759 * some drivers may have several available with different capabilities. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
760 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
761 * \sa SDL_GetRenderDriverInfo() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
762 * \sa SDL_CreateRenderer() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
763 */ |
1969
5d3724f64f2b
Clarified the difference between render drivers and render contexts
Sam Lantinga <slouken@libsdl.org>
parents:
1968
diff
changeset
|
764 extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
765 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
766 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
767 * \brief Get information about a specific 2D rendering driver for the current |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
768 * display. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
769 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
770 * \param index The index of the driver to query information about. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
771 * \param info A pointer to an SDL_RendererInfo struct to be filled with |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
772 * information on the rendering driver. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
773 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
774 * \return 0 on success, -1 if the index was out of range. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
775 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
776 * \sa SDL_CreateRenderer() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
777 */ |
1969
5d3724f64f2b
Clarified the difference between render drivers and render contexts
Sam Lantinga <slouken@libsdl.org>
parents:
1968
diff
changeset
|
778 extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index, |
5d3724f64f2b
Clarified the difference between render drivers and render contexts
Sam Lantinga <slouken@libsdl.org>
parents:
1968
diff
changeset
|
779 SDL_RendererInfo * info); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
780 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
781 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
782 * \brief Create and make active a 2D rendering context for a window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
783 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
784 * \param window The window where rendering is displayed. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
785 * \param index The index of the rendering driver to initialize, or -1 to |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
786 * initialize the first one supporting the requested flags. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
787 * \param flags ::SDL_RendererFlags. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
788 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
789 * \return 0 on success, -1 if there was an error creating the renderer. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
790 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
791 * \sa SDL_SelectRenderer() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
792 * \sa SDL_GetRendererInfo() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
793 * \sa SDL_DestroyRenderer() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
794 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
795 extern DECLSPEC int SDLCALL SDL_CreateRenderer(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
796 int index, Uint32 flags); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
797 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
798 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
799 * \brief Select the rendering context for a particular window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
800 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
801 * \return 0 on success, -1 if the selected window doesn't have a |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
802 * rendering context. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
803 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
804 extern DECLSPEC int SDLCALL SDL_SelectRenderer(SDL_Window * window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
805 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
806 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
807 * \brief Get information about the current rendering context. |
1969
5d3724f64f2b
Clarified the difference between render drivers and render contexts
Sam Lantinga <slouken@libsdl.org>
parents:
1968
diff
changeset
|
808 */ |
5d3724f64f2b
Clarified the difference between render drivers and render contexts
Sam Lantinga <slouken@libsdl.org>
parents:
1968
diff
changeset
|
809 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_RendererInfo * info); |
5d3724f64f2b
Clarified the difference between render drivers and render contexts
Sam Lantinga <slouken@libsdl.org>
parents:
1968
diff
changeset
|
810 |
5d3724f64f2b
Clarified the difference between render drivers and render contexts
Sam Lantinga <slouken@libsdl.org>
parents:
1968
diff
changeset
|
811 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
812 * \brief Create a texture for the current rendering context. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
813 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
814 * \param format The format of the texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
815 * \param access One of the enumerated values in ::SDL_TextureAccess. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
816 * \param w The width of the texture in pixels. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
817 * \param h The height of the texture in pixels. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
818 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
819 * \return The created texture is returned, or 0 if no rendering context was |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
820 * active, the format was unsupported, or the width or height were out |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
821 * of range. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
822 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
823 * \sa SDL_QueryTexture() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
824 * \sa SDL_DestroyTexture() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
825 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
826 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(Uint32 format, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
827 int access, int w, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
828 int h); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
829 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
830 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
831 * \brief Create a texture from an existing surface. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
832 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
833 * \param format The format of the texture, or 0 to pick an appropriate format. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
834 * \param surface The surface containing pixel data used to fill the texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
835 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
836 * \return The created texture is returned, or 0 if no rendering context was |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
837 * active, the format was unsupported, or the surface width or height |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
838 * were out of range. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
839 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
840 * \note The surface is not modified or freed by this function. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
841 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
842 * \sa SDL_QueryTexture() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
843 * \sa SDL_DestroyTexture() |
0 | 844 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
845 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(Uint32 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
846 format, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
847 SDL_Surface |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
848 * surface); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
849 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
850 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
851 * \brief Query the attributes of a texture |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
852 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
853 * \param texture A texture to be queried. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
854 * \param format A pointer filled in with the raw format of the texture. The |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
855 * actual format may differ, but pixel transfers will use this |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
856 * format. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
857 * \param access A pointer filled in with the actual access to the texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
858 * \param w A pointer filled in with the width of the texture in pixels. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
859 * \param h A pointer filled in with the height of the texture in pixels. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
860 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
861 * \return 0 on success, or -1 if the texture is not valid. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
862 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
863 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
864 Uint32 * format, int *access, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
865 int *w, int *h); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
866 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
867 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
868 * \brief Query the pixels of a texture, if the texture does not need to be |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
869 * locked for pixel access. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
870 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
871 * \param texture A texture to be queried, which was created with |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
872 * ::SDL_TEXTUREACCESS_STREAMING. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
873 * \param pixels A pointer filled with a pointer to the pixels for the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
874 * texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
875 * \param pitch A pointer filled in with the pitch of the pixel data. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
876 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
877 * \return 0 on success, or -1 if the texture is not valid, or must be locked |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
878 * for pixel access. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
879 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
880 extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
881 void **pixels, int *pitch); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
882 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
883 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
884 * \brief Set the color palette of an indexed texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
885 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
886 * \param texture The texture to update. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
887 * \param colors The array of RGB color data. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
888 * \param firstcolor The first index to update. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
889 * \param ncolors The number of palette entries to fill with the color data. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
890 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
891 * \return 0 on success, or -1 if the texture is not valid or not an indexed |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
892 * texture. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
893 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
894 extern DECLSPEC int SDLCALL SDL_SetTexturePalette(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
895 const SDL_Color * colors, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
896 int firstcolor, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
897 int ncolors); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
898 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
899 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
900 * \brief Get the color palette from an indexed texture if it has one. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
901 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
902 * \param texture The texture to update. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
903 * \param colors The array to fill with RGB color data. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
904 * \param firstcolor The first index to retrieve. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
905 * \param ncolors The number of palette entries to retrieve. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
906 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
907 * \return 0 on success, or -1 if the texture is not valid or not an indexed |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
908 * texture. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
909 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
910 extern DECLSPEC int SDLCALL SDL_GetTexturePalette(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
911 SDL_Color * colors, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
912 int firstcolor, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
913 int ncolors); |
0 | 914 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
915 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
916 * \brief Set an additional color value used in render copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
917 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
918 * \param texture The texture to update. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
919 * \param r The red source color value multiplied into copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
920 * \param g The green source color value multiplied into copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
921 * \param b The blue source color value multiplied into copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
922 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
923 * \return 0 on success, or -1 if the texture is not valid or color modulation |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
924 * is not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
925 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
926 * \sa SDL_GetTextureColorMod() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
927 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
928 extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
929 Uint8 r, Uint8 g, Uint8 b); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
930 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
931 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
932 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
933 * \brief Get the additional color value used in render copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
934 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
935 * \param texture The texture to query. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
936 * \param r A pointer filled in with the source red color value. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
937 * \param g A pointer filled in with the source green color value. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
938 * \param b A pointer filled in with the source blue color value. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
939 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
940 * \return 0 on success, or -1 if the texture is not valid. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
941 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
942 * \sa SDL_SetTextureColorMod() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
943 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
944 extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
945 Uint8 * r, Uint8 * g, |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
946 Uint8 * b); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
947 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
948 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
949 * \brief Set an additional alpha value used in render copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
950 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
951 * \param texture The texture to update. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
952 * \param alpha The source alpha value multiplied into copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
953 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
954 * \return 0 on success, or -1 if the texture is not valid or alpha modulation |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
955 * is not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
956 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
957 * \sa SDL_GetTextureAlphaMod() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
958 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
959 extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
960 Uint8 alpha); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
961 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
962 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
963 * \brief Get the additional alpha value used in render copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
964 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
965 * \param texture The texture to query. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
966 * \param alpha A pointer filled in with the source alpha value. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
967 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
968 * \return 0 on success, or -1 if the texture is not valid. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
969 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
970 * \sa SDL_SetTextureAlphaMod() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
971 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
972 extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
973 Uint8 * alpha); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
974 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
975 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
976 * \brief Set the blend mode used for texture copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
977 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
978 * \param texture The texture to update. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
979 * \param blendMode ::SDL_BlendMode to use for texture blending. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
980 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
981 * \return 0 on success, or -1 if the texture is not valid or the blend mode is |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
982 * not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
983 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
984 * \note If the blend mode is not supported, the closest supported mode is |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
985 * chosen. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
986 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
987 * \sa SDL_GetTextureBlendMode() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
988 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
989 extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
990 int blendMode); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
991 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
992 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
993 * \brief Get the blend mode used for texture copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
994 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
995 * \param texture The texture to query. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
996 * \param blendMode A pointer filled in with the current blend mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
997 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
998 * \return 0 on success, or -1 if the texture is not valid. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
999 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1000 * \sa SDL_SetTextureBlendMode() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1001 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1002 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1003 int *blendMode); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1004 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1005 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1006 * \brief Set the scale mode used for texture copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1007 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1008 * \param texture The texture to update. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1009 * \param scaleMode ::SDL_TextureScaleMode to use for texture scaling. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1010 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1011 * \return 0 on success, or -1 if the texture is not valid or the scale mode is |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1012 * not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1013 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1014 * \note If the scale mode is not supported, the closest supported mode is |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1015 * chosen. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1016 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1017 * \sa SDL_GetTextureScaleMode() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1018 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1019 extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1020 int scaleMode); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1021 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1022 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1023 * \brief Get the scale mode used for texture copy operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1024 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1025 * \param texture The texture to query. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1026 * \param scaleMode A pointer filled in with the current scale mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1027 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1028 * \return 0 on success, or -1 if the texture is not valid. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1029 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1030 * \sa SDL_SetTextureScaleMode() |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1031 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1032 extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1033 int *scaleMode); |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1034 |
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1035 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1036 * \brief Update the given texture rectangle with new pixel data. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1037 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1038 * \param texture The texture to update |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1039 * \param rect A pointer to the rectangle of pixels to update, or NULL to |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1040 * update the entire texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1041 * \param pixels The raw pixel data. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1042 * \param pitch The number of bytes between rows of pixel data. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1043 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1044 * \return 0 on success, or -1 if the texture is not valid. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1045 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1046 * \note This is a fairly slow function. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1047 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1048 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1049 const SDL_Rect * rect, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1050 const void *pixels, int pitch); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1051 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1052 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1053 * \brief Lock a portion of the texture for pixel access. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1054 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1055 * \param texture The texture to lock for access, which was created with |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1056 * ::SDL_TEXTUREACCESS_STREAMING. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1057 * \param rect A pointer to the rectangle to lock for access. If the rect |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1058 * is NULL, the entire texture will be locked. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1059 * \param markDirty If this is nonzero, the locked area will be marked dirty |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1060 * when the texture is unlocked. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1061 * \param pixels This is filled in with a pointer to the locked pixels, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1062 * appropriately offset by the locked area. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1063 * \param pitch This is filled in with the pitch of the locked pixels. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1064 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1065 * \return 0 on success, or -1 if the texture is not valid or was created with |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1066 * ::SDL_TEXTUREACCESS_STATIC. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1067 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1068 * \sa SDL_DirtyTexture() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1069 * \sa SDL_UnlockTexture() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1070 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1071 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1072 const SDL_Rect * rect, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1073 int markDirty, void **pixels, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1074 int *pitch); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1075 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1076 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1077 * \brief Unlock a texture, uploading the changes to video memory, if needed. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1078 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1079 * \sa SDL_LockTexture() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1080 * \sa SDL_DirtyTexture() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1081 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1082 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1083 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1084 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1085 * \brief Mark the specified rectangles of the texture as dirty. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1086 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1087 * \param texture The texture to mark dirty, which was created with |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1088 * ::SDL_TEXTUREACCESS_STREAMING. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1089 * \param numrects The number of rectangles pointed to by rects. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1090 * \param rects The pointer to an array of dirty rectangles. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1091 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1092 * \sa SDL_LockTexture() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1093 * \sa SDL_UnlockTexture() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1094 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1095 extern DECLSPEC void SDLCALL SDL_DirtyTexture(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1096 int numrects, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1097 const SDL_Rect * rects); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1098 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1099 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1100 * \brief Set the color used for drawing operations (Fill and Line). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1101 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1102 * \param r The red value used to draw on the rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1103 * \param g The green value used to draw on the rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1104 * \param b The blue value used to draw on the rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1105 * \param a The alpha value used to draw on the rendering target, usually |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1106 * ::SDL_ALPHA_OPAQUE (255). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1107 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1108 * \return 0 on success, or -1 if there is no rendering context current. |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1109 */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1110 extern DECLSPEC int SDL_SetRenderDrawColor(Uint8 r, Uint8 g, Uint8 b, |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1111 Uint8 a); |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1112 |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1113 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1114 * \brief Get the color used for drawing operations (Fill and Line). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1115 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1116 * \param r A pointer to the red value used to draw on the rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1117 * \param g A pointer to the green value used to draw on the rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1118 * \param b A pointer to the blue value used to draw on the rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1119 * \param a A pointer to the alpha value used to draw on the rendering target, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1120 * usually ::SDL_ALPHA_OPAQUE (255). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1121 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1122 * \return 0 on success, or -1 if there is no rendering context current. |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1123 */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1124 extern DECLSPEC int SDL_GetRenderDrawColor(Uint8 * r, Uint8 * g, Uint8 * b, |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1125 Uint8 * a); |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1126 |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1127 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1128 * \brief Set the blend mode used for drawing operations (Fill and Line). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1129 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1130 * \param blendMode ::SDL_BlendMode to use for blending. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1131 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1132 * \return 0 on success, or -1 if there is no rendering context current. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1133 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1134 * \note If the blend mode is not supported, the closest supported mode is |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1135 * chosen. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1136 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1137 * \sa SDL_GetRenderDrawBlendMode() |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1138 */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1139 extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(int blendMode); |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1140 |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1141 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1142 * \brief Get the blend mode used for drawing operations. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1143 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1144 * \param blendMode A pointer filled in with the current blend mode. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1145 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1146 * \return 0 on success, or -1 if there is no rendering context current. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1147 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1148 * \sa SDL_SetRenderDrawBlendMode() |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1149 */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1150 extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode); |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1151 |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1152 /** |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1153 * \brief Clear the current rendering target with the drawing color |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1154 */ |
3677 | 1155 extern DECLSPEC int SDLCALL SDL_RenderClear(void); |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1156 |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1157 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1158 * \brief Draw a point on the current rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1159 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1160 * \param x The x coordinate of the point. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1161 * \param y The y coordinate of the point. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1162 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1163 * \return 0 on success, or -1 if there is no rendering context current. |
2901 | 1164 */ |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1165 extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(int x, int y); |
2901 | 1166 |
1167 /** | |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1168 * \brief Draw some number of points on the current rendering target. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1169 * |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1170 * \param points The points to draw |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1171 * \param count The number of points to draw |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1172 * |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1173 * \return 0 on success, or -1 if there is no rendering context current. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1174 */ |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1175 extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(const SDL_Point * points, |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1176 int count); |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1177 |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1178 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1179 * \brief Draw a line on the current rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1180 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1181 * \param x1 The x coordinate of the start point. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1182 * \param y1 The y coordinate of the start point. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1183 * \param x2 The x coordinate of the end point. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1184 * \param y2 The y coordinate of the end point. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1185 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1186 * \return 0 on success, or -1 if there is no rendering context current. |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1187 */ |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1188 extern DECLSPEC int SDLCALL SDL_RenderDrawLine(int x1, int y1, int x2, int y2); |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1189 |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
1190 /** |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1191 * \brief Draw a series of connected lines on the current rendering target. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1192 * |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1193 * \param points The points along the lines |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1194 * \param count The number of points, drawing count-1 lines |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1195 * |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1196 * \return 0 on success, or -1 if there is no rendering context current. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1197 */ |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1198 extern DECLSPEC int SDLCALL SDL_RenderDrawLines(const SDL_Point * points, |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1199 int count); |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1200 |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1201 /** |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1202 * \brief Draw a rectangle on the current rendering target with the drawing color. |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1203 * |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1204 * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1205 * |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1206 * \return 0 on success, or -1 if there is no rendering context current. |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1207 */ |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1208 extern DECLSPEC int SDLCALL SDL_RenderDrawRect(const SDL_Rect * rect); |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1209 |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1210 /** |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1211 * \brief Draw some number of rectangles in the current rendering target with the drawing color. |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1212 * |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1213 * \param rects A pointer to an array of destination rectangles. |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1214 * \param count The number of rectangles. |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1215 * |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1216 * \return 0 on success, or -1 if there is no rendering context current. |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1217 */ |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1218 extern DECLSPEC int SDLCALL SDL_RenderDrawRects(const SDL_Rect ** rect, int count); |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1219 |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1220 /** |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1221 * \brief Fill a rectangle on the current rendering target with the drawing color. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1222 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1223 * \param rect A pointer to the destination rectangle, or NULL for the entire |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1224 * rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1225 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1226 * \return 0 on success, or -1 if there is no rendering context current. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1227 */ |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1228 extern DECLSPEC int SDLCALL SDL_RenderFillRect(const SDL_Rect * rect); |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1229 |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1230 /** |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1231 * \brief Fill some number of rectangles in the current rendering target with the drawing color. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1232 * |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1233 * \param rects A pointer to an array of destination rectangles. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1234 * \param count The number of rectangles. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1235 * |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1236 * \return 0 on success, or -1 if there is no rendering context current. |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
1237 */ |
3596
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1238 extern DECLSPEC int SDLCALL SDL_RenderFillRects(const SDL_Rect ** rect, int count); |
f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Sam Lantinga <slouken@libsdl.org>
parents:
3536
diff
changeset
|
1239 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1240 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1241 * \brief Copy a portion of the texture to the current rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1242 * |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1243 * \param texture The source texture. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1244 * \param srcrect A pointer to the source rectangle, or NULL for the entire |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1245 * texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1246 * \param dstrect A pointer to the destination rectangle, or NULL for the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1247 * entire rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1248 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1249 * \return 0 on success, or -1 if there is no rendering context current, or the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1250 * driver doesn't support the requested operation. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1251 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1252 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Texture * texture, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1253 const SDL_Rect * srcrect, |
1985
8055185ae4ed
Added source color and alpha modulation support.
Sam Lantinga <slouken@libsdl.org>
parents:
1969
diff
changeset
|
1254 const SDL_Rect * dstrect); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1255 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1256 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1257 * \brief Read pixels from the current rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1258 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1259 * \param rect A pointer to the rectangle to read, or NULL for the entire |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1260 * render target. |
3435
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
1261 * \param format The desired format of the pixel data, or 0 to use the format |
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
1262 * of the rendering target |
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
1263 * \param pixels A pointer to be filled in with the pixel data |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1264 * \param pitch The pitch of the pixels parameter. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1265 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1266 * \return 0 on success, or -1 if pixel reading is not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1267 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1268 * \warning This is a very slow operation, and should not be used frequently. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1269 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1270 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect, |
3435
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
1271 Uint32 format, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1272 void *pixels, int pitch); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1273 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1274 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1275 * \brief Write pixels to the current rendering target. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1276 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1277 * \param rect A pointer to the rectangle to write, or NULL for the entire |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1278 * render target. |
3435
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
1279 * \param format The format of the pixel data, or 0 to use the format |
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
1280 * of the rendering target |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1281 * \param pixels A pointer to the pixel data to write. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1282 * \param pitch The pitch of the pixels parameter. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1283 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1284 * \return 0 on success, or -1 if pixel writing is not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1285 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1286 * \warning This is a very slow operation, and should not be used frequently. |
0 | 1287 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1288 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect, |
3435
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
1289 Uint32 format, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1290 const void *pixels, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1291 int pitch); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1292 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1293 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1294 * \brief Update the screen with rendering performed. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1295 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1296 extern DECLSPEC void SDLCALL SDL_RenderPresent(void); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1297 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1298 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1299 * \brief Destroy the specified texture. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1300 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1301 * \sa SDL_CreateTexture() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1302 * \sa SDL_CreateTextureFromSurface() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1303 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1304 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1305 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1306 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1307 * \brief Destroy the rendering context for a window and free associated |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1308 * textures. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1309 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1310 * \sa SDL_CreateRenderer() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1311 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1312 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Window * window); |
0 | 1313 |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1314 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1315 * \brief Returns whether the screensaver is currently enabled (default off). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1316 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1317 * \sa SDL_EnableScreenSaver() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1318 * \sa SDL_DisableScreenSaver() |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1319 */ |
3033
4e4f47c5f941
Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents:
3025
diff
changeset
|
1320 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void); |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1321 |
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1322 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1323 * \brief Allow the screen to be blanked by a screensaver |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1324 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1325 * \sa SDL_IsScreenSaverEnabled() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1326 * \sa SDL_DisableScreenSaver() |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1327 */ |
3033
4e4f47c5f941
Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents:
3025
diff
changeset
|
1328 extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void); |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1329 |
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1330 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1331 * \brief Prevent the screen from being blanked by a screensaver |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1332 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1333 * \sa SDL_IsScreenSaverEnabled() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1334 * \sa SDL_EnableScreenSaver() |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1335 */ |
3033
4e4f47c5f941
Fix third party "-Wall -Werror" builds
Couriersud <couriersud@arcor.de>
parents:
3025
diff
changeset
|
1336 extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void); |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2990
diff
changeset
|
1337 |
0 | 1338 |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1339 /** |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1340 * \name OpenGL support functions |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1341 */ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1342 /*@{*/ |
0 | 1343 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1344 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1345 * \brief Dynamically load an OpenGL library. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1346 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1347 * \param path The platform dependent OpenGL library name, or NULL to open the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1348 * default OpenGL library. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1349 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1350 * \return 0 on success, or -1 if the library couldn't be loaded. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1351 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1352 * This should be done after initializing the video driver, but before |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1353 * creating any OpenGL windows. If no OpenGL library is loaded, the default |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1354 * library will be loaded upon creation of the first OpenGL window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1355 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1356 * \note If you do this, you need to retrieve all of the GL functions used in |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1357 * your program from the dynamic library using SDL_GL_GetProcAddress(). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1358 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1359 * \sa SDL_GL_GetProcAddress() |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1360 * \sa SDL_GL_UnloadLibrary() |
0 | 1361 */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1362 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path); |
0 | 1363 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1364 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1365 * \brief Get the address of an OpenGL function. |
0 | 1366 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1367 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc); |
0 | 1368 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1369 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1370 * \brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1371 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1372 * \sa SDL_GL_LoadLibrary() |
3057
089a77aebb7d
Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents:
3033
diff
changeset
|
1373 */ |
089a77aebb7d
Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents:
3033
diff
changeset
|
1374 extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void); |
089a77aebb7d
Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents:
3033
diff
changeset
|
1375 |
089a77aebb7d
Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents:
3033
diff
changeset
|
1376 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1377 * \brief Return true if an OpenGL extension is supported for the current |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1378 * context. |
1926
307355678142
Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents:
1920
diff
changeset
|
1379 */ |
307355678142
Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents:
1920
diff
changeset
|
1380 extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char |
307355678142
Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents:
1920
diff
changeset
|
1381 *extension); |
307355678142
Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents:
1920
diff
changeset
|
1382 |
307355678142
Added SDL_GL_ExtensionSupported()
Sam Lantinga <slouken@libsdl.org>
parents:
1920
diff
changeset
|
1383 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1384 * \brief Set an OpenGL window attribute before window creation. |
0 | 1385 */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
1386 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); |
0 | 1387 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1388 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1389 * \brief Get the actual value for an attribute from the current context. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1390 */ |
1936
83946ee0ff1f
Implemented OpenGL support on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
1926
diff
changeset
|
1391 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1392 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1393 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1394 * \brief Create an OpenGL context for use with an OpenGL window, and make it |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1395 * current. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1396 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1397 * \sa SDL_GL_DeleteContext() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1398 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1399 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window * |
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1400 window); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1401 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1402 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1403 * \brief Set up an OpenGL context for rendering into an OpenGL window. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1404 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1405 * \note The context must have been created with a compatible window. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1406 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1407 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1408 SDL_GLContext context); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1409 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1410 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1411 * \brief Set the swap interval for the current OpenGL context. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1412 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1413 * \param interval 0 for immediate updates, 1 for updates synchronized with the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1414 * vertical retrace. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1415 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1416 * \return 0 on success, or -1 if setting the swap interval is not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1417 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1418 * \sa SDL_GL_GetSwapInterval() |
0 | 1419 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1420 extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval); |
0 | 1421 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1422 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1423 * \brief Get the swap interval for the current OpenGL context. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1424 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1425 * \return 0 if there is no vertical retrace synchronization, 1 if the buffer |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1426 * swap is synchronized with the vertical retrace, and -1 if getting |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1427 * the swap interval is not supported. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1428 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1429 * \sa SDL_GL_SetSwapInterval() |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1430 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1431 extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1432 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1433 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1434 * \brief Swap the OpenGL buffers for the window, if double-buffering is |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1435 * supported. |
0 | 1436 */ |
3685
64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
Sam Lantinga <slouken@libsdl.org>
parents:
3677
diff
changeset
|
1437 extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window); |
0 | 1438 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1439 /** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1440 * \brief Delete an OpenGL context. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1441 * |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1442 * \sa SDL_GL_CreateContext() |
0 | 1443 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1444 extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context); |
0 | 1445 |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1446 /*@}*//*OpenGL support functions*/ |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3400
diff
changeset
|
1447 |
0 | 1448 |
1449 /* Ends C function definitions when using C++ */ | |
1450 #ifdef __cplusplus | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1451 /* *INDENT-OFF* */ |
0 | 1452 } |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1453 /* *INDENT-ON* */ |
0 | 1454 #endif |
1455 #include "close_code.h" | |
1456 | |
1457 #endif /* _SDL_video_h */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1458 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
1459 /* vi: set ts=4 sw=4 expandtab: */ |