~ubuntu-branches/ubuntu/precise/gtkmm3.0/precise

« back to all changes in this revision

Viewing changes to gtk/gtkmm/volumebutton.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-06-17 00:12:44 UTC
  • Revision ID: james.westby@ubuntu.com-20110617001244-9hl5an15hiaaahi6
Tags: upstream-3.0.1
ImportĀ upstreamĀ versionĀ 3.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Generated by gtkmmproc -- DO NOT MODIFY!
 
2
 
 
3
 
 
4
#include <gtkmm/volumebutton.h>
 
5
#include <gtkmm/private/volumebutton_p.h>
 
6
 
 
7
// -*- c++ -*-
 
8
/* $Id: volumebutton.ccg,v 1.2 2003/10/18 15:35:31 murrayc Exp $ */
 
9
 
 
10
/*
 
11
 *
 
12
 * Copyright 2007 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 <gtk/gtk.h>
 
30
 
 
31
namespace Gtk
 
32
{
 
33
 
 
34
 
 
35
} // namespace Gtk
 
36
 
 
37
 
 
38
namespace
 
39
{
 
40
} // anonymous namespace
 
41
 
 
42
 
 
43
namespace Glib
 
44
{
 
45
 
 
46
Gtk::VolumeButton* wrap(GtkVolumeButton* object, bool take_copy)
 
47
{
 
48
  return dynamic_cast<Gtk::VolumeButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
 
49
}
 
50
 
 
51
} /* namespace Glib */
 
52
 
 
53
namespace Gtk
 
54
{
 
55
 
 
56
 
 
57
/* The *_Class implementation: */
 
58
 
 
59
const Glib::Class& VolumeButton_Class::init()
 
60
{
 
61
  if(!gtype_) // create the GType if necessary
 
62
  {
 
63
    // Glib::Class has to know the class init function to clone custom types.
 
64
    class_init_func_ = &VolumeButton_Class::class_init_function;
 
65
 
 
66
    // This is actually just optimized away, apparently with no harm.
 
67
    // Make sure that the parent type has been created.
 
68
    //CppClassParent::CppObjectType::get_type();
 
69
 
 
70
    // Create the wrapper type, with the same class/instance size as the base type.
 
71
    register_derived_type(gtk_volume_button_get_type());
 
72
 
 
73
    // Add derived versions of interfaces, if the C type implements any interfaces:
 
74
 
 
75
  }
 
76
 
 
77
  return *this;
 
78
}
 
79
 
 
80
 
 
81
void VolumeButton_Class::class_init_function(void* g_class, void* class_data)
 
82
{
 
83
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
 
84
  CppClassParent::class_init_function(klass, class_data);
 
85
 
 
86
 
 
87
}
 
88
 
 
89
 
 
90
Glib::ObjectBase* VolumeButton_Class::wrap_new(GObject* o)
 
91
{
 
92
  return manage(new VolumeButton((GtkVolumeButton*)(o)));
 
93
 
 
94
}
 
95
 
 
96
 
 
97
/* The implementation: */
 
98
 
 
99
VolumeButton::VolumeButton(const Glib::ConstructParams& construct_params)
 
100
:
 
101
  Gtk::ScaleButton(construct_params)
 
102
{
 
103
  }
 
104
 
 
105
VolumeButton::VolumeButton(GtkVolumeButton* castitem)
 
106
:
 
107
  Gtk::ScaleButton((GtkScaleButton*)(castitem))
 
108
{
 
109
  }
 
110
 
 
111
VolumeButton::~VolumeButton()
 
112
{
 
113
  destroy_();
 
114
}
 
115
 
 
116
VolumeButton::CppClassType VolumeButton::volumebutton_class_; // initialize static member
 
117
 
 
118
GType VolumeButton::get_type()
 
119
{
 
120
  return volumebutton_class_.init().get_type();
 
121
}
 
122
 
 
123
 
 
124
GType VolumeButton::get_base_type()
 
125
{
 
126
  return gtk_volume_button_get_type();
 
127
}
 
128
 
 
129
 
 
130
VolumeButton::VolumeButton()
 
131
:
 
132
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
 
133
  Glib::ObjectBase(0),
 
134
  Gtk::ScaleButton(Glib::ConstructParams(volumebutton_class_.init()))
 
135
{
 
136
  
 
137
 
 
138
}
 
139
 
 
140
 
 
141
} // namespace Gtk
 
142
 
 
143