Added Selection::deselectChild (RFE #326535).
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 19 Jul 2006 10:17:37 +0000 (10:17 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 19 Jul 2006 10:17:37 +0000 (10:17 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@838 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
NEWS
README
configure.in
cspi/spi.h
cspi/spi_selection.c
idl/Accessibility_Selection.idl
libspi/selection.c

index c96820d..b10a4b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-07-18  Bill Haneman <billh@gnome.org> modifications to patch from
+
+       * idl/Accessibility_Selection.idl:
+       (deselectChild): New method.
+
+       * libspi/selection.c:
+       (impl_deselectChild): Implement the new IDL method.
+
+       * cspi/spi.h:
+       (AccessibleSelection_deselectChild): Added new method.
+       
+       * cspi/spi_selection.c:
+       (AccessibleSelection_deselectChild): New method implemented.
+       
 2006-07-13  Bill Haneman <billh@gnome.org> modifications to patch from
 
        * cspi/bonobo/cspi-bonobo.c:
diff --git a/NEWS b/NEWS
index fadf5a0..4017591 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,27 @@
+What's new in at-spi-1.7.10:
+
+* New method Selection::deselectChild.  RFE #326535.
+
+What's new in at-spi-1.7.9:
+
+* I18n uses po/LINGUAS now.
+
+* Table enhancement: new method Table::getRowColumnExtentsAtIndex
+  RFE #326536.  Assistance from Ariel Rios.
+
+* Text enhancement: Text::getAttributeRun, Text::getDefaultAttributeSet
+  RFE #326540.  Assistance from Ariel Rios.
+
+* New interface, Document.  RFE #326520.
+
+* New roles, LINK, REDUNDANT_OBJECT, INPUT_METHOD_WINDOW, FORM.
+
+* Meaningful implementation and bridges for StreamableContent. 
+  RFE #326532.
+
+* Added STATE_VISITED, and relations DESCRIBED_BY, DESCRIPTION_FOR, 
+  and PARENT_WINDOW_OF.
+
 What's new in at-spi-1.7.4:
 
 * Fixed dist to include Accessibility_Selector.idl (missing from dist though
diff --git a/README b/README
index 155690b..85a7bf8 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 README
 
-at-spi version 1.7.4
+at-spi version 1.7.10
 
 *** Welcome to the Gnome Accessibility Project! ***
 
index 9de8ade..d509884 100644 (file)
@@ -2,7 +2,7 @@ AC_INIT(idl/Accessibility.idl)
 
 AT_SPI_MAJOR_VERSION=1
 AT_SPI_MINOR_VERSION=7
-AT_SPI_MICRO_VERSION=9
+AT_SPI_MICRO_VERSION=10
 AT_SPI_INTERFACE_AGE=0
 AT_SPI_BINARY_AGE=0
 AT_SPI_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION.$AT_SPI_MICRO_VERSION"
@@ -16,7 +16,7 @@ AC_SUBST(AT_SPI_BINARY_AGE)
 # libtool versioning
 LT_RELEASE=$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION
 LT_CURRENT=10
-LT_REVISION=10
+LT_REVISION=11
 LT_AGE=10
 LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
 AC_SUBST(LT_VERSION_INFO)
index 71d3d51..124b328 100644 (file)
@@ -782,6 +782,10 @@ AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
                                            long int selectedChildIndex);
 
 SPIBoolean
+AccessibleSelection_deselectChild (AccessibleSelection *obj,
+                                  long int childIndex);
+
+SPIBoolean
 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
                                      long int childIndex);
 
index 5268ff4..910e9c8 100644 (file)
@@ -169,6 +169,38 @@ AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
 }
 
 /**
+ * AccessibleSelection_deselectChild:
+ * @obj: a pointer to the #AccessibleSelection on which to operate.
+ * @childIndex: a #long indicating which of the children
+ *              of the #Accessible is to be de-selected.
+ *
+ * Deselect a specific child of an #AccessibleSelection.
+ *          Note that @childIndex is the index of the child
+ *          in the parent container.
+ * 
+ * See #AccessibleSelection_deselectSelectedChild
+ *
+ * Since AT-SPI 1.8.0
+ * 
+ * Returns: #TRUE if the child was successfully deselected, #FALSE otherwise.
+ **/
+SPIBoolean
+AccessibleSelection_deselectChild (AccessibleSelection *obj,
+                                  long int childIndex)
+{
+  SPIBoolean retval;
+
+  cspi_return_val_if_fail (obj != NULL, FALSE);
+
+  retval = Accessibility_Selection_deselectChild (
+    CSPI_OBJREF (obj), childIndex, cspi_ev ());
+
+  cspi_return_val_if_ev ("deselectChild", FALSE);
+
+  return retval;
+}
+
+/**
  * AccessibleSelection_isChildSelected:
  * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
  * @childIndex: an index into the #AccessibleSelection's list of children.
index e059ed9..aa4180b 100644 (file)
@@ -127,6 +127,27 @@ module Accessibility {
      */
     boolean clearSelection ();
     /**
+     * Remove a child from the selected children list of a Selection,
+     *       if the child is currently selected.
+     *
+     * @note unlike deselectSelectedChild, \c childIndex is the zero-offset
+     *       index into the Accessible instance's list of children,
+     *       not the index into the 'selected child list'.
+     *
+     * @param childIndex: a long integer (the zero offset index into the Accessible
+     *              object's list of children) indicating which child of the
+     *              Selection is to be selected.
+     *
+     * @returns \c True if the child was successfully selected, 
+     *          \c False otherwise.
+     *
+     * @see deselectSelectedChild
+     *
+     * @since AT-SPI 1.8.0
+     */
+    boolean deselectChild (in long childIndex);
+
+    /**
      * unImplemented:
      *
      * placeholders for future expansion.
@@ -134,6 +155,5 @@ module Accessibility {
     void unImplemented ();
     void unImplemented2 ();
     void unImplemented3 ();
-    void unImplemented4 ();
   };
 };
index 64deabc..42fafe1 100644 (file)
@@ -117,6 +117,31 @@ impl_deselectSelectedChild (PortableServer_Servant servant,
 }
 
 
+
+static CORBA_boolean
+impl_deselectChild (PortableServer_Servant servant,
+                   const CORBA_long       selectedChildIndex,
+                   CORBA_Environment     *ev)
+{
+  AtkSelection *selection = get_selection_from_servant (servant);
+  gint i, nselected;
+
+  g_return_val_if_fail (selection != NULL, FALSE);
+  nselected = atk_selection_get_selection_count (selection);
+  for (i=0; i<nselected; ++i)
+  {
+      AtkObject *selected_obj = atk_selection_ref_selection (selection, i);
+      if (atk_object_get_index_in_parent (selected_obj) == selectedChildIndex)
+      {
+         g_object_unref (G_OBJECT (selected_obj));
+         return atk_selection_remove_selection (selection, i);
+      }
+      g_object_unref (G_OBJECT (selected_obj));
+  }
+  return FALSE;
+}
+
+
 static CORBA_boolean
 impl_isChildSelected (PortableServer_Servant servant,
                      const CORBA_long       childIndex,
@@ -166,6 +191,7 @@ spi_selection_class_init (SpiSelectionClass *klass)
   epv->getSelectedChild       = impl_getSelectedChild;
   epv->selectChild            = impl_selectChild;
   epv->deselectSelectedChild  = impl_deselectSelectedChild;
+  epv->deselectChild          = impl_deselectChild;
   epv->isChildSelected        = impl_isChildSelected;
   epv->selectAll              = impl_selectAll;
   epv->clearSelection         = impl_clearSelection;