annotate src/video/photon/SDL_photon.h @ 3341:710139a1692d

Fixed bug #826 Ken Bull 2009-10-04 09:51:30 PDT 2009/10/4 E. Wing <ewmailing@gmail.com>: > Hi Kenneth, > I noticed that SDL_SetColorKey and SDL_GetColorKey start with > /* > instead of > /** > in SDL_Surface.h in SDL 1.3. > > I haven't scrutinized the headers and I don't know if you had an > automated process to add these, but I thought I would let you know in > case there might be others that have the same problem. > > Thanks, > Eric > The attached patch corrects this and other documentation errors in SDL_surface.h
author Sam Lantinga <slouken@libsdl.org>
date Sun, 04 Oct 2009 19:14:30 +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
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
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
74 SDL_DisplayMode current_mode; /* Current video mode */
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
94 #if defined(SDL_VIDEO_OPENGL_ES)
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
111 uint8_t *name;
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
128 int photon_setdisplaymode(_THIS, SDL_DisplayMode * mode);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
129 int photon_setdisplaypalette(_THIS, SDL_Palette * palette);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
130 int photon_getdisplaypalette(_THIS, SDL_Palette * palette);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
131 int photon_setdisplaygammaramp(_THIS, Uint16 * ramp);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
132 int photon_getdisplaygammaramp(_THIS, Uint16 * ramp);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
133 int photon_createwindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
134 int photon_createwindowfrom(_THIS, SDL_Window * window, const void *data);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
135 void photon_setwindowtitle(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
136 void photon_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
137 void photon_setwindowposition(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
138 void photon_setwindowsize(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
139 void photon_showwindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
140 void photon_hidewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
141 void photon_raisewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
142 void photon_maximizewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
143 void photon_minimizewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
144 void photon_restorewindow(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
145 void photon_setwindowgrab(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
149 SDL_bool photon_getwindowwminfo(_THIS, SDL_Window * window,
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
153 int photon_gl_loadlibrary(_THIS, const char *path);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
156 SDL_GLContext photon_gl_createcontext(_THIS, SDL_Window * window);
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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
Sam Lantinga <slouken@libsdl.org>
parents: 3108
diff changeset
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: */