add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / window.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <gtkmm/window.h>
5 #include <gtkmm/private/window_p.h>
6
7 // -*- c++ -*-
8 /* $Id$ */
9
10 /* 
11  *
12  * Copyright 1998-2002 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 Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 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  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library 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 <gtkmm/accelgroup.h>
30 #include <gdkmm/cursor.h>
31 #include <gtk/gtkwindow.h>
32
33
34 namespace Gtk
35 {
36
37 Glib::RefPtr<AccelGroup> Window::get_accel_group()
38 {
39   //There doesn't seem to be any gtk_window_get_accel_group().
40   //I think that you're supposed to remember what you added yourself.
41   //And that's what we do here.
42
43   if(!accel_group_)
44   {
45     accel_group_ = AccelGroup::create();
46     add_accel_group(accel_group_);
47   }
48
49   return accel_group_;
50 }
51
52 bool Window::is_toplevel() const
53 {
54   return gobj()->type == GTK_WINDOW_TOPLEVEL;
55 }
56
57 bool Window::is_popup() const
58 {
59   return gobj()->type == GTK_WINDOW_POPUP;
60 }
61
62 void Window::raise()
63 {
64   get_window()->raise();
65 }
66
67 void Window::set_manage()
68 {
69   g_warning("gtkmm: Attempt to call Gtk::manage() on a Gtk::Window, but a Gtk::Window has no parent container to manage its lifetime.\n");
70 }
71
72 void Window::destroy_()
73 {
74   //Called from destructors.
75   //overridden so that the correct _destroy_c_instance() ends up being called by the destructor.
76
77   //GTKMM_LIFECYCLE
78
79   #ifdef GLIBMM_DEBUG_REFCOUNTING
80   g_warning("Gtk::Window::destroy_(): gobject_: %10X\n", gobject_);
81   if(gobject_)
82    g_warning("  gtypename: %s\n", G_OBJECT_TYPE_NAME(gobject_));
83   #endif
84
85   if ( !cpp_destruction_in_progress_ ) //see comment below.
86   {
87     //Prevent destroy_notify_() from running as a possible side-effect of gtk_object_destroy.
88     //We can't predict whether destroy_notify_() will really be run, so we'll disconnect the C++ instance here.
89     cpp_destruction_in_progress_ = true;
90
91     //destroy the C instance:
92     _destroy_c_instance();
93   }
94
95   //The C++ destructor will be reached later. This function was called by a destructor.
96 }
97
98 void Window::_destroy_c_instance()
99 {
100   //We override this,
101   //because though top-level windows can only be destroyed with gtk_widget_destroy, according to Owen Taylor. murrayc.
102   #ifdef GLIBMM_DEBUG_REFCOUNTING
103   g_warning("Gtk::Window::_destroy_c_instance() gobject_=%10X\n", gobject_);
104   #endif
105
106   cpp_destruction_in_progress_ = true;
107
108   // remove our hook.
109   GtkObject* object = (GtkObject*)gobj();
110   if (object)
111   {
112     disconnect_cpp_wrapper();
113     //If we are killing the C++ instance before the C instance, then this might lead to strange behaviour.
114     //If this is a problem, then you'll have to use a managed() object, which will die only upon GTK+'s request.
115
116     //We can't do anything with the gobject_ if it's already been disposed.
117     //This prevents us from unref-ing it again, or destroying it again after GTK+ has told us that it has been disposed.
118     if (!gobject_disposed_)
119     {
120       //Windows can not be unrefed. They are "self-owning".
121       gtk_object_destroy(object);
122     }
123
124     //Glib::Object::~Object() will not g_object_unref() it too. because gobject_ is now 0.
125   }
126 }
127
128 void Window_Class::dispose_vfunc_callback(GObject* self)
129 {
130   //Avoid disposal of Windows on delete_event (window close) signal.
131   
132   #ifdef GLIBMM_DEBUG_REFCOUNTING
133   g_warning("Window_Class::dispose_vfunc_callback(): gobject_: %p\n", (void*)self);
134   #endif
135
136   Widget *const obj = dynamic_cast<Widget*>(
137       Glib::ObjectBase::_get_current_wrapper(self));
138
139   // This function might be invoked recursively because we're triggering
140   // several signal emissions, particularly signal_hide().  Therefore we
141   // have to test for cpp_destruction_in_progress_ at this point.
142
143   if(obj && !obj->_cpp_destruction_is_in_progress()) //When it should really be destroyed, we zero gobj_.
144   {
145     GtkWidget* const pWidget = obj->gobj();
146     g_return_if_fail(pWidget == GTK_WIDGET(self));
147
148     // Abort dispose if the widget isn't managed, in order to prevent
149     // the nasty self-destroying behaviour of GTK+.  This applies to:
150     //
151     // - GtkWindow, if it received "delete_event"
152     // - GtkDialog, which destroys on "response" by default
153
154     #ifdef GLIBMM_DEBUG_REFCOUNTING
155     g_warning("Window_Class::dispose_vfunc_callback(): before gtk_widget_hide().");
156     #endif
157
158     // Now hide the widget.  The C++ object must _not_ be accessed anymore
159     // after this call, because a signal_hide() handler might delete it.
160     gtk_widget_hide(pWidget);
161
162     #ifdef GLIBMM_DEBUG_REFCOUNTING
163     g_warning("Window_Class::dispose_vfunc_callback(): after gtk_widget_hide().");
164     #endif
165
166     // GTKMM_LIFECYCLE
167     return; // Prevent calling of normal C dispose vfunc (see below)
168   }
169   else
170   {
171     #ifdef GLIBMM_DEBUG_REFCOUNTING
172     //g_warning("Window_Class::dispose_vfunc_callback(): unreferenced: before gtk_widget_hide().");
173     #endif
174
175     // Always hide widgets on gtk_object_destroy(), regardless of whether
176     // the widget is managed or not.  This is done for consistency so that
177     // connecting to signal_hide() is guaranteed to work.
178     //gtk_widget_hide(pWidget);
179
180     #ifdef GLIBMM_DEBUG_REFCOUNTING
181     //g_warning("Window_Class::dispose_vfunc_callback(): unreferenced:  after gtk_widget_hide().");
182     #endif
183   
184     GObjectClass *const base = static_cast<GObjectClass*>(
185         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)));
186
187     #ifdef GLIBMM_DEBUG_REFCOUNTING
188     g_warning("Window_Class::dispose_vfunc_callback(): before calling base->dispose.");
189     #endif
190
191     if(base->dispose)
192       (*base->dispose)(self);
193
194     #ifdef GLIBMM_DEBUG_REFCOUNTING
195     g_warning("Window_Class::dispose_vfunc_callback(): after calling base->dispose.");
196     #endif
197   }
198 }
199
200 void Window::unset_focus()
201 {
202   gtk_window_set_focus(gobj(), 0 /* See GTK+ docs */);
203 }
204
205 void Window::unset_default()
206 {
207   gtk_window_set_default(gobj(), 0 /* See GTK+ docs */);
208 }
209    
210 } // namespace Gtk
211
212
213 namespace
214 {
215
216
217 static void Window_signal_set_focus_callback(GtkWindow* self, GtkWidget* p0,void* data)
218 {
219   using namespace Gtk;
220   typedef sigc::slot< void,Widget* > SlotType;
221
222   // Do not try to call a signal on a disassociated wrapper.
223   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
224   {
225     #ifdef GLIBMM_EXCEPTIONS_ENABLED
226     try
227     {
228     #endif //GLIBMM_EXCEPTIONS_ENABLED
229       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
230         (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
231 );
232     #ifdef GLIBMM_EXCEPTIONS_ENABLED
233     }
234     catch(...)
235     {
236       Glib::exception_handlers_invoke();
237     }
238     #endif //GLIBMM_EXCEPTIONS_ENABLED
239   }
240 }
241
242 static const Glib::SignalProxyInfo Window_signal_set_focus_info =
243 {
244   "set_focus",
245   (GCallback) &Window_signal_set_focus_callback,
246   (GCallback) &Window_signal_set_focus_callback
247 };
248
249
250 static gboolean Window_signal_frame_event_callback(GtkWindow* self, GdkEvent* p0,void* data)
251 {
252   using namespace Gtk;
253   typedef sigc::slot< bool,GdkEvent* > SlotType;
254
255   // Do not try to call a signal on a disassociated wrapper.
256   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
257   {
258     #ifdef GLIBMM_EXCEPTIONS_ENABLED
259     try
260     {
261     #endif //GLIBMM_EXCEPTIONS_ENABLED
262       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
263         return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
264     #ifdef GLIBMM_EXCEPTIONS_ENABLED
265     }
266     catch(...)
267     {
268       Glib::exception_handlers_invoke();
269     }
270     #endif //GLIBMM_EXCEPTIONS_ENABLED
271   }
272
273   typedef gboolean RType;
274   return RType();
275 }
276
277 static gboolean Window_signal_frame_event_notify_callback(GtkWindow* self, GdkEvent* p0, void* data)
278 {
279   using namespace Gtk;
280   typedef sigc::slot< void,GdkEvent* > SlotType;
281
282   // Do not try to call a signal on a disassociated wrapper.
283   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
284   {
285     #ifdef GLIBMM_EXCEPTIONS_ENABLED
286     try
287     {
288     #endif //GLIBMM_EXCEPTIONS_ENABLED
289       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
290         (*static_cast<SlotType*>(slot))(p0);
291     #ifdef GLIBMM_EXCEPTIONS_ENABLED
292     }
293     catch(...)
294     {
295       Glib::exception_handlers_invoke();
296     }
297     #endif //GLIBMM_EXCEPTIONS_ENABLED
298   }
299
300   typedef gboolean RType;
301   return RType();
302 }
303
304 static const Glib::SignalProxyInfo Window_signal_frame_event_info =
305 {
306   "frame_event",
307   (GCallback) &Window_signal_frame_event_callback,
308   (GCallback) &Window_signal_frame_event_notify_callback
309 };
310
311
312 } // anonymous namespace
313
314
315 namespace Glib
316 {
317
318 Glib::RefPtr<Gtk::WindowGroup> wrap(GtkWindowGroup* object, bool take_copy)
319 {
320   return Glib::RefPtr<Gtk::WindowGroup>( dynamic_cast<Gtk::WindowGroup*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
321   //We use dynamic_cast<> in case of multiple inheritance.
322 }
323
324 } /* namespace Glib */
325
326
327 namespace Gtk
328 {
329
330
331 /* The *_Class implementation: */
332
333 const Glib::Class& WindowGroup_Class::init()
334 {
335   if(!gtype_) // create the GType if necessary
336   {
337     // Glib::Class has to know the class init function to clone custom types.
338     class_init_func_ = &WindowGroup_Class::class_init_function;
339
340     // This is actually just optimized away, apparently with no harm.
341     // Make sure that the parent type has been created.
342     //CppClassParent::CppObjectType::get_type();
343
344     // Create the wrapper type, with the same class/instance size as the base type.
345     register_derived_type(gtk_window_group_get_type());
346
347     // Add derived versions of interfaces, if the C type implements any interfaces:
348   }
349
350   return *this;
351 }
352
353 void WindowGroup_Class::class_init_function(void* g_class, void* class_data)
354 {
355   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
356   CppClassParent::class_init_function(klass, class_data);
357
358 #ifdef GLIBMM_VFUNCS_ENABLED
359 #endif //GLIBMM_VFUNCS_ENABLED
360
361 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
362 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
363 }
364
365 #ifdef GLIBMM_VFUNCS_ENABLED
366 #endif //GLIBMM_VFUNCS_ENABLED
367
368 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
369 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
370
371
372 Glib::ObjectBase* WindowGroup_Class::wrap_new(GObject* object)
373 {
374   return new WindowGroup((GtkWindowGroup*)object);
375 }
376
377
378 /* The implementation: */
379
380 GtkWindowGroup* WindowGroup::gobj_copy()
381 {
382   reference();
383   return gobj();
384 }
385
386 WindowGroup::WindowGroup(const Glib::ConstructParams& construct_params)
387 :
388   Glib::Object(construct_params)
389 {}
390
391 WindowGroup::WindowGroup(GtkWindowGroup* castitem)
392 :
393   Glib::Object((GObject*)(castitem))
394 {}
395
396 WindowGroup::~WindowGroup()
397 {}
398
399
400 WindowGroup::CppClassType WindowGroup::windowgroup_class_; // initialize static member
401
402 GType WindowGroup::get_type()
403 {
404   return windowgroup_class_.init().get_type();
405 }
406
407 GType WindowGroup::get_base_type()
408 {
409   return gtk_window_group_get_type();
410 }
411
412
413 WindowGroup::WindowGroup()
414 :
415   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
416   Glib::ObjectBase(0),
417   Glib::Object(Glib::ConstructParams(windowgroup_class_.init()))
418 {
419   }
420
421 Glib::RefPtr<WindowGroup> WindowGroup::create()
422 {
423   return Glib::RefPtr<WindowGroup>( new WindowGroup() );
424 }
425 void WindowGroup::add_window(Window& window)
426 {
427 gtk_window_group_add_window(gobj(), (window).gobj()); 
428 }
429
430 void WindowGroup::remove_window(Window& window)
431 {
432 gtk_window_group_remove_window(gobj(), (window).gobj()); 
433 }
434
435
436 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
437 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
438
439 #ifdef GLIBMM_VFUNCS_ENABLED
440 #endif //GLIBMM_VFUNCS_ENABLED
441
442
443 } // namespace Gtk
444
445
446 namespace Glib
447 {
448
449 Gtk::Window* wrap(GtkWindow* object, bool take_copy)
450 {
451   return dynamic_cast<Gtk::Window *> (Glib::wrap_auto ((GObject*)(object), take_copy));
452 }
453
454 } /* namespace Glib */
455
456 namespace Gtk
457 {
458
459
460 /* The *_Class implementation: */
461
462 const Glib::Class& Window_Class::init()
463 {
464   if(!gtype_) // create the GType if necessary
465   {
466     // Glib::Class has to know the class init function to clone custom types.
467     class_init_func_ = &Window_Class::class_init_function;
468
469     // This is actually just optimized away, apparently with no harm.
470     // Make sure that the parent type has been created.
471     //CppClassParent::CppObjectType::get_type();
472
473     // Create the wrapper type, with the same class/instance size as the base type.
474     register_derived_type(gtk_window_get_type());
475
476     // Add derived versions of interfaces, if the C type implements any interfaces:
477   }
478
479   return *this;
480 }
481
482 void Window_Class::class_init_function(void* g_class, void* class_data)
483 {
484   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
485   CppClassParent::class_init_function(klass, class_data);
486
487 #ifdef GLIBMM_VFUNCS_ENABLED
488 #endif //GLIBMM_VFUNCS_ENABLED //We always need dispose_vfunc_callback
489     reinterpret_cast<GObjectClass*>(klass)->dispose = &dispose_vfunc_callback;
490 #ifdef GLIBMM_VFUNCS_ENABLED
491   #endif //GLIBMM_VFUNCS_ENABLED
492
493 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
494   klass->set_focus = &set_focus_callback;
495   klass->frame_event = &frame_event_callback;
496 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
497 }
498
499 #ifdef GLIBMM_VFUNCS_ENABLED
500 #endif //GLIBMM_VFUNCS_ENABLED
501
502 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
503 void Window_Class::set_focus_callback(GtkWindow* self, GtkWidget* p0)
504 {
505   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
506       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
507
508   // Non-gtkmmproc-generated custom classes implicitly call the default
509   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
510   // generated classes can use this optimisation, which avoids the unnecessary
511   // parameter conversions if there is no possibility of the virtual function
512   // being overridden:
513   if(obj_base && obj_base->is_derived_())
514   {
515     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
516     if(obj) // This can be NULL during destruction.
517     {
518       #ifdef GLIBMM_EXCEPTIONS_ENABLED
519       try // Trap C++ exceptions which would normally be lost because this is a C callback.
520       {
521       #endif //GLIBMM_EXCEPTIONS_ENABLED
522         // Call the virtual member method, which derived classes might override.
523         obj->on_set_focus(Glib::wrap(p0)
524 );
525         return;
526       #ifdef GLIBMM_EXCEPTIONS_ENABLED
527       }
528       catch(...)
529       {
530         Glib::exception_handlers_invoke();
531       }
532       #endif //GLIBMM_EXCEPTIONS_ENABLED
533     }
534   }
535   
536   BaseClassType *const base = static_cast<BaseClassType*>(
537         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
538     );
539
540   // Call the original underlying C function:
541   if(base && base->set_focus)
542     (*base->set_focus)(self, p0);
543 }
544 gboolean Window_Class::frame_event_callback(GtkWindow* self, GdkEvent* p0)
545 {
546   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
547       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
548
549   // Non-gtkmmproc-generated custom classes implicitly call the default
550   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
551   // generated classes can use this optimisation, which avoids the unnecessary
552   // parameter conversions if there is no possibility of the virtual function
553   // being overridden:
554   if(obj_base && obj_base->is_derived_())
555   {
556     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
557     if(obj) // This can be NULL during destruction.
558     {
559       #ifdef GLIBMM_EXCEPTIONS_ENABLED
560       try // Trap C++ exceptions which would normally be lost because this is a C callback.
561       {
562       #endif //GLIBMM_EXCEPTIONS_ENABLED
563         // Call the virtual member method, which derived classes might override.
564         return static_cast<int>(obj->on_frame_event(p0));
565       #ifdef GLIBMM_EXCEPTIONS_ENABLED
566       }
567       catch(...)
568       {
569         Glib::exception_handlers_invoke();
570       }
571       #endif //GLIBMM_EXCEPTIONS_ENABLED
572     }
573   }
574   
575   BaseClassType *const base = static_cast<BaseClassType*>(
576         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
577     );
578
579   // Call the original underlying C function:
580   if(base && base->frame_event)
581     return (*base->frame_event)(self, p0);
582
583   typedef gboolean RType;
584   return RType();
585 }
586 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
587
588
589 Glib::ObjectBase* Window_Class::wrap_new(GObject* o)
590 {
591   return new Window((GtkWindow*)(o)); //top-level windows can not be manage()ed.
592
593 }
594
595
596 /* The implementation: */
597
598 Window::Window(const Glib::ConstructParams& construct_params)
599 :
600   Gtk::Bin(construct_params)
601 {
602   }
603
604 Window::Window(GtkWindow* castitem)
605 :
606   Gtk::Bin((GtkBin*)(castitem))
607 {
608   }
609
610 Window::~Window()
611 {
612   destroy_();
613 }
614
615 Window::CppClassType Window::window_class_; // initialize static member
616
617 GType Window::get_type()
618 {
619   return window_class_.init().get_type();
620 }
621
622 GType Window::get_base_type()
623 {
624   return gtk_window_get_type();
625 }
626
627 Window::Window(WindowType type)
628 :
629   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
630   Glib::ObjectBase(0),
631   Gtk::Bin(Glib::ConstructParams(window_class_.init(), "type", ((GtkWindowType)(type)), static_cast<char*>(0)))
632 {
633   }
634
635  WindowType Window::get_window_type() const
636 {
637   return static_cast<WindowType>(gobj()->type);
638 }
639  
640  Glib::RefPtr<Gdk::Window> Window::get_frame()
641 {
642   Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->frame)));
643
644   if(ref_ptr)
645     ref_ptr->reference();
646
647   return ref_ptr;
648 }
649
650 Glib::RefPtr<const Gdk::Window> Window::get_frame() const
651 {
652   Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->frame)));
653
654   if(ref_ptr)
655     ref_ptr->reference();
656
657   return ref_ptr;
658 }
659  
660 void Window::set_title(const Glib::ustring& title)
661 {
662 gtk_window_set_title(gobj(), title.c_str()); 
663 }
664
665 Glib::ustring Window::get_title() const
666 {
667   return Glib::convert_const_gchar_ptr_to_ustring(gtk_window_get_title(const_cast<GtkWindow*>(gobj())));
668 }
669
670 void Window::set_wmclass(const Glib::ustring& wmclass_name, const Glib::ustring& wmclass_class)
671 {
672 gtk_window_set_wmclass(gobj(), wmclass_name.c_str(), wmclass_class.c_str()); 
673 }
674
675 void Window::set_role(const Glib::ustring& role)
676 {
677 gtk_window_set_role(gobj(), role.c_str()); 
678 }
679
680 Glib::ustring Window::get_role() const
681 {
682   return Glib::convert_const_gchar_ptr_to_ustring(gtk_window_get_role(const_cast<GtkWindow*>(gobj())));
683 }
684
685 void Window::add_accel_group(const Glib::RefPtr<AccelGroup>& accel_group)
686 {
687 gtk_window_add_accel_group(gobj(), Glib::unwrap(accel_group)); 
688 }
689
690 void Window::remove_accel_group(const Glib::RefPtr<AccelGroup>& accel_group)
691 {
692 gtk_window_remove_accel_group(gobj(), Glib::unwrap(accel_group)); 
693 }
694
695 void Window::set_position(WindowPosition position)
696 {
697 gtk_window_set_position(gobj(), ((GtkWindowPosition)(position))); 
698 }
699
700 bool Window::activate_focus()
701 {
702   return gtk_window_activate_focus(gobj());
703 }
704
705 void Window::set_focus(Gtk::Widget& focus)
706 {
707 gtk_window_set_focus(gobj(), (focus).gobj()); 
708 }
709
710 Widget* Window::get_focus()
711 {
712   return Glib::wrap(gtk_window_get_focus(gobj()));
713 }
714
715 const Widget* Window::get_focus() const
716 {
717   return const_cast<Window*>(this)->get_focus();
718 }
719
720 void Window::set_default(Gtk::Widget& default_widget)
721 {
722 gtk_window_set_default(gobj(), (default_widget).gobj()); 
723 }
724
725 bool Window::activate_default()
726 {
727   return gtk_window_activate_default(gobj());
728 }
729
730 void Window::set_transient_for(Window& parent)
731 {
732 gtk_window_set_transient_for(gobj(), (parent).gobj()); 
733 }
734
735 Window* Window::get_transient_for()
736 {
737   return Glib::wrap(gtk_window_get_transient_for(gobj()));
738 }
739
740 const Window* Window::get_transient_for() const
741 {
742   return const_cast<Window*>(this)->get_transient_for();
743 }
744
745 void Window::set_opacity(double opacity)
746 {
747 gtk_window_set_opacity(gobj(), opacity); 
748 }
749
750 double Window::get_opacity() const
751 {
752   return gtk_window_get_opacity(const_cast<GtkWindow*>(gobj()));
753 }
754
755 void Window::set_type_hint(Gdk::WindowTypeHint hint)
756 {
757 gtk_window_set_type_hint(gobj(), ((GdkWindowTypeHint)(hint))); 
758 }
759
760 Gdk::WindowTypeHint Window::get_type_hint() const
761 {
762   return ((Gdk::WindowTypeHint)(gtk_window_get_type_hint(const_cast<GtkWindow*>(gobj()))));
763 }
764
765 void Window::set_skip_taskbar_hint(bool setting)
766 {
767 gtk_window_set_skip_taskbar_hint(gobj(), static_cast<int>(setting)); 
768 }
769
770 bool Window::get_skip_taskbar_hint() const
771 {
772   return gtk_window_get_skip_taskbar_hint(const_cast<GtkWindow*>(gobj()));
773 }
774
775 void Window::set_skip_pager_hint(bool setting)
776 {
777 gtk_window_set_skip_pager_hint(gobj(), static_cast<int>(setting)); 
778 }
779
780 bool Window::get_skip_pager_hint() const
781 {
782   return gtk_window_get_skip_pager_hint(const_cast<GtkWindow*>(gobj()));
783 }
784
785 void Window::set_urgency_hint(bool setting)
786 {
787 gtk_window_set_urgency_hint(gobj(), static_cast<int>(setting)); 
788 }
789
790 bool Window::get_urgency_hint() const
791 {
792   return gtk_window_get_urgency_hint(const_cast<GtkWindow*>(gobj()));
793 }
794
795 void Window::set_accept_focus(bool setting)
796 {
797 gtk_window_set_accept_focus(gobj(), static_cast<int>(setting)); 
798 }
799
800 bool Window::get_accept_focus() const
801 {
802   return gtk_window_get_accept_focus(const_cast<GtkWindow*>(gobj()));
803 }
804
805 void Window::set_focus_on_map(bool setting)
806 {
807 gtk_window_set_focus_on_map(gobj(), static_cast<int>(setting)); 
808 }
809
810 bool Window::get_focus_on_map() const
811 {
812   return gtk_window_get_focus_on_map(const_cast<GtkWindow*>(gobj()));
813 }
814
815 bool Window::get_destroy_with_parent() const
816 {
817   return gtk_window_get_destroy_with_parent(const_cast<GtkWindow*>(gobj()));
818 }
819
820 void Window::set_resizable(bool resizable)
821 {
822 gtk_window_set_resizable(gobj(), static_cast<int>(resizable)); 
823 }
824
825 bool Window::get_resizable() const
826 {
827   return gtk_window_get_resizable(const_cast<GtkWindow*>(gobj()));
828 }
829
830 void Window::set_gravity(Gdk::Gravity gravity)
831 {
832 gtk_window_set_gravity(gobj(), ((GdkGravity)(gravity))); 
833 }
834
835 Gdk::Gravity Window::get_gravity() const
836 {
837   return ((Gdk::Gravity)(gtk_window_get_gravity(const_cast<GtkWindow*>(gobj()))));
838 }
839
840 void Window::set_geometry_hints(Widget& geometry_widget, const Gdk::Geometry& geometry, Gdk::WindowHints geom_mask)
841 {
842 gtk_window_set_geometry_hints(gobj(), (geometry_widget).gobj(), const_cast<GdkGeometry*>(&(geometry)), ((GdkWindowHints)(geom_mask))); 
843 }
844
845 void Window::set_screen(const Glib::RefPtr<Gdk::Screen>& screen)
846 {
847 gtk_window_set_screen(gobj(), Glib::unwrap(screen)); 
848 }
849
850 Glib::RefPtr<Gdk::Screen> Window::get_screen()
851 {
852
853   Glib::RefPtr<Gdk::Screen> retvalue = Glib::wrap(gtk_window_get_screen(gobj()));
854   if(retvalue)
855     retvalue->reference(); //The function does not do a ref for us.
856   return retvalue;
857
858 }
859
860 Glib::RefPtr<const Gdk::Screen> Window::get_screen() const
861 {
862   return const_cast<Window*>(this)->get_screen();
863 }
864
865 void Window::set_has_frame(bool setting)
866 {
867 gtk_window_set_has_frame(gobj(), static_cast<int>(setting)); 
868 }
869
870 bool Window::get_has_frame() const
871 {
872   return gtk_window_get_has_frame(const_cast<GtkWindow*>(gobj()));
873 }
874
875 void Window::set_frame_dimensions(int left, int top, int right, int bottom)
876 {
877 gtk_window_set_frame_dimensions(gobj(), left, top, right, bottom); 
878 }
879
880 void Window::get_frame_dimensions(int& left, int& top, int& right, int& bottom) const
881 {
882 gtk_window_get_frame_dimensions(const_cast<GtkWindow*>(gobj()), &left, &top, &right, &bottom); 
883 }
884
885 void Window::set_decorated(bool setting)
886 {
887 gtk_window_set_decorated(gobj(), static_cast<int>(setting)); 
888 }
889
890 bool Window::get_decorated() const
891 {
892   return gtk_window_get_decorated(const_cast<GtkWindow*>(gobj()));
893 }
894
895 void Window::set_deletable(bool setting)
896 {
897 gtk_window_set_deletable(gobj(), static_cast<int>(setting)); 
898 }
899
900 bool Window::get_deletable() const
901 {
902   return gtk_window_get_deletable(const_cast<GtkWindow*>(gobj()));
903 }
904
905 Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > Window::get_icon_list()
906 {
907   return Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >(gtk_window_get_icon_list(gobj()), Glib::OWNERSHIP_SHALLOW);
908 }
909
910 Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> > Window::get_icon_list() const
911 {
912   return Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> >(gtk_window_get_icon_list(const_cast<GtkWindow*>(gobj())), Glib::OWNERSHIP_SHALLOW);
913 }
914
915 void Window::set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list)
916 {
917 gtk_window_set_icon_list(gobj(), list.data()); 
918 }
919
920 void Window::set_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon)
921 {
922 gtk_window_set_icon(gobj(), Glib::unwrap(icon)); 
923 }
924
925 #ifdef GLIBMM_EXCEPTIONS_ENABLED
926 bool Window::set_icon_from_file(const std::string& filename)
927 #else
928 bool Window::set_icon_from_file(const std::string& filename, std::auto_ptr<Glib::Error>& error)
929 #endif //GLIBMM_EXCEPTIONS_ENABLED
930 {
931   GError* gerror = 0;
932   bool retvalue = gtk_window_set_icon_from_file(gobj(), filename.c_str(), &(gerror));
933 #ifdef GLIBMM_EXCEPTIONS_ENABLED
934   if(gerror)
935     ::Glib::Error::throw_exception(gerror);
936 #else
937   if(gerror)
938     error = ::Glib::Error::throw_exception(gerror);
939 #endif //GLIBMM_EXCEPTIONS_ENABLED
940
941   return retvalue;
942
943 }
944
945 Glib::RefPtr<Gdk::Pixbuf> Window::get_icon()
946 {
947
948   Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_window_get_icon(gobj()));
949   if(retvalue)
950     retvalue->reference(); //The function does not do a ref for us.
951   return retvalue;
952
953 }
954
955 Glib::RefPtr<const Gdk::Pixbuf> Window::get_icon() const
956 {
957   return const_cast<Window*>(this)->get_icon();
958 }
959
960 void Window::set_default_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list)
961 {
962 gtk_window_set_default_icon_list(list.data());
963 }
964
965
966 Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > Window::get_default_icon_list()
967 {
968   return Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >(gtk_window_get_default_icon_list(), Glib::OWNERSHIP_SHALLOW);
969 }
970
971
972 void Window::set_default_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon)
973 {
974 gtk_window_set_default_icon(Glib::unwrap(icon));
975 }
976
977
978 void Window::set_default_icon_name(const Glib::ustring& name)
979 {
980 gtk_window_set_default_icon_name(name.c_str());
981 }
982
983
984 #ifdef GLIBMM_EXCEPTIONS_ENABLED
985 bool Window::set_default_icon_from_file(const std::string& filename)
986 #else
987 bool Window::set_default_icon_from_file(const std::string& filename, std::auto_ptr<Glib::Error>& error)
988 #endif //GLIBMM_EXCEPTIONS_ENABLED
989 {
990   GError* gerror = 0;
991   bool retvalue = gtk_window_set_default_icon_from_file(filename.c_str(), &(gerror));
992
993 #ifdef GLIBMM_EXCEPTIONS_ENABLED
994   if(gerror)
995     ::Glib::Error::throw_exception(gerror);
996 #else
997   if(gerror)
998     error = ::Glib::Error::throw_exception(gerror);
999 #endif //GLIBMM_EXCEPTIONS_ENABLED
1000
1001   return retvalue;
1002 }
1003
1004
1005 void Window::set_auto_startup_notification(bool setting)
1006 {
1007 gtk_window_set_auto_startup_notification(static_cast<int>(setting));
1008 }
1009
1010
1011 void Window::set_modal(bool modal)
1012 {
1013 gtk_window_set_modal(gobj(), static_cast<int>(modal)); 
1014 }
1015
1016 bool Window::get_modal() const
1017 {
1018   return gtk_window_get_modal(const_cast<GtkWindow*>(gobj()));
1019 }
1020
1021 Glib::ListHandle<Window*> Window::list_toplevels()
1022 {
1023   return Glib::ListHandle<Window*>(gtk_window_list_toplevels(), Glib::OWNERSHIP_SHALLOW);
1024 }
1025
1026
1027 void Window::add_mnemonic(guint keyval, Widget& target)
1028 {
1029 gtk_window_add_mnemonic(gobj(), keyval, (target).gobj()); 
1030 }
1031
1032 void Window::remove_mnemonic(guint keyval, Widget& target)
1033 {
1034 gtk_window_remove_mnemonic(gobj(), keyval, (target).gobj()); 
1035 }
1036
1037 bool Window::mnemonic_activate(guint keyval, Gdk::ModifierType modifier)
1038 {
1039   return gtk_window_mnemonic_activate(gobj(), keyval, ((GdkModifierType)(modifier)));
1040 }
1041
1042 void Window::set_mnemonic_modifier(Gdk::ModifierType modifier)
1043 {
1044 gtk_window_set_mnemonic_modifier(gobj(), ((GdkModifierType)(modifier))); 
1045 }
1046
1047 Gdk::ModifierType Window::get_mnemonic_modifier()
1048 {
1049   return ((Gdk::ModifierType)(gtk_window_get_mnemonic_modifier(gobj())));
1050 }
1051
1052 void Window::present()
1053 {
1054 gtk_window_present(gobj()); 
1055 }
1056
1057 void Window::present(guint32 timestamp)
1058 {
1059 gtk_window_present_with_time(gobj(), timestamp); 
1060 }
1061
1062 void Window::iconify()
1063 {
1064 gtk_window_iconify(gobj()); 
1065 }
1066
1067 void Window::deiconify()
1068 {
1069 gtk_window_deiconify(gobj()); 
1070 }
1071
1072 void Window::stick()
1073 {
1074 gtk_window_stick(gobj()); 
1075 }
1076
1077 void Window::unstick()
1078 {
1079 gtk_window_unstick(gobj()); 
1080 }
1081
1082 void Window::maximize()
1083 {
1084 gtk_window_maximize(gobj()); 
1085 }
1086
1087 void Window::unmaximize()
1088 {
1089 gtk_window_unmaximize(gobj()); 
1090 }
1091
1092 void Window::fullscreen()
1093 {
1094 gtk_window_fullscreen(gobj()); 
1095 }
1096
1097 void Window::unfullscreen()
1098 {
1099 gtk_window_unfullscreen(gobj()); 
1100 }
1101
1102 void Window::begin_resize_drag(Gdk::WindowEdge edge, int button, int root_x, int root_y, guint32 timestamp)
1103 {
1104 gtk_window_begin_resize_drag(gobj(), ((GdkWindowEdge)(edge)), button, root_x, root_y, timestamp); 
1105 }
1106
1107 void Window::begin_move_drag(int button, int root_x, int root_y, guint32 timestamp)
1108 {
1109 gtk_window_begin_move_drag(gobj(), button, root_x, root_y, timestamp); 
1110 }
1111
1112 void Window::set_default_size(int width, int height)
1113 {
1114 gtk_window_set_default_size(gobj(), width, height); 
1115 }
1116
1117 void Window::get_default_size(int& width, int& height) const
1118 {
1119 gtk_window_get_default_size(const_cast<GtkWindow*>(gobj()), &width, &height); 
1120 }
1121
1122 void Window::resize(int width, int height)
1123 {
1124 gtk_window_resize(gobj(), width, height); 
1125 }
1126
1127 void Window::get_size(int& width, int& height) const
1128 {
1129 gtk_window_get_size(const_cast<GtkWindow*>(gobj()), &width, &height); 
1130 }
1131
1132 void Window::move(int x, int y)
1133 {
1134 gtk_window_move(gobj(), x, y); 
1135 }
1136
1137 void Window::get_position(int& root_x, int& root_y) const
1138 {
1139 gtk_window_get_position(const_cast<GtkWindow*>(gobj()), &root_x, &root_y); 
1140 }
1141
1142 bool Window::parse_geometry(const Glib::ustring& geometry)
1143 {
1144   return gtk_window_parse_geometry(gobj(), geometry.c_str());
1145 }
1146
1147 Glib::RefPtr<WindowGroup> Window::get_group()
1148 {
1149
1150   Glib::RefPtr<WindowGroup> retvalue = Glib::wrap(gtk_window_get_group(gobj()));
1151   if(retvalue)
1152     retvalue->reference(); //The function does not do a ref for us.
1153   return retvalue;
1154
1155 }
1156
1157 Glib::RefPtr<const WindowGroup> Window::get_group() const
1158 {
1159   return const_cast<Window*>(this)->get_group();
1160 }
1161
1162 void Window::reshow_with_initial_size()
1163 {
1164 gtk_window_reshow_with_initial_size(gobj()); 
1165 }
1166
1167 void Window::set_keep_above(bool setting)
1168 {
1169 gtk_window_set_keep_above(gobj(), static_cast<int>(setting)); 
1170 }
1171
1172 void Window::set_keep_below(bool setting)
1173 {
1174 gtk_window_set_keep_below(gobj(), static_cast<int>(setting)); 
1175 }
1176
1177
1178 Glib::SignalProxy1< void,Widget* > Window::signal_set_focus()
1179 {
1180   return Glib::SignalProxy1< void,Widget* >(this, &Window_signal_set_focus_info);
1181 }
1182
1183
1184 Glib::SignalProxy1< bool,GdkEvent* > Window::signal_frame_event()
1185 {
1186   return Glib::SignalProxy1< bool,GdkEvent* >(this, &Window_signal_frame_event_info);
1187 }
1188
1189
1190 #ifdef GLIBMM_PROPERTIES_ENABLED
1191 Glib::PropertyProxy<Glib::ustring> Window::property_title() 
1192 {
1193   return Glib::PropertyProxy<Glib::ustring>(this, "title");
1194 }
1195 #endif //GLIBMM_PROPERTIES_ENABLED
1196
1197 #ifdef GLIBMM_PROPERTIES_ENABLED
1198 Glib::PropertyProxy_ReadOnly<Glib::ustring> Window::property_title() const
1199 {
1200   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "title");
1201 }
1202 #endif //GLIBMM_PROPERTIES_ENABLED
1203
1204 #ifdef GLIBMM_PROPERTIES_ENABLED
1205 Glib::PropertyProxy<bool> Window::property_allow_shrink() 
1206 {
1207   return Glib::PropertyProxy<bool>(this, "allow-shrink");
1208 }
1209 #endif //GLIBMM_PROPERTIES_ENABLED
1210
1211 #ifdef GLIBMM_PROPERTIES_ENABLED
1212 Glib::PropertyProxy_ReadOnly<bool> Window::property_allow_shrink() const
1213 {
1214   return Glib::PropertyProxy_ReadOnly<bool>(this, "allow-shrink");
1215 }
1216 #endif //GLIBMM_PROPERTIES_ENABLED
1217
1218 #ifdef GLIBMM_PROPERTIES_ENABLED
1219 Glib::PropertyProxy<bool> Window::property_allow_grow() 
1220 {
1221   return Glib::PropertyProxy<bool>(this, "allow-grow");
1222 }
1223 #endif //GLIBMM_PROPERTIES_ENABLED
1224
1225 #ifdef GLIBMM_PROPERTIES_ENABLED
1226 Glib::PropertyProxy_ReadOnly<bool> Window::property_allow_grow() const
1227 {
1228   return Glib::PropertyProxy_ReadOnly<bool>(this, "allow-grow");
1229 }
1230 #endif //GLIBMM_PROPERTIES_ENABLED
1231
1232 #ifdef GLIBMM_PROPERTIES_ENABLED
1233 Glib::PropertyProxy<bool> Window::property_resizable() 
1234 {
1235   return Glib::PropertyProxy<bool>(this, "resizable");
1236 }
1237 #endif //GLIBMM_PROPERTIES_ENABLED
1238
1239 #ifdef GLIBMM_PROPERTIES_ENABLED
1240 Glib::PropertyProxy_ReadOnly<bool> Window::property_resizable() const
1241 {
1242   return Glib::PropertyProxy_ReadOnly<bool>(this, "resizable");
1243 }
1244 #endif //GLIBMM_PROPERTIES_ENABLED
1245
1246 #ifdef GLIBMM_PROPERTIES_ENABLED
1247 Glib::PropertyProxy<bool> Window::property_modal() 
1248 {
1249   return Glib::PropertyProxy<bool>(this, "modal");
1250 }
1251 #endif //GLIBMM_PROPERTIES_ENABLED
1252
1253 #ifdef GLIBMM_PROPERTIES_ENABLED
1254 Glib::PropertyProxy_ReadOnly<bool> Window::property_modal() const
1255 {
1256   return Glib::PropertyProxy_ReadOnly<bool>(this, "modal");
1257 }
1258 #endif //GLIBMM_PROPERTIES_ENABLED
1259
1260 #ifdef GLIBMM_PROPERTIES_ENABLED
1261 Glib::PropertyProxy<WindowPosition> Window::property_window_position() 
1262 {
1263   return Glib::PropertyProxy<WindowPosition>(this, "window-position");
1264 }
1265 #endif //GLIBMM_PROPERTIES_ENABLED
1266
1267 #ifdef GLIBMM_PROPERTIES_ENABLED
1268 Glib::PropertyProxy_ReadOnly<WindowPosition> Window::property_window_position() const
1269 {
1270   return Glib::PropertyProxy_ReadOnly<WindowPosition>(this, "window-position");
1271 }
1272 #endif //GLIBMM_PROPERTIES_ENABLED
1273
1274 #ifdef GLIBMM_PROPERTIES_ENABLED
1275 Glib::PropertyProxy<int> Window::property_default_width() 
1276 {
1277   return Glib::PropertyProxy<int>(this, "default-width");
1278 }
1279 #endif //GLIBMM_PROPERTIES_ENABLED
1280
1281 #ifdef GLIBMM_PROPERTIES_ENABLED
1282 Glib::PropertyProxy_ReadOnly<int> Window::property_default_width() const
1283 {
1284   return Glib::PropertyProxy_ReadOnly<int>(this, "default-width");
1285 }
1286 #endif //GLIBMM_PROPERTIES_ENABLED
1287
1288 #ifdef GLIBMM_PROPERTIES_ENABLED
1289 Glib::PropertyProxy<int> Window::property_default_height() 
1290 {
1291   return Glib::PropertyProxy<int>(this, "default-height");
1292 }
1293 #endif //GLIBMM_PROPERTIES_ENABLED
1294
1295 #ifdef GLIBMM_PROPERTIES_ENABLED
1296 Glib::PropertyProxy_ReadOnly<int> Window::property_default_height() const
1297 {
1298   return Glib::PropertyProxy_ReadOnly<int>(this, "default-height");
1299 }
1300 #endif //GLIBMM_PROPERTIES_ENABLED
1301
1302 #ifdef GLIBMM_PROPERTIES_ENABLED
1303 Glib::PropertyProxy<bool> Window::property_destroy_with_parent() 
1304 {
1305   return Glib::PropertyProxy<bool>(this, "destroy-with-parent");
1306 }
1307 #endif //GLIBMM_PROPERTIES_ENABLED
1308
1309 #ifdef GLIBMM_PROPERTIES_ENABLED
1310 Glib::PropertyProxy_ReadOnly<bool> Window::property_destroy_with_parent() const
1311 {
1312   return Glib::PropertyProxy_ReadOnly<bool>(this, "destroy-with-parent");
1313 }
1314 #endif //GLIBMM_PROPERTIES_ENABLED
1315
1316 #ifdef GLIBMM_PROPERTIES_ENABLED
1317 Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Window::property_icon() 
1318 {
1319   return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "icon");
1320 }
1321 #endif //GLIBMM_PROPERTIES_ENABLED
1322
1323 #ifdef GLIBMM_PROPERTIES_ENABLED
1324 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Window::property_icon() const
1325 {
1326   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "icon");
1327 }
1328 #endif //GLIBMM_PROPERTIES_ENABLED
1329
1330 #ifdef GLIBMM_PROPERTIES_ENABLED
1331 Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > Window::property_screen() 
1332 {
1333   return Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> >(this, "screen");
1334 }
1335 #endif //GLIBMM_PROPERTIES_ENABLED
1336
1337 #ifdef GLIBMM_PROPERTIES_ENABLED
1338 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > Window::property_screen() const
1339 {
1340   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> >(this, "screen");
1341 }
1342 #endif //GLIBMM_PROPERTIES_ENABLED
1343
1344 #ifdef GLIBMM_PROPERTIES_ENABLED
1345 Glib::PropertyProxy_ReadOnly<bool> Window::property_is_active() const
1346 {
1347   return Glib::PropertyProxy_ReadOnly<bool>(this, "is-active");
1348 }
1349 #endif //GLIBMM_PROPERTIES_ENABLED
1350
1351 #ifdef GLIBMM_PROPERTIES_ENABLED
1352 Glib::PropertyProxy_ReadOnly<bool> Window::property_has_toplevel_focus() const
1353 {
1354   return Glib::PropertyProxy_ReadOnly<bool>(this, "has-toplevel-focus");
1355 }
1356 #endif //GLIBMM_PROPERTIES_ENABLED
1357
1358 #ifdef GLIBMM_PROPERTIES_ENABLED
1359 Glib::PropertyProxy<GdkWindowTypeHint> Window::property_type_hint() 
1360 {
1361   return Glib::PropertyProxy<GdkWindowTypeHint>(this, "type-hint");
1362 }
1363 #endif //GLIBMM_PROPERTIES_ENABLED
1364
1365 #ifdef GLIBMM_PROPERTIES_ENABLED
1366 Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint> Window::property_type_hint() const
1367 {
1368   return Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint>(this, "type-hint");
1369 }
1370 #endif //GLIBMM_PROPERTIES_ENABLED
1371
1372 #ifdef GLIBMM_PROPERTIES_ENABLED
1373 Glib::PropertyProxy<bool> Window::property_skip_taskbar_hint() 
1374 {
1375   return Glib::PropertyProxy<bool>(this, "skip-taskbar-hint");
1376 }
1377 #endif //GLIBMM_PROPERTIES_ENABLED
1378
1379 #ifdef GLIBMM_PROPERTIES_ENABLED
1380 Glib::PropertyProxy_ReadOnly<bool> Window::property_skip_taskbar_hint() const
1381 {
1382   return Glib::PropertyProxy_ReadOnly<bool>(this, "skip-taskbar-hint");
1383 }
1384 #endif //GLIBMM_PROPERTIES_ENABLED
1385
1386 #ifdef GLIBMM_PROPERTIES_ENABLED
1387 Glib::PropertyProxy<bool> Window::property_skip_pager_hint() 
1388 {
1389   return Glib::PropertyProxy<bool>(this, "skip-pager-hint");
1390 }
1391 #endif //GLIBMM_PROPERTIES_ENABLED
1392
1393 #ifdef GLIBMM_PROPERTIES_ENABLED
1394 Glib::PropertyProxy_ReadOnly<bool> Window::property_skip_pager_hint() const
1395 {
1396   return Glib::PropertyProxy_ReadOnly<bool>(this, "skip-pager-hint");
1397 }
1398 #endif //GLIBMM_PROPERTIES_ENABLED
1399
1400 #ifdef GLIBMM_PROPERTIES_ENABLED
1401 Glib::PropertyProxy<Glib::ustring> Window::property_role() 
1402 {
1403   return Glib::PropertyProxy<Glib::ustring>(this, "role");
1404 }
1405 #endif //GLIBMM_PROPERTIES_ENABLED
1406
1407 #ifdef GLIBMM_PROPERTIES_ENABLED
1408 Glib::PropertyProxy_ReadOnly<Glib::ustring> Window::property_role() const
1409 {
1410   return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "role");
1411 }
1412 #endif //GLIBMM_PROPERTIES_ENABLED
1413
1414 #ifdef GLIBMM_PROPERTIES_ENABLED
1415 Glib::PropertyProxy<bool> Window::property_decorated() 
1416 {
1417   return Glib::PropertyProxy<bool>(this, "decorated");
1418 }
1419 #endif //GLIBMM_PROPERTIES_ENABLED
1420
1421 #ifdef GLIBMM_PROPERTIES_ENABLED
1422 Glib::PropertyProxy_ReadOnly<bool> Window::property_decorated() const
1423 {
1424   return Glib::PropertyProxy_ReadOnly<bool>(this, "decorated");
1425 }
1426 #endif //GLIBMM_PROPERTIES_ENABLED
1427
1428 #ifdef GLIBMM_PROPERTIES_ENABLED
1429 Glib::PropertyProxy<Gdk::Gravity> Window::property_gravity() 
1430 {
1431   return Glib::PropertyProxy<Gdk::Gravity>(this, "gravity");
1432 }
1433 #endif //GLIBMM_PROPERTIES_ENABLED
1434
1435 #ifdef GLIBMM_PROPERTIES_ENABLED
1436 Glib::PropertyProxy_ReadOnly<Gdk::Gravity> Window::property_gravity() const
1437 {
1438   return Glib::PropertyProxy_ReadOnly<Gdk::Gravity>(this, "gravity");
1439 }
1440 #endif //GLIBMM_PROPERTIES_ENABLED
1441
1442 #ifdef GLIBMM_PROPERTIES_ENABLED
1443 Glib::PropertyProxy<Window*> Window::property_transient_for() 
1444 {
1445   return Glib::PropertyProxy<Window*>(this, "transient-for");
1446 }
1447 #endif //GLIBMM_PROPERTIES_ENABLED
1448
1449 #ifdef GLIBMM_PROPERTIES_ENABLED
1450 Glib::PropertyProxy_ReadOnly<Window*> Window::property_transient_for() const
1451 {
1452   return Glib::PropertyProxy_ReadOnly<Window*>(this, "transient-for");
1453 }
1454 #endif //GLIBMM_PROPERTIES_ENABLED
1455
1456 #ifdef GLIBMM_PROPERTIES_ENABLED
1457 Glib::PropertyProxy<bool> Window::property_urgency_hint() 
1458 {
1459   return Glib::PropertyProxy<bool>(this, "urgency-hint");
1460 }
1461 #endif //GLIBMM_PROPERTIES_ENABLED
1462
1463 #ifdef GLIBMM_PROPERTIES_ENABLED
1464 Glib::PropertyProxy_ReadOnly<bool> Window::property_urgency_hint() const
1465 {
1466   return Glib::PropertyProxy_ReadOnly<bool>(this, "urgency-hint");
1467 }
1468 #endif //GLIBMM_PROPERTIES_ENABLED
1469
1470 #ifdef GLIBMM_PROPERTIES_ENABLED
1471 Glib::PropertyProxy<bool> Window::property_deletable() 
1472 {
1473   return Glib::PropertyProxy<bool>(this, "deletable");
1474 }
1475 #endif //GLIBMM_PROPERTIES_ENABLED
1476
1477 #ifdef GLIBMM_PROPERTIES_ENABLED
1478 Glib::PropertyProxy_ReadOnly<bool> Window::property_deletable() const
1479 {
1480   return Glib::PropertyProxy_ReadOnly<bool>(this, "deletable");
1481 }
1482 #endif //GLIBMM_PROPERTIES_ENABLED
1483
1484 #ifdef GLIBMM_PROPERTIES_ENABLED
1485 Glib::PropertyProxy<double> Window::property_opacity() 
1486 {
1487   return Glib::PropertyProxy<double>(this, "opacity");
1488 }
1489 #endif //GLIBMM_PROPERTIES_ENABLED
1490
1491 #ifdef GLIBMM_PROPERTIES_ENABLED
1492 Glib::PropertyProxy_ReadOnly<double> Window::property_opacity() const
1493 {
1494   return Glib::PropertyProxy_ReadOnly<double>(this, "opacity");
1495 }
1496 #endif //GLIBMM_PROPERTIES_ENABLED
1497
1498
1499 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
1500 void Gtk::Window::on_set_focus(Widget* focus)
1501 {
1502   BaseClassType *const base = static_cast<BaseClassType*>(
1503       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1504   );
1505
1506   if(base && base->set_focus)
1507     (*base->set_focus)(gobj(),(GtkWidget*)Glib::unwrap(focus));
1508 }
1509 bool Gtk::Window::on_frame_event(GdkEvent* event)
1510 {
1511   BaseClassType *const base = static_cast<BaseClassType*>(
1512       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1513   );
1514
1515   if(base && base->frame_event)
1516     return (*base->frame_event)(gobj(),event);
1517
1518   typedef bool RType;
1519   return RType();
1520 }
1521 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
1522
1523 #ifdef GLIBMM_VFUNCS_ENABLED
1524 #endif //GLIBMM_VFUNCS_ENABLED
1525
1526
1527 } // namespace Gtk
1528
1529