src/video/wscons/SDL_wsconsvideo.h
author Ryan C. Gordon <icculus@icculus.org>
Fri, 06 Jan 2006 13:20:10 +0000
changeset 1234 73676c1f56ee
parent 1187 19d8949b4584
child 1312 c9b51268668f
permissions -rw-r--r--
For sanity's sake, removed the '&' when passing copy_row array to asm.
icculus@1187
     1
/*
icculus@1187
     2
    SDL - Simple DirectMedia Layer
icculus@1187
     3
    Copyright (C) 1997-2004 Sam Lantinga
icculus@1187
     4
icculus@1187
     5
    This library is free software; you can redistribute it and/or
icculus@1187
     6
    modify it under the terms of the GNU Library General Public
icculus@1187
     7
    License as published by the Free Software Foundation; either
icculus@1187
     8
    version 2 of the License, or (at your option) any later version.
icculus@1187
     9
icculus@1187
    10
    This library is distributed in the hope that it will be useful,
icculus@1187
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
icculus@1187
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
icculus@1187
    13
    Library General Public License for more details.
icculus@1187
    14
icculus@1187
    15
    You should have received a copy of the GNU Library General Public
icculus@1187
    16
    License along with this library; if not, write to the Free
icculus@1187
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
icculus@1187
    18
icculus@1187
    19
    Sam Lantinga
icculus@1187
    20
    slouken@libsdl.org
icculus@1187
    21
*/
icculus@1187
    22
icculus@1187
    23
#ifdef SAVE_RCSID
icculus@1187
    24
static char rcsid =
icculus@1187
    25
 "@(#) $Id$";
icculus@1187
    26
#endif
icculus@1187
    27
icculus@1187
    28
#ifndef _SDL_wsconsvideo_h
icculus@1187
    29
#define _SDL_wsconsvideo_h
icculus@1187
    30
icculus@1187
    31
#include <sys/time.h>
icculus@1187
    32
#include <termios.h>
icculus@1187
    33
#include <dev/wscons/wsconsio.h>
icculus@1187
    34
#include "SDL_mouse.h"
icculus@1187
    35
#include "SDL_sysvideo.h"
icculus@1187
    36
#include "SDL_mutex.h"
icculus@1187
    37
icculus@1187
    38
void WSCONS_ReportError(char *fmt, ...);
icculus@1187
    39
icculus@1187
    40
/* Hidden "this" pointer for the video functions */
icculus@1187
    41
#define _THIS	SDL_VideoDevice *this
icculus@1187
    42
#define private	(this->hidden)
icculus@1187
    43
icculus@1187
    44
/* Private display data */
icculus@1187
    45
icculus@1187
    46
typedef void WSCONS_bitBlit(Uint8 *src_pos,
icculus@1187
    47
			    int srcRightDelta, // pixels, not bytes
icculus@1187
    48
			    int srcDownDelta,  // pixels, not bytes
icculus@1187
    49
			    Uint8 *dst_pos,
icculus@1187
    50
			    int dst_linebytes,
icculus@1187
    51
			    int width,
icculus@1187
    52
			    int height);
icculus@1187
    53
icculus@1187
    54
struct SDL_PrivateVideoData {
icculus@1187
    55
  int fd;                       /* file descriptor of open device */
icculus@1187
    56
  struct wsdisplay_fbinfo info; /* frame buffer characteristics */
icculus@1187
    57
  int physlinebytes;            /* number of bytes per row */
icculus@1187
    58
  int redMask, greenMask, blueMask;
icculus@1187
    59
icculus@1187
    60
  Uint8 *fbstart;               /* These refer to the surface used, */
icculus@1187
    61
  int fblinebytes;              /* physical frame buffer or shadow. */
icculus@1187
    62
icculus@1187
    63
  size_t fbmem_len;
icculus@1187
    64
  Uint8 *physmem;
icculus@1187
    65
  Uint8 *shadowmem;
icculus@1187
    66
  int rotate;
icculus@1187
    67
  int shadowFB;                 /* Tells whether a shadow is being used. */
icculus@1187
    68
icculus@1187
    69
  WSCONS_bitBlit *blitFunc;
icculus@1187
    70
icculus@1187
    71
  SDL_Rect *SDL_modelist[2];
icculus@1187
    72
icculus@1187
    73
  unsigned int kbdType;
icculus@1187
    74
  int did_save_tty;
icculus@1187
    75
  struct termios saved_tty;
icculus@1187
    76
};
icculus@1187
    77
icculus@1187
    78
icculus@1187
    79
#endif /* _SDL_wsconsvideo_h */