Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 #pragma once
00006 
00007 #include "../base/Setup.h"
00008 
00009 #ifdef MPMA_COMPILE_INPUT
00010 
00011 #include "../base/Types.h"
00012 
00013 #include <string>
00014 #include <vector>
00015 
00017 namespace INPUT
00018 {
00019     
00020 
00022     enum DeviceType
00023     {
00024         KEYBOARD_DEVICE=1,
00025         MOUSE_DEVICE,
00026         GAMEPAD_DEVICE
00027     };
00028 
00029     
00030 
00032     struct UnifiedButton
00033     {
00035         DeviceType Type;
00037         uint32 Data;
00038 
00040         inline UnifiedButton(DeviceType type, uint32 data)
00041         {
00042             Type=type;
00043             Data=data;
00044         }
00045 
00046         inline bool operator==(const UnifiedButton &o) const 
00047                 { return Type==o.Type && Data==o.Data; }
00048         inline bool operator!=(const UnifiedButton &o) const 
00049                 { return !(*this==o); }
00050     };
00051 
00053     bool IsButtonDown(const UnifiedButton &button);
00054 
00056     const std::vector<UnifiedButton>& GetCurrentlyPressedButtons();
00057 
00059     const std::vector<UnifiedButton>& GetNewlyPressedButtons();
00060 
00062     const std::string& GetFriendlyName(const UnifiedButton &button);
00063 
00064 
00065     
00066     
00067 
00069 
00070 
00072 
00073 
00075 
00076 
00077 
00079 
00080 
00082 
00083 
00085 
00086 
00088 
00089 
00090 
00092 
00093 
00095 
00096 
00098 
00099 
00101 
00102 
00103 }
00104 
00105 #endif //#ifdef MPMA_COMPILE_INPUT