devel-docs: add directory structure of the repo to developer docs.

Loosely based on the old structure.xml, except it was widely outdated.
So I removed or updated what was obsolete and added missing folders.

Obviously getting rid of the old `structure.xml` (now we have easier doc
generation through Gitlab).

Finally, I fix the table of contents and replaced the title with some
metadata-style stuff which Gitlab docs suggest (otherwise the document
title ends up in the table of contents, which is a bit silly).
This commit is contained in:
Jehan 2022-01-22 17:44:38 +01:00
parent 66cfa75291
commit fac84db028
2 changed files with 74 additions and 343 deletions

View File

@ -1,4 +1,6 @@
# Developers documentation
---
title: Developers documentation
---
This manual holds information that you will find useful if you
develop a GIMP plug-in or want to contribute to the GIMP core.
@ -7,7 +9,7 @@ People only interested into plug-ins can probably read just the
[Plug-in development](#plug-in-development) section. If you wish to
contribute to all parts of GIMP, the whole documentation is of interest.
[[TOC]]
[TOC]
## Plug-in development
### Concepts
@ -144,6 +146,75 @@ Scheme mini-interpreter and therefore `Script-fu` scripts do not use
### Core Contributors
### Directory structure of the GIMP source tree
### Directory structure of GIMP source tree
GIMP source tree can be divided into the main application, libraries, plug-ins,
data files and some stuff that don't fit into these categories. Here are the
top-level directories:
| Folder | Description |
| --- | --- |
| app/ | Source code of the main GIMP application |
| app-tools/ | Source code of distributed tools |
| build/ | Scripts for creating binary packages |
| cursors/ | Bitmaps used to construct cursors |
| data/ | Data files: brushes, gradients, patterns, images… |
| desktop/ | Desktop integration files |
| devel-docs/ | Developers documentation |
| docs/ | Users documentation |
| etc/ | Configuration files installed with GIMP |
| extensions/ | Source code of extensions |
| icons/ | Official icon themes |
| libgimp/ | Library for plug-ins (core does not link against) |
| libgimpbase/ | Basic functions shared by core and plug-ins |
| libgimpcolor/ | Color-related functions shared by core and plug-ins |
| libgimpconfig/ | Config functions shared by core and plug-ins |
| libgimpmath/ | Mathematic operations useful for core and plug-ins |
| libgimpmodule/ | Abstracts dynamic loading of modules (used to implement loadable color selectors and display filters) |
| libgimpthumb/ | Thumbnail functions shared by core and plug-ins |
| libgimpwidgets/ | User interface elements (widgets) and utility functions shared by core and plug-ins |
| m4macros/ | Scripts for autotools configuration |
| menus/ | XML/XSL files used to generate menus |
| modules/ | Color selectors and display filters loadable at run-time |
| pdb/ | Scripts for PDB source code generation |
| plug-ins/ | Source code for plug-ins distributed with GIMP |
| po/ | Translations of strings used in the core application |
| po-libgimp/ | Translations of strings used in libgimp |
| po-plug-ins/ | Translations of strings used in C plug-ins |
| po-python/ | Translations of strings used in Python plug-ins |
| po-script-fu/ | Translations of strings used in Script-Fu scripts |
| po-tags/ | Translations of strings used in tags |
| po-tips/ | Translations of strings used in tips |
| po-windows-installer/ | Translations of strings used in the Windows installer |
| themes/ | Official themes |
| tools/ | Source code for non-distributed GIMP-related tools |
| .gitlab/ | Gitlab-related templates or scripts |
The source code of the main GIMP application is found in the `app/` directory:
| Folder | Description |
| --- | --- |
| app/actions/ | Code of actions (`GimpAction*` defined in `app/widgets/`) (depends: GTK) |
| app/config/ | Config files handling: GimpConfig interface and GimpRc object (depends: GObject) |
| app/core/ | Core of GIMP **core** (depends: GObject) |
| app/dialogs/ | Dialog widgets (depends: GTK) |
| app/display/ | Handles displays (e.g. image windows) (depends: GTK) |
| app/file/ | File handling routines in **core** (depends: GIO) |
| app/file-data/ | GIMP file formats (gbr, gex, gih, pat) support (depends: GIO) |
| app/gegl/ | Wrapper code for babl and GEGL API (depends: babl, GEGL) |
| app/gui/ | Code that puts the user interface together (depends: GTK) |
| app/menus/ | Code for menus (depends: GTK) |
| app/operations/ | Custom GEGL operations (depends: GEGL) |
| app/paint/ | Paint core that provides different ways to paint strokes (depends: GEGL) |
| app/pdb/ | Core side of the Procedural Database, exposes internal functionality |
| app/plug-in/ | Plug-in handling in **core** |
| app/propgui/ | Property widgets generated from config properties (depends: GTK) |
| app/tests/ | Core unit testing framework |
| app/text/ | Text handling in **core** |
| app/tools/ | User interface part of the tools. Actual tool functionality is in core |
| app/vectors/ | Vectors framework in **core** |
| app/widgets/ | Collection of widgets used in the application GUI |
| app/xcf/ | XCF file handling in **core** |
### Advanced concepts

View File

@ -1,340 +0,0 @@
<?xml version='1.0'?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<article id="structure" lang="en">
<articleinfo>
<title>
Directory Structure of the <application>GIMP</application> Source Tree
</title>
<author>
<firstname>Sven</firstname>
<surname>Neumann</surname>
</author>
<date>2003</date>
<abstract>
<para>
This document outlines the directory structure of the
<application>GIMP</application> source tree. It should help
people to get started with the <application>GIMP</application> code.
</para>
</abstract>
</articleinfo>
<para>
The <application>GIMP</application> source tree can be divided
into the core application, libraries, plug-ins, data files and
some stuff that doesn't fit into these categories. Here is a list
of top-level directories:
</para>
<informaltable>
<tgroup cols="2" align="left">
<tbody>
<row>
<entry><filename>app</filename></entry>
<entry>
The source code of the core GIMP application.
</entry>
</row>
<row>
<entry><filename>build</filename></entry>
<entry>
This is a virtual CVS module that is only here to assist in
building <application>GIMP</application> for Windows.
</entry>
</row>
<row>
<entry><filename>cursors</filename></entry>
<entry>
Bitmaps that are used to construct cursors used by the various
<application>GIMP</application> tools.
</entry>
</row>
<row>
<entry><filename>data</filename></entry>
<entry>
All sorts of data files like brushes, gradients, patterns as well
as the splash image and files to integrate
<application>GIMP</application> into the GNOME desktop.
</entry>
</row>
<row>
<entry><filename>devel-docs</filename></entry>
<entry>
The developers documentation. The file you are looking at (or at
least the source that was used to generate it) is located here.
</entry>
</row>
<row>
<entry><filename>docs</filename></entry>
<entry>
Documentation for users. The man-pages which get installed with
the <application>GIMP</application> as well as reference sheets
for keybindings and other stuff.
</entry>
</row>
<row>
<entry><filename>etc</filename></entry>
<entry>
Configuration files that get installed with the
<application>GIMP</application>.
</entry>
</row>
<row>
<entry><filename>libgimp</filename></entry>
<entry>
The main <application>GIMP</application> library. It provides the
API to write plug-ins in the C programming
language. <application>GIMP</application> itself does not link
against this library.
</entry>
</row>
<row>
<entry><filename>libgimpbase</filename></entry>
<entry>
Basic functions that are shared by the
<application>GIMP</application> application and its plug-ins.
</entry>
</row>
<row>
<entry><filename>libgimpcolor</filename></entry>
<entry>
Color-related functionality that is shared by the
<application>GIMP</application> application and its plug-ins.
</entry>
</row>
<row>
<entry><filename>libgimpmath</filename></entry>
<entry>
A basic set of mathematic operations useful for the the
<application>GIMP</application> application and its plug-ins.
</entry>
</row>
<row>
<entry><filename>libgimpmodule</filename></entry>
<entry>
A small library that abstracts dynamic loading of modules. This is
used to implement loadable color selectors and display filters.
</entry>
</row>
<row>
<entry><filename>libgimpwidgets</filename></entry>
<entry>
User interface elements (widgets) and utility functions that are
shared by the <application>GIMP</application> application and its
plug-ins.
</entry>
</row>
<row>
<entry><filename>m4macros</filename></entry>
<entry>
m4 macros (well, actually just one) which get installed to help
automake to detect a GIMP installation. Useful for plug-in
developers.
</entry>
</row>
<row>
<entry><filename>modules</filename></entry>
<entry>
Color selectors and display filters that can be loaded at
run-time.
</entry>
</row>
<row>
<entry><filename>plug-ins</filename></entry>
<entry>
This directory and its sub-directories hold all the
<application>GIMP</application> plug-ins that are part of the main
<application>GIMP</application> distribution.
</entry>
</row>
<row>
<entry><filename>po</filename></entry>
<entry>
Translations of strings used in the main
<application>GIMP</application> application.
</entry>
</row>
<row>
<entry><filename>po-libgimp</filename></entry>
<entry>
Translations of strings used in libgimp.
</entry>
</row>
<row>
<entry><filename>po-plug-ins</filename></entry>
<entry>
Translations of strings used in <application>GIMP</application>
plug-ins.
</entry>
</row>
<row>
<entry><filename>po-script-fu</filename></entry>
<entry>
Translations of strings used in Script-Fu scripts.
</entry>
</row>
<row>
<entry><filename>regexrepl</filename></entry>
<entry>
Code to handle regular expressions in case your C library does not
support them. These files will not be used for most builds since
modern libc implementation have offer support for regular
expressions.
</entry>
</row>
<row>
<entry><filename>themes</filename></entry>
<entry>
The look of <application>GIMP</application> is themeable to some
extent. This directory at the moment only holds the default theme
but more themes might be added in the future.
</entry>
</row>
<row>
<entry><filename>tips</filename></entry>
<entry>
The helpful tips shown at startup are located here together with
their translations.
</entry>
</row>
<row>
<entry><filename>tools</filename></entry>
<entry>
The source code for some <application>GIMP</application>-related
tools as well as tools used to build the
<application>GIMP</application> application.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
The contents of these directories will be explained in detail in
the following sections.
</para>
<sect1 id="app">
<title>The <application>GIMP</application> application</title>
<para>
The source code of the core <application>GIMP</application>
application is found in the <filename>app</filename> directory.
</para>
<informaltable>
<tgroup cols="2" align="left">
<tbody>
<row>
<entry><filename>app/base</filename></entry>
<entry>
base functionality such as pixel regions, tiles etc.
</entry>
</row>
<row>
<entry><filename>app/paint-funcs</filename></entry>
<entry>
functions to manipulate pixels, part of the base
functionality
</entry>
</row>
<row>
<entry><filename>app/compose</filename></entry>
<entry>
new pixel compositing routines that supersede the code
in <filename>app/paint-funcs</filename>
</entry>
</row>
<row>
<entry><filename>app/config</filename></entry>
<entry>
handling of config files, provides the GimpConfig
interface and the GimpRc object which is used from
all over of the application; depends on GObject
</entry>
</row>
<row>
<entry><filename>app/core</filename></entry>
<entry>
the core of the GIMP core, makes heavy use of GObject
but is not GTK+-dependent
</entry>
</row>
<row>
<entry><filename>app/file</filename></entry>
<entry>
file handling routines, part of the core
</entry>
</row>
<row>
<entry><filename>app/paint</filename></entry>
<entry>
paint core that provides different ways to paint strokes
</entry>
</row>
<row>
<entry><filename>app/plug-in</filename></entry>
<entry>
plug-in handling, part of the core
</entry>
</row>
<row>
<entry><filename>app/pdb</filename></entry>
<entry>
core side of the Procedural Database, exposes internal
functionality by means of the PDB
</entry>
</row>
<row>
<entry><filename>app/text</filename></entry>
<entry>
text handling, part of the core
</entry>
</row>
<row>
<entry><filename>app/vectors</filename></entry>
<entry>
vectors framework, part of the core
</entry>
</row>
<row>
<entry><filename>app/xcf</filename></entry>
<entry>
XCF file handling, part of the core
</entry>
</row>
<row>
<entry><filename>app/display</filename></entry>
<entry>
handles displays (e.g. image windows), part of the GUI
</entry>
</row>
<row>
<entry><filename>app/tools</filename></entry>
<entry>
user interface part of the tools as found in the toolbox.
The actual tool functionality is in the core
</entry>
</row>
<row>
<entry><filename>app/widgets</filename></entry>
<entry>
a collection of widgets used in the application GUI
</entry>
</row>
<row>
<entry><filename>app/gui</filename></entry>
<entry>
the code that puts the user interface together
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1>
</article>