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 "gal-a11y-e-tree.h"
28 #include "gal-a11y-e-tree-factory.h"
29
30 static AtkObjectFactoryClass *parent_class;
31 #define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
32
33 /* Static functions */
34
35 static GType
36 gal_a11y_e_tree_factory_get_accessible_type (void)
37 {
38 return GAL_A11Y_TYPE_E_TREE;
39 }
40
41 static AtkObject *
42 gal_a11y_e_tree_factory_create_accessible (GObject *obj)
43 {
44 AtkObject *accessible;
45
46 accessible = gal_a11y_e_tree_new (obj);
47
48 return accessible;
49 }
50
51 static void
52 gal_a11y_e_tree_factory_class_init (GalA11yETreeFactoryClass *class)
53 {
54 AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (class);
55
56 parent_class = g_type_class_ref (PARENT_TYPE);
57
58 factory_class->create_accessible = gal_a11y_e_tree_factory_create_accessible;
59 factory_class->get_accessible_type = gal_a11y_e_tree_factory_get_accessible_type;
60 }
61
62 static void
63 gal_a11y_e_tree_factory_init (GalA11yETreeFactory *factory)
64 {
65 }
66
67 /**
68 * gal_a11y_e_tree_factory_get_type:
69 * @void:
70 *
71 * Registers the &GalA11yETreeFactory class if necessary, and returns the type ID
72 * associated to it.
73 *
74 * Return value: The type ID of the &GalA11yETreeFactory class.
75 **/
76 GType
77 gal_a11y_e_tree_factory_get_type (void)
78 {
79 static GType type = 0;
80
81 if (!type) {
82 GTypeInfo info = {
83 sizeof (GalA11yETreeFactoryClass),
84 (GBaseInitFunc) NULL,
85 (GBaseFinalizeFunc) NULL,
86 (GClassInitFunc) gal_a11y_e_tree_factory_class_init,
87 (GClassFinalizeFunc) NULL,
88 NULL, /* class_data */
89 sizeof (GalA11yETreeFactory),
90 0,
91 (GInstanceInitFunc) gal_a11y_e_tree_factory_init,
92 NULL /* value_tree */
93 };
94
95 type = g_type_register_static (PARENT_TYPE, "GalA11yETreeFactory", &info, 0);
96 }
97
98 return type;
99 }