This page describes how the GIMP source is organized - it will describe what's inside each directory of GIMP, and should help you navigate your way through the source.
- 1 The app directory
- 1.1 app/actions
- 1.2 app/base
- 1.3 app/composite
- 1.4 app/config
- 1.5 app/core
- 1.6 app/dialogs
- 1.7 app/display
- 1.8 app/file
- 1.9 app/gegl
- 1.10 app/gui
- 1.11 app/menus
- 1.12 app/paint
- 1.13 app/paint-funcs
- 1.14 app/pdb
- 1.15 app/tests
- 1.16 app/text
- 1.17 app/tools
- 1.18 app/vectors
- 1.19 app/widgets
- 1.20 app/xcf
The app directory
The app directory contains the source code of GIMP itself, without any external tools or plugins. The only exception for that is the testing framework of GIMP which is also included here.
This folder is truly the guts of GIMP. It contains most of the objects that GIMP deals with - guides, brushes, drawables, images,... If you want to do something to the way objects in GIMP behave or if you want to implement a new type of objects (for example, angular guides, vector layers, ...) this is the first place you'd want to look at. Note that almost every change in this directory requires changes in other places - for example, if I want to implement a new type of layers (let's say vector layers) then you would also need to update the layers tree widget (and not to mention many other things). "Massive" hacks that are not just for implementing one tool or another, but to change/add new objects to GIMP will start here, and will affect many other parts of GIMP so be prepared for lots of work when changing things in here.
The code of all GIMP's dialogs, is inside this directory. Any dialog including simple ones (like renaming a layer) and the most complex ones (Like the preferences dialog) can be found in this directory.
Dialogs should not be confused with dockable areas:
- Dialogs are things which open in response to a specific action. These are not dockable, meaning that they will always be in a floating window of their own
- Dockables (or Docks in short) are parts of the user interface which can be open all of the time and don't have to be available only as a result of a specific action. Dockables can either "float around" like dialogs, or you can drag and drop them to other docks, in order to organize them together in a single window (You "dock" one dockable inside the other).
- Editing a layer's name is done inside a dialog since it's a response to a request to edit the name of a specific layer
- The brushes dialog is a dockable since it makes sense to have it open all the time
The definition of what should be a dock and what should be a dialog is sometimes unclear. But by taking a brief look inside this directory, it's usually very easy to find from the file names if what you are looking for is a dialog or not.
This directory contains the code of the image display. This includes the image projection (i.e. the process of combining the data from all the layers, channels, etc. to an image which can be displayed on screen), the and various functions to draw on the canvas itself (these functions are used to draw guides, grids, and the controls of some tools). Note that although the functions for drawing on the canvas are all located here, the actual code who calls these functions (for example, the code of the rectangle tool which calls these function to draw lines on the canvas) is often located somewhere else
|-- autom4te.cache |-- cursors | `-- xbm |-- data | |-- brushes | |-- dynamics | |-- environ | |-- gradients | |-- images | |-- interpreters | |-- palettes | |-- patterns | |-- tags | `-- tips |-- desktop | |-- 16x16 | |-- 22x22 | |-- 24x24 | |-- 256x256 | |-- 32x32 | |-- 48x48 | |-- 64x64 | `-- src |-- devel-docs | |-- app | |-- libgimp | | |-- html | | |-- tmpl | | `-- xml | |-- libgimpbase | | |-- html | | |-- tmpl | | `-- xml | |-- libgimpcolor | | |-- html | | |-- tmpl | | `-- xml | |-- libgimpconfig | | |-- html | | |-- tmpl | | `-- xml | |-- libgimpmath | | |-- html | | |-- tmpl | | `-- xml | |-- libgimpmodule | | |-- html | | |-- tmpl | | `-- xml | |-- libgimpthumb | | |-- html | | |-- tmpl | | `-- xml | |-- libgimpwidgets | | |-- html | | |-- images | | |-- tmpl | | `-- xml | `-- tools |-- docs |-- etc |-- libgimp |-- libgimpbase |-- libgimpcolor |-- libgimpconfig |-- libgimpmath |-- libgimpmodule |-- libgimpthumb |-- libgimpwidgets |-- m4macros |-- menus |-- modules |-- plug-ins | |-- color-rotate | | `-- images | |-- common | |-- file-bmp | |-- file-faxg3 | |-- file-fits | |-- file-fli | |-- file-ico | |-- file-jpeg | |-- file-psd | |-- file-sgi | |-- file-uri | |-- file-xjt | |-- flame | |-- fractal-explorer | | `-- examples | |-- gfig | | |-- gfig-examples | | `-- images | |-- gimpressionist | | |-- Brushes | | |-- Paper | | `-- Presets | |-- gradient-flare | | `-- flares | |-- help | |-- help-browser | |-- ifs-compose | |-- imagemap | | `-- images | |-- lighting | | `-- images | |-- map-object | |-- maze | |-- metadata | |-- pagecurl | |-- print | |-- pygimp | | |-- doc | | `-- plug-ins | |-- script-fu | | |-- ftx | | |-- scripts | | `-- tinyscheme | |-- selection-to-path | |-- twain | |-- ui | `-- win-snap |-- po |-- po-libgimp |-- po-plug-ins |-- po-python |-- po-script-fu |-- po-tags |-- po-tips |-- themes | |-- Default | | `-- images | `-- Small `-- tools
`-- pdbgen `-- pdb