comparison src/video/gem/SDL_gemvideo.h @ 736:028e03e273c8

Use new C2P routine + corrections for iconification window
author Patrice Mandin <patmandin@gmail.com>
date Wed, 12 Nov 2003 18:49:29 +0000
parents 0ce5a68278fd
children b8d311d90021
comparison
equal deleted inserted replaced
735:abec2a842d11 736:028e03e273c8
37 /* Functions prototypes */ 37 /* Functions prototypes */
38 void GEM_wind_redraw(_THIS, int winhandle, short *inside); 38 void GEM_wind_redraw(_THIS, int winhandle, short *inside);
39 39
40 /* Private display data */ 40 /* Private display data */
41 41
42 #define B2S_C2P_1TO2 (1<<0) /* C2P convert buffer 1 to buffer 2 */
43 #define B2S_C2P_1TOS (1<<1) /* C2P convert buffer 1 to screen */
44 #define B2S_VROCPYFM_1TOS (1<<2) /* vro_cpyfm() buffer 1 to screen */
45 #define B2S_VROCPYFM_2TOS (1<<3) /* vro_cpyfm() buffer 2 to screen */
46
42 #define SDL_NUMMODES 1 /* Fullscreen */ 47 #define SDL_NUMMODES 1 /* Fullscreen */
43 48
44 struct SDL_PrivateVideoData { 49 struct SDL_PrivateVideoData {
50 Uint16 buf2scr_ops; /* Operations to get buffer to screen */
51 void *buffer1; /* Our shadow buffers */
52 void *buffer2;
53
45 /* VDI infos */ 54 /* VDI infos */
46 short vdi_handle; /* VDI handle */ 55 short vdi_handle; /* VDI handle */
47 short full_w, full_h; /* Fullscreen size */ 56 short full_w, full_h; /* Fullscreen size */
48 int bpp; /* Colour depth */ 57 short bpp; /* Colour depth */
49 int pixelsize; /* Bytes per pixel */ 58 short pixelsize; /* Bytes per pixel */
50 Uint16 old_numcolors; /* Number of colors in saved palette */ 59 short old_numcolors; /* Number of colors in saved palette */
51 Uint16 old_palette[256][3]; /* Saved current palette */
52 Uint16 pitch; /* Line length */ 60 Uint16 pitch; /* Line length */
53 int format; /* Screen format */ 61 Uint16 format; /* Screen format */
54 void *screen; /* Screen address */ 62 void *screen; /* Screen address */
55 Uint32 red, green, blue, alpha; /* Screen components */ 63 Uint32 red, green, blue, alpha; /* Screen components */
56 Uint32 screensize; 64 Uint32 screensize;
65 short blit_coords[8]; /* Coordinates for bitblt */
57 MFDB src_mfdb, dst_mfdb; /* VDI MFDB for bitblt */ 66 MFDB src_mfdb, dst_mfdb; /* VDI MFDB for bitblt */
58 short blit_coords[8]; /* Coordinates for bitblt */ 67 Uint16 old_palette[256][3]; /* Saved current palette */
68
59 /* GEM infos */ 69 /* GEM infos */
60 short desk_x, desk_y; /* Desktop properties */ 70 short desk_x, desk_y; /* Desktop properties */
61 short desk_w, desk_h; 71 short desk_w, desk_h;
62 short win_handle; /* Our window handle */ 72 short win_handle; /* Our window handle */
63 void *buffer; /* Our shadow buffer */
64 int window_type; /* Window type */ 73 int window_type; /* Window type */
65 const char *title_name; /* Window title */ 74 const char *title_name; /* Window title */
66 const char *icon_name; /* Icon title */ 75 const char *icon_name; /* Icon title */
67 short version; /* AES version */ 76 short version; /* AES version */
68 short wfeatures; /* AES window features */ 77 short wfeatures; /* AES window features */
78 SDL_bool refresh_name; /* Change window title ? */
69 SDL_bool window_fulled; /* Window maximized ? */ 79 SDL_bool window_fulled; /* Window maximized ? */
70 SDL_bool mouse_relative; /* Report relative mouse movement */ 80 SDL_bool mouse_relative; /* Report relative mouse movement */
71 SDL_bool locked; /* AES locked for fullscreen ? */ 81 SDL_bool locked; /* AES locked for fullscreen ? */
82 short message[8]; /* To self-send an AES message */
72 SDL_Rect *SDL_modelist[SDL_NUMMODES+1]; /* Mode list */ 83 SDL_Rect *SDL_modelist[SDL_NUMMODES+1]; /* Mode list */
84 SDL_Surface *icon; /* The icon */
73 }; 85 };
74 86
75 /* Hidden structure -> variables names */ 87 /* Hidden structure -> variables names */
76 #define VDI_handle (this->hidden->vdi_handle) 88 #define VDI_handle (this->hidden->vdi_handle)
77 #define VDI_w (this->hidden->full_w) 89 #define VDI_w (this->hidden->full_w)
95 #define GEM_desk_x (this->hidden->desk_x) 107 #define GEM_desk_x (this->hidden->desk_x)
96 #define GEM_desk_y (this->hidden->desk_y) 108 #define GEM_desk_y (this->hidden->desk_y)
97 #define GEM_desk_w (this->hidden->desk_w) 109 #define GEM_desk_w (this->hidden->desk_w)
98 #define GEM_desk_h (this->hidden->desk_h) 110 #define GEM_desk_h (this->hidden->desk_h)
99 #define GEM_handle (this->hidden->win_handle) 111 #define GEM_handle (this->hidden->win_handle)
100 #define GEM_buffer (this->hidden->buffer)
101 #define GEM_win_type (this->hidden->window_type) 112 #define GEM_win_type (this->hidden->window_type)
102 #define GEM_title_name (this->hidden->title_name) 113 #define GEM_title_name (this->hidden->title_name)
103 #define GEM_icon_name (this->hidden->icon_name) 114 #define GEM_icon_name (this->hidden->icon_name)
115 #define GEM_refresh_name (this->hidden->refresh_name)
104 #define GEM_version (this->hidden->version) 116 #define GEM_version (this->hidden->version)
105 #define GEM_wfeatures (this->hidden->wfeatures) 117 #define GEM_wfeatures (this->hidden->wfeatures)
106 #define GEM_win_fulled (this->hidden->window_fulled) 118 #define GEM_win_fulled (this->hidden->window_fulled)
107 #define GEM_mouse_relative (this->hidden->mouse_relative) 119 #define GEM_mouse_relative (this->hidden->mouse_relative)
108 #define GEM_locked (this->hidden->locked) 120 #define GEM_locked (this->hidden->locked)
121 #define GEM_message (this->hidden->message)
109 #define SDL_modelist (this->hidden->SDL_modelist) 122 #define SDL_modelist (this->hidden->SDL_modelist)
123 #define GEM_icon (this->hidden->icon)
124
125 #define GEM_buffer1 (this->hidden->buffer1)
126 #define GEM_buffer2 (this->hidden->buffer2)
127 #define GEM_bufops (this->hidden->buf2scr_ops)
128
129 #define VDI_FBMASK(amask, rmask, gmask, bmask) \
130 VDI_alphamask = (amask); \
131 VDI_redmask = (rmask); \
132 VDI_greenmask = (gmask); \
133 VDI_bluemask = (bmask);
134
135 /*
136 Possible buffer to screen operations:
137
138 TC: 8 (chunky),15,16,24,32 bpp
139 8I: 8 bpp planes
140 FB: screen framebuffer address available
141 FS: fullscreen
142
143 TC, FB, FS:
144 - draw to screen
145 8I, FB, FS:
146 - draw to buffer 1
147 - C2P from buffer 1 to screen
148
149 TC, !FB, FS:
150 - draw to buffer 1
151 - vro_cpyfm() from buffer 1 to screen
152 8I, !FB, FS:
153 - draw to buffer 1
154 - C2P from buffer 1 to buffer 2
155 - vro_cpyfm() from buffer 2 to screen
156
157 TC, FB, !FS:
158 - draw to buffer 1
159 - vro_cpyfm() from buffer 1 to screen
160 8I, FB, !FS:
161 - draw to buffer 1
162 - C2P from buffer 1 to buffer 2
163 - vro_cpyfm() from buffer 2 to screen
164
165 TC, !FB, !FS:
166 - draw to buffer 1
167 - vro_cpyfm() from buffer 1 to screen
168 8I, !FB, !FS:
169 - draw to buffer 1
170 - C2P from buffer 1 to buffer 2
171 - vro_cpyfm() from buffer 2 to screen
172 */
110 173
111 #endif /* _SDL_gemvideo_h */ 174 #endif /* _SDL_gemvideo_h */