mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
css: Add a helper function for parsing
This will be helpful in gradient parsing code, where the color interpolation is optional.
This commit is contained in:
parent
57073e1057
commit
500a3a6dee
@ -1009,6 +1009,12 @@ parse_hue_interpolation (GtkCssParser *parser,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_css_color_interpolation_method_can_parse (GtkCssParser *parser)
|
||||
{
|
||||
return gtk_css_token_is_ident (gtk_css_parser_get_token (parser), "in");
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_css_color_interpolation_method_parse (GtkCssParser *parser,
|
||||
GtkCssColorSpace *in,
|
||||
|
@ -105,6 +105,8 @@ void gtk_css_color_space_get_coord_range (GtkCssColorSpace color_space,
|
||||
float *lower,
|
||||
float *upper);
|
||||
|
||||
gboolean gtk_css_color_interpolation_method_can_parse (GtkCssParser *parser);
|
||||
|
||||
gboolean gtk_css_color_interpolation_method_parse (GtkCssParser *parser,
|
||||
GtkCssColorSpace *in,
|
||||
GtkCssHueInterpolation *interp);
|
||||
|
Loading…
Reference in New Issue
Block a user