19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL - Simple DirectMedia Layer 39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Copyright (C) 1997-2012 Sam Lantinga 49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This library is free software; you can redistribute it and/or 69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall modify it under the terms of the GNU Lesser General Public 79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall License as published by the Free Software Foundation; either 89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall version 2.1 of the License, or (at your option) any later version. 99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This library is distributed in the hope that it will be useful, 119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall but WITHOUT ANY WARRANTY; without even the implied warranty of 129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Lesser General Public License for more details. 149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall You should have received a copy of the GNU Lesser General Public 169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall License along with this library; if not, write to the Free Software 179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Sam Lantinga 209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall slouken@libsdl.org 219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*/ 229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_config.h" 239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifndef _SDL_wsconsvideo_h 259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define _SDL_wsconsvideo_h 269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <sys/time.h> 289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <termios.h> 299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <dev/wscons/wsconsio.h> 309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_mouse.h" 329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_mutex.h" 339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "../SDL_sysvideo.h" 349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid WSCONS_ReportError(char *fmt, ...); 369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* Hidden "this" pointer for the video functions */ 389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define _THIS SDL_VideoDevice *this 399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define private (this->hidden) 409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* Private display data */ 429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef void WSCONS_bitBlit(Uint8 *src_pos, 449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int srcRightDelta, // pixels, not bytes 459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int srcDownDelta, // pixels, not bytes 469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Uint8 *dst_pos, 479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int dst_linebytes, 489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int width, 499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int height); 509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_PrivateVideoData { 529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int fd; /* file descriptor of open device */ 539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct wsdisplay_fbinfo info; /* frame buffer characteristics */ 549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int physlinebytes; /* number of bytes per row */ 559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int redMask, greenMask, blueMask; 569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Uint8 *fbstart; /* These refer to the surface used, */ 589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int fblinebytes; /* physical frame buffer or shadow. */ 599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall size_t fbmem_len; 619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Uint8 *physmem; 629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Uint8 *shadowmem; 639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int rotate; 649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int shadowFB; /* Tells whether a shadow is being used. */ 659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall WSCONS_bitBlit *blitFunc; 679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Rect *SDL_modelist[2]; 699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall unsigned int kbdType; 719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int did_save_tty; 729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct termios saved_tty; 739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}; 749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* _SDL_wsconsvideo_h */ 77