*
* Connects to the accessibility registry and initializes the SPI.
*
- * Returns: 0 on success, otherwise an integer error code.
+ * Returns: 0 on success, otherwise an integer error code.
**/
int
SPI_init (void)
registry = cspi_init ();
g_atexit (cspi_cleanup);
-
- return 0;
+
+ /* fprintf (stderr, "registry=%x\n", (int) registry); */
+
+ if ((registry != CORBA_OBJECT_NIL) && (cspi_ping (registry)))
+ return 0;
+ else
+ return 2;
}
/**
}
/**
+ * SPI_freeRect:
+ * @r: a pointer to an SPIRect returned from another at-spi call.
+ *
+ * Free a SPIRect structure returned from an at-spi call. Clients of
+ * at-spi should use this function instead of free () or g_free().
+ * A NULL rect @r will be silently ignored.
+ * This API should not be used to free data
+ * from other libraries or allocated by the client.
+ **/
+void
+SPI_freeRect (SPIRect *r)
+{
+ if (r)
+ {
+ /* err, okay, in this case the client _could_
+ have called g_free, but we don't want to guarantee it */
+ g_free (r);
+ }
+}
+
+/**
* DOCUMENT_ME!
**/
char *