Renamed SpiAccessibleEventListener to (just) SpiEventListener.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_main.c
index 027fa23..babbae0 100644 (file)
@@ -53,7 +53,9 @@ SPI_init (void)
 /**
  * SPI_event_main:
  * @isGNOMEApp: a #boolean indicating whether the client of the SPI
- *              will use the Gnome event loop or not.
+ *              will use the Gnome event loop or not.  Clients that have
+ *              their own GUIS will usually specify #TRUE here, and must
+ *              do so if they use Gnome GUI components.
  *
  * Starts/enters the main event loop for the SPI services.
  *
@@ -64,15 +66,23 @@ SPI_init (void)
 void
 SPI_event_main (boolean isGNOMEApp)
 {
-  if (isGNOMEApp) bonobo_main();
-  else CORBA_ORB_run (bonobo_orb(), &ev);
+  if (isGNOMEApp) {      
+    g_atexit(SPI_exit);
+    bonobo_main();
+  }
+  else {
+    /* TODO: install signal handlers to do cleanup */
+    CORBA_ORB_run (bonobo_orb(), &ev);
+    fprintf (stderr, "orb loop exited...\n");
+  }
 }
 
 /**
- * SPI_event_is_ready:
+ * SPI_eventIsReady:
  *
  * Checks to see if an SPI event is waiting in the event queue.
  * Used by clients that don't wish to use SPI_event_main().
+ *
  * Not Yet Implemented.
  *
  * Returns: #TRUE if an event is waiting, otherwise #FALSE.
@@ -86,10 +96,12 @@ SPI_eventIsReady ()
 
 /**
  * SPI_nextEvent:
+ * @waitForEvent: a #boolean indicating whether to block or not.
  *
  * Gets the next event in the SPI event queue; blocks if no event
- * is pending.
+ * is pending and @waitForEvent is #TRUE.
  * Used by clients that don't wish to use SPI_event_main().
+ *
  * Not Yet Implemented.
  *
  * Returns: the next #AccessibleEvent in the SPI event queue.
@@ -105,12 +117,12 @@ SPI_nextEvent (boolean waitForEvent)
  * SPI_exit:
  *
  * Disconnects from the Accessibility Registry and releases resources.
- * Not Yet Implemented.
  *
  **/
 void
 SPI_exit (void)
 {
+  fprintf (stderr, "bye-bye!\n");      
   exit(0);
 }