Fixed ROLE marshalling holes in AT-SPI vs new ATK roles. Also
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 9 Jun 2006 14:59:13 +0000 (14:59 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 9 Jun 2006 14:59:13 +0000 (14:59 +0000)
addressed RFE/Bug #344266.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@811 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
cspi/spi-roletypes.h
cspi/spi-statetypes.h
cspi/spi_accessible.c
docs/reference/cspi/tmpl/spi_accessible.sgml
docs/reference/cspi/tmpl/spi_stateset.sgml
idl/Accessibility_Role.idl
libspi/accessible.c

index 577598e..9e18721 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,8 +7,15 @@
        (spi_state_to_corba) Fixed marshalling of new statetypes.
        
        * libspi/stateset.c:
        (spi_state_to_corba) Fixed marshalling of new statetypes.
        
        * libspi/stateset.c:
-       (spi_init_state_tables, impl_getStates): Fixed conversion of new statetypes
-       to/from ATK.
+       (spi_init_state_tables, impl_getStates): 
+       Fixed conversion of new statetypes to/from ATK.
+
+       * idl/Accessibility_Role.idl: Added ROLE_FORM (bug #344266).
+
+       * cspi/spi-roletypes.h, spi_accessible.c: Added marshalling 
+       definitions/conversions for new roles from ATK.
+
+       * libspi/accessible.c: Fixed marshalling of new role types from ATK.
        
 2006-04-17  Matthias Clasen  <mclasen@redhat.com>
 
        
 2006-04-17  Matthias Clasen  <mclasen@redhat.com>
 
index 2453509..916c25a 100644 (file)
@@ -147,6 +147,18 @@ extern "C" {
  *                     objects share a context which is different from the 
  *                     container in which this accessible is embedded.
  *                     Uses: document embedding, "panel applets", etc.
  *                     objects share a context which is different from the 
  *                     container in which this accessible is embedded.
  *                     Uses: document embedding, "panel applets", etc.
+ * @SPI_ROLE_ENTRY: The object is a component whose textual content may be entered or modified by the user, provided @SPI_STATE_EDITABLE is present.
+ * @SPI_ROLE_CHART: The object is a graphical depiction of quantitative data. It may contain multiple subelements whose attributes and/or description may be queried to obtain both the quantitative data and information about how the data is being presented. The LABELLED_BY relation is particularly important in interpreting objects of this type, as is the accessible-description property.
+ * @SPI_ROLE_CAPTION: The object contains descriptive information, usually textual, about another user interface element such as a table, chart, or image.
+ * @SPI_ROLE_DOCUMENT_FRAME: The object is a visual frame or container which contains a view of document content. Document frames may occur within another Document instance, in which case the second document may be said to be embedded in the containing instance. HTML frames are often ROLE_DOCUMENT_FRAME. Either this object, or a singleton descendant, should implement the Document interface.
+ * @SPI_ROLE_HEADING: The object serves as a heading for content which follows it in a document. The 'heading level' of the heading, if availabe, may be obtained by querying the object's attributes.
+ * @SPI_ROLE_PAGE: The object is a containing instance which encapsulates a page of information. @SPI_ROLE_PAGE is used in documents and content which support a paginated navigation model.
+ * @SPI_ROLE_SECTION: The object is a containing instance of document content which constitutes a particular 'logical' section of the document. The type of content within a section, and the nature of the section division itself, may be obtained by querying the object's attributes. Sections may be nested.
+ * @SPI_ROLE_REDUNDANT_OBJECT: The object is redundant with another object in the hierarchy, and is exposed for purely technical reasons.  Objects of this role should normally be ignored by clients. 
+ * @SPI_ROLE_FORM: The object is a container for form controls, for instance as part of a 
+ * web form or user-input form within a document.  This role is primarily a tag/convenience for 
+ * clients when navigating complex documents, it is not expected that ordinary GUI containers will 
+ * always have ATK_ROLE_FORM.
  * @SPI_ROLE_LAST_DEFINED: Used to determine the end of the role enumeration.
  *
  * Describes the role of an object
  * @SPI_ROLE_LAST_DEFINED: Used to determine the end of the role enumeration.
  *
  * Describes the role of an object
@@ -235,6 +247,14 @@ typedef enum
   SPI_ROLE_AUTOCOMPLETE,
   SPI_ROLE_EDITBAR,
   SPI_ROLE_EMBEDDED,
   SPI_ROLE_AUTOCOMPLETE,
   SPI_ROLE_EDITBAR,
   SPI_ROLE_EMBEDDED,
+  SPI_ROLE_ENTRY,
+  SPI_ROLE_CHART,
+  SPI_ROLE_CAPTION,
+  SPI_ROLE_DOCUMENT_FRAME,
+  SPI_ROLE_HEADING,
+  SPI_ROLE_PAGE,
+  SPI_ROLE_SECTION,
+  SPI_ROLE_FORM,
   SPI_ROLE_LAST_DEFINED
 } AccessibleRole;
 
   SPI_ROLE_LAST_DEFINED
 } AccessibleRole;
 
index eee9d70..06f2155 100644 (file)
@@ -113,7 +113,7 @@ typedef enum
   SPI_STATE_TRUNCATED,
   SPI_STATE_REQUIRED,
   SPI_STATE_INVALID_ENTRY,
   SPI_STATE_TRUNCATED,
   SPI_STATE_REQUIRED,
   SPI_STATE_INVALID_ENTRY,
-  SPI_STATE_SUPPORTS_AUTOCOMPLETE,
+  SPI_STATE_SUPPORTS_AUTOCOMPLETION,
   SPI_STATE_SELECTABLE_TEXT,
   SPI_STATE_IS_DEFAULT,
   SPI_STATE_VISITED,
   SPI_STATE_SELECTABLE_TEXT,
   SPI_STATE_IS_DEFAULT,
   SPI_STATE_VISITED,
index 5f72f05..8673b31 100644 (file)
@@ -101,7 +101,18 @@ static const char *role_names [] =
   "fooler",
   "paragraph",
   "ruler",
   "fooler",
   "paragraph",
   "ruler",
-  "application"
+  "application",
+  "autocomplete",
+  "editbar",
+  "embedded",
+  "entry",
+  "chart",
+  "caption",
+  "document_frame",
+  "heading",
+  "page",
+  "section",
+  "form"
 };
 
 #define MAX_ROLES (sizeof (role_names) / sizeof (char *))
 };
 
 #define MAX_ROLES (sizeof (role_names) / sizeof (char *))
