[glib] gresource: Document generated C file function naming



commit 31496767c7caed25c134e58b0f41b1e696f671fe
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu May 14 08:31:22 2015 +0100

    gresource: Document generated C file function naming
    
    Mention the relationship to the --c-name argument, plus the need to call
    some_prefix_get_resource() to get the GResource object.

 gio/gresource.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gio/gresource.c b/gio/gresource.c
index a51e60a..a0252c9 100644
--- a/gio/gresource.c
+++ b/gio/gresource.c
@@ -109,6 +109,12 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref)
  * You can then use [glib-compile-resources][glib-compile-resources] to compile the XML to a
  * binary bundle that you can load with g_resource_load(). However, its more common to use the 
--generate-source and
  * --generate-header arguments to create a source file and header to link directly into your application.
+ * This will generate `get_resource()`, `register_resource()` and
+ * `unregister_resource()` functions, prefixed by the `--c-name` argument passed
+ * to [glib-compile-resources][glib-compile-resources]. `get_resource()` returns
+ * the generated #GResource object. The register and unregister functions
+ * register the resource so its files can be accessed using
+ * g_resources_lookup_data().
  *
  * Once a #GResource has been created and registered all the data in it can be accessed globally in the 
process by
  * using API calls like g_resources_open_stream() to stream the data or g_resources_lookup_data() to get a 
direct pointer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]