comparison src/video/qnxgf/SDL_qnxgf.h @ 3109:7b3a09fb9c8b

Support for HID devices (mice and keyboards only for now) has been added
author Mike Gorchak <lestat@i.com.ua>
date Tue, 28 Apr 2009 04:33:30 +0000
parents 82e60908fab1
children b17f1ae7ad66
comparison
equal deleted inserted replaced
3108:aa1897bee1e9 3109:7b3a09fb9c8b
46 uint32_t egl_refcount; /* OpenGL ES reference count */ 46 uint32_t egl_refcount; /* OpenGL ES reference count */
47 uint32_t swapinterval; /* OpenGL ES default swap interval */ 47 uint32_t swapinterval; /* OpenGL ES default swap interval */
48 #endif /* SDL_VIDEO_OPENGL_ES */ 48 #endif /* SDL_VIDEO_OPENGL_ES */
49 } SDL_VideoData; 49 } SDL_VideoData;
50 50
51 #define SDL_VIDEO_GF_DEVICENAME_MAX 257 51 #define SDL_VIDEO_GF_DEVICENAME_MAX 257
52 #define SDL_VIDEO_GF_MAX_CURSOR_SIZE 128
52 53
53 typedef struct SDL_DisplayData 54 typedef struct SDL_DisplayData
54 { 55 {
55 gf_display_info_t display_info; /* GF display information */ 56 gf_display_info_t display_info; /* GF display information */
56 gf_display_t display; /* GF display handle */ 57 gf_display_t display; /* GF display handle */
59 uint8_t description[SDL_VIDEO_GF_DEVICENAME_MAX]; 60 uint8_t description[SDL_VIDEO_GF_DEVICENAME_MAX];
60 /* Device description */ 61 /* Device description */
61 uint32_t caps; /* Device capabilities */ 62 uint32_t caps; /* Device capabilities */
62 SDL_bool layer_attached; /* Layer attach status */ 63 SDL_bool layer_attached; /* Layer attach status */
63 gf_layer_t layer; /* Graphics layer to which attached */ 64 gf_layer_t layer; /* Graphics layer to which attached */
65 gf_surface_t surface[3]; /* Visible surface on the display */
66 SDL_bool cursor_visible; /* SDL_TRUE if cursor visible */
67 gf_cursor_t cursor; /* Cursor shape which was set last */
64 } SDL_DisplayData; 68 } SDL_DisplayData;
69
70 /* Maximum amount of OpenGL ES framebuffer configurations */
71 #define SDL_VIDEO_GF_OPENGLES_CONFS 32
65 72
66 typedef struct SDL_WindowData 73 typedef struct SDL_WindowData
67 { 74 {
68 SDL_bool uses_gles; /* true if window support OpenGL ES */ 75 SDL_bool uses_gles; /* true if window support OpenGL ES */
69 #if defined(SDL_VIDEO_OPENGL_ES) 76 #if defined(SDL_VIDEO_OPENGL_ES)
70 gf_3d_target_t target; /* OpenGL ES window target */ 77 gf_3d_target_t target; /* OpenGL ES window target */
71 SDL_bool target_created; /* GF 3D target is created if true */ 78 SDL_bool target_created; /* GF 3D target is created if true */
72 EGLConfig gles_config; /* OpenGL ES framebuffer configuration*/ 79 EGLConfig gles_configs[SDL_VIDEO_GF_OPENGLES_CONFS];
80 /* OpenGL ES framebuffer confs */
81 EGLint gles_config; /* Config index in the array of cfgs */
73 EGLContext gles_context; /* OpenGL ES context */ 82 EGLContext gles_context; /* OpenGL ES context */
74 EGLint gles_attributes[256]; /* OpenGL ES attributes for context */ 83 EGLint gles_attributes[256]; /* OpenGL ES attributes for context */
75 EGLSurface gles_surface; /* OpenGL ES target rendering surface */ 84 EGLSurface gles_surface; /* OpenGL ES target rendering surface */
76 #endif /* SDL_VIDEO_OPENGL_ES */ 85 #endif /* SDL_VIDEO_OPENGL_ES */
77 } SDL_WindowData; 86 } SDL_WindowData;
101 /****************************************************************************/ 110 /****************************************************************************/
102 /* SDL_VideoDevice functions declaration */ 111 /* SDL_VideoDevice functions declaration */
103 /****************************************************************************/ 112 /****************************************************************************/
104 113
105 /* Display and window functions */ 114 /* Display and window functions */
106 int qnxgf_videoinit(_THIS); 115 int qnxgf_videoinit(_THIS);
107 void qnxgf_videoquit(_THIS); 116 void qnxgf_videoquit(_THIS);
108 void qnxgf_getdisplaymodes(_THIS); 117 void qnxgf_getdisplaymodes(_THIS);
109 int qnxgf_setdisplaymode(_THIS, SDL_DisplayMode* mode); 118 int qnxgf_setdisplaymode(_THIS, SDL_DisplayMode* mode);
110 int qnxgf_setdisplaypalette(_THIS, SDL_Palette* palette); 119 int qnxgf_setdisplaypalette(_THIS, SDL_Palette* palette);
111 int qnxgf_getdisplaypalette(_THIS, SDL_Palette* palette); 120 int qnxgf_getdisplaypalette(_THIS, SDL_Palette* palette);
112 int qnxgf_setdisplaygammaramp(_THIS, Uint16* ramp); 121 int qnxgf_setdisplaygammaramp(_THIS, Uint16* ramp);
113 int qnxgf_getdisplaygammaramp(_THIS, Uint16* ramp); 122 int qnxgf_getdisplaygammaramp(_THIS, Uint16* ramp);
114 int qnxgf_createwindow(_THIS, SDL_Window* window); 123 int qnxgf_createwindow(_THIS, SDL_Window* window);
115 int qnxgf_createwindowfrom(_THIS, SDL_Window* window, const void* data); 124 int qnxgf_createwindowfrom(_THIS, SDL_Window* window, const void* data);
116 void qnxgf_setwindowtitle(_THIS, SDL_Window* window); 125 void qnxgf_setwindowtitle(_THIS, SDL_Window* window);
117 void qnxgf_setwindowicon(_THIS, SDL_Window* window, SDL_Surface* icon); 126 void qnxgf_setwindowicon(_THIS, SDL_Window* window, SDL_Surface* icon);
118 void qnxgf_setwindowposition(_THIS, SDL_Window* window); 127 void qnxgf_setwindowposition(_THIS, SDL_Window* window);
119 void qnxgf_setwindowsize(_THIS, SDL_Window* window); 128 void qnxgf_setwindowsize(_THIS, SDL_Window* window);
120 void qnxgf_showwindow(_THIS, SDL_Window* window); 129 void qnxgf_showwindow(_THIS, SDL_Window* window);