Commit 4383701e authored by Benjamin Otte's avatar Benjamin Otte

styleproperty: unconstify

GtkStyleProperty is a real GObject now, so treat it like one and don't
use const.
parent a3a580d5
...@@ -122,7 +122,7 @@ _gtk_css_lookup_resolve (GtkCssLookup *lookup, ...@@ -122,7 +122,7 @@ _gtk_css_lookup_resolve (GtkCssLookup *lookup,
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
{ {
const GtkStyleProperty *prop = _gtk_style_property_get (i); GtkStyleProperty *prop = _gtk_style_property_get (i);
const GValue *result; const GValue *result;
/* http://www.w3.org/TR/css3-cascade/#cascade /* http://www.w3.org/TR/css3-cascade/#cascade
......
...@@ -1178,7 +1178,7 @@ gtk_css_ruleset_add_style (GtkCssRuleset *ruleset, ...@@ -1178,7 +1178,7 @@ gtk_css_ruleset_add_style (GtkCssRuleset *ruleset,
static void static void
gtk_css_ruleset_add (GtkCssRuleset *ruleset, gtk_css_ruleset_add (GtkCssRuleset *ruleset,
const GtkStyleProperty *prop, GtkStyleProperty *prop,
PropertyValue *value) PropertyValue *value)
{ {
if (ruleset->style == NULL) if (ruleset->style == NULL)
...@@ -1199,7 +1199,7 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset, ...@@ -1199,7 +1199,7 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset,
for (i = 0; i < n_parameters; i++) for (i = 0; i < n_parameters; i++)
{ {
const GtkStyleProperty *child; GtkStyleProperty *child;
PropertyValue *val; PropertyValue *val;
child = _gtk_style_property_lookup (parameters[i].name); child = _gtk_style_property_lookup (parameters[i].name);
...@@ -2305,7 +2305,7 @@ static void ...@@ -2305,7 +2305,7 @@ static void
parse_declaration (GtkCssScanner *scanner, parse_declaration (GtkCssScanner *scanner,
GtkCssRuleset *ruleset) GtkCssRuleset *ruleset)
{ {
const GtkStyleProperty *property; GtkStyleProperty *property;
char *name; char *name;
gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_DECLARATION); gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_DECLARATION);
...@@ -3251,8 +3251,8 @@ gtk_css_provider_get_named (const gchar *name, ...@@ -3251,8 +3251,8 @@ gtk_css_provider_get_named (const gchar *name,
static int static int
compare_properties (gconstpointer a, gconstpointer b) compare_properties (gconstpointer a, gconstpointer b)
{ {
return strcmp (((const GtkStyleProperty *) a)->pspec->name, return strcmp (((GtkStyleProperty *) a)->pspec->name,
((const GtkStyleProperty *) b)->pspec->name); ((GtkStyleProperty *) b)->pspec->name);
} }
static void static void
......
...@@ -399,7 +399,7 @@ gtk_style_properties_lookup_property (const gchar *property_name, ...@@ -399,7 +399,7 @@ gtk_style_properties_lookup_property (const gchar *property_name,
GtkStylePropertyParser *parse_func, GtkStylePropertyParser *parse_func,
GParamSpec **pspec) GParamSpec **pspec)
{ {
const GtkStyleProperty *node; GtkStyleProperty *node;
gboolean found = FALSE; gboolean found = FALSE;
g_return_val_if_fail (property_name != NULL, FALSE); g_return_val_if_fail (property_name != NULL, FALSE);
...@@ -522,7 +522,7 @@ gtk_style_properties_lookup_color (GtkStyleProperties *props, ...@@ -522,7 +522,7 @@ gtk_style_properties_lookup_color (GtkStyleProperties *props,
void void
_gtk_style_properties_set_property_by_property (GtkStyleProperties *props, _gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
const GtkStyleProperty *style_prop, GtkStyleProperty *style_prop,
GtkStateFlags state, GtkStateFlags state,
const GValue *value) const GValue *value)
{ {
...@@ -619,7 +619,7 @@ gtk_style_properties_set_property (GtkStyleProperties *props, ...@@ -619,7 +619,7 @@ gtk_style_properties_set_property (GtkStyleProperties *props,
GtkStateFlags state, GtkStateFlags state,
const GValue *value) const GValue *value)
{ {
const GtkStyleProperty *node; GtkStyleProperty *node;
g_return_if_fail (GTK_IS_STYLE_PROPERTIES (props)); g_return_if_fail (GTK_IS_STYLE_PROPERTIES (props));
g_return_if_fail (property != NULL); g_return_if_fail (property != NULL);
...@@ -662,7 +662,7 @@ gtk_style_properties_set_valist (GtkStyleProperties *props, ...@@ -662,7 +662,7 @@ gtk_style_properties_set_valist (GtkStyleProperties *props,
while (property_name) while (property_name)
{ {
const GtkStyleProperty *node; GtkStyleProperty *node;
gchar *error = NULL; gchar *error = NULL;
GValue val = G_VALUE_INIT; GValue val = G_VALUE_INIT;
...@@ -717,7 +717,7 @@ gtk_style_properties_set (GtkStyleProperties *props, ...@@ -717,7 +717,7 @@ gtk_style_properties_set (GtkStyleProperties *props,
const GValue * const GValue *
_gtk_style_properties_peek_property (GtkStyleProperties *props, _gtk_style_properties_peek_property (GtkStyleProperties *props,
const GtkStyleProperty *property, GtkStyleProperty *property,
GtkStateFlags state) GtkStateFlags state)
{ {
GtkStylePropertiesPrivate *priv; GtkStylePropertiesPrivate *priv;
...@@ -741,7 +741,7 @@ _gtk_style_properties_get_property (GtkStyleProperties *props, ...@@ -741,7 +741,7 @@ _gtk_style_properties_get_property (GtkStyleProperties *props,
GtkStylePropertyContext *context, GtkStylePropertyContext *context,
GValue *value) GValue *value)
{ {
const GtkStyleProperty *node; GtkStyleProperty *node;
g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE); g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE);
g_return_val_if_fail (property != NULL, FALSE); g_return_val_if_fail (property != NULL, FALSE);
...@@ -903,7 +903,7 @@ gtk_style_properties_unset_property (GtkStyleProperties *props, ...@@ -903,7 +903,7 @@ gtk_style_properties_unset_property (GtkStyleProperties *props,
GtkStateFlags state) GtkStateFlags state)
{ {
GtkStylePropertiesPrivate *priv; GtkStylePropertiesPrivate *priv;
const GtkStyleProperty *node; GtkStyleProperty *node;
PropertyData *prop; PropertyData *prop;
guint pos; guint pos;
......
...@@ -40,10 +40,10 @@ void _gtk_style_properties_get_valist (GtkStylePropertie ...@@ -40,10 +40,10 @@ void _gtk_style_properties_get_valist (GtkStylePropertie
va_list args); va_list args);
const GValue * _gtk_style_properties_peek_property (GtkStyleProperties *props, const GValue * _gtk_style_properties_peek_property (GtkStyleProperties *props,
const GtkStyleProperty *property, GtkStyleProperty *property,
GtkStateFlags state); GtkStateFlags state);
void _gtk_style_properties_set_property_by_property (GtkStyleProperties *props, void _gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
const GtkStyleProperty *property, GtkStyleProperty *property,
GtkStateFlags state, GtkStateFlags state,
const GValue *value); const GValue *value);
......
...@@ -1604,7 +1604,7 @@ _gtk_style_property_get_count (void) ...@@ -1604,7 +1604,7 @@ _gtk_style_property_get_count (void)
return __style_property_array ? __style_property_array->len : 0; return __style_property_array ? __style_property_array->len : 0;
} }
const GtkStyleProperty * GtkStyleProperty *
_gtk_style_property_get (guint id) _gtk_style_property_get (guint id)
{ {
g_assert (__style_property_array); g_assert (__style_property_array);
...@@ -1694,7 +1694,7 @@ css_string_funcs_init (void) ...@@ -1694,7 +1694,7 @@ css_string_funcs_init (void)
} }
gboolean gboolean
_gtk_style_property_parse_value (const GtkStyleProperty *property, _gtk_style_property_parse_value (GtkStyleProperty *property,
GValue *value, GValue *value,
GtkCssParser *parser, GtkCssParser *parser,
GFile *base) GFile *base)
...@@ -1772,7 +1772,7 @@ _gtk_style_property_parse_value (const GtkStyleProperty *property, ...@@ -1772,7 +1772,7 @@ _gtk_style_property_parse_value (const GtkStyleProperty *property,
} }
void void
_gtk_style_property_print_value (const GtkStyleProperty *property, _gtk_style_property_print_value (GtkStyleProperty *property,
const GValue *value, const GValue *value,
GString *string) GString *string)
{ {
...@@ -1806,7 +1806,7 @@ _gtk_style_property_print_value (const GtkStyleProperty *property, ...@@ -1806,7 +1806,7 @@ _gtk_style_property_print_value (const GtkStyleProperty *property,
} }
static void static void
_gtk_style_property_default_value (const GtkStyleProperty *property, _gtk_style_property_default_value (GtkStyleProperty *property,
GtkStyleProperties *properties, GtkStyleProperties *properties,
GtkStateFlags state, GtkStateFlags state,
GValue *value) GValue *value)
...@@ -1815,7 +1815,7 @@ _gtk_style_property_default_value (const GtkStyleProperty *property, ...@@ -1815,7 +1815,7 @@ _gtk_style_property_default_value (const GtkStyleProperty *property,
} }
gboolean gboolean
_gtk_style_property_is_inherit (const GtkStyleProperty *property) _gtk_style_property_is_inherit (GtkStyleProperty *property)
{ {
g_return_val_if_fail (property != NULL, FALSE); g_return_val_if_fail (property != NULL, FALSE);
...@@ -1823,7 +1823,7 @@ _gtk_style_property_is_inherit (const GtkStyleProperty *property) ...@@ -1823,7 +1823,7 @@ _gtk_style_property_is_inherit (const GtkStyleProperty *property)
} }
guint guint
_gtk_style_property_get_id (const GtkStyleProperty *property) _gtk_style_property_get_id (GtkStyleProperty *property)
{ {
g_return_val_if_fail (property != NULL, FALSE); g_return_val_if_fail (property != NULL, FALSE);
...@@ -1931,7 +1931,7 @@ resolve_shadow (GtkStyleProperties *props, ...@@ -1931,7 +1931,7 @@ resolve_shadow (GtkStyleProperties *props,
} }
static void static void
_gtk_style_property_resolve (const GtkStyleProperty *property, _gtk_style_property_resolve (GtkStyleProperty *property,
GtkStyleProperties *props, GtkStyleProperties *props,
GtkStateFlags state, GtkStateFlags state,
GtkStylePropertyContext *context, GtkStylePropertyContext *context,
...@@ -2005,7 +2005,7 @@ _gtk_style_property_resolve (const GtkStyleProperty *property, ...@@ -2005,7 +2005,7 @@ _gtk_style_property_resolve (const GtkStyleProperty *property,
} }
const GValue * 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); g_return_val_if_fail (property != NULL, NULL);
...@@ -2013,7 +2013,7 @@ _gtk_style_property_get_initial_value (const GtkStyleProperty *property) ...@@ -2013,7 +2013,7 @@ _gtk_style_property_get_initial_value (const GtkStyleProperty *property)
} }
GParameter * GParameter *
_gtk_style_property_unpack (const GtkStyleProperty *property, _gtk_style_property_unpack (GtkStyleProperty *property,
const GValue *value, const GValue *value,
guint *n_params) guint *n_params)
{ {
...@@ -2026,7 +2026,7 @@ _gtk_style_property_unpack (const GtkStyleProperty *property, ...@@ -2026,7 +2026,7 @@ _gtk_style_property_unpack (const GtkStyleProperty *property,
} }
static void static void
_gtk_style_property_pack (const GtkStyleProperty *property, _gtk_style_property_pack (GtkStyleProperty *property,
GtkStyleProperties *props, GtkStyleProperties *props,
GtkStateFlags state, GtkStateFlags state,
GtkStylePropertyContext *context, GtkStylePropertyContext *context,
...@@ -2041,7 +2041,7 @@ _gtk_style_property_pack (const GtkStyleProperty *property, ...@@ -2041,7 +2041,7 @@ _gtk_style_property_pack (const GtkStyleProperty *property,
} }
void void
_gtk_style_property_query (const GtkStyleProperty *property, _gtk_style_property_query (GtkStyleProperty *property,
GtkStyleProperties *props, GtkStyleProperties *props,
GtkStateFlags state, GtkStateFlags state,
GtkStylePropertyContext *context, GtkStylePropertyContext *context,
...@@ -2419,7 +2419,7 @@ gtk_style_property_init_properties (void) ...@@ -2419,7 +2419,7 @@ gtk_style_property_init_properties (void)
* Returns: (transfer none): The property or %NULL if no * Returns: (transfer none): The property or %NULL if no
* property with the given name exists. * property with the given name exists.
**/ **/
const GtkStyleProperty * GtkStyleProperty *
_gtk_style_property_lookup (const char *name) _gtk_style_property_lookup (const char *name)
{ {
GtkStylePropertyClass *klass; GtkStylePropertyClass *klass;
......
...@@ -82,9 +82,9 @@ struct _GtkStylePropertyClass ...@@ -82,9 +82,9 @@ struct _GtkStylePropertyClass
GType _gtk_style_property_get_type (void) G_GNUC_CONST; GType _gtk_style_property_get_type (void) G_GNUC_CONST;
guint _gtk_style_property_get_count (void); 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); const char * _gtk_style_property_get_name (GtkStyleProperty *property);
...@@ -95,25 +95,25 @@ void _gtk_style_property_register (GParamSpec ...@@ -95,25 +95,25 @@ void _gtk_style_property_register (GParamSpec
GtkStylePrintFunc print_func, GtkStylePrintFunc print_func,
const GValue *initial_value); const GValue *initial_value);
gboolean _gtk_style_property_is_inherit (const GtkStyleProperty *property); gboolean _gtk_style_property_is_inherit (GtkStyleProperty * property);
guint _gtk_style_property_get_id (const GtkStyleProperty *property); guint _gtk_style_property_get_id (GtkStyleProperty * property);
const GValue * _gtk_style_property_get_initial_value 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, const GValue *value,
guint *n_params); guint *n_params);
gboolean _gtk_style_property_parse_value (const GtkStyleProperty *property, gboolean _gtk_style_property_parse_value (GtkStyleProperty * property,
GValue *value, GValue *value,
GtkCssParser *parser, GtkCssParser *parser,
GFile *base); GFile *base);
void _gtk_style_property_print_value (const GtkStyleProperty *property, void _gtk_style_property_print_value (GtkStyleProperty * property,
const GValue *value, const GValue *value,
GString *string); GString *string);
void _gtk_style_property_query (const GtkStyleProperty *property, void _gtk_style_property_query (GtkStyleProperty * property,
GtkStyleProperties *props, GtkStyleProperties *props,
GtkStateFlags state, GtkStateFlags state,
GtkStylePropertyContext *context, GtkStylePropertyContext *context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment