[gtk/a11y/atspi] a11y: Add utility function for null refs
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/a11y/atspi] a11y: Add utility function for null refs
- Date: Sat, 10 Oct 2020 11:59:22 +0000 (UTC)
commit eefa71508ced0738748ea0bb3d1a0cca8b472520
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Oct 10 12:51:03 2020 +0100
a11y: Add utility function for null refs
ATSPI was written for CORBA, which allows passing around "nil"
as valid object references.
gtk/a11y/gtkatspiutils.c | 6 ++++++
gtk/a11y/gtkatspiutilsprivate.h | 3 +++
2 files changed, 9 insertions(+)
---
diff --git a/gtk/a11y/gtkatspiutils.c b/gtk/a11y/gtkatspiutils.c
index 4233904bb5..7a572ee41f 100644
--- a/gtk/a11y/gtkatspiutils.c
+++ b/gtk/a11y/gtkatspiutils.c
@@ -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");
+}
diff --git a/gtk/a11y/gtkatspiutilsprivate.h b/gtk/a11y/gtkatspiutilsprivate.h
index b882585a01..6d4f661026 100644
--- a/gtk/a11y/gtkatspiutilsprivate.h
+++ b/gtk/a11y/gtkatspiutilsprivate.h
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]