summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/doxygen/General/DoxygenOnAddon.dox
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/doxygen/General/DoxygenOnAddon.dox')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/doxygen/General/DoxygenOnAddon.dox90
1 files changed, 90 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/doxygen/General/DoxygenOnAddon.dox b/xbmc/addons/kodi-addon-dev-kit/doxygen/General/DoxygenOnAddon.dox
new file mode 100644
index 0000000..7502e5e
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/doxygen/General/DoxygenOnAddon.dox
@@ -0,0 +1,90 @@
1/*!
2
3@page Doxygen_On_Addon Doxygen on Kodi's Add-On headers
4
5### This page is for notes on using Doxygen to document the Kodi's Add-On headers source code.
6
7[Doxygen](http://www.stack.nl/~dimitri/doxygen/index.html), is a documentation
8system for C++, C, Java, and some other weird languages. It can generate html
9docs documenting a projects source code, by either extracting special tags from
10the source code (put there by people wanting to make use of doxygen), or doxygen
11attempts to build documentation from existing source.
12
13Doxygen seems to be installed on the NMR systems, type:
14~~~~~~~~~~~~~
15doxygen --version
16~~~~~~~~~~~~~
17
18
19_ _ _
20
21Start doxygen documentation for add-ons always with `///` and on Kodi itself with `/*!`, this makes it more easy to see for which place the documentation is.
22
23<b>Here an example on add-on about function coding style:</b>
24
25\verbatim
26#ifdef DOXYGEN_SHOULD_USE_THIS
27 ///
28 /// \ingroup python_xbmcgui_window
29 /// @brief Sets the resolution
30 ///
31 /// That the coordinates of all controls are defined in. Allows Kodi
32 /// to scale control positions and width/heights to whatever resolution
33 /// Kodi is currently using.
34 ///
35 /// @param[in] res Coordinate resolution to set
36 /// Resolution is one of the following:
37 /// | value | Resolution |
38 /// |:-----:|:--------------------------|
39 /// | 0 | 1080i (1920x1080)
40 /// | 1 | 720p (1280x720)
41 /// | 2 | 480p 4:3 (720x480)
42 /// | 3 | 480p 16:9 (720x480)
43 /// | 4 | NTSC 4:3 (720x480)
44 /// | 5 | NTSC 16:9 (720x480)
45 /// | 6 | PAL 4:3 (720x576)
46 /// | 7 | PAL 16:9 (720x576)
47 /// | 8 | PAL60 4:3 (720x480)
48 /// | 9 | PAL60 16:9 (720x480)
49 /// @return Nothing only added as example here :)
50 /// @param[out] nothingExample Example here, if on value pointer data becomes
51 /// returned.
52 /// @throws TypeError If supplied argument is not of List type, or a
53 /// control is not of Control type
54 /// @throws ReferenceError If control is already used in another window
55 /// @throws RuntimeError Should not happen :-)
56 ///
57 ///
58 ///--------------------------------------------------------------------------
59 ///
60 /// **Example:**
61 /// ~~~~~~~~~~~~~{.py}
62 /// ..
63 /// win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
64 /// win.setCoordinateResolution(0)
65 /// ..
66 /// ~~~~~~~~~~~~~
67 ///
68 setCoordinateResolution(...);
69#else
70 SWIGHIDDENVIRTUAL bool setCoordinateResolution(long res, int &nothingExample);
71#endif
72\endverbatim
73- \verbatim /// \ingroup\endverbatim - Define the group where the documentation part comes in.
74- \verbatim /// @brief\endverbatim - Add a small text of part there.
75- \verbatim /// TEXT_FIELD\endverbatim - Add a bigger text there if needed.
76- \verbatim /// @param[in] VALUE_NAME VALUE_TEXT\endverbatim - To set input parameter defined by name and add a description. There the example also add a small table which is useful to describe values.
77- \verbatim /// @param[out] VALUE_NAME VALUE_TEXT\endverbatim - To set output parameter defined by name and add a description.
78- \verbatim /// @return VALUE_TEXT\endverbatim - To add a description of return value.
79- \verbatim /// @throws ERROR_TYPE ERROR_TEXT\endverbatim - If also exception becomes handled, can you use this for description.
80- \verbatim /// TEXT_FIELD\endverbatim - Add a much bigger text there if needed.
81- \verbatim /// ------------------\endverbatim - Use this to define a field line, e.g. if you add example add this always before, further must you make two empty lines before to prevent add of them on string before!
82- \verbatim /// ~~~~~~~~~~~~~ \endverbatim - Here can you define a code example which must start and end with the defination string, also can you define the code style with e.g. <b>{.py}</b> for Python or <b>{.cpp}</b> for CPP code on the first line of them.
83
84@note Start all `VALUE_TEXT` at same character to hold a clean code on <c>*.cpp</c> or <c>*.h</c> files.\n\n
85 The `#ifdef DOXYGEN_SHOULD_USE_THIS` on example above can be becomes used
86 if for Doxygen another function is needed to describe.
87
88If you want to prevent a part from doxygen can you define <b>`#ifndef DOXYGEN_SHOULD_SKIP_THIS`</b>
89or <b>`#ifdef DOXYGEN_SHOULD_USE_THIS`</b> on the related code.
90*/