[gtk/wip/baedert/for-master: 6/7] Add pure and const annotations to various functions



commit bdc849ab72dbf7b00d406430b4b94dd60f11a8fc
Author: Timm Bäder <mail baedert org>
Date:   Fri Jan 24 13:17:09 2020 +0100

    Add pure and const annotations to various functions

 gdk/gdkrgba.h                        |  8 ++++----
 gdk/gdktexture.h                     |  4 ++--
 gsk/gl/gskglrenderer.c               |  8 ++++----
 gsk/gl/gskglrenderops.c              |  4 ++--
 gsk/gskrendernode.c                  |  8 ++++----
 gsk/gskrendernodeimpl.c              | 18 +++++++++---------
 gsk/gskrendernodeprivate.h           |  8 ++++----
 gsk/gskroundedrect.h                 |  8 ++++----
 gsk/gskroundedrectprivate.h          |  2 +-
 gtk/css/gtkcsstokenizerprivate.h     | 10 +++++-----
 gtk/gtkcssarrayvalue.c               |  2 +-
 gtk/gtkcssarrayvalueprivate.h        |  2 +-
 gtk/gtkcsscolorvalueprivate.h        | 18 +++++++++---------
 gtk/gtkcssimageprivate.h             | 14 +++++++-------
 gtk/gtkcssimagevalue.c               |  2 +-
 gtk/gtkcsskeyframesprivate.h         |  2 +-
 gtk/gtkcssshadowvalueprivate.h       |  4 ++--
 gtk/gtkcssshorthandpropertyprivate.h |  2 +-
 gtk/gtkcssstylepropertyprivate.h     |  2 +-
 gtk/gtkcssvalue.c                    |  2 +-
 gtk/gtkcssvalueprivate.h             | 10 +++++-----
 21 files changed, 69 insertions(+), 69 deletions(-)
---
diff --git a/gdk/gdkrgba.h b/gdk/gdkrgba.h
index 5e486a5d4a..7ba506fc89 100644
--- a/gdk/gdkrgba.h
+++ b/gdk/gdkrgba.h
@@ -53,15 +53,15 @@ GDK_AVAILABLE_IN_ALL
 void      gdk_rgba_free      (GdkRGBA       *rgba);
 
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_rgba_is_clear  (const GdkRGBA *rgba);
+gboolean  gdk_rgba_is_clear  (const GdkRGBA *rgba) G_GNUC_PURE;
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_rgba_is_opaque (const GdkRGBA *rgba);
+gboolean  gdk_rgba_is_opaque (const GdkRGBA *rgba) G_GNUC_PURE;
 
 GDK_AVAILABLE_IN_ALL
-guint     gdk_rgba_hash      (gconstpointer  p);
+guint     gdk_rgba_hash      (gconstpointer  p) G_GNUC_PURE;
 GDK_AVAILABLE_IN_ALL
 gboolean  gdk_rgba_equal     (gconstpointer  p1,
-                              gconstpointer  p2);
+                              gconstpointer  p2) G_GNUC_PURE;
 
 GDK_AVAILABLE_IN_ALL
 gboolean  gdk_rgba_parse     (GdkRGBA       *rgba,
diff --git a/gdk/gdktexture.h b/gdk/gdktexture.h
index f7d4fbf567..f3d0bc9765 100644
--- a/gdk/gdktexture.h
+++ b/gdk/gdktexture.h
@@ -51,9 +51,9 @@ GdkTexture *            gdk_texture_new_from_file              (GFile
                                                                 GError         **error);
 
 GDK_AVAILABLE_IN_ALL
-int                     gdk_texture_get_width                  (GdkTexture      *texture);
+int                     gdk_texture_get_width                  (GdkTexture      *texture) G_GNUC_PURE;
 GDK_AVAILABLE_IN_ALL
-int                     gdk_texture_get_height                 (GdkTexture      *texture);
+int                     gdk_texture_get_height                 (GdkTexture      *texture) G_GNUC_PURE;
 
 GDK_AVAILABLE_IN_ALL
 void                    gdk_texture_download                   (GdkTexture      *texture,
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index d0ca63b88c..c5abfa31bc 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -196,7 +196,7 @@ dump_node (GskRenderNode *node,
   cairo_surface_destroy (surface);
 }
 
-static inline gboolean
+static inline gboolean G_GNUC_PURE
 node_is_invisible (const GskRenderNode *node)
 {
   return node->bounds.size.width == 0.0f ||
@@ -237,7 +237,7 @@ sort_border_sides (const GdkRGBA *colors,
     }
 }
 
-static inline gboolean
+static inline gboolean G_GNUC_PURE
 color_matrix_modifies_alpha (GskRenderNode *node)
 {
   const graphene_matrix_t *matrix = gsk_color_matrix_node_peek_color_matrix (node);
@@ -261,7 +261,7 @@ gsk_rounded_rect_shrink_to_minimum (GskRoundedRect *self)
                                          MAX (self->corner[2].height, self->corner[3].height)) * 2);
 }
 
