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