< prev index next >

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

Print this page

        

@@ -65,11 +65,14 @@
 
 // combination of standard mouse button flags
 const int ALL_MK_BUTTONS = MK_LBUTTON|MK_MBUTTON|MK_RBUTTON;
 const int X_BUTTONS = MK_XBUTTON1|MK_XBUTTON2;
 
-
+// The allowable difference between coordinates of the WM_TOUCH event and the
+// corresponding WM_LBUTTONDOWN/WM_LBUTTONUP event letting to associate these
+// events, when their coordinates are slightly different.
+const int TOUCH_MOUSE_COORDS_DELTA = 10;
 
 // Whether to check for embedded frame and adjust location
 #define CHECK_EMBEDDED 0
 #define DONT_CHECK_EMBEDDED 1
 

@@ -383,11 +386,11 @@
      * from the target.
      */
     void SendMouseEvent(jint id, jlong when, jint x, jint y,
                         jint modifiers, jint clickCount,
                         jboolean popupTrigger, jint button = 0,
-                        MSG *msg = NULL);
+                        MSG *msg = NULL, BOOL causedByTouchEvent = FALSE);
 
     /*
      * Allocate and initialize a new java.awt.event.MouseWheelEvent, and
      * post it to the peer's target object.  No response is expected
      * from the target.

@@ -526,10 +529,11 @@
                                     int wheelRotation, BOOL isHorizontal);
     virtual MsgRouting WmNcMouseDown(WPARAM hitTest, int x, int y, int button);
     virtual MsgRouting WmNcMouseUp(WPARAM hitTest, int x, int y, int button);
     virtual MsgRouting WmWindowPosChanging(LPARAM windowPos);
     virtual MsgRouting WmWindowPosChanged(LPARAM windowPos);
+    virtual void WmTouch(WPARAM wParam, LPARAM lParam);
 
     // NB: 64-bit: vkey is wParam of the message, but other API's take
     // vkey parameters of type UINT, so we do the cast before dispatching.
     virtual MsgRouting WmKeyDown(UINT vkey, UINT repCnt, UINT flags, BOOL system);
     virtual MsgRouting WmKeyUp(UINT vkey, UINT repCnt, UINT flags, BOOL system);

@@ -762,10 +766,15 @@
      * 1) button was initially PRESSED
      * 2) no movement or drag has happened until RELEASE
     */
     UINT m_mouseButtonClickAllowed;
 
+    BOOL m_touchDownOccurred;
+    BOOL m_touchUpOccurred;
+    POINT m_touchDownPoint;
+    POINT m_touchUpPoint;
+
     BOOL m_bSubclassed;
     BOOL m_bPauseDestroy;
 
     COLORREF m_colorForeground;
     COLORREF m_colorBackground;
< prev index next >