2001-12-10 Michael Meeks <michael@ximian.com>
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_table.c
index 32a409a..24ba32b 100644 (file)
@@ -1,3 +1,6 @@
+#include <stdlib.h> /* for malloc */
+#include <cspi/spi-private.h>
+
 /**
  * AccessibleTable_ref:
  * @obj: a pointer to the #AccessibleTable implementor on which to operate.
  * Returns: (no return code implemented yet).
  *
  **/
-int
+void
 AccessibleTable_ref (AccessibleTable *obj)
 {
-  Accessibility_Table_ref (*obj, &ev);
-  return 0;
+  cspi_object_ref (obj);
 }
 
-
-
 /**
  * AccessibleTable_unref:
  * @obj: a pointer to the #AccessibleTable implementor on which to operate.
@@ -25,11 +25,10 @@ AccessibleTable_ref (AccessibleTable *obj)
  * Returns: (no return code implemented yet).
  *
  **/
-int
+void
 AccessibleTable_unref (AccessibleTable *obj)
 {
-  Accessibility_Table_unref (*obj, &ev);
-  return 0;
+  cspi_object_unref (obj);
 }
 
 /**
@@ -45,11 +44,9 @@ Accessible *
 AccessibleTable_getCaption (AccessibleTable *obj)
 {
   return (Accessible *)
-    Accessibility_Table__get_caption (*obj, &ev);
+    Accessibility_Table__get_caption (CSPI_OBJREF (obj), cspi_ev ());
 }
 
-
-
 /**
  * AccessibleTable_getSummary:
  * @obj: a pointer to the #AccessibleTable implementor on which to operate.
@@ -64,11 +61,9 @@ Accessible *
 AccessibleTable_getSummary (AccessibleTable *obj)
 {
   return (Accessible *)
-    Accessibility_Table__get_summary (*obj, &ev);
+    Accessibility_Table__get_summary (CSPI_OBJREF (obj), cspi_ev ());
 }
 
-
-
 /**
  * AccessibleTable_getNRows:
  * @obj: a pointer to the #AccessibleTable implementor on which to operate.
@@ -84,11 +79,9 @@ long
 AccessibleTable_getNRows (AccessibleTable *obj)
 {
   return (long)
-    Accessibility_Table__get_nRows (*obj, &ev);
+    Accessibility_Table__get_nRows (CSPI_OBJREF (obj), cspi_ev ());
 }
 
-
-
 /**
  * AccessibleTable_getNColumns:
  * @obj: a pointer to the #AccessibleTable implementor on which to operate.
@@ -104,10 +97,9 @@ long
 AccessibleTable_getNColumns (AccessibleTable *obj)
 {
   return (long)
-    Accessibility_Table__get_nColumns (*obj, &ev);
+    Accessibility_Table__get_nColumns (CSPI_OBJREF (obj), cspi_ev ());
 }
 
-
 /**
  * AccessibleTable_getAccessibleAt:
  * @obj: a pointer to the #AccessibleTable implementor on which to operate.
@@ -127,11 +119,10 @@ AccessibleTable_getAccessibleAt (AccessibleTable *obj,
                                  long int column)
 {
   return (Accessible *)
-    Accessibility_Table_getAccessibleAt (*obj,
-                              (CORBA_long) row, (CORBA_long) column, &ev);
+    Accessibility_Table_getAccessibleAt (CSPI_OBJREF (obj),
+                              (CORBA_long) row, (CORBA_long) column, cspi_ev ());
 }
 
-
 /**
  * AccessibleTable_getIndexAt:
  * @obj: a pointer to the #AccessibleTable implementor on which to operate.
@@ -153,8 +144,8 @@ AccessibleTable_getIndexAt (AccessibleTable *obj,
                             long int column)
 {
   return (long)
-    Accessibility_Table_getIndexAt (*obj,
-                                   (CORBA_long) row, (CORBA_long) column, &ev);
+    Accessibility_Table_getIndexAt (CSPI_OBJREF (obj),
+                                   (CORBA_long) row, (CORBA_long) column, cspi_ev ());
 }
 
 
@@ -177,8 +168,8 @@ AccessibleTable_getRowAtIndex (AccessibleTable *obj,
                                long index)
 {
   return (long)
-    Accessibility_Table_getRowAtIndex (*obj,
-                                      (CORBA_long) index, &ev);
+    Accessibility_Table_getRowAtIndex (CSPI_OBJREF (obj),
+                                      (CORBA_long) index, cspi_ev ());
 }
 
 
@@ -201,8 +192,8 @@ AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
                                   long index)
 {
   return (long)
-    Accessibility_Table_getColumnAtIndex (*obj,
-                                         (CORBA_long) index, &ev);
+    Accessibility_Table_getColumnAtIndex (CSPI_OBJREF (obj),
+                                         (CORBA_long) index, cspi_ev ());
 }
 
 
@@ -223,8 +214,8 @@ AccessibleTable_getRowDescription (AccessibleTable *obj,
                                   long int row)
 {
   return (char *)
-    Accessibility_Table_getRowDescription (*obj,
-                                          (CORBA_long) row, &ev);
+    Accessibility_Table_getRowDescription (CSPI_OBJREF (obj),
+                                          (CORBA_long) row, cspi_ev ());
 }
 
 
@@ -245,8 +236,8 @@ AccessibleTable_getColumnDescription (AccessibleTable *obj,
                                      long int column)
 {
   return (char *)
-    Accessibility_Table_getColumnDescription (*obj,
-                                             (CORBA_long) column, &ev);
+    Accessibility_Table_getColumnDescription (CSPI_OBJREF (obj),
+                                             (CORBA_long) column, cspi_ev ());
 }
 
 
@@ -269,8 +260,8 @@ AccessibleTable_getRowExtentAt (AccessibleTable *obj,
                                 long int column)
 {
   return (long)
-    Accessibility_Table_getRowExtentAt (*obj,
-                                       (CORBA_long) row, (CORBA_long) column, &ev);
+    Accessibility_Table_getRowExtentAt (CSPI_OBJREF (obj),
+                                       (CORBA_long) row, (CORBA_long) column, cspi_ev ());
 }
 
 
@@ -293,8 +284,8 @@ AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
                                    long int column)
 {
   return (long)
-    Accessibility_Table_getColumnExtentAt (*obj,
-                                       (CORBA_long) row, (CORBA_long) column, &ev);
+    Accessibility_Table_getColumnExtentAt (CSPI_OBJREF (obj),
+                                       (CORBA_long) row, (CORBA_long) column, cspi_ev ());
 }
 
 
@@ -314,8 +305,8 @@ AccessibleTable_getRowHeader (AccessibleTable *obj,
                              long int row)
 {
   return (Accessible *)
-    Accessibility_Table_getRowHeader (*obj,
-                                     (CORBA_long) row, &ev);
+    Accessibility_Table_getRowHeader (CSPI_OBJREF (obj),
+                                     (CORBA_long) row, cspi_ev ());
 }
 
 
@@ -336,8 +327,8 @@ AccessibleTable_getColumnHeader (AccessibleTable *obj,
                                 long int column)
 {
   return (Accessible *)
-    Accessibility_Table_getColumnHeader (*obj,
-                                     (CORBA_long) column, &ev);
+    Accessibility_Table_getColumnHeader (CSPI_OBJREF (obj),
+                                     (CORBA_long) column, cspi_ev ());
 }
 
 
@@ -354,7 +345,7 @@ long
 AccessibleTable_getNSelectedRows (AccessibleTable *obj)
 {
   return (long)
-    Accessibility_Table__get_nSelectedRows (*obj, &ev);
+    Accessibility_Table__get_nSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
 }
 
 
@@ -373,7 +364,7 @@ long
 AccessibleTable_getSelectedRows (AccessibleTable *obj,
                                  long int **selectedRows)
 {
-  Accessibility_LongSeq *rows = Accessibility_Table_getSelectedRows (*obj, &ev);
+  Accessibility_LongSeq *rows = Accessibility_Table_getSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
   CORBA_long *i;
   long *j;
   long length;
@@ -405,7 +396,7 @@ long
 AccessibleTable_getNSelectedColumns (AccessibleTable *obj)
 {
   return (long)
-    Accessibility_Table__get_nSelectedColumns (*obj, &ev);
+    Accessibility_Table__get_nSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
 }
 
 
@@ -424,7 +415,7 @@ long
 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
                                     long int **selectedColumns)
 {
-  Accessibility_LongSeq *columns = Accessibility_Table_getSelectedColumns (*obj, &ev);
+  Accessibility_LongSeq *columns = Accessibility_Table_getSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
   CORBA_long *i;
   long *j;
   long length;
@@ -452,13 +443,13 @@ AccessibleTable_getSelectedColumns (AccessibleTable *obj,
  * Returns: #TRUE if the specified row is currently selected, #FALSE if not.
  *
  **/
