[gtk] treeview: Make final



commit 79940b32b5bfdafb067970db919ec0823cf026bf
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue May 28 21:42:38 2019 -0400

    treeview: Make final
    
    Make GtkTreeSelection final as well.

 gtk/gtktreeselection.c | 17 ++++++++++++++
 gtk/gtktreeselection.h | 35 ----------------------------
 gtk/gtktreeview.c      | 49 +++++++++++++++++++++++++++++++++++++++
 gtk/gtktreeview.h      | 63 --------------------------------------------------
 4 files changed, 66 insertions(+), 98 deletions(-)
---
diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c
index 107a25aa94..2fa126e5e2 100644
--- a/gtk/gtktreeselection.c
+++ b/gtk/gtktreeselection.c
@@ -61,6 +61,23 @@
  * select_row on an already selected row).
  */
 
+typedef struct _GtkTreeSelectionPrivate GtkTreeSelectionPrivate;
+typedef struct _GtkTreeSelectionClass   GtkTreeSelectionClass;
+
+struct _GtkTreeSelection
+{
+  GObject parent;
+
+  GtkTreeSelectionPrivate *priv;
+};
+
+struct _GtkTreeSelectionClass
+{
+  GObjectClass parent_class;
+
+  void (* changed) (GtkTreeSelection *selection);
+};
+
 struct _GtkTreeSelectionPrivate
 {
   GtkTreeView *tree_view;
diff --git a/gtk/gtktreeselection.h b/gtk/gtktreeselection.h
index be1567f0df..efff9130ec 100644
--- a/gtk/gtktreeselection.h
+++ b/gtk/gtktreeselection.h
@@ -29,12 +29,7 @@ G_BEGIN_DECLS
 
 #define GTK_TYPE_TREE_SELECTION                        (gtk_tree_selection_get_type ())
 #define GTK_TREE_SELECTION(obj)                        (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GTK_TYPE_TREE_SELECTION, GtkTreeSelection))
-#define GTK_TREE_SELECTION_CLASS(klass)                (G_TYPE_CHECK_CLASS_CAST ((klass), 
GTK_TYPE_TREE_SELECTION, GtkTreeSelectionClass))
 #define GTK_IS_TREE_SELECTION(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_SELECTION))
-#define GTK_IS_TREE_SELECTION_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_SELECTION))
-#define GTK_TREE_SELECTION_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_SELECTION, 
GtkTreeSelectionClass))
-
-typedef struct _GtkTreeSelectionPrivate      GtkTreeSelectionPrivate;
 
 /**
  * GtkTreeSelectionFunc:
@@ -72,36 +67,6 @@ typedef void (* GtkTreeSelectionForeachFunc) (GtkTreeModel      *model,
                                              GtkTreeIter       *iter,
                                              gpointer           data);
 
-struct _GtkTreeSelection
-{
-  /*< private >*/
-  GObject parent;
-
-  GtkTreeSelectionPrivate *priv;
-};
-
-/**
- * GtkTreeSelectionClass:
- * @parent_class: The parent class.
- * @changed: Signal emitted whenever the selection has (possibly) changed.
- */
-struct _GtkTreeSelectionClass
-{
-  GObjectClass parent_class;
-
-  /*< public >*/
-
-  void (* changed) (GtkTreeSelection *selection);
-
-  /*< private >*/
-
-  /* Padding for future expansion */
-  void (*_gtk_reserved1) (void);
-  void (*_gtk_reserved2) (void);
-  void (*_gtk_reserved3) (void);
-  void (*_gtk_reserved4) (void);
-};
-
 
 GDK_AVAILABLE_IN_ALL
 GType            gtk_tree_selection_get_type            (void) G_GNUC_CONST;
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 7e1bada280..96fbaa811b 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -305,6 +305,55 @@ struct _TreeViewDragInfo
   guint dest_set : 1;
 };
 
