File: sec-wrapping-documentation.html

package info (click to toggle)
gtkmm-documentation 4.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,772 kB
  • sloc: cpp: 15,541; javascript: 1,208; makefile: 1,080; python: 401; xml: 106; perl: 67; sh: 8
file content (95 lines) | stat: -rw-r--r-- 4,714 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="highlight.min.css">
<script src="highlight.min.js"></script><script>
      hljs.configure({languages: ['cpp']});
      hljs.highlightAll();
    </script><title>Documentation</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Programming with gtkmm 4">
<link rel="up" href="chapter-wrapping-c-libraries.html" title="Appendix G. Wrapping C Libraries with gmmproc">
<link rel="prev" href="sec-wrapping-problems.html" title="Problems in the C API.">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Documentation</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="sec-wrapping-problems.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<th width="60%" align="center">Appendix G. Wrapping C Libraries with gmmproc</th>
<td width="20%" align="right"> </td>
</tr>
</table>
<hr>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="sec-wrapping-documentation"></a>Documentation</h2></div></div></div>


<p>In general, gtkmm-style projects use Doxygen, which reads specially formatted C++ comments and generates HTML documentation. You may write these doxygen comments directly in the header files.</p>

<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="wrapping-reusing-c-documentation"></a>Reusing C documentation</h3></div></div></div>


<p>You might wish to reuse documentation that exists for the C library that
  you are wrapping. GTK-style C libraries typically use gtk-doc or gi-docgen and therefore
  have source code comments formatted for gtk-doc or gi-docgen and some extra documentation
  in .sgml and .xml files. The docextract_to_xml.py script, from glibmm's
  <code class="filename">tools/defs_gen</code> directory, can read these files and
  generate an .xml file that <span class="command"><strong>gmmproc</strong></span> can use to generate
  doxygen comments. <span class="command"><strong>gmmproc</strong></span> will even try to transform the
  documentation to make it more appropriate for a C++ API.</p>
<p>
For instance,</p>
<pre class="programlisting"><code class="code">./docextract_to_xml.py -s ~/checkout/gnome/gtk/gtk/ &gt; gtk_docs.xml
</code></pre>
<p>Because this automatic transformation is not always appropriate, you might
    want to provide hand-written text for a particular method. You can do this
    by copying the XML node for the function from your
    <code class="filename">something_docs.xml</code> file to the
    <code class="filename">something_docs_override.xml</code> file and changing the
    contents. Alternatively you can write your own documentation in the
    <code class="filename">.hg</code> file.</p>
</div>

<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="wrapping-documentation-build-structure"></a>Documentation build structure</h3></div></div></div>


<p>If you copied the skeleton source tree in <span class="application">mm-common</span> and substituted the
  placeholder text, then you will already have suitable <code class="filename">meson.build</code>
  and <code class="filename">Doxyfile.in</code> files in the <code class="filename">doc/reference/</code>
  directory. You probably need to modify the <code class="varname">tag_file_modules</code>
  variable in <code class="filename">meson.build</code>, though.
  With the <span class="application">mm-common</span> build setup, the list
  of Doxygen input files is not defined in the Doxygen configuration file, but passed
  along from <span class="command"><strong>meson/ninja</strong></span> to the standard input of <span class="command"><strong>doxygen</strong></span>.
</p>
</div>

</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="sec-wrapping-problems.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<td width="20%" align="center"><a accesskey="u" href="chapter-wrapping-c-libraries.html"><img src="icons/up.png" alt="Up"></a></td>
<td width="40%" align="right"> </td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Problems in the C API. </td>
<td width="20%" align="center"><a accesskey="h" href="index.html"><img src="icons/home.png" alt="Home"></a></td>
<td width="40%" align="right" valign="top"> </td>
</tr>
</table>
</div>
</body>
</html>