include/SDL_video.h
changeset 911 04a403e4ccf5
parent 769 b8d311d90021
child 1020 5b1cb1e9140d
equal deleted inserted replaced
910:4ab6d1fd028f 911:04a403e4ccf5
    45 /* Transparency definitions: These define alpha as the opacity of a surface */
    45 /* Transparency definitions: These define alpha as the opacity of a surface */
    46 #define SDL_ALPHA_OPAQUE 255
    46 #define SDL_ALPHA_OPAQUE 255
    47 #define SDL_ALPHA_TRANSPARENT 0
    47 #define SDL_ALPHA_TRANSPARENT 0
    48 
    48 
    49 /* Useful data types */
    49 /* Useful data types */
    50 typedef struct {
    50 typedef struct SDL_Rect {
    51 	Sint16 x, y;
    51 	Sint16 x, y;
    52 	Uint16 w, h;
    52 	Uint16 w, h;
    53 } SDL_Rect;
    53 } SDL_Rect;
    54 
    54 
    55 typedef struct {
    55 typedef struct SDL_Color {
    56 	Uint8 r;
    56 	Uint8 r;
    57 	Uint8 g;
    57 	Uint8 g;
    58 	Uint8 b;
    58 	Uint8 b;
    59 	Uint8 unused;
    59 	Uint8 unused;
    60 } SDL_Color;
    60 } SDL_Color;
    61 #define SDL_Colour SDL_Color
    61 #define SDL_Colour SDL_Color
    62 
    62 
    63 typedef struct {
    63 typedef struct SDL_Palette {
    64 	int       ncolors;
    64 	int       ncolors;
    65 	SDL_Color *colors;
    65 	SDL_Color *colors;
    66 } SDL_Palette;
    66 } SDL_Palette;
    67 
    67 
    68 /* Everything in the pixel format structure is read-only */
    68 /* Everything in the pixel format structure is read-only */
   152   (surface->offset ||		\
   152   (surface->offset ||		\
   153   ((surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_RLEACCEL)) != 0))
   153   ((surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_RLEACCEL)) != 0))
   154 
   154 
   155 
   155 
   156 /* Useful for determining the video hardware capabilities */
   156 /* Useful for determining the video hardware capabilities */
   157 typedef struct {
   157 typedef struct SDL_VideoInfo {
   158 	Uint32 hw_available :1;	/* Flag: Can you create hardware surfaces? */
   158 	Uint32 hw_available :1;	/* Flag: Can you create hardware surfaces? */
   159 	Uint32 wm_available :1;	/* Flag: Can you talk to a window manager? */
   159 	Uint32 wm_available :1;	/* Flag: Can you talk to a window manager? */
   160 	Uint32 UnusedBits1  :6;
   160 	Uint32 UnusedBits1  :6;
   161 	Uint32 UnusedBits2  :1;
   161 	Uint32 UnusedBits2  :1;
   162 	Uint32 blit_hw      :1;	/* Flag: Accelerated blits HW --> HW */
   162 	Uint32 blit_hw      :1;	/* Flag: Accelerated blits HW --> HW */