~ubuntu-branches/ubuntu/saucy/atkmm1.6/saucy-proposed

« back to all changes in this revision

Viewing changes to atk/atkmm/objectaccessible.cc

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2010-11-02 20:35:53 UTC
  • Revision ID: james.westby@ubuntu.com-20101102203553-syno2w6yedmcdgk8
ImportĀ upstreamĀ versionĀ 2.22.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Generated by gtkmmproc -- DO NOT MODIFY!
 
2
 
 
3
 
 
4
#include <atkmm/objectaccessible.h>
 
5
#include <atkmm/private/objectaccessible_p.h>
 
6
 
 
7
// -*- c++ -*-
 
8
/* $Id: objectaccessible.ccg,v 1.1 2003/01/21 13:37:06 murrayc Exp $ */
 
9
 
 
10
/* 
 
11
 *
 
12
 * Copyright 1998-2002 The gtkmm Development Team
 
13
 *
 
14
 * This library is free software; you can redistribute it and/or
 
15
 * modify it under the terms of the GNU Lesser General Public
 
16
 * License as published by the Free Software Foundation; either
 
17
 * version 2.1 of the License, or (at your option) any later version.
 
18
 *
 
19
 * This library is distributed in the hope that it will be useful,
 
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
22
 * Lesser General Public License for more details.
 
23
 *
 
24
 * You should have received a copy of the GNU Lesser General Public
 
25
 * License along with this library; if not, write to the Free
 
26
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
27
 */
 
28
 
 
29
#include <atk/atkgobjectaccessible.h>
 
30
namespace
 
31
{
 
32
} // anonymous namespace
 
33
 
 
34
 
 
35
namespace Glib
 
36
{
 
37
 
 
38
Glib::RefPtr<Atk::ObjectAccessible> wrap(AtkGObjectAccessible* object, bool take_copy)
 
39
{
 
40
  return Glib::RefPtr<Atk::ObjectAccessible>( dynamic_cast<Atk::ObjectAccessible*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
 
41
  //We use dynamic_cast<> in case of multiple inheritance.
 
42
}
 
43
 
 
44
} /* namespace Glib */
 
45
 
 
46
 
 
47
namespace Atk
 
48
{
 
49
 
 
50
 
 
51
/* The *_Class implementation: */
 
52
 
 
53
const Glib::Class& ObjectAccessible_Class::init()
 
54
{
 
55
  if(!gtype_) // create the GType if necessary
 
56
  {
 
57
    // Glib::Class has to know the class init function to clone custom types.
 
58
    class_init_func_ = &ObjectAccessible_Class::class_init_function;
 
59
 
 
60
    // This is actually just optimized away, apparently with no harm.
 
61
    // Make sure that the parent type has been created.
 
62
    //CppClassParent::CppObjectType::get_type();
 
63
 
 
64
    // Create the wrapper type, with the same class/instance size as the base type.
 
65
    register_derived_type(atk_gobject_accessible_get_type());
 
66
 
 
67
    // Add derived versions of interfaces, if the C type implements any interfaces:
 
68
 
 
69
  }
 
70
 
 
71
  return *this;
 
72
}
 
73
 
 
74
 
 
75
void ObjectAccessible_Class::class_init_function(void* g_class, void* class_data)
 
76
{
 
77
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
 
78
  CppClassParent::class_init_function(klass, class_data);
 
79
 
 
80
 
 
81
}
 
82
 
 
83
 
 
84
Glib::ObjectBase* ObjectAccessible_Class::wrap_new(GObject* object)
 
85
{
 
86
  return new ObjectAccessible((AtkGObjectAccessible*)object);
 
87
}
 
88
 
 
89
 
 
90
/* The implementation: */
 
91
 
 
92
AtkGObjectAccessible* ObjectAccessible::gobj_copy()
 
93
{
 
94
  reference();
 
95
  return gobj();
 
96
}
 
97
 
 
98
ObjectAccessible::ObjectAccessible(const Glib::ConstructParams& construct_params)
 
99
:
 
100
  Atk::Object(construct_params)
 
101
{
 
102
 
 
103
}
 
104
 
 
105
ObjectAccessible::ObjectAccessible(AtkGObjectAccessible* castitem)
 
106
:
 
107
  Atk::Object((AtkObject*)(castitem))
 
108
{}
 
109
 
 
110
 
 
111
ObjectAccessible::~ObjectAccessible()
 
112
{}
 
113
 
 
114
 
 
115
ObjectAccessible::CppClassType ObjectAccessible::objectaccessible_class_; // initialize static member
 
116
 
 
117
GType ObjectAccessible::get_type()
 
118
{
 
119
  return objectaccessible_class_.init().get_type();
 
120
}
 
121
 
 
122
 
 
123
GType ObjectAccessible::get_base_type()
 
124
{
 
125
  return atk_gobject_accessible_get_type();
 
126
}
 
127
 
 
128
 
 
129
Glib::RefPtr<Glib::Object> ObjectAccessible::get_object()
 
130
{
 
131
 
 
132
  Glib::RefPtr<Glib::Object> retvalue = Glib::wrap(atk_gobject_accessible_get_object(gobj()));
 
133
  if(retvalue)
 
134
    retvalue->reference(); //The function does not do a ref for us.
 
135
  return retvalue;
 
136
 
 
137
}
 
138
 
 
139
Glib::RefPtr<const Glib::Object> ObjectAccessible::get_object() const
 
140
{
 
141
  return const_cast<ObjectAccessible*>(this)->get_object();
 
142
}
 
143
 
 
144
Glib::RefPtr<Atk::Object> ObjectAccessible::for_object(const Glib::RefPtr<Glib::Object>& obj)
 
145
{
 
146
 
 
147
  Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_gobject_accessible_for_object(Glib::unwrap(obj)));
 
148
 
 
149
  if(retvalue)
 
150
    retvalue->reference(); //The function does not do a ref for us.
 
151
  return retvalue;
 
152
}
 
153
 
 
154
 
 
155
Glib::RefPtr<const Atk::Object> ObjectAccessible::for_object(const Glib::RefPtr<const Glib::Object>& obj)
 
156
{
 
157
 
 
158
  Glib::RefPtr<const Atk::Object> retvalue = Glib::wrap(atk_gobject_accessible_for_object(const_cast<GObject*>(Glib::unwrap<Glib::Object>(obj))));
 
159
 
 
160
  if(retvalue)
 
161
    retvalue->reference(); //The function does not do a ref for us.
 
162
  return retvalue;
 
163
}
 
164
 
 
165
 
 
166
} // namespace Atk
 
167
 
 
168