1 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
2 
3 //Allow us to set the struct fields.
4 //TODO: Remove these functions anyway in an ABI break.
5 #undef GSEAL_ENABLE
6 
7 
8 #include <glibmm.h>
9 
10 #include <gtkmm/handlebox.h>
11 #include <gtkmm/private/handlebox_p.h>
12 
13 
14 // -*- c++ -*-
15 /* $Id: handlebox.ccg,v 1.1 2003/01/21 13:40:26 murrayc Exp $ */
16 
17 /*
18  *
19  * Copyright 1998-2002 The gtkmm Development Team
20  *
21  * This library is free software; you can redistribute it and/or
22  * modify it under the terms of the GNU Lesser General Public
23  * License as published by the Free Software Foundation; either
24  * version 2.1 of the License, or (at your option) any later version.
25  *
26  * This library is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29  * Lesser General Public License for more details.
30  *
31  * You should have received a copy of the GNU Lesser General Public
32  * License along with this library; if not, write to the Free
33  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34  */
35 
36 #include <gtk/gtk.h>
37 #include <gdkmm/window.h>
38 
39 namespace Gtk
40 {
41 
42 #ifndef GTKMM_DISABLE_DEPRECATED
43 
is_float_window_mapped() const44 bool HandleBox::is_float_window_mapped() const
45 {
46   return gobj()->float_window_mapped;
47 }
48 
is_in_drag() const49 bool HandleBox::is_in_drag() const
50 {
51   return gobj()->in_drag;
52 }
53 
shrinks_on_detach() const54 bool HandleBox::shrinks_on_detach() const
55 {
56   return gobj()->shrink_on_detach;
57 }
58 #endif // GTKMM_DISABLE_DEPRECATED
59 
60 
61 } /* namespace Gtk */
62 
63 namespace
64 {
65 
66 
HandleBox_signal_child_attached_callback(GtkHandleBox * self,GtkWidget * p0,void * data)67 static void HandleBox_signal_child_attached_callback(GtkHandleBox* self, GtkWidget* p0,void* data)
68 {
69   using namespace Gtk;
70   typedef sigc::slot< void,Widget* > SlotType;
71 
72   HandleBox* obj = dynamic_cast<HandleBox*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
73   // Do not try to call a signal on a disassociated wrapper.
74   if(obj)
75   {
76     try
77     {
78       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
79         (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
80 );
81     }
82     catch(...)
83     {
84        Glib::exception_handlers_invoke();
85     }
86   }
87 }
88 
89 static const Glib::SignalProxyInfo HandleBox_signal_child_attached_info =
90 {
91   "child_attached",
92   (GCallback) &HandleBox_signal_child_attached_callback,
93   (GCallback) &HandleBox_signal_child_attached_callback
94 };
95 
96 
HandleBox_signal_child_detached_callback(GtkHandleBox * self,GtkWidget * p0,void * data)97 static void HandleBox_signal_child_detached_callback(GtkHandleBox* self, GtkWidget* p0,void* data)
98 {
99   using namespace Gtk;
100   typedef sigc::slot< void,Widget* > SlotType;
101 
102   HandleBox* obj = dynamic_cast<HandleBox*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
103   // Do not try to call a signal on a disassociated wrapper.
104   if(obj)
105   {
106     try
107     {
108       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
109         (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
110 );
111     }
112     catch(...)
113     {
114        Glib::exception_handlers_invoke();
115     }
116   }
117 }
118 
119 static const Glib::SignalProxyInfo HandleBox_signal_child_detached_info =
120 {
121   "child_detached",
122   (GCallback) &HandleBox_signal_child_detached_callback,
123   (GCallback) &HandleBox_signal_child_detached_callback
124 };
125 
126 
127 } // anonymous namespace
128 
129 
130 namespace Glib
131 {
132 
wrap(GtkHandleBox * object,bool take_copy)133 Gtk::HandleBox* wrap(GtkHandleBox* object, bool take_copy)
134 {
135   return dynamic_cast<Gtk::HandleBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
136 }
137 
138 } /* namespace Glib */
139 
140 namespace Gtk
141 {
142 
143 
144 /* The *_Class implementation: */
145 
init()146 const Glib::Class& HandleBox_Class::init()
147 {
148   if(!gtype_) // create the GType if necessary
149   {
150     // Glib::Class has to know the class init function to clone custom types.
151     class_init_func_ = &HandleBox_Class::class_init_function;
152 
153     // This is actually just optimized away, apparently with no harm.
154     // Make sure that the parent type has been created.
155     //CppClassParent::CppObjectType::get_type();
156 
157     // Create the wrapper type, with the same class/instance size as the base type.
158     register_derived_type(gtk_handle_box_get_type());
159 
160     // Add derived versions of interfaces, if the C type implements any interfaces:
161 
162   }
163 
164   return *this;
165 }
166 
167 
class_init_function(void * g_class,void * class_data)168 void HandleBox_Class::class_init_function(void* g_class, void* class_data)
169 {
170   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
171   CppClassParent::class_init_function(klass, class_data);
172 
173 
174   klass->child_attached = &child_attached_callback;
175   klass->child_detached = &child_detached_callback;
176 }
177 
178 
child_attached_callback(GtkHandleBox * self,GtkWidget * p0)179 void HandleBox_Class::child_attached_callback(GtkHandleBox* self, GtkWidget* p0)
180 {
181   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
182       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
183 
184   // Non-gtkmmproc-generated custom classes implicitly call the default
185   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
186   // generated classes can use this optimisation, which avoids the unnecessary
187   // parameter conversions if there is no possibility of the virtual function
188   // being overridden:
189   if(obj_base && obj_base->is_derived_())
190   {
191     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
192     if(obj) // This can be NULL during destruction.
193     {
194       try // Trap C++ exceptions which would normally be lost because this is a C callback.
195       {
196         // Call the virtual member method, which derived classes might override.
197         obj->on_child_attached(Glib::wrap(p0)
198 );
199         return;
200       }
201       catch(...)
202       {
203         Glib::exception_handlers_invoke();
204       }
205     }
206   }
207 
208   BaseClassType *const base = static_cast<BaseClassType*>(
209         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
210     );
211 
212   // Call the original underlying C function:
213   if(base && base->child_attached)
214     (*base->child_attached)(self, p0);
215 }
child_detached_callback(GtkHandleBox * self,GtkWidget * p0)216 void HandleBox_Class::child_detached_callback(GtkHandleBox* self, GtkWidget* p0)
217 {
218   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
219       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
220 
221   // Non-gtkmmproc-generated custom classes implicitly call the default
222   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
223   // generated classes can use this optimisation, which avoids the unnecessary
224   // parameter conversions if there is no possibility of the virtual function
225   // being overridden:
226   if(obj_base && obj_base->is_derived_())
227   {
228     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
229     if(obj) // This can be NULL during destruction.
230     {
231       try // Trap C++ exceptions which would normally be lost because this is a C callback.
232       {
233         // Call the virtual member method, which derived classes might override.
234         obj->on_child_detached(Glib::wrap(p0)
235 );
236         return;
237       }
238       catch(...)
239       {
240         Glib::exception_handlers_invoke();
241       }
242     }
243   }
244 
245   BaseClassType *const base = static_cast<BaseClassType*>(
246         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
247     );
248 
249   // Call the original underlying C function:
250   if(base && base->child_detached)
251     (*base->child_detached)(self, p0);
252 }
253 
254 
wrap_new(GObject * o)255 Glib::ObjectBase* HandleBox_Class::wrap_new(GObject* o)
256 {
257   return manage(new HandleBox((GtkHandleBox*)(o)));
258 
259 }
260 
261 
262 /* The implementation: */
263 
HandleBox(const Glib::ConstructParams & construct_params)264 HandleBox::HandleBox(const Glib::ConstructParams& construct_params)
265 :
266   Gtk::Bin(construct_params)
267 {
268   }
269 
HandleBox(GtkHandleBox * castitem)270 HandleBox::HandleBox(GtkHandleBox* castitem)
271 :
272   Gtk::Bin((GtkBin*)(castitem))
273 {
274   }
275 
~HandleBox()276 HandleBox::~HandleBox()
277 {
278   destroy_();
279 }
280 
281 HandleBox::CppClassType HandleBox::handlebox_class_; // initialize static member
282 
get_type()283 GType HandleBox::get_type()
284 {
285   return handlebox_class_.init().get_type();
286 }
287 
288 
get_base_type()289 GType HandleBox::get_base_type()
290 {
291   return gtk_handle_box_get_type();
292 }
293 
294 
HandleBox()295 HandleBox::HandleBox()
296 :
297   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
298   Glib::ObjectBase(0),
299   Gtk::Bin(Glib::ConstructParams(handlebox_class_.init()))
300 {
301 
302 
303 }
304 
set_shadow_type(ShadowType type)305 void HandleBox::set_shadow_type(ShadowType type)
306 {
307   gtk_handle_box_set_shadow_type(gobj(), ((GtkShadowType)(type)));
308 }
309 
get_shadow_type() const310 ShadowType HandleBox::get_shadow_type() const
311 {
312   return ((ShadowType)(gtk_handle_box_get_shadow_type(const_cast<GtkHandleBox*>(gobj()))));
313 }
314 
set_handle_position(PositionType position)315 void HandleBox::set_handle_position(PositionType position)
316 {
317   gtk_handle_box_set_handle_position(gobj(), ((GtkPositionType)(position)));
318 }
319 
get_handle_position() const320 PositionType HandleBox::get_handle_position() const
321 {
322   return ((PositionType)(gtk_handle_box_get_handle_position(const_cast<GtkHandleBox*>(gobj()))));
323 }
324 
set_snap_edge(PositionType edge)325 void HandleBox::set_snap_edge(PositionType edge)
326 {
327   gtk_handle_box_set_snap_edge(gobj(), ((GtkPositionType)(edge)));
328 }
329 
get_snap_edge() const330 PositionType HandleBox::get_snap_edge() const
331 {
332   return ((PositionType)(gtk_handle_box_get_snap_edge(const_cast<GtkHandleBox*>(gobj()))));
333 }
334 
is_child_detached() const335 bool HandleBox::is_child_detached() const
336 {
337   return gtk_handle_box_get_child_detached(const_cast<GtkHandleBox*>(gobj()));
338 }
339 
get_bin_window()340  Glib::RefPtr<Gdk::Window> HandleBox::get_bin_window()
341 {
342   Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->bin_window)));
343 
344   if(ref_ptr)
345     ref_ptr->reference();
346 
347   return ref_ptr;
348 }
349 
get_bin_window() const350 Glib::RefPtr<const Gdk::Window> HandleBox::get_bin_window() const
351 {
352   Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->bin_window)));
353 
354   if(ref_ptr)
355     ref_ptr->reference();
356 
357   return ref_ptr;
358 }
359 
get_float_window()360  Glib::RefPtr<Gdk::Window> HandleBox::get_float_window()
361 {
362   Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->float_window)));
363 
364   if(ref_ptr)
365     ref_ptr->reference();
366 
367   return ref_ptr;
368 }
369 
get_float_window() const370 Glib::RefPtr<const Gdk::Window> HandleBox::get_float_window() const
371 {
372   Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->float_window)));
373 
374   if(ref_ptr)
375     ref_ptr->reference();
376 
377   return ref_ptr;
378 }
379 
380 
signal_child_attached()381 Glib::SignalProxy1< void,Widget* > HandleBox::signal_child_attached()
382 {
383   return Glib::SignalProxy1< void,Widget* >(this, &HandleBox_signal_child_attached_info);
384 }
385 
386 
signal_child_detached()387 Glib::SignalProxy1< void,Widget* > HandleBox::signal_child_detached()
388 {
389   return Glib::SignalProxy1< void,Widget* >(this, &HandleBox_signal_child_detached_info);
390 }
391 
392 
property_shadow_type()393 Glib::PropertyProxy< ShadowType > HandleBox::property_shadow_type()
394 {
395   return Glib::PropertyProxy< ShadowType >(this, "shadow-type");
396 }
397 
property_shadow_type() const398 Glib::PropertyProxy_ReadOnly< ShadowType > HandleBox::property_shadow_type() const
399 {
400   return Glib::PropertyProxy_ReadOnly< ShadowType >(this, "shadow-type");
401 }
402 
property_handle_position()403 Glib::PropertyProxy< PositionType > HandleBox::property_handle_position()
404 {
405   return Glib::PropertyProxy< PositionType >(this, "handle-position");
406 }
407 
property_handle_position() const408 Glib::PropertyProxy_ReadOnly< PositionType > HandleBox::property_handle_position() const
409 {
410   return Glib::PropertyProxy_ReadOnly< PositionType >(this, "handle-position");
411 }
412 
property_snap_edge()413 Glib::PropertyProxy< PositionType > HandleBox::property_snap_edge()
414 {
415   return Glib::PropertyProxy< PositionType >(this, "snap-edge");
416 }
417 
property_snap_edge() const418 Glib::PropertyProxy_ReadOnly< PositionType > HandleBox::property_snap_edge() const
419 {
420   return Glib::PropertyProxy_ReadOnly< PositionType >(this, "snap-edge");
421 }
422 
property_snap_edge_set()423 Glib::PropertyProxy< bool > HandleBox::property_snap_edge_set()
424 {
425   return Glib::PropertyProxy< bool >(this, "snap-edge-set");
426 }
427 
property_snap_edge_set() const428 Glib::PropertyProxy_ReadOnly< bool > HandleBox::property_snap_edge_set() const
429 {
430   return Glib::PropertyProxy_ReadOnly< bool >(this, "snap-edge-set");
431 }
432 
property_child_detached() const433 Glib::PropertyProxy_ReadOnly< bool > HandleBox::property_child_detached() const
434 {
435   return Glib::PropertyProxy_ReadOnly< bool >(this, "child-detached");
436 }
437 
438 
on_child_attached(Widget * child)439 void Gtk::HandleBox::on_child_attached(Widget* child)
440 {
441   BaseClassType *const base = static_cast<BaseClassType*>(
442       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
443   );
444 
445   if(base && base->child_attached)
446     (*base->child_attached)(gobj(),(GtkWidget*)Glib::unwrap(child));
447 }
on_child_detached(Widget * child)448 void Gtk::HandleBox::on_child_detached(Widget* child)
449 {
450   BaseClassType *const base = static_cast<BaseClassType*>(
451       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
452   );
453 
454   if(base && base->child_detached)
455     (*base->child_detached)(gobj(),(GtkWidget*)Glib::unwrap(child));
456 }
457 
458 
459 } // namespace Gtk
460 
461 
462