a11y: Implement get_default_attributes for Text

This commit is contained in:
Emmanuele Bassi 2024-03-03 14:26:33 +00:00
parent d9447fd2e7
commit 7e522a8c55

View File

@ -7527,6 +7527,20 @@ gtk_text_accessible_text_get_attributes (GtkAccessibleText *self,
return TRUE;
}
static void
gtk_text_accessible_text_get_default_attributes (GtkAccessibleText *self,
char ***attribute_names,
char ***attribute_values)
{
PangoLayout *layout = gtk_text_get_layout (GTK_TEXT (self));
char **names, **values;
gtk_pango_get_default_attributes (layout, &names, &values);
*attribute_names = names;
*attribute_values = values;
}
static void
gtk_text_accessible_text_init (GtkAccessibleTextInterface *iface)
{
@ -7534,6 +7548,7 @@ gtk_text_accessible_text_init (GtkAccessibleTextInterface *iface)
iface->get_caret_position = gtk_text_accessible_text_get_caret_position;
iface->get_selection = gtk_text_accessible_text_get_selection;
iface->get_attributes = gtk_text_accessible_text_get_attributes;
iface->get_default_attributes = gtk_text_accessible_text_get_default_attributes;
}
/* vim:set foldmethod=marker expandtab: */