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 (
30 static AtkNoOpObjectFactoryClass
*parent_class
= NULL
;
33 atk_no_op_object_factory_get_type ()
35 static GType type
= 0;
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 */
49 (GInstanceInitFunc
) NULL
, /* instance init */
50 NULL
/* value table */
52 type
= g_type_register_static (
53 ATK_TYPE_OBJECT_FACTORY
,
54 "AtkNoOpObjectFactory" , &tinfo
, 0);
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
;
71 * atk_no_op_object_factory_new:
73 * Creates an instance of an #AtkObjectFactory which generates primitive
74 * (non-functioning) #AtkObjects.
76 * Returns: an instance of an #AtkObjectFactory
79 atk_no_op_object_factory_new ()
83 factory
= g_object_new (ATK_TYPE_NO_OP_OBJECT_FACTORY
, NULL
);
85 g_return_val_if_fail (factory
!= NULL
, NULL
);
86 return ATK_OBJECT_FACTORY (factory
);
90 atk_no_op_object_factory_create_accessible (GObject
*obj
)
92 AtkObject
*accessible
;
94 accessible
= atk_no_op_object_new (obj
);