1
// Generated by gtkmmproc -- DO NOT MODIFY!
4
#include <atkmm/relationset.h>
5
#include <atkmm/private/relationset_p.h>
8
/* $Id: relationset.ccg,v 1.1 2003/01/21 13:37:06 murrayc Exp $ */
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 Lesser General Public
14
* License as published by the Free Software Foundation; either
15
* version 2.1 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
* Lesser General Public License for more details.
22
* You should have received a copy of the GNU Lesser 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:
76
void RelationSet_Class::class_init_function(void* g_class, void* class_data)
78
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
79
CppClassParent::class_init_function(klass, class_data);
85
Glib::ObjectBase* RelationSet_Class::wrap_new(GObject* object)
87
return new RelationSet((AtkRelationSet*)object);
91
/* The implementation: */
93
AtkRelationSet* RelationSet::gobj_copy()
99
RelationSet::RelationSet(const Glib::ConstructParams& construct_params)
101
Glib::Object(construct_params)
106
RelationSet::RelationSet(AtkRelationSet* castitem)
108
Glib::Object((GObject*)(castitem))
112
RelationSet::~RelationSet()
116
RelationSet::CppClassType RelationSet::relationset_class_; // initialize static member
118
GType RelationSet::get_type()
120
return relationset_class_.init().get_type();
124
GType RelationSet::get_base_type()
126
return atk_relation_set_get_type();
130
RelationSet::RelationSet()
132
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
134
Glib::Object(Glib::ConstructParams(relationset_class_.init()))
140
Glib::RefPtr<RelationSet> RelationSet::create()
142
return Glib::RefPtr<RelationSet>( new RelationSet() );
144
bool RelationSet::set_contains(RelationType relationship)
146
return atk_relation_set_contains(gobj(), ((AtkRelationType)(relationship)));
149
void RelationSet::set_remove(const Glib::RefPtr<Relation>& relation)
151
atk_relation_set_remove(gobj(), Glib::unwrap(relation));
154
void RelationSet::set_add(const Glib::RefPtr<Relation>& relation)
156
atk_relation_set_add(gobj(), Glib::unwrap(relation));
159
int RelationSet::get_n_relations() const
161
return atk_relation_set_get_n_relations(const_cast<AtkRelationSet*>(gobj()));
164
Glib::RefPtr<Relation> RelationSet::get_relation(gint i)
167
Glib::RefPtr<Relation> retvalue = Glib::wrap(atk_relation_set_get_relation(gobj(), i));
169
retvalue->reference(); //The function does not do a ref for us.
174
Glib::RefPtr<Relation> RelationSet::get_relation(RelationType relationship)
177
Glib::RefPtr<Relation> retvalue = Glib::wrap(atk_relation_set_get_relation_by_type(gobj(), ((AtkRelationType)(relationship))));
179
retvalue->reference(); //The function does not do a ref for us.
184
void RelationSet::add_relation_by_type(RelationType relationship, const Glib::RefPtr<Atk::Object>& target)
186
atk_relation_set_add_relation_by_type(gobj(), ((AtkRelationType)(relationship)), Glib::unwrap(target));