Added C binding for key synthesis, and a new test/demo program
[platform/core/uifw/at-spi2-atk.git] / registryd / registryd.c
index f2d4f38..ba2c770 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #include <libbonobo.h>
+#include <glib/gmain.h>
 #include "registry.h"
 
 int
@@ -32,6 +33,7 @@ main (int argc,
       char **argv)
 {
         Registry *registry;
+       GSource *keyevent_source;
         char *obj_id;
 
         if (!bonobo_init (&argc, argv))
@@ -43,13 +45,19 @@ main (int argc,
 
         registry = registry_new ();
 
-        oaf_active_server_register (
+        bonobo_activation_active_server_register (
                 obj_id,
                 bonobo_object_corba_objref (bonobo_object (registry)));
 
 #ifdef AT_SPI_DEBUG
         fprintf (stderr, "Registry Message: Registry daemon is running.\n");
 #endif
+  
+        gdk_init(&argc, &argv);
+        g_timeout_add_full (G_PRIORITY_HIGH_IDLE, 200, registry->kbd_event_hook, registry, NULL);
+/*     keyevent_source =
+               g_source_new (registry->kbd_event_hook, sizeof (GSourceFunc));
+               g_source_attach (keyevent_source, g_main_context_default());*/
         bonobo_main ();
 
         return 0;