forked from AuroraMiddleware/gtk
cssvalue: Constify a bunch of APIs
This commit is contained in:
parent
4a12717e4d
commit
5bbf59b519
@ -664,7 +664,7 @@ pack_border_radius (GtkCssShorthandProperty *shorthand,
|
||||
GtkStyleQueryFunc query_func,
|
||||
gpointer query_data)
|
||||
{
|
||||
GtkCssBorderCornerRadius *top_left;
|
||||
const GtkCssBorderCornerRadius *top_left;
|
||||
GtkCssStyleProperty *prop;
|
||||
GtkCssValue *v;
|
||||
int value = 0;
|
||||
|
@ -675,7 +675,7 @@ background_size_compute (GtkCssStyleProperty *property,
|
||||
GtkStyleContext *context,
|
||||
GtkCssValue *specified)
|
||||
{
|
||||
GtkCssBackgroundSize *ssize = _gtk_css_value_get_background_size (specified);
|
||||
const GtkCssBackgroundSize *ssize = _gtk_css_value_get_background_size (specified);
|
||||
GtkCssBackgroundSize csize;
|
||||
gboolean changed;
|
||||
|
||||
@ -852,7 +852,7 @@ background_position_compute (GtkCssStyleProperty *property,
|
||||
GtkStyleContext *context,
|
||||
GtkCssValue *specified)
|
||||
{
|
||||
GtkCssBackgroundPosition *spos = _gtk_css_value_get_background_position (specified);
|
||||
const GtkCssBackgroundPosition *spos = _gtk_css_value_get_background_position (specified);
|
||||
GtkCssBackgroundPosition cpos;
|
||||
gboolean changed;
|
||||
|
||||
|
@ -493,7 +493,7 @@ _gtk_css_value_get_special_kind (GtkCssValue *value)
|
||||
return value->u.gint;
|
||||
}
|
||||
|
||||
GtkCssNumber *
|
||||
const GtkCssNumber *
|
||||
_gtk_css_value_get_number (GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (_gtk_css_value_holds (value, GTK_TYPE_CSS_NUMBER), NULL);
|
||||
@ -572,28 +572,28 @@ _gtk_css_value_get_border_style (GtkCssValue *value)
|
||||
return value->u.gint;
|
||||
}
|
||||
|
||||
GtkCssBackgroundSize *
|
||||
const GtkCssBackgroundSize *
|
||||
_gtk_css_value_get_background_size (GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (_gtk_css_value_holds (value, GTK_TYPE_CSS_BACKGROUND_SIZE), NULL);
|
||||
return value->u.ptr;
|
||||
}
|
||||
|
||||
GtkCssBackgroundPosition *
|
||||
const GtkCssBackgroundPosition *
|
||||
_gtk_css_value_get_background_position (GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (_gtk_css_value_holds (value, GTK_TYPE_CSS_BACKGROUND_POSITION), NULL);
|
||||
return value->u.ptr;
|
||||
}
|
||||
|
||||
GtkCssBorderImageRepeat *
|
||||
const GtkCssBorderImageRepeat *
|
||||
_gtk_css_value_get_border_image_repeat (GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (_gtk_css_value_holds (value, GTK_TYPE_CSS_BORDER_IMAGE_REPEAT), NULL);
|
||||
return value->u.ptr;
|
||||
}
|
||||
|
||||
GtkCssBorderCornerRadius *
|
||||
const GtkCssBorderCornerRadius *
|
||||
_gtk_css_value_get_border_corner_radius (GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (_gtk_css_value_holds (value, GTK_TYPE_CSS_BORDER_CORNER_RADIUS), NULL);
|
||||
@ -628,7 +628,7 @@ _gtk_css_value_get_pango_weight (GtkCssValue *value)
|
||||
return value->u.gint;
|
||||
}
|
||||
|
||||
GdkRGBA *
|
||||
const GdkRGBA *
|
||||
_gtk_css_value_get_rgba (GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (_gtk_css_value_holds (value, GDK_TYPE_RGBA), NULL);
|
||||
|
@ -73,19 +73,19 @@ gpointer _gtk_css_value_dup_object (GtkCssValue
|
||||
gpointer _gtk_css_value_get_object (GtkCssValue *value);
|
||||
gpointer _gtk_css_value_get_boxed (GtkCssValue *value);
|
||||
const char ** _gtk_css_value_get_strv (GtkCssValue *value);
|
||||
GtkCssNumber *_gtk_css_value_get_number (GtkCssValue *value);
|
||||
const GtkCssNumber *_gtk_css_value_get_number (GtkCssValue *value);
|
||||
GtkSymbolicColor *_gtk_css_value_get_symbolic_color (GtkCssValue *value);
|
||||
GtkCssImage *_gtk_css_value_get_image (GtkCssValue *value);
|
||||
GtkBorderStyle _gtk_css_value_get_border_style (GtkCssValue *value);
|
||||
GtkCssBackgroundSize *_gtk_css_value_get_background_size (GtkCssValue *value);
|
||||
GtkCssBackgroundPosition *_gtk_css_value_get_background_position (GtkCssValue *value);
|
||||
GtkCssBorderCornerRadius *_gtk_css_value_get_border_corner_radius (GtkCssValue *value);
|
||||
GtkCssBorderImageRepeat *_gtk_css_value_get_border_image_repeat (GtkCssValue *value);
|
||||
const GtkCssBackgroundSize *_gtk_css_value_get_background_size (GtkCssValue *value);
|
||||
const GtkCssBackgroundPosition *_gtk_css_value_get_background_position (GtkCssValue *value);
|
||||
const GtkCssBorderCornerRadius *_gtk_css_value_get_border_corner_radius (GtkCssValue *value);
|
||||
const GtkCssBorderImageRepeat *_gtk_css_value_get_border_image_repeat (GtkCssValue *value);
|
||||
PangoFontDescription * _gtk_css_value_get_font_description (GtkCssValue *value);
|
||||
PangoStyle _gtk_css_value_get_pango_style (GtkCssValue *value);
|
||||
PangoVariant _gtk_css_value_get_pango_variant (GtkCssValue *value);
|
||||
PangoWeight _gtk_css_value_get_pango_weight (GtkCssValue *value);
|
||||
GdkRGBA *_gtk_css_value_get_rgba (GtkCssValue *value);
|
||||
const GdkRGBA *_gtk_css_value_get_rgba (GtkCssValue *value);
|
||||
cairo_pattern_t *_gtk_css_value_get_pattern (GtkCssValue *value);
|
||||
GtkGradient *_gtk_css_value_get_gradient (GtkCssValue *value);
|
||||
GtkShadow *_gtk_css_value_get_shadow (GtkCssValue *value);
|
||||
|
@ -161,8 +161,8 @@ _gtk_theming_background_paint (GtkThemingBackground *bg,
|
||||
&& bg->image_rect.height > 0)
|
||||
{
|
||||
GtkCssBackgroundRepeat hrepeat, vrepeat;
|
||||
GtkCssBackgroundSize *size;
|
||||
GtkCssBackgroundPosition *pos;
|
||||
const GtkCssBackgroundSize *size;
|
||||
const GtkCssBackgroundPosition *pos;
|
||||
double image_width, image_height;
|
||||
double width, height;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user