-static inline gboolean
+static inline gboolean G_GNUC_PURE
 node_supports_transform (GskRenderNode *node)
 {
   /* Some nodes can't handle non-trivial transforms without being
@@ -611,7 +611,7 @@ render_fallback_node (GskGLRenderer   *self,
   cairo_fill (cr);
   cairo_restore (cr);
 
-#if G_ENABLE_DEBUG
+#ifdef G_ENABLE_DEBUG
   if (GSK_RENDERER_DEBUG_CHECK (GSK_RENDERER (self), FALLBACK))
     {
       cairo_move_to (cr, 0, 0);
diff --git a/gsk/gl/gskglrenderops.c b/gsk/gl/gskglrenderops.c
index f113df5edf..175d57ce83 100644
--- a/gsk/gl/gskglrenderops.c
+++ b/gsk/gl/gskglrenderops.c
@@ -8,7 +8,7 @@ rect_equal (const graphene_rect_t *a,
   return memcmp (a, b, sizeof (graphene_rect_t)) == 0;
 }
 
-static inline gboolean
+static inline gboolean G_GNUC_PURE
 rounded_rect_equal (const GskRoundedRect *r1,
                     const GskRoundedRect *r2)
 {
@@ -31,7 +31,7 @@ rounded_rect_equal (const GskRoundedRect *r1,
   return TRUE;
 }
 
-static inline gboolean
+static inline gboolean G_GNUC_PURE
 rounded_rect_corners_equal (const GskRoundedRect *r1,
                             const GskRoundedRect *r2)
 {
diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c
index 20fe92894e..9646049da4 100644
--- a/gsk/gskrendernode.c
+++ b/gsk/gskrendernode.c
@@ -145,9 +145,9 @@ gsk_render_node_get_node_type (GskRenderNode *node)
   return node->node_class->node_type;
 }
 
-static inline
+G_GNUC_PURE static inline
 GskRenderNodeType
-_gsk_render_node_get_node_type (GskRenderNode *node)
+_gsk_render_node_get_node_type (const GskRenderNode *node)
 {
   return node->node_class->node_type;
 }
@@ -248,8 +248,8 @@ gsk_render_node_draw (GskRenderNode *node,
  * Returns: %TRUE if @node1 and @node2 can be expected to be compared
  **/
 gboolean
-gsk_render_node_can_diff (GskRenderNode *node1,
-                          GskRenderNode *node2)
+gsk_render_node_can_diff (const GskRenderNode *node1,
+                          const GskRenderNode *node2)
 {
   if (node1 == node2)
     return TRUE;
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index d0902845d5..2434c5d40e 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -41,8 +41,8 @@ rectangle_init_from_graphene (cairo_rectangle_int_t *cairo,
 }
 
 static gboolean
-gsk_render_node_can_diff_true (GskRenderNode *node1,
-                               GskRenderNode *node2)
+gsk_render_node_can_diff_true (const GskRenderNode *node1,
+                               const GskRenderNode *node2)
 {
   return TRUE;
 }
@@ -1707,8 +1707,8 @@ gsk_container_node_draw (GskRenderNode *node,
 }
 
 static gboolean
-gsk_container_node_can_diff (GskRenderNode *node1,
-                             GskRenderNode *node2)
+gsk_container_node_can_diff (const GskRenderNode *node1,
+                             const GskRenderNode *node2)
 {
   return TRUE;
 }
@@ -1726,7 +1726,7 @@ gsk_render_node_add_to_region (GskRenderNode  *node,
 static int
 gsk_container_node_compare_func (gconstpointer elem1, gconstpointer elem2, gpointer data)
 {
-  return gsk_render_node_can_diff ((GskRenderNode *) elem1, (GskRenderNode *) elem2) ? 0 : 1;
+  return gsk_render_node_can_diff ((const GskRenderNode *) elem1, (const GskRenderNode *) elem2) ? 0 : 1;
 }
 
 static void
@@ -1918,8 +1918,8 @@ gsk_transform_node_draw (GskRenderNode *node,
 }
 
 static gboolean
-gsk_transform_node_can_diff (GskRenderNode *node1,
-                             GskRenderNode *node2)
+gsk_transform_node_can_diff (const GskRenderNode *node1,
+                             const GskRenderNode *node2)
 {
   GskTransformNode *self1 = (GskTransformNode *) node1;
   GskTransformNode *self2 = (GskTransformNode *) node2;
@@ -2092,8 +2092,8 @@ gsk_debug_node_draw (GskRenderNode *node,
 }
 
 static gboolean
-gsk_debug_node_can_diff (GskRenderNode *node1,
-                         GskRenderNode *node2)
+gsk_debug_node_can_diff (const GskRenderNode *node1,
+                         const GskRenderNode *node2)
 {
   GskDebugNode *self1 = (GskDebugNode *) node1;
   GskDebugNode *self2 = (GskDebugNode *) node2;
diff --git a/gsk/gskrendernodeprivate.h b/gsk/gskrendernodeprivate.h
index 2ced79738b..83d01740a5 100644
--- a/gsk/gskrendernodeprivate.h
+++ b/gsk/gskrendernodeprivate.h
@@ -28,8 +28,8 @@ struct _GskRenderNodeClass
   void            (* finalize)    (GskRenderNode  *node);
   void            (* draw)        (GskRenderNode  *node,
                                    cairo_t        *cr);
-  gboolean        (* can_diff)    (GskRenderNode  *node1,
-                                   GskRenderNode  *node2);
+  gboolean        (* can_diff)    (const GskRenderNode  *node1,
+                                   const GskRenderNode  *node2);
   void            (* diff)        (GskRenderNode  *node1,
                                    GskRenderNode  *node2,
                                    cairo_region_t *region);
@@ -38,8 +38,8 @@ struct _GskRenderNodeClass
 GskRenderNode * gsk_render_node_new              (const GskRenderNodeClass  *node_class,
                                                   gsize                      extra_size);
 
-gboolean        gsk_render_node_can_diff         (GskRenderNode             *node1,
-                                                  GskRenderNode             *node2);
+gboolean        gsk_render_node_can_diff         (const GskRenderNode       *node1,
+                                                  const GskRenderNode       *node2) G_GNUC_PURE;
 void            gsk_render_node_diff             (GskRenderNode             *node1,
                                                   GskRenderNode             *node2,
                                                   cairo_region_t            *region);
diff --git a/gsk/gskroundedrect.h b/gsk/gskroundedrect.h
index d942df5169..64945a1417 100644
--- a/gsk/gskroundedrect.h
+++ b/gsk/gskroundedrect.h
@@ -98,16 +98,16 @@ GskRoundedRect *        gsk_rounded_rect_shrink                 (GskRoundedRect
                                                                  float                     left);
 
 GDK_AVAILABLE_IN_ALL
-gboolean                gsk_rounded_rect_is_rectilinear         (const GskRoundedRect     *self);
+gboolean                gsk_rounded_rect_is_rectilinear         (const GskRoundedRect     *self) G_GNUC_PURE;
 GDK_AVAILABLE_IN_ALL
 gboolean                gsk_rounded_rect_contains_point         (const GskRoundedRect     *self,
-                                                                 const graphene_point_t   *point);
+                                                                 const graphene_point_t   *point) 
G_GNUC_PURE;
 GDK_AVAILABLE_IN_ALL
 gboolean                gsk_rounded_rect_contains_rect          (const GskRoundedRect     *self,
-                                                                 const graphene_rect_t    *rect);
+                                                                 const graphene_rect_t    *rect) G_GNUC_PURE;
 GDK_AVAILABLE_IN_ALL
 gboolean                gsk_rounded_rect_intersects_rect        (const GskRoundedRect     *self,
-                                                                 const graphene_rect_t    *rect);
+                                                                 const graphene_rect_t    *rect) G_GNUC_PURE;
 
 G_END_DECLS
 
diff --git a/gsk/gskroundedrectprivate.h b/gsk/gskroundedrectprivate.h
index 1284d8e7ea..5c2912b492 100644
--- a/gsk/gskroundedrectprivate.h
+++ b/gsk/gskroundedrectprivate.h
@@ -15,7 +15,7 @@ void                     gsk_rounded_rect_to_float              (const GskRounde
                                                                  float                     rect[12]);
 
 gboolean                 gsk_rounded_rect_equal                 (gconstpointer             rect1,
-                                                                 gconstpointer             rect2);
+                                                                 gconstpointer             rect2) 
G_GNUC_PURE;
 char *                   gsk_rounded_rect_to_string             (const GskRoundedRect     *self);
 
 
diff --git a/gtk/css/gtkcsstokenizerprivate.h b/gtk/css/gtkcsstokenizerprivate.h
index 8119da28e9..279af1860e 100644
--- a/gtk/css/gtkcsstokenizerprivate.h
+++ b/gtk/css/gtkcsstokenizerprivate.h
@@ -109,16 +109,16 @@ union _GtkCssToken {
 
 void                    gtk_css_token_clear                     (GtkCssToken            *token);
 
-gboolean                gtk_css_token_is_finite                 (const GtkCssToken      *token);
+gboolean                gtk_css_token_is_finite                 (const GtkCssToken      *token) G_GNUC_PURE;
 gboolean                gtk_css_token_is_preserved              (const GtkCssToken      *token,
-                                                                 GtkCssTokenType        *out_closing);
+                                                                 GtkCssTokenType        *out_closing) 
G_GNUC_PURE;
 #define gtk_css_token_is(token, _type) ((token)->type == (_type))
 gboolean                gtk_css_token_is_ident                  (const GtkCssToken      *token,
-                                                                 const char             *ident);
+                                                                 const char             *ident) G_GNUC_PURE;
 gboolean                gtk_css_token_is_function               (const GtkCssToken      *token,
-                                                                 const char             *ident);
+                                                                 const char             *ident) G_GNUC_PURE;
 gboolean                gtk_css_token_is_delim                  (const GtkCssToken      *token,
-                                                                 gunichar                delim);
+                                                                 gunichar                delim) G_GNUC_PURE;
 
 void                    gtk_css_token_print                     (const GtkCssToken      *token,
                                                                  GString                *string);
