src/video/gem/SDL_gemvideo.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 07 Dec 2002 06:54:47 +0000
changeset 557 0ce5a68278fd
parent 297 f6ffac90895c
child 736 028e03e273c8
permissions -rw-r--r--
Updated Atari port for new system headers (thanks Patrice!)
slouken@281
     1
/*
slouken@281
     2
    SDL - Simple DirectMedia Layer
slouken@297
     3
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga
slouken@281
     4
slouken@281
     5
    This library is free software; you can redistribute it and/or
slouken@281
     6
    modify it under the terms of the GNU Library General Public
slouken@281
     7
    License as published by the Free Software Foundation; either
slouken@281
     8
    version 2 of the License, or (at your option) any later version.
slouken@281
     9
slouken@281
    10
    This library is distributed in the hope that it will be useful,
slouken@281
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@281
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@281
    13
    Library General Public License for more details.
slouken@281
    14
slouken@281
    15
    You should have received a copy of the GNU Library General Public
slouken@281
    16
    License along with this library; if not, write to the Free
slouken@281
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@281
    18
slouken@281
    19
    Sam Lantinga
slouken@281
    20
    slouken@libsdl.org
slouken@281
    21
*/
slouken@281
    22
slouken@281
    23
#ifdef SAVE_RCSID
slouken@281
    24
static char rcsid =
slouken@281
    25
 "@(#) $Id$";
slouken@281
    26
#endif
slouken@281
    27
slouken@281
    28
#ifndef _SDL_gemvideo_h
slouken@281
    29
#define _SDL_gemvideo_h
slouken@281
    30
slouken@281
    31
#include "SDL_sysvideo.h"
slouken@281
    32
#include "SDL_mutex.h"
slouken@281
    33
slouken@281
    34
/* Hidden "this" pointer for the video functions */
slouken@281
    35
#define _THIS	SDL_VideoDevice *this
slouken@281
    36
slouken@281
    37
/* Functions prototypes */
slouken@281
    38
void GEM_wind_redraw(_THIS, int winhandle, short *inside);
slouken@281
    39
slouken@281
    40
/* Private display data */
slouken@281
    41
slouken@281
    42
#define SDL_NUMMODES	1		/* Fullscreen */
slouken@281
    43
slouken@281
    44
struct SDL_PrivateVideoData {
slouken@281
    45
	/* VDI infos */
slouken@281
    46
	short vdi_handle;			/* VDI handle */
slouken@281
    47
	short full_w, full_h;		/* Fullscreen size */
slouken@281
    48
    int bpp;					/* Colour depth */
slouken@281
    49
	int pixelsize;				/* Bytes per pixel */
slouken@281
    50
	Uint16 old_numcolors;		/* Number of colors in saved palette */
slouken@281
    51
	Uint16 old_palette[256][3];	/* Saved current palette */
slouken@281
    52
	Uint16 pitch;				/* Line length */
slouken@281
    53
	int format;					/* Screen format */
slouken@281
    54
	void *screen;				/* Screen address */
slouken@281
    55
	Uint32 red, green, blue, alpha;	/* Screen components */
slouken@281
    56
	Uint32 screensize;
slouken@281
    57
	MFDB	src_mfdb, dst_mfdb;	/* VDI MFDB for bitblt */
slouken@281
    58
	short	blit_coords[8];		/* Coordinates for bitblt */
slouken@557
    59
	/* GEM infos */
slouken@281
    60
	short desk_x, desk_y;		/* Desktop properties */
slouken@281
    61
	short desk_w, desk_h;
slouken@281
    62
	short win_handle;			/* Our window handle */
slouken@281
    63
    void *buffer;				/* Our shadow buffer */
slouken@281
    64
	int window_type;			/* Window type */
slouken@281
    65
	const char *title_name;		/* Window title */
slouken@281
    66
	const char *icon_name;		/* Icon title */
slouken@281
    67
	short version;				/* AES version */
slouken@281
    68
	short wfeatures;			/* AES window features */
slouken@281
    69
	SDL_bool window_fulled;		/* Window maximized ? */
slouken@281
    70
	SDL_bool mouse_relative;	/* Report relative mouse movement */
slouken@281
    71
	SDL_bool locked;			/* AES locked for fullscreen ? */
slouken@281
    72
	SDL_Rect *SDL_modelist[SDL_NUMMODES+1];	/* Mode list */
slouken@281
    73
};
slouken@281
    74
slouken@281
    75
/* Hidden structure -> variables names */
slouken@281
    76
#define VDI_handle			(this->hidden->vdi_handle)
slouken@281
    77
#define VDI_w				(this->hidden->full_w)
slouken@281
    78
#define VDI_h				(this->hidden->full_h)
slouken@281
    79
#define VDI_bpp				(this->hidden->bpp)
slouken@281
    80
#define VDI_pixelsize		(this->hidden->pixelsize)
slouken@281
    81
#define VDI_oldnumcolors	(this->hidden->old_numcolors)
slouken@281
    82
#define VDI_oldpalette		(this->hidden->old_palette)
slouken@281
    83
#define VDI_pitch			(this->hidden->pitch)
slouken@281
    84
#define VDI_format			(this->hidden->format)
slouken@281
    85
#define VDI_screen			(this->hidden->screen)
slouken@281
    86
#define VDI_redmask			(this->hidden->red)
slouken@281
    87
#define VDI_greenmask		(this->hidden->green)
slouken@281
    88
#define VDI_bluemask		(this->hidden->blue)
slouken@281
    89
#define VDI_alphamask		(this->hidden->alpha)
slouken@281
    90
#define VDI_screensize		(this->hidden->screensize)
slouken@281
    91
#define VDI_src_mfdb		(this->hidden->src_mfdb)
slouken@281
    92
#define VDI_dst_mfdb		(this->hidden->dst_mfdb)
slouken@281
    93
#define VDI_blit_coords		(this->hidden->blit_coords)
slouken@557
    94
slouken@281
    95
#define GEM_desk_x			(this->hidden->desk_x)
slouken@281
    96
#define GEM_desk_y			(this->hidden->desk_y)
slouken@281
    97
#define GEM_desk_w			(this->hidden->desk_w)
slouken@281
    98
#define GEM_desk_h			(this->hidden->desk_h)
slouken@281
    99
#define GEM_handle			(this->hidden->win_handle)
slouken@281
   100
#define GEM_buffer			(this->hidden->buffer)
slouken@281
   101
#define GEM_win_type		(this->hidden->window_type)
slouken@281
   102
#define GEM_title_name		(this->hidden->title_name)
slouken@281
   103
#define GEM_icon_name		(this->hidden->icon_name)
slouken@281
   104
#define GEM_version			(this->hidden->version)
slouken@281
   105
#define GEM_wfeatures		(this->hidden->wfeatures)
slouken@281
   106
#define GEM_win_fulled		(this->hidden->window_fulled)
slouken@281
   107
#define GEM_mouse_relative	(this->hidden->mouse_relative)
slouken@281
   108
#define GEM_locked			(this->hidden->locked)
slouken@281
   109
#define SDL_modelist		(this->hidden->SDL_modelist)
slouken@281
   110
slouken@281
   111
#endif /* _SDL_gemvideo_h */