| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
Add DevDocs formatting for GJS
See merge request GNOME/gobject-introspection!57
|
| |
| |
| |
| | |
- Fix autopep8 errors.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
Reflect new string/GdkAtom marshalling that improves clipboard support: https://gitlab.gnome.org/GNOME/gjs/merge_requests/29
|
| |
| |
| |
| |
| |
| |
| | |
Add "plain" -> "text/plain" to the mapping since "plain" is used several
times in the GTK documentation. But also, fix the code that falls back to
no syntax highlighting for an unknown language - it did not check for
KeyError.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Cogl-2.0.gir has the following entry:
<bitfield name="BufferMapHint"
version="1.4"
stability="Unstable"
c:type="CoglBufferMapHint">
<doc xml:whitespace="preserve">...</doc>
<member name="" value="1"
c:identifier="COGL_BUFFER_MAP_HINT_DISCARD">
<doc xml:whitespace="preserve">...</doc>
</member>
<member name="_range"
value="2"
c:identifier="COGL_BUFFER_MAP_HINT_DISCARD_RANGE">
<doc xml:whitespace="preserve">...</doc>
</member>
</bitfield>
The prefix is not picked up correctly and so we get a member without a
name, which crashes the docwriter in to_underscore(). Change that
function to handle this case by giving it a dummy "anonymous member"
name.
|
| |
| |
| |
| |
| |
| | |
Previously, Since:, Deprecated:, and Stability: annotations were all
given the same CSS class. In order to style them differently, we give them
different classes.
|
| |
| |
| |
| |
| | |
This uses the "throws" annotation in the generated docs, adding a "Throws
exception: Yes" if the annotation is present.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously the functions template did not properly use
formatter.get_in_parameters() and formatter.get_out_parameters(), so we
had inaccurate function arguments in the documentation. In particular, I
originally didn't take functions with multiple return values into
account.
|
| |
| |
| |
| |
| |
| | |
Links to enum members, e.g. GLib.MyEnum.FOO, were previously formatted as
GLib.MyEnum.foo, so we add this special case for nodes that are
ast.Members.
|
| |
| |
| |
| | |
For aliases we add a description of what Javascript type they map to.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We add an extra CSS class to default.tmpl to indicate what kind of AST
node is represented here (e.g., ast.Constant). This should properly
belong in get_node_kind() in docwriter.py, but adding extra kinds there
would affect the way that all the other documentation output formats are
generated.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
DevDocs will try to normalize links relative to the current documentation
if it can, and strips ../ off the front, so e.g. a link on the
gio20/gio.file page to ../gobject20/gobject.object will end up resolving
to http://<host>/gio20/gobject20/gobject.object, which doesn't exist.
We clearly mark links to other GIRs with a gir:// URL scheme that DevDocs
won't process automatically, and then fill in the links ourselves in the
DevDocs scraper.
|
| |
| |
| |
| |
| |
| | |
Because of some Ruby naming rules in DevDocs, other GIR modules will have
their documentation in ../namespace10/ instead of ../NameSpace-1.0/, so
change format_external_xref() to match this.
|
| |
| |
| |
| |
| | |
Pages for bare functions (not in a class) were missing descriptions of
their arguments and return values.
|
| |
| |
| |
| |
| |
| |
| | |
We change the style of documentation pages for constants, so that their
values are displayed in a <dt>/<dd> pair. We add a new method to the
formatter family, format_value() which should print the representation of
a constant's value in the target language; much like repr() in Python.
|
| |
| |
| |
| |
| | |
This function was failing on g_iconv() which has a blank name in the GIR
file (its name instead coming from the moved-to attribute.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a def in _doc.tmpl that expands to "deprecated" if the node is
deprecated, and to nothing otherwise. We use it to give the deprecated CSS
class to particular elements. The presence of the class on a symbol's main
entry will inform DevDocs that the symbol is deprecated, though it won't
be formatted in a particular way. The presence of the class on an index
entry will cause the index entry to be struck out, so that it's visually
obvious in the index when a symbol is deprecated.
|
| |
| |
| |
| |
| |
| |
| | |
For GIR nodes with version annotations, such as "Since:", "Deprecated:",
and "Stability:", we generate stability notes at the top of each node's
documentation. These notes are given the CSS class "versioning-note" so
that we can format them nicely in DevDocs.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Skip private fields such as "priv" and "parent_instance". Unfortunately
not all private structure and parent instance fields are marked private,
and not all of them are named "priv" or "parent_instance".
This also includes fields that are contained within anonymous unions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Code blocks, i.e. |[ ]|, were converted into <code> elements, but <pre>
would be more appropriate.
In addition, add four spaces to the start of each line in a <pre> element
so that Markdown will recognize it as code and not mangle it. As explained
in a FIXME comment, a better solution would be to reimplement
DocstringScanner using Markdown extensions so that such confusion becomes
impossible.
|
| |
| |
| |
| |
| |
| | |
This summary, heavily inspired by the one from pgi-docs, is useful when
browsing the page rather than searching for a specific term. It's also
similar to the summary at the top of gtk-doc pages.
|
| |
| |
| |
| |
| |
| |
| | |
In order to generate HTML output that DevDocs can easily scrape and
display, we add a new output format to g-ir-doc-tool (--format=devdocs).
It works similarly to the Mallard output format, but generates very simple
HTML instead. We add a new set of Mako templates to generate this output.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This also removes some "parsing" code for paragraphs, which
is best handled by the actual scanner.
+ Also fixes some pep8 issues.
https://bugzilla.gnome.org/show_bug.cgi?id=745298
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
On OS X, the output of sed as reported back to Python has a newline at
the end. It seems like a good idea to strip whitespace from the symbol
and identifier filter commands anyhow, so strip() the result.
https://bugzilla.gnome.org/show_bug.cgi?id=752468
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For generating other output formats such as DevDocs-ready HTML, we add an
output format option (-f). The default output format is "mallard" which
leaves the existing behaviour unchanged.
We can fold the existing --write-sections-file option into the new output
format option, as a new "sections" format.
|
|/
|
|
|
| |
The docstring states that makedirs() was ported from python3, but
this code part was missing. Found with newer pyflakes.
|
|
|
|
|
|
|
|
| |
Where it's easy add dummy args to match the cast; where the target is a subset just
prevent the warning with a cast to void*.
Provide a real copy function for the boxed type code in regress_foo.
This code is never executed afaics, but why not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Functional changes:
* Consistently check that return code from pkg-config is zero.
* Use shell word splitting rules to process pkg-config output to match
behaviour obtained by running `cc program.cc $(pkg-config --cflags ...)`.
Fixes issue #171 .
* Use user preferred encoding to process output from pkg-config on
Python 3. Python 2 behaviour defaults to using ascii encoding as before.
edit creiter: still ignore pkg-config errors by default for now as we
depend on it when glib is a subproject.
|
|
|
|
| |
as was pointed out in !12
|
| |
|
|
|
|
| |
It's DWORD and gcc complained about defaulting to int.
|
|
|
|
| |
It was never defined because G_OS_WIN32 was used before the glib include.
|
|
|
|
|
|
|
|
|
| |
From what I understand this was to support a g-i built with mingw
using a different msvcrt to work with the official CPython built with
msvc.
Now that we can build with meson there is no need for this anymore as far
as I can see. Just remove the code. Please file a bug if this affects you.
|
|
|
|
|
|
|
|
|
| |
This reverts f345916405d94829696985 and related. The commit states that
both versions are about the same in performance, but the C version is more code and
harder to maintain. It also states that the behaviour re invalid control
characters is better with the C version which produces entities. But those
make any Python xml parser fail, which given that most of our tooling is Python,
doesn't seem better to me, see #135.
|
|
|
|
|
| |
There was a stray test() function already there. Move it to a unittest
file and run it with the other tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows
Instead of passing the filter commands to the shell, split them with the shlex module.
This gives us more control and a more similar behaviour on unix/win32 systems.
I could only find two users in Debian which just call python with some script, so
this seems safe to me.
Adjust the tests accordingly and use the running python executable to test the
functionality as we can be sure that's available on all platforms. Also add a
new test for the symbol filter commadn which wasn't tested before.
|
|
|
|
|
|
|
|
| |
This allows us to build with Python 2 and run tests with it.
This requires the new "python" meson module which was added in 0.46.0 so
bump the required meson version (glib needs a newer one anyway).
Also fixes a small test error under Python 2.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Use a single pattern that matches against potentially complete paths.
* Extract filename only afterwards on platforms where it is necessary.
* Match patterns against complete words in ldd output instead of searching
for them inside the lines - this avoids unintentional matches without
complexity of negative lookbehinds and negative lookaheads.
Fixes issue #208.
|
|\
| |
| |
| |
| | |
dumper: use cflags passed through --cflags-begin/end
See merge request GNOME/gobject-introspection!39
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When GI is build without an installed glib and meson builds glib as
a subproject the include paths are passed through --cflags-begin/end.
The dumper didn't use them but worked anyway if glib was installed
somewhere and pkg-config returned some cflags.
This make the GI build work with meson without having glib installed.
|
| |
| |
| |
| | |
See !24 for the discussion
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Recognize additional floating point types from ISO/IEC TS 18661-3:2015,
that are already in use by glibc. This continues work from commit
8cf3e8e5cf6d0d49db359f50c6eb0bc9ca22fbef and fixes issue #201.
* _Float16
* _Float32
* _Float64
* _Float128
* _Float32x
* _Float64x
* _Float128x
Use a single BASIC_TYPE token for basic types, while using its string
representation as a type name. This also fixes incorrect type used
previously for __uint128_t, __int128_t, __uint128, __int128, and
_Float128 (they have been mapped to int and float respectively).
Also avoid mapping bool and _Bool to gboolean as those are distinct
types and generally ABI incompatible. Fixes issue #202.
After this changes, when _Bool, _Float* or _int128 types are used
as a part of public API, g-ir-scanner will produce warning about
unresolved type. This is appropriate given that they are currently
inexpressible in GIRepository format.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Resolve "Allow multiple output formats"
Closes #134
See merge request GNOME/gobject-introspection!4
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For generating other output formats such as DevDocs-ready HTML, we add an
output format option (-f). The default output format is "mallard" which
leaves the existing behaviour unchanged.
We can fold the existing --write-sections-file option into the new output
format option, as a new "sections" format.
Closes #134.
|