1 /*
2  * cfg_control.h - keyboard and joystick configuration data
3  *
4  * $Id: cfg_control.h,v 1.9 2006/02/09 21:21:23 fzago Exp $
5  *
6  * Program XBLAST
7  * (C) by Oliver Vogel (e-mail: m.vogel@ndh.net)
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published
11  * by the Free Software Foundation; either version 2; or (at your option)
12  * any later version
13  *
14  * This program is distributed in the hope that it will be entertaining,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILTY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
17  * Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.
21  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23 #ifndef _CFG_CONTROL_H
24 #define _CFG_CONTROL_H
25 
26 /*
27  * type definitions
28  */
29 #define NUM_KEYB_CONTROLS  2
30 
31 /* constant assignment of control to event type */
32 extern const XBEventCode keyEventType[NUM_KEYB_CONTROLS];
33 
34 /* ingame controls for editing*/
35 typedef struct
36 {
37 	XBAtom keyUp;
38 	XBAtom keyDown;
39 	XBAtom keyLeft;
40 	XBAtom keyRight;
41 	XBAtom keyStop;
42 	XBAtom keyBomb;
43 	XBAtom keySpecial;
44 	XBAtom keyPause;
45 	XBAtom keyAbort;
46 	XBAtom keyAbortCancel;
47 	/* Skywalker */
48 	XBAtom keyLaola;
49 	XBAtom keyLooser;
50 	XBAtom keyBot;
51 	XBAtom keyChatStart;
52 	XBAtom keyChatSend;
53 	XBAtom keyChatCancel;
54 	XBAtom keyChatChangeReceiver;
55 	/* */
56 } CFGControlKeyboard;
57 
58 /* key tables for GUI */
59 typedef struct
60 {
61 	const char *keysym;
62 	XBEventCode eventCode;
63 	int eventData;
64 } CFGKeyTable;
65 
66 /*
67  * global prototypes
68  */
69 extern void LoadControlConfig (void);
70 extern void SaveControlConfig (void);
71 extern void FinishControlConfig (void);
72 extern void StoreControlKeyboard (XBEventCode type, const CFGControlKeyboard * ctrl);
73 extern XBBool RetrieveControlKeyboard (XBEventCode type, CFGControlKeyboard * ctrl);
74 extern const CFGKeyTable *GetGameKeyPressTable (void);
75 extern const CFGKeyTable *GetChatKeyTable (void);
76 extern const CFGKeyTable *GetGameKeyReleaseTable (void);
77 extern const CFGKeyTable *GetMenuKeyTable (void);
78 
79 #endif
80 /*
81  * end cfg_control.h
82  */
83