Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SDL_video.h « SDL2 « include « sdlew « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0a97ea459150c690c97a429bd0d3be94e9967cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367

#ifndef _SDL_video_h
#define _SDL_video_h

#include "SDL_stdinc.h"
#include "SDL_pixels.h"
#include "SDL_rect.h"
#include "SDL_surface.h"

#include "begin_code.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct
{
    Uint32 format;
    int w;
    int h;
    int refresh_rate;
    void *driverdata;
} SDL_DisplayMode;

typedef struct SDL_Window SDL_Window;

typedef enum
{
    SDL_WINDOW_FULLSCREEN = 0x00000001,
    SDL_WINDOW_OPENGL = 0x00000002,
    SDL_WINDOW_SHOWN = 0x00000004,
    SDL_WINDOW_HIDDEN = 0x00000008,
    SDL_WINDOW_BORDERLESS = 0x00000010,
    SDL_WINDOW_RESIZABLE = 0x00000020,
    SDL_WINDOW_MINIMIZED = 0x00000040,
    SDL_WINDOW_MAXIMIZED = 0x00000080,
    SDL_WINDOW_INPUT_GRABBED = 0x00000100,
    SDL_WINDOW_INPUT_FOCUS = 0x00000200,
    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,
    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
    SDL_WINDOW_FOREIGN = 0x00000800
} SDL_WindowFlags;

#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
#define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
#define SDL_WINDOWPOS_ISUNDEFINED(X)    \
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)

#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X)    \
            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)

typedef enum
{
    SDL_WINDOWEVENT_NONE,
    SDL_WINDOWEVENT_SHOWN,
    SDL_WINDOWEVENT_HIDDEN,
    SDL_WINDOWEVENT_EXPOSED,
    SDL_WINDOWEVENT_MOVED,
    SDL_WINDOWEVENT_RESIZED,
    SDL_WINDOWEVENT_SIZE_CHANGED,
    SDL_WINDOWEVENT_MINIMIZED,
    SDL_WINDOWEVENT_MAXIMIZED,
    SDL_WINDOWEVENT_RESTORED,
    SDL_WINDOWEVENT_ENTER,
    SDL_WINDOWEVENT_LEAVE,
    SDL_WINDOWEVENT_FOCUS_GAINED,
    SDL_WINDOWEVENT_FOCUS_LOST,
    SDL_WINDOWEVENT_CLOSE
} SDL_WindowEventID;

typedef void *SDL_GLContext;

typedef enum
{
    SDL_GL_RED_SIZE,
    SDL_GL_GREEN_SIZE,
    SDL_GL_BLUE_SIZE,
    SDL_GL_ALPHA_SIZE,
    SDL_GL_BUFFER_SIZE,
    SDL_GL_DOUBLEBUFFER,
    SDL_GL_DEPTH_SIZE,
    SDL_GL_STENCIL_SIZE,
    SDL_GL_ACCUM_RED_SIZE,
    SDL_GL_ACCUM_GREEN_SIZE,
    SDL_GL_ACCUM_BLUE_SIZE,
    SDL_GL_ACCUM_ALPHA_SIZE,
    SDL_GL_STEREO,
    SDL_GL_MULTISAMPLEBUFFERS,
    SDL_GL_MULTISAMPLESAMPLES,
    SDL_GL_ACCELERATED_VISUAL,
    SDL_GL_RETAINED_BACKING,
    SDL_GL_CONTEXT_MAJOR_VERSION,
    SDL_GL_CONTEXT_MINOR_VERSION,
    SDL_GL_CONTEXT_EGL,
    SDL_GL_CONTEXT_FLAGS,
    SDL_GL_CONTEXT_PROFILE_MASK,
    SDL_GL_SHARE_WITH_CURRENT_CONTEXT
} SDL_GLattr;

typedef enum
{
    SDL_GL_CONTEXT_PROFILE_CORE           = 0x0001,
    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 0x0002,
    SDL_GL_CONTEXT_PROFILE_ES             = 0x0004
} SDL_GLprofile;

typedef enum
{
    SDL_GL_CONTEXT_DEBUG_FLAG              = 0x0001,
    SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
    SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG      = 0x0004,
    SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008
} SDL_GLcontextFlag;

