summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-01-13 16:39:28 +0100
committerAlexander Larsson <alexl@redhat.com>2012-01-13 17:12:57 +0100
commitc7dfea30b358d737a2711f25a7167968fede4c05 (patch)
treeccd45508b827a41f9dae73a61e0a723b254f80a3
parente041843b3e70df95c8909cf4e35728d0d88c1530 (diff)
downloadglib-c7dfea30b358d737a2711f25a7167968fede4c05.tar.gz
Add documentation for GResource
-rw-r--r--docs/reference/gio/Makefile.am1
-rw-r--r--docs/reference/gio/gio-docs.xml5
-rw-r--r--docs/reference/gio/gio-sections.txt43
-rw-r--r--docs/reference/gio/glib-compile-resources.xml101
4 files changed, 150 insertions, 0 deletions
diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
index 3c2a4ca87..27f3119e2 100644
--- a/docs/reference/gio/Makefile.am
+++ b/docs/reference/gio/Makefile.am
@@ -140,6 +140,7 @@ EXTRA_DIST += \
man_MANS = \
gio-querymodules.1 \
glib-compile-schemas.1 \
+ glib-compile-resources.1 \
gsettings.1 \
gdbus.1 \
gdbus-codegen.1
diff --git a/docs/reference/gio/gio-docs.xml b/docs/reference/gio/gio-docs.xml
index 2dce7b489..1987c307e 100644
--- a/docs/reference/gio/gio-docs.xml
+++ b/docs/reference/gio/gio-docs.xml
@@ -185,6 +185,10 @@
<xi:include href="xml/gsettingsbackend.xml"/>
<xi:include href="xml/gsettingsschema.xml"/>
</chapter>
+ <chapter id="resources">
+ <title>Resources</title>
+ <xi:include href="xml/gresource.xml"/>
+ </chapter>
<chapter id='permissions'>
<title>Permissions</title>
<xi:include href="xml/gpermission.xml"/>
@@ -219,6 +223,7 @@
<xi:include href="gio-querymodules.xml"/>
<xi:include href="gsettings.xml"/>
<xi:include href="glib-compile-schemas.xml"/>
+ <xi:include href="glib-compile-resources.xml"/>
<xi:include href="gdbus.xml"/>
<xi:include href="xml/gdbus-codegen.xml"/>
</chapter>
diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt
index 8c59f3b69..8f27996cf 100644
--- a/docs/reference/gio/gio-sections.txt
+++ b/docs/reference/gio/gio-sections.txt
@@ -3756,3 +3756,46 @@ g_menu_markup_parser_start_menu
g_menu_markup_print_stderr
g_menu_markup_print_string
</SECTION>
+
+<SECTION>
+<FILE>gresource</FILE>
+<TITLE>GResource</TITLE>
+GResource
+GResourceFlags
+GResourceLookupFlags
+g_resource_load
+g_resource_new_from_data
+g_resource_ref
+g_resource_unref
+g_resource_lookup_data
+g_resource_open_stream
+g_resource_enumerate_children
+g_resource_get_info
+g_resource_set_module
+
+<SUBSECTION Global>
+g_resources_register
+g_resources_unregister
+g_resources_lookup_data
+g_resources_open_stream
+g_resources_enumerate_children
+g_resources_get_info
+
+<SUBSECTION>
+G_RESOURCE_ERROR
+GResourceError
+
+<SUBSECTION Standard>
+G_TYPE_RESOURCE
+G_TYPE_RESOURCE_ERROR
+G_TYPE_RESOURCE_FILE
+G_TYPE_RESOURCE_FLAGS
+G_TYPE_RESOURCE_LOOKUP_FLAGS
+
+<SUBSECTION Private>
+g_resource_get_type
+g_resource_error_get_type
+g_resource_flags_get_type
+g_resource_lookup_flags_get_type
+g_resource_error_quark
+</SECTION>
diff --git a/docs/reference/gio/glib-compile-resources.xml b/docs/reference/gio/glib-compile-resources.xml
new file mode 100644
index 000000000..18c3e8831
--- /dev/null
+++ b/docs/reference/gio/glib-compile-resources.xml
@@ -0,0 +1,101 @@
+<refentry id="glib-compile-resources" lang="en">
+
+<refmeta>
+ <refentrytitle>glib-compile-resources</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">User Commands</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+ <refname>glib-compile-resources</refname>
+ <refpurpose>glib resource compiler</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+ <cmdsynopsis>
+ <command>glib-compile-resources</command>
+ <arg choice="opt" rep="repeat">option</arg>
+ <arg choice="req">file</arg>
+ </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para><command>glib-compile-resources</command> reads the resource description from
+<replaceable>file</replaceable> and the files that it references
+and creates a binary resource bundle that is suitable for use with the
+<link linkend="GResource"><type>GResource</type></link> API.
+The resulting bundle is then written out as-is, or as C source for linking into
+an application.
+</para>
+<para>
+The XML resource files normally have the filename extension <filename>.gresource.xml</filename>.
+For a detailed description of the XML file format, see the
+<link linkend="GResource"><type>GResource</type></link> documentation.
+</para>
+
+<refsect2><title>Options</title>
+<variablelist>
+
+<varlistentry>
+<term><option>-h</option>, <option>--help</option></term>
+<listitem><para>
+Print help and exit
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--target=<replaceable>TARGETFILE</replaceable></option></term>
+<listitem><para>
+Store the compiled resources in <replaceable>TARGETFILE</replaceable>. If not specified a filename based
+on the <replaceable>file</replaceable> basename is used.
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--sourcedir</option></term>
+<listitem><para>
+The files references in <replaceable>file</replaceable> are loaded from this directory. If
+not specified the current directory is used.
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--generate-source</option></term>
+<listitem><para>
+Instead of a writing the resource bundle in binary form create a C source file that contains the
+resource bundle. This can then be compiled into an application for easy access.
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--generate-header</option></term>
+<listitem><para>
+Generate a header file for use with C code generated by <option>--generate-source</option>.
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--c-name</option></term>
+<listitem><para>
+Specify the prefix used for the C identifiers in the code generated by
+<option>--generate-source</option> and <option>--generate-headers</option>.
+</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--manual-register</option></term>
+<listitem><para>
+By default code generated by <option>--generate-source</option> uses automatic initialization
+of the resource. This works on most systems by using the compiler support for constructors.
+However, some (uncommon) compilers may not support this, you can then specify <option>--manual-register</option>,
+which will generate custom register and unregister functions that your code can manually call
+at initialization and uninitialization time.
+</para></listitem>
+</varlistentry>
+
+</variablelist>
+</refsect2>
+</refsect1>
+<refsect1><title>See also</title>
+</refsect1>
+</refentry>