[gtk/a11y/component: 2/4] Add size as a platform acccessible state
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/a11y/component: 2/4] Add size as a platform acccessible state
- Date: Wed, 14 Oct 2020 01:28:58 +0000 (UTC)
commit 0b42115666ebbbb8ef7e51050704efe04468d551
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 13 21:18:39 2020 -0400
Add size as a platform acccessible state
This lets us trigger a change in the AT contexts
by saying that this platform state changed.
gtk/gtkaccessible.c | 3 ++-
gtk/gtkatcontextprivate.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c
index 1f3e2a3209..36c2781b64 100644
--- a/gtk/gtkaccessible.c
+++ b/gtk/gtkaccessible.c
@@ -677,7 +677,7 @@ gtk_accessible_platform_changed (GtkAccessible *self,
/*<private>
* gtk_accessible_get_platform_state:
* @self: a #GtkAccessible
- * @state: platform state to query
+ * @state: a boolean platform state to query
*
* Query a platform state, such as focus.
*
@@ -693,6 +693,7 @@ gboolean
gtk_accessible_get_platform_state (GtkAccessible *self,
GtkAccessiblePlatformState state)
{
+ g_return_val_if_fail (state != GTK_ACCESSIBLE_PLATFORM_STATE_SIZE, FALSE);
return GTK_ACCESSIBLE_GET_IFACE (self)->get_platform_state (self, state);
}
diff --git a/gtk/gtkatcontextprivate.h b/gtk/gtkatcontextprivate.h
index 4fec1444c8..af32fd206a 100644
--- a/gtk/gtkatcontextprivate.h
+++ b/gtk/gtkatcontextprivate.h
@@ -83,11 +83,13 @@ typedef enum {
typedef enum {
GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE,
GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED,
+ GTK_ACCESSIBLE_PLATFORM_STATE_SIZE,
} GtkAccessiblePlatformState;
typedef enum {
GTK_ACCESSIBLE_PLATFORM_CHANGE_FOCUSABLE = 1 << GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE,
GTK_ACCESSIBLE_PLATFORM_CHANGE_FOCUSED = 1 << GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED,
+ GTK_ACCESSIBLE_PLATFORM_CHANGE_SIZE = 1 << GTK_ACCESSIBLE_PLATFORM_STATE_SIZE,
} GtkAccessiblePlatformChange;
struct _GtkATContext
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]