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.
21 #include "atknoopobject.h"
23 static void atk_no_op_object_class_init (AtkNoOpObjectClass
*klass
);
25 static gpointer parent_class
= NULL
;
29 atk_no_op_object_get_type (void)
31 static GType type
= 0;
35 static const GTypeInfo tinfo
=
37 sizeof (AtkObjectClass
),
38 (GBaseInitFunc
) NULL
, /* base init */
39 (GBaseFinalizeFunc
) NULL
, /* base finalize */
40 (GClassInitFunc
) atk_no_op_object_class_init
, /* class init */
41 (GClassFinalizeFunc
) NULL
, /* class finalize */
42 NULL
, /* class data */
43 sizeof (AtkNoOpObject
), /* instance size */
45 (GInstanceInitFunc
) NULL
, /* instance init */
46 NULL
/* value table */
49 static const GInterfaceInfo atk_component_info
=
51 (GInterfaceInitFunc
) NULL
,
52 (GInterfaceFinalizeFunc
) NULL
,
56 static const GInterfaceInfo atk_action_info
=
58 (GInterfaceInitFunc
) NULL
,
59 (GInterfaceFinalizeFunc
) NULL
,
63 static const GInterfaceInfo atk_editable_text_info
=
65 (GInterfaceInitFunc
) NULL
,
66 (GInterfaceFinalizeFunc
) NULL
,
70 static const GInterfaceInfo atk_image_info
=
72 (GInterfaceInitFunc
) NULL
,
73 (GInterfaceFinalizeFunc
) NULL
,
77 static const GInterfaceInfo atk_selection_info
=
79 (GInterfaceInitFunc
) NULL
,
80 (GInterfaceFinalizeFunc
) NULL
,
84 static const GInterfaceInfo atk_table_info
=
86 (GInterfaceInitFunc
) NULL
,
87 (GInterfaceFinalizeFunc
) NULL
,
91 static const GInterfaceInfo atk_text_info
=
93 (GInterfaceInitFunc
) NULL
,
94 (GInterfaceFinalizeFunc
) NULL
,
98 static const GInterfaceInfo atk_value_info
=
100 (GInterfaceInitFunc
) NULL
,
101 (GInterfaceFinalizeFunc
) NULL
,
106 type
= g_type_register_static (ATK_TYPE_OBJECT
,
107 "AtkNoOpObject", &tinfo
, 0);
108 g_type_add_interface_static (type
, ATK_TYPE_COMPONENT
,
109 &atk_component_info
);
110 g_type_add_interface_static (type
, ATK_TYPE_ACTION
,
112 g_type_add_interface_static (type
, ATK_TYPE_EDITABLE_TEXT
,
113 &atk_editable_text_info
);
114 g_type_add_interface_static (type
, ATK_TYPE_IMAGE
,
116 g_type_add_interface_static (type
, ATK_TYPE_SELECTION
,
117 &atk_selection_info
);
118 g_type_add_interface_static (type
, ATK_TYPE_TABLE
,
120 g_type_add_interface_static (type
, ATK_TYPE_TEXT
,
122 g_type_add_interface_static (type
, ATK_TYPE_VALUE
,
129 atk_no_op_object_class_init (AtkNoOpObjectClass
*klass
)
131 parent_class
= g_type_class_peek_parent (klass
);
135 * atk_no_op_object_new:
138 * Provides a default (non-functioning stub) #AtkObject.
139 * Application maintainers should not use this method.
141 * Returns: a default (non-functioning stub) #AtkObject
144 atk_no_op_object_new (GObject
*obj
)
146 AtkObject
*accessible
;
148 g_return_val_if_fail (obj
!= NULL
, NULL
);
150 accessible
= g_object_new (ATK_TYPE_NO_OP_OBJECT
, NULL
);
151 g_return_val_if_fail (accessible
!= NULL
, NULL
);
153 accessible
->role
= ATK_ROLE_INVALID
;
154 accessible
->layer
= ATK_LAYER_INVALID
;