summaryrefslogtreecommitdiff
path: root/gtk/gtkgestureprivate.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-05-05 22:40:18 -0400
committerCarlos Garnacho <carlosg@gnome.org>2014-05-23 19:54:28 +0200
commit42df9eda2d469eddc8f576aa09f80cdcc72a883a (patch)
treec735343525306ef812f619d32f882f2cfcbf9944 /gtk/gtkgestureprivate.h
parent93b7883372d588362aa93e308298cdcdbf2dc658 (diff)
downloadgtk+-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.h36
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