From 3f9c0df4014e6b5657fd607e7782282ac5e2f03f Mon Sep 17 00:00:00 2001 From: billh Date: Wed, 19 Jul 2006 10:17:37 +0000 Subject: [PATCH] Added Selection::deselectChild (RFE #326535). git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@838 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 14 ++++++++++++++ NEWS | 24 ++++++++++++++++++++++++ README | 2 +- configure.in | 4 ++-- cspi/spi.h | 4 ++++ cspi/spi_selection.c | 32 ++++++++++++++++++++++++++++++++ idl/Accessibility_Selection.idl | 22 +++++++++++++++++++++- libspi/selection.c | 26 ++++++++++++++++++++++++++ 8 files changed, 124 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c96820d..b10a4b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-07-18 Bill Haneman 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 modifications to patch from * cspi/bonobo/cspi-bonobo.c: diff --git a/NEWS b/NEWS index fadf5a0..4017591 100644 --- 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 --- 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! *** diff --git a/configure.in b/configure.in index 9de8ade..d509884 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/cspi/spi.h b/cspi/spi.h index 71d3d51..124b328 100644 --- a/cspi/spi.h +++ b/cspi/spi.h @@ -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); diff --git a/cspi/spi_selection.c b/cspi/spi_selection.c index 5268ff4..910e9c8 100644 --- a/cspi/spi_selection.c +++ b/cspi/spi_selection.c @@ -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. diff --git a/idl/Accessibility_Selection.idl b/idl/Accessibility_Selection.idl index e059ed9..aa4180b 100644 --- a/idl/Accessibility_Selection.idl +++ b/idl/Accessibility_Selection.idl @@ -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 (); }; }; diff --git a/libspi/selection.c b/libspi/selection.c index 64deabc..42fafe1 100644 --- a/libspi/selection.c +++ b/libspi/selection.c @@ -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; igetSelectedChild = 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; -- 2.7.4