Touchscreen things

This commit is contained in:
elasota
2020-10-11 19:50:03 -04:00
parent 5c98783bbb
commit 184daefe7b
34 changed files with 799 additions and 35 deletions

View File

@@ -10,6 +10,7 @@
#endif
GpSystemServices_Win32::GpSystemServices_Win32()
: m_isTouchscreenSimulation(false)
{
}
@@ -84,6 +85,20 @@ void GpSystemServices_Win32::Beep() const
MessageBeep(MB_OK);
}
bool GpSystemServices_Win32::IsTouchscreen() const
{
return m_isTouchscreenSimulation;
}
bool GpSystemServices_Win32::IsUsingMouseAsTouch() const
{
return m_isTouchscreenSimulation;
}
void GpSystemServices_Win32::SetTouchscreenSimulation(bool isTouchscreenSimulation)
{
m_isTouchscreenSimulation = isTouchscreenSimulation;
}
GpSystemServices_Win32 *GpSystemServices_Win32::GetInstance()
{

View File

@@ -22,10 +22,16 @@ public:
PortabilityLayer::HostThreadEvent *CreateThreadEvent(bool autoReset, bool startSignaled) override;
uint64_t GetFreeMemoryCosmetic() const override;
void Beep() const override;
bool IsTouchscreen() const override;
bool IsUsingMouseAsTouch() const override;
void SetTouchscreenSimulation(bool isTouchscreenSimulation);
static GpSystemServices_Win32 *GetInstance();
private:
bool m_isTouchscreenSimulation;
static GpSystemServices_Win32 ms_instance;
};