annotate src/video/photon/SDL_photon.h @ 4513:c5af44c1eea9

Fixed compile warning
author Sam Lantinga <slouken@libsdl.org>
date Tue, 13 Jul 2010 22:24:46 -0700
parents f7b03b6838cb
children be02be2ea897
rev   line source
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
3697
f7b03b6838cb Fixed bug #926
Sam Lantinga <slouken@libsdl.org>
parents: 3387
diff changeset
3 Copyright (C) 1997-2010 Sam Lantinga
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 QNX Photon GUI SDL driver
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 Copyright (C) 2009 Mike Gorchak
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 (mike@malva.ua, lestat@i.com.ua)
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 */
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 #ifndef __SDL_PHOTON_H__
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 #define __SDL_PHOTON_H__
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29
3108
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
30 /* GF headers must be included first for the Photon GF functions */
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
31 #if defined(SDL_VIDEO_OPENGL_ES)
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
32 #include <gf/gf.h>
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
33 #include <GLES/egl.h>
3108
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
34 #endif /* SDL_VIDEO_OPENGL_ES */
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
35
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
36 #include "SDL_config.h"
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 #include "../SDL_sysvideo.h"
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 #include <Ph.h>
3108
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
40 #include <Pt.h>
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
41 #include <photon/PkKeyDef.h>
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
42
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
43 /* Maximum display devices, which can handle SDL Photon driver */
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
44 #define SDL_VIDEO_PHOTON_MAX_RIDS 16
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 typedef struct SDL_VideoData
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 {
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
48 PhRid_t rid[SDL_VIDEO_PHOTON_MAX_RIDS];
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
49 uint32_t avail_rids;
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
50 uint32_t current_device_id;
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
51 #if defined(SDL_VIDEO_OPENGL_ES)
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
52 gf_dev_t gfdev; /* GF device handle */
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
53 gf_dev_info_t gfdev_info; /* GF device information */
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
54 SDL_bool gfinitialized; /* GF device initialization status */
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
55 EGLDisplay egldisplay; /* OpenGL ES display connection */
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
56 uint32_t egl_refcount; /* OpenGL ES reference count */
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
57 uint32_t swapinterval; /* OpenGL ES default swap interval */
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
58 EGLContext lgles_context; /* Last used OpenGL ES context */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
59 EGLSurface lgles_surface; /* Last used OpenGL ES target surface */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
60 #endif /* SDL_VIDEO_OPENGL_ES */
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 } SDL_VideoData;
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62
3108
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
63 /* This is hardcoded value in photon/Pg.h */
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
64 #define SDL_VIDEO_PHOTON_DEVICENAME_MAX 41
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
65 #define SDL_VIDEO_PHOTON_MAX_CURSOR_SIZE 128
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
66
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
67 /* Maximum event message size with data payload */
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
68 #define SDL_VIDEO_PHOTON_EVENT_SIZE 8192
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69
3384
04af265172f9 Continue working on 2D support in Photon.
Mike Gorchak <lestat@i.com.ua>
parents: 3193
diff changeset
70 /* Current video mode graphics capabilities */
3386
fff074de9675 Photon SDL renderer almost finished, the double/tripple buffering is left only.
Mike Gorchak <lestat@i.com.ua>
parents: 3384
diff changeset
71 #define SDL_VIDEO_PHOTON_CAP_ALPHA_BLEND 0x00000001
fff074de9675 Photon SDL renderer almost finished, the double/tripple buffering is left only.
Mike Gorchak <lestat@i.com.ua>
parents: 3384
diff changeset
72 #define SDL_VIDEO_PHOTON_CAP_SCALED_BLIT 0x00000002
3384
04af265172f9 Continue working on 2D support in Photon.
Mike Gorchak <lestat@i.com.ua>
parents: 3193
diff changeset
73
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
74 typedef struct SDL_DisplayData
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
75 {
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
76 uint32_t device_id;
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
77 uint32_t custom_refresh; /* Custom refresh rate for all modes */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
78 SDL_DisplayMode current_mode; /* Current video mode */
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
79 uint8_t description[SDL_VIDEO_PHOTON_DEVICENAME_MAX];
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
80 /* Device description */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
81 uint32_t caps; /* Device capabilities */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
82 PhCursorDef_t *cursor; /* Global cursor settings */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
83 SDL_bool cursor_visible; /* SDL_TRUE if cursor visible */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
84 uint32_t cursor_size; /* Cursor size in memory w/ structure */
3384
04af265172f9 Continue working on 2D support in Photon.
Mike Gorchak <lestat@i.com.ua>
parents: 3193
diff changeset
85 uint32_t mode_2dcaps; /* Current video mode 2D capabilities */
3387
05499ec8c022 Initial support for fullscreen application modes.
Mike Gorchak <lestat@i.com.ua>
parents: 3386
diff changeset
86 SDL_bool direct_mode; /* Direct mode state */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
87 #if defined(SDL_VIDEO_OPENGL_ES)
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
88 gf_display_t display; /* GF display handle */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
89 gf_display_info_t display_info; /* GF display information */
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
90 #endif /* SDL_VIDEO_OPENGL_ES */
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
91 } SDL_DisplayData;
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
92
3108
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
93 /* Maximum amount of OpenGL ES framebuffer configurations */
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
94 #define SDL_VIDEO_GF_OPENGLES_CONFS 32
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
95
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
96 typedef struct SDL_WindowData
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
97 {
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
98 SDL_bool uses_gles; /* if true window must support OpenGL ES */
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
99 PtWidget_t *window; /* window handle */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
100 #if defined(SDL_VIDEO_OPENGL_ES)
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
101 EGLConfig gles_configs[SDL_VIDEO_GF_OPENGLES_CONFS];
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
102 /* OpenGL ES framebuffer confs */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
103 EGLint gles_config; /* OpenGL ES configuration index */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
104 EGLContext gles_context; /* OpenGL ES context */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
105 EGLint gles_attributes[256]; /* OpenGL ES attributes for context */
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
106 EGLSurface gles_surface; /* OpenGL ES target rendering surface */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
107 gf_surface_t gfsurface; /* OpenGL ES GF's surface */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
108 PdOffscreenContext_t *phsurface; /* OpenGL ES Photon's surface */
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
109 #endif /* SDL_VIDEO_OPENGL_ES */
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 } SDL_WindowData;
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112 /****************************************************************************/
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 /* Low level Photon graphics driver capabilities */
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114 /****************************************************************************/
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 typedef struct Photon_DeviceCaps
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 {
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
117 uint8_t *name;
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
118 uint32_t caps;
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 } Photon_DeviceCaps;
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 #define SDL_PHOTON_UNACCELERATED 0x00000000
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122 #define SDL_PHOTON_ACCELERATED 0x00000001
3108
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
123 #define SDL_PHOTON_UNACCELERATED_3D 0x00000000
aa1897bee1e9 Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents: 3092
diff changeset
124 #define SDL_PHOTON_ACCELERATED_3D 0x00000004
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 /****************************************************************************/
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127 /* SDL_VideoDevice functions declaration */
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 /****************************************************************************/
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130 /* Display and window functions */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
131 int photon_videoinit(_THIS);
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132 void photon_videoquit(_THIS);
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
133 void photon_getdisplaymodes(_THIS);
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
134 int photon_setdisplaymode(_THIS, SDL_DisplayMode * mode);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
135 int photon_setdisplaypalette(_THIS, SDL_Palette * palette);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
136 int photon_getdisplaypalette(_THIS, SDL_Palette * palette);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
137 int photon_setdisplaygammaramp(_THIS, Uint16 * ramp);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
138 int photon_getdisplaygammaramp(_THIS, Uint16 * ramp);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
139 int photon_createwindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
140 int photon_createwindowfrom(_THIS, SDL_Window * window, const void *data);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
141 void photon_setwindowtitle(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
142 void photon_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
143 void photon_setwindowposition(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
144 void photon_setwindowsize(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
145 void photon_showwindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
146 void photon_hidewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
147 void photon_raisewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
148 void photon_maximizewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
149 void photon_minimizewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
150 void photon_restorewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
151 void photon_setwindowgrab(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
152 void photon_destroywindow(_THIS, SDL_Window * window);
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
153
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154 /* Window manager function */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
155 SDL_bool photon_getwindowwminfo(_THIS, SDL_Window * window,
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
156 struct SDL_SysWMinfo *info);
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
157
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
158 /* OpenGL/OpenGL ES functions */
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
159 int photon_gl_loadlibrary(_THIS, const char *path);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
160 void *photon_gl_getprocaddres(_THIS, const char *proc);
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
161 void photon_gl_unloadlibrary(_THIS);
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
162 SDL_GLContext photon_gl_createcontext(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
163 int photon_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context);
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
164 int photon_gl_setswapinterval(_THIS, int interval);
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
165 int photon_gl_getswapinterval(_THIS);
3139
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
166 void photon_gl_swapwindow(_THIS, SDL_Window * window);
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
167 void photon_gl_deletecontext(_THIS, SDL_GLContext context);
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
168
3193
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
169 /* Helper function, which re-creates surface, not an API */
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
170 int photon_gl_recreatesurface(_THIS, SDL_Window * window, uint32_t width, uint32_t height);
64e4442676a6 Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents: 3139
diff changeset
171
3092
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
172 /* Event handling function */
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
173 void photon_pumpevents(_THIS);
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
174
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
175 /* Screen saver related function */
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
176 void photon_suspendscreensaver(_THIS);
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
177
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
178 #endif /* __SDL_PHOTON_H__ */
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
179
cad1aefa2ed9 Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
180 /* vi: set ts=4 sw=4 expandtab: */