forked from AuroraMiddleware/gtk
styleproperty: unconstify
GtkStyleProperty is a real GObject now, so treat it like one and don't use const.
This commit is contained in:
parent
a3a580d53e
commit
4383701e25
@ -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
|
||||||
|
@ -1177,9 +1177,9 @@ 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,
|
|||||||
|
|
||||||
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
|
|||||||
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,
|
|||||||
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,
|
|||||||
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);
|
||||||
@ -521,10 +521,10 @@ 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)
|
||||||
{
|
{
|
||||||
GtkStylePropertiesPrivate *priv;
|
GtkStylePropertiesPrivate *priv;
|
||||||
PropertyData *prop;
|
PropertyData *prop;
|
||||||
@ -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,
|
|||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@ -716,9 +716,9 @@ 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;
|
||||||
PropertyData *prop;
|
PropertyData *prop;
|
||||||
@ -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,
|
|||||||
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
|
|||||||
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)
|
|||||||
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,10 +1694,10 @@ 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)
|
||||||
{
|
{
|
||||||
GtkStyleParseFunc func;
|
GtkStyleParseFunc func;
|
||||||
|
|
||||||
@ -1772,9 +1772,9 @@ _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)
|
||||||
{
|
{
|
||||||
GtkStylePrintFunc func;
|
GtkStylePrintFunc func;
|
||||||
|
|
||||||
@ -1806,16 +1806,16 @@ _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)
|
||||||
{
|
{
|
||||||
g_value_copy (&property->initial_value, value);
|
g_value_copy (&property->initial_value, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,9 +2013,9 @@ _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)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (property != NULL, NULL);
|
g_return_val_if_fail (property != NULL, NULL);
|
||||||
g_return_val_if_fail (property->unpack_func != 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
|
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,
|
||||||
GValue *value)
|
GValue *value)
|
||||||
{
|
{
|
||||||
g_return_if_fail (property != NULL);
|
g_return_if_fail (property != NULL);
|
||||||
g_return_if_fail (property->pack_func != NULL);
|
g_return_if_fail (property->pack_func != NULL);
|
||||||
@ -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)
|
|||||||
* 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
|
|||||||
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
|
|||||||
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user