rollback to 3428, before the mysterious removal of libs/* at 3431/3432
[ardour.git] / libs / libgnomecanvasmm / libgnomecanvasmm / pixbuf.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <libgnomecanvasmm/pixbuf.h>
4 #include <libgnomecanvasmm/private/pixbuf_p.h>
5
6 /* $Id$ */
7
8 /* pixbuf.cc
9  *
10  * Copyright (C) 2002 The libgnomecanvasmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 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  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library 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
28 namespace Gnome
29 {
30
31 namespace Canvas
32 {
33
34 Pixbuf::Pixbuf (Group& parent, 
35                 double x, double y, 
36                 const Glib::RefPtr<Gdk::Pixbuf>& image)
37   : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
38 {
39   item_construct (parent);
40   set ("x", x, 
41        "y", y, 
42        "pixbuf", image->gobj (),
43        "width", (double) gdk_pixbuf_get_width (image->gobj ()),
44        "height", (double) gdk_pixbuf_get_height (image->gobj ()),
45        NULL);
46 }
47
48
49 Pixbuf::Pixbuf (Group& parent)
50   : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
51 {
52   item_construct (parent);
53 }
54
55
56 }
57
58 }
59
60
61 namespace
62 {
63 } // anonymous namespace
64
65
66 namespace Glib
67 {
68
69 Gnome::Canvas::Pixbuf* wrap(GnomeCanvasPixbuf* object, bool take_copy)
70 {
71   return dynamic_cast<Gnome::Canvas::Pixbuf *> (Glib::wrap_auto ((GObject*)(object), take_copy));
72 }
73
74 } /* namespace Glib */
75
76 namespace Gnome
77 {
78
79 namespace Canvas
80 {
81
82
83 /* The *_Class implementation: */
84
85 const Glib::Class& Pixbuf_Class::init()
86 {
87   if(!gtype_) // create the GType if necessary
88   {
89     // Glib::Class has to know the class init function to clone custom types.
90     class_init_func_ = &Pixbuf_Class::class_init_function;
91
92     // This is actually just optimized away, apparently with no harm.
93     // Make sure that the parent type has been created.
94     //CppClassParent::CppObjectType::get_type();
95
96     // Create the wrapper type, with the same class/instance size as the base type.
97     register_derived_type(gnome_canvas_pixbuf_get_type());
98
99     // Add derived versions of interfaces, if the C type implements any interfaces:
100   }
101
102   return *this;
103 }
104
105 void Pixbuf_Class::class_init_function(void* g_class, void* class_data)
106 {
107   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
108   CppClassParent::class_init_function(klass, class_data);
109
110 }
111
112
113 Glib::ObjectBase* Pixbuf_Class::wrap_new(GObject* o)
114 {
115   return manage(new Pixbuf((GnomeCanvasPixbuf*)(o)));
116
117 }
118
119
120 /* The implementation: */
121
122 Pixbuf::Pixbuf(const Glib::ConstructParams& construct_params)
123 :
124   Item(construct_params)
125 {
126   }
127
128 Pixbuf::Pixbuf(GnomeCanvasPixbuf* castitem)
129 :
130   Item((GnomeCanvasItem*)(castitem))
131 {
132   }
133
134 Pixbuf::~Pixbuf()
135 {
136   destroy_();
137 }
138
139 Pixbuf::CppClassType Pixbuf::pixbuf_class_; // initialize static member
140
141 GType Pixbuf::get_type()
142 {
143   return pixbuf_class_.init().get_type();
144 }
145
146 GType Pixbuf::get_base_type()
147 {
148   return gnome_canvas_pixbuf_get_type();
149 }
150
151
152 Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf() 
153 {
154   return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
155 }
156
157 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf() const
158 {
159   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
160 }
161
162 Glib::PropertyProxy<double> Pixbuf::property_width() 
163 {
164   return Glib::PropertyProxy<double>(this, "width");
165 }
166
167 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_width() const
168 {
169   return Glib::PropertyProxy_ReadOnly<double>(this, "width");
170 }
171
172 Glib::PropertyProxy<bool> Pixbuf::property_width_set() 
173 {
174   return Glib::PropertyProxy<bool>(this, "width-set");
175 }
176
177 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_set() const
178 {
179   return Glib::PropertyProxy_ReadOnly<bool>(this, "width-set");
180 }
181
182 Glib::PropertyProxy<bool> Pixbuf::property_width_in_pixels() 
183 {
184   return Glib::PropertyProxy<bool>(this, "width-in-pixels");
185 }
186
187 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_in_pixels() const
188 {
189   return Glib::PropertyProxy_ReadOnly<bool>(this, "width-in-pixels");
190 }
191
192 Glib::PropertyProxy<double> Pixbuf::property_height() 
193 {
194   return Glib::PropertyProxy<double>(this, "height");
195 }
196
197 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_height() const
198 {
199   return Glib::PropertyProxy_ReadOnly<double>(this, "height");
200 }
201
202 Glib::PropertyProxy<bool> Pixbuf::property_height_set() 
203 {
204   return Glib::PropertyProxy<bool>(this, "height-set");
205 }
206
207 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_set() const
208 {
209   return Glib::PropertyProxy_ReadOnly<bool>(this, "height-set");
210 }
211
212 Glib::PropertyProxy<bool> Pixbuf::property_height_in_pixels() 
213 {
214   return Glib::PropertyProxy<bool>(this, "height-in-pixels");
215 }
216
217 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_in_pixels() const
218 {
219   return Glib::PropertyProxy_ReadOnly<bool>(this, "height-in-pixels");
220 }
221
222 Glib::PropertyProxy<double> Pixbuf::property_x() 
223 {
224   return Glib::PropertyProxy<double>(this, "x");
225 }
226
227 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_x() const
228 {
229   return Glib::PropertyProxy_ReadOnly<double>(this, "x");
230 }
231
232 Glib::PropertyProxy<bool> Pixbuf::property_x_in_pixels() 
233 {
234   return Glib::PropertyProxy<bool>(this, "x-in-pixels");
235 }
236
237 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_x_in_pixels() const
238 {
239   return Glib::PropertyProxy_ReadOnly<bool>(this, "x-in-pixels");
240 }
241
242 Glib::PropertyProxy<double> Pixbuf::property_y() 
243 {
244   return Glib::PropertyProxy<double>(this, "y");
245 }
246
247 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_y() const
248 {
249   return Glib::PropertyProxy_ReadOnly<double>(this, "y");
250 }
251
252 Glib::PropertyProxy<bool> Pixbuf::property_y_in_pixels() 
253 {
254   return Glib::PropertyProxy<bool>(this, "y-in-pixels");
255 }
256
257 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_y_in_pixels() const
258 {
259   return Glib::PropertyProxy_ReadOnly<bool>(this, "y-in-pixels");
260 }
261
262 Glib::PropertyProxy<Gtk::AnchorType> Pixbuf::property_anchor() 
263 {
264   return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
265 }
266
267 Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Pixbuf::property_anchor() const
268 {
269   return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
270 }
271
272
273 } // namespace Canvas
274
275 } // namespace Gnome
276
277