1 // Generated by gtkmmproc -- DO NOT MODIFY!
4 #include <atkmm/relationset.h>
5 #include <atkmm/private/relationset_p.h>
10 /* Copyright 1998-2002 The gtkmm Development Team
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <atk/atkobject.h>
28 #include <atk/atkrelationset.h>
33 } // anonymous namespace
39 Glib::RefPtr<Atk::RelationSet> wrap(AtkRelationSet* object, bool take_copy)
41 return Glib::RefPtr<Atk::RelationSet>( dynamic_cast<Atk::RelationSet*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
42 //We use dynamic_cast<> in case of multiple inheritance.
45 } /* namespace Glib */
52 /* The *_Class implementation: */
54 const Glib::Class& RelationSet_Class::init()
56 if(!gtype_) // create the GType if necessary
58 // Glib::Class has to know the class init function to clone custom types.
59 class_init_func_ = &RelationSet_Class::class_init_function;
61 // This is actually just optimized away, apparently with no harm.
62 // Make sure that the parent type has been created.
63 //CppClassParent::CppObjectType::get_type();
65 // Create the wrapper type, with the same class/instance size as the base type.
66 register_derived_type(atk_relation_set_get_type());
68 // Add derived versions of interfaces, if the C type implements any interfaces:
74 void RelationSet_Class::class_init_function(void* g_class, void* class_data)
76 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
77 CppClassParent::class_init_function(klass, class_data);
79 #ifdef GLIBMM_VFUNCS_ENABLED
80 #endif //GLIBMM_VFUNCS_ENABLED
82 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
83 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
86 #ifdef GLIBMM_VFUNCS_ENABLED
87 #endif //GLIBMM_VFUNCS_ENABLED
89 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
90 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
93 Glib::ObjectBase* RelationSet_Class::wrap_new(GObject* object)
95 return new RelationSet((AtkRelationSet*)object);
99 /* The implementation: */
101 AtkRelationSet* RelationSet::gobj_copy()
107 RelationSet::RelationSet(const Glib::ConstructParams& construct_params)
109 Glib::Object(construct_params)
112 RelationSet::RelationSet(AtkRelationSet* castitem)
114 Glib::Object((GObject*)(castitem))
117 RelationSet::~RelationSet()
121 RelationSet::CppClassType RelationSet::relationset_class_; // initialize static member
123 GType RelationSet::get_type()
125 return relationset_class_.init().get_type();
128 GType RelationSet::get_base_type()
130 return atk_relation_set_get_type();
134 RelationSet::RelationSet()
136 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
138 Glib::Object(Glib::ConstructParams(relationset_class_.init()))
142 Glib::RefPtr<RelationSet> RelationSet::create()
144 return Glib::RefPtr<RelationSet>( new RelationSet() );
146 bool RelationSet::set_contains(RelationType relationship)
148 return atk_relation_set_contains(gobj(), ((AtkRelationType)(relationship)));
151 void RelationSet::set_remove(const Glib::RefPtr<Relation>& relation)
153 atk_relation_set_remove(gobj(), Glib::unwrap(relation));
156 void RelationSet::set_add(const Glib::RefPtr<Relation>& relation)
158 atk_relation_set_add(gobj(), Glib::unwrap(relation));
161 int RelationSet::get_n_relations() const
163 return atk_relation_set_get_n_relations(const_cast<AtkRelationSet*>(gobj()));
166 Glib::RefPtr<Relation> RelationSet::get_relation(gint i)
169 Glib::RefPtr<Relation> retvalue = Glib::wrap(atk_relation_set_get_relation(gobj(), i));
171 retvalue->reference(); //The function does not do a ref for us.
176 Glib::RefPtr<Relation> RelationSet::get_relation(RelationType relationship)
179 Glib::RefPtr<Relation> retvalue = Glib::wrap(atk_relation_set_get_relation_by_type(gobj(), ((AtkRelationType)(relationship))));
181 retvalue->reference(); //The function does not do a ref for us.
186 void RelationSet::add_relation_by_type(RelationType relationship, const Glib::RefPtr<Atk::Object>& target)
188 atk_relation_set_add_relation_by_type(gobj(), ((AtkRelationType)(relationship)), Glib::unwrap(target));
192 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
193 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
195 #ifdef GLIBMM_VFUNCS_ENABLED
196 #endif //GLIBMM_VFUNCS_ENABLED