Index: gobject/gtype.h
===================================================================
--- gobject/gtype.h	(revision 6285)
+++ gobject/gtype.h	(working copy)
@@ -339,6 +339,9 @@
 #define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
 #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)	    _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
 
+#define G_DEFINE_INTERFACE(TN, t_n, T_P)		    G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)
+#define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_)     _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END()
+
 /* convenience macro to ease interface addition in the CODE
  * section of G_DEFINE_TYPE_WITH_CODE() (this macro relies on
  * the g_define_type_id present within G_DEFINE_TYPE_WITH_CODE()).
@@ -388,6 +391,33 @@
   return g_define_type_id__volatile;	\
 } /* closes type_name##_get_type() */
 
+#define _G_DEFINE_INTERFACE_EXTENDED_BEGIN(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); \
+      g_type_interface_add_prerequisite (g_define_type_id, TYPE_PREREQ); \
+      { /* custom code follows */
+#define _G_DEFINE_INTERFACE_EXTENDED_END()	\
+        /* following custom code */		\
+      }						\
+      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
+    }						\
+  return g_define_type_id__volatile;			\
+} /* closes type_name##_get_type() */
 
 /* --- protected (for fundamental type implementations) --- */
 GTypePlugin*	 g_type_get_plugin		(GType		     type);
Index: docs/reference/gobject/gobject-sections.txt
===================================================================
--- docs/reference/gobject/gobject-sections.txt	(revision 6285)
+++ docs/reference/gobject/gobject-sections.txt	(working copy)
@@ -101,6 +101,8 @@
 G_DEFINE_TYPE_WITH_CODE
 G_DEFINE_ABSTRACT_TYPE
 G_DEFINE_ABSTRACT_TYPE_WITH_CODE
+G_DEFINE_INTERFACE
+G_DEFINE_INTERFACE_WITH_CODE
 G_IMPLEMENT_INTERFACE
 G_DEFINE_TYPE_EXTENDED
 
Index: docs/reference/gobject/tmpl/gtype.sgml
===================================================================
--- docs/reference/gobject/tmpl/gtype.sgml	(revision 6285)
+++ docs/reference/gobject/tmpl/gtype.sgml	(working copy)
@@ -1515,7 +1515,7 @@
 <!-- ##### MACRO G_DEFINE_TYPE_WITH_CODE ##### -->
 <para>
 A convenience macro for type implementations.  
-Similar to G_DEFINE_TYPE(), but allows to insert custom code into the 
+Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the 
 *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
 See G_DEFINE_TYPE_EXTENDED() for an example.
 </para>
@@ -1544,7 +1544,7 @@
 <!-- ##### MACRO G_DEFINE_ABSTRACT_TYPE_WITH_CODE ##### -->
 <para>
 A convenience macro for type implementations.
-Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows to 
+Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to 
 insert custom code into the *_get_type() function, e.g. interface implementations 
 via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
 </para>
@@ -1557,6 +1557,36 @@
 @Since: 2.4
 
 
+<!-- ##### MACRO G_DEFINE_INTERFACE ##### -->
+<para>
+A convenience macro for #GTypeInterface definitions, which declares an 
+interface initialization function and defines a *_get_type() function.
+</para>
+
+@TN: The name of the new type, in Camel case.
+@t_n: The name of the new type, in lowercase, with words 
+  separated by '_'.
+@T_P: The #GType of the prerequisite type for the interface
+@Since: 2.16
+
+
+<!-- ##### MACRO G_DEFINE_INTERFACE_WITH_CODE ##### -->
+<para>
+A convenience macro for #GTypeInterface definitions.  
+Similar to G_DEFINE_INTERFACE(), but allows you to insert custom code into the 
+*_get_type() function, e.g. additional interface implementations via
+G_IMPLEMENT_INTERFACE(), or additional prerequisite types.
+See G_DEFINE_TYPE_EXTENDED() for a similar example using
+G_DEFINE_TYPE_WITH_CODE().
+</para>
+
+@TN: The name of the new type, in Camel case.
+@t_n: The name of the new type in lowercase, with words separated by '_'.
+@T_P: The #GType of the prerequisite type for the interface
+@_C_: Custom code that gets inserted in the *_get_type() function.
+@Since: 2.16
+
+
 <!-- ##### MACRO G_IMPLEMENT_INTERFACE ##### -->
 <para>
 A convenience macro to ease interface addition in the @_C_ section
@@ -1584,7 +1614,7 @@
                         GTK_TYPE_WIDGET,
                         0, 
                         G_IMPLEMENT_INTERFACE (TYPE_GIZMO, 
-                                               gtk_gadget_gizmo_init));
+                                               gtk_gadget_gizmo_init))
 </programlisting>
 expands to
 <programlisting>
@@ -1600,29 +1630,27 @@
 GType
 gtk_gadget_get_type (void)
 {
-  static GType g_define_type_id = 0; 
-  if (G_UNLIKELY (g_define_type_id == 0)) 
-    { 
-      static const GTypeInfo g_define_type_info = { 
-        sizeof (GtkGadgetClass), 
-        (GBaseInitFunc) NULL, 
-        (GBaseFinalizeFunc) NULL, 
-        (GClassInitFunc) gtk_gadget_class_intern_init, 
-        (GClassFinalizeFunc) NULL, 
-        NULL,   /* class_data */ 
-        sizeof (GtkGadget), 
-        0,      /* n_preallocs */ 
-        (GInstanceInitFunc) gtk_gadget_init, 
-      }; 
-      g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", &amp;g_define_type_info, 0); 
+  static volatile gsize g_define_type_id__volatile = 0;
+  if (g_once_init_enter (&amp;g_define_type_id__volatile))
+    {
+      GType g_define_type_id = g_type_register_static_simple (GTK_TYPE_WIDGET,
+                                                              g_intern_static_string ("GtkGadget"),
+                                                              sizeof (GtkGadgetClass),
+                                                              (GClassInitFunc) gtk_gadget_class_intern_init,
+                                                              sizeof (GtkGadget),
+                                                              (GInstanceInitFunc) gtk_gadget_init,
+                                                              (GTypeFlags) 0);
+<!-- -->
       {
-        static const GInterfaceInfo g_implement_interface_info = {
-          (GInterfaceInitFunc) gtk_gadget_gizmo_init
+        const GInterfaceInfo g_implement_interface_info = {
+          (GInterfaceInitFunc) gtk_gadget_gizmo_init, NULL, NULL 
         };
         g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &amp;g_implement_interface_info);
-      } 
-    } 
-  return g_define_type_id; 
+      }
+<!-- -->
+      g_once_init_leave (&amp;g_define_type_id__volatile, g_define_type_id);
+    }
+  return g_define_type_id__volatile;
 }
 </programlisting>
 The only pieces which have to be manually provided are the definitions of the 
