]> Pileus Git - ~andy/gtk/commitdiff
GtkWidgetPath: properly use const
authorSven Herzberg <herzi@gnome-de.org>
Thu, 5 Aug 2010 14:21:12 +0000 (16:21 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:37:32 +0000 (15:37 +0100)
* gtk/gtkwidgetpath.c,
* gtk/gtkwidgetpath.h: use const where possible

gtk/gtkwidgetpath.c
gtk/gtkwidgetpath.h

index 2e78b7cdd55cad05c058c3023741f33735389485..29b019ed36f4ee97c157d11b2d79ab7f92cb085e 100644 (file)
@@ -114,7 +114,7 @@ gtk_widget_path_free (GtkWidgetPath *path)
 }
 
 guint
-gtk_widget_path_length (GtkWidgetPath *path)
+gtk_widget_path_length (const GtkWidgetPath *path)
 {
   g_return_val_if_fail (path != NULL, 0);
 
@@ -137,8 +137,8 @@ gtk_widget_path_prepend_type (GtkWidgetPath *path,
 }
 
 GType
-gtk_widget_path_get_element_type (GtkWidgetPath *path,
-                                  guint          pos)
+gtk_widget_path_get_element_type (const GtkWidgetPath *path,
+                                  guint                pos)
 {
   GtkPathElement *elem;
 
@@ -165,8 +165,8 @@ gtk_widget_path_set_element_type (GtkWidgetPath *path,
 }
 
 G_CONST_RETURN gchar *
-gtk_widget_path_get_element_name (GtkWidgetPath *path,
-                                  guint          pos)
+gtk_widget_path_get_element_name (const GtkWidgetPath *path,
+                                  guint                pos)
 {
   GtkPathElement *elem;
 
@@ -254,8 +254,8 @@ gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
 }
 
 GSList *
-gtk_widget_path_iter_list_regions (GtkWidgetPath *path,
-                                   guint          pos)
+gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
+                                   guint                pos)
 {
   GtkPathElement *elem;
   GHashTableIter iter;
@@ -279,10 +279,10 @@ gtk_widget_path_iter_list_regions (GtkWidgetPath *path,
 }
 
 gboolean
-gtk_widget_path_iter_has_region (GtkWidgetPath      *path,
-                                 guint               pos,
-                                 const gchar        *name,
-                                 GtkChildClassFlags *flags)
+gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
+                                 guint                pos,
+                                 const gchar         *name,
+                                 GtkChildClassFlags  *flags)
 {
   GtkPathElement *elem;
   gpointer value;
index 9e2d0edf1e018193d1dbe192aec0b859669f39a0..78c33e0e14aa112cffb992304e7246446183442f 100644 (file)
@@ -33,22 +33,22 @@ GtkWidgetPath * gtk_widget_path_new (void);
 GtkWidgetPath * gtk_widget_path_copy                (const GtkWidgetPath *path);
 void            gtk_widget_path_free                (GtkWidgetPath       *path);
 
-guint           gtk_widget_path_length              (GtkWidgetPath       *path);
+guint           gtk_widget_path_length              (const GtkWidgetPath *path);
 
 guint           gtk_widget_path_prepend_type        (GtkWidgetPath       *path,
                                                      GType                type);
 
-GType               gtk_widget_path_get_element_type (GtkWidgetPath      *path,
+GType               gtk_widget_path_get_element_type (const GtkWidgetPath*path,
                                                       guint               pos);
 void                gtk_widget_path_set_element_type (GtkWidgetPath      *path,
                                                       guint               pos,
                                                       GType               type);
 
-G_CONST_RETURN gchar * gtk_widget_path_get_element_name (GtkWidgetPath   *path,
-                                                         guint            pos);
-void                   gtk_widget_path_set_element_name (GtkWidgetPath   *path,
-                                                         guint            pos,
-                                                         const gchar     *name);
+G_CONST_RETURN gchar * gtk_widget_path_get_element_name (const GtkWidgetPath *path,
+                                                         guint                pos);
+void                   gtk_widget_path_set_element_name (GtkWidgetPath       *path,
+                                                         guint                pos,
+                                                         const gchar         *name);
 
 void     gtk_widget_path_iter_add_region    (GtkWidgetPath      *path,
                                              guint               pos,
@@ -60,13 +60,13 @@ void     gtk_widget_path_iter_remove_region (GtkWidgetPath      *path,
 void     gtk_widget_path_iter_clear_regions (GtkWidgetPath      *path,
                                              guint               pos);
 
-GSList * gtk_widget_path_iter_list_regions  (GtkWidgetPath      *path,
-                                             guint               pos);
+GSList * gtk_widget_path_iter_list_regions  (const GtkWidgetPath *path,
+                                             guint                pos);
 
-gboolean gtk_widget_path_iter_has_region    (GtkWidgetPath      *path,
-                                             guint               pos,
-                                             const gchar        *name,
-                                             GtkChildClassFlags *flags);
+gboolean gtk_widget_path_iter_has_region    (const GtkWidgetPath *path,
+                                             guint                pos,
+                                             const gchar         *name,
+                                             GtkChildClassFlags  *flags);
 
 GType           gtk_widget_path_get_widget_type (const GtkWidgetPath *path);