1 [Log Window](#log-window)
2 [GPL header](#gpl-header)
3 [Git change log](#git-change-log)
5 [Documentation](#documentation)
10 # <a name='log-window'>
15 If the first word of the message is "error" or "warning" (case insensitive) the message will be color-coded appropriately.
19 For use with the [GTKInspector](https://wiki.gnome.org/action/show/Projects/GTK/Inspector?action=show&redirect=Projects%2FGTK%2B%2FInspector) to provide a visual indication of where objects are declared.
21 Sample command line call:
22 `GTK_DEBUG=interactive src/geeqie`
24 --------------------------------------------------------------------------------
26 # <a name='gpl-header'>
29 Include a header in every file, like this:
32 * @brief Short description of this file.
36 * Optionally detailed description of this file
41 * This file is a part of Geeqie project (http://www.geeqie.org/).
42 * Copyright (C) 2008 - 2021 The Geeqie Team
44 * This program is free software; you can redistribute it and/or modify it
45 * under the terms of the GNU General Public License as published by the Free
46 * Software Foundation; either version 2 of the License, or (at your option)
49 * This program is distributed in the hope that it will be useful, but WITHOUT
50 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
51 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
57 # <a name='git-change-log'>
60 If referencing a Geeqie GitHub issue, include the issue number in the summary line. Start with a short summary in the first line (without a dot at the end) followed by a empty line.
62 If referencing a Geeqie GitHub issue, include a hyperlink to the GitHub issue webpage in the message body. Use whole sentences beginning with Capital letter. For each modification use a new line. Or you can write the theme, colon and then every change on new line, begin with "- ".
64 See also [A Note About Git Commit Messages](http://www.tpope.net/node/106)
70 `There was the bug that something was wrong. I fixed it.`
73 `- the interface was modified`
74 `- new functions were added`
76 Also please use your full name and a working e-mail address as author for any contribution.
78 --------------------------------------------------------------------------------
83 Indentation: tabs at 4 spaces
88 - of variables & functions: small\_letters
89 - of defines: CAPITAL\_LETTERS
91 Try to use explicit variable and function names.
92 Try not to use macros.
93 Use EITHER "struct foo" OR "foo"; never both
111 if (<cond_very_very_very_very_very_very_very_very_very_long> &&
112 <cond2very_very_very_very_very_very_very_very_very_long>)
125 for (i = 0; i <= 10; i++)
134 gint bar(<var_def>, <var_def>, <var_def>)
140 return 0; // i.e. SUCCESS; if error, you must return minus <err_no>
150 Pragma: (Indentation 2 spaces)
154 # define _(String) (String)
155 #endif /* ENABLE_NLS */
162 Use spaces around every operator (except ".", "->", "++" and "--").
163 Unary operator '*' and '&' are missing the space from right, (and also unary '-').
165 As you can see above, parentheses are closed to inside, i.e. " (blah blah) "
166 In "`function(<var>)`" there is no space before the '('.
167 You MAY use more tabs/spaces than you OUGHT TO (according to this CodingStyle), if it makes your code nicer in being vertically indented.
168 Variables declarations should be followed by a blank line and should always be at the start of the block.
171 Use glib types when possible (ie. gint and gchar instead of int and char).
172 Use glib functions when possible (ie. `g_ascii_isspace()` instead of `isspace()`).
173 Check if used functions are not deprecated.
175 --------------------------------------------------------------------------------
177 # <a name='documentation'>
180 Use American, rather than British English, spelling. This will facilitate consistent
181 text searches. User text may be translated via the en_GB.po file.
183 To document the code use the following rules to allow extraction with doxygen.
184 Do not save with comments. Not all comments have to be doxygen comments.
186 - Use C comments in plain C files and use C++ comments in C++ files for one line
188 - Use '/**' (note the two asterisks) to start comments to be extracted by
189 doxygen and start every following line with " *".
190 - Use '@' to indicate doxygen keywords/commands (see below).
191 - Use the '@deprecated' command to tell if the function is subject to be deleted
192 or to a complete rewrite.
196 To document functions or big structures:
199 * @brief This is a short description of the function.
201 * This function does ...
203 * @param x1 This is the first parameter named x1
204 * @param y1 This is the second parameter named y1
205 * @return What the function returns
206 * You can extend that return description (or anything else) by indenting the
207 * following lines until the next empty line or the next keyword/command.
208 * @see Cross reference
211 To document members of a structure that have to be documented (use it at least
212 for big structures) use the `/**<` format:
213 `int counter; /**< This counter counts images */`
215 Document TODO or FIXME comments as:
225 For further documentation about doxygen see the [Doxygen Manual](https://www.doxygen.nl/index.html).
226 For the possible commands you may use, see [Doxygen Special Commands](https://www.doxygen.nl/manual/commands.html).
228 The file `./scripts/doxygen-help.sh` may be used to integrate access to the Doxygen files into a code editor.
230 The following environment variables may be set to personalize the Doxygen output:
231 `DOCDIR=<output folder>`
232 `SRCDIR=<the folder above ./src>`
236 `INLINE_SOURCES=<YES|NO>`
237 `STRIP_CODE_COMMENTS=<YES|NO>`
239 Ref: [INLINE\_SOURCES](https://www.doxygen.nl/manual/config.html#cfg_inline_sources)
240 Ref: [STRIP\_CODE\_COMMENTS](https://www.doxygen.nl/manual/config.html#cfg_strip_code_comments)
242 To include diagrams (if any) in the Doxygen output, the following are required to be installed. The installation process will vary between distributions:
243 [The PlantUML jar](https://plantuml.com/download)
244 `sudo apt install default-jre`
245 `sudo apt install texlive-font-utils`
249 But in case just think about that the documentation is for other developers not
250 for the end user. So keep the focus.