DOSBox-X
|
00001 /* 00002 * Copyright (C) 2002-2020 The DOSBox Team 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License along 00015 * with this program; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef DOSBOX_MAPPER_H 00020 #define DOSBOX_MAPPER_H 00021 00022 #include "include/menu.h" 00023 00024 enum MapKeys { 00025 MK_nothing, 00026 MK_f1,MK_f2,MK_f3,MK_f4,MK_f5,MK_f6,MK_f7,MK_f8,MK_f9,MK_f10,MK_f11,MK_f12, 00027 MK_return,MK_kpminus,MK_kpplus,MK_minus,MK_equals,MK_scrolllock,MK_printscreen,MK_pause,MK_home,MK_rightarrow, 00028 MK_1, MK_2, MK_3, MK_4, 00029 MK_c, MK_d, MK_f, MK_m, MK_r, MK_s, MK_v, MK_w, 00030 MK_escape, 00031 MK_lbracket,MK_rbracket,MK_leftarrow, 00032 00033 MK_MAX 00034 }; 00035 00036 typedef void (MAPPER_Handler)(bool pressed); 00037 void MAPPER_AddHandler(MAPPER_Handler * handler,MapKeys key,Bitu mods,char const * const eventname,char const * const buttonname,DOSBoxMenu::item **ret_menuitem=NULL); 00038 void MAPPER_Init(void); 00039 void MAPPER_StartUp(); 00040 void MAPPER_Run(bool pressed); 00041 void MAPPER_RunEvent(Bitu); 00042 void MAPPER_RunInternal(); 00043 void MAPPER_LosingFocus(void); 00044 00045 std::string mapper_event_keybind_string(const std::string &x); 00046 00047 #define MMOD1 0x1 00048 #define MMOD2 0x2 00049 #define MMOD3 0x4 00050 #define MMODHOST 0x8 00051 00052 #endif