Re: [g-a-devel]RFE need to add IDL and C bindings for row/column selection "setter"methods in at-spi
- From: Bill Haneman <bill haneman sun com>
- To: gnome2-release-team gnome org, gnome-accessibility-devel gnome org
- Subject: Re: [g-a-devel]RFE need to add IDL and C bindings for row/column selection "setter"methods in at-spi
- Date: Sun, 14 Apr 2002 20:57:32 +0100
Hi:
Attached is a patch to fix this bug, it introduces new API. Note that
the API
introduced is "bridge" API to connect to pre-existing ATK API; basically
we
just forgot about this bit of AtkTable and hadn't noticed the absence
until
now. So I think the form of the API, and its utility/need, are not in
question,
but of course API is API. It's an obvious omission though, not
something new...
Please let us know ASAP if you have specific issues with the API other
than
a general reluctance to add stuff in RC1; we'd like to
apply the patch Monday and put it in the tarball.
We certainly hope this will be the last bit of missing API prior to 1.0
:-)
Thanks,
Bill
? table-selection-patch.diff
? docs/reference/cspi/tmpl/at-spi-cspi-unused.sgml
? registryd/at-spi-registryd
? test/key-listener-test
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/at-spi/ChangeLog,v
retrieving revision 1.183
diff -u -r1.183 ChangeLog
--- ChangeLog 13 Apr 2002 20:45:38 -0000 1.183
+++ ChangeLog 14 Apr 2002 18:52:24 -0000
@@ -1,4 +1,23 @@
-2002-04-113 Marc Mulcahy <marc mulcahy sun com>
+2002-04-14 Bill Haneman <bill haneman sun com>
+
+ * idl/Accessibility_Table.idl: Added missing methods,
+ Accessibility_Table_addRowSelection,
+ Accessibility_Table_addColumnSelection,
+ Accessibility_Table_removeRowSelection,
+ Accessibility_Table_removeColumnSelection.
+
+ * cspi/spi_table.c:
+ Added C wrappers for above IDL:
+ AccessibleTable_addRowSelection,
+ AccessibleTable_addColumnSelection,
+ AccessibleTable_removeRowSelection,
+ AccessibleTable_removeColumnSelection.
+
+ * libspi/table.c:
+ Added server-side implementation code for IDL above, connecting
+ to pre-existing ATK api.
+
+2002-04-13 Marc Mulcahy <marc mulcahy sun com>
* idl/Accessibility_State.idl: Made StateSet inherit from BonoboUnknown.
Index: cspi/spi_table.c
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi_table.c,v
retrieving revision 1.16
diff -u -r1.16 spi_table.c
--- cspi/spi_table.c 12 Dec 2001 18:23:00 -0000 1.16
+++ cspi/spi_table.c 14 Apr 2002 18:52:25 -0000
@@ -551,6 +551,114 @@
}
/**
+ * AccessibleTable_addRowSelection:
+ * @obj: a pointer to the #AccessibleTable implementor on which to operate.
+ * @row:
+ *
+ * Select the specified row, adding it to the current row selection.
+ * Not all tables support row selection.
+ *
+ * Returns: #TRUE if the specified row was successfully selected, #FALSE if not.
+ **/
+SPIBoolean
+AccessibleTable_addRowSelection (AccessibleTable *obj,
+ long int row)
+{
+ SPIBoolean retval;
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
+ retval =
+ Accessibility_Table_addRowSelection (CSPI_OBJREF (obj),
+ (CORBA_long) row, cspi_ev ());
+
+ cspi_return_val_if_ev ("addRowSelection", FALSE);
+
+ return retval;
+}
+
+/**
+ * AccessibleTable_addColumnSelection:
+ * @obj: a pointer to the #AccessibleTable implementor on which to operate.
+ * @column:
+ *
+ * Select the specified column, adding it to the current column selection.
+ * Not all tables support column selection.
+ *
+ * Returns: #TRUE if the specified column was successfully selected, #FALSE if not.
+ **/
+SPIBoolean
+AccessibleTable_addColumnSelection (AccessibleTable *obj,
+ long int column)
+{
+ SPIBoolean retval;
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
+ retval =
+ Accessibility_Table_addColumnSelection (CSPI_OBJREF (obj),
+ (CORBA_long) column, cspi_ev ());
+
+ cspi_return_val_if_ev ("addColumnSelection", FALSE);
+
+ return retval;
+}
+
+/**
+ * AccessibleTable_removeRowSelection:
+ * @obj: a pointer to the #AccessibleTable implementor on which to operate.
+ * @row:
+ *
+ * De-select the specified row, removing it to the current row selection.
+ * Not all tables support row selection.
+ *
+ * Returns: #TRUE if the specified row was successfully de-selected, #FALSE if not.
+ **/
+SPIBoolean
+AccessibleTable_removeRowSelection (AccessibleTable *obj,
+ long int row)
+{
+ SPIBoolean retval;
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
+ retval =
+ Accessibility_Table_removeRowSelection (CSPI_OBJREF (obj),
+ (CORBA_long) row, cspi_ev ());
+
+ cspi_return_val_if_ev ("removeRowSelection", FALSE);
+
+ return retval;
+}
+
+/**
+ * AccessibleTable_removeColumnSelection:
+ * @obj: a pointer to the #AccessibleTable implementor on which to operate.
+ * @column:
+ *
+ * De-select the specified column, removing it to the current column selection.
+ * Not all tables support column selection.
+ *
+ * Returns: #TRUE if the specified column was successfully de-selected, #FALSE if not.
+ **/
+SPIBoolean
+AccessibleTable_removeColumnSelection (AccessibleTable *obj,
+ long int column)
+{
+ SPIBoolean retval;
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
+ retval =
+ Accessibility_Table_removeColumnSelection (CSPI_OBJREF (obj),
+ (CORBA_long) column, cspi_ev ());
+
+ cspi_return_val_if_ev ("removeColumnSelection", FALSE);
+
+ return retval;
+}
+
+/**
* AccessibleTable_isSelected:
* @obj: a pointer to the #AccessibleTable implementor on which to operate.
* @row:
Index: idl/Accessibility_Table.idl
===================================================================
RCS file: /cvs/gnome/at-spi/idl/Accessibility_Table.idl,v
retrieving revision 1.5
diff -u -r1.5 Accessibility_Table.idl
--- idl/Accessibility_Table.idl 1 Jan 2002 22:35:30 -0000 1.5
+++ idl/Accessibility_Table.idl 14 Apr 2002 18:52:25 -0000
@@ -49,6 +49,10 @@
boolean isRowSelected (in long row);
boolean isColumnSelected (in long column);
boolean isSelected (in long row, in long column);
+ boolean addRowSelection (in long row);
+ boolean addColumnSelection (in long column);
+ boolean removeRowSelection (in long row);
+ boolean removeColumnSelection (in long column);
/**
* unImplemented:
*
Index: libspi/table.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/table.c,v
retrieving revision 1.12
diff -u -r1.12 table.c
--- libspi/table.c 18 Dec 2001 13:38:44 -0000 1.12
+++ libspi/table.c 14 Apr 2002 18:52:26 -0000
@@ -362,6 +362,57 @@
return (CORBA_boolean) atk_table_is_column_selected (table, (gint) column);
}
+static CORBA_boolean
+impl_addRowSelection (PortableServer_Servant servant,
+ const CORBA_long row,
+ CORBA_Environment *ev)
+{
+ AtkTable *table = get_table_from_servant (servant);
+
+ g_return_val_if_fail (table != NULL, FALSE);
+
+ return (CORBA_boolean) atk_table_add_row_selection (table, (gint) row);
+}
+
+
+static CORBA_boolean
+impl_addColumnSelection (PortableServer_Servant servant,
+ const CORBA_long column,
+ CORBA_Environment *ev)
+{
+ AtkTable *table = get_table_from_servant (servant);
+
+ g_return_val_if_fail (table != NULL, FALSE);
+
+ return (CORBA_boolean) atk_table_add_column_selection (table, (gint) column);
+}
+
+
+static CORBA_boolean
+impl_removeRowSelection (PortableServer_Servant servant,
+ const CORBA_long row,
+ CORBA_Environment *ev)
+{
+ AtkTable *table = get_table_from_servant (servant);
+
+ g_return_val_if_fail (table != NULL, FALSE);
+
+ return (CORBA_boolean) atk_table_remove_row_selection (table, (gint) row);
+}
+
+
+static CORBA_boolean
+impl_removeColumnSelection (PortableServer_Servant servant,
+ const CORBA_long column,
+ CORBA_Environment *ev)
+{
+ AtkTable *table = get_table_from_servant (servant);
+
+ g_return_val_if_fail (table != NULL, FALSE);
+
+ return (CORBA_boolean) atk_table_remove_column_selection (table, (gint) column);
+}
+
static CORBA_boolean
impl_isSelected (PortableServer_Servant servant,
@@ -403,6 +454,10 @@
epv->getSelectedColumns = impl_getSelectedColumns;
epv->isRowSelected = impl_isRowSelected;
epv->isColumnSelected = impl_isColumnSelected;
+ epv->addRowSelection = impl_addRowSelection;
+ epv->addColumnSelection = impl_addColumnSelection;
+ epv->removeRowSelection = impl_removeRowSelection;
+ epv->removeColumnSelection = impl_removeColumnSelection;
epv->isSelected = impl_isSelected;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]