22 Commits

Author SHA1 Message Date
Thomas Martitz
3512f6cc74 gtkdoc: add support for array annotions
We can now use @array and @arraylen{param} annotations for arrays that
will make it to the generated gtkdoc header.

g-ir-scanner cannot properly parse 'gchar **' parameters without this.
2018-12-03 21:51:01 +01:00
Thomas Martitz
0bafb067b9 gtkdoc: fix gtkdoc header script for structs with inline types
Doxygen adds unhandled xml output for structs that define types inline, for
example struct Foo { enum { FOO, BAR } baz; }. A type definitions precedes the
members. The script wrongly assumed the first sectiondef child of compounddef
would contain all members, but actually this is the case for sectiondefs with
kind=public-attrib (the sectiondef defining the type has kind=public-type).
2016-03-14 08:26:45 +01:00
Thomas Martitz
c3c67c96d4 doc: Generate geany-sciwrappers-gtkdoc.h along geany-gtkdoc.h
geany-sciwrappers-gtkdoc.h contains all scintilla_object_* methods. It is
intended that they are going to be exposed through a separate .gir file,
therefore a separate header makes things easier.

This is useful when you want scintlla-related stuff in a separate .gir file or
oarse it specially otherwise.

gen-api-gtkdoc.py: Add switch to write out scintilla_object methods
2016-03-09 23:42:09 +01:00
Thomas Martitz
d868130d78 tagmanager: make doxygen comments and typedefs gtkdoc generation friendly
Because of the missing "typedef struct TMFoo" it was missing from the gtkdoc
header (the struct listings are always without typedef). This is also
consistent with the rest of geany.

@gironly for TMParserType so it's picked up as well.
2016-03-09 22:49:51 +01:00
Thomas Martitz
4a54ee86f3 Include more headers into geany-gtkdoc.h
gtkcompat.h is more convinient, and includes gtk.h and glib.h. Due to
including ScintillaWidget.h, the manual ScintillaObject typedef isn't required
anymore.
2016-03-09 22:49:51 +01:00
Colomban Wendling
ed700a9dc6 Fix forward reference to enumeration types in GtkDoc header
It's invalid to forward-declare enumerations, yet they might be
referenced by typedefs.

Fix this by outputting enumerations first so typedefs can references
them.  As enumerations can't reference other types, it's safe to place
them before anything else.

Closes #952.
Closes #955.
2016-03-09 22:41:48 +01:00
Colomban Wendling
9a854751e1 Fix GtkDoc header generation script to handle references inside typedef 2016-03-04 23:21:23 +01:00
Colomban Wendling
44694f638b Remove unused classes from the GtkDoc header generation script 2016-03-01 16:37:08 +01:00
Colomban Wendling
9ce7c22ad7 Fix Doxygen generation instead of working around incorrect output
Make Doxygen ignore `G_{BEGIN,END}_DECLS` and `GEANY_API_SYMBOL` itself
instead of stripping those manually when parsing the XML output.

This makes Doxygen parsing more robust by ignoring some odd C syntax,
and also improves the HTML version removing some incorrect C code
references.
2016-03-01 16:34:05 +01:00
Colomban Wendling
6f79a94cec Add GPL header to GtkDoc header generation script 2016-02-29 00:34:27 +01:00
Colomban Wendling
00f0ce5991 PEP8 the GtkDoc header generator script a little
But use 110 as line length and leave visual operators alignment alone.
2016-02-28 04:49:51 +01:00
Colomban Wendling
e4bdf45cc6 Add support for out and optional GI annotations 2016-02-28 01:58:48 +01:00
Colomban Wendling
2b8cfb3f84 Use %NULL, %FALSE and %TRUE in the GtkDoc output 2016-02-28 01:02:52 +01:00
Colomban Wendling
7f9129c938 Mark private fields as private in the GtkDoc header 2016-02-20 22:45:53 +01:00
Colomban Wendling
91daa9f9db Fix handling of some GtkDoc annotations 2016-02-19 00:03:30 +01:00
Thomas Martitz
c35f29ae36 scripts: gen-api-gtkdoc.py cleanup
- do not write out scintilla_object_* functions
- remove scioutput file parameter
- do not open output file until after xml parsing to avoid stale files
- fixed simplesect handling
- handle output being a pipe to head or tail
2016-02-16 07:14:11 +01:00
Matthew Brush
8033e26180 Remove commented-out code 2016-02-16 06:52:09 +01:00
Matthew Brush
5a391c79c3 Replace comments and asserts with doc-comments and doc-tests 2016-02-16 06:52:09 +01:00
Matthew Brush
4f3e32e95f Rename global "constant" to follow PEP-8 naming 2016-02-16 06:52:08 +01:00
Matthew Brush
402e771c9b Use 4-space indentation to follow PEP-8
The other Python scripts already follow this convention.
2016-02-16 06:52:08 +01:00
Matthew Brush
5534e5cca0 Move globals into main() function
This prevents running a bunch of top-level code if the module is
ever imported and cleans-up the global namespace.
2016-02-16 06:52:08 +01:00
Thomas Martitz
658821d2dd api: add script to generate {geany,geany-scintilla}-gtkdoc.h
The script reads the doxygen xml output and generates two headers (optionally
a single header) that contains all of the plugin API in gtk-doc format.

Two headers because it's preferrable to group Scintilla related stuff
into its own namespace. This is a lot easier if g-ir-scanner can
work with a separate header file. If we change minds later on the script is
prepared to generate only one header.
2016-02-07 17:50:23 +01:00