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 m_enabled =
false;
200 bool m_focused =
false;
221 bool m_coordTrusted =
false;
223 Coord m_tabletCoord = {};
225 Coord m_systemCoord = {};
227 int m_maxPressure = 0;
228 int m_maxAzimuth = 0;
229 int m_maxAltitude = 0;
232 UINT m_numDevices = 0;
234 std::vector<PACKET> m_pkts;
259 GHOST_TButton mapWintabToGhostButton(UINT cursor, WORD physicalButton);
265 static void modifyContext(LOGCONTEXT &lc);
273 static void extractCoordinates(LOGCONTEXT &lc, Coord &tablet, Coord &system);
276 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