No issues found
1 /*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2 of the License, or (at your option) version 3.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with the program; if not, see <http://www.gnu.org/licenses/>
14 *
15 *
16 * Authors:
17 * Yuedong Du <yuedong.du@sun.com>
18 *
19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
20 *
21 */
22
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
26
27 #include <atk/atk.h>
28
29 #include "table/e-table.h"
30 #include "table/e-table-click-to-add.h"
31
32 #include "gal-a11y-e-table.h"
33 #include "gal-a11y-e-table-click-to-add.h"
34 #include "gal-a11y-e-table-click-to-add-factory.h"
35
36 #define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableClickToAddFactoryClass))
37 static AtkObjectFactoryClass *parent_class;
38 #define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
39
40 /* Static functions */
41
42 static GType
43 gal_a11y_e_table_click_to_add_factory_get_accessible_type (void)
44 {
45 return GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD;
46 }
47
48 static AtkObject *
49 gal_a11y_e_table_click_to_add_factory_create_accessible (GObject *obj)
50 {
51 AtkObject * atk_object;
52
53 g_return_val_if_fail (E_IS_TABLE_CLICK_TO_ADD (obj), NULL);
54
55 atk_object = gal_a11y_e_table_click_to_add_new (obj);
56
57 return atk_object;
58 }
59
60 static void
61 gal_a11y_e_table_click_to_add_factory_class_init (GalA11yETableClickToAddFactoryClass *class)
62 {
63 AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (class);
64
65 parent_class = g_type_class_ref (PARENT_TYPE);
66
67 factory_class->create_accessible = gal_a11y_e_table_click_to_add_factory_create_accessible;
68 factory_class->get_accessible_type = gal_a11y_e_table_click_to_add_factory_get_accessible_type;
69 }
70
71 static void
72 gal_a11y_e_table_click_to_add_factory_init (GalA11yETableClickToAddFactory *factory)
73 {
74 }
75
76 /**
77 * gal_a11y_e_table_factory_get_type:
78 * @void:
79 *
80 * Registers the &GalA11yETableFactory class if necessary, and returns the type ID
81 * associated to it.
82 *
83 * Return value: The type ID of the &GalA11yETableFactory class.
84 **/
85 GType
86 gal_a11y_e_table_click_to_add_factory_get_type (void)
87 {
88 static GType type = 0;
89
90 if (!type) {
91 GTypeInfo info = {
92 sizeof (GalA11yETableClickToAddFactoryClass),
93 (GBaseInitFunc) NULL,
94 (GBaseFinalizeFunc) NULL,
95 (GClassInitFunc) gal_a11y_e_table_click_to_add_factory_class_init,
96 (GClassFinalizeFunc) NULL,
97 NULL, /* class_data */
98 sizeof (GalA11yETableClickToAddFactory),
99 0,
100 (GInstanceInitFunc) gal_a11y_e_table_click_to_add_factory_init,
101 NULL /* value_table */
102 };
103
104 type = g_type_register_static (PARENT_TYPE, "GalA11yETableClickToAddFactory", &info, 0);
105 }
106
107 return type;
108 }