css parser: Add gtk_css_parser_get_bytes

Gets the bytes that the parser is operating on.
This commit is contained in:
Matthias Clasen 2024-05-09 22:38:31 -04:00 committed by Alice Mikhaylenko
parent 77028362ab
commit fc1c6cfb1a
2 changed files with 7 additions and 0 deletions

View File

@ -228,6 +228,12 @@ gtk_css_parser_get_file (GtkCssParser *self)
return self->file;
}
GBytes *
gtk_css_parser_get_bytes (GtkCssParser *self)
{
return gtk_css_tokenizer_get_bytes (gtk_css_tokenizers_get (&self->tokenizers, 0)->tokenizer);
}
/**
* gtk_css_parser_resolve_url:
* @self: a `GtkCssParser`

View File

@ -70,6 +70,7 @@ GtkCssParser * gtk_css_parser_ref (GtkCssParser
void gtk_css_parser_unref (GtkCssParser *self);
GFile * gtk_css_parser_get_file (GtkCssParser *self) G_GNUC_PURE;
GBytes * gtk_css_parser_get_bytes (GtkCssParser *self) G_GNUC_PURE;
GFile * gtk_css_parser_resolve_url (GtkCssParser *self,
const char *url);