We previously supported (type) on signals only, extend it to all cases.
This is useful for a few cases where libraries use a superclass like GtkWidget*
for C convenience, where the actual type is a subclass.
# We're only attempting to name the signal parameters if
# the number of parameter tags (@foo) is the same or greater
# than the number of signal parameters
+ resolve = self._transformer.resolve_param_type
if block and len(block.tags) > len(signal.parameters):
names = block.tags.items()
else:
options = getattr(tag, 'options', {})
param_type = options.get(OPT_TYPE)
if param_type:
- param.type.name = param_type.one()
+ param.type.name = resolve(param_type.one())
else:
tag = None
self._parse_param(signal, param, tag)
node.transfer = self._extract_transfer(parent, node, options)
if OPT_ALLOW_NONE in options:
node.allow_none = True
+ param_type = options.get(OPT_TYPE)
+ if param_type:
+ resolve = self._transformer.resolve_param_type
+ node.type.name = resolve(param_type.one())
assert node.transfer is not None
if tag is not None and tag.comment is not None:
</array>
</field>
</record>
+ <function name="get_source_file" c:identifier="annotation_get_source_file">
+ <return-value transfer-ownership="full" doc="Source file">
+ <type name="filename" c:type="char*"/>
+ </return-value>
+ </function>
<function name="init" c:identifier="annotation_init">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameter>
</parameters>
</function>
+ <function name="set_source_file" c:identifier="annotation_set_source_file">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter name="fname" transfer-ownership="none" doc="Source file">
+ <type name="filename" c:type="char*"/>
+ </parameter>
+ </parameters>
+ </function>
<function name="string_zero_terminated"
c:identifier="annotation_string_zero_terminated">
<return-value transfer-ownership="none" doc="The return value">
</array>
</field>
</record>
+ <function name="get_source_file" c:identifier="annotation_get_source_file">
+ <return-value transfer-ownership="full">
+ <type name="filename"/>
+ </return-value>
+ </function>
<function name="init" c:identifier="annotation_init">
<return-value transfer-ownership="none">
<type name="none"/>
</parameter>
</parameters>
</function>
+ <function name="set_source_file" c:identifier="annotation_set_source_file">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="fname" transfer-ownership="none">
+ <type name="filename"/>
+ </parameter>
+ </parameters>
+ </function>
<function name="string_zero_terminated" c:identifier="annotation_string_zero_terminated">
<return-value transfer-ownership="none">
<array zero-terminated="1">
{
}
+/**
+ * annotation_get_source_file:
+ *
+ * Return value: (type filename): Source file
+ */
+char *
+annotation_get_source_file (void)
+{
+}
+
+/**
+ * annotation_set_source_file:
+ * @fname: (type filename): Source file
+ *
+ */
+void
+annotation_set_source_file (const char *fname)
+{
+}
+
char backslash_parsing_tester_2 = '\\';
void annotation_object_extra_annos (AnnotationObject *object);
+char * annotation_get_source_file (void);
+void annotation_set_source_file (const char *fname);
+
/**
* AnnotationStruct:
*
<type name="int" c:type="int"/>
</return-value>
</function>
+ <function name="get_default"
+ c:identifier="foo_object_get_default"
+ doc="This function is intended to match clutter_stage_get_default which
+uses a C sugar return type.">
+ <return-value transfer-ownership="full" doc="The global #FooSubobject">
+ <type name="Subobject" c:type="FooObject*"/>
+ </return-value>
+ </function>
<virtual-method name="virtual_method" invoker="virtual_method">
<return-value transfer-ownership="none">
<type name="boolean" c:type="gboolean"/>
<type name="int"/>
</return-value>
</function>
+ <function name="get_default" c:identifier="foo_object_get_default">
+ <return-value transfer-ownership="full">
+ <type name="Subobject"/>
+ </return-value>
+ </function>
<method name="external_type" c:identifier="foo_object_external_type">
<return-value transfer-ownership="full">
<type name="utility.Object"/>
}
+/**
+ * foo_object_get_default:
+ *
+ * This function is intended to match clutter_stage_get_default which
+ * uses a C sugar return type.
+ *
+ * Return value: (type FooSubobject): The global #FooSubobject
+ */
+FooObject *
+foo_object_get_default ()
+{
+ return NULL;
+}
+
int foo_init (void)
{
return FOO_SUCCESS_INT;
GType foo_subobject_get_type (void) G_GNUC_CONST;
FooSubobject* foo_subobject_new ();
+FooObject * foo_object_get_default ();
+
GType foo_buffer_get_type (void);
void foo_buffer_some_method (FooBuffer *buffer);