Sleeping Wombat GUI  0.100
swGUI
IInput.h
Go to the documentation of this file.
1 #pragma once
2 
9 #include "KeyboardState.h"
10 #include "MouseState.h"
11 #include "JoystickState.h"
12 
16 
17 #include "InputDeviceInfo.h"
18 
19 #include <vector>
20 
21 typedef void* AppInstanceHandle;
22 typedef void* WindowHandle;
23 
24 namespace sw {
25 namespace input
26 {
27 
28 
39 class EventCapture;
40 
41 
46 {
50 };
51 
52 
53 
65 class IInput
66 {
67 private:
68 protected:
69 public:
70  virtual ~IInput() = 0 {};
71 
74  virtual bool Init ( const InputInitInfo& initInfo ) = 0;
75 
76  virtual const std::vector< const KeyboardState* >& GetKeyboardStates () const = 0;
77  virtual const std::vector< const MouseState* >& GetMouseStates () const = 0;
78  virtual const std::vector< const JoystickState* >& GetJoystickStates () const = 0;
79 
80  virtual std::vector< KeyboardDeviceOPtr >& GetKeyboardDevice () = 0;
81  virtual std::vector< MouseDeviceOPtr >& GetMouseDevice () = 0;
82  virtual std::vector< JoystickDeviceOPtr >& GetJoystickDevice () = 0;
83 
84  virtual std::vector< const InputDeviceInfo* > GetDevicesInfo () const = 0;
85 
86  virtual void Update ( float timeInterval ) = 0;
87 
90  virtual bool UpdateDevices () = 0;
91 };
92 
93 
94 
95 
96 } // input
97 } // sw
98 
AppInstanceHandle AppInstance
Definition: IInput.h:47
virtual std::vector< KeyboardDeviceOPtr > & GetKeyboardDevice()=0
virtual ~IInput()=0
Definition: IInput.h:70
Definition: DirectInputModule.cpp:11
This class provides functionality of capturing events for debug and test purposes.
Definition: EventCapture.h:37
virtual std::vector< const InputDeviceInfo * > GetDevicesInfo() const =0
void * AppInstanceHandle
Definition: IInput.h:21
virtual bool UpdateDevices()=0
Funkcja na nowo sprawdza obecne w systemie urządzenia i aktualizuje wszystkie potrzebne dane...
virtual std::vector< JoystickDeviceOPtr > & GetJoystickDevice()=0
Initialization structure for input objects.
Definition: IInput.h:45
WindowHandle WndHandle
Definition: IInput.h:48
virtual const std::vector< const MouseState * > & GetMouseStates() const =0
virtual bool Init(const InputInitInfo &initInfo)=0
Inicjalizuje cały moduł. Po wywołaniu tej funkcji moduł musi być gotowy do użytku w innym przypadku p...
virtual const std::vector< const JoystickState * > & GetJoystickStates() const =0
virtual std::vector< MouseDeviceOPtr > & GetMouseDevice()=0
virtual void Update(float timeInterval)=0
Interface for input classes for capturing user input.
Definition: IInput.h:65
virtual const std::vector< const KeyboardState * > & GetKeyboardStates() const =0
EventCapture * EventCapturer
Definition: IInput.h:49
void * WindowHandle
Definition: IInput.h:22