summaryrefslogtreecommitdiff
path: root/libs/gtkmm2/atk/atkmm/document.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-12-18 06:05:55 +0000
committerDavid Robillard <d@drobilla.net>2007-12-18 06:05:55 +0000
commit35fc31a1de83f59d9b00e92e8e7111865983e378 (patch)
tree2e6a8b2954e27f3fd3186a34e5dbcc2fdcbae208 /libs/gtkmm2/atk/atkmm/document.cc
parent0e31c565916508ceb8cb9511299e8439193b8dd1 (diff)
Remove ancient/unused flowcanvas and libglademm from repository.
Update libraries to latest stable released version (except gnomecanvasmm, which is strangely packaged...). Fixes building (at least here). git-svn-id: svn://localhost/ardour2/trunk@2790 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2/atk/atkmm/document.cc')
-rw-r--r--libs/gtkmm2/atk/atkmm/document.cc96
1 files changed, 51 insertions, 45 deletions
diff --git a/libs/gtkmm2/atk/atkmm/document.cc b/libs/gtkmm2/atk/atkmm/document.cc
index f27b4ff522..9d7be7e655 100644
--- a/libs/gtkmm2/atk/atkmm/document.cc
+++ b/libs/gtkmm2/atk/atkmm/document.cc
@@ -45,7 +45,7 @@ namespace Glib
Glib::RefPtr<Atk::Document> wrap(AtkDocument* object, bool take_copy)
{
- return Glib::RefPtr<Atk::Document>( dynamic_cast<Atk::Document*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ return Glib::RefPtr<Atk::Document>( dynamic_cast<Atk::Document*> (Glib::wrap_auto_interface<Atk::Document> ((GObject*)(object), take_copy)) );
//We use dynamic_cast<> in case of multiple inheritance.
}
@@ -93,7 +93,7 @@ void Document_Class::iface_init_function(void* g_iface, void*)
#ifdef GLIBMM_VFUNCS_ENABLED
const gchar* Document_Class::get_document_type_vfunc_callback(AtkDocument* self)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
@@ -101,40 +101,43 @@ const gchar* Document_Class::get_document_type_vfunc_callback(AtkDocument* self)
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
- // Call the virtual member method, which derived classes might override.
- return obj->get_document_type_vfunc();
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_document_type_vfunc();
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
- catch(...)
- {
- Glib::exception_handlers_invoke();
- }
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_document_type)
+ return (*base->get_document_type)(self);
- // Call the original underlying C function:
- if(base && base->get_document_type)
- return (*base->get_document_type)(self);
- }
typedef const gchar* RType;
return RType();
}
gpointer Document_Class::get_document_vfunc_callback(AtkDocument* self)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
@@ -142,33 +145,36 @@ gpointer Document_Class::get_document_vfunc_callback(AtkDocument* self)
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
- // Call the virtual member method, which derived classes might override.
- return obj->get_document_vfunc();
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_document_vfunc();
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
- catch(...)
- {
- Glib::exception_handlers_invoke();
- }
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_document)
+ return (*base->get_document)(self);
- // Call the original underlying C function:
- if(base && base->get_document)
- return (*base->get_document)(self);
- }
typedef gpointer RType;
return RType();