comparison src/video/photon/SDL_photon.h @ 3092:cad1aefa2ed9

Date: Thu, 12 Mar 2009 15:14:38 +0200 From: "Mike Gorchak" Subject: New QNX patches In photon.tar.gz there are new files to be placed into ./src/video/photon/ directory. qnx3.diff - new patches for QNX support. Since I've found a lot of bugs in the new GF QNX Graphics Framework and I'm suspended development for GF driver until already found bugs will be fixed and switched to Photon driver implementation. sdl.diff - I've found that renderer creation result has not been checked and SDL shows error like: "there is no current renderer", now SDL will show correct error which was set be renderer.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 17 Mar 2009 03:24:22 +0000
parents
children aa1897bee1e9
comparison
equal deleted inserted replaced
3091:32efcc94b3da 3092:cad1aefa2ed9
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21
22 QNX Photon GUI SDL driver
23 Copyright (C) 2009 Mike Gorchak
24 (mike@malva.ua, lestat@i.com.ua)
25 */
26
27 #ifndef __SDL_PHOTON_H__
28 #define __SDL_PHOTON_H__
29
30 #include "../SDL_sysvideo.h"
31
32 #include <Ph.h>
33
34 typedef struct SDL_VideoData
35 {
36 } SDL_VideoData;
37
38 #define SDL_VIDEO_PHOTON_DEVICENAME_MAX 257
39
40 typedef struct SDL_DisplayData
41 {
42 uint32_t custom_refresh; /* Custom refresh rate for all modes */
43 SDL_DisplayMode current_mode; /* Current video mode */
44 uint8_t description[SDL_VIDEO_PHOTON_DEVICENAME_MAX];
45 /* Device description */
46 uint32_t caps; /* Device capabilities */
47 } SDL_DisplayData;
48
49 typedef struct SDL_WindowData
50 {
51 SDL_bool uses_gles; /* if true window must support OpenGL ES*/
52 } SDL_WindowData;
53
54 /****************************************************************************/
55 /* Low level Photon graphics driver capabilities */
56 /****************************************************************************/
57 typedef struct Photon_DeviceCaps
58 {
59 uint8_t* name;
60 uint32_t caps;
61 } Photon_DeviceCaps;
62
63 #define SDL_PHOTON_UNACCELERATED 0x00000000
64 #define SDL_PHOTON_ACCELERATED 0x00000001
65
66 /****************************************************************************/
67 /* SDL_VideoDevice functions declaration */
68 /****************************************************************************/
69
70 /* Display and window functions */
71 int photon_videoinit(_THIS);
72 void photon_videoquit(_THIS);
73 void photon_getdisplaymodes(_THIS);
74 int photon_setdisplaymode(_THIS, SDL_DisplayMode* mode);
75 int photon_setdisplaypalette(_THIS, SDL_Palette* palette);
76 int photon_getdisplaypalette(_THIS, SDL_Palette* palette);
77 int photon_setdisplaygammaramp(_THIS, Uint16* ramp);
78 int photon_getdisplaygammaramp(_THIS, Uint16* ramp);
79 int photon_createwindow(_THIS, SDL_Window* window);
80 int photon_createwindowfrom(_THIS, SDL_Window* window, const void* data);
81 void photon_setwindowtitle(_THIS, SDL_Window* window);
82 void photon_setwindowicon(_THIS, SDL_Window* window, SDL_Surface* icon);
83 void photon_setwindowposition(_THIS, SDL_Window* window);
84 void photon_setwindowsize(_THIS, SDL_Window* window);
85 void photon_showwindow(_THIS, SDL_Window* window);
86 void photon_hidewindow(_THIS, SDL_Window* window);
87 void photon_raisewindow(_THIS, SDL_Window* window);
88 void photon_maximizewindow(_THIS, SDL_Window* window);
89 void photon_minimizewindow(_THIS, SDL_Window* window);
90 void photon_restorewindow(_THIS, SDL_Window* window);
91 void photon_setwindowgrab(_THIS, SDL_Window* window);
92 void photon_destroywindow(_THIS, SDL_Window* window);
93
94 /* Window manager function */
95 SDL_bool photon_getwindowwminfo(_THIS, SDL_Window* window, struct SDL_SysWMinfo* info);
96
97 /* OpenGL/OpenGL ES functions */
98 int photon_gl_loadlibrary(_THIS, const char* path);
99 void* photon_gl_getprocaddres(_THIS, const char* proc);
100 void photon_gl_unloadlibrary(_THIS);
101 SDL_GLContext photon_gl_createcontext(_THIS, SDL_Window* window);
102 int photon_gl_makecurrent(_THIS, SDL_Window* window, SDL_GLContext context);
103 int photon_gl_setswapinterval(_THIS, int interval);
104 int photon_gl_getswapinterval(_THIS);
105 void photon_gl_swapwindow(_THIS, SDL_Window* window);
106 void photon_gl_deletecontext(_THIS, SDL_GLContext context);
107
108 /* Event handling function */
109 void photon_pumpevents(_THIS);
110
111 /* Screen saver related function */
112 void photon_suspendscreensaver(_THIS);
113
114 #endif /* __SDL_PHOTON_H__ */
115
116 /* vi: set ts=4 sw=4 expandtab: */