"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSEngine/Src/Input/LSEKeyboard.h

00001 
00020 #ifndef __LSE_KEYBOARD_H__
00021 #define __LSE_KEYBOARD_H__
00022 
00023 #include "../LSEEngine.h"
00024 #include "LSEKeyboardBuffer.h"
00025 #include "LSEKeyboardKeys.h"
00026 
00027 namespace lse {
00028 
00039         class CKeyboard {
00040                 // The CKeyboardBuffer class will update us with its data.
00041                 friend class CKeyboardBuffer;
00042 
00043         public :
00044                 // == Various constructors.
00045                 LSE_CALL                                                CKeyboard();
00046 
00047 
00048                 // == Functions.
00055                 LSBOOL LSE_CALL                                 KeyIsDown( LSUINT32 _ui32Key ) const;
00056 
00063                 LSBOOL LSE_CALL                                 KeyJustPressed( LSUINT32 _ui32Key ) const;
00064 
00071                 LSBOOL LSE_CALL                                 KeyJustReleased( LSUINT32 _ui32Key ) const;
00072 
00073         protected :
00074                 // == Types.
00078                 typedef struct LSE_KEY_INFO {
00082                         LSBOOL                                          bIsDown;
00083 
00087                         LSUINT64                                        ui64TimePressed;
00088                 } * LPLSE_KEY_INFO, * const LPCLSE_KEY_INFO;
00089 
00090 
00091                 // == Members.
00095                 LSE_KEY_INFO                                    m_kiKeys[CKeyboardBuffer::LSE_T_TOTALKEYS];
00096 
00100                 LSE_KEY_INFO                                    m_kiLastKeys[CKeyboardBuffer::LSE_T_TOTALKEYS];
00101 
00105                 LSUINT64                                                m_ui64CurTime;
00106         };
00107 
00108 }       // namespace lse
00109 
00110 #endif  // __LSE_KEYBOARD_H__
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator