projects
/
platform
/
upstream
/
at-spi2-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2006-01-09 Kjartan Maraas <kmaraas@gnome.org>
[platform/upstream/at-spi2-core.git]
/
test
/
app.c
diff --git
a/test/app.c
b/test/app.c
index
1dfafdc
..
3236b6a
100644
(file)
--- a/
test/app.c
+++ b/
test/app.c
@@
-2,7
+2,8
@@
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@
-23,10
+24,13
@@
#include <stdio.h>
#include <stdlib.h>
#include <libbonobo.h>
#include <stdio.h>
#include <stdlib.h>
#include <libbonobo.h>
+#include <bonobo-activation/bonobo-activation.h>
#include <atk/atkobject.h>
#include <libspi/Accessibility.h>
#include <atk/atkobject.h>
#include <libspi/Accessibility.h>
-#include "accessible.h"
-#include "application.h"
+#include <libspi/accessible.h>
+#include <libspi/application.h>
+
+#define APP_STATIC_BUFF_SZ 30
int
main(int argc, char **argv)
int
main(int argc, char **argv)
@@
-35,12
+39,12
@@
main(int argc, char **argv)
CORBA_Object oclient;
AtkObject *atko;
char *obj_id;
CORBA_Object oclient;
AtkObject *atko;
char *obj_id;
- char sbuf[
30
];
+ char sbuf[
APP_STATIC_BUFF_SZ
];
Accessibility_Registry registry;
Accessibility_Event e;
Accessibility_Registry registry;
Accessibility_Event e;
- Accessible *accessible;
- Application *app;
+
Spi
Accessible *accessible;
+
Spi
Application *app;
CORBA_exception_init(&ev);
CORBA_exception_init(&ev);
@@
-50,22
+54,21
@@
main(int argc, char **argv)
}
/* Create the accesssible application server object */
}
/* Create the accesssible application server object */
- /* TODO: get app name and pid */
- sprintf(sbuf, "application-%s", argv[1]);
+ g_snprintf(sbuf, APP_STATIC_BUFF_SZ, "application-%s", argv[0]);
+
atko = g_object_new (atk_object_get_type(), NULL);
atko = g_object_new (atk_object_get_type(), NULL);
- atk_object_set_name (atko,
"sbuf"
);
+ atk_object_set_name (atko,
sbuf
);
atk_object_set_description( atko, "test application for accessibility SPI");
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
Spi
Accessible 'source' for the event */
+ accessible =
spi_
accessible_new (atko);
fprintf(stderr, "accessible created.\n");
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) {
oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {