[g-a-devel]at-spi patch for new roles, states and relations - part 2



Hi,

As a follow up to the patch I applied last Friday, I'd like to now
as some implementations in the libspi and cspi layers to handle them...

Please review the following and let me know if I can go ahead an apply
the patch.

Thanks,

Darren.
Index: at-spi/cspi/spi-roletypes.h
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi-roletypes.h,v
retrieving revision 1.16
diff -u -r1.16 spi-roletypes.h
--- at-spi/cspi/spi-roletypes.h	13 Sep 2002 13:08:58 -0000	1.16
+++ at-spi/cspi/spi-roletypes.h	19 Nov 2002 10:53:36 -0000
@@ -131,6 +131,11 @@
  * @SPI_ROLE_WINDOW: A top level window with no title or border.
  * @SPI_ROLE_EXTENDED: This object's role is not included in the standard role list and
  *                     should be queried by name.
+ * @SPI_ROLE_HEADER: An object that serves as a document header.
+ * @SPI_ROLE_FOOTER: An object that serves as a document footer.
+ * @SPI_ROLE_PARAGRAPH: An object which is contains a paragraph of text content.
+ * @SPI_ROLE_RULER: An object which describes margins and tab stops, etc.  for text objects 
+ *                  which it controls (should have CONTROLLER_FOR relation to such). 
  * @SPI_ROLE_LAST_DEFINED: Used to determine the end of the role enumeration.
  **/
 typedef enum
@@ -205,6 +210,10 @@
   SPI_ROLE_VIEWPORT,
   SPI_ROLE_WINDOW,
   SPI_ROLE_EXTENDED,
+  SPI_ROLE_HEADER,
+  SPI_ROLE_FOOTER,
+  SPI_ROLE_PARAGRAPH,
+  SPI_ROLE_RULER,
   SPI_ROLE_LAST_DEFINED
 } AccessibleRole;
 
Index: at-spi/cspi/spi-statetypes.h
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi-statetypes.h,v
retrieving revision 1.8
diff -u -r1.8 spi-statetypes.h
--- at-spi/cspi/spi-statetypes.h	13 Sep 2002 13:08:58 -0000	1.8
+++ at-spi/cspi/spi-statetypes.h	19 Nov 2002 10:53:36 -0000
@@ -112,6 +112,13 @@
   SPI_STATE_VERTICAL,
   /* Indicates this object is visible */
   SPI_STATE_VISIBLE,
+  /*
+   * Indicates that "active-descendant-changed" event is sent when children
+   * become 'active' (i.e. are selected or navigated to onscreen).  Used to
+   * prevent need to enumerate all children in very large containers, like
+   * tables.
+   */
+  SPI_STATE_MANAGES_DESCENDANTS, 
   SPI_STATE_LAST_DEFINED
 } AccessibleState;
 
Index: at-spi/cspi/spi.h
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi.h,v
retrieving revision 1.50
diff -u -r1.50 spi.h
--- at-spi/cspi/spi.h	17 Nov 2002 13:53:54 -0000	1.50
+++ at-spi/cspi/spi.h	19 Nov 2002 10:53:36 -0000
@@ -74,6 +74,11 @@
   SPI_RELATION_MEMBER_OF,
   SPI_RELATION_NODE_CHILD_OF,
   SPI_RELATION_EXTENDED,
+  SPI_RELATION_FLOWS_TO,
+  SPI_RELATION_FLOWS_FROM,
+  SPI_RELATION_SUBWINDOW_OF,
+  SPI_RELATION_EMBEDS,
+  SPI_RELATION_EMBEDDED_BY,
   SPI_RELATION_LAST_DEFINED
 } AccessibleRelationType;
 
Index: at-spi/cspi/spi_accessible.c
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi_accessible.c,v
retrieving revision 1.41
diff -u -r1.41 spi_accessible.c
--- at-spi/cspi/spi_accessible.c	8 Oct 2002 08:53:59 -0000	1.41
+++ at-spi/cspi/spi_accessible.c	19 Nov 2002 10:53:36 -0000
@@ -177,6 +177,10 @@
   role_table [Accessibility_ROLE_VIEWPORT] = SPI_ROLE_VIEWPORT;
   role_table [Accessibility_ROLE_WINDOW] = SPI_ROLE_WINDOW;
   role_table [Accessibility_ROLE_EXTENDED] = SPI_ROLE_EXTENDED;