@@ -191,6 +202,14 @@ cspi_init_role_table (AccessibleRole *role_table)
   role_table [Accessibility_ROLE_AUTOCOMPLETE] = SPI_ROLE_AUTOCOMPLETE;
   role_table [Accessibility_ROLE_EDITBAR] = SPI_ROLE_EDITBAR;
   role_table [Accessibility_ROLE_EMBEDDED] = SPI_ROLE_EMBEDDED;
   role_table [Accessibility_ROLE_AUTOCOMPLETE] = SPI_ROLE_AUTOCOMPLETE;
   role_table [Accessibility_ROLE_EDITBAR] = SPI_ROLE_EDITBAR;
   role_table [Accessibility_ROLE_EMBEDDED] = SPI_ROLE_EMBEDDED;
+  role_table [Accessibility_ROLE_ENTRY] = SPI_ROLE_ENTRY;
+  role_table [Accessibility_ROLE_CHART] = SPI_ROLE_CHART;
+  role_table [Accessibility_ROLE_CAPTION] = SPI_ROLE_CAPTION;
+  role_table [Accessibility_ROLE_DOCUMENT_FRAME] = SPI_ROLE_DOCUMENT_FRAME;
+  role_table [Accessibility_ROLE_HEADING] = SPI_ROLE_HEADING;
+  role_table [Accessibility_ROLE_PAGE] = SPI_ROLE_PAGE;
+  role_table [Accessibility_ROLE_SECTION] = SPI_ROLE_SECTION;
+  role_table [Accessibility_ROLE_FORM] = SPI_ROLE_FORM;
 
   return TRUE;
 }
 
   return TRUE;
 }
@@ -1253,7 +1272,7 @@ spi_state_to_corba (AccessibleState state)
       MAP_STATE (TRUNCATED);
       MAP_STATE (REQUIRED);
       MAP_STATE (INVALID_ENTRY);
       MAP_STATE (TRUNCATED);
       MAP_STATE (REQUIRED);
       MAP_STATE (INVALID_ENTRY);
