input: Add fully configurable trackpad gestures (#11490)
Adds configurable trackpad gestures
This commit is contained in:
parent
378e130f14
commit
81bf4eccba
60 changed files with 2518 additions and 940 deletions
28
src/managers/input/UnifiedWorkspaceSwipeGesture.hpp
Normal file
28
src/managers/input/UnifiedWorkspaceSwipeGesture.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include "../../helpers/memory/Memory.hpp"
|
||||
#include "../../desktop/DesktopTypes.hpp"
|
||||
|
||||
class CUnifiedWorkspaceSwipeGesture {
|
||||
public:
|
||||
void begin();
|
||||
void update(double delta);
|
||||
void end();
|
||||
|
||||
bool isGestureInProgress();
|
||||
|
||||
private:
|
||||
PHLWORKSPACE m_workspaceBegin = nullptr;
|
||||
PHLMONITORREF m_monitor;
|
||||
|
||||
double m_delta = 0;
|
||||
int m_initialDirection = 0;
|
||||
float m_avgSpeed = 0;
|
||||
int m_speedPoints = 0;
|
||||
int m_touchID = 0;
|
||||
|
||||
friend class CWorkspaceSwipeGesture;
|
||||
friend class CInputManager;
|
||||
};
|
||||
|
||||
inline UP<CUnifiedWorkspaceSwipeGesture> g_pUnifiedWorkspaceSwipe = makeUnique<CUnifiedWorkspaceSwipeGesture>();
|
||||
Loading…
Add table
Add a link
Reference in a new issue