]> Pileus Git - ~andy/gtk/blob - modules/other/gail/tests/testlib.h
gail: No need to include modules/other in CFLAGS anymore
[~andy/gtk] / modules / other / gail / tests / testlib.h
1 #include <stdio.h>
2 #include <gtk/gtk.h>
3
4 /* Maximum characters in the output buffer */
5 #define MAX_LINE_SIZE   1000
6
7 /* Maximum number of tests */
8 #define MAX_TESTS       30 
9
10 /* Maximum number of test windows */
11 #define MAX_WINDOWS     5
12
13 /* Maximum number of parameters any test can have */
14 #define MAX_PARAMS      3
15
16 /* Information on the Output Window */
17
18 typedef struct
19 {
20   GtkWidget     *outputWindow;
21   GtkTextBuffer *outputBuffer; 
22   GtkTextIter   outputIter;
23 }OutputWindow;
24
25 typedef void (*TLruntest) (AtkObject * obj, gint win_num);
26
27 /* General purpose functions */
28
29 gboolean                already_accessed_atk_object     (AtkObject      *obj);
30 AtkObject*              find_object_by_role             (AtkObject      *obj,
31                                                         AtkRole         *role,
32                                                         gint            num_roles);
33 AtkObject*              find_object_by_type             (AtkObject      *obj,
34                                                         gchar           *type);
35 AtkObject*              find_object_by_name_and_role    (AtkObject      *obj,
36                                                         const gchar     *name,
37                                                         AtkRole         *roles,
38                                                         gint            num_roles);
39 AtkObject*              find_object_by_accessible_name_and_role (AtkObject *obj,
40                                                         const gchar     *name,
41                                                         AtkRole         *roles,
42                                                         gint            num_roles);
43 void                    display_children                (AtkObject      *obj,
44                                                         gint            depth,
45                                                         gint            child_number);
46 void                    display_children_to_depth       (AtkObject      *obj,
47                                                         gint            to_depth,
48                                                         gint            depth,
49                                                         gint            child_number);
50
51
52 /* Test GUI functions */
53
54 gint                    create_windows                  (AtkObject      *obj,
55                                                         TLruntest       runtest,
56                                                         OutputWindow    **outwin);
57 gboolean                add_test                        (gint           window,
58                                                         gchar           *name,
59                                                         gint            num_params,
60                                                         gchar           *parameter_names[],
61                                                         gchar           *default_names[]);
62 void                    set_output_buffer               (gchar          *output);
63 gchar                   **tests_set                     (gint           window,
64                                                         int             *count);
65 gchar                   *get_arg_of_func                (gint           window,
66                                                         gchar           *function_name,
67                                                         gchar           *arg_label);
68 int                     string_to_int                   (const char     *the_string);
69 gboolean                isVisibleDialog                 (void);
70