-      MAP_STATE (SUPPORTS_AUTOCOMPLETE);
+      MAP_STATE (SUPPORTS_AUTOCOMPLETION);
       MAP_STATE (SELECTABLE_TEXT);
       MAP_STATE (IS_DEFAULT);
       MAP_STATE (VISITED);
       MAP_STATE (SELECTABLE_TEXT);
       MAP_STATE (IS_DEFAULT);
       MAP_STATE (VISITED);
index 5b3f137..037a106 100644 (file)
@@ -460,6 +460,14 @@ object corresponding to an user interface element.
 @SPI_ROLE_AUTOCOMPLETE: 
 @SPI_ROLE_EDITBAR: 
 @SPI_ROLE_EMBEDDED: 
 @SPI_ROLE_AUTOCOMPLETE: 
 @SPI_ROLE_EDITBAR: 
 @SPI_ROLE_EMBEDDED: 
+@SPI_ROLE_ENTRY: 
+@SPI_ROLE_CHART: 
+@SPI_ROLE_CAPTION: 
+@SPI_ROLE_DOCUMENT_FRAME: 
+@SPI_ROLE_HEADING: 
+@SPI_ROLE_PAGE: 
+@SPI_ROLE_SECTION: 
+@SPI_ROLE_FORM: 
 @SPI_ROLE_LAST_DEFINED: 
 
 <!-- ##### FUNCTION AccessibleRole_getName ##### -->
 @SPI_ROLE_LAST_DEFINED: 
 
 <!-- ##### FUNCTION AccessibleRole_getName ##### -->
index 149948f..7f82e78 100644 (file)
@@ -53,6 +53,13 @@ State and StateSets
 @SPI_STATE_VISIBLE: 
 @SPI_STATE_MANAGES_DESCENDANTS: 
 @SPI_STATE_INDETERMINATE: 
 @SPI_STATE_VISIBLE: 
 @SPI_STATE_MANAGES_DESCENDANTS: 
 @SPI_STATE_INDETERMINATE: 
+@SPI_STATE_TRUNCATED: 
+@SPI_STATE_REQUIRED: 
+@SPI_STATE_INVALID_ENTRY: 
+@SPI_STATE_SUPPORTS_AUTOCOMPLETION: 
+@SPI_STATE_SELECTABLE_TEXT: 
+@SPI_STATE_IS_DEFAULT: 
+@SPI_STATE_VISITED: 
 @SPI_STATE_LAST_DEFINED: 
 
 <!-- ##### STRUCT AccessibleStateSet ##### -->
 @SPI_STATE_LAST_DEFINED: 
 
 <!-- ##### STRUCT AccessibleStateSet ##### -->
index aa32d59..3095b66 100644 (file)
@@ -357,6 +357,15 @@ module Accessibility {
    * @since AT-SPI 1.7.0
    */
   ROLE_SECTION,
    * @since AT-SPI 1.7.0
    */
   ROLE_SECTION,
+  /**
+   * The object is a containing instance of document content which constitutes
+   * a particular 'logical' section of the document.  The type of content within
+   * a section, and the nature of the section division itself, may be obtained
+   * by querying the object's attributes.  Sections may be nested.
+   *
+   * @since AT-SPI 1.7.1
+   */
+  ROLE_FORM,
 
   /** not a valid role, used for finding end of enumeration. */
   ROLE_LAST_DEFINED
 
   /** not a valid role, used for finding end of enumeration. */
   ROLE_LAST_DEFINED
index ff7e4b5..9454705 100644 (file)
@@ -130,6 +130,7 @@ spi_init_role_lookup_table (Accessibility_Role *role_table)
   role_table [ATK_ROLE_HEADING] =             Accessibility_ROLE_HEADING;
   role_table [ATK_ROLE_PAGE] =                Accessibility_ROLE_PAGE;
   role_table [ATK_ROLE_SECTION] =             Accessibility_ROLE_SECTION;
   role_table [ATK_ROLE_HEADING] =             Accessibility_ROLE_HEADING;
   role_table [ATK_ROLE_PAGE] =                Accessibility_ROLE_PAGE;
   role_table [ATK_ROLE_SECTION] =             Accessibility_ROLE_SECTION;
+  role_table [ATK_ROLE_FORM] =                Accessibility_ROLE_FORM;
   return TRUE;
 }
 
   return TRUE;
 }