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);
200 bool enabled_ =
false;
202 bool focused_ =
false;
223 bool coord_trusted_ =
false;
225 Coord tablet_coord_ = {};
227 Coord system_coord_ = {};
229 int max_pressure_ = 0;
230 int max_azimuth_ = 0;
231 int max_altitude_ = 0;
234 UINT num_devices_ = 0;
236 std::vector<PACKET> pkts_;
261 GHOST_TButton mapWintabToGhostButton(UINT cursor, WORD physicalButton);
267 static GHOST_Wintab *loadWintabUnsafe(HWND hwnd);
273 static void modifyContext(LOGCONTEXT &lc);
281 static void extractCoordinates(LOGCONTEXT &lc, Coord &tablet, Coord &system);
284 void printContextDebugInfo();
BOOL(API *) GHOST_WIN32_WTOverlap(HCTX, BOOL)
BOOL(API *) GHOST_WIN32_WTGet(HCTX, LPLOGCONTEXTA)
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_WTQueueSizeSet(HCTX, int)
std::unique_ptr< std::remove_pointer_t< HMODULE >, decltype(&::FreeLibrary)> unique_hmodule
int(API *) GHOST_WIN32_WTPacketsGet(HCTX, int, LPVOID)
BOOL(API *) GHOST_WIN32_WTEnable(HCTX, BOOL)
int(API *) GHOST_WIN32_WTQueueSizeGet(HCTX)
BOOL(API *) GHOST_WIN32_WTSet(HCTX, LPLOGCONTEXTA)
UINT(API *) GHOST_WIN32_WTInfo(UINT, UINT, LPVOID)
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