@@ -457,6 +457,11 @@ clutter_event_get_position (const ClutterEvent *event,
457457 graphene_point_init (position , event -> touchpad_swipe .x ,
458458 event -> touchpad_swipe .y );
459459 break ;
460+
461+ case CLUTTER_TOUCHPAD_HOLD :
462+ graphene_point_init (position , event -> touchpad_hold .x ,
463+ event -> touchpad_hold .y );
464+ break ;
460465 }
461466
462467}
@@ -540,6 +545,11 @@ clutter_event_set_coords (ClutterEvent *event,
540545 event -> touchpad_swipe .x = x ;
541546 event -> touchpad_swipe .y = y ;
542547 break ;
548+
549+ case CLUTTER_TOUCHPAD_HOLD :
550+ event -> touchpad_hold .x = x ;
551+ event -> touchpad_hold .y = y ;
552+ break ;
543553 }
544554}
545555
@@ -1154,6 +1164,7 @@ clutter_event_set_device (ClutterEvent *event,
11541164
11551165 case CLUTTER_TOUCHPAD_PINCH :
11561166 case CLUTTER_TOUCHPAD_SWIPE :
1167+ case CLUTTER_TOUCHPAD_HOLD :
11571168 /* Rely on priv data for these */
11581169 break ;
11591170
@@ -1259,6 +1270,7 @@ clutter_event_get_device (const ClutterEvent *event)
12591270
12601271 case CLUTTER_TOUCHPAD_PINCH :
12611272 case CLUTTER_TOUCHPAD_SWIPE :
1273+ case CLUTTER_TOUCHPAD_HOLD :
12621274 /* Rely on priv data for these */
12631275 break ;
12641276
@@ -1814,6 +1826,7 @@ clutter_event_get_axes (const ClutterEvent *event,
18141826
18151827 case CLUTTER_TOUCHPAD_PINCH :
18161828 case CLUTTER_TOUCHPAD_SWIPE :
1829+ case CLUTTER_TOUCHPAD_HOLD :
18171830 case CLUTTER_PAD_BUTTON_PRESS :
18181831 case CLUTTER_PAD_BUTTON_RELEASE :
18191832 case CLUTTER_PAD_STRIP :
@@ -2073,12 +2086,15 @@ clutter_event_get_touchpad_gesture_finger_count (const ClutterEvent *event)
20732086{
20742087 g_return_val_if_fail (event != NULL , 0 );
20752088 g_return_val_if_fail (event -> type == CLUTTER_TOUCHPAD_SWIPE ||
2076- event -> type == CLUTTER_TOUCHPAD_PINCH , 0 );
2089+ event -> type == CLUTTER_TOUCHPAD_PINCH ||
2090+ event -> type == CLUTTER_TOUCHPAD_HOLD , 0 );
20772091
20782092 if (event -> type == CLUTTER_TOUCHPAD_SWIPE )
20792093 return event -> touchpad_swipe .n_fingers ;
20802094 else if (event -> type == CLUTTER_TOUCHPAD_PINCH )
20812095 return event -> touchpad_pinch .n_fingers ;
2096+ else if (event -> type == CLUTTER_TOUCHPAD_HOLD )
2097+ return event -> touchpad_hold .n_fingers ;
20822098
20832099 return 0 ;
20842100}
@@ -2137,12 +2153,15 @@ clutter_event_get_gesture_phase (const ClutterEvent *event)
21372153{
21382154 g_return_val_if_fail (event != NULL , 0 );
21392155 g_return_val_if_fail (event -> type == CLUTTER_TOUCHPAD_PINCH ||
2140- event -> type == CLUTTER_TOUCHPAD_SWIPE , 0 );
2156+ event -> type == CLUTTER_TOUCHPAD_SWIPE ||
2157+ event -> type == CLUTTER_TOUCHPAD_HOLD , 0 );
21412158
21422159 if (event -> type == CLUTTER_TOUCHPAD_PINCH )
21432160 return event -> touchpad_pinch .phase ;
21442161 else if (event -> type == CLUTTER_TOUCHPAD_SWIPE )
21452162 return event -> touchpad_swipe .phase ;
2163+ else if (event -> type == CLUTTER_TOUCHPAD_HOLD )
2164+ return event -> touchpad_hold .phase ;
21462165
21472166 /* Shouldn't ever happen */
21482167 return CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN ;
@@ -2168,7 +2187,8 @@ clutter_event_get_gesture_motion_delta (const ClutterEvent *event,
21682187{
21692188 g_return_if_fail (event != NULL );
21702189 g_return_if_fail (event -> type == CLUTTER_TOUCHPAD_PINCH ||
2171- event -> type == CLUTTER_TOUCHPAD_SWIPE );
2190+ event -> type == CLUTTER_TOUCHPAD_SWIPE ||
2191+ event -> type == CLUTTER_TOUCHPAD_HOLD );
21722192
21732193 if (event -> type == CLUTTER_TOUCHPAD_PINCH )
21742194 {
@@ -2184,6 +2204,13 @@ clutter_event_get_gesture_motion_delta (const ClutterEvent *event,
21842204 if (dy )
21852205 * dy = event -> touchpad_swipe .dy ;
21862206 }
2207+ else if (event -> type == CLUTTER_TOUCHPAD_HOLD )
2208+ {
2209+ if (dx )
2210+ * dx = 0 ;
2211+ if (dy )
2212+ * dy = 0 ;
2213+ }
21872214}
21882215
21892216/**
0 commit comments