typedef int SDLCALL tSDL_GetNumVideoDrivers(void);

typedef const char * SDLCALL tSDL_GetVideoDriver(int index);

typedef int SDLCALL tSDL_VideoInit(const char *driver_name);

typedef void SDLCALL tSDL_VideoQuit(void);

typedef const char * SDLCALL tSDL_GetCurrentVideoDriver(void);

typedef int SDLCALL tSDL_GetNumVideoDisplays(void);

typedef const char * SDLCALL tSDL_GetDisplayName(int displayIndex);

typedef int SDLCALL tSDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);

typedef int SDLCALL tSDL_GetNumDisplayModes(int displayIndex);

typedef int SDLCALL tSDL_GetDisplayMode(int displayIndex, int modeIndex,
                                               SDL_DisplayMode * mode);

typedef int SDLCALL tSDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);

typedef int SDLCALL tSDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);

typedef SDL_DisplayMode * SDLCALL tSDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);

typedef int SDLCALL tSDL_GetWindowDisplayIndex(SDL_Window * window);

typedef int SDLCALL tSDL_SetWindowDisplayMode(SDL_Window * window,
                                                     const SDL_DisplayMode
                                                         * mode);

typedef int SDLCALL tSDL_GetWindowDisplayMode(SDL_Window * window,
                                                     SDL_DisplayMode * mode);

typedef Uint32 SDLCALL tSDL_GetWindowPixelFormat(SDL_Window * window);

typedef SDL_Window * SDLCALL tSDL_CreateWindow(const char *title,
                                                      int x, int y, int w,
                                                      int h, Uint32 flags);

typedef SDL_Window * SDLCALL tSDL_CreateWindowFrom(const void *data);

typedef Uint32 SDLCALL tSDL_GetWindowID(SDL_Window * window);

typedef SDL_Window * SDLCALL tSDL_GetWindowFromID(Uint32 id);

typedef Uint32 SDLCALL tSDL_GetWindowFlags(SDL_Window * window);

typedef void SDLCALL tSDL_SetWindowTitle(SDL_Window * window,
                                                const char *title);

typedef const char * SDLCALL tSDL_GetWindowTitle(SDL_Window * window);

typedef void SDLCALL tSDL_SetWindowIcon(SDL_Window * window,
                                               SDL_Surface * icon);

extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
                                                const char *name,
                                                void *userdata);

typedef void * SDLCALL tSDL_GetWindowData(SDL_Window * window,
                                                const char *name);

typedef void SDLCALL tSDL_SetWindowPosition(SDL_Window * window,
                                                   int x, int y);

typedef void SDLCALL tSDL_GetWindowPosition(SDL_Window * window,
                                                   int *x, int *y);

typedef void SDLCALL tSDL_SetWindowSize(SDL_Window * window, int w,
                                               int h);

typedef void SDLCALL tSDL_GetWindowSize(SDL_Window * window, int *w,
                                               int *h);

typedef void SDLCALL tSDL_SetWindowMinimumSize(SDL_Window * window,
                                                      int min_w, int min_h);

typedef void SDLCALL tSDL_GetWindowMinimumSize(SDL_Window * window,
                                                      int *w, int *h);

typedef void SDLCALL tSDL_SetWindowMaximumSize(SDL_Window * window,
                                                      int max_w, int max_h);

typedef void SDLCALL tSDL_GetWindowMaximumSize(SDL_Window * window,
                                                      int *w, int *h);

typedef void SDLCALL tSDL_SetWindowBordered(SDL_Window * window,
                                                   SDL_bool bordered);

typedef void SDLCALL tSDL_ShowWindow(SDL_Window * window);

typedef void SDLCALL tSDL_HideWindow(SDL_Window * window);

typedef void SDLCALL tSDL_RaiseWindow(SDL_Window * window);

typedef void SDLCALL tSDL_MaximizeWindow(SDL_Window * window);

typedef void SDLCALL tSDL_MinimizeWindow(SDL_Window * window);

typedef void SDLCALL tSDL_RestoreWindow(SDL_Window * window);

typedef int SDLCALL tSDL_SetWindowFullscreen(SDL_Window * window,
                                                    Uint32 flags);

