From 21a8a702c46968d40cfc99a5b57f9801568eda21 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Sun, 14 Aug 2011 11:10:14 +0200 Subject: g-ir-doc-tool: Add -expected test for Python docbook --- giscanner/docbookwriter.py | 107 +- giscanner/docmain.py | 15 +- tests/doctool/GIRepository-2.0-C-expected.xml | 1781 ++++++++++++++++++++ tests/doctool/GIRepository-2.0-Python-expected.xml | 1781 ++++++++++++++++++++ tests/doctool/GIRepository-2.0-expected.xml | 1781 -------------------- tests/doctool/Makefile.am | 18 +- 6 files changed, 3649 insertions(+), 1834 deletions(-) create mode 100644 tests/doctool/GIRepository-2.0-C-expected.xml create mode 100644 tests/doctool/GIRepository-2.0-Python-expected.xml delete mode 100644 tests/doctool/GIRepository-2.0-expected.xml diff --git a/giscanner/docbookwriter.py b/giscanner/docbookwriter.py index 30b15ee9..882f6dd7 100644 --- a/giscanner/docbookwriter.py +++ b/giscanner/docbookwriter.py @@ -38,12 +38,15 @@ def _space(num): return " " * num class DocBookFormatter(object): - def __init__(self, writer): - self._namespace = None - self._writer = writer + def __init__(self): + self.namespace = None + self.writer = None def set_namespace(self, namespace): - self._namespace = namespace + self.namespace = namespace + + def set_writer(self, writer): + self.writer = writer def get_type_string(self, type): return str(type.ctype) @@ -52,17 +55,17 @@ class DocBookFormatter(object): return "%s %s" % (param_type, param_name) def _render_parameter(self, param, extra_content=''): - with self._writer.tagcontext("parameter"): + with self.writer.tagcontext("parameter"): if param.type.ctype is not None: link_dest = param.type.ctype.replace("*", "") else: link_dest = param.type.ctype - with self._writer.tagcontext("link", [("linkend", "%s" % link_dest)]): - self._writer.write_tag("type", [], link_dest) - self._writer.write_line(extra_content) + with self.writer.tagcontext("link", [("linkend", "%s" % link_dest)]): + self.writer.write_tag("type", [], link_dest) + self.writer.write_line(extra_content) def _render_parameters(self, parent, parameters): - self._writer.write_line( + self.writer.write_line( "%s(" % _space(40 - len(parent.symbol))) parent_class = parent.parent_class @@ -74,7 +77,7 @@ class DocBookFormatter(object): first_param = True for param in params: if not first_param: - self._writer.write_line("\n%s" % _space(61)) + self.writer.write_line("\n%s" % _space(61)) else: first_param = False @@ -84,8 +87,8 @@ class DocBookFormatter(object): comma = "" if isinstance(param.type, ast.Varargs): - with self._writer.tagcontext("parameter"): - self._writer.write_line('...%s' % comma) + with self.writer.tagcontext("parameter"): + self.writer.write_line('...%s' % comma) else: extra_content = " " if param.type.ctype is not None and '*' in param.type.ctype: @@ -94,16 +97,14 @@ class DocBookFormatter(object): extra_content += comma self._render_parameter(param, extra_content) - self._writer.write_line(");\n") + self.writer.write_line(");\n") def get_method_as_title(self, entity): method = entity.get_ast() return "%s ()" % method.symbol def get_page_name(self, node): - if isinstance(node, ast.Alias) or node.gtype_name is None: - return node.ctype - return node.gtype_name + pass def get_class_name(self, node): if node.gtype_name is None: @@ -125,7 +126,7 @@ class DocBookFormatter(object): def render_method(self, entity, link=False): method = entity.get_ast() - self._writer.disable_whitespace() + self.writer.disable_whitespace() retval_type = method.retval.type if retval_type.ctype: @@ -135,28 +136,28 @@ class DocBookFormatter(object): if retval_type.target_giname: ns = retval_type.target_giname.split('.') - if ns[0] == self._namespace.name: + if ns[0] == self.namespace.name: link_dest = "%s" % ( retval_type.ctype.replace("*", "")) - with self._writer.tagcontext("link", [("linkend", link_dest)]): - self._writer.write_tag("returnvalue", [], link_dest) + with self.writer.tagcontext("link", [("linkend", link_dest)]): + self.writer.write_tag("returnvalue", [], link_dest) if '*' in retval_type.ctype: - self._writer.write_line(' *') + self.writer.write_line(' *') - self._writer.write_line( + self.writer.write_line( _space(20 - len(self.get_type_string(method.retval.type)))) if link: - self._writer.write_tag("link", [("linkend", + self.writer.write_tag("link", [("linkend", method.symbol.replace("_", "-"))], method.symbol) else: - self._writer.write_line(method.symbol) + self.writer.write_line(method.symbol) self._render_parameters(method, method.parameters) - self._writer.enable_whitespace() + self.writer.enable_whitespace() def _get_annotations(self, argument): annotations = {} @@ -189,31 +190,31 @@ class DocBookFormatter(object): self._get_annotations(method.retval)) def _render_param(self, argname, doc, annotations): - with self._writer.tagcontext('varlistentry'): - with self._writer.tagcontext('term'): - self._writer.disable_whitespace() + with self.writer.tagcontext('varlistentry'): + with self.writer.tagcontext('term'): + self.writer.disable_whitespace() try: - with self._writer.tagcontext('parameter'): - self._writer.write_line(argname) + with self.writer.tagcontext('parameter'): + self.writer.write_line(argname) if doc is not None: - self._writer.write_line(' :') + self.writer.write_line(' :') finally: - self._writer.enable_whitespace() + self.writer.enable_whitespace() if doc is not None: - with self._writer.tagcontext('listitem'): - with self._writer.tagcontext('simpara'): - self._writer.write_line(doc) + with self.writer.tagcontext('listitem'): + with self.writer.tagcontext('simpara'): + self.writer.write_line(doc) if annotations: - with self._writer.tagcontext('emphasis', [('role', 'annotation')]): + with self.writer.tagcontext('emphasis', [('role', 'annotation')]): for key, value in annotations.iteritems(): - self._writer.disable_whitespace() + self.writer.disable_whitespace() try: - self._writer.write_line('[%s' % key) + self.writer.write_line('[%s' % key) if value is not None: - self._writer.write_line(' %s' % value) - self._writer.write_line(']') + self.writer.write_line(' %s' % value) + self.writer.write_line(']') finally: - self._writer.enable_whitespace() + self.writer.enable_whitespace() def render_property(self, entity, link=False): prop = entity.get_ast() @@ -233,15 +234,15 @@ class DocBookFormatter(object): 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.disable_whitespace() line = _space(2) + name + _space(27 - len(name)) line += str(type_) + _space(22 - len(str(type_))) line += ": " + " / ".join(flags) - self._writer.write_line(line + "\n") + self.writer.write_line(line + "\n") - self._writer.enable_whitespace() + self.writer.enable_whitespace() def render_signal(self, entity, link=False): @@ -252,6 +253,18 @@ class DocBookFormatter(object): self._render_prop_or_signal(sig_name, "", flags) +class DocBookFormatterPython(DocBookFormatter): + def get_page_name(self, node): + return node.name + + +class DocBookFormatterC(DocBookFormatter): + def get_page_name(self, node): + if isinstance(node, ast.Alias) or node.gtype_name is None: + return node.ctype + return node.gtype_name + + class DocBookPage(object): def __init__(self, name, ast): self.methods = [] @@ -297,12 +310,14 @@ class DocBookEntity(object): class DocBookWriter(object): - def __init__(self): + def __init__(self, formatter): self._namespace = None self._pages = [] self._writer = XMLWriter() - self._formatter = DocBookFormatter(self._writer) + + formatter.set_writer(self._writer) + self._formatter = formatter def _add_page(self, page): self._pages.append(page) diff --git a/giscanner/docmain.py b/giscanner/docmain.py index 29b5ddfb..3bffaefe 100644 --- a/giscanner/docmain.py +++ b/giscanner/docmain.py @@ -21,6 +21,8 @@ import optparse from .docbookwriter import DocBookWriter +from .docbookwriter import DocBookFormatterC +from .docbookwriter import DocBookFormatterPython from .transformer import Transformer class GIDocGenerator(object): @@ -42,6 +44,10 @@ def doc_main(args): action="store", dest="format", default="docbook", help="Output format") + parser.add_option("-l", "--language", + action="store", dest="language", + default="Python", + help="Output language") options, args = parser.parse_args(args) if not options.output: @@ -50,8 +56,15 @@ def doc_main(args): if len(args) < 2: raise SystemExit("Need an input GIR filename") + if options.language == "Python": + formatter = DocBookFormatterPython() + elif options.language == "C": + formatter = DocBookFormatterC() + else: + raise SystemExit("Unsupported language: %s" % (options.language, )) + if options.format == "docbook": - writer = DocBookWriter() + writer = DocBookWriter(formatter) else: raise SystemExit("Unsupported output format: %s" % (options.format, )) diff --git a/tests/doctool/GIRepository-2.0-C-expected.xml b/tests/doctool/GIRepository-2.0-C-expected.xml new file mode 100644 index 00000000..b4755860 --- /dev/null +++ b/tests/doctool/GIRepository-2.0-C-expected.xml @@ -0,0 +1,1781 @@ + + + +]> + + GIRepository Documentation + + GIArgInfo + + Synopsis + +struct GIArgInfo; + + + + Details + + GIArgInfo + + GIArgInfo + + typedef GIBaseInfo GIArgInfo + Represents an argument. + + + + + GICallableInfo + + Synopsis + +struct GICallableInfo; + + + + Details + + GICallableInfo + + GICallableInfo + + typedef GIBaseInfo GICallableInfo + Represents a callable, either #GIFunctionInfo, #GICallbackInfo or +#GIVFuncInfo. + + + + + GICallbackInfo + + Synopsis + +struct GICallbackInfo; + + + + Details + + GICallbackInfo + + GICallbackInfo + + typedef GIBaseInfo GICallbackInfo + Represents a callback, eg arguments and return value. + + + + + GIConstantInfo + + Synopsis + +struct GIConstantInfo; + + + + Details + + GIConstantInfo + + GIConstantInfo + + typedef GIBaseInfo GIConstantInfo + Represents a constant. + + + + + GIEnumInfo + + Synopsis + +struct GIEnumInfo; + + + + Details + + GIEnumInfo + + GIEnumInfo + + typedef GIBaseInfo GIEnumInfo + Represents an enum or a flag. + + + + + GIErrorDomainInfo + + Synopsis + +struct GIErrorDomainInfo; + + + + Details + + GIErrorDomainInfo + + GIErrorDomainInfo + + typedef GIBaseInfo GIErrorDomainInfo + Represents a #GError error domain. + + + + + GIFieldInfo + + Synopsis + +struct GIFieldInfo; + + + + Details + + GIFieldInfo + + GIFieldInfo + + typedef GIBaseInfo GIFieldInfo + Represents a field of a #GIStructInfo or a #GIUnionInfo. + + + + + GIFunctionInfo + + Synopsis + +struct GIFunctionInfo; + + + + Details + + GIFunctionInfo + + GIFunctionInfo + + typedef GIBaseInfo GIFunctionInfo + Represents a function, eg arguments and return value. + + + + + GIInterfaceInfo + + Synopsis + +struct GIInterfaceInfo; + + + + Details + + GIInterfaceInfo + + GIInterfaceInfo + + typedef GIBaseInfo GIInterfaceInfo + Represents an interface. + + + + + GIObjectInfo + + Synopsis + +struct GIObjectInfo; + + + + Details + + GIObjectInfo + + GIObjectInfo + + typedef GIBaseInfo GIObjectInfo + Represents an object. + + + + + GIPropertyInfo + + Synopsis + +struct GIPropertyInfo; + + + + Details + + GIPropertyInfo + + GIPropertyInfo + + typedef GIBaseInfo GIPropertyInfo + Represents a property of a #GIObjectInfo or a #GIInterfaceInfo. + + + + + GIRegisteredTypeInfo + + Synopsis + +struct GIRegisteredTypeInfo; + + + + Details + + GIRegisteredTypeInfo + + GIRegisteredTypeInfo + + typedef GIBaseInfo GIRegisteredTypeInfo + Represent a registered type. + + + + + GISignalInfo + + Synopsis + +struct GISignalInfo; + + + + Details + + GISignalInfo + + GISignalInfo + + typedef GIBaseInfo GISignalInfo + Represents a signal. + + + + + GIStructInfo + + Synopsis + +struct GIStructInfo; + + + + Details + + GIStructInfo + + GIStructInfo + + typedef GIBaseInfo GIStructInfo + Represents a struct. + + + + + GITypeInfo + + Synopsis + +struct GITypeInfo; + + + + Details + + GITypeInfo + + GITypeInfo + + typedef GIBaseInfo GITypeInfo + Represents type information, direction, transfer etc. + + + + + GIUnionInfo + + Synopsis + +struct GIUnionInfo; + + + + Details + + GIUnionInfo + + GIUnionInfo + + typedef GIBaseInfo GIUnionInfo + Represents a union. + + + + + GIVFuncInfo + + Synopsis + +struct GIVFuncInfo; + + + + Details + + GIVFuncInfo + + GIVFuncInfo + + typedef GIBaseInfo GIVFuncInfo + Represents a virtual function. + + + + + GIValueInfo + + Synopsis + +struct GIValueInfo; + + + + Details + + GIValueInfo + + GIValueInfo + + typedef GIBaseInfo GIValueInfo + Represents a enum value of a #GIEnumInfo. + + + + + GIAttributeIter + + Synopsis + + +struct GIAttributeIter; + + + + Details + + struct GIAttributeIter + + GIAttributeIter + + struct GIAttributeIter; + + + + + GIBaseInfo + + Synopsis + + +struct GIBaseInfo; +gboolean g_base_info_equal (GIBaseInfo *baseinfo, + GIBaseInfo *info2); +gchar * g_base_info_get_attribute (GIBaseInfo *baseinfo, + gchar *name); +GIBaseInfo * g_base_info_get_container (GIBaseInfo *baseinfo); +gchar * g_base_info_get_name (GIBaseInfo *baseinfo); +gchar * g_base_info_get_namespace (GIBaseInfo *baseinfo); +GITypelib * g_base_info_get_typelib (GIBaseInfo *baseinfo); +gboolean g_base_info_is_deprecated (GIBaseInfo *baseinfo); +gboolean g_base_info_iterate_attributes (GIBaseInfo *baseinfo, + GIAttributeIter *iterator, + char *name, + char *value); +GIBaseInfo * g_base_info_ref (GIBaseInfo *baseinfo); +void g_base_info_unref (GIBaseInfo *baseinfo); + + + + Details + + struct GIBaseInfo + + GIBaseInfo + + struct GIBaseInfo; + + + g_base_info_equal () + + equal + + +gboolean g_base_info_equal (GIBaseInfo *baseinfo, + GIBaseInfo *info2); + + Compare two #GIBaseInfo. +Using pointer comparison is not practical since many functions return +different instances of #GIBaseInfo that refers to the same part of the +TypeLib; use this function instead to do #GIBaseInfo comparisons. + + + +baseinfo : + + + instance + + + + + +info2 : + + + a #GIBaseInfo + + + + + +Returns : + + + %TRUE if and only if @info1 equals @info2. + + + + + + + g_base_info_get_attribute () + + get_attribute + + +gchar * g_base_info_get_attribute (GIBaseInfo *baseinfo, + gchar *name); + + Retrieve an arbitrary attribute associated with this node. + + + +baseinfo : + + + instance + + + + + +name : + + + a freeform string naming an attribute + + + + + +Returns : + + + The value of the attribute, or %NULL if no such attribute exists + + + + + + + g_base_info_get_container () + + get_container + + +GIBaseInfo * g_base_info_get_container (GIBaseInfo *baseinfo); + + Obtain the container of the @info. The container is the parent +GIBaseInfo. For instance, the parent of a #GIFunctionInfo is an +#GIObjectInfo or #GIInterfaceInfo. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the container + + + + + + + g_base_info_get_name () + + get_name + + +gchar * g_base_info_get_name (GIBaseInfo *baseinfo); + + Obtain the name of the @info. What the name represents depends on +the #GIInfoType of the @info. For instance for #GIFunctionInfo it is +the name of the function. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the name of @info or %NULL if it lacks a name. + + + + + + + g_base_info_get_namespace () + + get_namespace + + +gchar * g_base_info_get_namespace (GIBaseInfo *baseinfo); + + Obtain the namespace of @info. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the namespace + + + + + + + g_base_info_get_typelib () + + get_typelib + + +GITypelib * g_base_info_get_typelib (GIBaseInfo *baseinfo); + + Obtain the typelib this @info belongs to + + + +baseinfo : + + + instance + + + + + +Returns : + + + the typelib. + + + + + + + g_base_info_is_deprecated () + + is_deprecated + + +gboolean g_base_info_is_deprecated (GIBaseInfo *baseinfo); + + Obtain whether the @info is represents a metadata which is +deprecated or not. + + + +baseinfo : + + + instance + + + + + +Returns : + + + %TRUE if deprecated + + + + + + + g_base_info_iterate_attributes () + + iterate_attributes + + +gboolean g_base_info_iterate_attributes (GIBaseInfo *baseinfo, + GIAttributeIter *iterator, + char *name, + char *value); + + Iterate over all attributes associated with this node. The iterator +structure is typically stack allocated, and must have its first +member initialized to %NULL. +Both the @name and @value should be treated as constants +and must not be freed. +<example> +<title>Iterating over attributes</title> +<programlisting> +void +print_attributes (GIBaseInfo *info) +{ +GIAttributeIter iter = { 0, }; +char *name; +char *value; +while (g_base_info_iterate_attributes (info, &iter, &name, &value)) +{ +} +} +</programlisting> +</example> + + + +baseinfo : + + + instance + + + + + +iterator : + + + a #GIAttributeIter structure, must be initialized; see below + + + + + +name : + + + Returned name, must not be freed + + + + + +value : + + + Returned name, must not be freed + + + + + +Returns : + + + %TRUE if there are more attributes + + + + + + + g_base_info_ref () + + ref + + +GIBaseInfo * g_base_info_ref (GIBaseInfo *baseinfo); + + Increases the reference count of @info. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the same @info. + +[transfer full] + + + + + + + g_base_info_unref () + + unref + + +void g_base_info_unref (GIBaseInfo *baseinfo); + + Decreases the reference count of @info. When its reference count +drops to 0, the info is freed. + + + +baseinfo : + + + instance + + + + + +Returns + + + + + + + GIRepository + + Synopsis + + +struct GIRepository; +GList * g_irepository_enumerate_versions (GIRepository *repository, + gchar *namespace_); +GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository, + GType gtype); +GIBaseInfo * g_irepository_find_by_name (GIRepository *repository, + gchar *namespace_, + gchar *name); +gchar * g_irepository_get_c_prefix (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_dependencies (GIRepository *repository, + gchar *namespace_); +GIBaseInfo * g_irepository_get_info (GIRepository *repository, + gchar *namespace_, + gint index); +gchar * g_irepository_get_loaded_namespaces (GIRepository *repository); +gint g_irepository_get_n_infos (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_shared_library (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_typelib_path (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_version (GIRepository *repository, + gchar *namespace_); +gboolean g_irepository_is_registered (GIRepository *repository, + gchar *namespace_, + gchar *version); +char * g_irepository_load_typelib (GIRepository *repository, + GITypelib *typelib, + GIRepositoryLoadFlags flags); +GITypelib * g_irepository_require (GIRepository *repository, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); +GITypelib * g_irepository_require_private (GIRepository *repository, + gchar *typelib_dir, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); + + + + Object Hierarchy + + GObject + +----GIRepository + + + Details + + struct GIRepository + + GIRepository + + struct GIRepository; + + + g_irepository_enumerate_versions () + + enumerate_versions + + +GList * g_irepository_enumerate_versions (GIRepository *repository, + gchar *namespace_); + + Obtain an unordered list of versions (either currently loaded or +available) for @namespace_ in this @repository. + + + +repository : + + + instance + + + + + +namespace_ : + + + GI namespace, e.g. "Gtk" + + + + + +Returns : + + + the array of versions. + +[element-type utf8][transfer full] + + + + + + + g_irepository_find_by_gtype () + + find_by_gtype + + +GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository, + GType gtype); + + Searches all loaded namespaces for a particular #GType. Note that +in order to locate the metadata, the namespace corresponding to +the type must first have been loaded. There is currently no +mechanism for determining the namespace which corresponds to an +arbitrary GType - thus, this function will operate most reliably +when you know the GType to originate from be from a loaded namespace. + + + +repository : + + + instance + + + + + +gtype : + + + GType to search for + + + + + +Returns : + + + #GIBaseInfo representing metadata about @type, or %NULL + +[transfer full] + + + + + + + g_irepository_find_by_name () + + find_by_name + + +GIBaseInfo * g_irepository_find_by_name (GIRepository *repository, + gchar *namespace_, + gchar *name); + + Searches for a particular entry in a namespace. Before calling +this function for a particular namespace, you must call +#g_irepository_require once to load the namespace, or otherwise +ensure the namespace has already been loaded. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace which will be searched + + + + + +name : + + + Entry name to find + + + + + +Returns : + + + #GIBaseInfo representing metadata about @name, or %NULL + +[transfer full] + + + + + + + g_irepository_get_c_prefix () + + get_c_prefix + + +gchar * g_irepository_get_c_prefix (GIRepository *repository, + gchar *namespace_); + + This function returns the "C prefix", or the C level namespace +associated with the given introspection namespace. Each C symbol +starts with this prefix, as well each #GType in the library. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + C namespace prefix, or %NULL if none associated + + + + + + + g_irepository_get_dependencies () + + get_dependencies + + +gchar * g_irepository_get_dependencies (GIRepository *repository, + gchar *namespace_); + + Return an array of all (transitive) dependencies for namespace +form <code>namespace-version</code>. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace of interest + + + + + +Returns : + + + Zero-terminated string array of versioned dependencies + +[element-type utf8][transfer full] + + + + + + + g_irepository_get_info () + + get_info + + +GIBaseInfo * g_irepository_get_info (GIRepository *repository, + gchar *namespace_, + gint index); + + This function returns a particular metadata entry in the +given namespace @namespace_. The namespace must have +already been loaded before calling this function. +See g_irepository_get_n_infos() to find the maximum number of +entries. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +index : + + + 0-based offset into namespace metadata for entry + + + + + +Returns : + + + #GIBaseInfo containing metadata + +[transfer full] + + + + + + + g_irepository_get_loaded_namespaces () + + get_loaded_namespaces + + +gchar * g_irepository_get_loaded_namespaces (GIRepository *repository); + + Return the list of currently loaded namespaces. + + + +repository : + + + instance + + + + + +Returns : + + + List of namespaces + +[element-type utf8][transfer full] + + + + + + + g_irepository_get_n_infos () + + get_n_infos + + +gint g_irepository_get_n_infos (GIRepository *repository, + gchar *namespace_); + + This function returns the number of metadata entries in +given namespace @namespace_. The namespace must have +already been loaded before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + number of metadata entries + + + + + + + g_irepository_get_shared_library () + + get_shared_library + + +gchar * g_irepository_get_shared_library (GIRepository *repository, + gchar *namespace_); + + This function returns the full path to the shared C library +associated with the given namespace @namespace_. There may be no +shared library path associated, in which case this function will +return %NULL. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + Full path to shared library, or %NULL if none associated + + + + + + + g_irepository_get_typelib_path () + + get_typelib_path + + +gchar * g_irepository_get_typelib_path (GIRepository *repository, + gchar *namespace_); + + If namespace @namespace_ is loaded, return the full path to the +.typelib file it was loaded from. If the typelib for +namespace @namespace_ was included in a shared library, return +the special string "$lt;builtin$gt;". + + + +repository : + + + instance + + + + + +namespace_ : + + + GI namespace to use, e.g. "Gtk" + + + + + +Returns : + + + Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded + + + + + + + g_irepository_get_version () + + get_version + + +gchar * g_irepository_get_version (GIRepository *repository, + gchar *namespace_); + + This function returns the loaded version associated with the given +namespace @namespace_. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + Loaded version + + + + + + + g_irepository_is_registered () + + is_registered + + +gboolean g_irepository_is_registered (GIRepository *repository, + gchar *namespace_, + gchar *version); + + Check whether a particular namespace (and optionally, a specific +version thereof) is currently loaded. This function is likely to +only be useful in unusual circumstances; in order to act upon +metadata in the namespace, you should call #g_irepository_require +instead which will ensure the namespace is loaded, and return as +quickly as this function will if it has already been loaded. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace of interest + + + + + +version : + + + Required version, may be %NULL for latest + +[allow-none] + + + + + +Returns : + + + %TRUE if namespace-version is loaded, %FALSE otherwise + + + + + + + g_irepository_load_typelib () + + load_typelib + + +char * g_irepository_load_typelib (GIRepository *repository, + GITypelib *typelib, + GIRepositoryLoadFlags flags); + + + + + +repository : + + + instance + + + + + +typelib + + + +flags + + + +Returns + + + + + g_irepository_require () + + require + + +GITypelib * g_irepository_require (GIRepository *repository, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); + + Force the namespace @namespace_ to be loaded if it isn't already. +If @namespace_ is not loaded, this function will search for a +".typelib" file using the repository search path. In addition, a +version @version of namespace may be specified. If @version is +not specified, the latest will be used. + + + +repository : + + + instance + + + + + +namespace_ : + + + GI namespace to use, e.g. "Gtk" + + + + + +version : + + + Version of namespace, may be %NULL for latest + +[allow-none] + + + + + +flags : + + + Set of %GIRepositoryLoadFlags, may be 0 + + + + + +Returns : + + + a pointer to the #GITypelib if successful, %NULL otherwise + + + + + + + g_irepository_require_private () + + require_private + + +GITypelib * g_irepository_require_private (GIRepository *repository, + gchar *typelib_dir, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); + + Force the namespace @namespace_ to be loaded if it isn't already. +If @namespace_ is not loaded, this function will search for a +".typelib" file within the private directory only. In addition, a +version @version of namespace should be specified. If @version is +not specified, the latest will be used. + + + +repository : + + + instance + + + + + +typelib_dir : + + + Private directory where to find the requested typelib + + + + + +namespace_ : + + + GI namespace to use, e.g. "Gtk" + + + + + +version : + + + Version of namespace, may be %NULL for latest + +[allow-none] + + + + + +flags : + + + Set of %GIRepositoryLoadFlags, may be 0 + + + + + +Returns : + + + a pointer to the #GITypelib if successful, %NULL otherwise + + + + + + + + + GIRepositoryClass + + Synopsis + + +struct GIRepositoryClass; + + + + Details + + struct GIRepositoryClass + + GIRepositoryClass + + struct GIRepositoryClass; + + + + + GIRepositoryPrivate + + Synopsis + + +struct GIRepositoryPrivate; + + + + Details + + struct GIRepositoryPrivate + + GIRepositoryPrivate + + struct GIRepositoryPrivate; + + + + + GITypelib + + Synopsis + + +struct GITypelib; +void g_typelib_free (GITypelib *typelib); +gchar * g_typelib_get_namespace (GITypelib *typelib); +gboolean g_typelib_symbol (GITypelib *typelib, + gchar *symbol_name, + gpointer *symbol); + + + + Details + + struct GITypelib + + GITypelib + + struct GITypelib; + + + g_typelib_free () + + free + + +void g_typelib_free (GITypelib *typelib); + + + + + +typelib : + + + instance + + + + + +Returns + + + + + g_typelib_get_namespace () + + get_namespace + + +gchar * g_typelib_get_namespace (GITypelib *typelib); + + + + + +typelib : + + + instance + + + + + +Returns + + + + + g_typelib_symbol () + + symbol + + +gboolean g_typelib_symbol (GITypelib *typelib, + gchar *symbol_name, + gpointer *symbol); + + + + + +typelib : + + + instance + + + + + +symbol_name + + + +symbol + + + +Returns + + + + + + + GIUnresolvedInfo + + Synopsis + + +struct GIUnresolvedInfo; + + + + Details + + struct GIUnresolvedInfo + + GIUnresolvedInfo + + struct GIUnresolvedInfo; + + + + + _GIBaseInfoStub + + Synopsis + + +struct _GIBaseInfoStub; + + + + Details + + struct _GIBaseInfoStub + + _GIBaseInfoStub + + struct _GIBaseInfoStub; + + + + diff --git a/tests/doctool/GIRepository-2.0-Python-expected.xml b/tests/doctool/GIRepository-2.0-Python-expected.xml new file mode 100644 index 00000000..7d24f2ab --- /dev/null +++ b/tests/doctool/GIRepository-2.0-Python-expected.xml @@ -0,0 +1,1781 @@ + + + +]> + + GIRepository Documentation + + ArgInfo + + Synopsis + +struct ArgInfo; + + + + Details + + GIArgInfo + + GIArgInfo + + typedef GIBaseInfo GIArgInfo + Represents an argument. + + + + + CallableInfo + + Synopsis + +struct CallableInfo; + + + + Details + + GICallableInfo + + GICallableInfo + + typedef GIBaseInfo GICallableInfo + Represents a callable, either #GIFunctionInfo, #GICallbackInfo or +#GIVFuncInfo. + + + + + CallbackInfo + + Synopsis + +struct CallbackInfo; + + + + Details + + GICallbackInfo + + GICallbackInfo + + typedef GIBaseInfo GICallbackInfo + Represents a callback, eg arguments and return value. + + + + + ConstantInfo + + Synopsis + +struct ConstantInfo; + + + + Details + + GIConstantInfo + + GIConstantInfo + + typedef GIBaseInfo GIConstantInfo + Represents a constant. + + + + + EnumInfo + + Synopsis + +struct EnumInfo; + + + + Details + + GIEnumInfo + + GIEnumInfo + + typedef GIBaseInfo GIEnumInfo + Represents an enum or a flag. + + + + + ErrorDomainInfo + + Synopsis + +struct ErrorDomainInfo; + + + + Details + + GIErrorDomainInfo + + GIErrorDomainInfo + + typedef GIBaseInfo GIErrorDomainInfo + Represents a #GError error domain. + + + + + FieldInfo + + Synopsis + +struct FieldInfo; + + + + Details + + GIFieldInfo + + GIFieldInfo + + typedef GIBaseInfo GIFieldInfo + Represents a field of a #GIStructInfo or a #GIUnionInfo. + + + + + FunctionInfo + + Synopsis + +struct FunctionInfo; + + + + Details + + GIFunctionInfo + + GIFunctionInfo + + typedef GIBaseInfo GIFunctionInfo + Represents a function, eg arguments and return value. + + + + + InterfaceInfo + + Synopsis + +struct InterfaceInfo; + + + + Details + + GIInterfaceInfo + + GIInterfaceInfo + + typedef GIBaseInfo GIInterfaceInfo + Represents an interface. + + + + + ObjectInfo + + Synopsis + +struct ObjectInfo; + + + + Details + + GIObjectInfo + + GIObjectInfo + + typedef GIBaseInfo GIObjectInfo + Represents an object. + + + + + PropertyInfo + + Synopsis + +struct PropertyInfo; + + + + Details + + GIPropertyInfo + + GIPropertyInfo + + typedef GIBaseInfo GIPropertyInfo + Represents a property of a #GIObjectInfo or a #GIInterfaceInfo. + + + + + RegisteredTypeInfo + + Synopsis + +struct RegisteredTypeInfo; + + + + Details + + GIRegisteredTypeInfo + + GIRegisteredTypeInfo + + typedef GIBaseInfo GIRegisteredTypeInfo + Represent a registered type. + + + + + SignalInfo + + Synopsis + +struct SignalInfo; + + + + Details + + GISignalInfo + + GISignalInfo + + typedef GIBaseInfo GISignalInfo + Represents a signal. + + + + + StructInfo + + Synopsis + +struct StructInfo; + + + + Details + + GIStructInfo + + GIStructInfo + + typedef GIBaseInfo GIStructInfo + Represents a struct. + + + + + TypeInfo + + Synopsis + +struct TypeInfo; + + + + Details + + GITypeInfo + + GITypeInfo + + typedef GIBaseInfo GITypeInfo + Represents type information, direction, transfer etc. + + + + + UnionInfo + + Synopsis + +struct UnionInfo; + + + + Details + + GIUnionInfo + + GIUnionInfo + + typedef GIBaseInfo GIUnionInfo + Represents a union. + + + + + VFuncInfo + + Synopsis + +struct VFuncInfo; + + + + Details + + GIVFuncInfo + + GIVFuncInfo + + typedef GIBaseInfo GIVFuncInfo + Represents a virtual function. + + + + + ValueInfo + + Synopsis + +struct ValueInfo; + + + + Details + + GIValueInfo + + GIValueInfo + + typedef GIBaseInfo GIValueInfo + Represents a enum value of a #GIEnumInfo. + + + + + AttributeIter + + Synopsis + + +struct AttributeIter; + + + + Details + + struct GIAttributeIter + + GIAttributeIter + + struct GIAttributeIter; + + + + + BaseInfo + + Synopsis + + +struct BaseInfo; +gboolean g_base_info_equal (GIBaseInfo *baseinfo, + GIBaseInfo *info2); +gchar * g_base_info_get_attribute (GIBaseInfo *baseinfo, + gchar *name); +GIBaseInfo * g_base_info_get_container (GIBaseInfo *baseinfo); +gchar * g_base_info_get_name (GIBaseInfo *baseinfo); +gchar * g_base_info_get_namespace (GIBaseInfo *baseinfo); +GITypelib * g_base_info_get_typelib (GIBaseInfo *baseinfo); +gboolean g_base_info_is_deprecated (GIBaseInfo *baseinfo); +gboolean g_base_info_iterate_attributes (GIBaseInfo *baseinfo, + GIAttributeIter *iterator, + char *name, + char *value); +GIBaseInfo * g_base_info_ref (GIBaseInfo *baseinfo); +void g_base_info_unref (GIBaseInfo *baseinfo); + + + + Details + + struct GIBaseInfo + + GIBaseInfo + + struct GIBaseInfo; + + + g_base_info_equal () + + equal + + +gboolean g_base_info_equal (GIBaseInfo *baseinfo, + GIBaseInfo *info2); + + Compare two #GIBaseInfo. +Using pointer comparison is not practical since many functions return +different instances of #GIBaseInfo that refers to the same part of the +TypeLib; use this function instead to do #GIBaseInfo comparisons. + + + +baseinfo : + + + instance + + + + + +info2 : + + + a #GIBaseInfo + + + + + +Returns : + + + %TRUE if and only if @info1 equals @info2. + + + + + + + g_base_info_get_attribute () + + get_attribute + + +gchar * g_base_info_get_attribute (GIBaseInfo *baseinfo, + gchar *name); + + Retrieve an arbitrary attribute associated with this node. + + + +baseinfo : + + + instance + + + + + +name : + + + a freeform string naming an attribute + + + + + +Returns : + + + The value of the attribute, or %NULL if no such attribute exists + + + + + + + g_base_info_get_container () + + get_container + + +GIBaseInfo * g_base_info_get_container (GIBaseInfo *baseinfo); + + Obtain the container of the @info. The container is the parent +GIBaseInfo. For instance, the parent of a #GIFunctionInfo is an +#GIObjectInfo or #GIInterfaceInfo. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the container + + + + + + + g_base_info_get_name () + + get_name + + +gchar * g_base_info_get_name (GIBaseInfo *baseinfo); + + Obtain the name of the @info. What the name represents depends on +the #GIInfoType of the @info. For instance for #GIFunctionInfo it is +the name of the function. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the name of @info or %NULL if it lacks a name. + + + + + + + g_base_info_get_namespace () + + get_namespace + + +gchar * g_base_info_get_namespace (GIBaseInfo *baseinfo); + + Obtain the namespace of @info. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the namespace + + + + + + + g_base_info_get_typelib () + + get_typelib + + +GITypelib * g_base_info_get_typelib (GIBaseInfo *baseinfo); + + Obtain the typelib this @info belongs to + + + +baseinfo : + + + instance + + + + + +Returns : + + + the typelib. + + + + + + + g_base_info_is_deprecated () + + is_deprecated + + +gboolean g_base_info_is_deprecated (GIBaseInfo *baseinfo); + + Obtain whether the @info is represents a metadata which is +deprecated or not. + + + +baseinfo : + + + instance + + + + + +Returns : + + + %TRUE if deprecated + + + + + + + g_base_info_iterate_attributes () + + iterate_attributes + + +gboolean g_base_info_iterate_attributes (GIBaseInfo *baseinfo, + GIAttributeIter *iterator, + char *name, + char *value); + + Iterate over all attributes associated with this node. The iterator +structure is typically stack allocated, and must have its first +member initialized to %NULL. +Both the @name and @value should be treated as constants +and must not be freed. +<example> +<title>Iterating over attributes</title> +<programlisting> +void +print_attributes (GIBaseInfo *info) +{ +GIAttributeIter iter = { 0, }; +char *name; +char *value; +while (g_base_info_iterate_attributes (info, &iter, &name, &value)) +{ +} +} +</programlisting> +</example> + + + +baseinfo : + + + instance + + + + + +iterator : + + + a #GIAttributeIter structure, must be initialized; see below + + + + + +name : + + + Returned name, must not be freed + + + + + +value : + + + Returned name, must not be freed + + + + + +Returns : + + + %TRUE if there are more attributes + + + + + + + g_base_info_ref () + + ref + + +GIBaseInfo * g_base_info_ref (GIBaseInfo *baseinfo); + + Increases the reference count of @info. + + + +baseinfo : + + + instance + + + + + +Returns : + + + the same @info. + +[transfer full] + + + + + + + g_base_info_unref () + + unref + + +void g_base_info_unref (GIBaseInfo *baseinfo); + + Decreases the reference count of @info. When its reference count +drops to 0, the info is freed. + + + +baseinfo : + + + instance + + + + + +Returns + + + + + + + Repository + + Synopsis + + +struct Repository; +GList * g_irepository_enumerate_versions (GIRepository *repository, + gchar *namespace_); +GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository, + GType gtype); +GIBaseInfo * g_irepository_find_by_name (GIRepository *repository, + gchar *namespace_, + gchar *name); +gchar * g_irepository_get_c_prefix (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_dependencies (GIRepository *repository, + gchar *namespace_); +GIBaseInfo * g_irepository_get_info (GIRepository *repository, + gchar *namespace_, + gint index); +gchar * g_irepository_get_loaded_namespaces (GIRepository *repository); +gint g_irepository_get_n_infos (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_shared_library (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_typelib_path (GIRepository *repository, + gchar *namespace_); +gchar * g_irepository_get_version (GIRepository *repository, + gchar *namespace_); +gboolean g_irepository_is_registered (GIRepository *repository, + gchar *namespace_, + gchar *version); +char * g_irepository_load_typelib (GIRepository *repository, + GITypelib *typelib, + GIRepositoryLoadFlags flags); +GITypelib * g_irepository_require (GIRepository *repository, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); +GITypelib * g_irepository_require_private (GIRepository *repository, + gchar *typelib_dir, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); + + + + Object Hierarchy + + GObject + +----GIRepository + + + Details + + struct GIRepository + + GIRepository + + struct GIRepository; + + + g_irepository_enumerate_versions () + + enumerate_versions + + +GList * g_irepository_enumerate_versions (GIRepository *repository, + gchar *namespace_); + + Obtain an unordered list of versions (either currently loaded or +available) for @namespace_ in this @repository. + + + +repository : + + + instance + + + + + +namespace_ : + + + GI namespace, e.g. "Gtk" + + + + + +Returns : + + + the array of versions. + +[element-type utf8][transfer full] + + + + + + + g_irepository_find_by_gtype () + + find_by_gtype + + +GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository, + GType gtype); + + Searches all loaded namespaces for a particular #GType. Note that +in order to locate the metadata, the namespace corresponding to +the type must first have been loaded. There is currently no +mechanism for determining the namespace which corresponds to an +arbitrary GType - thus, this function will operate most reliably +when you know the GType to originate from be from a loaded namespace. + + + +repository : + + + instance + + + + + +gtype : + + + GType to search for + + + + + +Returns : + + + #GIBaseInfo representing metadata about @type, or %NULL + +[transfer full] + + + + + + + g_irepository_find_by_name () + + find_by_name + + +GIBaseInfo * g_irepository_find_by_name (GIRepository *repository, + gchar *namespace_, + gchar *name); + + Searches for a particular entry in a namespace. Before calling +this function for a particular namespace, you must call +#g_irepository_require once to load the namespace, or otherwise +ensure the namespace has already been loaded. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace which will be searched + + + + + +name : + + + Entry name to find + + + + + +Returns : + + + #GIBaseInfo representing metadata about @name, or %NULL + +[transfer full] + + + + + + + g_irepository_get_c_prefix () + + get_c_prefix + + +gchar * g_irepository_get_c_prefix (GIRepository *repository, + gchar *namespace_); + + This function returns the "C prefix", or the C level namespace +associated with the given introspection namespace. Each C symbol +starts with this prefix, as well each #GType in the library. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + C namespace prefix, or %NULL if none associated + + + + + + + g_irepository_get_dependencies () + + get_dependencies + + +gchar * g_irepository_get_dependencies (GIRepository *repository, + gchar *namespace_); + + Return an array of all (transitive) dependencies for namespace +form <code>namespace-version</code>. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace of interest + + + + + +Returns : + + + Zero-terminated string array of versioned dependencies + +[element-type utf8][transfer full] + + + + + + + g_irepository_get_info () + + get_info + + +GIBaseInfo * g_irepository_get_info (GIRepository *repository, + gchar *namespace_, + gint index); + + This function returns a particular metadata entry in the +given namespace @namespace_. The namespace must have +already been loaded before calling this function. +See g_irepository_get_n_infos() to find the maximum number of +entries. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +index : + + + 0-based offset into namespace metadata for entry + + + + + +Returns : + + + #GIBaseInfo containing metadata + +[transfer full] + + + + + + + g_irepository_get_loaded_namespaces () + + get_loaded_namespaces + + +gchar * g_irepository_get_loaded_namespaces (GIRepository *repository); + + Return the list of currently loaded namespaces. + + + +repository : + + + instance + + + + + +Returns : + + + List of namespaces + +[element-type utf8][transfer full] + + + + + + + g_irepository_get_n_infos () + + get_n_infos + + +gint g_irepository_get_n_infos (GIRepository *repository, + gchar *namespace_); + + This function returns the number of metadata entries in +given namespace @namespace_. The namespace must have +already been loaded before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + number of metadata entries + + + + + + + g_irepository_get_shared_library () + + get_shared_library + + +gchar * g_irepository_get_shared_library (GIRepository *repository, + gchar *namespace_); + + This function returns the full path to the shared C library +associated with the given namespace @namespace_. There may be no +shared library path associated, in which case this function will +return %NULL. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + Full path to shared library, or %NULL if none associated + + + + + + + g_irepository_get_typelib_path () + + get_typelib_path + + +gchar * g_irepository_get_typelib_path (GIRepository *repository, + gchar *namespace_); + + If namespace @namespace_ is loaded, return the full path to the +.typelib file it was loaded from. If the typelib for +namespace @namespace_ was included in a shared library, return +the special string "$lt;builtin$gt;". + + + +repository : + + + instance + + + + + +namespace_ : + + + GI namespace to use, e.g. "Gtk" + + + + + +Returns : + + + Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded + + + + + + + g_irepository_get_version () + + get_version + + +gchar * g_irepository_get_version (GIRepository *repository, + gchar *namespace_); + + This function returns the loaded version associated with the given +namespace @namespace_. +such as #g_irepository_require before calling this function. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace to inspect + + + + + +Returns : + + + Loaded version + + + + + + + g_irepository_is_registered () + + is_registered + + +gboolean g_irepository_is_registered (GIRepository *repository, + gchar *namespace_, + gchar *version); + + Check whether a particular namespace (and optionally, a specific +version thereof) is currently loaded. This function is likely to +only be useful in unusual circumstances; in order to act upon +metadata in the namespace, you should call #g_irepository_require +instead which will ensure the namespace is loaded, and return as +quickly as this function will if it has already been loaded. + + + +repository : + + + instance + + + + + +namespace_ : + + + Namespace of interest + + + + + +version : + + + Required version, may be %NULL for latest + +[allow-none] + + + + + +Returns : + + + %TRUE if namespace-version is loaded, %FALSE otherwise + + + + + + + g_irepository_load_typelib () + + load_typelib + + +char * g_irepository_load_typelib (GIRepository *repository, + GITypelib *typelib, + GIRepositoryLoadFlags flags); + + + + + +repository : + + + instance + + + + + +typelib + + + +flags + + + +Returns + + + + + g_irepository_require () + + require + + +GITypelib * g_irepository_require (GIRepository *repository, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); + + Force the namespace @namespace_ to be loaded if it isn't already. +If @namespace_ is not loaded, this function will search for a +".typelib" file using the repository search path. In addition, a +version @version of namespace may be specified. If @version is +not specified, the latest will be used. + + + +repository : + + + instance + + + + + +namespace_ : + + + GI namespace to use, e.g. "Gtk" + + + + + +version : + + + Version of namespace, may be %NULL for latest + +[allow-none] + + + + + +flags : + + + Set of %GIRepositoryLoadFlags, may be 0 + + + + + +Returns : + + + a pointer to the #GITypelib if successful, %NULL otherwise + + + + + + + g_irepository_require_private () + + require_private + + +GITypelib * g_irepository_require_private (GIRepository *repository, + gchar *typelib_dir, + gchar *namespace_, + gchar *version, + GIRepositoryLoadFlags flags); + + Force the namespace @namespace_ to be loaded if it isn't already. +If @namespace_ is not loaded, this function will search for a +".typelib" file within the private directory only. In addition, a +version @version of namespace should be specified. If @version is +not specified, the latest will be used. + + + +repository : + + + instance + + + + + +typelib_dir : + + + Private directory where to find the requested typelib + + + + + +namespace_ : + + + GI namespace to use, e.g. "Gtk" + + + + + +version : + + + Version of namespace, may be %NULL for latest + +[allow-none] + + + + + +flags : + + + Set of %GIRepositoryLoadFlags, may be 0 + + + + + +Returns : + + + a pointer to the #GITypelib if successful, %NULL otherwise + + + + + + + + + RepositoryClass + + Synopsis + + +struct RepositoryClass; + + + + Details + + struct GIRepositoryClass + + GIRepositoryClass + + struct GIRepositoryClass; + + + + + RepositoryPrivate + + Synopsis + + +struct RepositoryPrivate; + + + + Details + + struct GIRepositoryPrivate + + GIRepositoryPrivate + + struct GIRepositoryPrivate; + + + + + Typelib + + Synopsis + + +struct Typelib; +void g_typelib_free (GITypelib *typelib); +gchar * g_typelib_get_namespace (GITypelib *typelib); +gboolean g_typelib_symbol (GITypelib *typelib, + gchar *symbol_name, + gpointer *symbol); + + + + Details + + struct GITypelib + + GITypelib + + struct GITypelib; + + + g_typelib_free () + + free + + +void g_typelib_free (GITypelib *typelib); + + + + + +typelib : + + + instance + + + + + +Returns + + + + + g_typelib_get_namespace () + + get_namespace + + +gchar * g_typelib_get_namespace (GITypelib *typelib); + + + + + +typelib : + + + instance + + + + + +Returns + + + + + g_typelib_symbol () + + symbol + + +gboolean g_typelib_symbol (GITypelib *typelib, + gchar *symbol_name, + gpointer *symbol); + + + + + +typelib : + + + instance + + + + + +symbol_name + + + +symbol + + + +Returns + + + + + + + UnresolvedInfo + + Synopsis + + +struct UnresolvedInfo; + + + + Details + + struct GIUnresolvedInfo + + GIUnresolvedInfo + + struct GIUnresolvedInfo; + + + + + _BaseInfoStub + + Synopsis + + +struct _BaseInfoStub; + + + + Details + + struct _GIBaseInfoStub + + _GIBaseInfoStub + + struct _GIBaseInfoStub; + + + + diff --git a/tests/doctool/GIRepository-2.0-expected.xml b/tests/doctool/GIRepository-2.0-expected.xml deleted file mode 100644 index b4755860..00000000 --- a/tests/doctool/GIRepository-2.0-expected.xml +++ /dev/null @@ -1,1781 +0,0 @@ - - - -]> - - GIRepository Documentation - - GIArgInfo - - Synopsis - -struct GIArgInfo; - - - - Details - - GIArgInfo - - GIArgInfo - - typedef GIBaseInfo GIArgInfo - Represents an argument. - - - - - GICallableInfo - - Synopsis - -struct GICallableInfo; - - - - Details - - GICallableInfo - - GICallableInfo - - typedef GIBaseInfo GICallableInfo - Represents a callable, either #GIFunctionInfo, #GICallbackInfo or -#GIVFuncInfo. - - - - - GICallbackInfo - - Synopsis - -struct GICallbackInfo; - - - - Details - - GICallbackInfo - - GICallbackInfo - - typedef GIBaseInfo GICallbackInfo - Represents a callback, eg arguments and return value. - - - - - GIConstantInfo - - Synopsis - -struct GIConstantInfo; - - - - Details - - GIConstantInfo - - GIConstantInfo - - typedef GIBaseInfo GIConstantInfo - Represents a constant. - - - - - GIEnumInfo - - Synopsis - -struct GIEnumInfo; - - - - Details - - GIEnumInfo - - GIEnumInfo - - typedef GIBaseInfo GIEnumInfo - Represents an enum or a flag. - - - - - GIErrorDomainInfo - - Synopsis - -struct GIErrorDomainInfo; - - - - Details - - GIErrorDomainInfo - - GIErrorDomainInfo - - typedef GIBaseInfo GIErrorDomainInfo - Represents a #GError error domain. - - - - - GIFieldInfo - - Synopsis - -struct GIFieldInfo; - - - - Details - - GIFieldInfo - - GIFieldInfo - - typedef GIBaseInfo GIFieldInfo - Represents a field of a #GIStructInfo or a #GIUnionInfo. - - - - - GIFunctionInfo - - Synopsis - -struct GIFunctionInfo; - - - - Details - - GIFunctionInfo - - GIFunctionInfo - - typedef GIBaseInfo GIFunctionInfo - Represents a function, eg arguments and return value. - - - - - GIInterfaceInfo - - Synopsis - -struct GIInterfaceInfo; - - - - Details - - GIInterfaceInfo - - GIInterfaceInfo - - typedef GIBaseInfo GIInterfaceInfo - Represents an interface. - - - - - GIObjectInfo - - Synopsis - -struct GIObjectInfo; - - - - Details - - GIObjectInfo - - GIObjectInfo - - typedef GIBaseInfo GIObjectInfo - Represents an object. - - - - - GIPropertyInfo - - Synopsis - -struct GIPropertyInfo; - - - - Details - - GIPropertyInfo - - GIPropertyInfo - - typedef GIBaseInfo GIPropertyInfo - Represents a property of a #GIObjectInfo or a #GIInterfaceInfo. - - - - - GIRegisteredTypeInfo - - Synopsis - -struct GIRegisteredTypeInfo; - - - - Details - - GIRegisteredTypeInfo - - GIRegisteredTypeInfo - - typedef GIBaseInfo GIRegisteredTypeInfo - Represent a registered type. - - - - - GISignalInfo - - Synopsis - -struct GISignalInfo; - - - - Details - - GISignalInfo - - GISignalInfo - - typedef GIBaseInfo GISignalInfo - Represents a signal. - - - - - GIStructInfo - - Synopsis - -struct GIStructInfo; - - - - Details - - GIStructInfo - - GIStructInfo - - typedef GIBaseInfo GIStructInfo - Represents a struct. - - - - - GITypeInfo - - Synopsis - -struct GITypeInfo; - - - - Details - - GITypeInfo - - GITypeInfo - - typedef GIBaseInfo GITypeInfo - Represents type information, direction, transfer etc. - - - - - GIUnionInfo - - Synopsis - -struct GIUnionInfo; - - - - Details - - GIUnionInfo - - GIUnionInfo - - typedef GIBaseInfo GIUnionInfo - Represents a union. - - - - - GIVFuncInfo - - Synopsis - -struct GIVFuncInfo; - - - - Details - - GIVFuncInfo - - GIVFuncInfo - - typedef GIBaseInfo GIVFuncInfo - Represents a virtual function. - - - - - GIValueInfo - - Synopsis - -struct GIValueInfo; - - - - Details - - GIValueInfo - - GIValueInfo - - typedef GIBaseInfo GIValueInfo - Represents a enum value of a #GIEnumInfo. - - - - - GIAttributeIter - - Synopsis - - -struct GIAttributeIter; - - - - Details - - struct GIAttributeIter - - GIAttributeIter - - struct GIAttributeIter; - - - - - GIBaseInfo - - Synopsis - - -struct GIBaseInfo; -gboolean g_base_info_equal (GIBaseInfo *baseinfo, - GIBaseInfo *info2); -gchar * g_base_info_get_attribute (GIBaseInfo *baseinfo, - gchar *name); -GIBaseInfo * g_base_info_get_container (GIBaseInfo *baseinfo); -gchar * g_base_info_get_name (GIBaseInfo *baseinfo); -gchar * g_base_info_get_namespace (GIBaseInfo *baseinfo); -GITypelib * g_base_info_get_typelib (GIBaseInfo *baseinfo); -gboolean g_base_info_is_deprecated (GIBaseInfo *baseinfo); -gboolean g_base_info_iterate_attributes (GIBaseInfo *baseinfo, - GIAttributeIter *iterator, - char *name, - char *value); -GIBaseInfo * g_base_info_ref (GIBaseInfo *baseinfo); -void g_base_info_unref (GIBaseInfo *baseinfo); - - - - Details - - struct GIBaseInfo - - GIBaseInfo - - struct GIBaseInfo; - - - g_base_info_equal () - - equal - - -gboolean g_base_info_equal (GIBaseInfo *baseinfo, - GIBaseInfo *info2); - - Compare two #GIBaseInfo. -Using pointer comparison is not practical since many functions return -different instances of #GIBaseInfo that refers to the same part of the -TypeLib; use this function instead to do #GIBaseInfo comparisons. - - - -baseinfo : - - - instance - - - - - -info2 : - - - a #GIBaseInfo - - - - - -Returns : - - - %TRUE if and only if @info1 equals @info2. - - - - - - - g_base_info_get_attribute () - - get_attribute - - -gchar * g_base_info_get_attribute (GIBaseInfo *baseinfo, - gchar *name); - - Retrieve an arbitrary attribute associated with this node. - - - -baseinfo : - - - instance - - - - - -name : - - - a freeform string naming an attribute - - - - - -Returns : - - - The value of the attribute, or %NULL if no such attribute exists - - - - - - - g_base_info_get_container () - - get_container - - -GIBaseInfo * g_base_info_get_container (GIBaseInfo *baseinfo); - - Obtain the container of the @info. The container is the parent -GIBaseInfo. For instance, the parent of a #GIFunctionInfo is an -#GIObjectInfo or #GIInterfaceInfo. - - - -baseinfo : - - - instance - - - - - -Returns : - - - the container - - - - - - - g_base_info_get_name () - - get_name - - -gchar * g_base_info_get_name (GIBaseInfo *baseinfo); - - Obtain the name of the @info. What the name represents depends on -the #GIInfoType of the @info. For instance for #GIFunctionInfo it is -the name of the function. - - - -baseinfo : - - - instance - - - - - -Returns : - - - the name of @info or %NULL if it lacks a name. - - - - - - - g_base_info_get_namespace () - - get_namespace - - -gchar * g_base_info_get_namespace (GIBaseInfo *baseinfo); - - Obtain the namespace of @info. - - - -baseinfo : - - - instance - - - - - -Returns : - - - the namespace - - - - - - - g_base_info_get_typelib () - - get_typelib - - -GITypelib * g_base_info_get_typelib (GIBaseInfo *baseinfo); - - Obtain the typelib this @info belongs to - - - -baseinfo : - - - instance - - - - - -Returns : - - - the typelib. - - - - - - - g_base_info_is_deprecated () - - is_deprecated - - -gboolean g_base_info_is_deprecated (GIBaseInfo *baseinfo); - - Obtain whether the @info is represents a metadata which is -deprecated or not. - - - -baseinfo : - - - instance - - - - - -Returns : - - - %TRUE if deprecated - - - - - - - g_base_info_iterate_attributes () - - iterate_attributes - - -gboolean g_base_info_iterate_attributes (GIBaseInfo *baseinfo, - GIAttributeIter *iterator, - char *name, - char *value); - - Iterate over all attributes associated with this node. The iterator -structure is typically stack allocated, and must have its first -member initialized to %NULL. -Both the @name and @value should be treated as constants -and must not be freed. -<example> -<title>Iterating over attributes</title> -<programlisting> -void -print_attributes (GIBaseInfo *info) -{ -GIAttributeIter iter = { 0, }; -char *name; -char *value; -while (g_base_info_iterate_attributes (info, &iter, &name, &value)) -{ -} -} -</programlisting> -</example> - - - -baseinfo : - - - instance - - - - - -iterator : - - - a #GIAttributeIter structure, must be initialized; see below - - - - - -name : - - - Returned name, must not be freed - - - - - -value : - - - Returned name, must not be freed - - - - - -Returns : - - - %TRUE if there are more attributes - - - - - - - g_base_info_ref () - - ref - - -GIBaseInfo * g_base_info_ref (GIBaseInfo *baseinfo); - - Increases the reference count of @info. - - - -baseinfo : - - - instance - - - - - -Returns : - - - the same @info. - -[transfer full] - - - - - - - g_base_info_unref () - - unref - - -void g_base_info_unref (GIBaseInfo *baseinfo); - - Decreases the reference count of @info. When its reference count -drops to 0, the info is freed. - - - -baseinfo : - - - instance - - - - - -Returns - - - - - - - GIRepository - - Synopsis - - -struct GIRepository; -GList * g_irepository_enumerate_versions (GIRepository *repository, - gchar *namespace_); -GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository, - GType gtype); -GIBaseInfo * g_irepository_find_by_name (GIRepository *repository, - gchar *namespace_, - gchar *name); -gchar * g_irepository_get_c_prefix (GIRepository *repository, - gchar *namespace_); -gchar * g_irepository_get_dependencies (GIRepository *repository, - gchar *namespace_); -GIBaseInfo * g_irepository_get_info (GIRepository *repository, - gchar *namespace_, - gint index); -gchar * g_irepository_get_loaded_namespaces (GIRepository *repository); -gint g_irepository_get_n_infos (GIRepository *repository, - gchar *namespace_); -gchar * g_irepository_get_shared_library (GIRepository *repository, - gchar *namespace_); -gchar * g_irepository_get_typelib_path (GIRepository *repository, - gchar *namespace_); -gchar * g_irepository_get_version (GIRepository *repository, - gchar *namespace_); -gboolean g_irepository_is_registered (GIRepository *repository, - gchar *namespace_, - gchar *version); -char * g_irepository_load_typelib (GIRepository *repository, - GITypelib *typelib, - GIRepositoryLoadFlags flags); -GITypelib * g_irepository_require (GIRepository *repository, - gchar *namespace_, - gchar *version, - GIRepositoryLoadFlags flags); -GITypelib * g_irepository_require_private (GIRepository *repository, - gchar *typelib_dir, - gchar *namespace_, - gchar *version, - GIRepositoryLoadFlags flags); - - - - Object Hierarchy - - GObject - +----GIRepository - - - Details - - struct GIRepository - - GIRepository - - struct GIRepository; - - - g_irepository_enumerate_versions () - - enumerate_versions - - -GList * g_irepository_enumerate_versions (GIRepository *repository, - gchar *namespace_); - - Obtain an unordered list of versions (either currently loaded or -available) for @namespace_ in this @repository. - - - -repository : - - - instance - - - - - -namespace_ : - - - GI namespace, e.g. "Gtk" - - - - - -Returns : - - - the array of versions. - -[element-type utf8][transfer full] - - - - - - - g_irepository_find_by_gtype () - - find_by_gtype - - -GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository, - GType gtype); - - Searches all loaded namespaces for a particular #GType. Note that -in order to locate the metadata, the namespace corresponding to -the type must first have been loaded. There is currently no -mechanism for determining the namespace which corresponds to an -arbitrary GType - thus, this function will operate most reliably -when you know the GType to originate from be from a loaded namespace. - - - -repository : - - - instance - - - - - -gtype : - - - GType to search for - - - - - -Returns : - - - #GIBaseInfo representing metadata about @type, or %NULL - -[transfer full] - - - - - - - g_irepository_find_by_name () - - find_by_name - - -GIBaseInfo * g_irepository_find_by_name (GIRepository *repository, - gchar *namespace_, - gchar *name); - - Searches for a particular entry in a namespace. Before calling -this function for a particular namespace, you must call -#g_irepository_require once to load the namespace, or otherwise -ensure the namespace has already been loaded. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace which will be searched - - - - - -name : - - - Entry name to find - - - - - -Returns : - - - #GIBaseInfo representing metadata about @name, or %NULL - -[transfer full] - - - - - - - g_irepository_get_c_prefix () - - get_c_prefix - - -gchar * g_irepository_get_c_prefix (GIRepository *repository, - gchar *namespace_); - - This function returns the "C prefix", or the C level namespace -associated with the given introspection namespace. Each C symbol -starts with this prefix, as well each #GType in the library. -such as #g_irepository_require before calling this function. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace to inspect - - - - - -Returns : - - - C namespace prefix, or %NULL if none associated - - - - - - - g_irepository_get_dependencies () - - get_dependencies - - -gchar * g_irepository_get_dependencies (GIRepository *repository, - gchar *namespace_); - - Return an array of all (transitive) dependencies for namespace -form <code>namespace-version</code>. -such as #g_irepository_require before calling this function. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace of interest - - - - - -Returns : - - - Zero-terminated string array of versioned dependencies - -[element-type utf8][transfer full] - - - - - - - g_irepository_get_info () - - get_info - - -GIBaseInfo * g_irepository_get_info (GIRepository *repository, - gchar *namespace_, - gint index); - - This function returns a particular metadata entry in the -given namespace @namespace_. The namespace must have -already been loaded before calling this function. -See g_irepository_get_n_infos() to find the maximum number of -entries. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace to inspect - - - - - -index : - - - 0-based offset into namespace metadata for entry - - - - - -Returns : - - - #GIBaseInfo containing metadata - -[transfer full] - - - - - - - g_irepository_get_loaded_namespaces () - - get_loaded_namespaces - - -gchar * g_irepository_get_loaded_namespaces (GIRepository *repository); - - Return the list of currently loaded namespaces. - - - -repository : - - - instance - - - - - -Returns : - - - List of namespaces - -[element-type utf8][transfer full] - - - - - - - g_irepository_get_n_infos () - - get_n_infos - - -gint g_irepository_get_n_infos (GIRepository *repository, - gchar *namespace_); - - This function returns the number of metadata entries in -given namespace @namespace_. The namespace must have -already been loaded before calling this function. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace to inspect - - - - - -Returns : - - - number of metadata entries - - - - - - - g_irepository_get_shared_library () - - get_shared_library - - -gchar * g_irepository_get_shared_library (GIRepository *repository, - gchar *namespace_); - - This function returns the full path to the shared C library -associated with the given namespace @namespace_. There may be no -shared library path associated, in which case this function will -return %NULL. -such as #g_irepository_require before calling this function. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace to inspect - - - - - -Returns : - - - Full path to shared library, or %NULL if none associated - - - - - - - g_irepository_get_typelib_path () - - get_typelib_path - - -gchar * g_irepository_get_typelib_path (GIRepository *repository, - gchar *namespace_); - - If namespace @namespace_ is loaded, return the full path to the -.typelib file it was loaded from. If the typelib for -namespace @namespace_ was included in a shared library, return -the special string "$lt;builtin$gt;". - - - -repository : - - - instance - - - - - -namespace_ : - - - GI namespace to use, e.g. "Gtk" - - - - - -Returns : - - - Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded - - - - - - - g_irepository_get_version () - - get_version - - -gchar * g_irepository_get_version (GIRepository *repository, - gchar *namespace_); - - This function returns the loaded version associated with the given -namespace @namespace_. -such as #g_irepository_require before calling this function. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace to inspect - - - - - -Returns : - - - Loaded version - - - - - - - g_irepository_is_registered () - - is_registered - - -gboolean g_irepository_is_registered (GIRepository *repository, - gchar *namespace_, - gchar *version); - - Check whether a particular namespace (and optionally, a specific -version thereof) is currently loaded. This function is likely to -only be useful in unusual circumstances; in order to act upon -metadata in the namespace, you should call #g_irepository_require -instead which will ensure the namespace is loaded, and return as -quickly as this function will if it has already been loaded. - - - -repository : - - - instance - - - - - -namespace_ : - - - Namespace of interest - - - - - -version : - - - Required version, may be %NULL for latest - -[allow-none] - - - - - -Returns : - - - %TRUE if namespace-version is loaded, %FALSE otherwise - - - - - - - g_irepository_load_typelib () - - load_typelib - - -char * g_irepository_load_typelib (GIRepository *repository, - GITypelib *typelib, - GIRepositoryLoadFlags flags); - - - - - -repository : - - - instance - - - - - -typelib - - - -flags - - - -Returns - - - - - g_irepository_require () - - require - - -GITypelib * g_irepository_require (GIRepository *repository, - gchar *namespace_, - gchar *version, - GIRepositoryLoadFlags flags); - - Force the namespace @namespace_ to be loaded if it isn't already. -If @namespace_ is not loaded, this function will search for a -".typelib" file using the repository search path. In addition, a -version @version of namespace may be specified. If @version is -not specified, the latest will be used. - - - -repository : - - - instance - - - - - -namespace_ : - - - GI namespace to use, e.g. "Gtk" - - - - - -version : - - - Version of namespace, may be %NULL for latest - -[allow-none] - - - - - -flags : - - - Set of %GIRepositoryLoadFlags, may be 0 - - - - - -Returns : - - - a pointer to the #GITypelib if successful, %NULL otherwise - - - - - - - g_irepository_require_private () - - require_private - - -GITypelib * g_irepository_require_private (GIRepository *repository, - gchar *typelib_dir, - gchar *namespace_, - gchar *version, - GIRepositoryLoadFlags flags); - - Force the namespace @namespace_ to be loaded if it isn't already. -If @namespace_ is not loaded, this function will search for a -".typelib" file within the private directory only. In addition, a -version @version of namespace should be specified. If @version is -not specified, the latest will be used. - - - -repository : - - - instance - - - - - -typelib_dir : - - - Private directory where to find the requested typelib - - - - - -namespace_ : - - - GI namespace to use, e.g. "Gtk" - - - - - -version : - - - Version of namespace, may be %NULL for latest - -[allow-none] - - - - - -flags : - - - Set of %GIRepositoryLoadFlags, may be 0 - - - - - -Returns : - - - a pointer to the #GITypelib if successful, %NULL otherwise - - - - - - - - - GIRepositoryClass - - Synopsis - - -struct GIRepositoryClass; - - - - Details - - struct GIRepositoryClass - - GIRepositoryClass - - struct GIRepositoryClass; - - - - - GIRepositoryPrivate - - Synopsis - - -struct GIRepositoryPrivate; - - - - Details - - struct GIRepositoryPrivate - - GIRepositoryPrivate - - struct GIRepositoryPrivate; - - - - - GITypelib - - Synopsis - - -struct GITypelib; -void g_typelib_free (GITypelib *typelib); -gchar * g_typelib_get_namespace (GITypelib *typelib); -gboolean g_typelib_symbol (GITypelib *typelib, - gchar *symbol_name, - gpointer *symbol); - - - - Details - - struct GITypelib - - GITypelib - - struct GITypelib; - - - g_typelib_free () - - free - - -void g_typelib_free (GITypelib *typelib); - - - - - -typelib : - - - instance - - - - - -Returns - - - - - g_typelib_get_namespace () - - get_namespace - - -gchar * g_typelib_get_namespace (GITypelib *typelib); - - - - - -typelib : - - - instance - - - - - -Returns - - - - - g_typelib_symbol () - - symbol - - -gboolean g_typelib_symbol (GITypelib *typelib, - gchar *symbol_name, - gpointer *symbol); - - - - - -typelib : - - - instance - - - - - -symbol_name - - - -symbol - - - -Returns - - - - - - - GIUnresolvedInfo - - Synopsis - - -struct GIUnresolvedInfo; - - - - Details - - struct GIUnresolvedInfo - - GIUnresolvedInfo - - struct GIUnresolvedInfo; - - - - - _GIBaseInfoStub - - Synopsis - - -struct _GIBaseInfoStub; - - - - Details - - struct _GIBaseInfoStub - - _GIBaseInfoStub - - struct _GIBaseInfoStub; - - - - diff --git a/tests/doctool/Makefile.am b/tests/doctool/Makefile.am index 1552930a..46e54beb 100644 --- a/tests/doctool/Makefile.am +++ b/tests/doctool/Makefile.am @@ -4,17 +4,23 @@ GIRepository-2.0.gir: cp ../../GIRepository-2.0.gir . GIRS = GIRepository-2.0.gir -CHECKXML = $(GIRS:.gir=.xml.check) +CHECKXML = $(GIRS:.gir=-C.xml.check) $(GIRS:.gir=-Python.xml.check) DOCBOOKFILES = $(GIRS:.gir=.xml) EXPECTEDDOCBOOKFILES = $(DOCBOOKFILES:.xml=-expected.xml) CLEANFILES = $(DOCBOOK_FILES) BUILT_SOURCES = $(DOCBOOK_FILES) EXTRA_DIST = $(EXPECTEDDOCBOOKFILES) -%.xml: %.gir - $(INTROSPECTION_DOCTOOL) $*.gir -o $*.xml && echo " GEN $*.xml" +%-C.xml: %.gir + $(INTROSPECTION_DOCTOOL) --language C $*.gir -o $*-C.xml && echo " GEN $*-C.xml" -%.xml.check: %.xml - @diff -u -U 10 $(srcdir)/$*-expected.xml $*.xml && echo " TEST $*.xml" +%-Python.xml: %.gir + $(INTROSPECTION_DOCTOOL) --language Python $*.gir -o $*-Python.xml && echo " GEN $*-Python.xml" -check-local: $(CHECKXML) $(TYPELIBS) +%-C.xml.check: %-C.xml + @diff -u -U 10 $(srcdir)/$*-C-expected.xml $*-C.xml && echo " TEST $*-C.xml" + +%-Python.xml.check: %-Python.xml + @diff -u -U 10 $(srcdir)/$*-Python-expected.xml $*-Python.xml && echo " TEST $*-Python.xml" + +check-local: $(CHECKXML) -- cgit v1.2.1