diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-05-05 22:40:18 -0400 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2014-05-23 19:54:28 +0200 |
commit | 42df9eda2d469eddc8f576aa09f80cdcc72a883a (patch) | |
tree | c735343525306ef812f619d32f882f2cfcbf9944 /gtk/gtkgestureprivate.h | |
parent | 93b7883372d588362aa93e308298cdcdbf2dc658 (diff) | |
download | gtk+-42df9eda2d469eddc8f576aa09f80cdcc72a883a.tar.gz |
Prevent subclassing of gestures
For now, at least. We do this by hiding the instance and
class structures in private headers.
Diffstat (limited to 'gtk/gtkgestureprivate.h')
-rw-r--r-- | gtk/gtkgestureprivate.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/gtk/gtkgestureprivate.h b/gtk/gtkgestureprivate.h index ae4a9c44e7..fb3ae7d037 100644 --- a/gtk/gtkgestureprivate.h +++ b/gtk/gtkgestureprivate.h @@ -16,20 +16,50 @@ * * Author(s): Carlos Garnacho <carlosg@gnome.org> */ - #ifndef __GTK_GESTURE_PRIVATE_H__ #define __GTK_GESTURE_PRIVATE_H__ +#include "gtkeventcontrollerprivate.h" #include "gtkgesture.h" +struct _GtkGesture +{ + GtkEventController parent_instance; +}; + +struct _GtkGestureClass +{ + GtkEventControllerClass parent_class; + + gboolean (* check) (GtkGesture *gesture); + + void (* begin) (GtkGesture *gesture, + GdkEventSequence *sequence); + void (* update) (GtkGesture *gesture, + GdkEventSequence *sequence); + void (* end) (GtkGesture *gesture, + GdkEventSequence *sequence); + + void (* cancel) (GtkGesture *gesture, + GdkEventSequence *sequence); + + void (* sequence_state_changed) (GtkGesture *gesture, + GdkEventSequence *sequence, + GtkEventSequenceState state); + + /*< private >*/ + gpointer padding[10]; +}; + + G_BEGIN_DECLS gboolean _gtk_gesture_handled_sequence_press (GtkGesture *gesture, GdkEventSequence *sequence); gboolean _gtk_gesture_get_pointer_emulating_sequence - (GtkGesture *gesture, - GdkEventSequence **sequence); + (GtkGesture *gesture, + GdkEventSequence **sequence); G_END_DECLS |