summaryrefslogtreecommitdiff
path: root/tests/doctool/GIRepository-2.0-C-expected/GIRepository.BaseInfo.page
diff options
context:
space:
mode:
Diffstat (limited to 'tests/doctool/GIRepository-2.0-C-expected/GIRepository.BaseInfo.page')
-rw-r--r--tests/doctool/GIRepository-2.0-C-expected/GIRepository.BaseInfo.page43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/doctool/GIRepository-2.0-C-expected/GIRepository.BaseInfo.page b/tests/doctool/GIRepository-2.0-C-expected/GIRepository.BaseInfo.page
new file mode 100644
index 00000000..1e29c309
--- /dev/null
+++ b/tests/doctool/GIRepository-2.0-C-expected/GIRepository.BaseInfo.page
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<page id="GIRepository.BaseInfo"
+ type="guide"
+ style="record"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:ui="http://projectmallard.org/experimental/ui/">
+ <info>
+ <link type="guide" xref="index"/>
+ </info>
+ <title>GIRepositoryBaseInfo</title>
+<p>GIBaseInfo is the common base struct of all other *Info structs
+accessible through the <link xref="GIRepository">GIRepository</link> API.
+All other structs can be casted to a <link xref="GIBaseInfo">GIBaseInfo</link>, for instance:
+&lt;example&gt;
+&lt;title&gt;Casting a <link xref="GIFunctionInfo">GIFunctionInfo</link> to <link xref="GIBaseInfo">GIBaseInfo</link>&lt;/title&gt;
+&lt;programlisting&gt;
+GIFunctionInfo *function_info = ...;
+GIBaseInfo *info = (GIBaseInfo*)function_info;
+&lt;/programlisting&gt;
+&lt;/example&gt;
+Most <link xref="GIRepository">GIRepository</link> APIs returning a <link xref="GIBaseInfo">GIBaseInfo</link> is actually creating a new struct, in other
+words, g_base_info_unref() has to be called when done accessing the data.
+GIBaseInfos are normally accessed by calling either
+g_irepository_find_by_name(), g_irepository_find_by_gtype() or g_irepository_get_info().</p><p>&lt;example&gt;
+&lt;title&gt;Getting the Button of the Gtk typelib&lt;/title&gt;
+&lt;programlisting&gt;
+GIBaseInfo *button_info = g_irepository_find_by_name(NULL, "Gtk", "Button");
+... use button_info ...
+g_base_info_unref(button_info);
+&lt;/programlisting&gt;
+&lt;/example&gt;</p><p>&lt;refsect1 id="gi-gibaseinfo.struct-hierarchy" role="struct_hierarchy"&gt;
+&lt;title role="struct_hierarchy.title"&gt;Struct hierarchy&lt;/title&gt;
+&lt;synopsis&gt;
+GIBaseInfo
++----&lt;link linkend="gi-GIArgInfo"&gt;GIArgInfo&lt;/link&gt;
++----&lt;link linkend="gi-GICallableInfo"&gt;GICallableInfo&lt;/link&gt;
++----&lt;link linkend="gi-GIConstantInfo"&gt;GIConstantInfo&lt;/link&gt;
++----&lt;link linkend="gi-GIFieldInfo"&gt;GIFieldInfo&lt;/link&gt;
++----&lt;link linkend="gi-GIPropertyInfo"&gt;GIPropertyInfo&lt;/link&gt;
++----&lt;link linkend="gi-GIRegisteredTypeInfo"&gt;GIRegisteredTypeInfo&lt;/link&gt;
++----&lt;link linkend="gi-GITypeInfo"&gt;GITypeInfo&lt;/link&gt;
+&lt;/synopsis&gt;
+&lt;/refsect1&gt;</p></page>