X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=keys.h;h=f6b78cd0c841a385efea99dee7988d09c72530cd;hb=refs%2Fheads%2Fbones_was_here%2Fnet_s14;hp=6c10a6f12810d337a876bea01f634a378176c84d;hpb=d0c3037e2e74a1df265131a8b1b82c70011a0da2;p=xonotic%2Fdarkplaces.git diff --git a/keys.h b/keys.h index 6c10a6f1..f6b78cd0 100644 --- a/keys.h +++ b/keys.h @@ -27,7 +27,11 @@ #ifndef __KEYS_H #define __KEYS_H +#include #include "qtypes.h" +#include "qdefs.h" +#include "fs.h" +#include "cmd.h" // // these are the key numbers that should be passed to Key_Event @@ -357,7 +361,7 @@ typedef enum keydest_e { key_game, key_message, key_menu, key_menu_grabbed, key_ extern char key_line[MAX_INPUTLINE]; extern int key_linepos; -extern qboolean key_insert; // insert key toggle (for editing) +extern qbool key_insert; // insert key toggle (for editing) extern keydest_t key_dest; // key_consoleactive bits // user wants console (halfscreen) @@ -371,24 +375,26 @@ extern int chat_mode; // 0 for say, 1 for say_team, -1 for command extern char chat_buffer[MAX_INPUTLINE]; extern int chat_bufferpos; -int Key_ClearEditLine(qboolean is_console); +int Key_ClearEditLine(qbool is_console); void Key_WriteBindings(qfile_t *f); void Key_Init(void); void Key_Shutdown(void); void Key_Init_Cvars(void); -void Key_Event(int key, int ascii, qboolean down); +void Key_Event(int key, int ascii, qbool down); void Key_ReleaseAll (void); void Key_ReleaseAll_f(cmd_state_t *cmd); void Key_EventQueue_Block(void); void Key_EventQueue_Unblock(void); -int Key_AddChar(int unicode, qboolean is_console); -int Key_Parse_CommonKeys(cmd_state_t *cmd, qboolean is_console, int key, int unicode); +int Key_AddChar(int unicode, qbool is_console); +int Key_Parse_CommonKeys(cmd_state_t *cmd, qbool is_console, int key, int unicode); -qboolean Key_SetBinding (int keynum, int bindmap, const char *binding); +qbool Key_SetBinding (int keynum, int bindmap, const char *binding); const char *Key_GetBind (int key, int bindmap); void Key_FindKeysForCommand (const char *command, int *keys, int numkeys, int bindmap); -qboolean Key_SetBindMap(int fg, int bg); +qbool Key_SetBindMap(int fg, int bg); void Key_GetBindMap(int *fg, int *bg); +const char *Key_KeynumToString (int keynum, char *buf, size_t buflength); +int Key_StringToKeynum (const char *str); #endif // __KEYS_H