[gtk+/gestures: 125/140] Prevent subclassing of gestures



commit 448beaf3d88d55f7fb973934eb376ef09cc85b56
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 5 22:40:18 2014 -0400

    Prevent subclassing of gestures
    
    For now, at least. We do this by hiding the instance and
    class structures in private headers.

 gtk/Makefile.am                   |    8 ++++++
 gtk/gtkeventcontroller.c          |    3 +-
 gtk/gtkeventcontroller.h          |   16 ------------
 gtk/gtkeventcontrollerprivate.h   |   42 +++++++++++++++++++++++++++++++++
 gtk/gtkgesture.c                  |    3 +-
 gtk/gtkgesture.h                  |   29 ----------------------
 gtk/gtkgesturedrag.c              |    3 +-
 gtk/gtkgesturedrag.h              |   22 -----------------
 gtk/gtkgesturedragprivate.h       |   47 +++++++++++++++++++++++++++++++++++++
 gtk/gtkgesturelongpress.c         |    5 ++-
 gtk/gtkgesturelongpress.h         |   18 --------------
 gtk/gtkgesturelongpressprivate.h  |   44 ++++++++++++++++++++++++++++++++++
 gtk/gtkgesturemultipress.c        |    1 +
 gtk/gtkgesturemultipress.h        |   19 ---------------
 gtk/gtkgesturemultipressprivate.h |   44 ++++++++++++++++++++++++++++++++++
 gtk/gtkgesturepan.c               |    3 +-
 gtk/gtkgesturepan.h               |   17 -------------
 gtk/gtkgesturepanprivate.h        |   42 +++++++++++++++++++++++++++++++++
 gtk/gtkgestureprivate.h           |   36 ++++++++++++++++++++++++++--
 gtk/gtkgesturerotate.c            |    3 +-
 gtk/gtkgesturerotate.h            |   16 ------------
 gtk/gtkgesturerotateprivate.h     |   42 +++++++++++++++++++++++++++++++++
 gtk/gtkgesturesingle.c            |    3 +-
 gtk/gtkgesturesingle.h            |   13 ----------
 gtk/gtkgesturesingleprivate.h     |   40 +++++++++++++++++++++++++++++++
 gtk/gtkgestureswipe.c             |    3 +-
 gtk/gtkgestureswipe.h             |   17 -------------
 gtk/gtkgestureswipeprivate.h      |   43 +++++++++++++++++++++++++++++++++
 gtk/gtkgesturezoom.c              |    3 +-
 gtk/gtkgesturezoom.h              |   15 -----------
 gtk/gtkgesturezoomprivate.h       |   41 ++++++++++++++++++++++++++++++++
 31 files changed, 446 insertions(+), 195 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index d58c79a..1af3a86 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -497,6 +497,7 @@ gtk_private_h_sources =             \
        gtkcustompaperunixdialog.h \
        gtkdialogprivate.h      \
        gtkentryprivate.h       \
+       gtkeventcontrollerprivate.h     \
        gtkfilechooserembed.h   \
        gtkfilechooserentry.h   \
        gtkfilechooserprivate.h \
@@ -506,6 +507,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 49ea0a3..a3dd649 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 bbefe1b..db1fa57 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 0000000..0fa3c55
--- /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 8a18efc..e1f03d8 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 762dde7..a478a45 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 82a79ff..dbcd9c3 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 c2f76e6..be308eb 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 0000000..63edc7e
--- /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 496807e..38e83bd 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 d27f660..6cdc755 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 0000000..5b9aa88
--- /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 cd2064a..0de8c99 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 3a5319b..b1cc021 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 0000000..58d400d
--- /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 19d4f25..a4e7917 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 fdbde4e..6cd3856 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 0000000..7090caa
--- /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 ae4a9c4..fb3ae7d 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 53d0923..9521298 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 fc61470..803355d 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 0000000..12c9870
--- /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 c443a34..3e8b9c3 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 a8a5a51..fb4bce9 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 0000000..34b905f
--- /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 ea0b247..c322566 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 fec6132..433fde8 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 0000000..660ee3a
--- /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 6899b85..a300366 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 16a03b0..5ab2f4f 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 0000000..9935c09
--- /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__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]