annotate src/video/SDL_sysvideo.h @ 2835:f38257b5d936

Initial pixel shader support for YUV textures in the GL renderer. This work is not complete yet!
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 06 Dec 2008 00:56:47 +0000
parents 0969758c8809
children 99210400e8b9
rev   line source
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1251
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
4
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1251
diff changeset
6 modify it under the terms of the GNU Lesser General Public
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1251
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
9
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1251
diff changeset
13 Lesser General Public License for more details.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
18
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
19 Sam Lantinga
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
23
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
24 #ifndef _SDL_sysvideo_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
25 #define _SDL_sysvideo_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
26
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
27 #include "SDL_mouse.h"
2268
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2245
diff changeset
28 #include "SDL_keysym.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
29
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
30 /* The SDL video driver */
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
31
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
32 typedef struct SDL_Window SDL_Window;
c121d94672cb SDL 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 typedef struct SDL_Texture SDL_Texture;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
34 typedef struct SDL_Renderer SDL_Renderer;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
35 typedef struct SDL_RenderDriver SDL_RenderDriver;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
36 typedef struct SDL_VideoDisplay SDL_VideoDisplay;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
37 typedef struct SDL_VideoDevice SDL_VideoDevice;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
38
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
39 /* Define the SDL texture structure */
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
40 struct SDL_Texture
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
41 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
42 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
43
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
44 Uint32 format; /**< The pixel format of the texture */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
45 int access; /**< SDL_TextureAccess */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
46 int w; /**< The width of the texture */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
47 int h; /**< The height of the texture */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
48 int modMode; /**< The texture modulation mode */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
49 int blendMode; /**< The texture blend mode */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
50 int scaleMode; /**< The texture scale mode */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
51 Uint8 r, g, b, a; /**< Texture modulation values */
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
52
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
53 SDL_Renderer *renderer;
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
54
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
55 void *driverdata; /**< Driver specific texture representation */
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
56
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
57 SDL_Texture *next;
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
58 };
c121d94672cb SDL 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
c121d94672cb SDL 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 /* Define the SDL renderer structure */
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
61 struct SDL_Renderer
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
62 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
63 int (*ActivateRenderer) (SDL_Renderer * renderer);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
64 int (*DisplayModeChanged) (SDL_Renderer * renderer);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
65 int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
66 int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
67 void **pixels, int *pitch);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
68 int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
69 const SDL_Color * colors, int firstcolor,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
70 int ncolors);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
71 int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
72 SDL_Color * colors, int firstcolor,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
73 int ncolors);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
74 int (*SetTextureColorMod) (SDL_Renderer * renderer,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
75 SDL_Texture * texture);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
76 int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
77 SDL_Texture * texture);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
78 int (*SetTextureBlendMode) (SDL_Renderer * renderer,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
79 SDL_Texture * texture);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
80 int (*SetTextureScaleMode) (SDL_Renderer * renderer,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
81 SDL_Texture * texture);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
82 int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
83 const SDL_Rect * rect, const void *pixels,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
84 int pitch);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
85 int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
86 const SDL_Rect * rect, int markDirty, void **pixels,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
87 int *pitch);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
88 void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
89 void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
90 int numrects, const SDL_Rect * rects);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
91 int (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
92 Uint8 a, const SDL_Rect * rect);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
93 int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
94 const SDL_Rect * srcrect, const SDL_Rect * dstrect);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
95 void (*RenderPresent) (SDL_Renderer * renderer);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
96 void (*DestroyTexture) (SDL_Renderer * renderer, 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
97
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
98 void (*DestroyRenderer) (SDL_Renderer * renderer);
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
99
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
100 /* The current renderer info */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
101 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
102
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
103 /* The window associated with the renderer */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
104 SDL_WindowID 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
105
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
106 void *driverdata;
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
107 };
c121d94672cb SDL 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
c121d94672cb SDL 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 /* Define the SDL render driver structure */
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
110 struct SDL_RenderDriver
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
111 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
112 SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 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
113
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
114 /* Info about the renderer capabilities */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
115 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
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
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
118 /* Define the SDL window structure, corresponding to toplevel windows */
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
119 struct SDL_Window
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
120 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
121 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
122
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
123 char *title;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
124 int x, y;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
125 int w, h;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
126 Uint32 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
127
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
128 int display;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
129 SDL_Renderer *renderer;
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
130
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
131 void *userdata;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
132 void *driverdata;
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
133 };
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
134 #define FULLSCREEN_VISIBLE(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
135 (((W)->flags & SDL_WINDOW_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
136 ((W)->flags & SDL_WINDOW_SHOWN) && \
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
137 !((W)->flags & SDL_WINDOW_MINIMIZED))
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
138
2742
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
139 /*
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
140 * Define the SDL display structure This corresponds to physical monitors
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
141 * attached to the system.
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
142 */
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
143 struct SDL_VideoDisplay
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
144 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
145 int max_display_modes;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
146 int num_display_modes;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
147 SDL_DisplayMode *display_modes;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
148 SDL_DisplayMode desktop_mode;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
149 SDL_DisplayMode current_mode;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
150 SDL_DisplayMode fullscreen_mode;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
151 SDL_Palette *palette;
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
152
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
153 Uint16 *gamma;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
154 Uint16 *saved_gamma; /* (just offset into gamma) */
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
155
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
156 int num_render_drivers;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
157 SDL_RenderDriver *render_drivers;
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
158
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
159 int num_windows;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
160 SDL_Window *windows;
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
161
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
162 SDL_Renderer *current_renderer;
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
163
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
164 /* The hash list of textures */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
165 SDL_Texture *textures[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
166
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
167 SDL_VideoDevice *device;
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
168
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
169 void *driverdata;
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
170 };
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
171
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
172 /* Define the SDL video driver structure */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
173 #define _THIS SDL_VideoDevice *_this
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
174
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
175 struct SDL_VideoDevice
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
176 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
177 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
178 /* The name of this video driver */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
179 const char *name;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
180
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
181 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
182 /* Initialization/Query functions */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
183
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
184 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
185 * Initialize the native video subsystem, filling in the list of
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
186 * displays for this driver, returning 0 or -1 if there's an error.
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
187 */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
188 int (*VideoInit) (_THIS);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
189
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
190 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
191 * Reverse the effects VideoInit() -- called if VideoInit() fails or
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
192 * if the application is shutting down the video subsystem.
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
193 */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
194 void (*VideoQuit) (_THIS);
1913
83420da906a5 Implemented Windows OpenGL support
Sam Lantinga <slouken@libsdl.org>
parents: 1912
diff changeset
195
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
196 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
197 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
198 * Display functions
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
199 */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
200
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
201 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
202 * Get a list of the available display modes. e.g.
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
203 * SDL_AddDisplayMode(_this->current_display, mode)
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
204 */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
205 void (*GetDisplayModes) (_THIS);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
206
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
207 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
208 * Setting the display mode is independent of creating windows, so
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
209 * when the display mode is changed, all existing windows should have
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
210 * their data updated accordingly, including the display surfaces
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
211 * associated with them.
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
212 */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
213 int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
214
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
215 /* Set the color entries of the display palette */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
216 int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
2742
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
217
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
218 /* Get the color entries of the display palette */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
219 int (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
220
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
221 /* Set the gamma ramp */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
222 int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
2742
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
223
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
224 /* Get the gamma ramp */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
225 int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
226
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
227 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
228 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
229 * Window functions
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
230 */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
231 int (*CreateWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
232 int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
233 void (*SetWindowTitle) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
234 void (*SetWindowPosition) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
235 void (*SetWindowSize) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
236 void (*ShowWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
237 void (*HideWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
238 void (*RaiseWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
239 void (*MaximizeWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
240 void (*MinimizeWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
241 void (*RestoreWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
242 void (*SetWindowGrab) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
243 void (*DestroyWindow) (_THIS, SDL_Window * window);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
244
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
245 /* Get some platform dependent window information */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
246 SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
247 struct SDL_SysWMinfo * info);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
248
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
249 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
250 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
251 * OpenGL support
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
252 */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
253 int (*GL_LoadLibrary) (_THIS, const char *path);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
254 void *(*GL_GetProcAddress) (_THIS, const char *proc);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
255 SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
256 int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
257 int (*GL_SetSwapInterval) (_THIS, int interval);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
258 int (*GL_GetSwapInterval) (_THIS);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
259 void (*GL_SwapWindow) (_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
260 void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
261
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
262 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
263 /*
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
264 * Event manager functions
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
265 */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
266 void (*PumpEvents) (_THIS);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
267
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
268 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
269 /* Data common to all drivers */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
270 int num_displays;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
271 SDL_VideoDisplay *displays;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
272 int current_display;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
273 Uint32 next_object_id;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
274
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
275 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
276 /* Data used by the GL drivers */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
277 struct
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
278 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
279 int red_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
280 int green_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
281 int blue_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
282 int alpha_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
283 int depth_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
284 int buffer_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
285 int stencil_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
286 int double_buffer;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
287 int accum_red_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
288 int accum_green_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
289 int accum_blue_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
290 int accum_alpha_size;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
291 int stereo;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
292 int multisamplebuffers;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
293 int multisamplesamples;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
294 int accelerated;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
295 int retained_backing;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
296 int driver_loaded;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
297 char driver_path[256];
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
298 void *dll_handle;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
299 } gl_config;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
300
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
301 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
302 /* Data private to this driver */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
303 void *driverdata;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
304 struct SDL_GLDriverData *gl_data;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
305
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
306 /* * * */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
307 /* The function used to dispose of this structure */
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
308 void (*free) (_THIS);
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
309 };
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
310
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
311 typedef struct VideoBootStrap
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
312 {
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
313 const char *name;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
314 const char *desc;
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
315 int (*available) (void);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
316 SDL_VideoDevice *(*create) (int devindex);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
317 } VideoBootStrap;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
318
1931
103c6fec2a60 The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents: 1928
diff changeset
319 #if SDL_VIDEO_DRIVER_COCOA
103c6fec2a60 The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents: 1928
diff changeset
320 extern VideoBootStrap COCOA_bootstrap;
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
321 #endif
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
322 #if SDL_VIDEO_DRIVER_X11
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
323 extern VideoBootStrap X11_bootstrap;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
324 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
325 #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
326 extern VideoBootStrap NX_bootstrap;
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents: 19
diff changeset
327 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
328 #if SDL_VIDEO_DRIVER_IPOD
1140
af8b0f9ac2f4 iPod Linux framebuffer support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1052
diff changeset
329 extern VideoBootStrap iPod_bootstrap;
af8b0f9ac2f4 iPod Linux framebuffer support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1052
diff changeset
330 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
331 #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
332 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
333 #endif
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
334 #if SDL_VIDEO_DRIVER_FBCON
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
335 extern VideoBootStrap FBCON_bootstrap;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
336 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
337 #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
338 extern VideoBootStrap DirectFB_bootstrap;
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 75
diff changeset
339 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
340 #if SDL_VIDEO_DRIVER_PS2GS
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
341 extern VideoBootStrap PS2GS_bootstrap;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
342 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
343 #if SDL_VIDEO_DRIVER_VGL
75
b0ae59d0f3ee Added patches from FreeBSD ports
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
344 extern VideoBootStrap VGL_bootstrap;
b0ae59d0f3ee Added patches from FreeBSD ports
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
345 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
346 #if SDL_VIDEO_DRIVER_SVGALIB
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
347 extern VideoBootStrap SVGALIB_bootstrap;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
348 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
349 #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
350 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
351 #endif
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
352 #if SDL_VIDEO_DRIVER_WIN32
c121d94672cb SDL 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 extern VideoBootStrap WIN32_bootstrap;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
354 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
355 #if SDL_VIDEO_DRIVER_BWINDOW
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
356 extern VideoBootStrap BWINDOW_bootstrap;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
357 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
358 #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
359 extern VideoBootStrap ph_bootstrap;
83018110dce8 Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents: 167
diff changeset
360 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
361 #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
362 extern VideoBootStrap EPOC_bootstrap;
83018110dce8 Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents: 167
diff changeset
363 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
364 #if SDL_VIDEO_DRIVER_XBIOS
281
c5010ab8ba35 Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents: 252
diff changeset
365 extern VideoBootStrap XBIOS_bootstrap;
c5010ab8ba35 Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents: 252
diff changeset
366 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
367 #if SDL_VIDEO_DRIVER_GEM
281
c5010ab8ba35 Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents: 252
diff changeset
368 extern VideoBootStrap GEM_bootstrap;
c5010ab8ba35 Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents: 252
diff changeset
369 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
370 #if SDL_VIDEO_DRIVER_DC
509
dad72daf44b3 Added initial support for Dreamcast (thanks HERO!)
Sam Lantinga <slouken@libsdl.org>
parents: 453
diff changeset
371 extern VideoBootStrap DC_bootstrap;
dad72daf44b3 Added initial support for Dreamcast (thanks HERO!)
Sam Lantinga <slouken@libsdl.org>
parents: 453
diff changeset
372 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
373 #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
374 extern VideoBootStrap RISCOS_bootstrap;
550bccdf04bd Added initial support for RISC OS (thanks Peter Naulls!)
Sam Lantinga <slouken@libsdl.org>
parents: 509
diff changeset
375 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
376 #if SDL_VIDEO_DRIVER_OS2FS
1190
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents: 1187
diff changeset
377 extern VideoBootStrap OS2FSLib_bootstrap;
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents: 1187
diff changeset
378 #endif
2742
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
379 #if SDL_VIDEO_DRIVER_UIKIT
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
380 extern VideoBootStrap UIKIT_bootstrap;
b86247d21929 Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2735
diff changeset
381 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
382 #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
383 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
384 #endif
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2702
diff changeset
385 #if SDL_VIDEO_DRIVER_NDS
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2702
diff changeset
386 extern VideoBootStrap NDS_bootstrap;
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2702
diff changeset
387 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
388
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
389 #define SDL_CurrentDisplay (_this->displays[_this->current_display])
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
390
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
391 extern SDL_VideoDevice *SDL_GetVideoDevice();
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
392 extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
393 extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
394 extern SDL_bool
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
395 SDL_AddDisplayMode(int displayIndex, const SDL_DisplayMode * mode);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
396 extern void
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
397 SDL_AddRenderDriver(int displayIndex, const SDL_RenderDriver * driver);
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
398
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
399 extern int SDL_RecreateWindow(SDL_Window * window, Uint32 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
400 extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
401 extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1737
diff changeset
402
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
403 extern void SDL_OnWindowShown(SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
404 extern void SDL_OnWindowHidden(SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
405 extern void SDL_OnWindowResized(SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
406 extern void SDL_OnWindowFocusGained(SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
407 extern void SDL_OnWindowFocusLost(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
408 extern SDL_WindowID SDL_GetFocusWindow(void);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
409
2753
Sam Lantinga <slouken@libsdl.org>
parents: 2742
diff changeset
410 #endif /* _SDL_sysvideo_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
411
c121d94672cb SDL 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 /* vi: set ts=4 sw=4 expandtab: */