summaryrefslogtreecommitdiff
path: root/giscanner/docwriter.py
Commit message (Collapse)AuthorAgeFilesLines
* giscanner: Create AST nodes for SECTION: doc blocks; add a GIR nodedoc-sectionsJasper St. Pierre2014-06-101-0/+2
| | | | | These will eventually be paired with the sections file parser to create a set of sections.
* docwriter/gjs: fix boolean return valuesGiovanni Campagna2014-03-051-1/+1
| | | | | | | | | | | | | | 'ok' != 'return_value', and we never restore 'Returns:'. At the same time, do the same fix for (out) parameters if the return value is void, so this void my_object_get_foo (MyObject *object, Foo *) is turned into function get_foo() : Foo Returns: ....
* docwriter/gjs: restore documentation for return valuesGiovanni Campagna2014-03-051-2/+4
|
* docwriter/gjs: format GObject.Closure as "Function"Giovanni Campagna2014-03-051-0/+2
| | | | | | | | | | GClosures are represented in gjs as JS functions for in parameters, so it makes sense to use Function in place of the boxed structure (which is also not part of the documentation) Note that GClosures returned from C code are marshalled as boxed types, but this is a gjs bug really, and JS code should never touch them.
* docwriter: format bitfields like enumsGiovanni Campagna2014-03-051-2/+2
| | | | They are enums after all.
* docwriter/gjs: format GObject.Value as "Any"Giovanni Campagna2014-03-051-0/+2
| | | | | | GValues are transparently marshalled by GJS, so you can never use them as boxed (and they are not part of the documentation as such).
* docwriter: improve xrefsGiovanni Campagna2014-02-261-7/+17
| | | | | | | | | | | If a xref points to a node that was not visited, because it was not introspectable, don't assume it has no parent. Instead, try to fetch the parent from the node directly. This is still wrong (the xref points nowhere because no page is generated), but it looks less wrong. If OTOH a xref points to a different namespace, generate the link directly, because yelp-build is not capable of translating it.
* docwriter: extend the "node without namespace" filtering to all languagesGiovanni Campagna2014-02-261-8/+8
| | | | | | As the comment says, it's an AST bug, the structure there cannot be reasonably represented in gobject-introspection, and it makes the tests for C and Python crash, so whatever.
* docwriter: don't ignore disguised structuresGiovanni Campagna2014-02-261-2/+4
| | | | | | Unless they have no methods, static methods and constructors (because then they are useless) Fixes GLib.BookmarkFile, GLib.PatternSpec and probably others.
* docwriter/gjs: fix constructorsGiovanni Campagna2014-02-261-12/+13
| | | | | | | | | | We should only look at introspectable constructors when resolving the default and zero args. Also, a disguised structure or one with zero fields can't be allocated directly. In addition, restore availability of all constructors, because we need a page to document the default one, and because some classes have problems with GObject construction.
* docwriter/gjs: include non GObject instantiatable typesGiovanni Campagna2014-02-261-13/+10
| | | | | | Support for fundamental types was just merged in gjs, so just filter out GParamSpec subclasses (because there is only one class in gjs)
* docwriter/gjs: add support for shadowed function namesGiovanni Campagna2014-02-261-4/+16
| | | | | If a function is shadowed, omit it from the documentation, and if a function shadows, uses the new name.
* docwriter/gjs: report arrays of (u)int8 and GBytes as ByteArrayGiovanni Campagna2014-02-261-1/+6
| | | | | The ByteArray class is special in gjs, it's not a normal Array, so make sure it's flagged as such.
* docwriter/gjs: ignore nodes without a namespaceGiovanni Campagna2014-02-261-0/+8
| | | | g-ir-compiler ignores them too, and they cause a crash, so whatever.
* doctool/Gjs: some more fixes for structs and unionsGiovanni Campagna2014-02-201-1/+3
| | | | | | | | | | | | | | Stop pretending we have fields on unions (only methods are supported). Add minimal support (ie, don't crash) to nested structures, that due to how ast works have namespace None (and the transformers hard-depend on that). Uncovered by GLib's GDoubleIEEE754, before I removed union fields. For some reason, RegressTestStructE (anonymous union) has a completely different behavior and generates a weird name, while RegressLikeGnomeKeyringSchema (array of unnamed structs) becomes array(gpointer). Bah, one should have methods anyway...
* doctool: improve Gjs documentationGiovanni Campagna2014-02-201-51/+319
| | | | | | | | | | | | | | | - Add documentation for structures, fields, constants and callbacks - Improve the synopsis for interfaces to have prerequisites and known implementations - Respect gjs constraints for field writability - Format in and out parameters for callables according to GJS conventions - Format property names according to the GJS API - Show boxed constructors according to how they can be used in the gjs API https://bugzilla.gnome.org/show_bug.cgi?id=724735
* docwriter: Don't render private nodesJasper St. Pierre2014-01-311-0/+3
| | | | | This prevents fields like __gtk_reserved1 from being emitted in the documentation.
* tests: Update misc/pep8.py to 1.4.5Dieter Verfaillie2013-05-071-7/+16
| | | | | | | | | | | | | | | | | Version in our tree is a wee bit outdated. For example, later work will introduce an utf8 encoded python source file which our old pep8.py does not yet understand (yeah, it really was *that* ancient)... Updated from: https://raw.github.com/jcrocholl/pep8/1.4.5/pep8.py Takes 552c1f1525e37a30376790151c1ba437776682c5, f941537d1c0a40f0906490ed160db6c79af572d3, 5a4afe2a77d0ff7d9fea13dd93c3304a6ca993de and a17f157e19bd6792c00321c8020dca5e5a281f45 into account... https://bugzilla.gnome.org/show_bug.cgi?id=699535
* giscanner: remove unused variables and importsDieter Verfaillie2013-04-091-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=697615
* doctool: Use builtin namespace walkerColin Walters2013-02-261-22/+31
| | | | | | Rather than hand-rolling our own. This ensures we traverse all nodes. https://bugzilla.gnome.org/show_bug.cgi?id=694593
* docwriter: Use the fully-qualified name for functions and methodsJasper St. Pierre2013-02-151-3/+3
|
* docwriter: Add support for adding additional attrs to the xref writerJasper St. Pierre2013-02-151-3/+4
|
* docwriter: Clean up make_page_idJasper St. Pierre2013-02-151-21/+8
| | | | Make it use a simple recursive technique similar to format_page_name.
* ast: Rename Class.parent to parent_typeJasper St. Pierre2013-02-151-2/+2
| | | | | | | | | The eventual model I want to have is that .parent is the "container" of the node. In all the cases where we don't explicitly set the parent, this is the namespace, but having this under one field name would be a big cleanup for the docwriter. https://bugzilla.gnome.org/show_bug.cgi?id=693876
* doctool: Rename page_style to page_kindJasper St. Pierre2013-02-151-3/+3
|
* docmain: Create the output dir for us if it doesn't existJasper St. Pierre2013-02-151-0/+6
|
* docwriter: Don't render constants for nowJasper St. Pierre2013-02-151-1/+4
| | | | | | Clutter has thousands of keysym constants, and until we get them all on one page, this is just tons of tiny files that are just noise.
* docwriter: Skip non-introspectable nodes in introspectable languagesJasper St. Pierre2013-02-141-0/+3
|
* docwriter: Introduce a base formatter for introspectable languagesJasper St. Pierre2013-02-141-12/+10
| | | | | | Introspectable languages share a non-zero set of base semantics, so it will become easier to implement these shared semantics here, rather than copy-paste code.
* docwriter: Format list types as if they are arraysJasper St. Pierre2013-02-141-2/+2
| | | | Language bindings don't actually care
* docwriter: Support formatting of types without c:typesJasper St. Pierre2013-02-111-1/+4
| | | | This can happen for properties/signals.
* docwriter: Support varargs in parameter namesJasper St. Pierre2013-02-111-1/+6
|
* docwriter: Skip lots of special kinds of parametersJasper St. Pierre2013-02-111-1/+16
| | | | Gjs ignores all of these when constructing function signatures.
* docwriter: Define a new formatter method for getting paramsJasper St. Pierre2013-02-111-0/+12
| | | | | | | | This will let us gracefully skip over parameters that aren't exposed by specific language bindings. It also fixes a bug in the C/Python documentation where we weren't iterating over the right parameters.
* doctool: Rebrand mallardwriter as docwriterJasper St. Pierre2013-02-011-0/+593
We eventually want to stop using Mallard as a documentation language. Rationale incoming when I convert all templates back to DocBook.