2.34.0
[platform/upstream/at-spi2-core.git] / atspi / atspi-table-cell.c
index c18e6dc..83fe534 100644 (file)
@@ -7,19 +7,19 @@
  * Copyright 2013 SUSE LLC.
  *
  * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
+ * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU Library General Public
+ * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #include <stdlib.h> /* for malloc */
@@ -34,7 +34,7 @@ get_object_array_and_unref (DBusMessage *reply)
   if (!reply)
     return NULL;
 
-  if (strcmp (dbus_message_get_signature (reply), "(so)") != 0)
+  if (strcmp (dbus_message_get_signature (reply), "a(so)") != 0)
   {
     dbus_message_unref (reply);
     return NULL;
@@ -58,6 +58,8 @@ get_object_array_and_unref (DBusMessage *reply)
  * @obj: a GObject instance that implements AtspiTableCellIface
  *
  * Returns the number of columns occupied by this cell accessible.
+ * The returned values are meaningful only if the table cell has both
+ * STATE_VISIBLE and STATE_SHOWING.
  *
  * Returns: a gint representing the number of columns occupied by this cell,
  * or 0 if the cell does not implement this method.
@@ -101,6 +103,8 @@ atspi_table_cell_get_column_header_cells (AtspiTableCell *obj, GError **error)
  * @obj: a GObject instance that implements AtspiTableCellIface
  *
  * Returns the number of rows occupied by this cell accessible.
+ * The returned values are meaningful only if the table cell has both
+ * STATE_VISIBLE and STATE_SHOWING.
  *
  * Returns: a gint representing the number of rows occupied by this cell,
  * or 0 if the cell does not implement this method.
@@ -163,9 +167,12 @@ atspi_table_cell_get_position (AtspiTableCell *obj,
   g_return_val_if_fail (obj != NULL, -1);
 
   reply = _atspi_dbus_call_partial (obj, "org.freedesktop.DBus.Properties",
-                                    "Get", NULL, "ss",
+                                    "Get", error, "ss",
                                     atspi_interface_table_cell, "Position");
          
+  if (!reply)
+    return -1;
+
   dbus_message_iter_init (reply, &iter);
 
   /* TODO: Return error here */
@@ -203,6 +210,8 @@ atspi_table_cell_get_position (AtspiTableCell *obj,
  * @column_span: (out): the number of columns occupied by this cell.
  *
  * Gets the row and column indexes and extents of this cell accessible.
+ * The returned values are meaningful only if the table cell has both
+ * STATE_VISIBLE and STATE_SHOWING.
  */
 void
 atspi_table_cell_get_row_column_span (AtspiTableCell *obj,