comparison src/video/photon/SDL_ph_video.h @ 571:8e3ce997621c

Date: Thu, 16 Jan 2003 13:48:31 +0200 From: "Mike Gorchak" Subject: All QNX patches whole patches concerning QNX. Almost all code has been rewritten by Julian and me. Added initial support for hw overlays in QNX and many many others fixes. P.S. This patches has been reviewed by Dave Rempel from QSSL and included in SDL 1.2.5 distribution, which coming on 3rd party CD for newest 6.2.1 version of QNX, which will be available soon.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Jan 2003 01:38:37 +0000
parents bce7171e7a85
children 8bedd6d61642
comparison
equal deleted inserted replaced
570:04d6411da49d 571:8e3ce997621c
42 #define SDLPH_PAL_NONE 0x00000000L 42 #define SDLPH_PAL_NONE 0x00000000L
43 #define SDLPH_PAL_EMULATE 0x00000001L 43 #define SDLPH_PAL_EMULATE 0x00000001L
44 #define SDLPH_PAL_SYSTEM 0x00000002L 44 #define SDLPH_PAL_SYSTEM 0x00000002L
45 45
46 typedef union vidptr{ 46 typedef union vidptr{
47 uint8_t *volatile ptr8; 47 uint8_t* volatile ptr8;
48 uint16_t *volatile ptr16; 48 uint16_t* volatile ptr16;
49 uint32_t *volatile ptr32; 49 uint32_t* volatile ptr32;
50 } VidPtr_t; 50 } VidPtr_t;
51 51
52 typedef struct { 52 typedef struct {
53 unsigned char *Y; 53 unsigned char* Y;
54 unsigned char *V; 54 unsigned char* V;
55 unsigned char *U; 55 unsigned char* U;
56 }FRAMEDATA; 56 } FRAMEDATA;
57
58 #define EVENT_SIZE sizeof( PhEvent_t ) + 1000
59 57
60 /* Private display data */ 58 /* Private display data */
61 struct SDL_PrivateVideoData { 59 struct SDL_PrivateVideoData {
62 PgDisplaySettings_t mode_settings; 60 PgDisplaySettings_t mode_settings;
63 PtWidget_t *Window; /* used to handle input events */ 61 PtWidget_t *Window; /* used to handle input events */
64 PhImage_t *image; /* used to display image */ 62 PhImage_t *image; /* used to display image */
65 #ifdef HAVE_OPENGL 63 #ifdef HAVE_OPENGL
66 PdOpenGLContext_t* OGLContext; /* OpenGL context */ 64 PdOpenGLContext_t* OGLContext; /* OpenGL context */
67 #endif /* HAVE_OPENGL */ 65 #endif /* HAVE_OPENGL */
68 PgColor_t ph_palette[_Pg_MAX_PALETTE]; 66 PgColor_t savedpal[_Pg_MAX_PALETTE];
67 PgColor_t syspalph[_Pg_MAX_PALETTE];
69 68
70 struct { 69 struct {
71 PdDirectContext_t *direct_context; 70 PdDirectContext_t* direct_context;
72 PdOffscreenContext_t *offscreen_context; 71 PdOffscreenContext_t* offscreen_context;
72 PhDrawContext_t* oldDC;
73 VidPtr_t dc_ptr; 73 VidPtr_t dc_ptr;
74 FRAMEDATA *CurrentFrameData; 74 unsigned char* CurrentFrameData;
75 FRAMEDATA *FrameData0; 75 unsigned char* FrameData0;
76 FRAMEDATA *FrameData1; 76 unsigned char* FrameData1;
77 int current; 77 int current;
78 long flags; 78 long flags;
79 } ocimage; 79 } ocimage;
80 80
81 PgHWCaps_t graphics_card_caps; /* Graphics card caps at the moment of start */ 81 PgHWCaps_t graphics_card_caps; /* Graphics card caps at the moment of start */
82 int old_video_mode; /* Stored mode before fullscreen switch */ 82 int old_video_mode; /* Stored mode before fullscreen switch */
83 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */ 83 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */
84 84
85 /* The current width and height of the fullscreen mode */
86 int current_w;
87 int current_h;
88
89 /* Support for internal mouse warping */
90 struct {
91 int x;
92 int y;
93 } mouse_last;
94
95 struct {
96 int numerator;
97 int denominator;
98 int threshold;
99 } mouse_accel;
100
101 int mouse_relative; 85 int mouse_relative;
102 WMcursor* BlankCursor; 86 WMcursor* BlankCursor;
103 87
104 int depth; /* current visual depth (not bpp) */ 88 int depth; /* current visual depth (not bpp) */
105 int desktopbpp; /* bpp of desktop at the moment of start */ 89 int desktopbpp; /* bpp of desktop at the moment of start */
106 int desktoppal; /* palette mode emulation or system */ 90 int desktoppal; /* palette mode emulation or system */
107 int captionflag; /* caption setting flag */
108 91
109 int use_vidmode;
110 int currently_fullscreen; 92 int currently_fullscreen;
111
112 /* Automatic mode switching support (entering/leaving fullscreen) */
113 Uint32 switch_waiting;
114 Uint32 switch_time;
115
116 /* Prevent too many XSync() calls */
117 int blit_queued;
118 93
119 PhEvent_t* event; 94 PhEvent_t* event;
120 }; 95 };
121 96
122 #define mode_settings (this->hidden->mode_settings) 97 #define mode_settings (this->hidden->mode_settings)
127 #define old_video_mode (this->hidden->old_video_mode) 102 #define old_video_mode (this->hidden->old_video_mode)
128 #define old_refresh_rate (this->hidden->old_refresh_rate) 103 #define old_refresh_rate (this->hidden->old_refresh_rate)
129 #define graphics_card_caps (this->hidden->graphics_card_caps) 104 #define graphics_card_caps (this->hidden->graphics_card_caps)
130 #define desktopbpp (this->hidden->desktopbpp) 105 #define desktopbpp (this->hidden->desktopbpp)
131 #define desktoppal (this->hidden->desktoppal) 106 #define desktoppal (this->hidden->desktoppal)
132 #define ph_palette (this->hidden->ph_palette) 107 #define savedpal (this->hidden->savedpal)
108 #define syspalph (this->hidden->syspalph)
133 109
134 /* Old variable names */ 110 /* Old variable names */
135 #define current_w (this->hidden->current_w)
136 #define current_h (this->hidden->current_h)
137 #define mouse_last (this->hidden->mouse_last)
138 #define mouse_accel (this->hidden->mouse_accel)
139 #define mouse_relative (this->hidden->mouse_relative) 111 #define mouse_relative (this->hidden->mouse_relative)
140 #define saved_mode (this->hidden->saved_mode)
141 #define saved_view (this->hidden->saved_view)
142 #define use_vidmode (this->hidden->use_vidmode)
143 #define currently_fullscreen (this->hidden->currently_fullscreen) 112 #define currently_fullscreen (this->hidden->currently_fullscreen)
144 #define switch_waiting (this->hidden->switch_waiting)
145 #define switch_time (this->hidden->switch_time)
146 #define blit_queued (this->hidden->blit_queued)
147 #define event (this->hidden->event) 113 #define event (this->hidden->event)
148 #define SDL_BlankCursor (this->hidden->BlankCursor) 114 #define SDL_BlankCursor (this->hidden->BlankCursor)
149 #define captionflag (this->hidden->captionflag)
150 115
151 #endif /* _SDL_x11video_h */ 116 #endif /* _SDL_x11video_h */