< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Toolkit.h

Print this page

        

*** 156,165 **** --- 156,226 ---- J2dTraceLn4(J2D_TRACE_VERBOSE2, \ "CS.Left: tid, cs, file, line = 0x%x, 0x%x, %s, %d", \ GetCurrentThreadId(), &(cs), THIS_FILE, __LINE__); \ } + // Redefine WinAPI values related to touch input, if OS < Windows 7. + #if (!defined(WINVER) || ((WINVER) < 0x0601)) + typedef UINT32 POINTER_FLAGS; + typedef UINT32 TOUCH_FLAGS; + typedef UINT32 TOUCH_MASK; + + #define GET_POINTERID_WPARAM(wParam) (LOWORD (wParam)) + + #define WM_POINTERENTER 0x0249 + #define WM_NCPOINTERDOWN 0x0242 + #define WM_NCPOINTERUP 0x0243 + #define WM_NCPOINTERUPDATE 0x0241 + #define WM_POINTERACTIVATE 0x024B + #define WM_POINTERCAPTURECHANGED 0x024C + #define WM_POINTERDOWN 0x0246 + #define WM_POINTERLEAVE 0x024A + #define WM_POINTERUP 0x0247 + #define WM_POINTERUPDATE 0x0245 + + typedef enum _POINTER_BUTTON_CHANGE_TYPE { + POINTER_CHANGE_NONE , + POINTER_CHANGE_FIRSTBUTTON_DOWN , + POINTER_CHANGE_FIRSTBUTTON_UP , + POINTER_CHANGE_SECONDBUTTON_DOWN , + POINTER_CHANGE_SECONDBUTTON_UP , + POINTER_CHANGE_THIRDBUTTON_DOWN , + POINTER_CHANGE_THIRDBUTTON_UP , + POINTER_CHANGE_FOURTHBUTTON_DOWN , + POINTER_CHANGE_FOURTHBUTTON_UP , + POINTER_CHANGE_FIFTHBUTTON_DOWN , + POINTER_CHANGE_FIFTHBUTTON_UP , + } POINTER_BUTTON_CHANGE_TYPE; + + typedef enum tagPOINTER_INPUT_TYPE { + PT_POINTER = 0x00000001, + PT_TOUCH = 0x00000002, + PT_PEN = 0x00000003, + PT_MOUSE = 0x00000004, + PT_TOUCHPAD = 0x00000005 + } POINTER_INPUT_TYPE; + + typedef struct tagPOINTER_INFO { + POINTER_INPUT_TYPE pointerType; + UINT32 pointerId; + UINT32 frameId; + POINTER_FLAGS pointerFlags; + HANDLE sourceDevice; + HWND hwndTarget; + POINT ptPixelLocation; + POINT ptHimetricLocation; + POINT ptPixelLocationRaw; + POINT ptHimetricLocationRaw; + DWORD dwTime; + UINT32 historyCount; + INT32 inputData; + DWORD dwKeyStates; + UINT64 PerformanceCount; + POINTER_BUTTON_CHANGE_TYPE ButtonChangeType; + } POINTER_INFO; + #endif + /************************************************************************ * AwtToolkit class */ class AwtToolkit {
*** 194,203 **** --- 255,266 ---- BOOL IsDynamicLayoutActive(); BOOL areExtraMouseButtonsEnabled(); void setExtraMouseButtonsEnabled(BOOL enable); static UINT GetNumberOfButtons(); + BOOL TIGetPointerInfo(UINT32 pointerID, POINTER_INFO *pointerInfo); + INLINE BOOL localPump() { return m_localPump; } INLINE BOOL VerifyComponents() { return FALSE; } // TODO: Use new DebugHelper class to set this flag INLINE HWND GetHWnd() { return m_toolkitHWnd; } INLINE HMODULE GetModuleHandle() { return m_dllHandle; }
*** 400,409 **** --- 463,477 ---- BOOL m_verbose; BOOL m_isActive; // set to FALSE at beginning of Dispose BOOL m_isDisposed; // set to TRUE at end of Dispose BOOL m_areExtraMouseButtonsEnabled; + typedef BOOL (WINAPI *GetPointerInfoHandleFunc)(UINT32 pointerID, POINTER_INFO *pointerInfo); + + BOOL m_isWin8OrLater; + GetPointerInfoHandleFunc m_pGetPointerInfoHandle; + BOOL m_vmSignalled; // set to TRUE if QUERYENDSESSION has successfully // raised SIGTERM BOOL m_verifyComponents; BOOL m_breakOnError;
< prev index next >