Guitarix
midknob.cc
Go to the documentation of this file.
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <gxwmm/midknob.h>
7 #include <gxwmm/private/midknob_p.h>
8 
9 
10 /*
11  * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26  */
27 
28 #include <gxw/GxMidKnob.h>
29 
30 Gxw::MidKnob::MidKnob(Gtk::Adjustment& adjustment):
31  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
32  Glib::ObjectBase(0),
33  Gxw::Knob(Glib::ConstructParams(midknob_class_.init(), "adjustment",adjustment.gobj(), static_cast<char*>(0)))
34 {}
35 
36 namespace
37 {
38 } // anonymous namespace
39 
40 
41 namespace Glib
42 {
43 
44 Gxw::MidKnob* wrap(GxMidKnob* object, bool take_copy)
45 {
46  return dynamic_cast<Gxw::MidKnob *> (Glib::wrap_auto ((GObject*)(object), take_copy));
47 }
48 
49 } /* namespace Glib */
50 
51 namespace Gxw
52 {
53 
54 
55 /* The *_Class implementation: */
56 
57 const Glib::Class& MidKnob_Class::init()
58 {
59  if(!gtype_) // create the GType if necessary
60  {
61  // Glib::Class has to know the class init function to clone custom types.
62  class_init_func_ = &MidKnob_Class::class_init_function;
63 
64  // This is actually just optimized away, apparently with no harm.
65  // Make sure that the parent type has been created.
66  //CppClassParent::CppObjectType::get_type();
67 
68  // Create the wrapper type, with the same class/instance size as the base type.
69  register_derived_type(gx_mid_knob_get_type());
70 
71  // Add derived versions of interfaces, if the C type implements any interfaces:
72 
73  }
74 
75  return *this;
76 }
77 
78 
79 void MidKnob_Class::class_init_function(void* g_class, void* class_data)
80 {
81  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
82  CppClassParent::class_init_function(klass, class_data);
83 
84 
85 }
86 
87 
88 Glib::ObjectBase* MidKnob_Class::wrap_new(GObject* o)
89 {
90  return manage(new MidKnob((GxMidKnob*)(o)));
91 
92 }
93 
94 
95 /* The implementation: */
96 
97 MidKnob::MidKnob(const Glib::ConstructParams& construct_params)
98 :
99  Gxw::Knob(construct_params)
100 {
101  }
102 
104 :
105  Gxw::Knob((GxKnob*)(castitem))
106 {
107  }
108 
110 {
111  destroy_();
112 }
113 
114 MidKnob::CppClassType MidKnob::midknob_class_; // initialize static member
115 
117 {
118  return midknob_class_.init().get_type();
119 }
120 
121 
123 {
124  return gx_mid_knob_get_type();
125 }
126 
127 
129 :
130  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
131  Glib::ObjectBase(0),
132  Gxw::Knob(Glib::ConstructParams(midknob_class_.init()))
133 {
134 
135 
136 }
137 
138 
139 } // namespace Gxw
static GType get_base_type() G_GNUC_CONST
Definition: midknob.cc:122
struct _GxKnob GxKnob
Definition: knob.h:32
void init(int samplingFreq)
Gxw::MidKnob * wrap(GxMidKnob *object, bool take_copy=false)
A Glib::wrap() method for this object.
Definition: midknob.cc:44
GxMidKnobClass BaseClassType
Definition: midknob.h:49
static Glib::ObjectBase * wrap_new(GObject *)
Definition: midknob.cc:88
Definition: knob.h:42
Definition: bigknob.cc:51
struct _GxMidKnob GxMidKnob
Definition: midknob.h:33
virtual ~MidKnob()
Definition: midknob.cc:109
Definition: bigknob.cc:41
static GType get_type() G_GNUC_CONST
Definition: midknob.cc:116
GType gx_mid_knob_get_type(void)