callback_param.scope = ast.PARAM_SCOPE_NOTIFIED
callback_param.transfer = ast.PARAM_TRANSFER_NONE
elif (param.type.is_equiv(ast.TYPE_ANY) and
+ param.argname is not None and
param.argname.endswith('data')):
callback_param.closure_name = param.argname
<type name="none" c:type="void"/>
</return-value>
</virtual-method>
+ <virtual-method name="do_baz" invoker="do_baz" introspectable="0">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter transfer-ownership="none">
+ <type name="GObject.Callback" c:type="GCallback"/>
+ </parameter>
+ <parameter transfer-ownership="none">
+ <type name="gpointer" c:type="gpointer"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
<method name="do_bar" c:identifier="foo_sub_interface_do_bar">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
+ <method name="do_baz" c:identifier="foo_sub_interface_do_baz">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter name="callback"
+ transfer-ownership="none"
+ scope="call"
+ closure="1">
+ <type name="GObject.Callback" c:type="GCallback"/>
+ </parameter>
+ <parameter name="data" transfer-ownership="none">
+ <type name="gpointer" c:type="gpointer"/>
+ </parameter>
+ </parameters>
+ </method>
<glib:signal name="destroy-event">
<return-value transfer-ownership="none">
<type name="none"/>
</parameters>
</callback>
</field>
+ <field name="do_baz" introspectable="0">
+ <callback name="do_baz" introspectable="0">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter transfer-ownership="none">
+ <type name="SubInterface" c:type="FooSubInterface*"/>
+ </parameter>
+ <parameter transfer-ownership="none">
+ <type name="GObject.Callback" c:type="GCallback"/>
+ </parameter>
+ <parameter transfer-ownership="none">
+ <type name="gpointer" c:type="gpointer"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
</record>
<class name="Subobject"
c:symbol-prefix="subobject"
include $(top_srcdir)/common.mk
include $(top_srcdir)/Makefile.introspection
-INTROSPECTION_SCANNER_ARGS += --warn-all --warn-error
+INTROSPECTION_SCANNER_ARGS += --warn-all
# We need to build a shared library, which can be dlopened
# it does not work with noinst_LTLIBRARIES
FOO_SUBINTERFACE_GET_INTERFACE(self)->do_bar (self);
}
+/**
+ * foo_sub_interface_do_baz:
+ * @self:
+ * @callback: (scope call):
+ */
+void
+foo_sub_interface_do_baz (FooSubInterface *self, GCallback callback, gpointer user_data)
+{
+ FOO_SUBINTERFACE_GET_INTERFACE(self)->do_baz (self, callback, user_data);
+}
G_DEFINE_TYPE_EXTENDED (FooObject, foo_object, G_TYPE_OBJECT,
0, G_IMPLEMENT_INTERFACE (FOO_TYPE_INTERFACE,
/**
* foo_object_external_type:
* @object: a #FooObject
- *
+ *
* Returns: (transfer none): %NULL always
*/
UtilityObject*
/* virtual table */
void (*do_bar) (FooSubInterface *self);
+
+ void (*do_baz) (FooSubInterface *, GCallback, gpointer);
};
GType foo_sub_interface_get_type (void) G_GNUC_CONST;
void foo_sub_interface_do_bar (FooSubInterface *self);
+void foo_sub_interface_do_baz (FooSubInterface *self,
+ GCallback callback,
+ gpointer data);
struct _FooObject
{