1 /**
2  * @file
3  * @brief External (non-keyboard) input devices.
4  */
5 
6 /*
7 All original material Copyright (C) 2002-2013 UFO: Alien Invasion.
8 
9 Original file from Quake 2 v3.21: quake2-2.31/client/
10 Copyright (C) 1997-2001 Id Software, Inc.
11 
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 as published by the Free Software Foundation; either version 2
15 of the License, or (at your option) any later version.
16 
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 
21 See the GNU General Public License for more details.
22 
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26 
27 */
28 
29 #pragma once
30 
31 typedef enum {
32 	MS_NULL,
33 	MS_UI,			/**< we are over some menu node */
34 	MS_WORLD,		/**< we are in tactical mode */
35 
36 	MS_MAX
37 } mouseSpace_t;
38 
39 #define STATE_FORWARD	1
40 #define STATE_RIGHT		2
41 #define STATE_ZOOM		3
42 #define STATE_ROT		4
43 #define STATE_TILT		5
44 
45 extern mouseSpace_t mouseSpace;
46 extern int mousePosX, mousePosY;
47 
48 #define IN_GetMouseSpace() mouseSpace
49 
50 void IN_Init(void);
51 void IN_Frame(void);
52 void IN_SendKeyEvents(void);
53 void IN_SetMouseSpace(mouseSpace_t mouseSpace);
54 
55 void IN_EventEnqueue(unsigned int key, unsigned short, bool down);
56 float CL_GetKeyMouseState(int dir);
57