Initial packaging for Tizen
[profile/ivi/gobject-introspection.git] / docs / reference / gi-gir-reference.xml
1 <chapter id="gi-gir-reference">
2
3   <title>The GIR XML format</title>
4
5   <para>
6     This chapter describes the GIR XML markup format.
7   </para>
8
9    <refsect2 id="gi-gir-api">
10      <title><emphasis>api</emphasis> node</title>
11
12      The root node of all GIR documents is the api node.
13
14      Possible children: <link linkend="gi-gir-namespace">namespace</link>.
15
16      <example>
17      <title>A GIR fragment showing an api node</title>
18      <programlisting><![CDATA[
19      <api version="1.0">
20        <namespace/>
21      </api>]]></programlisting>
22      </example>
23
24    </refsect2>
25
26    <refsect2 id="gi-gir-namespace">
27      <title><emphasis>namespace</emphasis> node</title>
28
29      Parent node: <link linkend="gi-gir-api">api</link>.
30      Possible children: <link linkend="gi-gir-callback">callback</link>,
31      <link linkend="gi-gir-class">class</link>,
32      <link linkend="gi-gir-function">function</link>.
33      <link linkend="gi-gir-interface">interface</link>.
34
35      <example>
36      <title>A GIR fragment showing an namespace node</title>
37      <programlisting><![CDATA[
38      <api version="1.0">
39        <namespace="Gtk">
40           <class/>
41           <function/>
42        </namespace>
43      </api>]]></programlisting>
44      </example>
45
46    </refsect2>
47
48    <refsect2 id="gi-gir-class">
49      <title><emphasis>class</emphasis> node</title>
50
51      Parent node: <link linkend="gi-gir-namespace">namespace</link>.
52      Possible children: <link linkend="gi-gir-class">constructor</link>,
53      <link linkend="gi-gir-field">field</link>,
54      <link linkend="gi-gir-method">method</link>,
55      <link linkend="gi-gir-property">property</link>.
56      <example>
57      <title>A GIR fragment showing an class node</title>
58      <programlisting><![CDATA[
59      <api version="1.0">
60        <namespace="Gtk">
61          <class name="Widget">
62             <constructor/>
63             <field/>
64             <method/>
65             <property/>
66          <class>
67        </namespace>
68      </api>]]></programlisting>
69      </example>
70
71    </refsect2>
72
73    <refsect2 id="gi-gir-interface">
74      <title><emphasis>interface</emphasis> node</title>
75
76      Parent node: <link linkend="gi-gir-namespace">namespace</link>.
77      Possible children: <link linkend="gi-gir-field">field</link>,
78      <link linkend="gi-gir-method">method</link>,
79      <link linkend="gi-gir-property">property</link>.
80      <example>
81      <title>A GIR fragment showing an interface node</title>
82      <programlisting><![CDATA[
83      <api version="1.0">
84        <namespace="Gtk">
85          <interface name="Buildable">
86             <field/>
87             <method/>
88             <property/>
89          <interface>
90        </namespace>
91      </api>]]></programlisting>
92      </example>
93
94    </refsect2>
95
96    <refsect2 id="gi-gir-function">
97      <title><emphasis>function</emphasis> node</title>
98
99      Parent node: <link linkend="gi-gir-namespace">namespace</link>.
100      <example>
101      <title>A GIR fragment showing an function node</title>
102      <programlisting><![CDATA[
103      <api version="1.0">
104        <namespace="Gtk">
105          <function name="init">
106          </function>
107        </namespace>
108      </api>]]></programlisting>
109      </example>
110
111    </refsect2>
112
113 </chapter>
114