diff options
author | Alejandro Piñeiro <apinheiro@igalia.com> | 2013-07-31 19:04:00 +0200 |
---|---|---|
committer | Alejandro Piñeiro <apinheiro@igalia.com> | 2013-08-12 12:00:10 +0200 |
commit | 840e63030289c57660e7c670cc2e9ec54387e47d (patch) | |
tree | 32ff313ce7d13b832cc78a68d5f82493522563b5 /atk/atkobject.h | |
parent | fa790d06cc3f8c533a373c62a9a3484c731c4a50 (diff) | |
download | atk-840e63030289c57660e7c670cc2e9ec54387e47d.tar.gz |
Use generated enum type for AtkRole to get the role name
Simplifies adding a new role (so less error prone) as with
this change a new role just needs to be added to the enum.
The specific role name is generated from the enum. For example:
ATK_ROLE_PUSH_BUTTON would create "push button"
It is also possible to specify the name. For example:
ATK_ROLE_ACCEL_LABEL, /*<nick=accelerator-label>*/
would create "accelerator label"
Notice the '-'. At the enum it is needed to use it. Internally
all the names are compacted and maintained in one array (that
now also includes the extra role names).
https://bugzilla.gnome.org/show_bug.cgi?id=705290
Diffstat (limited to 'atk/atkobject.h')
-rwxr-xr-x | atk/atkobject.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/atk/atkobject.h b/atk/atkobject.h index 1871dd5..35a936a 100755 --- a/atk/atkobject.h +++ b/atk/atkobject.h @@ -163,8 +163,8 @@ G_BEGIN_DECLS **/ typedef enum { - ATK_ROLE_INVALID = 0, - ATK_ROLE_ACCEL_LABEL, + ATK_ROLE_INVALID = 0, + ATK_ROLE_ACCEL_LABEL, /*<nick=accelerator-label>*/ ATK_ROLE_ALERT, ATK_ROLE_ANIMATION, ATK_ROLE_ARROW, @@ -268,8 +268,6 @@ typedef enum ATK_ROLE_LAST_DEFINED } AtkRole; -AtkRole atk_role_register (const gchar *name); - /** *AtkLayer: *@ATK_LAYER_INVALID: The object does not have a layer @@ -603,6 +601,7 @@ gboolean atk_object_remove_relationship (AtkObject * AtkRelationType relationship, AtkObject *target); const gchar* atk_role_get_localized_name (AtkRole role); +AtkRole atk_role_register (const gchar *name); const gchar* atk_object_get_object_locale (AtkObject *accessible); G_END_DECLS |