+typedef struct _GtkTreeViewClass      GtkTreeViewClass;
+typedef struct _GtkTreeViewPrivate    GtkTreeViewPrivate;
+
+struct _GtkTreeView
+{
+  GtkContainer parent;
+
+  GtkTreeViewPrivate *priv;
+};
+
+struct _GtkTreeViewClass
+{
+  GtkContainerClass parent_class;
+
+  void     (* row_activated)              (GtkTreeView       *tree_view,
+                                           GtkTreePath       *path,
+                                           GtkTreeViewColumn *column);
+  gboolean (* test_expand_row)            (GtkTreeView       *tree_view,
+                                           GtkTreeIter       *iter,
+                                           GtkTreePath       *path);
+  gboolean (* test_collapse_row)          (GtkTreeView       *tree_view,
+                                           GtkTreeIter       *iter,
+                                           GtkTreePath       *path);
+  void     (* row_expanded)               (GtkTreeView       *tree_view,
+                                           GtkTreeIter       *iter,
+                                           GtkTreePath       *path);
+  void     (* row_collapsed)              (GtkTreeView       *tree_view,
+                                           GtkTreeIter       *iter,
+                                           GtkTreePath       *path);
+  void     (* columns_changed)            (GtkTreeView       *tree_view);
+  void     (* cursor_changed)             (GtkTreeView       *tree_view);
+
+  /* Key Binding signals */
+  gboolean (* move_cursor)                (GtkTreeView       *tree_view,
+                                           GtkMovementStep    step,
+                                           gint               count);
+  gboolean (* select_all)                 (GtkTreeView       *tree_view);
+  gboolean (* unselect_all)               (GtkTreeView       *tree_view);
+  gboolean (* select_cursor_row)          (GtkTreeView       *tree_view,
+                                           gboolean           start_editing);
+  gboolean (* toggle_cursor_row)          (GtkTreeView       *tree_view);
+  gboolean (* expand_collapse_cursor_row) (GtkTreeView       *tree_view,
+                                           gboolean           logical,
+                                           gboolean           expand,
+                                           gboolean           open_all);
+  gboolean (* select_cursor_parent)       (GtkTreeView       *tree_view);
+  gboolean (* start_interactive_search)   (GtkTreeView       *tree_view);
+};
+
 
 struct _GtkTreeViewPrivate
 {
diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h
index 33c043cccd..70c3e557ac 100644
--- a/gtk/gtktreeview.h
+++ b/gtk/gtktreeview.h
@@ -53,73 +53,10 @@ typedef enum
 
 #define GTK_TYPE_TREE_VIEW             (gtk_tree_view_get_type ())
 #define GTK_TREE_VIEW(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_VIEW, GtkTreeView))
-#define GTK_TREE_VIEW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW, 
GtkTreeViewClass))
 #define GTK_IS_TREE_VIEW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_VIEW))
-#define GTK_IS_TREE_VIEW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW))
-#define GTK_TREE_VIEW_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW, 
GtkTreeViewClass))
 
 typedef struct _GtkTreeView           GtkTreeView;
-typedef struct _GtkTreeViewClass      GtkTreeViewClass;
-typedef struct _GtkTreeViewPrivate    GtkTreeViewPrivate;
 typedef struct _GtkTreeSelection      GtkTreeSelection;
-typedef struct _GtkTreeSelectionClass GtkTreeSelectionClass;
-
-struct _GtkTreeView
-{
-  GtkContainer parent;
-
-  /*< private >*/
-  GtkTreeViewPrivate *priv;
-};
-
-struct _GtkTreeViewClass
-{
-  GtkContainerClass parent_class;
-
-  void     (* row_activated)              (GtkTreeView       *tree_view,
-                                          GtkTreePath       *path,
-                                          GtkTreeViewColumn *column);
-  gboolean (* test_expand_row)            (GtkTreeView       *tree_view,
-                                          GtkTreeIter       *iter,
-                                          GtkTreePath       *path);
-  gboolean (* test_collapse_row)          (GtkTreeView       *tree_view,
-                                          GtkTreeIter       *iter,
-                                          GtkTreePath       *path);
-  void     (* row_expanded)               (GtkTreeView       *tree_view,
-                                          GtkTreeIter       *iter,
-                                          GtkTreePath       *path);
-  void     (* row_collapsed)              (GtkTreeView       *tree_view,
-                                          GtkTreeIter       *iter,
-                                          GtkTreePath       *path);
-  void     (* columns_changed)            (GtkTreeView       *tree_view);
-  void     (* cursor_changed)             (GtkTreeView       *tree_view);
-
-  /* Key Binding signals */
-  gboolean (* move_cursor)                (GtkTreeView       *tree_view,
-                                          GtkMovementStep    step,
-                                          gint               count);
-  gboolean (* select_all)                 (GtkTreeView       *tree_view);
-  gboolean (* unselect_all)               (GtkTreeView       *tree_view);
-  gboolean (* select_cursor_row)          (GtkTreeView       *tree_view,
-                                          gboolean           start_editing);
-  gboolean (* toggle_cursor_row)          (GtkTreeView       *tree_view);
-  gboolean (* expand_collapse_cursor_row) (GtkTreeView       *tree_view,
-                                          gboolean           logical,
-                                          gboolean           expand,
-                                          gboolean           open_all);
-  gboolean (* select_cursor_parent)       (GtkTreeView       *tree_view);
-  gboolean (* start_interactive_search)   (GtkTreeView       *tree_view);
-
-  /* Padding for future expansion */
-  void (*_gtk_reserved1) (void);
-  void (*_gtk_reserved2) (void);
-  void (*_gtk_reserved3) (void);
-  void (*_gtk_reserved4) (void);
-  void (*_gtk_reserved5) (void);
-  void (*_gtk_reserved6) (void);
-  void (*_gtk_reserved7) (void);
-  void (*_gtk_reserved8) (void);
-};
 
 /**
  * GtkTreeViewColumnDropFunc:


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