summaryrefslogtreecommitdiff
path: root/gtk/gtkaccessible.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-10-19 11:33:38 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-10-19 12:19:55 -0400
commitd50ebd947ce33ec026a566bdbce5c7ee01457c98 (patch)
treeb0e14a5aa7ab37919c3da1c5fb3173a59d5f2d5c /gtk/gtkaccessible.c
parent8e4f8a45a9b8cda3bc3d12fb50d805897b1902e2 (diff)
downloadgtk+-d50ebd947ce33ec026a566bdbce5c7ee01457c98.tar.gz
a11y: Add bounds change api
Add a way for GTK to pass bounds change information to the AT context.
Diffstat (limited to 'gtk/gtkaccessible.c')
-rw-r--r--gtk/gtkaccessible.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c
index 582cdf08fd..bef2ced14e 100644
--- a/gtk/gtkaccessible.c
+++ b/gtk/gtkaccessible.c
@@ -700,6 +700,33 @@ gtk_accessible_get_platform_state (GtkAccessible *self,
}
/*<private>
+ * gtk_accessible_bounds_changed:
+ * @self: a #GtkAccessible
+ *
+ * This function can be used to inform ATs that an
+ * accessibles bounds (ie its screen extents) have
+ * changed.
+ *
+ * Note that the bounds are not included in this API.
+ * AT backends should use widget API to obtain them.
+ */
+void
+gtk_accessible_bounds_changed (GtkAccessible *self)
+{
+ GtkATContext *context;
+
+ if (GTK_IS_WIDGET (self) &&
+ gtk_widget_get_root (GTK_WIDGET (self)) == NULL)
+ return;
+
+ context = gtk_accessible_get_at_context (self);
+ if (context == NULL)
+ return;
+
+ gtk_at_context_bounds_changed (context);
+}
+
+/*<private>
* gtk_accessible_should_present:
* @self: a #GtkAccessible
*