X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=test%2Fapp.c;h=c4d29f4c0a5f78721170d0c35a60cd3114d1beef;hb=838ffbd98cd6acfaad67fd6b3a08ac69b9f68f9d;hp=9092841d69840714ba613ea63d19f7d5d3cab6c2;hpb=aca3c37006a1198a76e5ead8e29a7534f94f2569;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/test/app.c b/test/app.c index 9092841..c4d29f4 100644 --- a/test/app.c +++ b/test/app.c @@ -23,12 +23,14 @@ #include #include #include +#include #include #include #include "accessible.h" -#include "atksimpleobject.h" #include "application.h" +#define APP_STATIC_BUFF_SZ 30 + int main(int argc, char **argv) { @@ -36,7 +38,7 @@ main(int argc, char **argv) CORBA_Object oclient; AtkObject *atko; char *obj_id; - char sbuf[30]; + char sbuf[APP_STATIC_BUFF_SZ]; Accessibility_Registry registry; Accessibility_Event e; @@ -51,23 +53,23 @@ main(int argc, char **argv) } /* Create the accesssible application server object */ - /* TODO: get app name and pid */ - sprintf(sbuf, "application-%s", argv[1]); - app = application_new(sbuf, "test application for accessibility SPI", "0001"); + 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); /* Create the Accessible 'source' for the event */ - atko = atk_simple_object_new (); - atk_object_set_name (atko, "dummy"); accessible = 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"; - oclient = oaf_activate_from_id (obj_id, 0, NULL, &ev); + oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { fprintf(stderr, ("Accessibility app error: exception during registry activation from id: %s\n"),