Mercurial > sdl-ios-xcode
annotate src/video/photon/SDL_photon.h @ 3364:70bfe3337f8a
Support for the atomic operations for ARM, PPC, MIPS, SH, X86 platforms has been added.
author | Mike Gorchak <lestat@i.com.ua> |
---|---|
date | Sat, 10 Oct 2009 08:06:18 +0000 |
parents | 64e4442676a6 |
children | 04af265172f9 |
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 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 Copyright (C) 1997-2009 Sam Lantinga |
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 | 32 #include <gf/gf.h> |
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 | 48 PhRid_t rid[SDL_VIDEO_PHOTON_MAX_RIDS]; |
49 uint32_t avail_rids; | |
50 uint32_t current_device_id; | |
51 #if defined(SDL_VIDEO_OPENGL_ES) | |
52 gf_dev_t gfdev; /* GF device handle */ | |
53 gf_dev_info_t gfdev_info; /* GF device information */ | |
54 SDL_bool gfinitialized; /* GF device initialization status */ | |
55 EGLDisplay egldisplay; /* OpenGL ES display connection */ | |
56 uint32_t egl_refcount; /* OpenGL ES reference count */ | |
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 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 typedef struct SDL_DisplayData |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 { |
3139 | 72 uint32_t device_id; |
3193
64e4442676a6
Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents:
3139
diff
changeset
|
73 uint32_t custom_refresh; /* Custom refresh rate for all modes */ |
3139 | 74 SDL_DisplayMode current_mode; /* Current video mode */ |
75 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
|
76 /* Device description */ |
64e4442676a6
Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents:
3139
diff
changeset
|
77 uint32_t caps; /* Device capabilities */ |
64e4442676a6
Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents:
3139
diff
changeset
|
78 PhCursorDef_t *cursor; /* Global cursor settings */ |
64e4442676a6
Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents:
3139
diff
changeset
|
79 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
|
80 uint32_t cursor_size; /* Cursor size in memory w/ structure */ |
3139 | 81 #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
|
82 gf_display_t display; /* GF display handle */ |
3139 | 83 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
|
84 #endif /* SDL_VIDEO_OPENGL_ES */ |
3092
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
85 } SDL_DisplayData; |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
86 |
3108
aa1897bee1e9
Continue working on QNX Photon with OpenGL ES support
Mike Gorchak <lestat@i.com.ua>
parents:
3092
diff
changeset
|
87 /* 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
|
88 #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
|
89 |
3092
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
90 typedef struct SDL_WindowData |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 { |
3139 | 92 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
|
93 PtWidget_t *window; /* window handle */ |
3139 | 94 #if defined(SDL_VIDEO_OPENGL_ES) |
95 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
|
96 /* OpenGL ES framebuffer confs */ |
64e4442676a6
Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents:
3139
diff
changeset
|
97 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
|
98 EGLContext gles_context; /* OpenGL ES context */ |
3139 | 99 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
|
100 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
|
101 gf_surface_t gfsurface; /* OpenGL ES GF's surface */ |
3139 | 102 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
|
103 #endif /* SDL_VIDEO_OPENGL_ES */ |
3092
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
104 } SDL_WindowData; |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
106 /****************************************************************************/ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 /* Low level Photon graphics driver capabilities */ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 /****************************************************************************/ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
109 typedef struct Photon_DeviceCaps |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
110 { |
3139 | 111 uint8_t *name; |
112 uint32_t caps; | |
3092
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 } Photon_DeviceCaps; |
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 #define SDL_PHOTON_UNACCELERATED 0x00000000 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 #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
|
117 #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
|
118 #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
|
119 |
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 /* SDL_VideoDevice functions declaration */ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 /****************************************************************************/ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 /* Display and window functions */ |
3139 | 125 int photon_videoinit(_THIS); |
3092
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 void photon_videoquit(_THIS); |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 void photon_getdisplaymodes(_THIS); |
3139 | 128 int photon_setdisplaymode(_THIS, SDL_DisplayMode * mode); |
129 int photon_setdisplaypalette(_THIS, SDL_Palette * palette); | |
130 int photon_getdisplaypalette(_THIS, SDL_Palette * palette); | |
131 int photon_setdisplaygammaramp(_THIS, Uint16 * ramp); | |
132 int photon_getdisplaygammaramp(_THIS, Uint16 * ramp); | |
133 int photon_createwindow(_THIS, SDL_Window * window); | |
134 int photon_createwindowfrom(_THIS, SDL_Window * window, const void *data); | |
135 void photon_setwindowtitle(_THIS, SDL_Window * window); | |
136 void photon_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon); | |
137 void photon_setwindowposition(_THIS, SDL_Window * window); | |
138 void photon_setwindowsize(_THIS, SDL_Window * window); | |
139 void photon_showwindow(_THIS, SDL_Window * window); | |
140 void photon_hidewindow(_THIS, SDL_Window * window); | |
141 void photon_raisewindow(_THIS, SDL_Window * window); | |
142 void photon_maximizewindow(_THIS, SDL_Window * window); | |
143 void photon_minimizewindow(_THIS, SDL_Window * window); | |
144 void photon_restorewindow(_THIS, SDL_Window * window); | |
145 void photon_setwindowgrab(_THIS, SDL_Window * window); | |
146 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
|
147 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
148 /* Window manager function */ |
3139 | 149 SDL_bool photon_getwindowwminfo(_THIS, SDL_Window * window, |
150 struct SDL_SysWMinfo *info); | |
3092
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
151 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
152 /* OpenGL/OpenGL ES functions */ |
3139 | 153 int photon_gl_loadlibrary(_THIS, const char *path); |
154 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
|
155 void photon_gl_unloadlibrary(_THIS); |
3139 | 156 SDL_GLContext photon_gl_createcontext(_THIS, SDL_Window * window); |
157 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
|
158 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
|
159 int photon_gl_getswapinterval(_THIS); |
3139 | 160 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
|
161 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
|
162 |
3193
64e4442676a6
Fixed problems with OpenGL ES window resizing.
Mike Gorchak <lestat@i.com.ua>
parents:
3139
diff
changeset
|
163 /* 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
|
164 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
|
165 |
3092
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
166 /* Event handling function */ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
167 void photon_pumpevents(_THIS); |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
168 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
169 /* Screen saver related function */ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
170 void photon_suspendscreensaver(_THIS); |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
171 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
172 #endif /* __SDL_PHOTON_H__ */ |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
173 |
cad1aefa2ed9
Date: Thu, 12 Mar 2009 15:14:38 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
174 /* vi: set ts=4 sw=4 expandtab: */ |