gesture: make gtk_gesture_cancel_sequence() private

This commit is contained in:
Carlos Garnacho 2014-05-06 18:10:32 +02:00
parent 0288fd0a88
commit 8ab35016a6
4 changed files with 7 additions and 21 deletions

View File

@ -539,7 +539,7 @@ gtk_gesture_handle_event (GtkEventController *controller,
g_signal_emit (gesture, signals[UPDATE], 0, sequence);
break;
case GDK_TOUCH_CANCEL:
gtk_gesture_cancel_sequence (gesture, sequence);
_gtk_gesture_cancel_sequence (gesture, sequence);
break;
default:
/* Unhandled event */
@ -1244,19 +1244,9 @@ gtk_gesture_handles_sequence (GtkGesture *gesture,
return TRUE;
}
/**
* gtk_gesture_cancel_sequence:
* @gesture: a #GtkGesture
* @sequence: a #GdkEventSequence
*
* Cancels @sequence on @gesture, this emits #GtkGesture::cancel
* and forgets the sequence altogether.
*
* Returns: #TRUE if the sequence was being handled by gesture
**/
gboolean
gtk_gesture_cancel_sequence (GtkGesture *gesture,
GdkEventSequence *sequence)
_gtk_gesture_cancel_sequence (GtkGesture *gesture,
GdkEventSequence *sequence)
{
GtkGesturePrivate *priv;
PointData *data;

View File

@ -67,9 +67,6 @@ GDK_AVAILABLE_IN_3_14
gboolean gtk_gesture_handles_sequence (GtkGesture *gesture,
GdkEventSequence *sequence);
GDK_AVAILABLE_IN_3_14
gboolean gtk_gesture_cancel_sequence (GtkGesture *gesture,
GdkEventSequence *sequence);
GDK_AVAILABLE_IN_3_14
const GdkEvent *
gtk_gesture_get_last_event (GtkGesture *gesture,
GdkEventSequence *sequence);
@ -97,9 +94,6 @@ gboolean gtk_gesture_is_active (GtkGesture *gesture);
GDK_AVAILABLE_IN_3_14
gboolean gtk_gesture_is_recognized (GtkGesture *gesture);
GDK_AVAILABLE_IN_3_14
gboolean gtk_gesture_check (GtkGesture *gesture);
GDK_AVAILABLE_IN_3_14
GdkWindow * gtk_gesture_get_window (GtkGesture *gesture);

View File

@ -63,6 +63,9 @@ gboolean _gtk_gesture_get_pointer_emulating_sequence
(GtkGesture *gesture,
GdkEventSequence **sequence);
gboolean _gtk_gesture_cancel_sequence (GtkGesture *gesture,
GdkEventSequence *sequence);
G_END_DECLS
#endif /* __GTK_GESTURE_PRIVATE_H__ */

View File

@ -4290,8 +4290,7 @@ _gtk_widget_cancel_sequence (GtkWidget *widget,
if (!gtk_gesture_handles_sequence (gesture, seq))
continue;
handled |=
gtk_gesture_cancel_sequence (gesture, seq);
handled |= _gtk_gesture_cancel_sequence (gesture, seq);
}
return handled;