comparison src/video/gem/SDL_gemvideo.h @ 1662:782fd950bd46 SDL-1.3

Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API. WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid. The code is now run through a consistent indent format: indent -i4 -nut -nsc -br -ce The headers are being converted to automatically generate doxygen documentation.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 13:04:16 +0000
parents 2405517b5eab
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
29 29
30 /* Hidden "this" pointer for the video functions */ 30 /* Hidden "this" pointer for the video functions */
31 #define _THIS SDL_VideoDevice *this 31 #define _THIS SDL_VideoDevice *this
32 32
33 /* Functions prototypes */ 33 /* Functions prototypes */
34 void GEM_wind_redraw(_THIS, int winhandle, short *inside); 34 void GEM_wind_redraw (_THIS, int winhandle, short *inside);
35 35
36 /* Private display data */ 36 /* Private display data */
37 37
38 #define B2S_C2P_1TO2 (1<<0) /* C2P convert buffer 1 to buffer 2 */ 38 #define B2S_C2P_1TO2 (1<<0) /* C2P convert buffer 1 to buffer 2 */
39 #define B2S_C2P_1TOS (1<<1) /* C2P convert buffer 1 to screen */ 39 #define B2S_C2P_1TOS (1<<1) /* C2P convert buffer 1 to screen */
40 #define B2S_VROCPYFM_1TOS (1<<2) /* vro_cpyfm() buffer 1 to screen */ 40 #define B2S_VROCPYFM_1TOS (1<<2) /* vro_cpyfm() buffer 1 to screen */
41 #define B2S_VROCPYFM_2TOS (1<<3) /* vro_cpyfm() buffer 2 to screen */ 41 #define B2S_VROCPYFM_2TOS (1<<3) /* vro_cpyfm() buffer 2 to screen */
42 42
43 #define SDL_NUMMODES 1 /* Fullscreen */ 43 #define SDL_NUMMODES 1 /* Fullscreen */
44 44
45 struct SDL_PrivateVideoData { 45 struct SDL_PrivateVideoData
46 Uint16 buf2scr_ops; /* Operations to get buffer to screen */ 46 {
47 void *buffer1; /* Our shadow buffers */ 47 Uint16 buf2scr_ops; /* Operations to get buffer to screen */
48 void *buffer2; 48 void *buffer1; /* Our shadow buffers */
49 void *buffer2;
49 50
50 /* VDI infos */ 51 /* VDI infos */
51 short vdi_handle; /* VDI handle */ 52 short vdi_handle; /* VDI handle */
52 short full_w, full_h; /* Fullscreen size */ 53 short full_w, full_h; /* Fullscreen size */
53 short bpp; /* Colour depth */ 54 short bpp; /* Colour depth */
54 short pixelsize; /* Bytes per pixel */ 55 short pixelsize; /* Bytes per pixel */
55 short old_numcolors; /* Number of colors in saved palette */ 56 short old_numcolors; /* Number of colors in saved palette */
56 Uint16 pitch; /* Line length */ 57 Uint16 pitch; /* Line length */
57 Uint16 format; /* Screen format */ 58 Uint16 format; /* Screen format */
58 void *screen; /* Screen address */ 59 void *screen; /* Screen address */
59 Uint32 red, green, blue, alpha; /* Screen components */ 60 Uint32 red, green, blue, alpha; /* Screen components */
60 Uint32 screensize; 61 Uint32 screensize;
61 short blit_coords[8]; /* Coordinates for bitblt */ 62 short blit_coords[8]; /* Coordinates for bitblt */
62 MFDB src_mfdb, dst_mfdb; /* VDI MFDB for bitblt */ 63 MFDB src_mfdb, dst_mfdb; /* VDI MFDB for bitblt */
63 Uint16 old_palette[256][3]; /* Saved current palette */ 64 Uint16 old_palette[256][3]; /* Saved current palette */
64 Uint16 cur_palette[256][3]; /* SDL application palette */ 65 Uint16 cur_palette[256][3]; /* SDL application palette */
65 /* Function to set/restore palette */ 66 /* Function to set/restore palette */
66 void (*setpalette)(_THIS, Uint16 newpal[256][3]); 67 void (*setpalette) (_THIS, Uint16 newpal[256][3]);
67 68
68 /* GEM infos */ 69 /* GEM infos */
69 short desk_x, desk_y; /* Desktop properties */ 70 short desk_x, desk_y; /* Desktop properties */
70 short desk_w, desk_h; 71 short desk_w, desk_h;
71 short win_handle; /* Our window handle */ 72 short win_handle; /* Our window handle */
72 int window_type; /* Window type */ 73 int window_type; /* Window type */
73 const char *title_name; /* Window title */ 74 const char *title_name; /* Window title */
74 const char *icon_name; /* Icon title */ 75 const char *icon_name; /* Icon title */
75 short version; /* AES version */ 76 short version; /* AES version */
76 short wfeatures; /* AES window features */ 77 short wfeatures; /* AES window features */
77 SDL_bool refresh_name; /* Change window title ? */ 78 SDL_bool refresh_name; /* Change window title ? */
78 SDL_bool window_fulled; /* Window maximized ? */ 79 SDL_bool window_fulled; /* Window maximized ? */
79 SDL_bool mouse_relative; /* Report relative mouse movement */ 80 SDL_bool mouse_relative; /* Report relative mouse movement */
80 SDL_bool locked; /* AES locked for fullscreen ? */ 81 SDL_bool locked; /* AES locked for fullscreen ? */
81 SDL_bool lock_redraw; /* Prevent redraw till buffers are setup */ 82 SDL_bool lock_redraw; /* Prevent redraw till buffers are setup */
82 short message[8]; /* To self-send an AES message */ 83 short message[8]; /* To self-send an AES message */
83 void *menubar; /* Menu bar save buffer when going fullscreen */ 84 void *menubar; /* Menu bar save buffer when going fullscreen */
84 SDL_bool use_dev_mouse; /* Use /dev/mouse ? */ 85 SDL_bool use_dev_mouse; /* Use /dev/mouse ? */
85 86
86 SDL_bool fullscreen; /* Fullscreen or windowed mode ? */ 87 SDL_bool fullscreen; /* Fullscreen or windowed mode ? */
87 SDL_Rect *SDL_modelist[SDL_NUMMODES+1]; /* Mode list */ 88 SDL_Rect *SDL_modelist[SDL_NUMMODES + 1]; /* Mode list */
88 SDL_Surface *icon; /* The icon */ 89 SDL_Surface *icon; /* The icon */
89 }; 90 };
90 91
91 /* Hidden structure -> variables names */ 92 /* Hidden structure -> variables names */
92 #define VDI_handle (this->hidden->vdi_handle) 93 #define VDI_handle (this->hidden->vdi_handle)
93 #define VDI_w (this->hidden->full_w) 94 #define VDI_w (this->hidden->full_w)
180 - C2P from buffer 1 to buffer 2 181 - C2P from buffer 1 to buffer 2
181 - vro_cpyfm() from buffer 2 to screen 182 - vro_cpyfm() from buffer 2 to screen
182 */ 183 */
183 184
184 #endif /* _SDL_gemvideo_h */ 185 #endif /* _SDL_gemvideo_h */
186 /* vi: set ts=4 sw=4 expandtab: */