Fix crash on startup if an LV2 plugin has a bad .ttl file.
[ardour.git] / libs / glibmm2 / gio / giomm / themedicon.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <giomm/themedicon.h>
5 #include <giomm/private/themedicon_p.h>
6
7 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
8
9 /* Copyright (C) 2007 The gtkmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25
26 #include <gio/gio.h>
27
28 namespace Gio
29 {
30
31 ThemedIcon::ThemedIcon(const std::string& iconname, bool use_default_callbacks)
32 :
33   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
34   Glib::ObjectBase(0),
35   Glib::Object(Glib::ConstructParams(themedicon_class_.init(), "name",iconname.c_str(),"use-default-fallbacks",gboolean(use_default_callbacks), static_cast<char*>(0)))
36 {}
37
38
39 } //namespace Gio
40
41 namespace
42 {
43 } // anonymous namespace
44
45
46 namespace Glib
47 {
48
49 Glib::RefPtr<Gio::ThemedIcon> wrap(GThemedIcon* object, bool take_copy)
50 {
51   return Glib::RefPtr<Gio::ThemedIcon>( dynamic_cast<Gio::ThemedIcon*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
52   //We use dynamic_cast<> in case of multiple inheritance.
53 }
54
55 } /* namespace Glib */
56
57
58 namespace Gio
59 {
60
61
62 /* The *_Class implementation: */
63
64 const Glib::Class& ThemedIcon_Class::init()
65 {
66   if(!gtype_) // create the GType if necessary
67   {
68     // Glib::Class has to know the class init function to clone custom types.
69     class_init_func_ = &ThemedIcon_Class::class_init_function;
70
71     // This is actually just optimized away, apparently with no harm.
72     // Make sure that the parent type has been created.
73     //CppClassParent::CppObjectType::get_type();
74
75     // Create the wrapper type, with the same class/instance size as the base type.
76     register_derived_type(g_themed_icon_get_type());
77
78     // Add derived versions of interfaces, if the C type implements any interfaces:
79   Icon::add_interface(get_type());
80
81   }
82
83   return *this;
84 }
85
86 void ThemedIcon_Class::class_init_function(void* g_class, void* class_data)
87 {
88   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
89   CppClassParent::class_init_function(klass, class_data);
90
91 #ifdef GLIBMM_VFUNCS_ENABLED
92 #endif //GLIBMM_VFUNCS_ENABLED
93
94 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
95 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
96 }
97
98 #ifdef GLIBMM_VFUNCS_ENABLED
99 #endif //GLIBMM_VFUNCS_ENABLED
100
101 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
102 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
103
104
105 Glib::ObjectBase* ThemedIcon_Class::wrap_new(GObject* object)
106 {
107   return new ThemedIcon((GThemedIcon*)object);
108 }
109
110
111 /* The implementation: */
112
113 GThemedIcon* ThemedIcon::gobj_copy()
114 {
115   reference();
116   return gobj();
117 }
118
119 ThemedIcon::ThemedIcon(const Glib::ConstructParams& construct_params)
120 :
121   Glib::Object(construct_params)
122 {
123
124 }
125
126 ThemedIcon::ThemedIcon(GThemedIcon* castitem)
127 :
128   Glib::Object((GObject*)(castitem))
129 {}
130
131
132 ThemedIcon::~ThemedIcon()
133 {}
134
135
136 ThemedIcon::CppClassType ThemedIcon::themedicon_class_; // initialize static member
137
138 GType ThemedIcon::get_type()
139 {
140   return themedicon_class_.init().get_type();
141 }
142
143 GType ThemedIcon::get_base_type()
144 {
145   return g_themed_icon_get_type();
146 }
147
148
149 Glib::RefPtr<ThemedIcon> ThemedIcon::create(const std::string& iconname, bool use_default_callbacks)
150 {
151   return Glib::RefPtr<ThemedIcon>( new ThemedIcon(iconname, use_default_callbacks) );
152 }
153 void ThemedIcon::prepend_name(const std::string& iconname)
154 {
155 g_themed_icon_prepend_name(gobj(), iconname.c_str()); 
156 }
157
158 void ThemedIcon::append_name(const std::string& iconname)
159 {
160 g_themed_icon_append_name(gobj(), iconname.c_str()); 
161 }
162
163
164 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
165 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
166
167 #ifdef GLIBMM_VFUNCS_ENABLED
168 #endif //GLIBMM_VFUNCS_ENABLED
169
170
171 } // namespace Gio
172
173