diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-04 21:48:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-04 21:48:19 +0200 |
commit | 344b42703bab951dbc8c0e7763740ac6b3dfad79 (patch) | |
tree | 9ec6a78b5f67e54ccc69688bc328bc02025b5f9a /platform/windows/display_server_windows.h | |
parent | b4644e283556b499a22dada2db5cff12290440ca (diff) | |
parent | 6dcc9d11319ddb59089fb54551f852249081e027 (diff) |
Merge pull request #62212 from hansemro/eraser-detect-4
Add inversion/eraser-end property for tablet pens
Diffstat (limited to 'platform/windows/display_server_windows.h')
-rw-r--r-- | platform/windows/display_server_windows.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index fc89517774..0429bed3a0 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -82,10 +82,13 @@ #define DVC_ROTATION 18 #define CXO_MESSAGES 0x0004 +#define PK_STATUS 0x0002 #define PK_NORMAL_PRESSURE 0x0400 #define PK_TANGENT_PRESSURE 0x0800 #define PK_ORIENTATION 0x1000 +#define TPS_INVERT 0x0010 /* 1.1 */ + typedef struct tagLOGCONTEXTW { WCHAR lcName[40]; UINT lcOptions; @@ -137,6 +140,7 @@ typedef struct tagORIENTATION { } ORIENTATION; typedef struct tagPACKET { + int pkStatus; int pkNormalPressure; int pkTangentPressure; ORIENTATION pkOrientation; @@ -158,6 +162,14 @@ typedef UINT32 POINTER_FLAGS; typedef UINT32 PEN_FLAGS; typedef UINT32 PEN_MASK; +#ifndef PEN_FLAG_INVERTED +#define PEN_FLAG_INVERTED 0x00000002 +#endif + +#ifndef PEN_FLAG_ERASER +#define PEN_FLAG_ERASER 0x00000004 +#endif + #ifndef PEN_MASK_PRESSURE #define PEN_MASK_PRESSURE 0x00000001 #endif @@ -357,11 +369,13 @@ class DisplayServerWindows : public DisplayServer { int min_pressure; int max_pressure; bool tilt_supported; + bool pen_inverted = false; bool block_mm = false; int last_pressure_update; float last_pressure; Vector2 last_tilt; + bool last_pen_inverted = false; HBITMAP hBitmap; //DIB section for layered window uint8_t *dib_data = nullptr; |