1 /* 2 3 Copyright (C) 2015-2018 Night Dive Studios, LLC. 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program 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 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 */ 19 #ifndef __INPUT_H 20 #define __INPUT_H 21 22 #include "frtypesx.h" 23 //#include <Carbon/Carbon.h> 24 25 // ------- 26 // DEFINES 27 // ------- 28 29 #define NUM_HOTKEYS 50 // an arbitrary constant 30 31 // Hotkey contexts 32 #define DEMO_CONTEXT 0x01 33 #define EDIT_CONTEXT 0x02 34 #define CYBER_CONTEXT 0x04 35 #define SETUP_CONTEXT 0x08 36 #define MWORK_CONTEXT 0x10 37 #define SVGA_CONTEXT 0x20 38 #define AMAP_CONTEXT 0x40 39 #define EVERY_CONTEXT 0xFFFFFFFF 40 41 // input modes 42 #define INPUT_NORMAL_CURSOR 0 43 #define INPUT_OBJECT_CURSOR 1 44 45 #define INPUT_CHAINING 46 #define CHAINING_VAR "kb_chain" 47 48 #define MAX_JUMP_CONTROL (CONTROL_MAX_VAL / 2) 49 50 // ------ 51 // PROTOS 52 // ------ 53 54 void input_chk(void); 55 // uchar main_kb_callback(uiEvent *h, LGRegion *r, intptr_t udata); 56 void shutdown_input(void); 57 void init_input(void); 58 void install_motion_mouse_handler(LGRegion *r, frc *fr); 59 void install_motion_keyboard_handler(LGRegion *r); 60 void pop_cursor_object(void); 61 void push_cursor_object(short id); 62 void reset_input_system(void); 63 64 // ------- 65 // GLOBALS 66 // ------ 67 extern int input_cursor_mode; 68 extern short object_on_cursor; 69 #endif 70