styleproperty: unconstify

GtkStyleProperty is a real GObject now, so treat it like one and don't
use const.
This commit is contained in:
Benjamin Otte 2011-12-31 16:08:23 +01:00
parent a3a580d53e
commit 4383701e25
6 changed files with 56 additions and 56 deletions

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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,