Use generated enum type for AtkRole to get the role name
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 31 Jul 2013 17:04:00 +0000 (19:04 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 12 Aug 2013 10:00:10 +0000 (12:00 +0200)
commit840e63030289c57660e7c670cc2e9ec54387e47d
tree32ff313ce7d13b832cc78a68d5f82493522563b5
parentfa790d06cc3f8c533a373c62a9a3484c731c4a50
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
atk/atkobject.c
atk/atkobject.h