summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFushan Wen <qydwhotmail@gmail.com>2022-07-21 21:49:32 +0800
committerFushan Wen <qydwhotmail@gmail.com>2022-07-22 14:08:52 +0800
commited16f50e4930e32c29f80552eb698baa35b4677e (patch)
treee29242ffb916cca72024de3ebda9e21e1b8f5018
parent8aed84cb7e7eb48a213459ee6fe47d46bd7d0084 (diff)
downloadat-spi2-core-ed16f50e4930e32c29f80552eb698baa35b4677e.tar.gz
Add `ATK_ROLE_PUSH_BUTTON_MENU`
This role allows to specify a button will open a menu. It's widely used in Hamburger buttons, and Qt has QAccessible:ButtonMenu role for it.
-rw-r--r--atk-adaptor/object.c1
-rw-r--r--atk/atkobject.c1
-rw-r--r--atk/atkobject.h3
-rw-r--r--atspi/atspi-constants.h2
-rw-r--r--doc/libatspi/tmpl/atspi-constants.sgml1
-rw-r--r--xml/Accessible.xml2
6 files changed, 10 insertions, 0 deletions
diff --git a/atk-adaptor/object.c b/atk-adaptor/object.c
index 27b660be..17417979 100644
--- a/atk-adaptor/object.c
+++ b/atk-adaptor/object.c
@@ -487,6 +487,7 @@ init_role_lookup_table (AtspiRole * role_table)
role_table[ATK_ROLE_CONTENT_INSERTION] = ATSPI_ROLE_CONTENT_INSERTION;
role_table[ATK_ROLE_MARK] = ATSPI_ROLE_MARK;
role_table[ATK_ROLE_SUGGESTION] = ATSPI_ROLE_SUGGESTION;
+ role_table[ATK_ROLE_PUSH_BUTTON_MENU] = ATSPI_ROLE_PUSH_BUTTON_MENU;
return TRUE;
}
diff --git a/atk/atkobject.c b/atk/atkobject.c
index 63986dd9..39823aaf 100644
--- a/atk/atkobject.c
+++ b/atk/atkobject.c
@@ -130,6 +130,7 @@ enum {
N_("list item")
N_("menu")
N_("menu bar")
+ N_("menu button")
N_("menu item")
N_("option pane")
N_("page tab")
diff --git a/atk/atkobject.h b/atk/atkobject.h
index 9a32fedc..78e2464c 100644
--- a/atk/atkobject.h
+++ b/atk/atkobject.h
@@ -235,6 +235,8 @@ G_BEGIN_DECLS
* content. This role should include either %ATK_ROLE_CONTENT_DELETION and/or
* %ATK_ROLE_CONTENT_INSERTION children, in any order, to indicate what the
* actual change is. (Since: 2.36)
+ *@ATK_ROLE_PUSH_BUTTON_MENU: A specialized push button to open a menu.
+ * (Since: 2.46)
*@ATK_ROLE_LAST_DEFINED: not a valid role, used for finding end of the enumeration
*
* Describes the role of an object
@@ -372,6 +374,7 @@ typedef enum
ATK_ROLE_CONTENT_INSERTION,
ATK_ROLE_MARK,
ATK_ROLE_SUGGESTION,
+ ATK_ROLE_PUSH_BUTTON_MENU,
ATK_ROLE_LAST_DEFINED
} AtkRole;
diff --git a/atspi/atspi-constants.h b/atspi/atspi-constants.h
index 60d57054..af9c4c20 100644
--- a/atspi/atspi-constants.h
+++ b/atspi/atspi-constants.h
@@ -1251,6 +1251,7 @@ typedef enum {
* content. An object with this role should include children with %ATSPI_ROLE_CONTENT_DELETION and/or
* %ATSPI_ROLE_CONTENT_INSERTION, in any order, to indicate what the
* actual change is. @Since: 2.36
+ * @ATSPI_ROLE_PUSH_BUTTON_MENU: A specialized push button to open a menu. @Since 2.46
* @ATSPI_ROLE_LAST_DEFINED: Not a valid role, used for finding end of
* enumeration.
*
@@ -1388,6 +1389,7 @@ typedef enum {
ATSPI_ROLE_CONTENT_INSERTION,
ATSPI_ROLE_MARK,
ATSPI_ROLE_SUGGESTION,
+ ATSPI_ROLE_PUSH_BUTTON_MENU,
ATSPI_ROLE_LAST_DEFINED,
} AtspiRole;
diff --git a/doc/libatspi/tmpl/atspi-constants.sgml b/doc/libatspi/tmpl/atspi-constants.sgml
index af2ec333..76f4d1b3 100644
--- a/doc/libatspi/tmpl/atspi-constants.sgml
+++ b/doc/libatspi/tmpl/atspi-constants.sgml
@@ -408,6 +408,7 @@ Constant definitions needed by multiple interfaces.
@ATSPI_ROLE_POPUP_MENU:
@ATSPI_ROLE_PROGRESS_BAR:
@ATSPI_ROLE_PUSH_BUTTON:
+@ATSPI_ROLE_PUSH_BUTTON_MENU:
@ATSPI_ROLE_RADIO_BUTTON:
@ATSPI_ROLE_RADIO_MENU_ITEM:
@ATSPI_ROLE_ROOT_PANE:
diff --git a/xml/Accessible.xml b/xml/Accessible.xml
index f0b7893d..516ffd8e 100644
--- a/xml/Accessible.xml
+++ b/xml/Accessible.xml
@@ -716,6 +716,8 @@
the content. An object with this role should include children with
ATSPI_ROLE_CONTENT_DELETION and/or ATSPI_ROLE_CONTENT_INSERTION, in any order, to
indicate what the actual change is. Since: 2.36
+
+ 129 - ATSPI_ROLE_PUSH_BUTTON_MENU: A specialized push button to open a menu. Since: 2.46
-->
<method name="GetRole">
<arg direction="out" type="u"/>