27 (PK_BUTTONS | PK_NORMAL_PRESSURE | PK_ORIENTATION | PK_CURSOR | PK_X | PK_Y | PK_TIME)
31#if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
32# define WINTAB_PRINTF(x, ...) \
34 if (GHOST_Wintab::getDebug()) { \
35 printf(x, __VA_ARGS__); \
40# define WINTAB_PRINTF(x, ...) \
42 if (GHOST_Wintab::getDebug()) { \
43 printf(x, ##__VA_ARGS__); \
62typedef std::unique_ptr<std::remove_pointer_t<HMODULE>,
decltype(&::FreeLibrary)>
unique_hmodule;
145 void getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo);
198 bool enabled_ =
false;
200 bool focused_ =
false;
221 bool coord_trusted_ =
false;
223 Coord tablet_coord_ = {};
225 Coord system_coord_ = {};
227 int max_pressure_ = 0;
228 int max_azimuth_ = 0;
229 int max_altitude_ = 0;
232 UINT num_devices_ = 0;
234 std::vector<PACKET> pkts_;
259 GHOST_TButton mapWintabToGhostButton(UINT cursor, WORD physicalButton);
265 static GHOST_Wintab *loadWintabUnsafe(HWND hwnd);
271 static void modifyContext(LOGCONTEXT &lc);
279 static void extractCoordinates(LOGCONTEXT &lc, Coord &tablet, Coord &system);
282 void printContextDebugInfo();
static const GHOST_TabletData GHOST_TABLET_DATA_NONE
BOOL(API * GHOST_WIN32_WTOverlap)(HCTX, BOOL)
BOOL(API * GHOST_WIN32_WTEnable)(HCTX, BOOL)
std::unique_ptr< std::remove_pointer_t< HCTX >, GHOST_WIN32_WTClose > unique_hctx
HCTX(API * GHOST_WIN32_WTOpen)(HWND, LPLOGCONTEXTA, BOOL)
BOOL(API * GHOST_WIN32_WTClose)(HCTX)
BOOL(API * GHOST_WIN32_WTGet)(HCTX, LPLOGCONTEXTA)
std::unique_ptr< std::remove_pointer_t< HMODULE >, decltype(&::FreeLibrary)> unique_hmodule
BOOL(API * GHOST_WIN32_WTQueueSizeSet)(HCTX, int)
BOOL(API * GHOST_WIN32_WTSet)(HCTX, LPLOGCONTEXTA)
UINT(API * GHOST_WIN32_WTInfo)(UINT, UINT, LPVOID)
int(API * GHOST_WIN32_WTPacketsGet)(HCTX, int, LPVOID)
int(API * GHOST_WIN32_WTQueueSizeGet)(HCTX)
unsigned long long int uint64_t
void mapWintabToSysCoordinates(int x_in, int y_in, int &x_out, int &y_out)
GHOST_TabletData getLastTabletData()
void getInput(std::vector< GHOST_WintabInfoWin32 > &outWintabInfo)
void processInfoChange(LPARAM lParam)
static GHOST_Wintab * loadWintab(HWND hwnd)
bool testCoordinates(int sysX, int sysY, int wtX, int wtY)
static void setDebug(bool debug)
GHOST_TabletData tabletData