2008-06-13 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / tests / apps / object-app.c
1 #include <gmodule.h>
2 #include <atk/atk.h>
3 #include <my-atk.h>
4
5 #include "atk-object-xml-loader.h"
6
7 static gchar *tdata_path = NULL;
8
9 static AtkObject *root_accessible;
10
11 #define OBJECT_TEST_1 "object-test-stage1.xml"
12
13 G_MODULE_EXPORT void
14 test_init (gchar *path)
15 {
16   gchar *td;
17
18   if (path == NULL)
19      g_error("No test data path provided");
20   tdata_path = path;
21
22   td = g_build_path(G_DIR_SEPARATOR_S, tdata_path, OBJECT_TEST_1, NULL);
23   root_accessible = ATK_OBJECT(atk_object_xml_parse(td));
24   g_free(td);
25 }
26
27 G_MODULE_EXPORT void
28 test_next (int argc, char *argv[])
29 {
30   g_print("Moving to next stage\n");
31 }
32
33 G_MODULE_EXPORT void
34 test_finished (int argc, char *argv[])
35 {
36   g_print("Test has completed\n");
37 }
38
39 G_MODULE_EXPORT AtkObject *
40 test_get_root (void)
41 {
42   return root_accessible;
43 }