DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
include/mapper.h
00001  /*
00002  *  Copyright (C) 2002-2015  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
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 
00032     MK_MAX
00033 };
00034 
00035 typedef void (MAPPER_Handler)(bool pressed);
00036 void MAPPER_AddHandler(MAPPER_Handler * handler,MapKeys key,Bitu mods,char const * const eventname,char const * const buttonname,DOSBoxMenu::item **ret_menuitem=NULL);
00037 void MAPPER_Init(void);
00038 void MAPPER_StartUp();
00039 void MAPPER_Run(bool pressed);
00040 void MAPPER_RunEvent(Bitu);
00041 void MAPPER_RunInternal();
00042 void MAPPER_LosingFocus(void);
00043 
00044 
00045 #define MMOD1 0x1
00046 #define MMOD2 0x2
00047 #define MMOD3 0x4
00048 #define MMODHOST 0x8
00049 
00050 #endif