[g-a-devel]Patches to add state INCONSISTENT



Attached are patches to atk, at-spi and JABG to add a new state INCONSISTENT to 
support OpenOffice check boxes.

I will apply these patches next week unless there are objections.

Padraig
Index: atk/atkstate.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkstate.h,v
retrieving revision 1.8
diff -u -p -r1.8 atkstate.h
--- atk/atkstate.h	25 Apr 2003 10:28:00 -0000	1.8
+++ atk/atkstate.h	16 May 2003 09:00:29 -0000
@@ -60,6 +60,7 @@ extern "C" {
  * ATK_STATE_MANAGES_DESCENDANTS: 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.
+ * ATK_STATE_INCONSISTENT: Indicates that a check box is in a state other than checked or not checked.
  * ATK_STATE_LAST_DEFINED: Not a valid state, used for finding end of enumeration
  *
  *The possible types of states of an object
@@ -96,6 +97,7 @@ typedef enum
   ATK_STATE_VERTICAL,
   ATK_STATE_VISIBLE,
   ATK_STATE_MANAGES_DESCENDANTS,
+  ATK_STATE_INCONSISTENT,
   ATK_STATE_LAST_DEFINED
 } AtkStateType;
 
Index: docs/tmpl/atkstate.sgml
===================================================================
RCS file: /cvs/gnome/atk/docs/tmpl/atkstate.sgml,v
retrieving revision 1.16
diff -u -p -r1.16 atkstate.sgml
--- docs/tmpl/atkstate.sgml	30 Oct 2002 09:42:29 -0000	1.16
+++ docs/tmpl/atkstate.sgml	16 May 2003 09:00:29 -0000
@@ -50,6 +50,7 @@ an component is described by its AtkStat
 @ATK_STATE_VERTICAL: 
 @ATK_STATE_VISIBLE: 
 @ATK_STATE_MANAGES_DESCENDANTS: 
+ ATK_STATE_INCONSISTENT: 
 @ATK_STATE_LAST_DEFINED: 
 
 <!-- ##### TYPEDEF AtkState ##### -->
Index: cspi/spi-statetypes.h
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi-statetypes.h,v
retrieving revision 1.10
diff -u -p -r1.10 spi-statetypes.h
--- cspi/spi-statetypes.h	25 Apr 2003 14:27:49 -0000	1.10
+++ cspi/spi-statetypes.h	16 May 2003 09:01:26 -0000
@@ -64,6 +64,7 @@ extern "C" {
  * 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_INCONSISTENT: Indicates that a check box is in a state other than checked or not checked.
  * SPI_STATE_LAST_DEFINED: Not a valid state, used for finding end of enumeration
  *
  *The possibles states of an object.
@@ -101,6 +102,7 @@ typedef enum
   SPI_STATE_VERTICAL,
   SPI_STATE_VISIBLE,
   SPI_STATE_MANAGES_DESCENDANTS, 
+  SPI_STATE_INCONSISTENT, 
   SPI_STATE_LAST_DEFINED
 } AccessibleState;
 
Index: cspi/spi_accessible.c
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi_accessible.c,v
retrieving revision 1.46
diff -u -p -r1.46 spi_accessible.c
--- cspi/spi_accessible.c	14 Apr 2003 13:21:53 -0000	1.46
+++ cspi/spi_accessible.c	16 May 2003 09:01:26 -0000
@@ -1146,6 +1146,7 @@ spi_state_to_corba (AccessibleState stat
       MAP_STATE (VERTICAL);
       MAP_STATE (VISIBLE);
       MAP_STATE (MANAGES_DESCENDANTS);
+      MAP_STATE (INCONSISTENT);
     default:
       return Accessibility_STATE_INVALID;
   }
