Update configure.in to create Makefile in tests directory.
[atk.git] / atk / atknoopobjectfactory.c
blob0b0547a52f4b3eb4a614acd71e8e8465def583be
1 /* ATK - Accessibility Toolkit
2 * Copyright 2001 Sun Microsystems Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #include "atkobject.h"
21 #include "atknoopobject.h"
22 #include "atknoopobjectfactory.h"
24 static void atk_no_op_object_factory_class_init (
25 AtkNoOpObjectFactoryClass *klass);
27 static AtkObject* atk_no_op_object_factory_create_accessible (
28 GObject *obj);
30 static AtkNoOpObjectFactoryClass *parent_class = NULL;
32 GType
33 atk_no_op_object_factory_get_type ()
35 static GType type = 0;
37 if (!type)
39 static const GTypeInfo tinfo =
41 sizeof (AtkNoOpObjectFactoryClass),
42 (GBaseInitFunc) NULL, /* base init */
43 (GBaseFinalizeFunc) NULL, /* base finalize */
44 (GClassInitFunc) atk_no_op_object_factory_class_init, /* class init */
45 (GClassFinalizeFunc) NULL, /* class finalize */
46 NULL, /* class data */
47 sizeof (AtkNoOpObjectFactory), /* instance size */
48 0, /* nb preallocs */
49 (GInstanceInitFunc) NULL, /* instance init */
50 NULL /* value table */
52 type = g_type_register_static (
53 ATK_TYPE_OBJECT_FACTORY,
54 "AtkNoOpObjectFactory" , &tinfo, 0);
57 return type;
60 static void
61 atk_no_op_object_factory_class_init (AtkNoOpObjectFactoryClass *klass)
63 AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
65 parent_class = g_type_class_ref (ATK_TYPE_OBJECT_FACTORY);
67 class->create_accessible = atk_no_op_object_factory_create_accessible;
70 AtkObjectFactory*
71 atk_no_op_object_factory_new ()
73 GObject *factory;
75 factory = g_object_new (ATK_TYPE_NO_OP_OBJECT_FACTORY, NULL);
77 g_return_val_if_fail (factory != NULL, NULL);
78 return ATK_OBJECT_FACTORY (factory);
81 static AtkObject*
82 atk_no_op_object_factory_create_accessible (GObject *obj)
84 AtkObject *accessible;
86 accessible = atk_no_op_object_new (obj);
88 return accessible;