1 /* This file contains both declaration and definition of the MyAtkTable,
2 * a GObject that pretends to implement the AtkTableIface interface (it
3 * registers appropriate interface), but provides no implementation for any of the
4 * methods of this interface (NULL-filled vftbl).
7 #include <glib-object.h>
10 #include "my-atk-object.h"
11 #include "my-atk-table.h"
13 ///////////////////////////////////////////////////////////////////////////
14 // Helper functions and data
15 ///////////////////////////////////////////////////////////////////////////
17 my_atk_table_select_rows (MyAtkTable* table, gboolean sel_scheme[])
19 // the function does nothing
23 my_atk_table_select_columns (MyAtkTable* table, gboolean sel_scheme[])
25 // the function does nothing
28 ///////////////////////////////////////////////////////////////////////////
30 ///////////////////////////////////////////////////////////////////////////
31 static GObjectClass *parent_class_table = NULL;
33 /******************************************************************/
35 table_interface_init (gpointer g_iface, gpointer iface_data)
37 AtkTableIface *klass = (AtkTableIface *)g_iface;
39 /* set up overrides here */
41 (AtkObject* (*) (AtkTable *table, gint row, gint column)) NULL;
42 klass-> get_index_at =
43 (gint (*) (AtkTable *table, gint row, gint column)) NULL;
44 klass-> get_column_at_index =
45 (gint (*) (AtkTable *table, gint index_)) NULL;
46 klass-> get_row_at_index =
47 (gint (*) (AtkTable *table, gint index_)) NULL;
48 klass-> get_n_columns =
49 (gint (*) (AtkTable *table)) NULL;
51 (gint (*) (AtkTable *table)) NULL;
52 klass-> get_column_extent_at =
53 (gint (*) (AtkTable *table, gint row, gint column)) NULL;
54 klass-> get_row_extent_at =
55 (gint (*) (AtkTable *table, gint row, gint column)) NULL;
57 (AtkObject* (*) (AtkTable *table)) NULL;
58 klass-> get_column_description =
59 (const gchar* (*) (AtkTable *table, gint column)) NULL;
60 klass-> get_column_header =
61 (AtkObject* (*) (AtkTable *table, gint column)) NULL;
62 klass-> get_row_description =
63 (const gchar* (*) (AtkTable *table, gint row)) NULL;
64 klass-> get_row_header =
65 (AtkObject* (*) (AtkTable *table, gint row)) NULL;
67 (AtkObject* (*) (AtkTable *table)) NULL;
69 (void (*) (AtkTable *table, AtkObject *caption)) NULL;
70 klass-> set_column_description =
71 (void (*) (AtkTable *table, gint column, const gchar *description)) NULL;
72 klass-> set_column_header =
73 (void (*) (AtkTable *table, gint column, AtkObject *header)) NULL;
74 klass-> set_row_description =
75 (void (*) (AtkTable *table, gint row, const gchar *description)) NULL;
76 klass-> set_row_header =
77 (void (*) (AtkTable *table, gint row, AtkObject *header)) NULL;
79 (void (*) (AtkTable *table, AtkObject *accessible)) NULL;
80 klass-> get_selected_columns =
81 (gint (*) (AtkTable *table, gint **selected)) NULL;
82 klass-> get_selected_rows =
83 (gint (*) (AtkTable *table, gint **selected)) NULL;
84 klass-> is_column_selected =
85 (gboolean (*) (AtkTable *table, gint column)) NULL;
86 klass-> is_row_selected =
87 (gboolean (*) (AtkTable *table, gint row)) NULL;
89 (gboolean (*) (AtkTable *table, gint row, gint column)) NULL;
90 klass-> add_row_selection =
91 (gboolean (*) (AtkTable *table, gint row)) NULL;
92 klass-> remove_row_selection =
93 (gboolean (*) (AtkTable *table, gint row)) NULL;
94 klass-> add_column_selection =
95 (gboolean (*) (AtkTable *table, gint column)) NULL;
96 klass-> remove_column_selection =
97 (gboolean (*) (AtkTable *table, gint column)) NULL;
101 table_instance_init (GTypeInstance *instance, gpointer g_class)
103 MyAtkTable *self = (MyAtkTable *)instance;
105 self->disposed = FALSE;
109 my_atk_table_dispose (GObject *obj)
111 MyAtkTable *self = (MyAtkTable *)obj;
118 /* Make sure dispose does not run twice. */
119 self->disposed = TRUE;
121 /* Chain up to the parent class */
122 G_OBJECT_CLASS (parent_class_table)->dispose (obj);
126 my_atk_table_finalize (GObject *obj)
128 /* Chain up to the parent class */
129 G_OBJECT_CLASS (parent_class_table)->finalize (obj);
133 my_atk_table_class_init (gpointer g_class, gpointer g_class_data)
135 GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
136 MyAtkTableClass *klass = MY_ATK_TABLE_CLASS (g_class);
138 gobject_class->dispose = my_atk_table_dispose;
139 gobject_class->finalize = my_atk_table_finalize;
141 parent_class_table = g_type_class_peek_parent (klass);
145 my_atk_table_get_type (void)
147 static GType type = 0;
150 static const GTypeInfo info =
152 sizeof (MyAtkTableClass),
153 NULL, /* base_init */
154 NULL, /* base_finalize */
155 my_atk_table_class_init, /* class_init */
156 NULL, /* class_finalize */
157 NULL, /* class_data */
160 table_instance_init /* instance_init */
163 static const GInterfaceInfo iface_info =
165 (GInterfaceInitFunc) table_interface_init, /* interface_init */
166 NULL, /* interface_finalize */
167 NULL /* interface_data */
169 type = g_type_register_static (MY_TYPE_ATK_OBJECT,
172 g_type_add_interface_static (type,