+  role_table [Accessibility_ROLE_HEADER] = SPI_ROLE_HEADER;
+  role_table [Accessibility_ROLE_FOOTER] = SPI_ROLE_FOOTER;
+  role_table [Accessibility_ROLE_PARAGRAPH] = SPI_ROLE_PARAGRAPH;
+  role_table [Accessibility_ROLE_RULER] = SPI_ROLE_RULER;
   role_table [Accessibility_ROLE_LAST_DEFINED] = SPI_ROLE_EXTENDED;
 
   return TRUE;
@@ -240,6 +244,7 @@
   state_table[SPI_STATE_TRANSIENT] = Accessibility_STATE_TRANSIENT;
   state_table[SPI_STATE_VERTICAL] = Accessibility_STATE_VERTICAL;
   state_table[SPI_STATE_VISIBLE] = Accessibility_STATE_VISIBLE;
+  state_table[SPI_STATE_MANAGES_DESCENDANTS] = Accessibility_STATE_MANAGES_DESCENDANTS;
 
   return TRUE;
 }
Index: at-spi/docs/reference/cspi/tmpl/spi_accessible.sgml
===================================================================
RCS file: /cvs/gnome/at-spi/docs/reference/cspi/tmpl/spi_accessible.sgml,v
retrieving revision 1.10
diff -u -r1.10 spi_accessible.sgml
--- at-spi/docs/reference/cspi/tmpl/spi_accessible.sgml	16 Aug 2002 14:44:23 -0000	1.10
+++ at-spi/docs/reference/cspi/tmpl/spi_accessible.sgml	19 Nov 2002 10:53:36 -0000
@@ -417,6 +417,10 @@
 @SPI_ROLE_VIEWPORT: 
 @SPI_ROLE_WINDOW: 
 @SPI_ROLE_EXTENDED: 
+ SPI_ROLE_HEADER: 
+ SPI_ROLE_FOOTER: 
+ SPI_ROLE_PARAGRAPH: 
+ SPI_ROLE_RULER: 
 @SPI_ROLE_LAST_DEFINED: 
 
 <!-- ##### FUNCTION AccessibleRole_getName ##### -->
Index: at-spi/docs/reference/cspi/tmpl/spi_relation.sgml
===================================================================
RCS file: /cvs/gnome/at-spi/docs/reference/cspi/tmpl/spi_relation.sgml,v
retrieving revision 1.4
diff -u -r1.4 spi_relation.sgml
--- at-spi/docs/reference/cspi/tmpl/spi_relation.sgml	3 Jan 2002 20:23:00 -0000	1.4
+++ at-spi/docs/reference/cspi/tmpl/spi_relation.sgml	19 Nov 2002 10:53:36 -0000
@@ -27,6 +27,11 @@
 @SPI_RELATION_MEMBER_OF: 
 @SPI_RELATION_NODE_CHILD_OF: 
 @SPI_RELATION_EXTENDED: 
+ SPI_RELATION_FLOWS_TO: 
+ SPI_RELATION_FLOWS_FROM: 
+ SPI_RELATION_SUBWINDOW_OF: 
+ SPI_RELATION_EMBEDS: 
+ SPI_RELATION_EMBEDDED_BY: 
 @SPI_RELATION_LAST_DEFINED: 
 
 <!-- ##### FUNCTION AccessibleRelation_ref ##### -->
Index: at-spi/docs/reference/cspi/tmpl/spi_stateset.sgml
===================================================================
RCS file: /cvs/gnome/at-spi/docs/reference/cspi/tmpl/spi_stateset.sgml,v
retrieving revision 1.4
diff -u -r1.4 spi_stateset.sgml
--- at-spi/docs/reference/cspi/tmpl/spi_stateset.sgml	15 Mar 2002 15:26:27 -0000	1.4
+++ at-spi/docs/reference/cspi/tmpl/spi_stateset.sgml	19 Nov 2002 10:53:36 -0000
@@ -49,6 +49,7 @@
 @SPI_STATE_TRANSIENT: 
 @SPI_STATE_VERTICAL: 
 @SPI_STATE_VISIBLE: 
+ SPI_STATE_MANAGES_DESCENDANTS: 
 @SPI_STATE_LAST_DEFINED: 
 
 <!-- ##### FUNCTION AccessibleStateSet_ref ##### -->