typedef SDL_Surface * SDLCALL tSDL_GetWindowSurface(SDL_Window * window);

typedef int SDLCALL tSDL_UpdateWindowSurface(SDL_Window * window);

typedef int SDLCALL tSDL_UpdateWindowSurfaceRects(SDL_Window * window,
                                                         const SDL_Rect * rects,
                                                         int numrects);

typedef void SDLCALL tSDL_SetWindowGrab(SDL_Window * window,
                                               SDL_bool grabbed);

typedef SDL_bool SDLCALL tSDL_GetWindowGrab(SDL_Window * window);

typedef int SDLCALL tSDL_SetWindowBrightness(SDL_Window * window, float brightness);

typedef float SDLCALL tSDL_GetWindowBrightness(SDL_Window * window);

typedef int SDLCALL tSDL_SetWindowGammaRamp(SDL_Window * window,
                                                   const Uint16 * red,
                                                   const Uint16 * green,
                                                   const Uint16 * blue);

typedef int SDLCALL tSDL_GetWindowGammaRamp(SDL_Window * window,
                                                   Uint16 * red,
                                                   Uint16 * green,
                                                   Uint16 * blue);

typedef void SDLCALL tSDL_DestroyWindow(SDL_Window * window);

typedef SDL_bool SDLCALL tSDL_IsScreenSaverEnabled(void);

typedef void SDLCALL tSDL_EnableScreenSaver(void);

typedef void SDLCALL tSDL_DisableScreenSaver(void);

typedef int SDLCALL tSDL_GL_LoadLibrary(const char *path);

typedef void * SDLCALL tSDL_GL_GetProcAddress(const char *proc);

typedef void SDLCALL tSDL_GL_UnloadLibrary(void);

typedef SDL_bool SDLCALL tSDL_GL_ExtensionSupported(const char
                                                           *extension);

typedef int SDLCALL tSDL_GL_SetAttribute(SDL_GLattr attr, int value);

typedef int SDLCALL tSDL_GL_GetAttribute(SDL_GLattr attr, int *value);

typedef SDL_GLContext SDLCALL tSDL_GL_CreateContext(SDL_Window *
                                                           window);

typedef int SDLCALL tSDL_GL_MakeCurrent(SDL_Window * window,
                                               SDL_GLContext context);

extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);

typedef SDL_GLContext SDLCALL tSDL_GL_GetCurrentContext(void);

typedef int SDLCALL tSDL_GL_SetSwapInterval(int interval);

typedef int SDLCALL tSDL_GL_GetSwapInterval(void);

typedef void SDLCALL tSDL_GL_SwapWindow(SDL_Window * window);

typedef void SDLCALL tSDL_GL_DeleteContext(SDL_GLContext context);

