mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
a11y: Add utility function for null refs
ATSPI was written for CORBA, which allows passing around "nil" as valid object references.
This commit is contained in:
parent
9d0952bd7f
commit
35163bd7cc
@ -426,7 +426,7 @@ handle_accessible_get_property (GDBusConnection *connection,
|
||||
}
|
||||
|
||||
if (res == NULL)
|
||||
res = g_variant_new ("(so)", "", "/org/a11y/atspi/null");
|
||||
res = gtk_at_spi_null_ref ();
|
||||
}
|
||||
else if (g_strcmp0 (property_name, "ChildCount") == 0)
|
||||
{
|
||||
|
@ -275,3 +275,9 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role)
|
||||
|
||||
return GTK_ACCESSIBLE_ROLE_WIDGET;
|
||||
}
|
||||
|
||||
GVariant *
|
||||
gtk_at_spi_null_ref (void)
|
||||
{
|
||||
return g_variant_new ("(so)", "", "/org/a11y/atspi/null");
|
||||
}
|
||||
|
@ -26,4 +26,7 @@ G_BEGIN_DECLS
|
||||
AtspiRole
|
||||
gtk_accessible_role_to_atspi_role (GtkAccessibleRole role);
|
||||
|
||||
GVariant *
|
||||
gtk_at_spi_null_ref (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
Loading…
Reference in New Issue
Block a user