src/video/wscons/SDL_wsconsvideo.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 02 Aug 2009 18:39:57 +0000
changeset 3227 458e53d8662c
parent 2859 99210400e8b9
permissions -rw-r--r--
Clarified API documentation
icculus@1187
     1
/*
icculus@1187
     2
    SDL - Simple DirectMedia Layer
slouken@2859
     3
    Copyright (C) 1997-2009 Sam Lantinga
icculus@1187
     4
icculus@1187
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
icculus@1187
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 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
slouken@1312
    13
    Lesser General Public License for more details.
icculus@1187
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
icculus@1187
    18
icculus@1187
    19
    Sam Lantinga
icculus@1187
    20
    slouken@libsdl.org
icculus@1187
    21
*/
slouken@1402
    22
#include "SDL_config.h"
icculus@1187
    23
icculus@1187
    24
#ifndef _SDL_wsconsvideo_h
icculus@1187
    25
#define _SDL_wsconsvideo_h
icculus@1187
    26
icculus@1187
    27
#include <sys/time.h>
icculus@1187
    28
#include <termios.h>
icculus@1187
    29
#include <dev/wscons/wsconsio.h>
slouken@1361
    30
icculus@1187
    31
#include "SDL_mouse.h"
icculus@1187
    32
#include "SDL_mutex.h"
slouken@1361
    33
#include "../SDL_sysvideo.h"
icculus@1187
    34
icculus@1187
    35
void WSCONS_ReportError(char *fmt, ...);
icculus@1187
    36
icculus@1187
    37
/* Hidden "this" pointer for the video functions */
icculus@1187
    38
#define _THIS	SDL_VideoDevice *this
icculus@1187
    39
#define private	(this->hidden)
icculus@1187
    40
icculus@1187
    41
/* Private display data */
icculus@1187
    42
slouken@1895
    43
typedef void WSCONS_bitBlit(Uint8 * src_pos, int srcRightDelta, // pixels, not bytes
slouken@1895
    44
                            int srcDownDelta,   // pixels, not bytes
slouken@1895
    45
                            Uint8 * dst_pos,
slouken@1895
    46
                            int dst_linebytes, int width, int height);
icculus@1187
    47
slouken@1895
    48
struct SDL_PrivateVideoData
slouken@1895
    49
{
slouken@1895
    50
    int fd;                     /* file descriptor of open device */
slouken@1895
    51
    struct wsdisplay_fbinfo info;       /* frame buffer characteristics */
slouken@1895
    52
    int physlinebytes;          /* number of bytes per row */
slouken@1895
    53
    int redMask, greenMask, blueMask;
icculus@1187
    54
slouken@1895
    55
    Uint8 *fbstart;             /* These refer to the surface used, */
slouken@1895
    56
    int fblinebytes;            /* physical frame buffer or shadow. */
icculus@1187
    57
slouken@1895
    58
    size_t fbmem_len;
slouken@1895
    59
    Uint8 *physmem;
slouken@1895
    60
    Uint8 *shadowmem;
slouken@1895
    61
    int rotate;
slouken@1895
    62
    int shadowFB;               /* Tells whether a shadow is being used. */
icculus@1187
    63
slouken@1895
    64
    WSCONS_bitBlit *blitFunc;
icculus@1187
    65
slouken@1895
    66
    SDL_Rect *SDL_modelist[2];
icculus@1187
    67
slouken@1895
    68
    unsigned int kbdType;
slouken@1895
    69
    int did_save_tty;
slouken@1895
    70
    struct termios saved_tty;
icculus@1187
    71
};
icculus@1187
    72
icculus@1187
    73
icculus@1187
    74
#endif /* _SDL_wsconsvideo_h */
slouken@1895
    75
/* vi: set ts=4 sw=4 expandtab: */