Index: docs/reference/cspi/tmpl/spi_stateset.sgml
===================================================================
RCS file: /cvs/gnome/at-spi/docs/reference/cspi/tmpl/spi_stateset.sgml,v
retrieving revision 1.6
diff -u -p -r1.6 spi_stateset.sgml
--- docs/reference/cspi/tmpl/spi_stateset.sgml	25 Apr 2003 14:28:49 -0000	1.6
+++ docs/reference/cspi/tmpl/spi_stateset.sgml	16 May 2003 09:01:26 -0000
@@ -49,6 +49,7 @@ State and StateSets
 @SPI_STATE_VERTICAL: 
 @SPI_STATE_VISIBLE: 
 @SPI_STATE_MANAGES_DESCENDANTS: 
+ SPI_STATE_INCONSISTENT: 
 @SPI_STATE_LAST_DEFINED: 
 
 <!-- ##### STRUCT AccessibleStateSet ##### -->
Index: idl/Accessibility_State.idl
===================================================================
RCS file: /cvs/gnome/at-spi/idl/Accessibility_State.idl,v
retrieving revision 1.10
diff -u -p -r1.10 Accessibility_State.idl
--- idl/Accessibility_State.idl	19 Nov 2002 20:04:19 -0000	1.10
+++ idl/Accessibility_State.idl	16 May 2003 09:01:26 -0000
@@ -115,6 +115,10 @@ module Accessibility {
    * tables.
    */
   STATE_MANAGES_DESCENDANTS,
+  /*
+   * Indicates that a check box is in a state other than checked or not checked.
+   */
+  STATE_INCONSISTENT,
 
   STATE_LAST_DEFINED
   };
Index: libspi/stateset.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/stateset.c,v
retrieving revision 1.10
diff -u -p -r1.10 stateset.c
--- libspi/stateset.c	14 Apr 2003 13:21:54 -0000	1.10
+++ libspi/stateset.c	16 May 2003 09:01:26 -0000
@@ -114,6 +114,8 @@ spi_init_state_type_tables (void)
   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;
+  accessible_state_types[ATK_STATE_INCONSISTENT] = Accessibility_STATE_INCONSISTENT;
+  atk_state_types[Accessibility_STATE_INCONSISTENT] = ATK_STATE_INCONSISTENT;
 
   return TRUE;
 }
@@ -353,6 +355,8 @@ impl_getStates (PortableServer_Servant s
     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);
+  if (atk_state_set_contains_state (set, ATK_STATE_INCONSISTENT))
+    states = g_slist_append (states, (gpointer) Accessibility_STATE_INCONSISTENT);
 
   rv = Accessibility_StateSeq__alloc ();
   rv->_length = rv->_maximum = g_slist_length (states);
Index: bridge/org/GNOME/Accessibility/StateTypeAdapter.java
===================================================================
RCS file: /cvs/gnome/java-access-bridge/bridge/org/GNOME/Accessibility/StateTypeAdapter.java,v
retrieving revision 1.4
diff -u -p -r1.4 StateTypeAdapter.java
--- bridge/org/GNOME/Accessibility/StateTypeAdapter.java	27 Jan 2003 16:01:30 -0000	1.4
+++ bridge/org/GNOME/Accessibility/StateTypeAdapter.java	16 May 2003 09:10:52 -0000
@@ -151,9 +151,11 @@ public class StateTypeAdapter extends St
 		else if (state == AccessibleState.TRANSIENT) value = StateType._STATE_TRANSIENT;
 		else if (state == AccessibleState.VERTICAL) value = StateType._STATE_VERTICAL;
 		else if (state == AccessibleState.VISIBLE) value = StateType._STATE_VISIBLE;
-        // Special case for MANAGES_DESCENDANTS which is currently not part of
-        // JAA - XXX Must fix when it appears in later revision of JAA.
+        // Special cases for MANAGES_DESCENDANTS and INCONSISTENT which are 
+        // currently not part of JAA 
+        // XXX Must fix when they appear in later revision of JAA.
         else if ( state.toString() == "managesDescendants" ) value=StateType._STATE_MANAGES_DESCENDANTS;
+        else if ( state.toString() == "inconsistent" ) value=StateType._STATE_INCONSISTENT;
 		else value = StateType._STATE_INVALID;
 		return value;		
 	}


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