Debian Codegraph @

include/video.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2002-2010 The DOSBox Team
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 /* $Id: video.h,v 1.26 2009-05-27 09:15:41 qbix79 Exp $ */
20
21 #ifndef DOSBOX_VIDEO_H
22 #define DOSBOX_VIDEO_H
23
24 #define REDUCE_JOYSTICK_POLLING
25
26 typedef enum {
27 GFX_CallBackReset,
28 GFX_CallBackStop,
29 GFX_CallBackRedraw
30 } GFX_CallBackFunctions_t;
31
32 typedef void (*GFX_CallBack_t)( GFX_CallBackFunctions_t function );
33
34 struct GFX_PalEntry {
35 Bit8u r;
36 Bit8u g;
37 Bit8u b;
38 Bit8u unused;
39 };
40
41 #define GFX_CAN_8 0x0001
42 #define GFX_CAN_15 0x0002
43 #define GFX_CAN_16 0x0004
44 #define GFX_CAN_32 0x0008
45
46 #define GFX_LOVE_8 0x0010
47 #define GFX_LOVE_15 0x0020
48 #define GFX_LOVE_16 0x0040
49 #define GFX_LOVE_32 0x0080
50
51 #define GFX_RGBONLY 0x0100
52
53 #define GFX_SCALING 0x1000
54 #define GFX_HARDWARE 0x2000
55
56 #define GFX_CAN_RANDOM 0x4000 //If the interface can also do random access surface
57
58 void GFX_Events(void);
59 void GFX_SetPalette(Bitu start,Bitu count,GFX_PalEntry * entries);
60 Bitu GFX_GetBestMode(Bitu flags);
61 Bitu GFX_GetRGB(Bit8u red,Bit8u green,Bit8u blue);
62 Bitu GFX_SetSize(Bitu width,Bitu height,Bitu flags,double scalex,double scaley,GFX_CallBack_t cb);
63
64 void GFX_ResetScreen(void);
65 void GFX_Start(void);
66 void GFX_Stop(void);
67 void GFX_SwitchFullScreen(void);
68 bool GFX_StartUpdate(Bit8u * & pixels,Bitu & pitch);
69 void GFX_EndUpdate( const Bit16u *changedLines );
70 void GFX_GetSize(int &width, int &height, bool &fullscreen);
71 void GFX_LosingFocus(void);
72
73 #if defined (WIN32)
74 bool GFX_SDLUsingWinDIB(void);
75 #endif
76
77 #if defined (REDUCE_JOYSTICK_POLLING)
78 void MAPPER_UpdateJoysticks(void);
79 #endif
80
81 /* Mouse related */
82 void GFX_CaptureMouse(void);
83 extern bool mouselocked; //true if mouse is confined to window
84
85 #endif