diff --git a/gtk/gtkcssarrayvalue.c b/gtk/gtkcssarrayvalue.c
index a76bd954f7..515e6bbeae 100644
--- a/gtk/gtkcssarrayvalue.c
+++ b/gtk/gtkcssarrayvalue.c
@@ -299,7 +299,7 @@ gtk_css_value_array_transition (GtkCssValue *start,
 }
 
 static gboolean
-gtk_css_value_array_is_dynamic (GtkCssValue *value)
+gtk_css_value_array_is_dynamic (const GtkCssValue *value)
 {
   guint i;
 
diff --git a/gtk/gtkcssarrayvalueprivate.h b/gtk/gtkcssarrayvalueprivate.h
index 0ff1295f48..fb9fb376c0 100644
--- a/gtk/gtkcssarrayvalueprivate.h
+++ b/gtk/gtkcssarrayvalueprivate.h
@@ -34,7 +34,7 @@ GtkCssValue *       _gtk_css_array_value_parse          (GtkCssParser          *
 
 GtkCssValue *       _gtk_css_array_value_get_nth        (GtkCssValue           *value,
                                                          guint                  i);
-guint               _gtk_css_array_value_get_n_values   (const GtkCssValue     *value);
+guint               _gtk_css_array_value_get_n_values   (const GtkCssValue     *value) G_GNUC_PURE;
 
 
 G_END_DECLS
diff --git a/gtk/gtkcsscolorvalueprivate.h b/gtk/gtkcsscolorvalueprivate.h
index ce490c898a..15c6a0055e 100644
--- a/gtk/gtkcsscolorvalueprivate.h
+++ b/gtk/gtkcsscolorvalueprivate.h
@@ -24,18 +24,18 @@
 G_BEGIN_DECLS
 
 
-GtkCssValue *   gtk_css_color_value_new_transparent     (void);
-GtkCssValue *   gtk_css_color_value_new_white           (void);
-GtkCssValue *   _gtk_css_color_value_new_literal        (const GdkRGBA  *color);
-GtkCssValue *   _gtk_css_color_value_new_name           (const gchar    *name);
+GtkCssValue *   gtk_css_color_value_new_transparent     (void) G_GNUC_PURE;
+GtkCssValue *   gtk_css_color_value_new_white           (void) G_GNUC_PURE;
+GtkCssValue *   _gtk_css_color_value_new_literal        (const GdkRGBA  *color) G_GNUC_PURE;
+GtkCssValue *   _gtk_css_color_value_new_name           (const gchar    *name) G_GNUC_PURE;
 GtkCssValue *   _gtk_css_color_value_new_shade          (GtkCssValue    *color,
-                                                         gdouble         factor);
+                                                         gdouble         factor) G_GNUC_PURE;
 GtkCssValue *   _gtk_css_color_value_new_alpha          (GtkCssValue    *color,
-                                                         gdouble         factor);
+                                                         gdouble         factor) G_GNUC_PURE;
 GtkCssValue *   _gtk_css_color_value_new_mix            (GtkCssValue    *color1,
                                                          GtkCssValue    *color2,
-                                                         gdouble         factor);
-GtkCssValue *   _gtk_css_color_value_new_current_color  (void);
+                                                         gdouble         factor) G_GNUC_PURE;
+GtkCssValue *   _gtk_css_color_value_new_current_color  (void) G_GNUC_PURE;
 
 gboolean        gtk_css_color_value_can_parse           (GtkCssParser   *parser);
 GtkCssValue *   _gtk_css_color_value_parse              (GtkCssParser   *parser);