Index: at-spi/libspi/accessible.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/accessible.c,v
retrieving revision 1.46
diff -u -r1.46 accessible.c
--- at-spi/libspi/accessible.c	24 Sep 2002 15:39:02 -0000	1.46
+++ at-spi/libspi/accessible.c	19 Nov 2002 10:53:36 -0000
@@ -114,6 +114,10 @@
   role_table [ATK_ROLE_UNKNOWN] =          Accessibility_ROLE_UNKNOWN;
   role_table [ATK_ROLE_VIEWPORT] =         Accessibility_ROLE_VIEWPORT;
   role_table [ATK_ROLE_WINDOW] =           Accessibility_ROLE_WINDOW;
+  role_table [ATK_ROLE_HEADER] =           Accessibility_ROLE_HEADER;
+  role_table [ATK_ROLE_FOOTER] =           Accessibility_ROLE_FOOTER;
+  role_table [ATK_ROLE_PARAGRAPH] =           Accessibility_ROLE_PARAGRAPH;
+  role_table [ATK_ROLE_RULER] =           Accessibility_ROLE_RULER;
   role_table [ATK_ROLE_LAST_DEFINED] =     Accessibility_ROLE_EXTENDED;
   
   return TRUE;
Index: at-spi/libspi/relation.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/relation.c,v
retrieving revision 1.9
diff -u -r1.9 relation.c
--- at-spi/libspi/relation.c	13 Sep 2002 13:09:01 -0000	1.9
+++ at-spi/libspi/relation.c	19 Nov 2002 10:53:36 -0000
@@ -43,6 +43,11 @@
   types[ATK_RELATION_LABELLED_BY] = Accessibility_RELATION_LABELLED_BY;
   types[ATK_RELATION_MEMBER_OF] = Accessibility_RELATION_MEMBER_OF;
   types[ATK_RELATION_NODE_CHILD_OF] = Accessibility_RELATION_NODE_CHILD_OF;
+  types[ATK_RELATION_FLOWS_TO] = Accessibility_RELATION_FLOWS_TO;
+  types[ATK_RELATION_FLOWS_FROM] = Accessibility_RELATION_FLOWS_FROM;
+  types[ATK_RELATION_SUBWINDOW_OF] = Accessibility_RELATION_SUBWINDOW_OF;
+  types[ATK_RELATION_EMBEDS] = Accessibility_RELATION_EMBEDS;
+  types[ATK_RELATION_EMBEDDED_BY] = Accessibility_RELATION_EMBEDDED_BY;
   return TRUE;
 }
 
Index: at-spi/libspi/stateset.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/stateset.c,v
retrieving revision 1.7
diff -u -r1.7 stateset.c
--- at-spi/libspi/stateset.c	13 Sep 2002 13:09:01 -0000	1.7
+++ at-spi/libspi/stateset.c	19 Nov 2002 10:53:37 -0000
@@ -112,6 +112,8 @@
   atk_state_types[Accessibility_STATE_VERTICAL] = ATK_STATE_VERTICAL;
   accessible_state_types[ATK_STATE_VISIBLE] = Accessibility_STATE_VISIBLE;
   atk_state_types[Accessibility_STATE_VISIBLE] = ATK_STATE_VISIBLE;
+  accessible_state_types[ATK_STATE_MANAGES_DESCENDANTS] = Accessibility_STATE_MANAGES_DESCENDANTS;
+  atk_state_types[Accessibility_STATE_MANAGES_DESCENDANTS] = ATK_STATE_MANAGES_DESCENDANTS;
 
   return TRUE;
 }
@@ -331,6 +333,8 @@
     states = g_slist_append (states, (gpointer) Accessibility_STATE_VERTICAL);
   if (atk_state_set_contains_state (set, ATK_STATE_VISIBLE))
     states = g_slist_append (states, (gpointer) Accessibility_STATE_VISIBLE);
+  if (atk_state_set_contains_state (set, ATK_STATE_MANAGES_DESCENDANTS))
+    states = g_slist_append (states, (gpointer) Accessibility_STATE_MANAGES_DESCENDANTS);
 
   rv = Accessibility_StateSeq__alloc ();
   rv->_length = rv->_maximum = g_slist_length (states);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]