From fe8c6d34c41789f938168ff1d38da079a5573945 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 12 Feb 2009 01:32:25 -0200 Subject: [PATCH] Add gtk-doc support --- ginfo.c | 4 +++ girepository.c | 77 +++++++++++++++++++++++++------------------------- girffi.c | 2 +- giroffsets.c | 2 +- girparser.c | 8 ++++-- gtypelib.c | 1 + 6 files changed, 51 insertions(+), 43 deletions(-) diff --git a/ginfo.c b/ginfo.c index a51c6cb3c..f4ca1310a 100644 --- a/ginfo.c +++ b/ginfo.c @@ -658,6 +658,7 @@ g_callable_info_get_n_args (GICallableInfo *info) /** * g_callable_info_get_arg: * @info: a #GICallableInfo + * @n: the argument index to fetch * * Get information about a particular argument of this callable. * @@ -1186,6 +1187,7 @@ g_struct_info_get_alignment (GIStructInfo *info) * GObject. This function is mainly useful to hide this kind of structure * from public APIs. * + * Returns: TRUE if it's a class struct, otherwise FALSE */ gboolean g_struct_info_is_class_struct (GIStructInfo *info) @@ -1493,6 +1495,8 @@ g_object_info_get_constant (GIObjectInfo *info, * * Every GObject has two structures; an instance structure and a class * structure. This function returns the metadata for the class structure. + * + * Returns: a GIStrucTInfo for the class struct or NULL if none found. */ GIStructInfo * g_object_info_get_class_struct (GIObjectInfo *info) diff --git a/girepository.c b/girepository.c index f35854a7d..40c478648 100644 --- a/girepository.c +++ b/girepository.c @@ -370,12 +370,12 @@ register_internal (GIRepository *repository, } /** - * g_irepository_get_dependencies + * g_irepository_get_dependencies: * @repository: A #GIRepository, may be %NULL for the default - * @namespace: Namespace of interest + * @namespace_: Namespace of interest * * Return an array of all (transitive) dependencies for namespace - * @namespace, including version. The returned strings are of the + * @namespace_, including version. The returned strings are of the * form namespace-version. * * Note: The namespace must have already been loaded using a function @@ -436,10 +436,10 @@ g_irepository_load_typelib (GIRepository *repository, } /** - * g_irepository_is_registered + * g_irepository_is_registered: * @repository: A #GIRepository, may be %NULL for the default - * @namespace: Namespace of interest - * @version: : Required version, may be %NULL for latest + * @namespace_: Namespace of interest + * @version: (allow-none): Required version, may be %NULL for latest * * Check whether a particular namespace (and optionally, a specific * version thereof) is currently loaded. This function is likely to @@ -460,7 +460,7 @@ g_irepository_is_registered (GIRepository *repository, } /** - * g_irepository_get_default + * g_irepository_get_default: * * Returns the singleton process-global default #GIRepository. It is * not currently supported to have multiple repositories in a @@ -482,12 +482,12 @@ g_irepository_get_default (void) } /** - * g_irepository_get_n_infos + * g_irepository_get_n_infos: * @repository: A #GIRepository, may be %NULL for the default - * @namespace: Namespace to inspect + * @namespace_: Namespace to inspect * * This function returns the number of metadata entries in - * given namespace @namespace. The namespace must have + * given namespace @namespace_. The namespace must have * already been loaded before calling this function. * * Returns: number of metadata entries @@ -591,13 +591,13 @@ find_interface (gpointer key, } /** - * g_irepository_get_info + * g_irepository_get_info: * @repository: A #GIRepository, may be %NULL for the default - * @namespace: Namespace to inspect + * @namespace_: Namespace to inspect * @index: Offset into namespace metadata for entry * * This function returns a particular metadata entry in the - * given namespace @namespace. The namespace must have + * given namespace @namespace_. The namespace must have * already been loaded before calling this function. * * Returns: #GIBaseInfo containing metadata @@ -630,9 +630,9 @@ g_irepository_get_info (GIRepository *repository, } /** - * g_irepository_find_by_gtype + * g_irepository_find_by_gtype: * @repository: A #GIRepository, may be %NULL for the default - * @type: GType to search for + * @gtype: GType to search for * * Searches all loaded namespaces for a particular #GType. Note that * in order to locate the metadata, the namespace corresponding to @@ -645,7 +645,7 @@ g_irepository_get_info (GIRepository *repository, */ GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository, - GType type) + GType gtype) { IfaceData data; @@ -676,9 +676,9 @@ g_irepository_find_by_gtype (GIRepository *repository, } /** - * g_irepository_find_by_name + * g_irepository_find_by_name: * @repository: A #GIRepository, may be %NULL for the default - * @namespace: Namespace which will be searched + * @namespace_: Namespace which will be searched * @name: Entry name to find * * Searches for a particular entry in a namespace. Before calling @@ -726,12 +726,12 @@ collect_namespaces (gpointer key, } /** - * g_irepository_get_namespaces + * g_irepository_get_namespaces: * @repository: A #GIRepository, may be %NULL for the default * * Return the list of currently loaded namespaces. * - * Returns: : List of namespaces + * Returns: (utf8) (transfer full): List of namespaces */ gchar ** g_irepository_get_loaded_namespaces (GIRepository *repository) @@ -755,12 +755,12 @@ g_irepository_get_loaded_namespaces (GIRepository *repository) } /** - * g_irepository_get_version + * g_irepository_get_version: * @repository: A #GIRepository, may be %NULL for the default - * @namespace: Namespace to inspect + * @namespace_: Namespace to inspect * * This function returns the loaded version associated with the given - * namespace @namespace. + * namespace @namespace_. * * Note: The namespace must have already been loaded using a function * such as #g_irepository_require before calling this function. @@ -787,12 +787,12 @@ g_irepository_get_version (GIRepository *repository, } /** - * g_irepository_get_shared_library + * g_irepository_get_shared_library: * @repository: A #GIRepository, may be %NULL for the default - * @namespace: Namespace to inspect + * @namespace_: Namespace to inspect * * This function returns the full path to the shared C library - * associated with the given namespace @namespace. There may be no + * associated with the given namespace @namespace_. There may be no * shared library path associated, in which case this function will * return %NULL. * @@ -824,17 +824,16 @@ g_irepository_get_shared_library (GIRepository *repository, } /** - * g_irepository_get_typelib_path + * g_irepository_get_typelib_path: * @repository: Repository, may be %NULL for the default - * @namespace: GI namespace to use, e.g. "Gtk" - * @version: : Version of namespace to use, e.g. "0.8", may be %NULL + * @namespace_: GI namespace to use, e.g. "Gtk" * - * If namespace @namespace is loaded, return the full path to the + * 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 "". + * namespace @namespace_ was included in a shared library, return + * the special string "$lt;builtin$gt;". * - * Returns: Filesystem path (or ) if successful, %NULL if namespace is not loaded + * Returns: Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded */ const gchar * @@ -1080,15 +1079,15 @@ find_namespace_latest (const gchar *namespace, } /** - * g_irepository_require - * @repository: : Repository, may be %NULL for the default - * @namespace: GI namespace to use, e.g. "Gtk" - * @version: : Version of namespace, may be %NULL for latest + * g_irepository_require: + * @repository: (allow-none): Repository, may be %NULL for the default + * @namespace_: GI namespace to use, e.g. "Gtk" + * @version: (allow-none): Version of namespace, may be %NULL for latest * @flags: Set of %GIRepositoryLoadFlags, may be %0 * @error: a #GError. * - * Force the namespace @namespace to be loaded if it isn't already. - * If @namespace is not loaded, this function will search for a + * 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. diff --git a/girffi.c b/girffi.c index ffde85388..4611a6303 100644 --- a/girffi.c +++ b/girffi.c @@ -225,7 +225,7 @@ g_callable_info_prepare_closure (GICallableInfo *callable_info, } /** - * g_callable_info_prepare_closure: + * g_callable_info_free_closure: * @callable_info: a callable info from a typelib * @closure: ffi closure * diff --git a/giroffsets.c b/giroffsets.c index cc56d0bc8..d83474646 100644 --- a/giroffsets.c +++ b/giroffsets.c @@ -462,7 +462,7 @@ check_needs_computation (GIrNode *node, * g_ir_node_compute_offsets: * @node: a #GIrNode * @module: Current module being processed - * @moudles: all currently loaded modules + * @modules: all currently loaded modules * * If a node is a a structure or union, makes sure that the field * offsets have been computed, and also computes the overall size and diff --git a/girparser.c b/girparser.c index 97e3a1e09..1c7f5b34f 100644 --- a/girparser.c +++ b/girparser.c @@ -3188,12 +3188,15 @@ post_filter (GIrModule *module) /** * g_ir_parser_parse_string: * @parser: a #GIrParser + * @namespace: the namespace of the string + * @buffer: the data containing the XML + * @length: length of the data * @error: return location for a #GError, or %NULL * * Parse a string that holds a complete GIR XML file, and return a list of a * a #GirModule for each <namespace/> element within the file. * - * @returns: a newly allocated list of #GIrModule. The modules themselves + * Returns: a newly allocated list of #GIrModule. The modules themselves * are owned by the #GIrParser and will be freed along with the parser. */ GList * @@ -3258,12 +3261,13 @@ g_ir_parser_parse_string (GIrParser *parser, /** * g_ir_parser_parse_file: * @parser: a #GIrParser + * @filename: filename to parse * @error: return location for a #GError, or %NULL * * Parse GIR XML file, and return a list of a a #GirModule for each * <namespace/> element within the file. * - * @returns: a newly allocated list of #GIrModule. The modules themselves + * Returns: a newly allocated list of #GIrModule. The modules themselves * are owned by the #GIrParser and will be freed along with the parser. */ GList * diff --git a/gtypelib.c b/gtypelib.c index e3b1214ed..b228a23f8 100644 --- a/gtypelib.c +++ b/gtypelib.c @@ -2124,6 +2124,7 @@ g_typelib_get_namespace (GTypelib *typelib) /** * g_typelib_symbol: + * @typelib: the typelib * @symbol_name: name of symbol to be loaded * @symbol: returns a pointer to the symbol value *