gplugin/gplugin

Migrate the embedding wiki page to gtk-doc
bugfix/docs-cleanup
2019-08-12, Gary Kramlich
6e5db792b535
Parents d9e0dee13da2
Children b04534e0e9ab
Migrate the embedding wiki page to gtk-doc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/embedding.xml Mon Aug 12 23:38:40 2019 -0500
@@ -0,0 +1,54 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+]>
+<chapter id="chapter-embedding">
+ <title>Embedding GPlugin</title>
+
+ <simplesect id="intro">
+ <para>
+ You can embed GPlugin into any language that has GObject-Introspection
+ support, but in this example we're going to look at embedding GPlugin
+ into a C based project.
+ </para>
+
+ <para>
+ Using GPlugin is pretty simple and I'd like to think straight forward
+ since that's the way I designed it.
+ </para>
+ </simplesect>
+
+ <simplesect id="initialization">
+ <para>
+ During the start up of your application you need to add the following
+ code:
+ <informalexample><programlisting>
+ /* initialize the gplugin library */
+ gplugin_init();
+
+ /* tell gplugin to look for plugins in its default paths */
+ gplugin_manager_add_default_paths();
+
+ /* Optionally tell gplugin to look for plugins in application specific
+ * paths.
+ */
+ gplugin_manager_add_app_paths(PREFIX, "application");
+
+ /* Once you're ready to find/load plugins call g_plugin_manager_refresh.
+ */
+ gplugin_manager_refresh();
+
+ </programlisting></informalexample>
+ </para>
+ </simplesect>
+
+ <simplesect id="shutdown">
+ <para>
+ When your application is shutting down you need to uninitialize GPlugin
+ by calling
+ <informalexample><programlisting>
+ gplugin_uninit();
+ </programlisting></informalexample>
+ </para>
+ </simplesect>
+</chapter>
\ No newline at end of file
--- a/gplugin/reference/gplugin-docs.xml Mon Aug 12 23:13:30 2019 -0500
+++ b/gplugin/reference/gplugin-docs.xml Mon Aug 12 23:38:40 2019 -0500
@@ -19,6 +19,12 @@
</abstract>
</bookinfo>
+ <part id="tutorials">
+ <title>Tutorials</title>
+
+ <xi:include href="embedding.xml"/>
+ </part>
+
<part id="object-hierarchy">
<title>Object Hierarchy</title>