| 1 | /* |
| 2 | * OpenTyrian: A modern cross-platform port of Tyrian |
| 3 | * Copyright (C) 2007-2009 The OpenTyrian Development Team |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (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, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | #ifndef KEYBOARD_H |
| 20 | #define KEYBOARD_Hcxx . . $ `src/keyboard.h:20:9`! |
| 21 | |
| 22 | #include "opentyr.h"cxx . . $ `<file>/src/opentyr.h`/ |
| 23 | |
| 24 | #include "SDL.h" |
| 25 | |
| 26 | #include <stdbool.h> |
| 27 | |
| 28 | #define SDL_POLL_INTERVALcxx . . $ `src/keyboard.h:28:9`! 10 |
| 29 | |
| 30 | extern JE_booleancxx . . $ JE_boolean# ESCPressedcxx . . $ ESCPressed.; |
| 31 | extern JE_booleancxx . . $ JE_boolean# newkeycxx . . $ newkey., newmousecxx . . $ newmouse., keydowncxx . . $ keydown., mousedowncxx . . $ mousedown.; |
| 32 | extern SDL_Scancodecxx . . $ SDL_Scancode# lastkey_scancxx . . $ lastkey_scan.; |
| 33 | extern SDL_Keymodcxx . . $ SDL_Keymod# lastkey_modcxx . . $ lastkey_mod.; |
| 34 | extern Uint8cxx . . $ Uint8# lastmouse_butcxx . . $ lastmouse_but.; |
| 35 | extern Sint32cxx . . $ Sint32# lastmouse_xcxx . . $ lastmouse_x., lastmouse_ycxx . . $ lastmouse_y.; |
| 36 | extern JE_booleancxx . . $ JE_boolean# mouse_pressedcxx . . $ mouse_pressed.[3]; |
| 37 | extern Sint32cxx . . $ Sint32# mouse_xcxx . . $ mouse_x., mouse_ycxx . . $ mouse_y.; |
| 38 | extern Uint8cxx . . $ Uint8# keysactivecxx . . $ keysactive.[SDL_NUM_SCANCODEScxx . . $ SDL_NUM_SCANCODES.]; |
| 39 | |
| 40 | extern boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! windowHasFocuscxx . . $ windowHasFocus.; |
| 41 | |
| 42 | extern boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! new_textcxx . . $ new_text.; |
| 43 | extern char last_textcxx . . $ last_text.[SDL_TEXTINPUTEVENT_TEXT_SIZEcxx . . $ `<external>/12778062723415653681/SDL_events.h:268:9`!]; |
| 44 | |
| 45 | void flush_events_buffercxx . . $ flush_events_buffer(49f6e7a06ebc5aa8).(void); |
| 46 | void wait_inputcxx . . $ wait_input(9e113dd3a0d25c95).(JE_booleancxx . . $ JE_boolean# keyboard, JE_booleancxx . . $ JE_boolean# mouse, JE_booleancxx . . $ JE_boolean# joystick); |
| 47 | void wait_noinputcxx . . $ wait_noinput(9e113dd3a0d25c95).(JE_booleancxx . . $ JE_boolean# keyboard, JE_booleancxx . . $ JE_boolean# mouse, JE_booleancxx . . $ JE_boolean# joystick); |
| 48 | void init_keyboardcxx . . $ init_keyboard(49f6e7a06ebc5aa8).(void); |
| 49 | void mouseSetRelativecxx . . $ mouseSetRelative(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! enable); |
| 50 | JE_wordcxx . . $ JE_word# JE_mousePositioncxx . . $ JE_mousePosition(2aa6fbd8d75b91c).(JE_wordcxx . . $ JE_word# *mouseX, JE_wordcxx . . $ JE_word# *mouseY); |
| 51 | void mouseGetRelativePositioncxx . . $ mouseGetRelativePosition(ce8f7825f8908cfa).(Sint32cxx . . $ Sint32# *out_x, Sint32cxx . . $ Sint32# *out_y); |
| 52 | |
| 53 | void service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(JE_booleancxx . . $ JE_boolean# clear_new); |
| 54 | |
| 55 | void sleep_gamecxx . . $ sleep_game(49f6e7a06ebc5aa8).(void); |
| 56 | |
| 57 | void JE_clearKeyboardcxx . . $ JE_clearKeyboard(49f6e7a06ebc5aa8).(void); |
| 58 | |
| 59 | #endif /* KEYBOARD_H */ |