return node.ctype
return node.gtype_name
+ def get_type_name(self, node):
+ if isinstance(node, ast.Array):
+ if node.array_type == ast.Array.C:
+ return str(node.element_type) + "[]"
+ else:
+ return "%s<%s>" % (node.array_type, str(node.element_type))
+ elif isinstance(node, ast.Map):
+ return "GHashTable<%s, %s>" % (str(node.key_type), str(node.value_type))
+ elif isinstance(node, ast.List):
+ return "GList<%s>" % str(node.element_type)
+ else:
+ return str(node)
+
def render_method(self, entity, link=False):
method = entity.get_ast()
self._writer.disable_whitespace()
prop = entity.get_ast()
prop_name = '"%s"' % prop.name
+ prop_type = self.get_type_name(prop.type)
flags = []
if prop.readable:
if prop.construct_only:
flags.append("Construct Only")
- self._render_prop_or_signal(prop_name, prop.type, flags)
+ self._render_prop_or_signal(prop_name, prop_type, flags)
def _render_prop_or_signal(self, name, type_, flags):
self._writer.disable_whitespace()
self._writer.pop_tag()
def _render_property(self, entity):
- pass
+ self._writer.write_line("Not implemented yet")
def _render_signal(self, entity):
- pass
+ self._writer.write_line("Not implemented yet")
def _render_page_object_hierarchy(self, page_node):
parent_chain = self._get_parent_chain(page_node)