Sleeping Wombat GUI
0.100
swGUI
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
swInputLibrary
InputCore
Debugging
EventCapture.h
Go to the documentation of this file.
1
#pragma once
2
9
#include "
swInputLibrary/InputCore/InputDeviceEvent.h
"
10
#include "
swInputLibrary/InputCore/EventQueue.h
"
11
12
#include <vector>
13
14
15
namespace
sw
{
16
namespace
input
17
{
18
24
struct
DebugEvent
25
{
26
DeviceEvent
EventContent
;
27
Size
FrameNumber
;
28
uint8
DeviceIdx
;
29
DeviceType
DeviceType
;
30
};
31
32
33
37
class
EventCapture
38
{
39
private
:
40
41
EventQueue< DebugEvent >
m_events
;
42
43
Size
m_frameNumber
;
44
Timestamp
m_nextTimeStamp
;
45
46
protected
:
47
public
:
48
explicit
EventCapture
();
49
~EventCapture
() =
default
;
50
53
55
void
QueueUpKeyEvent
(
Keyboard::PhysicalKeys
key );
56
void
QueueDownKeyEvent
(
Keyboard::PhysicalKeys
key );
57
void
QueueKeyEvent
(
KeyState
state,
Keyboard::PhysicalKeys
key );
58
59
void
QueueMouseClick
(
Mouse::PhysicalButtons
button );
60
void
QueueMouseUp
(
Mouse::PhysicalButtons
button );
61
void
QueueMouseEvent
(
KeyState
state,
Mouse::PhysicalButtons
key );
62
63
void
QueueMouseMove
(
int16
deltaX,
int16
deltaY );
65
66
public
:
67
70
void
GoToNextFrame
();
71
72
const
DebugEvent
&
QueryEvent
(
Size
frameNum );
73
bool
IsNext
(
Size
frameNum );
74
75
void
QueueEvent
(
const
DeviceEvent
& event,
Size
frameNum,
DeviceType
deviceType,
uint8
deviceIdx = 0 );
76
void
QueueEvent
(
const
DebugEvent
& event );
78
79
};
80
81
82
}
// input
83
}
// sw
84
85
sw::input::Mouse::PhysicalButtons
PhysicalButtons
Physical buttons.
Definition:
InputDeviceEvent.h:215
sw::input::Timestamp
uint16 Timestamp
Definition:
InputDeviceEvent.h:19
sw::input::DebugEvent::FrameNumber
Size FrameNumber
Definition:
EventCapture.h:27
sw::input::EventCapture::QueueMouseUp
void QueueMouseUp(Mouse::PhysicalButtons button)
Definition:
EventCapture.cpp:73
sw
Definition:
DirectInputModule.cpp:11
sw::input::EventCapture::QueueUpKeyEvent
void QueueUpKeyEvent(Keyboard::PhysicalKeys key)
Adds key event to current frame and gives it next timstamp.
Definition:
EventCapture.cpp:31
sw::input::EventCapture::QueueEvent
void QueueEvent(const DeviceEvent &event, Size frameNum, DeviceType deviceType, uint8 deviceIdx=0)
Definition:
EventCapture.cpp:107
sw::input::EventCapture
This class provides functionality of capturing events for debug and test purposes.
Definition:
EventCapture.h:37
sw::input::EventCapture::IsNext
bool IsNext(Size frameNum)
Definition:
EventCapture.cpp:140
sw::input::DeviceEvent
KeyStates changed events.
Definition:
InputDeviceEvent.h:313
sw::input::EventCapture::~EventCapture
~EventCapture()=default
sw::input::DebugEvent::EventContent
DeviceEvent EventContent
Definition:
EventCapture.h:26
sw::input::EventCapture::m_nextTimeStamp
Timestamp m_nextTimeStamp
Definition:
EventCapture.h:44
sw::input::EventCapture::QueueMouseMove
void QueueMouseMove(int16 deltaX, int16 deltaY)
Definition:
EventCapture.cpp:95
InputDeviceEvent.h
sw::input::EventCapture::QueueDownKeyEvent
void QueueDownKeyEvent(Keyboard::PhysicalKeys key)
Definition:
EventCapture.cpp:41
sw::input::EventCapture::QueueMouseEvent
void QueueMouseEvent(KeyState state, Mouse::PhysicalButtons key)
Definition:
EventCapture.cpp:83
sw::input::EventCapture::GoToNextFrame
void GoToNextFrame()
Definition:
EventCapture.cpp:150
sw::input::DebugEvent
Event structure for debugging. This structure holds additionally FrameNumber. This allows user to pro...
Definition:
EventCapture.h:24
sw::input::KeyState
Button state structure..
Definition:
KeyState.h:26
Size
size_t Size
Definition:
TypesDefinitions.h:35
uint8
uint8_t uint8
Definition:
TypesDefinitions.h:27
sw::input::DeviceType
DeviceType
Input device types.
Definition:
InputDeviceEvent.h:264
sw::input::EventCapture::m_frameNumber
Size m_frameNumber
Definition:
EventCapture.h:43
sw::input::EventQueue
Abstraction of event queue.
Definition:
EventQueue.h:26
EventQueue.h
sw::input::DebugEvent::DeviceType
DeviceType DeviceType
Definition:
EventCapture.h:29
sw::input::EventCapture::QueryEvent
const DebugEvent & QueryEvent(Size frameNum)
Definition:
EventCapture.cpp:127
sw::input::EventCapture::QueueMouseClick
void QueueMouseClick(Mouse::PhysicalButtons button)
Definition:
EventCapture.cpp:63
sw::input::EventCapture::EventCapture
EventCapture()
Definition:
EventCapture.cpp:24
sw::input::EventCapture::QueueKeyEvent
void QueueKeyEvent(KeyState state, Keyboard::PhysicalKeys key)
Definition:
EventCapture.cpp:51
int16
int16_t int16
Definition:
TypesDefinitions.h:28
sw::input::DebugEvent::DeviceIdx
uint8 DeviceIdx
Definition:
EventCapture.h:28
sw::input::EventCapture::m_events
EventQueue< DebugEvent > m_events
Definition:
EventCapture.h:41
sw::input::Keyboard::PhysicalKeys
PhysicalKeys
Physical keys numbers. Numbers are the same as in DirectInput.
Definition:
InputDeviceEvent.h:29
Generated on Tue May 9 2017 15:46:02 for Sleeping Wombat GUI by
1.8.9.1