2009-27-09 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / tests / dummyatk / my-atk-selection.h
1 /* This file contains both declaration and definition of the MyAtkSelection,
2  * a GObject that implements the AtkSelectionIface interface.
3  */
4
5 #ifndef MY_ATK_SELECTION_H
6 #define MY_ATK_SELECTION_H
7
8 #include <glib-object.h>
9 #include <atk/atk.h> 
10
11 #include <my-atk-object.h>
12
13 #define MY_TYPE_ATK_SELECTION             (my_atk_selection_get_type ())
14 #define MY_ATK_SELECTION(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_SELECTION, MyAtkSelection))
15 #define MY_ATK_SELECTION_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_SELECTION, MyAtkSelectionClass))
16 #define MY_IS_ATK_SELECTION(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_SELECTION))
17 #define MY_IS_ATK_SELECTION_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_SELECTION))
18 #define MY_ATK_SELECTION_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_SELECTION, MyAtkSelectionClass))
19
20 /* Number of child objects for the MyAtkSelection instance */
21 #define TEST_SELECTION_NCHILDREN 10    
22
23 typedef struct _MyAtkSelection MyAtkSelection;
24 typedef struct _MyAtkSelectionClass MyAtkSelectionClass;
25
26 struct _MyAtkSelection 
27 {
28     MyAtkObject parent;
29         
30     gboolean disposed;
31     
32     /* TRUE if multiple selection is supported, FALSE otherwise.
33      * default - TRUE.
34      */
35     gboolean multisel_supported;
36     
37     /* Children of this object */
38     MyAtkObject* child[TEST_SELECTION_NCHILDREN];
39     
40     /* is_selected[i] == TRUE means the ith child is selected, == FALSE - 
41      * it is not.
42      */
43     gboolean is_selected[TEST_SELECTION_NCHILDREN];
44 };
45
46 struct _MyAtkSelectionClass 
47 {
48     MyAtkObjectClass parent;
49 };
50
51 GType 
52 my_atk_selection_get_type (void);
53
54 #endif /*MY_ATK_SELECTION_H*/
55