src/video/ps2gs/SDL_gsvideo.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 14 Dec 2001 12:38:15 +0000
changeset 252 e8157fcb3114
parent 136 717f739d6ec1
child 1312 c9b51268668f
permissions -rw-r--r--
Updated the source with the correct e-mail address
slouken@70
     1
/*
slouken@70
     2
    SDL - Simple DirectMedia Layer
slouken@70
     3
    Copyright (C) 1997, 1998, 1999, 2000  Sam Lantinga
slouken@70
     4
slouken@70
     5
    This library is free software; you can redistribute it and/or
slouken@70
     6
    modify it under the terms of the GNU Library General Public
slouken@70
     7
    License as published by the Free Software Foundation; either
slouken@70
     8
    version 2 of the License, or (at your option) any later version.
slouken@70
     9
slouken@70
    10
    This library is distributed in the hope that it will be useful,
slouken@70
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@70
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@70
    13
    Library General Public License for more details.
slouken@70
    14
slouken@70
    15
    You should have received a copy of the GNU Library General Public
slouken@70
    16
    License along with this library; if not, write to the Free
slouken@70
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@70
    18
slouken@70
    19
    Sam Lantinga
slouken@252
    20
    slouken@libsdl.org
slouken@70
    21
*/
slouken@70
    22
slouken@70
    23
#ifdef SAVE_RCSID
slouken@70
    24
static char rcsid =
slouken@70
    25
 "@(#) $Id$";
slouken@70
    26
#endif
slouken@70
    27
slouken@70
    28
#ifndef _SDL_gsvideo_h
slouken@70
    29
#define _SDL_gsvideo_h
slouken@70
    30
slouken@70
    31
#include <sys/types.h>
slouken@70
    32
#include <termios.h>
slouken@70
    33
#include <linux/ps2/dev.h>
slouken@70
    34
#include <linux/ps2/gs.h>
slouken@70
    35
slouken@70
    36
#include "SDL_mouse.h"
slouken@70
    37
#include "SDL_mutex.h"
slouken@70
    38
#include "SDL_sysvideo.h"
slouken@70
    39
slouken@70
    40
/* Hidden "this" pointer for the video functions */
slouken@70
    41
#define _THIS	SDL_VideoDevice *this
slouken@70
    42
slouken@70
    43
slouken@70
    44
/* Private display data */
slouken@70
    45
struct SDL_PrivateVideoData {
slouken@70
    46
	/* Gotta love that simple PS2 graphics interface. :) */
slouken@70
    47
	int console_fd;
slouken@70
    48
	int memory_fd;
slouken@70
    49
	struct ps2_screeninfo saved_vinfo;
slouken@70
    50
slouken@70
    51
	/* Ye olde linux keyboard code */
slouken@70
    52
	int current_vt;
slouken@70
    53
	int saved_vt;
slouken@70
    54
	int keyboard_fd;
slouken@70
    55
	int saved_kbd_mode;
slouken@70
    56
	struct termios saved_kbd_termios;
slouken@70
    57
slouken@70
    58
	/* Ye olde linux mouse code */
slouken@70
    59
	int mouse_fd;
slouken@70
    60
	int cursor_drawn;
slouken@70
    61
slouken@70
    62
	/* The memory mapped DMA area and associated variables */
slouken@70
    63
	caddr_t mapped_mem;
slouken@70
    64
	int pixels_len;
slouken@70
    65
	int mapped_len;
slouken@70
    66
	struct ps2_image screen_image;
slouken@70
    67
	int screen_image_size;
slouken@70
    68
	unsigned long long *head_tags_mem;
slouken@70
    69
	unsigned long long *image_tags_mem;
slouken@136
    70
	unsigned long long *tex_tags_mem;
slouken@136
    71
	unsigned long long *scale_tags_mem;
slouken@70
    72
	int dma_pending;
slouken@70
    73
};
slouken@70
    74
/* Old variable names */
slouken@70
    75
#define console_fd		(this->hidden->console_fd)
slouken@70
    76
#define memory_fd		(this->hidden->memory_fd)
slouken@70
    77
#define saved_vinfo		(this->hidden->saved_vinfo)
slouken@70
    78
#define current_vt		(this->hidden->current_vt)
slouken@70
    79
#define saved_vt		(this->hidden->saved_vt)
slouken@70
    80
#define keyboard_fd		(this->hidden->keyboard_fd)
slouken@70
    81
#define saved_kbd_mode		(this->hidden->saved_kbd_mode)
slouken@70
    82
#define saved_kbd_termios	(this->hidden->saved_kbd_termios)
slouken@70
    83
#define mouse_fd		(this->hidden->mouse_fd)
slouken@70
    84
#define cursor_drawn		(this->hidden->cursor_drawn)
slouken@70
    85
#define mapped_mem		(this->hidden->mapped_mem)
slouken@70
    86
#define pixels_len		(this->hidden->pixels_len)
slouken@70
    87
#define mapped_len		(this->hidden->mapped_len)
slouken@70
    88
#define screen_image		(this->hidden->screen_image)
slouken@70
    89
#define screen_image_size	(this->hidden->screen_image_size)
slouken@70
    90
#define head_tags_mem		(this->hidden->head_tags_mem)
slouken@70
    91
#define image_tags_mem		(this->hidden->image_tags_mem)
slouken@136
    92
#define tex_tags_mem		(this->hidden->tex_tags_mem)
slouken@136
    93
#define scale_tags_mem		(this->hidden->scale_tags_mem)
slouken@70
    94
#define dma_pending		(this->hidden->dma_pending)
slouken@70
    95
slouken@136
    96
/* Shared between the mouse and video code for screen update scaling */
slouken@136
    97
extern int scaleimage_nonblock(int fd,
slouken@136
    98
                               unsigned long long *tm, unsigned long long *sm);
slouken@70
    99
#endif /* _SDL_gsvideo_h */