Files
Aerofoil/PortabilityLayer/PLTimeTaggedVOSEvent.h

26 lines
593 B
C
Raw Permalink Normal View History

2019-12-31 03:55:17 -05:00
#pragma once
#include "GpVOSEvent.h"
struct TimeTaggedVOSEvent
{
GpVOSEvent m_vosEvent;
uint32_t m_timestamp;
static TimeTaggedVOSEvent Create(const GpVOSEvent &vosEvent, uint32_t timestamp);
// Helpers for common cases
bool IsKeyDownEvent() const; // Only returns true for untranslated keydown events
2019-12-31 03:55:17 -05:00
bool IsLMouseDownEvent() const;
bool IsLMouseUpEvent() const;
2019-12-31 03:55:17 -05:00
};
inline TimeTaggedVOSEvent TimeTaggedVOSEvent::Create(const GpVOSEvent &vosEvent, uint32_t timestamp)
{
TimeTaggedVOSEvent result;
result.m_vosEvent = vosEvent;
result.m_timestamp = timestamp;
return result;
}