Add gtk_css_parser_has_percentage

This commit is contained in:
Matthias Clasen 2024-08-03 13:25:31 -04:00
parent 5574bf59f6
commit 12e0ec0b48
2 changed files with 11 additions and 0 deletions

View File

@ -953,6 +953,16 @@ gtk_css_parser_has_integer (GtkCssParser *self)
gtk_css_token_is (token, GTK_CSS_TOKEN_SIGNLESS_INTEGER);
}
gboolean
gtk_css_parser_has_percentage (GtkCssParser *self)
{
const GtkCssToken *token;
token = gtk_css_parser_get_token (self);
return gtk_css_token_is (token, GTK_CSS_TOKEN_PERCENTAGE);
}
/**
* gtk_css_parser_has_function:
* @self: a `GtkCssParser`

View File

@ -132,6 +132,7 @@ gboolean gtk_css_parser_has_ident (GtkCssParser
gboolean gtk_css_parser_has_url (GtkCssParser *self);
gboolean gtk_css_parser_has_number (GtkCssParser *self);
gboolean gtk_css_parser_has_integer (GtkCssParser *self);
gboolean gtk_css_parser_has_percentage (GtkCssParser *self);
gboolean gtk_css_parser_has_function (GtkCssParser *self,
const char *name);