source: trunk/third/gtk-doc/doc/setting-up.txt @ 20745

Revision 20745, 1.9 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20744, which included commits to RCS files with non-trunk default branches.
Line 
1
2How to Set Up an Application or Library to use GTK-Doc
3======================================================
4
5This assumes that you are using autoconf & automake to build your package.
6
7
81. Insert the code from examples/configure.in into your configure.in.
9   (somewhere before the call to AC_OUTPUT.)
10
112. Create a directory in which you want the docs to be built,
12   e.g. 'myproject/docs/reference'.
13
143. Copy examples/Makefile.am to this directory and edit the variables at
15   the top of the file. (See the GTK+ source for an example.)
16
174. Add the new Makefile to your configure.in's AC_OUTPUT call, and make sure
18   all the SUBDIRS variables are set properly so the docs directory is built.
19
205. If your library or application includes GtkObjects/GObjects, and you want
21   their signals, arguments/parameters and position in the hierarchy to be
22   documented:
23
24   Create a MODULE.types file in the docs directory, e.g. "myproject.types".
25   This should contain any '#include' directives needed to compile a program
26   with your module, and a list of functions to initialize all of the widgets
27   and objects in the library. For example, the gtk.types file starts like
28   this:
29
30        #include <gtk/gtk.h>
31
32        gtk_accel_label_get_type
33        gtk_adjustment_get_type
34        gtk_alignment_get_type
35        gtk_arrow_get_type
36
37
38That's it! If you now build the application or library you should get a
39complete set of documentation. (Note that due to make being awkward the build
40may fail the first time, but if you run make again it should work.)
41
42
43You can tweak the output in several ways:
44
45 o modify the main SGML file to add introductory sections or to split the
46   documentation into several chapters.
47
48 o modify the MODULE-sections.txt file to rearrange the documentation into
49   different sections or a different order (see sections-file.txt for info).
50
51 o add a MODULE-overrides.txt to override particular declarations.
52
53
54Damon
Note: See TracBrowser for help on using the repository browser.