[gtk+/wip/css: 45/163] styleproperty: unconstify
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 45/163] styleproperty: unconstify
- Date: Sun, 8 Jan 2012 00:53:46 +0000 (UTC)
commit 7229601878e6d5d44b415fc6ef6dfa71ad2c04d2
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 31 16:08:23 2011 +0100
styleproperty: unconstify
GtkStyleProperty is a real GObject now, so treat it like one and don't
use const.
gtk/gtkcsslookup.c | 2 +-
gtk/gtkcssprovider.c | 14 +++++-----
gtk/gtkstyleproperties.c | 24 +++++++++---------
gtk/gtkstylepropertiesprivate.h | 4 +-
gtk/gtkstyleproperty.c | 50 +++++++++++++++++++-------------------
gtk/gtkstylepropertyprivate.h | 18 +++++++-------
6 files changed, 56 insertions(+), 56 deletions(-)
---
diff --git a/gtk/gtkcsslookup.c b/gtk/gtkcsslookup.c
index a3e272d..1dfb6b1 100644
--- a/gtk/gtkcsslookup.c
+++ b/gtk/gtkcsslookup.c
@@ -122,7 +122,7 @@ _gtk_css_lookup_resolve (GtkCssLookup *lookup,
for (i = 0; i < n; i++)
{
- const GtkStyleProperty *prop = _gtk_style_property_get (i);
+ GtkStyleProperty *prop = _gtk_style_property_get (i);
const GValue *result;
/* http://www.w3.org/TR/css3-cascade/#cascade
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 9293a55..8c90091 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1177,9 +1177,9 @@ gtk_css_ruleset_add_style (GtkCssRuleset *ruleset,
}
static void
-gtk_css_ruleset_add (GtkCssRuleset *ruleset,
- const GtkStyleProperty *prop,
- PropertyValue *value)
+gtk_css_ruleset_add (GtkCssRuleset *ruleset,
+ GtkStyleProperty *prop,
+ PropertyValue *value)
{
if (ruleset->style == NULL)
{
@@ -1199,7 +1199,7 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset,
for (i = 0; i < n_parameters; i++)
{
- const GtkStyleProperty *child;
+ GtkStyleProperty *child;
PropertyValue *val;
child = _gtk_style_property_lookup (parameters[i].name);
@@ -2305,7 +2305,7 @@ static void
parse_declaration (GtkCssScanner *scanner,
GtkCssRuleset *ruleset)
{
- const GtkStyleProperty *property;
+ GtkStyleProperty *property;
char *name;
gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_DECLARATION);
@@ -3251,8 +3251,8 @@ gtk_css_provider_get_named (const gchar *name,
static int
compare_properties (gconstpointer a, gconstpointer b)
{
- return strcmp (((const GtkStyleProperty *) a)->pspec->name,
- ((const GtkStyleProperty *) b)->pspec->name);
+ return strcmp (((GtkStyleProperty *) a)->pspec->name,
+ ((GtkStyleProperty *) b)->pspec->name);
}
static void
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index b3ef81b..cd325ae 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -399,7 +399,7 @@ gtk_style_properties_lookup_property (const gchar *property_name,
GtkStylePropertyParser *parse_func,
GParamSpec **pspec)
{
- const GtkStyleProperty *node;
+ GtkStyleProperty *node;
gboolean found = FALSE;
g_return_val_if_fail (property_name != NULL, FALSE);
@@ -521,10 +521,10 @@ gtk_style_properties_lookup_color (GtkStyleProperties *props,
}
void
-_gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
- const GtkStyleProperty *style_prop,
- GtkStateFlags state,
- const GValue *value)
+_gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
+ GtkStyleProperty *style_prop,
+ GtkStateFlags state,
+ const GValue *value)
{
GtkStylePropertiesPrivate *priv;
PropertyData *prop;
@@ -619,7 +619,7 @@ gtk_style_properties_set_property (GtkStyleProperties *props,
GtkStateFlags state,
const GValue *value)
{
- const GtkStyleProperty *node;
+ GtkStyleProperty *node;
g_return_if_fail (GTK_IS_STYLE_PROPERTIES (props));
g_return_if_fail (property != NULL);
@@ -662,7 +662,7 @@ gtk_style_properties_set_valist (GtkStyleProperties *props,
while (property_name)
{
- const GtkStyleProperty *node;
+ GtkStyleProperty *node;
gchar *error = NULL;
GValue val = G_VALUE_INIT;
@@ -716,9 +716,9 @@ gtk_style_properties_set (GtkStyleProperties *props,
}
const GValue *
-_gtk_style_properties_peek_property (GtkStyleProperties *props,
- const GtkStyleProperty *property,
- GtkStateFlags state)
+_gtk_style_properties_peek_property (GtkStyleProperties *props,
+ GtkStyleProperty *property,
+ GtkStateFlags state)
{
GtkStylePropertiesPrivate *priv;
PropertyData *prop;
@@ -741,7 +741,7 @@ _gtk_style_properties_get_property (GtkStyleProperties *props,
GtkStylePropertyContext *context,
GValue *value)
{
- const GtkStyleProperty *node;
+ GtkStyleProperty *node;
g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE);
g_return_val_if_fail (property != NULL, FALSE);
@@ -903,7 +903,7 @@ gtk_style_properties_unset_property (GtkStyleProperties *props,
GtkStateFlags state)
{
GtkStylePropertiesPrivate *priv;
- const GtkStyleProperty *node;
+ GtkStyleProperty *node;
PropertyData *prop;
guint pos;
diff --git a/gtk/gtkstylepropertiesprivate.h b/gtk/gtkstylepropertiesprivate.h
index 61f940c..efefb07 100644
--- a/gtk/gtkstylepropertiesprivate.h
+++ b/gtk/gtkstylepropertiesprivate.h
@@ -40,10 +40,10 @@ void _gtk_style_properties_get_valist (GtkStylePropertie
va_list args);
const GValue * _gtk_style_properties_peek_property (GtkStyleProperties *props,
- const GtkStyleProperty *property,
+ GtkStyleProperty *property,
GtkStateFlags state);
void _gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
- const GtkStyleProperty *property,
+ GtkStyleProperty *property,
GtkStateFlags state,
const GValue *value);
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 71d9575..f7f2efe 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -1604,7 +1604,7 @@ _gtk_style_property_get_count (void)
return __style_property_array ? __style_property_array->len : 0;
}
-const GtkStyleProperty *
+GtkStyleProperty *
_gtk_style_property_get (guint id)
{
g_assert (__style_property_array);
@@ -1694,10 +1694,10 @@ css_string_funcs_init (void)
}
gboolean
-_gtk_style_property_parse_value (const GtkStyleProperty *property,
- GValue *value,
- GtkCssParser *parser,
- GFile *base)
+_gtk_style_property_parse_value (GtkStyleProperty *property,
+ GValue *value,
+ GtkCssParser *parser,
+ GFile *base)
{
GtkStyleParseFunc func;
@@ -1772,9 +1772,9 @@ _gtk_style_property_parse_value (const GtkStyleProperty *property,
}
void
-_gtk_style_property_print_value (const GtkStyleProperty *property,
- const GValue *value,
- GString *string)
+_gtk_style_property_print_value (GtkStyleProperty *property,
+ const GValue *value,
+ GString *string)
{
GtkStylePrintFunc func;
@@ -1806,16 +1806,16 @@ _gtk_style_property_print_value (const GtkStyleProperty *property,
}
static void
-_gtk_style_property_default_value (const GtkStyleProperty *property,
- GtkStyleProperties *properties,
- GtkStateFlags state,
- GValue *value)
+_gtk_style_property_default_value (GtkStyleProperty *property,
+ GtkStyleProperties *properties,
+ GtkStateFlags state,
+ GValue *value)
{
g_value_copy (&property->initial_value, value);
}
gboolean
-_gtk_style_property_is_inherit (const GtkStyleProperty *property)
+_gtk_style_property_is_inherit (GtkStyleProperty *property)
{
g_return_val_if_fail (property != NULL, FALSE);
@@ -1823,7 +1823,7 @@ _gtk_style_property_is_inherit (const GtkStyleProperty *property)
}
guint
-_gtk_style_property_get_id (const GtkStyleProperty *property)
+_gtk_style_property_get_id (GtkStyleProperty *property)
{
g_return_val_if_fail (property != NULL, FALSE);
@@ -1931,7 +1931,7 @@ resolve_shadow (GtkStyleProperties *props,
}
static void
-_gtk_style_property_resolve (const GtkStyleProperty *property,
+_gtk_style_property_resolve (GtkStyleProperty *property,
GtkStyleProperties *props,
GtkStateFlags state,
GtkStylePropertyContext *context,
@@ -2005,7 +2005,7 @@ _gtk_style_property_resolve (const GtkStyleProperty *property,
}
const GValue *
-_gtk_style_property_get_initial_value (const GtkStyleProperty *property)
+_gtk_style_property_get_initial_value (GtkStyleProperty *property)
{
g_return_val_if_fail (property != NULL, NULL);
@@ -2013,9 +2013,9 @@ _gtk_style_property_get_initial_value (const GtkStyleProperty *property)
}
GParameter *
-_gtk_style_property_unpack (const GtkStyleProperty *property,
- const GValue *value,
- guint *n_params)
+_gtk_style_property_unpack (GtkStyleProperty *property,
+ const GValue *value,
+ guint *n_params)
{
g_return_val_if_fail (property != NULL, NULL);
g_return_val_if_fail (property->unpack_func != NULL, NULL);
@@ -2026,11 +2026,11 @@ _gtk_style_property_unpack (const GtkStyleProperty *property,
}
static void
-_gtk_style_property_pack (const GtkStyleProperty *property,
- GtkStyleProperties *props,
- GtkStateFlags state,
+_gtk_style_property_pack (GtkStyleProperty *property,
+ GtkStyleProperties *props,
+ GtkStateFlags state,
GtkStylePropertyContext *context,
- GValue *value)
+ GValue *value)
{
g_return_if_fail (property != NULL);
g_return_if_fail (property->pack_func != NULL);
@@ -2041,7 +2041,7 @@ _gtk_style_property_pack (const GtkStyleProperty *property,
}
void
-_gtk_style_property_query (const GtkStyleProperty *property,
+_gtk_style_property_query (GtkStyleProperty *property,
GtkStyleProperties *props,
GtkStateFlags state,
GtkStylePropertyContext *context,
@@ -2419,7 +2419,7 @@ gtk_style_property_init_properties (void)
* Returns: (transfer none): The property or %NULL if no
* property with the given name exists.
**/
-const GtkStyleProperty *
+GtkStyleProperty *
_gtk_style_property_lookup (const char *name)
{
GtkStylePropertyClass *klass;
diff --git a/gtk/gtkstylepropertyprivate.h b/gtk/gtkstylepropertyprivate.h
index 8926ce1..946d2cb 100644
--- a/gtk/gtkstylepropertyprivate.h
+++ b/gtk/gtkstylepropertyprivate.h
@@ -82,9 +82,9 @@ struct _GtkStylePropertyClass
GType _gtk_style_property_get_type (void) G_GNUC_CONST;
guint _gtk_style_property_get_count (void);
-const GtkStyleProperty * _gtk_style_property_get (guint id);
+GtkStyleProperty * _gtk_style_property_get (guint id);
-const GtkStyleProperty * _gtk_style_property_lookup (const char *name);
+GtkStyleProperty * _gtk_style_property_lookup (const char *name);
const char * _gtk_style_property_get_name (GtkStyleProperty *property);
@@ -95,25 +95,25 @@ void _gtk_style_property_register (GParamSpec
GtkStylePrintFunc print_func,
const GValue *initial_value);
-gboolean _gtk_style_property_is_inherit (const GtkStyleProperty *property);
-guint _gtk_style_property_get_id (const GtkStyleProperty *property);
+gboolean _gtk_style_property_is_inherit (GtkStyleProperty * property);
+guint _gtk_style_property_get_id (GtkStyleProperty * property);
const GValue * _gtk_style_property_get_initial_value
- (const GtkStyleProperty *property);
+ (GtkStyleProperty * property);
-GParameter * _gtk_style_property_unpack (const GtkStyleProperty *property,
+GParameter * _gtk_style_property_unpack (GtkStyleProperty * property,
const GValue *value,
guint *n_params);
-gboolean _gtk_style_property_parse_value (const GtkStyleProperty *property,
+gboolean _gtk_style_property_parse_value (GtkStyleProperty * property,
GValue *value,
GtkCssParser *parser,
GFile *base);
-void _gtk_style_property_print_value (const GtkStyleProperty *property,
+void _gtk_style_property_print_value (GtkStyleProperty * property,
const GValue *value,
GString *string);
-void _gtk_style_property_query (const GtkStyleProperty *property,
+void _gtk_style_property_query (GtkStyleProperty * property,
GtkStyleProperties *props,
GtkStateFlags state,
GtkStylePropertyContext *context,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]