Mercurial > sdl-ios-xcode
annotate src/video/SDL_sysvideo.h @ 1733:0b1070f2f94d SDL-1.3
Implemented gamma correction on Windows.
Added general code to restore the video mode and gamma when windows lose focus.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 Jul 2006 09:02:26 +0000 |
parents | 0ef52d56e8bb |
children | f7c667ded87d |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
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:
1251
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:
1251
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:
1251
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:
1251
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:
1251
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
252
e8157fcb3114
Updated the source with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
173
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
22 #include "SDL_config.h" |
0 | 23 |
24 #ifndef _SDL_sysvideo_h | |
25 #define _SDL_sysvideo_h | |
26 | |
27 #include "SDL_mouse.h" | |
28 | |
29 /* The SDL video driver */ | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
30 |
1670 | 31 typedef struct SDL_Window SDL_Window; |
32 typedef struct SDL_Texture SDL_Texture; | |
33 typedef struct SDL_Renderer SDL_Renderer; | |
34 typedef struct SDL_RenderDriver SDL_RenderDriver; | |
35 typedef struct SDL_VideoDisplay SDL_VideoDisplay; | |
36 typedef struct SDL_VideoDevice SDL_VideoDevice; | |
37 | |
38 /* Define the SDL texture structure */ | |
39 struct SDL_Texture | |
40 { | |
41 Uint32 id; | |
42 | |
43 Uint32 format; /**< The pixel format of the texture */ | |
44 int access; /**< SDL_TextureAccess */ | |
45 int w; /**< The width of the texture */ | |
46 int h; /**< The height of the texture */ | |
47 | |
48 SDL_Renderer *renderer; | |
49 | |
50 void *driverdata; /**< Driver specific texture representation */ | |
51 | |
52 SDL_Texture *next; | |
53 }; | |
54 | |
55 /* Define the SDL renderer structure */ | |
56 struct SDL_Renderer | |
57 { | |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
58 int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture); |
1678
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1677
diff
changeset
|
59 int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture, |
90bf530ced8e
SDL_SetVideoMode() compiles now...
Sam Lantinga <slouken@libsdl.org>
parents:
1677
diff
changeset
|
60 void **pixels, int *pitch); |
1680
9488fca10677
Dummy video driver works again in high color video modes. Yay!
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
61 int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture, |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
62 const SDL_Color * colors, int firstcolor, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
63 int ncolors); |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
64 int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture, |
1680
9488fca10677
Dummy video driver works again in high color video modes. Yay!
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
65 SDL_Color * colors, int firstcolor, |
9488fca10677
Dummy video driver works again in high color video modes. Yay!
Sam Lantinga <slouken@libsdl.org>
parents:
1678
diff
changeset
|
66 int ncolors); |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
67 int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture, |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
68 const SDL_Rect * rect, const void *pixels, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
69 int pitch); |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
70 int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture, |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
71 const SDL_Rect * rect, int markDirty, void **pixels, |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
72 int *pitch); |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
73 void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture); |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
74 void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture, |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
75 int numrects, const SDL_Rect * rects); |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
76 void (*SelectRenderTexture) (SDL_Renderer * renderer, |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
77 SDL_Texture * texture); |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
78 int (*RenderFill) (SDL_Renderer * renderer, const SDL_Rect * rect, |
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
79 Uint32 color); |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
80 int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture, |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
81 const SDL_Rect * srcrect, const SDL_Rect * dstrect, |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
82 int blendMode, int scaleMode); |
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
83 int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect, |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
84 void *pixels, int pitch); |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
85 int (*RenderWritePixels) (SDL_Renderer * renderer, const SDL_Rect * rect, |
1676
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
86 const void *pixels, int pitch); |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
87 void (*RenderPresent) (SDL_Renderer * renderer); |
e136f3ffdc1b
Adding software renderer implementation
Sam Lantinga <slouken@libsdl.org>
parents:
1675
diff
changeset
|
88 void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture); |
1670 | 89 |
90 void (*DestroyRenderer) (SDL_Renderer * renderer); | |
91 | |
92 /* The current renderer info */ | |
93 SDL_RendererInfo info; | |
94 | |
95 /* The window associated with the renderer */ | |
1706
1577404809f0
Added a multi-window version of testsprite using the new API.
Sam Lantinga <slouken@libsdl.org>
parents:
1683
diff
changeset
|
96 SDL_WindowID window; |
1670 | 97 |
98 void *driverdata; | |
99 }; | |
100 | |
101 /* Define the SDL render driver structure */ | |
102 struct SDL_RenderDriver | |
103 { | |
104 SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags); | |
105 | |
106 /* Info about the renderer capabilities */ | |
107 SDL_RendererInfo info; | |
108 }; | |
109 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
110 /* Define the SDL window structure, corresponding to toplevel windows */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
111 struct SDL_Window |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
112 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
113 Uint32 id; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
114 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
115 char *title; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
116 int x, y; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
117 int w, h; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
118 Uint32 flags; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
119 |
1706
1577404809f0
Added a multi-window version of testsprite using the new API.
Sam Lantinga <slouken@libsdl.org>
parents:
1683
diff
changeset
|
120 int display; |
1670 | 121 SDL_Renderer *renderer; |
122 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
123 void *userdata; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
124 void *driverdata; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
125 }; |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
126 #define FULLSCREEN_VISIBLE(W) \ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
127 ((W->flags & SDL_WINDOW_FULLSCREEN) && \ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
128 (W->flags & SDL_WINDOW_SHOWN) && \ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
129 !(W->flags & SDL_WINDOW_MINIMIZED)) |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
130 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
131 /* Define the SDL display structure |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
132 This corresponds to physical monitors attached to the system. |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
133 */ |
1670 | 134 struct SDL_VideoDisplay |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
135 { |
1725
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1720
diff
changeset
|
136 int max_display_modes; |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
137 int num_display_modes; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
138 SDL_DisplayMode *display_modes; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
139 SDL_DisplayMode desktop_mode; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
140 SDL_DisplayMode current_mode; |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
141 SDL_DisplayMode desired_mode; |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
142 SDL_DisplayMode *fullscreen_mode; |
1683
396a35389351
Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents:
1682
diff
changeset
|
143 SDL_Palette *palette; |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
144 |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
145 Uint16 *gamma; |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
146 Uint16 *saved_gamma; /* (just offset into gamma) */ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
147 |
1670 | 148 int num_render_drivers; |
149 SDL_RenderDriver *render_drivers; | |
150 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
151 int num_windows; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
152 SDL_Window *windows; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
153 |
1670 | 154 SDL_Renderer *current_renderer; |
155 | |
156 /* The hash list of textures */ | |
157 SDL_Texture *textures[64]; | |
158 | |
1682
7ae8018b2e5d
Default palette entries to white, instead of black.
Sam Lantinga <slouken@libsdl.org>
parents:
1681
diff
changeset
|
159 SDL_VideoDevice *device; |
7ae8018b2e5d
Default palette entries to white, instead of black.
Sam Lantinga <slouken@libsdl.org>
parents:
1681
diff
changeset
|
160 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
161 void *driverdata; |
1670 | 162 }; |
0 | 163 |
164 /* Define the SDL video driver structure */ | |
165 #define _THIS SDL_VideoDevice *_this | |
166 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
167 struct SDL_VideoDevice |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
168 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
169 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
170 /* The name of this video driver */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
171 const char *name; |
0 | 172 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
173 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
174 /* Initialization/Query functions */ |
0 | 175 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
176 /* Initialize the native video subsystem, filling in the list |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
177 of displays for this driver, returning 0 or -1 if there's an error. |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
178 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
179 int (*VideoInit) (_THIS); |
0 | 180 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
181 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
182 /* Display functions |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
183 */ |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
184 |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
185 /* Get a list of the available display modes. |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
186 * e.g. SDL_AddDisplayMode(_this->current_display, mode) |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
187 */ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
188 void (*GetDisplayModes) (_THIS); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
189 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
190 /* Setting the display mode is independent of creating windows, |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
191 * so when the display mode is changed, all existing windows |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
192 * should have their data updated accordingly, including the |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
193 * display surfaces associated with them. |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
194 */ |
1725
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1720
diff
changeset
|
195 int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode); |
0 | 196 |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
197 /* Set the color entries of the display palette */ |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
198 int (*SetDisplayPalette) (_THIS, SDL_Palette * palette); |
1670 | 199 |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
200 /* Get the color entries of the display palette */ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
201 int (*GetDisplayPalette) (_THIS, SDL_Palette * palette); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
202 |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
203 /* Set the gamma ramp */ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
204 int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
205 |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
206 /* Get the gamma ramp */ |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
207 int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
208 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
209 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
210 /* Window functions |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
211 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
212 int (*CreateWindow) (_THIS, SDL_Window * window); |
1681
80a5e6a4e1e2
Working on paletted display and texture support (two different issues)
Sam Lantinga <slouken@libsdl.org>
parents:
1680
diff
changeset
|
213 int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data); |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
214 void (*SetWindowTitle) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
215 void (*SetWindowPosition) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
216 void (*SetWindowSize) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
217 void (*ShowWindow) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
218 void (*HideWindow) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
219 void (*RaiseWindow) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
220 void (*MaximizeWindow) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
221 void (*MinimizeWindow) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
222 void (*RestoreWindow) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
223 void (*SetWindowGrab) (_THIS, SDL_Window * window); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
224 void (*DestroyWindow) (_THIS, SDL_Window * window); |
0 | 225 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
226 /* Get some platform dependent window information */ |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1666
diff
changeset
|
227 SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window, |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
228 struct SDL_SysWMinfo * info); |
0 | 229 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
230 /* Reverse the effects VideoInit() -- called if VideoInit() fails |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
231 or if the application is shutting down the video subsystem. |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
232 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
233 void (*VideoQuit) (_THIS); |
0 | 234 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
235 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
236 /* OpenGL support */ |
0 | 237 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
238 /* Sets the dll to use for OpenGL and loads it */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
239 int (*GL_LoadLibrary) (_THIS, const char *path); |
0 | 240 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
241 /* Retrieves the address of a function in the gl library */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
242 void *(*GL_GetProcAddress) (_THIS, const char *proc); |
0 | 243 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
244 /* Get attribute information from the windowing system. */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
245 int (*GL_GetAttribute) (_THIS, SDL_GLattr attrib, int *value); |
0 | 246 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
247 /* Make the context associated with this driver current */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
248 int (*GL_MakeCurrent) (_THIS); |
0 | 249 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
250 /* Swap the current buffers in double buffer mode. */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
251 void (*GL_SwapBuffers) (_THIS); |
0 | 252 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
253 /* Determine whether the mouse should be in relative mode or not. |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
254 This function is called when the input grab state or cursor |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
255 visibility state changes. |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
256 If the cursor is not visible, and the input is grabbed, the |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
257 driver can place the mouse in relative mode, which may result |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
258 in higher accuracy sampling of the pointer motion. |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
259 */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
260 void (*CheckMouseMode) (_THIS); |
0 | 261 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
262 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
263 /* Event manager functions */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
264 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
265 /* Handle any queued OS events */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
266 void (*PumpEvents) (_THIS); |
0 | 267 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
268 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
269 /* Data common to all drivers */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
270 int num_displays; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
271 SDL_VideoDisplay *displays; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
272 int current_display; |
1670 | 273 Uint32 next_object_id; |
0 | 274 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
275 /* Driver information flags */ |
0 | 276 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
277 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
278 /* Data used by the GL drivers */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
279 struct |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
280 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
281 int red_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
282 int green_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
283 int blue_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
284 int alpha_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
285 int depth_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
286 int buffer_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
287 int stencil_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
288 int double_buffer; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
289 int accum_red_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
290 int accum_green_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
291 int accum_blue_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
292 int accum_alpha_size; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
293 int stereo; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
294 int multisamplebuffers; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
295 int multisamplesamples; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
296 int accelerated; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
297 int driver_loaded; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
298 char driver_path[256]; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
299 void *dll_handle; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
300 } gl_config; |
0 | 301 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
302 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
303 /* Data private to this driver */ |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
304 void *driverdata; |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
305 struct SDL_PrivateGLData *gl_data; |
0 | 306 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
307 /* * * */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
308 /* The function used to dispose of this structure */ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
309 void (*free) (_THIS); |
0 | 310 }; |
311 | |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
312 typedef struct VideoBootStrap |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
313 { |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
314 const char *name; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
315 const char *desc; |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
316 int (*available) (void); |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
317 SDL_VideoDevice *(*create) (int devindex); |
0 | 318 } VideoBootStrap; |
319 | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
320 #if SDL_VIDEO_DRIVER_QUARTZ |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
321 extern VideoBootStrap QZ_bootstrap; |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
322 #endif |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
323 #if SDL_VIDEO_DRIVER_X11 |
0 | 324 extern VideoBootStrap X11_bootstrap; |
325 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
326 #if SDL_VIDEO_DRIVER_DGA |
0 | 327 extern VideoBootStrap DGA_bootstrap; |
328 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
329 #if SDL_VIDEO_DRIVER_NANOX |
30
57bf11a5efd7
Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
19
diff
changeset
|
330 extern VideoBootStrap NX_bootstrap; |
57bf11a5efd7
Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
19
diff
changeset
|
331 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
332 #if SDL_VIDEO_DRIVER_IPOD |
1140
af8b0f9ac2f4
iPod Linux framebuffer support.
Ryan C. Gordon <icculus@icculus.org>
parents:
1052
diff
changeset
|
333 extern VideoBootStrap iPod_bootstrap; |
af8b0f9ac2f4
iPod Linux framebuffer support.
Ryan C. Gordon <icculus@icculus.org>
parents:
1052
diff
changeset
|
334 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
335 #if SDL_VIDEO_DRIVER_QTOPIA |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
336 extern VideoBootStrap Qtopia_bootstrap; |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
337 #endif |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
338 #if SDL_VIDEO_DRIVER_WSCONS |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
339 extern VideoBootStrap WSCONS_bootstrap; |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
340 #endif |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
341 #if SDL_VIDEO_DRIVER_FBCON |
0 | 342 extern VideoBootStrap FBCON_bootstrap; |
343 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
344 #if SDL_VIDEO_DRIVER_DIRECTFB |
167
cb384ef627f6
Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents:
75
diff
changeset
|
345 extern VideoBootStrap DirectFB_bootstrap; |
cb384ef627f6
Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents:
75
diff
changeset
|
346 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
347 #if SDL_VIDEO_DRIVER_PS2GS |
0 | 348 extern VideoBootStrap PS2GS_bootstrap; |
349 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
350 #if SDL_VIDEO_DRIVER_GGI |
0 | 351 extern VideoBootStrap GGI_bootstrap; |
352 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
353 #if SDL_VIDEO_DRIVER_VGL |
75
b0ae59d0f3ee
Added patches from FreeBSD ports
Sam Lantinga <slouken@lokigames.com>
parents:
47
diff
changeset
|
354 extern VideoBootStrap VGL_bootstrap; |
b0ae59d0f3ee
Added patches from FreeBSD ports
Sam Lantinga <slouken@lokigames.com>
parents:
47
diff
changeset
|
355 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
356 #if SDL_VIDEO_DRIVER_SVGALIB |
0 | 357 extern VideoBootStrap SVGALIB_bootstrap; |
358 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
359 #if SDL_VIDEO_DRIVER_GAPI |
1251
86d0d01290ea
Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
Ryan C. Gordon <icculus@icculus.org>
parents:
1190
diff
changeset
|
360 extern VideoBootStrap GAPI_bootstrap; |
86d0d01290ea
Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
Ryan C. Gordon <icculus@icculus.org>
parents:
1190
diff
changeset
|
361 #endif |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
1706
diff
changeset
|
362 #if SDL_VIDEO_DRIVER_WIN32 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
1706
diff
changeset
|
363 extern VideoBootStrap WIN32_bootstrap; |
0 | 364 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
365 #if SDL_VIDEO_DRIVER_BWINDOW |
0 | 366 extern VideoBootStrap BWINDOW_bootstrap; |
367 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
368 #if SDL_VIDEO_DRIVER_TOOLBOX |
0 | 369 extern VideoBootStrap TOOLBOX_bootstrap; |
370 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
371 #if SDL_VIDEO_DRIVER_DRAWSPROCKET |
0 | 372 extern VideoBootStrap DSp_bootstrap; |
373 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
374 #if SDL_VIDEO_DRIVER_CYBERGRAPHICS |
0 | 375 extern VideoBootStrap CGX_bootstrap; |
376 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
377 #if SDL_VIDEO_DRIVER_PHOTON |
173
83018110dce8
Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents:
167
diff
changeset
|
378 extern VideoBootStrap ph_bootstrap; |
83018110dce8
Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents:
167
diff
changeset
|
379 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
380 #if SDL_VIDEO_DRIVER_EPOC |
173
83018110dce8
Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents:
167
diff
changeset
|
381 extern VideoBootStrap EPOC_bootstrap; |
83018110dce8
Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents:
167
diff
changeset
|
382 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
383 #if SDL_VIDEO_DRIVER_XBIOS |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
384 extern VideoBootStrap XBIOS_bootstrap; |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
385 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
386 #if SDL_VIDEO_DRIVER_GEM |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
387 extern VideoBootStrap GEM_bootstrap; |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
388 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
389 #if SDL_VIDEO_DRIVER_PICOGUI |
433
706de3956894
Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
371
diff
changeset
|
390 extern VideoBootStrap PG_bootstrap; |
706de3956894
Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
371
diff
changeset
|
391 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
392 #if SDL_VIDEO_DRIVER_DC |
509
dad72daf44b3
Added initial support for Dreamcast (thanks HERO!)
Sam Lantinga <slouken@libsdl.org>
parents:
453
diff
changeset
|
393 extern VideoBootStrap DC_bootstrap; |
dad72daf44b3
Added initial support for Dreamcast (thanks HERO!)
Sam Lantinga <slouken@libsdl.org>
parents:
453
diff
changeset
|
394 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
395 #if SDL_VIDEO_DRIVER_RISCOS |
630
550bccdf04bd
Added initial support for RISC OS (thanks Peter Naulls!)
Sam Lantinga <slouken@libsdl.org>
parents:
509
diff
changeset
|
396 extern VideoBootStrap RISCOS_bootstrap; |
550bccdf04bd
Added initial support for RISC OS (thanks Peter Naulls!)
Sam Lantinga <slouken@libsdl.org>
parents:
509
diff
changeset
|
397 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
398 #if SDL_VIDEO_DRIVER_OS2FS |
1190 | 399 extern VideoBootStrap OS2FSLib_bootstrap; |
400 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
401 #if SDL_VIDEO_DRIVER_AALIB |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
402 extern VideoBootStrap AALIB_bootstrap; |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
403 #endif |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
404 #if SDL_VIDEO_DRIVER_DUMMY |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
405 extern VideoBootStrap DUMMY_bootstrap; |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
406 #endif |
1658 | 407 #if SDL_VIDEO_DRIVER_GLSDL |
408 extern VideoBootStrap glSDL_bootstrap; | |
409 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
410 |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
411 #define SDL_CurrentDisplay (_this->displays[_this->current_display]) |
0 | 412 |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1666
diff
changeset
|
413 extern SDL_VideoDevice *SDL_GetVideoDevice(); |
1677
5e4c5e095925
Added new style dummy renderer
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
414 extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode); |
5e4c5e095925
Added new style dummy renderer
Sam Lantinga <slouken@libsdl.org>
parents:
1676
diff
changeset
|
415 extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display); |
1725
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1720
diff
changeset
|
416 extern SDL_bool SDL_AddDisplayMode(int displayIndex, |
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1720
diff
changeset
|
417 const SDL_DisplayMode * mode); |
1670 | 418 extern void SDL_AddRenderDriver(int displayIndex, |
419 const SDL_RenderDriver * driver); | |
0 | 420 |
1706
1577404809f0
Added a multi-window version of testsprite using the new API.
Sam Lantinga <slouken@libsdl.org>
parents:
1683
diff
changeset
|
421 extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID); |
1577404809f0
Added a multi-window version of testsprite using the new API.
Sam Lantinga <slouken@libsdl.org>
parents:
1683
diff
changeset
|
422 extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window); |
1577404809f0
Added a multi-window version of testsprite using the new API.
Sam Lantinga <slouken@libsdl.org>
parents:
1683
diff
changeset
|
423 |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
424 extern void SDL_OnWindowShown(SDL_Window * window); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
425 extern void SDL_OnWindowHidden(SDL_Window * window); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
426 extern void SDL_OnWindowFocusGained(SDL_Window * window); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
427 extern void SDL_OnWindowFocusLost(SDL_Window * window); |
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1729
diff
changeset
|
428 |
0 | 429 #endif /* _SDL_sysvideo_h */ |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
430 |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1658
diff
changeset
|
431 /* vi: set ts=4 sw=4 expandtab: */ |