diff --git a/library/DFHackAPI.h b/library/DFHackAPI.h index dc6d03e0e..a21d51206 100644 --- a/library/DFHackAPI.h +++ b/library/DFHackAPI.h @@ -31,6 +31,7 @@ distribution. #include #include "integers.h" #include "DFTileTypes.h" +#include "DFKeys.h" namespace DFHack { diff --git a/library/DFKeys.h b/library/DFKeys.h new file mode 100644 index 000000000..e09896e9f --- /dev/null +++ b/library/DFKeys.h @@ -0,0 +1,85 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#ifndef KEYS_H_INCLUDED +#define KEYS_H_INCLUDED + +namespace DFHack +{ + +enum t_special +{ + ENTER, + SPACE, + BACK_SPACE, + TAB, + CAPS_LOCK, + LEFT_SHIFT, + RIGHT_SHIFT, + LEFT_CONTROL, + RIGHT_CONTROL, + ALT, + WAIT, + ESCAPE, + UP, + DOWN, + LEFT, + RIGHT, + F1, + F2, + F3, + F4, + F5, + F6, + F7, + F8, + F9, + F10, + F11, + F12, + PAGE_UP, + PAGE_DOWN, + INSERT, + DELETE, + HOME, + END, + KEYPAD_DIVIDE, + KEYPAD_MULTIPLY, + KEYPAD_SUBTRACT, + KEYPAD_ADD, + KEYPAD_ENTER, + KEYPAD_0, + KEYPAD_1, + KEYPAD_2, + KEYPAD_3, + KEYPAD_4, + KEYPAD_5, + KEYPAD_6, + KEYPAD_7, + KEYPAD_8, + KEYPAD_9, + KEYPAD_DECIMAL_POINT +}; +} +#endif // KEYS_H_INCLUDED \ No newline at end of file diff --git a/library/DFTypes.h b/library/DFTypes.h index fd3f687c9..08f218246 100644 --- a/library/DFTypes.h +++ b/library/DFTypes.h @@ -645,60 +645,6 @@ union t_occupancy } unibits; }; -enum t_special -{ - ENTER, - SPACE, - BACK_SPACE, - TAB, - CAPS_LOCK, - LEFT_SHIFT, - RIGHT_SHIFT, - LEFT_CONTROL, - RIGHT_CONTROL, - ALT, - WAIT, - ESCAPE, - UP, - DOWN, - LEFT, - RIGHT, - F1, - F2, - F3, - F4, - F5, - F6, - F7, - F8, - F9, - F10, - F11, - F12, - PAGE_UP, - PAGE_DOWN, - INSERT, - DELETE, - HOME, - END, - KEYPAD_DIVIDE, - KEYPAD_MULTIPLY, - KEYPAD_SUBTRACT, - KEYPAD_ADD, - KEYPAD_ENTER, - KEYPAD_0, - KEYPAD_1, - KEYPAD_2, - KEYPAD_3, - KEYPAD_4, - KEYPAD_5, - KEYPAD_6, - KEYPAD_7, - KEYPAD_8, - KEYPAD_9, - KEYPAD_DECIMAL_POINT -}; - struct t_viewscreen { int32_t type;