Revved to 1.0.0; at-spi 1.0 is now API frozen.
[platform/core/uifw/at-spi2-atk.git] / test / app.c
index 1b5566e..9bf749d 100644 (file)
@@ -42,8 +42,8 @@ main(int argc, char **argv)
 
         Accessibility_Registry registry;
         Accessibility_Event e;
-        Accessible *accessible;
-        Application *app;
+        SpiAccessible *accessible;
+        SpiApplication *app;
 
         CORBA_exception_init(&ev);
 
@@ -53,25 +53,21 @@ main(int argc, char **argv)
           }
 
         /* Create the accesssible application server object */
-        /* TODO: get app name and pid */
-       if (argc > 1)
-               snprintf(sbuf, APP_STATIC_BUFF_SZ, "application-%s",
-                                       (argc > 1) ? argv[1] : "test");
+        g_snprintf(sbuf, APP_STATIC_BUFF_SZ, "application-%s", argv[0]);
 
         atko = g_object_new (atk_object_get_type(), NULL);
         atk_object_set_name (atko, sbuf);
         atk_object_set_description( atko, "test application for accessibility SPI");
-        app = application_new(atko);
+        app = spi_application_new(atko);
 
-        /* Create the Accessible 'source' for the event */
-        accessible = accessible_new (atko);
+        /* Create the SpiAccessible 'source' for the event */
+        accessible = spi_accessible_new (atko);
         fprintf(stderr, "accessible created.\n");
 
-        /* FIXME: this type of event struct will leak, needs to be redefined */
-        e.target = bonobo_object_corba_objref ( bonobo_object (accessible));
-        e.type = CORBA_string_dup ("test");
+        e.source = bonobo_object_corba_objref ( bonobo_object (accessible));
+        e.type = CORBA_string_dup ("focus:");
 
-        obj_id = "OAFIID:Accessibility_Registry:proto0.1";
+        obj_id = "OAFIID:Accessibility_Registry:1.0";
 
         oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev);
         if (ev._major != CORBA_NO_EXCEPTION) {