Difference between revisions of "Hacking:API documentation"

From GIMP Developer Wiki
Jump to: navigation, search
m (generating docs from .gir)
 
Line 27: Line 27:
 
|-
 
|-
 
|5. || From the desired subdirectory open the file ''index.html'' for an overview of that module.
 
|5. || From the desired subdirectory open the file ''index.html'' for an overview of that module.
 +
|}
 +
 +
 +
 +
 +
* Generate and browse the Gimp API docs, for a language binding, from your local GI repository:
 +
 +
This assumes you are a builder,
 +
have installed tools for GObject Introspection such as g-ir-doc-tool,
 +
have installed the Gnome help tool yelp, and that when you built or installed Gimp it created the .gir files.
 +
 +
:{|
 +
| 1. ||  '''g-ir-doc-tool --language=Python -o ~/gimp-python-docs /usr/local/share/gir-1.0/Gimp-3.0.gir'''
 +
|-
 +
| || The parameters have the following meaning:
 +
|-
 +
| || --language=Python : generate docs for Python programmers (try C, Lua, JS, ... ?)
 +
|-
 +
| || -o <path> : where to store the output document (in .xml format)
 +
|-
 +
| || /usr/...  the .gir xml file to generate docs from (try Gegl-1.0, Babl-1.0, ...)
 +
|-
 +
|2. ||'''yelp ~/gimp-python-docs'''
 +
|-
 
|}
 
|}

Latest revision as of 20:20, 11 January 2020

There are several ways to get GIMP's API documentation.

1. configure --prefix=$PREFIX --enable-gtk-doc --enable-gtk-doc-app
If you got the sources directly from the Git repository, use autogen.sh instead of configure.
The parameters have the following meaning:
--enable-gtk-doc : use gtk-doc to build documentation
--enable-gtk-doc-app : build developer documentation for app (not only the libgimp* libraries).
To find out more parameters, run configure --help
$PREFIX is a variable for the directory you will install GIMP in.
2. make
3. make install
4. cd $PREFIX/share/gtk-doc/html
5. From the desired subdirectory open the file index.html for an overview of that module.



  • Generate and browse the Gimp API docs, for a language binding, from your local GI repository:

This assumes you are a builder, have installed tools for GObject Introspection such as g-ir-doc-tool, have installed the Gnome help tool yelp, and that when you built or installed Gimp it created the .gir files.

1. g-ir-doc-tool --language=Python -o ~/gimp-python-docs /usr/local/share/gir-1.0/Gimp-3.0.gir
The parameters have the following meaning:
--language=Python : generate docs for Python programmers (try C, Lua, JS, ... ?)
-o <path> : where to store the output document (in .xml format)
/usr/... the .gir xml file to generate docs from (try Gegl-1.0, Babl-1.0, ...)
2. yelp ~/gimp-python-docs