~ubuntu-branches/ubuntu/precise/atkmm1.6/precise

« back to all changes in this revision

Viewing changes to atk/atkmm/noopobject.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
Tags: upstream-2.22.1
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/noopobject.h>
 
5
#include <atkmm/private/noopobject_p.h>
 
6
 
 
7
// -*- c++ -*-
 
8
/* $Id: noopobject.ccg,v 1.1 2003/01/21 13:37:06 murrayc Exp $ */
 
9
 
 
10
/* Copyright 1998-2002 The gtkmm Development Team
 
11
 *
 
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.
 
16
 *
 
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.
 
21
 *
 
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.
 
25
 */
 
26
 
 
27
#include <atk/atknoopobject.h>
 
28
 
 
29
 
 
30
namespace
 
31
{
 
32
} // anonymous namespace
 
33
 
 
34
 
 
35
namespace Glib
 
36
{
 
37
 
 
38
Glib::RefPtr<Atk::NoOpObject> wrap(AtkNoOpObject* object, bool take_copy)
 
39
{
 
40
  return Glib::RefPtr<Atk::NoOpObject>( dynamic_cast<Atk::NoOpObject*> (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& NoOpObject_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_ = &NoOpObject_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_no_op_object_get_type());
 
66
 
 
67
    // Add derived versions of interfaces, if the C type implements any interfaces:
 
68
  Component::add_interface(get_type());
 
69
  Action::add_interface(get_type());
 
70
  EditableText::add_interface(get_type());
 
71
  Image::add_interface(get_type());
 
72
  Selection::add_interface(get_type());
 
73
  Table::add_interface(get_type());
 
74
  Text::add_interface(get_type());
 
75
  Hypertext::add_interface(get_type());
 
76
  Value::add_interface(get_type());
 
77
 
 
78
  }
 
79
 
 
80
  return *this;
 
81
}
 
82
 
 
83
 
 
84
void NoOpObject_Class::class_init_function(void* g_class, void* class_data)
 
85
{
 
86
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
 
87
  CppClassParent::class_init_function(klass, class_data);
 
88
 
 
89
 
 
90
}
 
91
 
 
92
 
 
93
Glib::ObjectBase* NoOpObject_Class::wrap_new(GObject* object)
 
94
{
 
95
  return new NoOpObject((AtkNoOpObject*)object);
 
96
}
 
97
 
 
98
 
 
99
/* The implementation: */
 
100
 
 
101
AtkNoOpObject* NoOpObject::gobj_copy()
 
102
{
 
103
  reference();
 
104
  return gobj();
 
105
}
 
106
 
 
107
NoOpObject::NoOpObject(const Glib::ConstructParams& construct_params)
 
108
:
 
109
  Atk::Object(construct_params)
 
110
{
 
111
 
 
112
}
 
113
 
 
114
NoOpObject::NoOpObject(AtkNoOpObject* castitem)
 
115
:
 
116
  Atk::Object((AtkObject*)(castitem))
 
117
{}
 
118
 
 
119
 
 
120
NoOpObject::~NoOpObject()
 
121
{}
 
122
 
 
123
 
 
124
NoOpObject::CppClassType NoOpObject::noopobject_class_; // initialize static member
 
125
 
 
126
GType NoOpObject::get_type()
 
127
{
 
128
  return noopobject_class_.init().get_type();
 
129
}
 
130
 
 
131
 
 
132
GType NoOpObject::get_base_type()
 
133
{
 
134
  return atk_no_op_object_get_type();
 
135
}
 
136
 
 
137
 
 
138
} // namespace Atk
 
139
 
 
140