@@ -44,7 +44,7 @@ GtkCssValue *   _gtk_css_color_value_resolve            (GtkCssValue      *color
                                                          GtkStyleProvider *provider,
                                                          GtkCssValue      *current,
                                                          GSList           *cycle_list);
-const GdkRGBA * gtk_css_color_value_get_rgba            (const GtkCssValue *color);
+const GdkRGBA * gtk_css_color_value_get_rgba            (const GtkCssValue *color) G_GNUC_CONST;
 
 
 G_END_DECLS
diff --git a/gtk/gtkcssimageprivate.h b/gtk/gtkcssimageprivate.h
index 0366d45557..d4e4e669ea 100644
--- a/gtk/gtkcssimageprivate.h
+++ b/gtk/gtkcssimageprivate.h
@@ -97,9 +97,9 @@ GType          _gtk_css_image_get_type             (void) G_GNUC_CONST;
 gboolean       _gtk_css_image_can_parse            (GtkCssParser               *parser);
 GtkCssImage *  _gtk_css_image_new_parse            (GtkCssParser               *parser);
 
-int            _gtk_css_image_get_width            (GtkCssImage                *image);
-int            _gtk_css_image_get_height           (GtkCssImage                *image);
-double         _gtk_css_image_get_aspect_ratio     (GtkCssImage                *image);
+int            _gtk_css_image_get_width            (GtkCssImage                *image) G_GNUC_PURE;
+int            _gtk_css_image_get_height           (GtkCssImage                *image) G_GNUC_PURE;
+double         _gtk_css_image_get_aspect_ratio     (GtkCssImage                *image) G_GNUC_PURE;
 
 GtkCssImage *  _gtk_css_image_compute              (GtkCssImage                *image,
                                                     guint                       property_id,
@@ -107,7 +107,7 @@ GtkCssImage *  _gtk_css_image_compute              (GtkCssImage                *
                                                     GtkCssStyle                *style,
                                                     GtkCssStyle                *parent_style);
 gboolean       _gtk_css_image_equal                (GtkCssImage                *image1,
-                                                    GtkCssImage                *image2);
+                                                    GtkCssImage                *image2) G_GNUC_PURE;
 GtkCssImage *  _gtk_css_image_transition           (GtkCssImage                *start,
                                                     GtkCssImage                *end,
                                                     guint                       property_id,
@@ -121,8 +121,8 @@ void           gtk_css_image_snapshot              (GtkCssImage                *
                                                     GtkSnapshot                *snapshot,
                                                     double                      width,
                                                     double                      height);
-gboolean       gtk_css_image_is_invalid            (GtkCssImage                *image);
-gboolean       gtk_css_image_is_dynamic            (GtkCssImage                *image);
+gboolean       gtk_css_image_is_invalid            (GtkCssImage                *image) G_GNUC_PURE;
+gboolean       gtk_css_image_is_dynamic            (GtkCssImage                *image) G_GNUC_PURE;
 GtkCssImage *  gtk_css_image_get_dynamic_image     (GtkCssImage                *image,
                                                     gint64                      monotonic_time);
 void           _gtk_css_image_print                (GtkCssImage                *image,
@@ -141,7 +141,7 @@ cairo_surface_t *
                                                     cairo_surface_t            *target,
                                                     int                         surface_width,
                                                     int                         surface_height);
-gboolean       gtk_css_image_is_computed           (GtkCssImage                *image);
+gboolean       gtk_css_image_is_computed           (GtkCssImage                *image) G_GNUC_PURE;
 
 
 G_END_DECLS
diff --git a/gtk/gtkcssimagevalue.c b/gtk/gtkcssimagevalue.c
index ceeba6cafc..3c1ce454cd 100644
--- a/gtk/gtkcssimagevalue.c
+++ b/gtk/gtkcssimagevalue.c
@@ -82,7 +82,7 @@ gtk_css_value_image_transition (GtkCssValue *start,
 }
 
 static gboolean
-gtk_css_value_image_is_dynamic (GtkCssValue *value)
+gtk_css_value_image_is_dynamic (const GtkCssValue *value)
 {
   GtkCssImage *image = _gtk_css_image_value_get_image (value);
 
diff --git a/gtk/gtkcsskeyframesprivate.h b/gtk/gtkcsskeyframesprivate.h
index 3808e9661a..89de02536c 100644
--- a/gtk/gtkcsskeyframesprivate.h
+++ b/gtk/gtkcsskeyframesprivate.h
@@ -41,7 +41,7 @@ GtkCssKeyframes *   _gtk_css_keyframes_compute                (GtkCssKeyframes
                                                                GtkCssStyle             *style,
                                                                GtkCssStyle             *parent_style);
 
-guint               _gtk_css_keyframes_get_n_properties       (GtkCssKeyframes        *keyframes);
+guint               _gtk_css_keyframes_get_n_properties       (GtkCssKeyframes        *keyframes) 
G_GNUC_PURE;
 guint               _gtk_css_keyframes_get_property_id        (GtkCssKeyframes        *keyframes,
                                                                guint                   id);
 GtkCssValue *       _gtk_css_keyframes_get_value              (GtkCssKeyframes        *keyframes,
diff --git a/gtk/gtkcssshadowvalueprivate.h b/gtk/gtkcssshadowvalueprivate.h
index bbc0814340..c14d686566 100644
--- a/gtk/gtkcssshadowvalueprivate.h
+++ b/gtk/gtkcssshadowvalueprivate.h
@@ -46,8 +46,8 @@ void            gtk_css_shadow_value_snapshot_inset   (const GtkCssValue
                                                        GtkSnapshot              *snapshot,
                                                        const GskRoundedRect     *padding_box);
 
-gboolean        gtk_css_shadow_value_is_clear         (const GtkCssValue        *shadow);
-gboolean        gtk_css_shadow_value_is_none          (const GtkCssValue        *shadow);
+gboolean        gtk_css_shadow_value_is_clear         (const GtkCssValue        *shadow) G_GNUC_PURE;
+gboolean        gtk_css_shadow_value_is_none          (const GtkCssValue        *shadow) G_GNUC_PURE;
 
 gboolean        gtk_css_shadow_value_push_snapshot    (const GtkCssValue        *value,
                                                        GtkSnapshot              *snapshot);
diff --git a/gtk/gtkcssshorthandpropertyprivate.h b/gtk/gtkcssshorthandpropertyprivate.h
index 07e21e9bbd..89a70140ae 100644
--- a/gtk/gtkcssshorthandpropertyprivate.h
+++ b/gtk/gtkcssshorthandpropertyprivate.h
@@ -67,7 +67,7 @@ GType                   _gtk_css_shorthand_property_get_type            (void) G
 
 GtkCssStyleProperty *   _gtk_css_shorthand_property_get_subproperty     (GtkCssShorthandProperty *shorthand,
                                                                          guint                    property);
-guint                   _gtk_css_shorthand_property_get_n_subproperties (GtkCssShorthandProperty *shorthand);
+guint                   _gtk_css_shorthand_property_get_n_subproperties (GtkCssShorthandProperty *shorthand) 
G_GNUC_CONST;
 
 
 G_END_DECLS
diff --git a/gtk/gtkcssstylepropertyprivate.h b/gtk/gtkcssstylepropertyprivate.h
index 005ada4e70..5c22f3c270 100644
--- a/gtk/gtkcssstylepropertyprivate.h
+++ b/gtk/gtkcssstylepropertyprivate.h
@@ -64,7 +64,7 @@ GType                   _gtk_css_style_property_get_type        (void) G_GNUC_CO
 
 void                    _gtk_css_style_property_init_properties (void);
 
-guint                   _gtk_css_style_property_get_n_properties(void);
+guint                   _gtk_css_style_property_get_n_properties(void) G_GNUC_CONST;
 GtkCssStyleProperty *   _gtk_css_style_property_lookup_by_id    (guint                   id);
 
 gboolean                _gtk_css_style_property_is_inherit      (GtkCssStyleProperty    *property);
diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c
index 2ce73c2cf1..ce6c3fac3b 100644
--- a/gtk/gtkcssvalue.c
+++ b/gtk/gtkcssvalue.c
@@ -329,7 +329,7 @@ _gtk_css_value_print (const GtkCssValue *value,
  * Returns %TRUE if the value is dynamic
  */
 gboolean
-gtk_css_value_is_dynamic (GtkCssValue *value)
+gtk_css_value_is_dynamic (const GtkCssValue *value)
 {
   gtk_internal_return_val_if_fail (value != NULL, FALSE);
 
diff --git a/gtk/gtkcssvalueprivate.h b/gtk/gtkcssvalueprivate.h
index 1f81204606..d09b366c00 100644
--- a/gtk/gtkcssvalueprivate.h
+++ b/gtk/gtkcssvalueprivate.h
@@ -55,7 +55,7 @@ struct _GtkCssValueClass {
                                                        GtkCssValue                *end,
                                                        guint                       property_id,
                                                        double                      progress);
-  gboolean      (* is_dynamic)                        (GtkCssValue                *value);
+  gboolean      (* is_dynamic)                        (const GtkCssValue          *value);
   GtkCssValue * (* get_dynamic_value)                 (GtkCssValue                *value,
                                                        gint64                      monotonic_time);
   void          (* print)                             (const GtkCssValue          *value,
@@ -77,16 +77,16 @@ GtkCssValue *_gtk_css_value_compute                   (GtkCssValue
                                                        guint                       property_id,
                                                        GtkStyleProvider           *provider,
                                                        GtkCssStyle                *style,
-                                                       GtkCssStyle                *parent_style);
+                                                       GtkCssStyle                *parent_style) G_GNUC_PURE;
 gboolean     _gtk_css_value_equal                     (const GtkCssValue          *value1,
-                                                       const GtkCssValue          *value2);
+                                                       const GtkCssValue          *value2) G_GNUC_PURE;
 gboolean     _gtk_css_value_equal0                    (const GtkCssValue          *value1,
-                                                       const GtkCssValue          *value2);
+                                                       const GtkCssValue          *value2) G_GNUC_PURE;
 GtkCssValue *_gtk_css_value_transition                (GtkCssValue                *start,
                                                        GtkCssValue                *end,
                                                        guint                       property_id,
                                                        double                      progress);
-gboolean        gtk_css_value_is_dynamic              (GtkCssValue                *value);
+gboolean        gtk_css_value_is_dynamic              (const GtkCssValue          *value) G_GNUC_PURE;
 GtkCssValue *   gtk_css_value_get_dynamic_value       (GtkCssValue                *value,
                                                        gint64                      monotonic_time);
 


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