From 248ae84171c032e8f75cb90fc3ccedd49f8a1092 Mon Sep 17 00:00:00 2001 From: billh Date: Wed, 12 Dec 2001 16:46:17 +0000 Subject: [PATCH] Updated role enumeration in Accessibility_Role.idl. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@183 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 6 ++++++ TODO | 6 +++++- cspi/spi_accessible.c | 34 ++++++++++++++++++---------------- idl/Accessibility_Role.idl | 27 ++++++++++++++++++++++++++- 4 files changed, 55 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a664d7..bee084c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,12 @@ * registryd/registry.h: Squashed annoying warning. + * idl/Accessibility_Role.idl: + Extended range of available Accessibility_Role values. + + * cspi/spi_accessible.c: + Re-ordered role names. + 2001-12-12 Bill Haneman * idl/Accessibility_Value.idl: diff --git a/TODO b/TODO index e0c179d..3cec7a8 100644 --- a/TODO +++ b/TODO @@ -8,8 +8,10 @@ cspi: + ensure spi-listener-impl's list notification methods don't have a re-enterancy hazard. [Michael] + namespace all methods missing a prepending Accessible - or SPI_ prefix. + or SPI_ prefix. [Bill] + Put LGPL headers everywhere. + + Fix the conversion of Accessibility_Role CORBA enum to + AccessibleRole enums. [Bill] registry: + move code into here from libspi [Michael] @@ -30,6 +32,8 @@ libspi: StateSet, and export to cspi. + complete and test the pre-emptive key API so that we don't always do AnyKey grabs. [Bill] + + complete the conversion from AtkRoles to Accessibility_Role + enums. [Bill] test: + update test-simple to do complete API tests diff --git a/cspi/spi_accessible.c b/cspi/spi_accessible.c index f84bc65..6f5ff36 100644 --- a/cspi/spi_accessible.c +++ b/cspi/spi_accessible.c @@ -4,12 +4,17 @@ static const char *role_names [] = { "", + "accelerator label", "alert", + "animation", + "arrow", + "calendar", "canvas", "check box", "color chooser", "column header", "combo box", + "date editor", "desktop icon", "desktop frame", "dialog", @@ -17,10 +22,12 @@ static const char *role_names [] = "file chooser", "filler", "focus traversable", + "font chooser", "frame", "glass pane", "HTML container", "icon", + "image", "internal frame", "label", "layered pane", @@ -38,17 +45,21 @@ static const char *role_names [] = "progress bar", "pushbutton", "radiobutton", + "radio menu item", "root pane", "row header", "scrollbar", "scrollpane", "separator", "slider", + "spin button", "split pane", + "status bar", "table", "table cell", "table column header", "table row header", + "tearoff menu item", "text", "toggle button", "toolbar", @@ -58,25 +69,16 @@ static const char *role_names [] = "viewport", "window", - /* These have no equivalent AccessibleRole enum values */ - "accelerator label", - "animation", - "arrow", - "calendar", - "menu item", - "date editor", - "dial", - "drawing area", - "font chooser", - "image", - "radio menu item", - "tearoff menu item", - "spin button", - "status bar", }; #define MAX_ROLES (sizeof (role_names) / sizeof (char *)) +static AccessibleRole +cspi_role_from_spi_role (Accessibility_Role role) +{ + return role; /* FIXME: need to compare, equivalence not guaranteed */ +} + /** * AccessibleRole_getName: * @role: an #AccessibleRole object to query. @@ -335,7 +337,7 @@ Accessible_getRole (Accessible *obj) cspi_return_val_if_ev ("getRole", SPI_ROLE_INVALID); - return retval; + return cspi_role_from_spi_role (retval); } /** diff --git a/idl/Accessibility_Role.idl b/idl/Accessibility_Role.idl index f7844dd..a99b446 100644 --- a/idl/Accessibility_Role.idl +++ b/idl/Accessibility_Role.idl @@ -27,8 +27,16 @@ module Accessibility { enum Role { ROLE_INVALID, + /* Object is a label indicating the keyboard accelerators for the parent */ + ROLE_ACCELERATOR_LABEL, /* Object is used to alert the user about something */ ROLE_ALERT, + /* Object contains a dynamic or moving image of some kind */ + ROLE_ANIMATION, + /* Object is a 2d directional indicator */ + ROLE_ARROW, + /* Object contains one or more dates, usually arranged into a 2d list */ + ROLE_CALENDAR, /* Object that can be drawn into and is used to trap events */ ROLE_CANVAS, /* @@ -42,6 +50,8 @@ module Accessibility { ROLE_COLUMN_HEADER, /* A list of choices the user can select from */ ROLE_COMBO_BOX, + /* An object which allows entry of a date */ + ROLE_DATE_EDITOR, /* An inconifed internal frame within a DESKTOP_PANE */ ROLE_DESKTOP_ICON, /* @@ -68,6 +78,8 @@ module Accessibility { ROLE_FILLER, /* XXX Don't know sure about this. */ ROLE_FOCUS_TRAVERSABLE, + /* Allows selection of a display font */ + ROLE_FONT_CHOOSER, /* A top level window with a title bar, border, menubar, etc. */ ROLE_FRAME, /* A pane that is guaranteed to be painted on top of all panes beneath it */ @@ -79,6 +91,8 @@ module Accessibility { ROLE_HTML_CONTAINER, /* A small fixed size picture, typically used to decorate components */ ROLE_ICON, + /* An image, typically static. */ + ROLE_IMAGE, /* A frame-like object that is clipped by a desktop pane. */ ROLE_INTERNAL_FRAME, /* An object used to present an icon or short string in an interface */ @@ -143,6 +157,8 @@ module Accessibility { * same group to become uncghecked when this one is checked. */ ROLE_RADIO_BUTTON, + /* Object is both a menu item and a "radio button" (see ROLE_RADIO_BUTTON) */ + ROLE_RADIO_MENU_ITEM, /* * A specialized pane that has a glass pane and a layered pane as its * children. @@ -167,13 +183,22 @@ module Accessibility { ROLE_SEPARATOR, /* An object that allows the user to select from a bounded range */ ROLE_SLIDER, + /* + * An object which allows one of a set of choices to be selected, + * and which displays the current choice. + */ + ROLE_SPIN_BUTTON, /* A specialized panel that presents two other panels at the same time. */ ROLE_SPLIT_PANE, - /* An object used to rpesent information in terms of rows and columns. */ + /* Object displays non-quantitative status information (c.f. ROLE_PROGRESS_BAR) */ + ROLE_STATUS_BAR, + /* An object used to repesent information in terms of rows and columns. */ ROLE_TABLE, ROLE_TABLE_CELL, ROLE_TABLE_COLUMN_HEADER, ROLE_TABLE_ROW_HEADER, + /* Object allows menu to be removed from menubar and shown in its own window. */ + ROLE_TEAROFF_MENU_ITEM, /* An object that presents text to the user */ ROLE_TEXT, /* -- 2.7.4