extern tSDL_GetNumVideoDrivers *SDL_GetNumVideoDrivers;
extern tSDL_GetVideoDriver *SDL_GetVideoDriver;
extern tSDL_VideoInit *SDL_VideoInit;
extern tSDL_VideoQuit *SDL_VideoQuit;
extern tSDL_GetCurrentVideoDriver *SDL_GetCurrentVideoDriver;
extern tSDL_GetNumVideoDisplays *SDL_GetNumVideoDisplays;
extern tSDL_GetDisplayName *SDL_GetDisplayName;
extern tSDL_GetDisplayBounds *SDL_GetDisplayBounds;
extern tSDL_GetNumDisplayModes *SDL_GetNumDisplayModes;
extern tSDL_GetDisplayMode *SDL_GetDisplayMode;
extern tSDL_GetDesktopDisplayMode *SDL_GetDesktopDisplayMode;
extern tSDL_GetCurrentDisplayMode *SDL_GetCurrentDisplayMode;
extern tSDL_GetClosestDisplayMode *SDL_GetClosestDisplayMode;
extern tSDL_GetWindowDisplayIndex *SDL_GetWindowDisplayIndex;
extern tSDL_SetWindowDisplayMode *SDL_SetWindowDisplayMode;
extern tSDL_GetWindowDisplayMode *SDL_GetWindowDisplayMode;
extern tSDL_GetWindowPixelFormat *SDL_GetWindowPixelFormat;
extern tSDL_CreateWindow *SDL_CreateWindow;
extern tSDL_CreateWindowFrom *SDL_CreateWindowFrom;
extern tSDL_GetWindowID *SDL_GetWindowID;
extern tSDL_GetWindowFromID *SDL_GetWindowFromID;
extern tSDL_GetWindowFlags *SDL_GetWindowFlags;
extern tSDL_SetWindowTitle *SDL_SetWindowTitle;
extern tSDL_GetWindowTitle *SDL_GetWindowTitle;
extern tSDL_SetWindowIcon *SDL_SetWindowIcon;
extern tSDL_GetWindowData *SDL_GetWindowData;
extern tSDL_SetWindowPosition *SDL_SetWindowPosition;
extern tSDL_GetWindowPosition *SDL_GetWindowPosition;
extern tSDL_SetWindowSize *SDL_SetWindowSize;
extern tSDL_GetWindowSize *SDL_GetWindowSize;
extern tSDL_SetWindowMinimumSize *SDL_SetWindowMinimumSize;
extern tSDL_GetWindowMinimumSize *SDL_GetWindowMinimumSize;
extern tSDL_SetWindowMaximumSize *SDL_SetWindowMaximumSize;
extern tSDL_GetWindowMaximumSize *SDL_GetWindowMaximumSize;
extern tSDL_SetWindowBordered *SDL_SetWindowBordered;
extern tSDL_ShowWindow *SDL_ShowWindow;
extern tSDL_HideWindow *SDL_HideWindow;
extern tSDL_RaiseWindow *SDL_RaiseWindow;
extern tSDL_MaximizeWindow *SDL_MaximizeWindow;
extern tSDL_MinimizeWindow *SDL_MinimizeWindow;
extern tSDL_RestoreWindow *SDL_RestoreWindow;
extern tSDL_SetWindowFullscreen *SDL_SetWindowFullscreen;
extern tSDL_GetWindowSurface *SDL_GetWindowSurface;
extern tSDL_UpdateWindowSurface *SDL_UpdateWindowSurface;
extern tSDL_UpdateWindowSurfaceRects *SDL_UpdateWindowSurfaceRects;
extern tSDL_SetWindowGrab *SDL_SetWindowGrab;
extern tSDL_GetWindowGrab *SDL_GetWindowGrab;
extern tSDL_SetWindowBrightness *SDL_SetWindowBrightness;
extern tSDL_GetWindowBrightness *SDL_GetWindowBrightness;
extern tSDL_SetWindowGammaRamp *SDL_SetWindowGammaRamp;
extern tSDL_GetWindowGammaRamp *SDL_GetWindowGammaRamp;
extern tSDL_DestroyWindow *SDL_DestroyWindow;
extern tSDL_IsScreenSaverEnabled *SDL_IsScreenSaverEnabled;
extern tSDL_EnableScreenSaver *SDL_EnableScreenSaver;
extern tSDL_DisableScreenSaver *SDL_DisableScreenSaver;
extern tSDL_GL_LoadLibrary *SDL_GL_LoadLibrary;
extern tSDL_GL_GetProcAddress *SDL_GL_GetProcAddress;
extern tSDL_GL_UnloadLibrary *SDL_GL_UnloadLibrary;
extern tSDL_GL_ExtensionSupported *SDL_GL_ExtensionSupported;
extern tSDL_GL_SetAttribute *SDL_GL_SetAttribute;
extern tSDL_GL_GetAttribute *SDL_GL_GetAttribute;
extern tSDL_GL_CreateContext *SDL_GL_CreateContext;
extern tSDL_GL_MakeCurrent *SDL_GL_MakeCurrent;
extern tSDL_GL_GetCurrentContext *SDL_GL_GetCurrentContext;
extern tSDL_GL_SetSwapInterval *SDL_GL_SetSwapInterval;
extern tSDL_GL_GetSwapInterval *SDL_GL_GetSwapInterval;
extern tSDL_GL_SwapWindow *SDL_GL_SwapWindow;
extern tSDL_GL_DeleteContext *SDL_GL_DeleteContext;

#ifdef __cplusplus
}
#endif
#include "close_code.h"

#endif