# Create a new namespace with what we found
namespace = Namespace(namespace.name)
namespace.nodes = map(lambda x: x[1], self._names.aliases.itervalues())
- for (ns, x) in nodes:
+ for (ns, x) in self._names.names.itervalues():
namespace.nodes.append(x)
+ print "Scan complete."
return namespace
# Private
return None
# Constructors don't return basic types
if target_arg.type.name in type_names:
+ print "NOTE: Rejecting constructor returning basic: %r" \
+ % (func.symbol, )
return None
prefix = func.symbol[:new_idx]
break
# Enums can't have ctors or methods
if klass is None:
+ print "NOTE: No valid matching class for likely "+\
+ "method or constructor: %r" % (func.symbol, )
return
if not is_method:
# Interfaces can't have constructors, punt to global scope
if isinstance(klass, GLibInterface):
+ print "NOTE: Rejecting method or constructor for"+\
+ " interface type: %r" % (func.symbol, )
return None
# TODO - check that the return type is a subclass of the
# class from the prefix
<type name="GObject.Class" c:type="GObjectClass"/>
</field>
</record>
- <function name="do_foo" c:identifier="test_drawable_do_foo">
- <return-value>
- <type name="none" c:type="void"/>
- </return-value>
- <parameters>
- <parameter name="drawable">
- <type name="TestDrawable" c:type="TestDrawable*"/>
- </parameter>
- <parameter name="x">
- <type name="int" c:type="int"/>
- </parameter>
- </parameters>
- </function>
<record name="TestPixmapObjectClass" c:type="_TestPixmapObjectClass">
<field name="parent_class">
<type name="TestDrawableClass" c:type="TestDrawableClass"/>
<type name="int" c:type="gint"/>
</return-value>
</function>
- <function name="new" c:identifier="foo_object_new">
- <return-value>
- <type name="Object" c:type="FooObject*"/>
- </return-value>
- </function>
- <function name="external_type" c:identifier="foo_object_external_type">
- <return-value>
- <type name="utility.Object" c:type="UtilityObject*"/>
- </return-value>
- <parameters>
- <parameter name="object">
- <type name="Object" c:type="FooObject*"/>
- </parameter>
- </parameters>
- </function>
- <function name="various" c:identifier="foo_object_various">
- <return-value>
- <type name="none" c:type="void"/>
- </return-value>
- <parameters>
- <parameter name="object">
- <type name="Object" c:type="FooObject*"/>
- </parameter>
- <parameter name="data">
- <type name="any" c:type="void*"/>
- </parameter>
- <parameter name="some_type">
- <type name="GObject.Type" c:type="GType"/>
- </parameter>
- </parameters>
- </function>
- <function name="with_tdef" c:identifier="foo_object_with_tdef">
- <return-value>
- <type name="none" c:type="void"/>
- </return-value>
- <parameters>
- <parameter name="object">
- <type name="Object" c:type="FooObject*"/>
- </parameter>
- <parameter name="blah">
- <type name="List" c:type="FooList*"/>
- </parameter>
- </parameters>
- </function>
- <function name="new" c:identifier="foo_subobject_new">
- <return-value>
- <type name="Subobject" c:type="FooSubobject*"/>
- </return-value>
- </function>
<enumeration name="EnumType"
c:type="FooEnumType"
glib:type-name="FooEnumType"
</parameters>
</method>
</glib:boxed>
- <function name="new" c:identifier="foo_boxed_new">
- <return-value>
- <type name="Boxed" c:type="FooBoxed*"/>
- </return-value>
- </function>
- <function name="method" c:identifier="foo_boxed_method">
- <return-value>
- <type name="none" c:type="void"/>
- </return-value>
- <parameters>
- <parameter name="boxed">
- <type name="Boxed" c:type="FooBoxed*"/>
- </parameter>
- </parameters>
- </function>
<callback name="Callback" c:type="FooCallback">
<return-value>
<type name="boolean" c:type="gboolean"/>