Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowWin32.cpp
| Show First 20 Lines • Show All 349 Lines • ▼ Show 20 Lines | if (m_wintab.open && m_wintab.info && m_wintab.info(WTI_DEFSYSCTX, 0, &lc)) { | ||||
| } | } | ||||
| } | } | ||||
| // The Wintab spec says we must open the context disabled if we are using cursor masks. | // The Wintab spec says we must open the context disabled if we are using cursor masks. | ||||
| m_wintab.tablet = m_wintab.open(m_hWnd, &lc, FALSE); | m_wintab.tablet = m_wintab.open(m_hWnd, &lc, FALSE); | ||||
| if (m_wintab.enable && m_wintab.tablet) { | if (m_wintab.enable && m_wintab.tablet) { | ||||
| m_wintab.enable(m_wintab.tablet, TRUE); | m_wintab.enable(m_wintab.tablet, TRUE); | ||||
| } | } | ||||
| m_wintab.info(WTI_INTERFACE, IFC_NDEVICES, &m_wintab.numDevices); | |||||
| } | } | ||||
| } | } | ||||
| CoCreateInstance( | CoCreateInstance( | ||||
| CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (LPVOID *)&m_Bar); | CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (LPVOID *)&m_Bar); | ||||
| } | } | ||||
| GHOST_WindowWin32::~GHOST_WindowWin32() | GHOST_WindowWin32::~GHOST_WindowWin32() | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 749 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| bool GHOST_WindowWin32::useTabletAPI(GHOST_TTabletAPI api) const | bool GHOST_WindowWin32::useTabletAPI(GHOST_TTabletAPI api) const | ||||
| { | { | ||||
| if (m_system->getTabletAPI() == api) { | if (m_system->getTabletAPI() == api) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| else if (m_system->getTabletAPI() == GHOST_kTabletAutomatic) { | else if (m_system->getTabletAPI() == GHOST_kTabletAutomatic) { | ||||
| if (m_wintab.numDevices) | if (m_wintab.tablet) | ||||
| return api == GHOST_kTabletWintab; | return api == GHOST_kTabletWintab; | ||||
| else | else | ||||
| return api == GHOST_kTabletNative; | return api == GHOST_kTabletNative; | ||||
| } | } | ||||
| else { | else { | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| Show All 25 Lines | if (tiltSupport) { | ||||
| m_wintab.maxAzimuth = m_wintab.maxAltitude = 0; | m_wintab.maxAzimuth = m_wintab.maxAltitude = 0; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| m_tabletData.Active = GHOST_kTabletModeNone; | m_tabletData.Active = GHOST_kTabletModeNone; | ||||
| } | } | ||||
| void GHOST_WindowWin32::processWintabInfoChangeEvent(LPARAM lParam) | |||||
| { | |||||
| /* Update number of connected Wintab digitizers */ | |||||
| if (LOWORD(lParam) == WTI_INTERFACE && HIWORD(lParam) == IFC_NDEVICES) { | |||||
| m_wintab.info(WTI_INTERFACE, IFC_NDEVICES, &m_wintab.numDevices); | |||||
| } | |||||
| } | |||||
| void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam) | void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam) | ||||
| { | { | ||||
| if (!useTabletAPI(GHOST_kTabletWintab)) { | if (!useTabletAPI(GHOST_kTabletWintab)) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (m_wintab.packet && m_wintab.tablet) { | if (m_wintab.packet && m_wintab.tablet) { | ||||
| PACKET pkt; | PACKET pkt; | ||||
| ▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines | |||||