-boolean
+SPIBoolean
 AccessibleTable_isRowSelected (AccessibleTable *obj,
                                long int row)
 {
-  return (boolean)
-    Accessibility_Table_isRowSelected (*obj,
-                                      (CORBA_long) row, &ev);
+  return (SPIBoolean)
+    Accessibility_Table_isRowSelected (CSPI_OBJREF (obj),
+                                      (CORBA_long) row, cspi_ev ());
 }
 
 
@@ -474,13 +465,13 @@ AccessibleTable_isRowSelected (AccessibleTable *obj,
  * Returns: #TRUE if the specified column is currently selected, #FALSE if not.
  *
  **/
-boolean
+SPIBoolean
 AccessibleTable_isColumnSelected (AccessibleTable *obj,
                                   long int column)
 {
-  return (boolean)
-    Accessibility_Table_isColumnSelected (*obj,
-                                      (CORBA_long) column, &ev);
+  return (SPIBoolean)
+    Accessibility_Table_isColumnSelected (CSPI_OBJREF (obj),
+                                      (CORBA_long) column, cspi_ev ());
 }
 
 
@@ -496,13 +487,13 @@ AccessibleTable_isColumnSelected (AccessibleTable *obj,
  * Returns: #TRUE if the specified cell is currently selected, #FALSE if not.
  *
  **/
-boolean
+SPIBoolean
 AccessibleTable_isSelected (AccessibleTable *obj,
                             long int row,
                             long int column)
 {
-  return (boolean)
-  Accessibility_Table_isSelected (*obj,
-                                 (CORBA_long) row, (CORBA_long) column, &ev);
+  return (SPIBoolean)
+  Accessibility_Table_isSelected (CSPI_OBJREF (obj),
+                                 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
 }