summaryrefslogtreecommitdiff
path: root/gtkdoc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'wip/smcv/internal-tree' into 'master'Matthias Clasen2020-11-301-1/+51
|\ | | | | | | | | Implement a simple tree structure without using anytree See merge request GNOME/gtk-doc!56
| * Implement a simple tree structure without using anytreewip/smcv/internal-treeSimon McVittie2020-08-251-1/+51
| | | | | | | | | | | | | | | | anytree isn't currently available in Debian or Ubuntu, and seems like a lot of code just to get a tree data structure. Reimplement just the bits we need, with a compatible API. Signed-off-by: Simon McVittie <smcv@debian.org>
* | Merge branch 'master' into 'master'Matthias Clasen2020-11-171-3/+3
|\ \ | | | | | | | | | | | | mkdb: Make transfer annotation tooltips less ambiguous See merge request GNOME/gtk-doc!44
| * | Apply 3 suggestion(s) to 1 file(s)Matthias Clasen2020-11-171-3/+3
| | |
| * | mkdb: Make transfer annotation tooltips less ambiguousDorota Czaplejewicz2020-02-111-3/+3
| |/
* | Ignore deprecation warnings when scanning typesignore-gobject-deprecationsEmmanuele Bassi2020-10-281-0/+10
| | | | | | | | | | | | We annotate deprecated types, which means we get compiler warnings when scanning them. This, coupled to -Werror or similar mechanisms, breaks the build when generating the documentation.
* | scangobj: Use plain C types for some typesMatthias Clasen2020-10-011-6/+14
| | | | | | | | | | | | Use char, int, float, double, instead of their g-prefixed counterparts. This follows the GTK4 api style changes.
* | Recognize the GTK variants of G_DECLARE_Matthias Clasen2020-10-011-3/+3
| | | | | | | | | | | | GTK 4 added its own variant of G_DECLARE_ under the name of GDK_DECLARE_INTERNAL_TYPE. Recognize it.
* | Better index entries for actionsMatthias Clasen2020-10-011-0/+13
| |
* | mkdb: Generate sections for actionsMatthias Clasen2020-10-011-4/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is building on the work in the previous commit. The syntax chosen for doc comments is Class|action. We also need to allow periods in symbols, since those are commonly used to separate prefixes in action names. Here is a typical doc comment for an action: /** * GtkColorChooserWidget|color.select: * @red: the red value, between 0 and 1 * @green: the green value, between 0 and 1 * @blue: the blue value, between 0 and 1 * @alpha: the alpha value, between 0 and 1 * * Emits the #GtkColorChooser::color-activated signal for * the given color. */
* | scangobj: Introspect GTK4 actionsMatthias Clasen2020-10-011-0/+73
| | | | | | | | | | GTK4 can define actions for widget classes. Write these out to a .actions file.
* | Merge branch 'wip/smcv/qsort-null' into 'master'Matthias Clasen2020-10-011-2/+4
|\ \ | | | | | | | | | | | | | | | | | | scangobj: Don't sort an absence of signals/properties Closes #125 See merge request GNOME/gtk-doc!53
| * | scangobj: Don't sort an absence of signals/propertieswip/smcv/qsort-nullSimon McVittie2020-08-211-2/+4
| |/ | | | | | | | | | | | | | | qsort (NULL, 0, ...) is formally considered to be undefined behaviour, and is diagnosed as such by the undefined behaviour sanitizer. Resolves: #125 Signed-off-by: Simon McVittie <smcv@debian.org>
* | mkhtml2: Fix apparent typo "os.getcmd()"wip/smcv/mkhtml2-typoSimon McVittie2020-08-131-1/+1
|/ | | | | | | | | | os.getcwd() would make sense here. This call isn't actually reached in practice, because the gtkdoc-mkhtml2 script entry point always passes something for options.output_dir, even if it's ".". Signed-off-by: Simon McVittie <smcv@debian.org>
* scan: support deprecated struct membersJason Crain2020-01-261-2/+10
| | | | | | | | | | | | | | | | | | gcc allows deprecating members of structs. For example: struct data { int x G_GNUC_DEPRECATED_FOR(replacement); }; However, this currently causes the entire struct to be marked as deprecated and confuses mkdb because it doesn't understand the G_GNUC_DEPRECATED_FOR symbol. Fix this by having the whole struct only be marked as deprecated if the '_DEPRECATED' is after the closing bracket of the struct, similar to how it already does for enums, and having scan automatically remove all G_GNUC_* decorators from struct members, similar to how it already does for functions.
* typedef can be followed by decoratorXavier Claessens2020-01-031-13/+17
|
* Skip G_GNUC_(BEGIN|END)_IGNORE_DEPRECATIONS linesXavier Claessens2020-01-021-0/+5
| | | | | For some reason, glib has to put empty line before and after each of these lines otherwise the symbol following it is undeclared.
* Merge branch 'wip/swilmet/scangobj-fix-warnings' into 'master'Stefan Sauer2019-12-231-3/+3
|\ | | | | | | | | scangobj: fix -Wdouble-promotion warnings See merge request GNOME/gtk-doc!41
| * scangobj: fix -Wdouble-promotion warningsSébastien Wilmet2019-12-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a project passes the -Wdouble-promotion CFLAG when compiling the generated *scan.c file, then it emits some warnings. For example in the Devhelp project: ``` Building documentation for devhelp-3 devhelp-3-scan.c: In function ‘describe_double_constant’: devhelp-3-scan.c:595:39: warning: implicit conversion from ‘float’ to ‘gdouble’ {aka ‘double’} to match other operand of binary expression [-Wdouble-promotion] 595 | #define GTKDOC_COMPARE_FLOAT(x, y) (x <= y && x >= y | ^~ devhelp-3-scan.c:608:12: note: in expansion of macro ‘GTKDOC_COMPARE_FLOAT’ 608 | else if (GTKDOC_COMPARE_FLOAT (value, G_MAXFLOAT)) | ^~~~~~~~~~~~~~~~~~~~ [...] ``` An example where the -Wdouble-promotion CFLAG is used is with the AX_COMPILER_FLAGS Autotools macro, part of autoconf-archive. ----- In the diff, the `value` variable is of type gdouble.
* | mkdb: ensure deterministic index files.Stefan Sauer2019-12-231-1/+1
| |
* | mkhtml2: add a fake resolver to improve speedStefan Sauer2019-12-231-4/+18
| | | | | | | | | | This is a workaround for missing dtd caching in libxml2 that turns into extrem overhead for documents with many xincludes.
* | Please make the output reproducibleChris Lamb2019-12-071-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whilst working on the Reproducible Builds effort [0] we noticed that gtk-doc generates unreproducible output. There will likely be more issues but this one is at least fairly simple in that it iterates over a set structure when printing some .devhelp2 headers, for example: │ │ │ │ - <sub name="Index of new API in 0.99.5" link="api-index-0-99-5.html"/> │ │ │ │ - <sub name="Index of new API in 0.9.22" link="api-index-0-9-22.html"/> │ │ │ │ <sub name="Index of new API in 0.9.0" link="api-index-0-9-0.html"/> │ │ │ │ - <sub name="Index of new API in 0.9.1" link="api-index-0-9-1.html"/> │ │ │ │ + <sub name="Index of new API in 0.9.19" link="api-index-0-9-19.html"/> │ │ │ │ <sub name="Index of new API in 0.99.8" link="api-index-0-99-8.html"/> │ │ │ │ + <sub name="Index of new API in 0.99.5" link="api-index-0-99-5.html"/> │ │ │ │ <sub name="Index of new API in 1.0" link="api-index-1-0.html"/> │ │ │ │ - <sub name="Index of new API in 0.9.19" link="api-index-0-9-19.html"/> │ │ │ │ <sub name="Index of new API in 0.9.2" link="api-index-0-9-2.html"/> │ │ │ │ + <sub name="Index of new API in 0.9.1" link="api-index-0-9-1.html"/> │ │ │ │ + <sub name="Index of new API in 0.9.22" link="api-index-0-9-22.html"/> This was originally filed in Debian as #946311 [1]. [0] https://reproducible-builds.org/ [1] https://bugs.debian.org/946331 Signed-off-by: Chris Lamb <lamby@debian.org>
* mkdb: only output object_index.sgml if not emptyStefan Sauer2019-09-081-9/+9
| | | | | Only output the index if the library provices gobjects. We already do this for the tree_index.sgml.
* mkhtml2: create output-dir if it does not existStefan Sauer2019-09-051-0/+2
|
* mkhtml: add --output-dir paramStefan Sauer2019-09-051-1/+3
| | | | This gives build systems more flexibility.
* mkdb: restore the --output-dir parameterStefan Sauer2019-09-051-1/+1
| | | | This was not used since we converted to python.
* config: fix regression from last merge.Stefan Sauer2019-08-161-1/+2
| | | | | Replace the '*' import with what we use and correctly reference the fields. Fixes #101
* Meson: Fix running tools uninstalledXavier Claessens2019-08-156-53/+36
| | | | | This fix getting directories when builddir!=srcdir which is always the case with Meson.
* mkdb: extract a last db templateStefan Sauer2019-08-151-35/+35
| | | | | This will further change colnames in the generated db a bit, with no visual impact though.
* mkdb: extract another text stripping helperStefan Sauer2019-07-291-18/+31
|
* mkdb: extract common formatting codeStefan Sauer2019-07-291-126/+83
| | | | Unclutter OutputDB() by extracting xml templates and parametizing them.
* mkdb: only output "Types and Values" if not emptyStefan Sauer2019-07-281-9/+12
| | | | | This was so far part of the static file template. Fixes #96
* mkdb: extract helper function in sctruct output generationStefan Sauer2019-07-281-40/+50
| | | | | Add some tests for it too. See #95
* scan: extract and precompile another regexpStefan Sauer2019-07-281-14/+23
|
* scan: update comment after refactoringStefan Sauer2019-07-261-9/+9
|
* scan: extract function to init the scanner from optionsStefan Sauer2019-07-251-65/+81
| | | | This way we don't do this for each file.
* mkdb: fix skipping of inline function bodiesStefan Sauer2019-07-241-7/+12
| | | | | Add a bunch of tests for this. Fixes #90
* scan: extract block skipping to helper function to make it testableStefan Sauer2019-07-241-21/+37
|
* scan: turn old comment blobs into python docstringsStefan Sauer2019-07-241-28/+48
|
* mkdb: fix annotation docs for 'out callee-allocates'Stefan Sauer2019-07-231-1/+1
| | | | Fixes #93
* scan: rewrite brace skipping for inline functionsStefan Sauer2019-07-211-29/+18
| | | | | | | This version is more generic and simpler too. The previous version did handle cases where the first '{' was on the same or new lien differnetly. Fixes #90
* Fix parsing of g_set_object()Xavier Claessens2019-07-171-2/+2
| | | | | GLib wraps its name in parenthesis to avoid macro expansion. A few other functions does the same pattern in glib.
* Support type/enum deprecation decoratorsXavier Claessens2019-07-171-10/+31
| | | | | | | GLib recently introduced new kind of deprecation macros, to annotate types and enum values. For example: `typedef _MyType MyType DEPRECATED_FOR(MyOtherType);`
* scanner: avoid passing regex in command lineXavier Claessens2019-07-171-1/+1
| | | | | | | | | | | | --ignore-decorator takes a regex such as `DEPRECATED_FOR\(.*\)` but that leads to escaping nightmares and doesn't work when using Meson. The ninja backend translates every `\` to `/` otherwise it breaks paths on Windows, it is a know bug in Meson's ninja backend that cannot (easily) be fixed. Workaround this by allowing `DEPRECATED_FOR()` syntax and internally translate that to the proper regex. That's the only use-case I'm aware of.
* scan: enable having '_' as a public api in glibStefan Sauer2019-07-161-5/+7
| | | | | | This is essentially a revert of 070acc5. Fixes #92
* scangobj: reset locale environment variables before runningTing-Wei Lan2019-07-141-3/+7
| | | | | | | | | | | | | | | | | | | | GNU gettext runtime doesn't always honor the locale controlled by libc. On non-glibc platforms, if per-thread locale isn't set, it may try to read environment variables by itself in order to figure out the locale. Therefore, even if setlocale is never called, gettext may still decide to translate text based on environment variables, causing the content of the documentation to be irreproducible because it depends on the environment on the build machine. Furthermore, since setlocale isn't called, LC_CTYPE defaults to C and non-ASCII characters coming from translations get converted to question marks. The result is that the documentation for GObject properties without gtk-doc comments becomes unreadable because blurbs of properties are translated in a broken way. To avoid gettext from doing unnecessary translation during building the documentation, we should set LC_MESSAGES environment variable to C before running the main program. LC_ALL is unset because it overrides LC_MESSAGES. Doing so should be harmless because the program already operates in C locale on systems using glibc.
* scan: enable the new exceptionStefan Sauer2019-07-131-12/+15
| | | | | Fixed one test and removed the other one as is was non-sense one. Add code to handle the exception one level up.
* scan: fix a regression when scanning over inline functionsStefan Sauer2019-07-131-0/+9
| | | | Fixes #90.
* Merge branch 'multiple-object-props' into 'master'Stefan Sauer2019-06-231-1/+3
|\ | | | | | | | | Show property owners See merge request GNOME/gtk-doc!29
| * Show property ownersmultiple-object-propsMatthias Clasen2019-06-221-1/+3
| | | | | | | | | | This helps identify properties on pages with multiple objects.