## -*- coding: utf-8 -*- % for tag in metadata.tags: % if tag.description and tag.description.strip(): ${tag.description | x} % else: % endif % endfor % for typedef in metadata.types: % for (language, klass) in typedef.languages.iteritems(): ${klass | h} % endfor % endfor % for root in metadata.outer_namespaces: % for section in root.sections:
% if section.description is not None: ${section.description} % endif % for kind in section.kinds: # dynamic,static,controls <${kind.name}> <%def name="insert_body(node)"> % for nested in node.namespaces: ${insert_namespace(nested)} % endfor % for entry in node.entries: ${insert_entry(entry)} % endfor <%def name="insert_namespace(namespace)"> ${insert_body(namespace)} <%def name="insert_entry(prop)"> % if prop.is_clone(): % if prop.details is not None:
${prop.details}
% endif % if prop.ndk_details is not None: ${prop.ndk_details} % endif % if prop.hal_details is not None: ${prop.hal_details} % endif % for tag in prop.tags: % endfor
% else: % if prop.container == 'array': % for size in prop.container_sizes: ${size} % endfor % elif prop.container == 'tuple': % for size in prop.container_sizes: % endfor % endif % if prop.enum: % for value in prop.enum.values: % endfor % endif % if prop.description is not None: ${prop.description | x} % endif % if prop.deprecation_description is not None: ${prop.deprecation_description | x} % endif % if prop.units is not None: ${prop.units | x} % endif % if prop.range is not None: ${prop.range | x} % endif % if prop.details is not None:
${prop.details | x}
% endif % if prop.ndk_details is not None: ${prop.ndk_details} % endif % if prop.hal_details is not None: ${prop.hal_details | x} % endif % for tag in prop.tags: % endfor
% endif ${insert_body(kind)} % endfor # for each kind
% endfor
% endfor