1/*
2    SDL - Simple DirectMedia Layer
3    Copyright (C) 2003  Sam Hocevar
4
5    This library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Library General Public
7    License as published by the Free Software Foundation; either
8    version 2 of the License, or (at your option) any later version.
9
10    This library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Library General Public License for more details.
14
15    You should have received a copy of the GNU Library General Public
16    License along with this library; if not, write to the Free
17    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
19    Sam Hocevar
20    sam@zoy.org
21*/
22
23#ifdef SAVE_RCSID
24static char rcsid =
25 "@(#) $Id: libsdl-1.2.11-libcaca.patch,v 1.1 2006/09/18 16:06:06 mr_bones_ Exp $";
26#endif
27
28#ifndef _SDL_cacavideo_h
29#define _SDL_cacavideo_h
30
31#include "SDL_mouse.h"
32#include "../SDL_sysvideo.h"
33#include "SDL_mutex.h"
34
35#include <sys/time.h>
36#include <time.h>
37
38#include <caca.h>
39#ifdef CACA_API_VERSION_1
40#include <caca0.h>
41#endif
42
43/* Hidden "this" pointer for the video functions */
44#define _THIS	SDL_VideoDevice *this
45
46#define SDL_NUMMODES 6
47
48/* Private display data */
49struct SDL_PrivateVideoData {
50	SDL_Rect *SDL_modelist[SDL_NUMMODES+1];
51	SDL_mutex *mutex;
52
53	struct caca_bitmap *bitmap;
54	void *buffer;
55	int w, h;
56
57	int lastkey;
58	struct timeval lasttime;
59};
60
61/* Old variable names */
62#define SDL_modelist		(this->hidden->SDL_modelist)
63#define Caca_palette		    (this->hidden->palette)
64#define Caca_bitmap		    (this->hidden->bitmap)
65#define Caca_buffer		    (this->hidden->buffer)
66
67#define Caca_w		    (this->hidden->w)
68#define Caca_h		    (this->hidden->h)
69
70#define Caca_lastkey		    (this->hidden->lastkey)
71#define Caca_lasttime		    (this->hidden->lasttime)
72
73#define Caca_mutex		    (this->hidden->mutex)
74
75#endif /* _SDL_cacavideo_h */
76
77