diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-05-07 11:19:56 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-05-07 11:19:56 (GMT) |
commit | d76bef42ca0d292a7a04d61663d4da7536136479 (patch) | |
tree | 605557978c536eeb7164545f6f1691fb940823a0 /libdocument | |
parent | 837897ffba5a5e4e5685c1ffdeb1d4d87083a052 (diff) |
[shell] Use G_DEFINE_INTERFACE and remove our own macro
Diffstat (limited to 'libdocument')
-rw-r--r-- | libdocument/ev-document.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/libdocument/ev-document.h b/libdocument/ev-document.h index 09c97aa..1064f16 100644 --- a/libdocument/ev-document.h +++ b/libdocument/ev-document.h @@ -271,37 +271,6 @@ type_name##_get_type (void) return g_define_type_id__volatile; \ } -/* A convenience macro for GTypeInterface definitions, which declares - * a default vtable initialization function and defines a *_get_type() - * function. - * - * The macro expects the interface initialization function to have the - * name <literal>t_n ## _default_init</literal>, and the interface - * structure to have the name <literal>TN ## Interface</literal>. - */ -#define EV_DEFINE_INTERFACE(TypeName, type_name, TYPE_PREREQ) \ -static void type_name##_class_init (TypeName##Iface *klass); \ - \ -GType \ -type_name##_get_type (void) \ -{ \ - static volatile gsize g_define_type_id__volatile = 0; \ - if (g_once_init_enter (&g_define_type_id__volatile)) { \ - GType g_define_type_id = \ - g_type_register_static_simple (G_TYPE_INTERFACE, \ - g_intern_static_string (#TypeName), \ - sizeof (TypeName##Iface), \ - (GClassInitFunc)type_name##_class_init, \ - 0, \ - (GInstanceInitFunc)NULL, \ - (GTypeFlags) 0); \ - if (TYPE_PREREQ) \ - g_type_interface_add_prerequisite (g_define_type_id, TYPE_PREREQ); \ - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ - } \ - return g_define_type_id__volatile; \ -} - /* * A convenience macro for boxed type implementations, which defines a * type_name_get_type() function registering the boxed type. |