moved 2.1-staging to trunk @ rev 1765
[ardour.git] / libs / gtkmm2 / atk / atkmm / component.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <atkmm/component.h>
5 #include <atkmm/private/component_p.h>
6
7 #include <atk/atk-enum-types.h>
8 // -*- c++ -*-
9 /* $Id$ */
10
11 /* Copyright 1998-2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library 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 GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28 #include <atkmm/object.h>
29 #include <atk/atkcomponent.h>
30
31
32 namespace
33 {
34 } // anonymous namespace
35
36 // static
37 GType Glib::Value<Atk::CoordType>::value_type()
38 {
39   return atk_coord_type_get_type();
40 }
41
42 // static
43 GType Glib::Value<Atk::Layer>::value_type()
44 {
45   return atk_layer_get_type();
46 }
47
48
49 namespace Glib
50 {
51
52 Glib::RefPtr<Atk::Component> wrap(AtkComponent* object, bool take_copy)
53 {
54   return Glib::RefPtr<Atk::Component>( dynamic_cast<Atk::Component*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
55   //We use dynamic_cast<> in case of multiple inheritance.
56 }
57
58 } // namespace Glib
59
60
61 namespace Atk
62 {
63
64
65 /* The *_Class implementation: */
66
67 const Glib::Interface_Class& Component_Class::init()
68 {
69   if(!gtype_) // create the GType if necessary
70   {
71     // Glib::Interface_Class has to know the interface init function
72     // in order to add interfaces to implementing types.
73     class_init_func_ = &Component_Class::iface_init_function;
74
75     // We can not derive from another interface, and it is not necessary anyway.
76     gtype_ = atk_component_get_type();
77   }
78
79   return *this;
80 }
81
82 void Component_Class::iface_init_function(void* g_iface, void*)
83 {
84   BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
85
86   //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
87   //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
88   g_assert(klass != 0); 
89
90 #ifdef GLIBMM_VFUNCS_ENABLED
91   klass->add_focus_handler = &add_focus_handler_vfunc_callback;
92   klass->contains = &contains_vfunc_callback;
93   klass->ref_accessible_at_point = &ref_accessible_at_point_vfunc_callback;
94   klass->get_extents = &get_extents_vfunc_callback;
95   klass->get_position = &get_position_vfunc_callback;
96   klass->get_size = &get_size_vfunc_callback;
97   klass->get_layer = &get_layer_vfunc_callback;
98   klass->get_mdi_zorder = &get_mdi_zorder_vfunc_callback;
99   klass->grab_focus = &grab_focus_vfunc_callback;
100   klass->remove_focus_handler = &remove_focus_handler_vfunc_callback;
101   klass->set_extents = &set_extents_vfunc_callback;
102   klass->set_position = &set_position_vfunc_callback;
103   klass->set_size = &set_size_vfunc_callback;
104 #endif //GLIBMM_VFUNCS_ENABLED
105
106 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
107 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
108 }
109
110 #ifdef GLIBMM_VFUNCS_ENABLED
111 guint Component_Class::add_focus_handler_vfunc_callback(AtkComponent* self, AtkFocusHandler handler)
112 {
113   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
114       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
115
116   // Non-gtkmmproc-generated custom classes implicitly call the default
117   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
118   // generated classes can use this optimisation, which avoids the unnecessary
119   // parameter conversions if there is no possibility of the virtual function
120   // being overridden:
121   if(obj && obj->is_derived_())
122   {
123     #ifdef GLIBMM_EXCEPTIONS_ENABLED
124     try // Trap C++ exceptions which would normally be lost because this is a C callback.
125     {
126     #endif //GLIBMM_EXCEPTIONS_ENABLED
127       // Call the virtual member method, which derived classes might override.
128       return obj->add_focus_handler_vfunc(handler);
129     #ifdef GLIBMM_EXCEPTIONS_ENABLED
130     }
131     catch(...)
132     {
133       Glib::exception_handlers_invoke();
134     }
135     #endif //GLIBMM_EXCEPTIONS_ENABLED
136   }
137   else
138   {
139     BaseClassType *const base = static_cast<BaseClassType*>(
140         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
141 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
142 )    );
143
144     // Call the original underlying C function:
145     if(base && base->add_focus_handler)
146       return (*base->add_focus_handler)(self, handler);
147   }
148
149   typedef guint RType;
150   return RType();
151 }
152 gboolean Component_Class::contains_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type)
153 {
154   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
155       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
156
157   // Non-gtkmmproc-generated custom classes implicitly call the default
158   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
159   // generated classes can use this optimisation, which avoids the unnecessary
160   // parameter conversions if there is no possibility of the virtual function
161   // being overridden:
162   if(obj && obj->is_derived_())
163   {
164     #ifdef GLIBMM_EXCEPTIONS_ENABLED
165     try // Trap C++ exceptions which would normally be lost because this is a C callback.
166     {
167     #endif //GLIBMM_EXCEPTIONS_ENABLED
168       // Call the virtual member method, which derived classes might override.
169       return static_cast<int>(obj->contains_vfunc(x
170 , y
171 , ((CoordType)(coord_type))
172 ));
173     #ifdef GLIBMM_EXCEPTIONS_ENABLED
174     }
175     catch(...)
176     {
177       Glib::exception_handlers_invoke();
178     }
179     #endif //GLIBMM_EXCEPTIONS_ENABLED
180   }
181   else
182   {
183     BaseClassType *const base = static_cast<BaseClassType*>(
184         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
185 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
186 )    );
187
188     // Call the original underlying C function:
189     if(base && base->contains)
190       return (*base->contains)(self, x, y, coord_type);
191   }
192
193   typedef gboolean RType;
194   return RType();
195 }
196 AtkObject* Component_Class::ref_accessible_at_point_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type)
197 {
198   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
199       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
200
201   // Non-gtkmmproc-generated custom classes implicitly call the default
202   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
203   // generated classes can use this optimisation, which avoids the unnecessary
204   // parameter conversions if there is no possibility of the virtual function
205   // being overridden:
206   if(obj && obj->is_derived_())
207   {
208     #ifdef GLIBMM_EXCEPTIONS_ENABLED
209     try // Trap C++ exceptions which would normally be lost because this is a C callback.
210     {
211     #endif //GLIBMM_EXCEPTIONS_ENABLED
212       // Call the virtual member method, which derived classes might override.
213       return Glib::unwrap_copy(obj->get_accessible_at_point_vfunc(x
214 , y
215 , ((CoordType)(coord_type))
216 ));
217     #ifdef GLIBMM_EXCEPTIONS_ENABLED
218     }
219     catch(...)
220     {
221       Glib::exception_handlers_invoke();
222     }
223     #endif //GLIBMM_EXCEPTIONS_ENABLED
224   }
225   else
226   {
227     BaseClassType *const base = static_cast<BaseClassType*>(
228         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
229 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
230 )    );
231
232     // Call the original underlying C function:
233     if(base && base->ref_accessible_at_point)
234       return (*base->ref_accessible_at_point)(self, x, y, coord_type);
235   }
236
237   typedef AtkObject* RType;
238   return RType();
239 }
240 void Component_Class::get_extents_vfunc_callback(AtkComponent* self, gint* x, gint* y, gint* width, gint* height, AtkCoordType coord_type)
241 {
242   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
243       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
244
245   // Non-gtkmmproc-generated custom classes implicitly call the default
246   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
247   // generated classes can use this optimisation, which avoids the unnecessary
248   // parameter conversions if there is no possibility of the virtual function
249   // being overridden:
250   if(obj && obj->is_derived_())
251   {
252     #ifdef GLIBMM_EXCEPTIONS_ENABLED
253     try // Trap C++ exceptions which would normally be lost because this is a C callback.
254     {
255     #endif //GLIBMM_EXCEPTIONS_ENABLED
256       // Call the virtual member method, which derived classes might override.
257       obj->get_extents_vfunc(*(x)
258 , *(y)
259 , *(width)
260 , *(height)
261 , ((CoordType)(coord_type))
262 );
263     #ifdef GLIBMM_EXCEPTIONS_ENABLED
264     }
265     catch(...)
266     {
267       Glib::exception_handlers_invoke();
268     }
269     #endif //GLIBMM_EXCEPTIONS_ENABLED
270   }
271   else
272   {
273     BaseClassType *const base = static_cast<BaseClassType*>(
274         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
275 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
276 )    );
277
278     // Call the original underlying C function:
279     if(base && base->get_extents)
280       (*base->get_extents)(self, x, y, width, height, coord_type);
281   }
282 }
283 void Component_Class::get_position_vfunc_callback(AtkComponent* self, gint* x, gint* y, AtkCoordType coord_type)
284 {
285   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
286       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
287
288   // Non-gtkmmproc-generated custom classes implicitly call the default
289   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
290   // generated classes can use this optimisation, which avoids the unnecessary
291   // parameter conversions if there is no possibility of the virtual function
292   // being overridden:
293   if(obj && obj->is_derived_())
294   {
295     #ifdef GLIBMM_EXCEPTIONS_ENABLED
296     try // Trap C++ exceptions which would normally be lost because this is a C callback.
297     {
298     #endif //GLIBMM_EXCEPTIONS_ENABLED
299       // Call the virtual member method, which derived classes might override.
300       obj->get_position_vfunc(*(x)
301 , *(y)
302 , ((CoordType)(coord_type))
303 );
304     #ifdef GLIBMM_EXCEPTIONS_ENABLED
305     }
306     catch(...)
307     {
308       Glib::exception_handlers_invoke();
309     }
310     #endif //GLIBMM_EXCEPTIONS_ENABLED
311   }
312   else
313   {
314     BaseClassType *const base = static_cast<BaseClassType*>(
315         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
316 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
317 )    );
318
319     // Call the original underlying C function:
320     if(base && base->get_position)
321       (*base->get_position)(self, x, y, coord_type);
322   }
323 }
324 void Component_Class::get_size_vfunc_callback(AtkComponent* self, gint* width, gint* height)
325 {
326   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
327       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
328
329   // Non-gtkmmproc-generated custom classes implicitly call the default
330   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
331   // generated classes can use this optimisation, which avoids the unnecessary
332   // parameter conversions if there is no possibility of the virtual function
333   // being overridden:
334   if(obj && obj->is_derived_())
335   {
336     #ifdef GLIBMM_EXCEPTIONS_ENABLED
337     try // Trap C++ exceptions which would normally be lost because this is a C callback.
338     {
339     #endif //GLIBMM_EXCEPTIONS_ENABLED
340       // Call the virtual member method, which derived classes might override.
341       obj->get_size_vfunc(*(width)
342 , *(height)
343 );
344     #ifdef GLIBMM_EXCEPTIONS_ENABLED
345     }
346     catch(...)
347     {
348       Glib::exception_handlers_invoke();
349     }
350     #endif //GLIBMM_EXCEPTIONS_ENABLED
351   }
352   else
353   {
354     BaseClassType *const base = static_cast<BaseClassType*>(
355         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
356 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
357 )    );
358
359     // Call the original underlying C function:
360     if(base && base->get_size)
361       (*base->get_size)(self, width, height);
362   }
363 }
364 AtkLayer Component_Class::get_layer_vfunc_callback(AtkComponent* self)
365 {
366   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
367       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
368
369   // Non-gtkmmproc-generated custom classes implicitly call the default
370   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
371   // generated classes can use this optimisation, which avoids the unnecessary
372   // parameter conversions if there is no possibility of the virtual function
373   // being overridden:
374   if(obj && obj->is_derived_())
375   {
376     #ifdef GLIBMM_EXCEPTIONS_ENABLED
377     try // Trap C++ exceptions which would normally be lost because this is a C callback.
378     {
379     #endif //GLIBMM_EXCEPTIONS_ENABLED
380       // Call the virtual member method, which derived classes might override.
381       return ((AtkLayer)(obj->get_layer_vfunc()));
382     #ifdef GLIBMM_EXCEPTIONS_ENABLED
383     }
384     catch(...)
385     {
386       Glib::exception_handlers_invoke();
387     }
388     #endif //GLIBMM_EXCEPTIONS_ENABLED
389   }
390   else
391   {
392     BaseClassType *const base = static_cast<BaseClassType*>(
393         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
394 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
395 )    );
396
397     // Call the original underlying C function:
398     if(base && base->get_layer)
399       return (*base->get_layer)(self);
400   }
401
402   typedef AtkLayer RType;
403   return RType();
404 }
405 gint Component_Class::get_mdi_zorder_vfunc_callback(AtkComponent* self)
406 {
407   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
408       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
409
410   // Non-gtkmmproc-generated custom classes implicitly call the default
411   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
412   // generated classes can use this optimisation, which avoids the unnecessary
413   // parameter conversions if there is no possibility of the virtual function
414   // being overridden:
415   if(obj && obj->is_derived_())
416   {
417     #ifdef GLIBMM_EXCEPTIONS_ENABLED
418     try // Trap C++ exceptions which would normally be lost because this is a C callback.
419     {
420     #endif //GLIBMM_EXCEPTIONS_ENABLED
421       // Call the virtual member method, which derived classes might override.
422       return obj->get_mdi_zorder_vfunc();
423     #ifdef GLIBMM_EXCEPTIONS_ENABLED
424     }
425     catch(...)
426     {
427       Glib::exception_handlers_invoke();
428     }
429     #endif //GLIBMM_EXCEPTIONS_ENABLED
430   }
431   else
432   {
433     BaseClassType *const base = static_cast<BaseClassType*>(
434         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
435 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
436 )    );
437
438     // Call the original underlying C function:
439     if(base && base->get_mdi_zorder)
440       return (*base->get_mdi_zorder)(self);
441   }
442
443   typedef gint RType;
444   return RType();
445 }
446 gboolean Component_Class::grab_focus_vfunc_callback(AtkComponent* self)
447 {
448   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
449       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
450
451   // Non-gtkmmproc-generated custom classes implicitly call the default
452   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
453   // generated classes can use this optimisation, which avoids the unnecessary
454   // parameter conversions if there is no possibility of the virtual function
455   // being overridden:
456   if(obj && obj->is_derived_())
457   {
458     #ifdef GLIBMM_EXCEPTIONS_ENABLED
459     try // Trap C++ exceptions which would normally be lost because this is a C callback.
460     {
461     #endif //GLIBMM_EXCEPTIONS_ENABLED
462       // Call the virtual member method, which derived classes might override.
463       return static_cast<int>(obj->grab_focus_vfunc());
464     #ifdef GLIBMM_EXCEPTIONS_ENABLED
465     }
466     catch(...)
467     {
468       Glib::exception_handlers_invoke();
469     }
470     #endif //GLIBMM_EXCEPTIONS_ENABLED
471   }
472   else
473   {
474     BaseClassType *const base = static_cast<BaseClassType*>(
475         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
476 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
477 )    );
478
479     // Call the original underlying C function:
480     if(base && base->grab_focus)
481       return (*base->grab_focus)(self);
482   }
483
484   typedef gboolean RType;
485   return RType();
486 }
487 void Component_Class::remove_focus_handler_vfunc_callback(AtkComponent* self, guint handler_id)
488 {
489   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
490       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
491
492   // Non-gtkmmproc-generated custom classes implicitly call the default
493   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
494   // generated classes can use this optimisation, which avoids the unnecessary
495   // parameter conversions if there is no possibility of the virtual function
496   // being overridden:
497   if(obj && obj->is_derived_())
498   {
499     #ifdef GLIBMM_EXCEPTIONS_ENABLED
500     try // Trap C++ exceptions which would normally be lost because this is a C callback.
501     {
502     #endif //GLIBMM_EXCEPTIONS_ENABLED
503       // Call the virtual member method, which derived classes might override.
504       obj->remove_focus_handler_vfunc(handler_id);
505     #ifdef GLIBMM_EXCEPTIONS_ENABLED
506     }
507     catch(...)
508     {
509       Glib::exception_handlers_invoke();
510     }
511     #endif //GLIBMM_EXCEPTIONS_ENABLED
512   }
513   else
514   {
515     BaseClassType *const base = static_cast<BaseClassType*>(
516         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
517 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
518 )    );
519
520     // Call the original underlying C function:
521     if(base && base->remove_focus_handler)
522       (*base->remove_focus_handler)(self, handler_id);
523   }
524 }
525 gboolean Component_Class::set_extents_vfunc_callback(AtkComponent* self, gint x, gint y, gint width, gint height, AtkCoordType coord_type)
526 {
527   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
528       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
529
530   // Non-gtkmmproc-generated custom classes implicitly call the default
531   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
532   // generated classes can use this optimisation, which avoids the unnecessary
533   // parameter conversions if there is no possibility of the virtual function
534   // being overridden:
535   if(obj && obj->is_derived_())
536   {
537     #ifdef GLIBMM_EXCEPTIONS_ENABLED
538     try // Trap C++ exceptions which would normally be lost because this is a C callback.
539     {
540     #endif //GLIBMM_EXCEPTIONS_ENABLED
541       // Call the virtual member method, which derived classes might override.
542       return static_cast<int>(obj->set_extents_vfunc(x
543 , y
544 , width
545 , height
546 , ((CoordType)(coord_type))
547 ));
548     #ifdef GLIBMM_EXCEPTIONS_ENABLED
549     }
550     catch(...)
551     {
552       Glib::exception_handlers_invoke();
553     }
554     #endif //GLIBMM_EXCEPTIONS_ENABLED
555   }
556   else
557   {
558     BaseClassType *const base = static_cast<BaseClassType*>(
559         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
560 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
561 )    );
562
563     // Call the original underlying C function:
564     if(base && base->set_extents)
565       return (*base->set_extents)(self, x, y, width, height, coord_type);
566   }
567
568   typedef gboolean RType;
569   return RType();
570 }
571 gboolean Component_Class::set_position_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type)
572 {
573   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
574       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
575
576   // Non-gtkmmproc-generated custom classes implicitly call the default
577   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
578   // generated classes can use this optimisation, which avoids the unnecessary
579   // parameter conversions if there is no possibility of the virtual function
580   // being overridden:
581   if(obj && obj->is_derived_())
582   {
583     #ifdef GLIBMM_EXCEPTIONS_ENABLED
584     try // Trap C++ exceptions which would normally be lost because this is a C callback.
585     {
586     #endif //GLIBMM_EXCEPTIONS_ENABLED
587       // Call the virtual member method, which derived classes might override.
588       return static_cast<int>(obj->set_position_vfunc(x
589 , y
590 , ((CoordType)(coord_type))
591 ));
592     #ifdef GLIBMM_EXCEPTIONS_ENABLED
593     }
594     catch(...)
595     {
596       Glib::exception_handlers_invoke();
597     }
598     #endif //GLIBMM_EXCEPTIONS_ENABLED
599   }
600   else
601   {
602     BaseClassType *const base = static_cast<BaseClassType*>(
603         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
604 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
605 )    );
606
607     // Call the original underlying C function:
608     if(base && base->set_position)
609       return (*base->set_position)(self, x, y, coord_type);
610   }
611
612   typedef gboolean RType;
613   return RType();
614 }
615 gboolean Component_Class::set_size_vfunc_callback(AtkComponent* self, gint width, gint height)
616 {
617   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
618       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
619
620   // Non-gtkmmproc-generated custom classes implicitly call the default
621   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
622   // generated classes can use this optimisation, which avoids the unnecessary
623   // parameter conversions if there is no possibility of the virtual function
624   // being overridden:
625   if(obj && obj->is_derived_())
626   {
627     #ifdef GLIBMM_EXCEPTIONS_ENABLED
628     try // Trap C++ exceptions which would normally be lost because this is a C callback.
629     {
630     #endif //GLIBMM_EXCEPTIONS_ENABLED
631       // Call the virtual member method, which derived classes might override.
632       return static_cast<int>(obj->set_size_vfunc(width
633 , height
634 ));
635     #ifdef GLIBMM_EXCEPTIONS_ENABLED
636     }
637     catch(...)
638     {
639       Glib::exception_handlers_invoke();
640     }
641     #endif //GLIBMM_EXCEPTIONS_ENABLED
642   }
643   else
644   {
645     BaseClassType *const base = static_cast<BaseClassType*>(
646         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
647 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
648 )    );
649
650     // Call the original underlying C function:
651     if(base && base->set_size)
652       return (*base->set_size)(self, width, height);
653   }
654
655   typedef gboolean RType;
656   return RType();
657 }
658 #endif //GLIBMM_VFUNCS_ENABLED
659
660 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
661 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
662
663
664 Glib::ObjectBase* Component_Class::wrap_new(GObject* object)
665 {
666   return new Component((AtkComponent*)(object));
667 }
668
669
670 /* The implementation: */
671
672 Component::Component()
673 :
674   Glib::Interface(component_class_.init())
675 {}
676
677 Component::Component(AtkComponent* castitem)
678 :
679   Glib::Interface((GObject*)(castitem))
680 {}
681
682 Component::~Component()
683 {}
684
685 // static
686 void Component::add_interface(GType gtype_implementer)
687 {
688   component_class_.init().add_interface(gtype_implementer);
689 }
690
691 Component::CppClassType Component::component_class_; // initialize static member
692
693 GType Component::get_type()
694 {
695   return component_class_.init().get_type();
696 }
697
698 GType Component::get_base_type()
699 {
700   return atk_component_get_type();
701 }
702
703
704 guint Component::add_focus_handler(AtkFocusHandler handler)
705 {
706   return atk_component_add_focus_handler(gobj(), handler);
707 }
708
709 bool Component::contains(int x, int y, CoordType coord_type) const
710 {
711   return atk_component_contains(const_cast<AtkComponent*>(gobj()), x, y, ((AtkCoordType)(coord_type)));
712 }
713
714 Glib::RefPtr<Atk::Object> Component::get_accessible_at_point(int x, int y, CoordType coord_type)
715 {
716   return Glib::wrap(atk_component_ref_accessible_at_point(gobj(), x, y, ((AtkCoordType)(coord_type))));
717 }
718
719 void Component::get_extents(int& x, int& y, int& width, int& height, CoordType coord_type) const
720 {
721 atk_component_get_extents(const_cast<AtkComponent*>(gobj()), &x, &y, &width, &height, ((AtkCoordType)(coord_type))); 
722 }
723
724 void Component::get_position(int& x, int& y, CoordType coord_type) const
725 {
726 atk_component_get_position(const_cast<AtkComponent*>(gobj()), &x, &y, ((AtkCoordType)(coord_type))); 
727 }
728
729 void Component::get_size(int& width, int& height) const
730 {
731 atk_component_get_size(const_cast<AtkComponent*>(gobj()), &width, &height); 
732 }
733
734 Layer Component::get_layer() const
735 {
736   return ((Layer)(atk_component_get_layer(const_cast<AtkComponent*>(gobj()))));
737 }
738
739 int Component::get_mdi_zorder() const
740 {
741   return atk_component_get_mdi_zorder(const_cast<AtkComponent*>(gobj()));
742 }
743
744 bool Component::grab_focus()
745 {
746   return atk_component_grab_focus(gobj());
747 }
748
749 void Component::remove_focus_handler(guint handler_id)
750 {
751 atk_component_remove_focus_handler(gobj(), handler_id); 
752 }
753
754 bool Component::set_extents(int x, int y, int width, int height, CoordType coord_type)
755 {
756   return atk_component_set_extents(gobj(), x, y, width, height, ((AtkCoordType)(coord_type)));
757 }
758
759 bool Component::set_position(int x, int y, CoordType coord_type)
760 {
761   return atk_component_set_position(gobj(), x, y, ((AtkCoordType)(coord_type)));
762 }
763
764 bool Component::set_size(int width, int height)
765 {
766   return atk_component_set_size(gobj(), width, height);
767 }
768
769
770 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
771 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
772
773 #ifdef GLIBMM_VFUNCS_ENABLED
774 guint Atk::Component::add_focus_handler_vfunc(AtkFocusHandler handler) 
775 {
776   BaseClassType *const base = static_cast<BaseClassType*>(
777       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
778 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
779 )  );
780
781   if(base && base->add_focus_handler)
782     return (*base->add_focus_handler)(gobj(),handler);
783
784   typedef guint RType;
785   return RType();
786 }
787 bool Atk::Component::contains_vfunc(int x, int y, CoordType coord_type) const
788 {
789   BaseClassType *const base = static_cast<BaseClassType*>(
790       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
791 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
792 )  );
793
794   if(base && base->contains)
795     return (*base->contains)(const_cast<AtkComponent*>(gobj()),x,y,((AtkCoordType)(coord_type)));
796
797   typedef bool RType;
798   return RType();
799 }
800 Glib::RefPtr<Atk::Object> Atk::Component::get_accessible_at_point_vfunc(int x, int y, CoordType coord_type) 
801 {
802   BaseClassType *const base = static_cast<BaseClassType*>(
803       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
804 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
805 )  );
806
807   if(base && base->ref_accessible_at_point)
808     return Glib::wrap((*base->ref_accessible_at_point)(gobj(),x,y,((AtkCoordType)(coord_type))));
809
810   typedef Glib::RefPtr<Atk::Object> RType;
811   return RType();
812 }
813 void Atk::Component::get_extents_vfunc(int& x, int& y, int& width, int& height, CoordType coord_type) const
814 {
815   BaseClassType *const base = static_cast<BaseClassType*>(
816       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
817 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
818 )  );
819
820   if(base && base->get_extents)
821     (*base->get_extents)(const_cast<AtkComponent*>(gobj()),&x,&y,&width,&height,((AtkCoordType)(coord_type)));
822 }
823 void Atk::Component::get_position_vfunc(int& x, int& y, CoordType coord_type) const
824 {
825   BaseClassType *const base = static_cast<BaseClassType*>(
826       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
827 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
828 )  );
829
830   if(base && base->get_position)
831     (*base->get_position)(const_cast<AtkComponent*>(gobj()),&x,&y,((AtkCoordType)(coord_type)));
832 }
833 void Atk::Component::get_size_vfunc(int& width, int& height) const
834 {
835   BaseClassType *const base = static_cast<BaseClassType*>(
836       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
837 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
838 )  );
839
840   if(base && base->get_size)
841     (*base->get_size)(const_cast<AtkComponent*>(gobj()),&width,&height);
842 }
843 Layer Atk::Component::get_layer_vfunc() const
844 {
845   BaseClassType *const base = static_cast<BaseClassType*>(
846       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
847 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
848 )  );
849
850   if(base && base->get_layer)
851     return ((Layer)((*base->get_layer)(const_cast<AtkComponent*>(gobj()))));
852
853   typedef Layer RType;
854   return RType();
855 }
856 int Atk::Component::get_mdi_zorder_vfunc() const
857 {
858   BaseClassType *const base = static_cast<BaseClassType*>(
859       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
860 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
861 )  );
862
863   if(base && base->get_mdi_zorder)
864     return (*base->get_mdi_zorder)(const_cast<AtkComponent*>(gobj()));
865
866   typedef int RType;
867   return RType();
868 }
869 bool Atk::Component::grab_focus_vfunc() 
870 {
871   BaseClassType *const base = static_cast<BaseClassType*>(
872       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
873 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
874 )  );
875
876   if(base && base->grab_focus)
877     return (*base->grab_focus)(gobj());
878
879   typedef bool RType;
880   return RType();
881 }
882 void Atk::Component::remove_focus_handler_vfunc(guint handler_id) 
883 {
884   BaseClassType *const base = static_cast<BaseClassType*>(
885       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
886 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
887 )  );
888
889   if(base && base->remove_focus_handler)
890     (*base->remove_focus_handler)(gobj(),handler_id);
891 }
892 bool Atk::Component::set_extents_vfunc(int x, int y, int width, int height, CoordType coord_type) 
893 {
894   BaseClassType *const base = static_cast<BaseClassType*>(
895       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
896 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
897 )  );
898
899   if(base && base->set_extents)
900     return (*base->set_extents)(gobj(),x,y,width,height,((AtkCoordType)(coord_type)));
901
902   typedef bool RType;
903   return RType();
904 }
905 bool Atk::Component::set_position_vfunc(int x, int y, CoordType coord_type) 
906 {
907   BaseClassType *const base = static_cast<BaseClassType*>(
908       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
909 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
910 )  );
911
912   if(base && base->set_position)
913     return (*base->set_position)(gobj(),x,y,((AtkCoordType)(coord_type)));
914
915   typedef bool RType;
916   return RType();
917 }
918 bool Atk::Component::set_size_vfunc(int width, int height) 
919 {
920   BaseClassType *const base = static_cast<BaseClassType*>(
921       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
922 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
923 )  );
924
925   if(base && base->set_size)
926     return (*base->set_size)(gobj(),width,height);
927
928   typedef bool RType;
929   return RType();
930 }
931 #endif //GLIBMM_VFUNCS_ENABLED
932
933
934 } // namespace Atk
935
936