summaryrefslogtreecommitdiff
path: root/gtk
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
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')
-rw-r--r--gtk/Makefile.am8
-rw-r--r--gtk/gtkeventcontroller.c3
-rw-r--r--gtk/gtkeventcontroller.h16
-rw-r--r--gtk/gtkeventcontrollerprivate.h42
-rw-r--r--gtk/gtkgesture.c3
-rw-r--r--gtk/gtkgesture.h29
-rw-r--r--gtk/gtkgesturedrag.c3
-rw-r--r--gtk/gtkgesturedrag.h22
-rw-r--r--gtk/gtkgesturedragprivate.h47
-rw-r--r--gtk/gtkgesturelongpress.c5
-rw-r--r--gtk/gtkgesturelongpress.h18
-rw-r--r--gtk/gtkgesturelongpressprivate.h44
-rw-r--r--gtk/gtkgesturemultipress.c1
-rw-r--r--gtk/gtkgesturemultipress.h19
-rw-r--r--gtk/gtkgesturemultipressprivate.h44
-rw-r--r--gtk/gtkgesturepan.c3
-rw-r--r--gtk/gtkgesturepan.h17
-rw-r--r--gtk/gtkgesturepanprivate.h42
-rw-r--r--gtk/gtkgestureprivate.h36
-rw-r--r--gtk/gtkgesturerotate.c3
-rw-r--r--gtk/gtkgesturerotate.h16
-rw-r--r--gtk/gtkgesturerotateprivate.h42
-rw-r--r--gtk/gtkgesturesingle.c3
-rw-r--r--gtk/gtkgesturesingle.h13
-rw-r--r--gtk/gtkgesturesingleprivate.h40
-rw-r--r--gtk/gtkgestureswipe.c3
-rw-r--r--gtk/gtkgestureswipe.h17
-rw-r--r--gtk/gtkgestureswipeprivate.h43
-rw-r--r--gtk/gtkgesturezoom.c3
-rw-r--r--gtk/gtkgesturezoom.h15
-rw-r--r--gtk/gtkgesturezoomprivate.h41
31 files changed, 446 insertions, 195 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 4fcd4ae771..7c3512757f 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -503,6 +503,7 @@ gtk_private_h_sources = \
gtkcustompaperunixdialog.h \
gtkdialogprivate.h \
gtkentryprivate.h \
+ gtkeventcontrollerprivate.h \
gtkfilechooserembed.h \
gtkfilechooserentry.h \
gtkfilechooserprivate.h \
@@ -512,6 +513,13 @@ gtk_private_h_sources = \
gtkfontchooserprivate.h \
gtkfontchooserutils.h \
gtkgestureprivate.h \
+ gtkgesturedragprivate.h \
+ gtkgesturelongpressprivate.h \
+ gtkgesturemultipressprivate.h \
+ gtkgesturepanprivate.h \
+ gtkgesturerotateprivate.h \
+ gtkgestureswipeprivate.h \
+ gtkgesturezoomprivate.h \
gtkheaderbarprivate.h \
gtkhslaprivate.h \
gtkiconcache.h \
diff --git a/gtk/gtkeventcontroller.c b/gtk/gtkeventcontroller.c
index 49ea0a3d33..a3dd64967b 100644
--- a/gtk/gtkeventcontroller.c
+++ b/gtk/gtkeventcontroller.c
@@ -39,7 +39,8 @@
*/
#include "config.h"
-#include <gtk/gtkeventcontroller.h>
+#include "gtkeventcontroller.h"
+#include "gtkeventcontrollerprivate.h"
#include "gtktypebuiltins.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
diff --git a/gtk/gtkeventcontroller.h b/gtk/gtkeventcontroller.h
index bbefe1ba83..db1fa57ca5 100644
--- a/gtk/gtkeventcontroller.h
+++ b/gtk/gtkeventcontroller.h
@@ -40,22 +40,6 @@ G_BEGIN_DECLS
#define GTK_IS_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_EVENT_CONTROLLER))
#define GTK_EVENT_CONTROLLER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_EVENT_CONTROLLER, GtkEventControllerClass))
-struct _GtkEventController
-{
- GObject parent_instance;
-};
-
-struct _GtkEventControllerClass
-{
- GObjectClass parent_class;
-
- gboolean (* handle_event) (GtkEventController *controller,
- const GdkEvent *event);
- void (* reset) (GtkEventController *controller);
-
- /*<private>*/
- gpointer padding[10];
-};
GDK_AVAILABLE_IN_3_14
GType gtk_event_controller_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkeventcontrollerprivate.h b/gtk/gtkeventcontrollerprivate.h
new file mode 100644
index 0000000000..0fa3c55027
--- /dev/null
+++ b/gtk/gtkeventcontrollerprivate.h
@@ -0,0 +1,42 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_EVENT_CONTROLLER_PRIVATE_H__
+#define __GTK_EVENT_CONTROLLER_PRIVATE_H__
+
+#include "gtkeventcontroller.h"
+
+struct _GtkEventController
+{
+ GObject parent_instance;
+};
+
+struct _GtkEventControllerClass
+{
+ GObjectClass parent_class;
+
+ gboolean (* handle_event) (GtkEventController *controller,
+ const GdkEvent *event);
+ void (* reset) (GtkEventController *controller);
+
+ /*<private>*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_EVENT_CONTROLLER_PRIVATE_H__ */
diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c
index 8a18efc533..e1f03d8dd9 100644
--- a/gtk/gtkgesture.c
+++ b/gtk/gtkgesture.c
@@ -87,7 +87,8 @@
*/
#include "config.h"
-#include <gtk/gtkgesture.h>
+#include "gtkgesture.h"
+#include "gtkgestureprivate.h"
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
#include "gtkmain.h"
diff --git a/gtk/gtkgesture.h b/gtk/gtkgesture.h
index 762dde7ddb..a478a45826 100644
--- a/gtk/gtkgesture.h
+++ b/gtk/gtkgesture.h
@@ -39,35 +39,6 @@ G_BEGIN_DECLS
typedef struct _GtkGesture GtkGesture;
typedef struct _GtkGestureClass GtkGestureClass;
-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];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturedrag.c b/gtk/gtkgesturedrag.c
index 82a79ff6a0..dbcd9c3d31 100644
--- a/gtk/gtkgesturedrag.c
+++ b/gtk/gtkgesturedrag.c
@@ -31,7 +31,8 @@
* gtk_gesture_drag_get_start_point().
*/
#include "config.h"
-#include <gtk/gtkgesturedrag.h>
+#include "gtkgesturedrag.h"
+#include "gtkgesturedragprivate.h"
typedef struct _GtkGestureDragPrivate GtkGestureDragPrivate;
typedef struct _EventData EventData;
diff --git a/gtk/gtkgesturedrag.h b/gtk/gtkgesturedrag.h
index c2f76e6aaf..be308eb631 100644
--- a/gtk/gtkgesturedrag.h
+++ b/gtk/gtkgesturedrag.h
@@ -38,28 +38,6 @@ G_BEGIN_DECLS
typedef struct _GtkGestureDrag GtkGestureDrag;
typedef struct _GtkGestureDragClass GtkGestureDragClass;
-struct _GtkGestureDrag
-{
- GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureDragClass
-{
- GtkGestureSingleClass parent_class;
-
- void (* drag_begin) (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y);
- void (* drag_update) (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y);
- void (* drag_end) (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y);
- /*<private>*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_drag_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturedragprivate.h b/gtk/gtkgesturedragprivate.h
new file mode 100644
index 0000000000..63edc7e265
--- /dev/null
+++ b/gtk/gtkgesturedragprivate.h
@@ -0,0 +1,47 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_DRAG_PRIVATE_H__
+#define __GTK_GESTURE_DRAG_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgesturedrag.h"
+
+struct _GtkGestureDrag
+{
+ GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureDragClass
+{
+ GtkGestureSingleClass parent_class;
+
+ void (* drag_begin) (GtkGestureDrag *gesture,
+ gdouble start_x,
+ gdouble start_y);
+ void (* drag_update) (GtkGestureDrag *gesture,
+ gdouble offset_x,
+ gdouble offset_y);
+ void (* drag_end) (GtkGestureDrag *gesture,
+ gdouble offset_x,
+ gdouble offset_y);
+ /*<private>*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_DRAG_PRIVATE_H__ */
diff --git a/gtk/gtkgesturelongpress.c b/gtk/gtkgesturelongpress.c
index 496807e788..38e83bd428 100644
--- a/gtk/gtkgesturelongpress.c
+++ b/gtk/gtkgesturelongpress.c
@@ -33,9 +33,10 @@
*/
#include "config.h"
-#include <gtk/gtk.h>
-#include <gtk/gtkgesturelongpress.h>
+#include "gtkgesturelongpress.h"
+#include "gtkgesturelongpressprivate.h"
#include "gtkmarshalers.h"
+#include "gtkdnd.h"
#include "gtkprivate.h"
#include "gtkintl.h"
diff --git a/gtk/gtkgesturelongpress.h b/gtk/gtkgesturelongpress.h
index d27f660fbc..6cdc755b22 100644
--- a/gtk/gtkgesturelongpress.h
+++ b/gtk/gtkgesturelongpress.h
@@ -38,24 +38,6 @@ G_BEGIN_DECLS
typedef struct _GtkGestureLongPress GtkGestureLongPress;
typedef struct _GtkGestureLongPressClass GtkGestureLongPressClass;
-struct _GtkGestureLongPress
-{
- GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureLongPressClass
-{
- GtkGestureSingleClass parent_class;
-
- void (* pressed) (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y);
- void (* cancelled) (GtkGestureLongPress *gesture);
-
- /*< private >*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_long_press_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturelongpressprivate.h b/gtk/gtkgesturelongpressprivate.h
new file mode 100644
index 0000000000..5b9aa88f4c
--- /dev/null
+++ b/gtk/gtkgesturelongpressprivate.h
@@ -0,0 +1,44 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_LONG_PRESS_PRIVATE_H__
+#define __GTK_GESTURE_LONG_PRESS_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgesturelongpress.h"
+
+struct _GtkGestureLongPress
+{
+ GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureLongPressClass
+{
+ GtkGestureSingleClass parent_class;
+
+ void (* pressed) (GtkGestureLongPress *gesture,
+ gdouble x,
+ gdouble y);
+ void (* cancelled) (GtkGestureLongPress *gesture);
+
+ /*< private >*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_LONG_PRESS_PRIVATE_H__ */
diff --git a/gtk/gtkgesturemultipress.c b/gtk/gtkgesturemultipress.c
index cd2064abb5..0de8c999ab 100644
--- a/gtk/gtkgesturemultipress.c
+++ b/gtk/gtkgesturemultipress.c
@@ -36,6 +36,7 @@
#include "config.h"
#include "gtkgesturemultipress.h"
+#include "gtkgesturemultipressprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"
diff --git a/gtk/gtkgesturemultipress.h b/gtk/gtkgesturemultipress.h
index 3a5319ba62..b1cc021970 100644
--- a/gtk/gtkgesturemultipress.h
+++ b/gtk/gtkgesturemultipress.h
@@ -38,25 +38,6 @@ G_BEGIN_DECLS
typedef struct _GtkGestureMultiPress GtkGestureMultiPress;
typedef struct _GtkGestureMultiPressClass GtkGestureMultiPressClass;
-struct _GtkGestureMultiPress
-{
- GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureMultiPressClass
-{
- GtkGestureSingleClass parent_class;
-
- gboolean (* pressed) (GtkGestureMultiPress *gesture,
- gint n_press,
- gdouble x,
- gdouble y);
- void (* stopped) (GtkGestureMultiPress *gesture);
-
- /*<private>*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_multi_press_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturemultipressprivate.h b/gtk/gtkgesturemultipressprivate.h
new file mode 100644
index 0000000000..58d400d10d
--- /dev/null
+++ b/gtk/gtkgesturemultipressprivate.h
@@ -0,0 +1,44 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_MULTI_PRESS_PRIVATE_H__
+#define __GTK_GESTURE_MULTI_PRESS_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgesturemultipress.h"
+
+struct _GtkGestureMultiPress
+{
+ GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureMultiPressClass
+{
+ GtkGestureSingleClass parent_class;
+
+ gboolean (* pressed) (GtkGestureMultiPress *gesture,
+ gint n_press,
+ gdouble x,
+ gdouble y);
+ void (* stopped) (GtkGestureMultiPress *gesture);
+
+ /*<private>*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_MULTI_PRESS_PRIVATE_H__ */
diff --git a/gtk/gtkgesturepan.c b/gtk/gtkgesturepan.c
index 19d4f25bb6..a4e79176b1 100644
--- a/gtk/gtkgesturepan.c
+++ b/gtk/gtkgesturepan.c
@@ -39,7 +39,8 @@
*/
#include "config.h"
-#include <gtk/gtkgesturepan.h>
+#include "gtkgesturepan.h"
+#include "gtkgesturepanprivate.h"
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
#include "gtkintl.h"
diff --git a/gtk/gtkgesturepan.h b/gtk/gtkgesturepan.h
index fdbde4e250..6cd385617c 100644
--- a/gtk/gtkgesturepan.h
+++ b/gtk/gtkgesturepan.h
@@ -38,23 +38,6 @@ G_BEGIN_DECLS
typedef struct _GtkGesturePan GtkGesturePan;
typedef struct _GtkGesturePanClass GtkGesturePanClass;
-struct _GtkGesturePan
-{
- GtkGestureDrag parent_instance;
-};
-
-struct _GtkGesturePanClass
-{
- GtkGestureDragClass parent_class;
-
- void (* pan) (GtkGesturePan *gesture,
- GtkPanDirection direction,
- gdouble offset);
-
- /*< private >*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_pan_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturepanprivate.h b/gtk/gtkgesturepanprivate.h
new file mode 100644
index 0000000000..7090caa4f2
--- /dev/null
+++ b/gtk/gtkgesturepanprivate.h
@@ -0,0 +1,42 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_PAN_PRIVATE_H__
+#define __GTK_GESTURE_PAN_PRIVATE_H__
+
+#include "gtkgesturedragprivate.h"
+#include "gtkgesturepan.h"
+
+struct _GtkGesturePan
+{
+ GtkGestureDrag parent_instance;
+};
+
+struct _GtkGesturePanClass
+{
+ GtkGestureDragClass parent_class;
+
+ void (* pan) (GtkGesturePan *gesture,
+ GtkPanDirection direction,
+ gdouble offset);
+
+ /*< private >*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_PAN_PRIVATE_H__ */
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
diff --git a/gtk/gtkgesturerotate.c b/gtk/gtkgesturerotate.c
index 53d0923d07..952129878f 100644
--- a/gtk/gtkgesturerotate.c
+++ b/gtk/gtkgesturerotate.c
@@ -31,7 +31,8 @@
#include "config.h"
#include <math.h>
-#include <gtk/gtkgesturerotate.h>
+#include "gtkgesturerotate.h"
+#include "gtkgesturerotateprivate.h"
#include "gtkmarshalers.h"
typedef struct _GtkGestureRotatePrivate GtkGestureRotatePrivate;
diff --git a/gtk/gtkgesturerotate.h b/gtk/gtkgesturerotate.h
index fc61470efc..803355d053 100644
--- a/gtk/gtkgesturerotate.h
+++ b/gtk/gtkgesturerotate.h
@@ -39,22 +39,6 @@ G_BEGIN_DECLS
typedef struct _GtkGestureRotate GtkGestureRotate;
typedef struct _GtkGestureRotateClass GtkGestureRotateClass;
-struct _GtkGestureRotate
-{
- GtkGesture parent_instance;
-};
-
-struct _GtkGestureRotateClass
-{
- GtkGestureClass parent_class;
-
- void (* angle_changed) (GtkGestureRotate *gesture,
- gdouble angle,
- gdouble delta);
- /*< private >*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_rotate_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturerotateprivate.h b/gtk/gtkgesturerotateprivate.h
new file mode 100644
index 0000000000..12c98705ad
--- /dev/null
+++ b/gtk/gtkgesturerotateprivate.h
@@ -0,0 +1,42 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_ROTATE_PRIVATE_H__
+#define __GTK_GESTURE_ROTATE_PRIVATE_H__
+
+#include "gtkgestureprivate.h"
+#include "gtkgesturerotate.h"
+
+struct _GtkGestureRotate
+{
+ GtkGesture parent_instance;
+};
+
+struct _GtkGestureRotateClass
+{
+ GtkGestureClass parent_class;
+
+ void (* angle_changed) (GtkGestureRotate *gesture,
+ gdouble angle,
+ gdouble delta);
+ /*< private >*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_ROTATE_PRIVATE_H__ */
diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c
index c443a34d56..3e8b9c3ec6 100644
--- a/gtk/gtkgesturesingle.c
+++ b/gtk/gtkgesturesingle.c
@@ -35,7 +35,8 @@
*/
#include "config.h"
-#include <gtk/gtkgesturesingle.h>
+#include "gtkgesturesingle.h"
+#include "gtkgesturesingleprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"
diff --git a/gtk/gtkgesturesingle.h b/gtk/gtkgesturesingle.h
index a8a5a51d44..fb4bce9cd5 100644
--- a/gtk/gtkgesturesingle.h
+++ b/gtk/gtkgesturesingle.h
@@ -39,19 +39,6 @@ G_BEGIN_DECLS
typedef struct _GtkGestureSingle GtkGestureSingle;
typedef struct _GtkGestureSingleClass GtkGestureSingleClass;
-struct _GtkGestureSingle
-{
- GtkGesture parent_instance;
-};
-
-struct _GtkGestureSingleClass
-{
- GtkGestureClass parent_class;
-
- /*< private >*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_single_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturesingleprivate.h b/gtk/gtkgesturesingleprivate.h
new file mode 100644
index 0000000000..34b905ff12
--- /dev/null
+++ b/gtk/gtkgesturesingleprivate.h
@@ -0,0 +1,40 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+
+#ifndef __GTK_GESTURE_SINGLE_PRIVATE_H__
+#define __GTK_GESTURE_SINGLE_PRIVATE_H__
+
+#include "gtkgestureprivate.h"
+#include "gtkgesturesingle.h"
+
+struct _GtkGestureSingle
+{
+ GtkGesture parent_instance;
+};
+
+struct _GtkGestureSingleClass
+{
+ GtkGestureClass parent_class;
+
+ /*< private >*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_SINGLE_PRIVATE_H__ */
diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c
index ea0b2478a8..c322566b59 100644
--- a/gtk/gtkgestureswipe.c
+++ b/gtk/gtkgestureswipe.c
@@ -36,7 +36,8 @@
*/
#include "config.h"
-#include <gtk/gtkgestureswipe.h>
+#include "gtkgestureswipe.h"
+#include "gtkgestureswipeprivate.h"
#include "gtkmarshalers.h"
#define CAPTURE_THRESHOLD_MS 150
diff --git a/gtk/gtkgestureswipe.h b/gtk/gtkgestureswipe.h
index fec6132c5f..433fde8906 100644
--- a/gtk/gtkgestureswipe.h
+++ b/gtk/gtkgestureswipe.h
@@ -39,23 +39,6 @@ G_BEGIN_DECLS
typedef struct _GtkGestureSwipe GtkGestureSwipe;
typedef struct _GtkGestureSwipeClass GtkGestureSwipeClass;
-struct _GtkGestureSwipe
-{
- GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureSwipeClass
-{
- GtkGestureSingleClass parent_class;
-
- void (* swipe) (GtkGestureSwipe *gesture,
- gdouble velocity_x,
- gdouble velocity_y);
-
- /*< private >*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_swipe_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgestureswipeprivate.h b/gtk/gtkgestureswipeprivate.h
new file mode 100644
index 0000000000..660ee3a3a0
--- /dev/null
+++ b/gtk/gtkgestureswipeprivate.h
@@ -0,0 +1,43 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_SWIPE_PRIVATE_H__
+#define __GTK_GESTURE_SWIPE_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgestureswipe.h"
+
+struct _GtkGestureSwipe
+{
+ GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureSwipeClass
+{
+ GtkGestureSingleClass parent_class;
+
+ void (* swipe) (GtkGestureSwipe *gesture,
+ gdouble velocity_x,
+ gdouble velocity_y);
+
+ /*< private >*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_SWIPE_PRIVATE_H__ */
diff --git a/gtk/gtkgesturezoom.c b/gtk/gtkgesturezoom.c
index 6899b85b43..a300366a36 100644
--- a/gtk/gtkgesturezoom.c
+++ b/gtk/gtkgesturezoom.c
@@ -32,7 +32,8 @@
#include "config.h"
#include <math.h>
-#include <gtk/gtkgesturezoom.h>
+#include "gtkgesturezoom.h"
+#include "gtkgesturezoomprivate.h"
typedef struct _GtkGestureZoomPrivate GtkGestureZoomPrivate;
diff --git a/gtk/gtkgesturezoom.h b/gtk/gtkgesturezoom.h
index 16a03b0370..5ab2f4fe4e 100644
--- a/gtk/gtkgesturezoom.h
+++ b/gtk/gtkgesturezoom.h
@@ -39,21 +39,6 @@ G_BEGIN_DECLS
typedef struct _GtkGestureZoom GtkGestureZoom;
typedef struct _GtkGestureZoomClass GtkGestureZoomClass;
-struct _GtkGestureZoom
-{
- GtkGesture parent_instance;
-};
-
-struct _GtkGestureZoomClass
-{
- GtkGestureClass parent_class;
-
- void (* scale_changed) (GtkGestureZoom *gesture,
- gdouble scale);
- /*< private >*/
- gpointer padding[10];
-};
-
GDK_AVAILABLE_IN_3_14
GType gtk_gesture_zoom_get_type (void) G_GNUC_CONST;
diff --git a/gtk/gtkgesturezoomprivate.h b/gtk/gtkgesturezoomprivate.h
new file mode 100644
index 0000000000..9935c097a7
--- /dev/null
+++ b/gtk/gtkgesturezoomprivate.h
@@ -0,0 +1,41 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_ZOOM_PRIVATE_H__
+#define __GTK_GESTURE_ZOOM_PRIVATE_H__
+
+#include "gtkgestureprivate.h"
+#include "gtkgesturezoom.h"
+
+struct _GtkGestureZoom
+{
+ GtkGesture parent_instance;
+};
+
+struct _GtkGestureZoomClass
+{
+ GtkGestureClass parent_class;
+
+ void (* scale_changed) (GtkGestureZoom *gesture,
+ gdouble scale);
+ /*< private >*/
+ gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_ZOOM_PRIVATE_H__ */