Commit Graph

3058 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
0bda424669 docs(glib): Fix link in string-utils ref 2024-09-12 06:04:34 -04:00
Philip Withnall
b02e29558f
docs: Set -Dglib_debug=enabled by default and document it for distros
As per https://gitlab.gnome.org/GNOME/glib/-/issues/3421#note_2206315:

It seems like there’s agreement that glib_debug should be enabled for
developers and disabled for distros; and it also seems like there’s no
reliable way to figure this out magically (because not everyone ties
things to `-Dbuildtype=*`). So, we’re left with forcing some group of
people to manually set the value of `glib_debug`. There are more
developers/contributors than there are distros, and distros are more
likely to notice an accidentally-slow GLib package than developers are
likely to notice an accidentally-not-asserting-hard-enough local build,
so let’s say:

The default should be `-Dglib_debug=enabled`, and distros should probably
all override that to `-Dglib_debug=disabled`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3421
2024-08-25 18:34:05 +01:00
Philip Withnall
b4332b0056
docs: Clarify distinction between GDrive, GVolume and GMount
Provide examples of what they all represent, and expand on the
descriptions of them in a few places.

Move references to their equivalents from `GnomeVFS` to lower down in
the documentation, since `GnomeVFS` has been deprecated for many years
now, and is unlikely to be pertinent to most readers.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-15 11:32:37 +01:00
Simon McVittie
cc6f09f3f6 docs: Clarify an example in GObject concepts.md
Continue the existing example to make things more joined up and concrete.
2024-07-24 09:14:20 +00:00
Philip Withnall
35d76da8c8
docs: Clarify conventions about type naming and name mangling in GObject
These rules are not new, they’ve been around for a long time and are
needed to allow introspection machinery to be able to work reliably and
deterministically.

Unfortunately, they have not been documented canonically in one place
before.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-07-23 14:22:00 +02:00
Philip Withnall
a8b1e818f3
docs: Improve typesetting of GObject naming conventions slightly
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-07-22 18:56:04 +02:00
Philip Withnall
0b8f69b28a
docs: Clarify that G_GNUC_UNUSED can’t be used on definitions
Only on declarations.

This has now bitten me multiple times.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-07-20 19:11:13 +02:00
Philip Withnall
a931a75c4f docs(GNode): Traversal diagrams, color & dark-mode
* Create a dark-mode variant of each traversal diagram, with the
  traversal path colorized `--primary` blue, instead of the original
  black.
* Apply the same colorizations to the light-mode diagrams, but
  using the light-theme `--primary` blue.
* Add SPDX license/copyright comments to all eight SVG files.
* Add new files to documentation configs in `glib.toml.in`.
* Update documentation comment in `gnode.c` to embed both color
  variants via picture tags, instead of markdown image embeds.
* Add alt text to all four images.
* Add additional blank lines to documentation comment, so that
  a. First item in bulleted list does not get folded into
     preceding intro paragraph
  b. Intro paragraph and diagrams are not part of first paragraph
     in documentation. (This also gets them out of the top-level
     table-of-contents/index list, where they previously appeared
     in full.)
* (Accidental change I didn't realize I was making): Convert line
  endings in breadth-first diagram from CRLF to LF.
2024-07-15 15:58:45 +00:00
Emmanuele Bassi
a807604ef6 docs: Add source location URL
If the base URL for source location is set, gi-docgen will automatically
generate a link to the location of declarations and doc blocks in the
source.
2024-07-09 20:17:09 +01:00
FeRD (Frank Dana)
f4d944119c Menu model example: Update diagram
- Add licensing tags
- Tweak spacing, colors, line thicknesses
- Create light-mode version
- Use `<picture>` tag to include appropriate version for each media
  color scheme.
2024-07-04 12:13:53 +01:00
FeRD (Frank Dana)
85c8a7c0d8 Docs: Replace Gio.MenuModel diagram with SVG
Recreate the `menu-model.png` diagram in SVG, with box outlines and
connectors recolored from black to white. This will allow the diagram
to show up better in the dark documentation theme.
2024-07-04 12:13:53 +01:00
Emmanuele Bassi
5697c11f1f docs: Update toolchain requirement to C11
We have required C99 for a while; in the meantime, most C toolchains
have moved on to C11 or later as the default C standard.

We still allow for C99 toolchains, but in the future we are going to
require a C11 toolchain to build and use GLib.
2024-06-14 12:35:21 +01:00
Benjamin Gilbert
3e00a88e19 build: Rename meson_options.txt to meson.options
The new name is a bit cleaner and is supported by all versions of Meson
that we support.
2024-06-13 04:50:04 -05:00
Philip Withnall
5bcc6ad458 Merge branch 'glib-compile-schemas-docs-1' into 'main'
docs: Mention XDG_DATA_HOME in glib-compile-schemas manual

See merge request GNOME/glib!4100
2024-06-03 10:56:41 +00:00
Philip Withnall
24dd331c2c Merge branch 'ebassi/issue-2896' into 'main'
Build HTML versions of the man pages

Closes #2896

See merge request GNOME/glib!4090
2024-06-02 15:15:31 +00:00
Emmanuele Bassi
10fd218666 Build HTML versions of the man pages
And install them in the same directory as the API reference, so it's
possible to link them.

Fixes: #2896
2024-06-02 15:15:31 +00:00
Keyu Tao
b27e6b1a43 docs: Mention XDG_DATA_HOME in glib-compile-schemas manual
glib-compile-schemas considers XDG_DATA_HOME in addition to
XDG_DATA_DIRS since GLib 2.53.2, but this is not mentioned in its manual
and might bring confusion to readers.
2024-06-02 03:12:15 +08:00
Matthijs Velsink
c260521056 docs: Add and use anchors in conversion-macros
The documented conversion macros don't have their own page, so can't be
linked to directly.

Instead, introduce and use anchors for them.
2024-05-27 23:31:15 +02:00
Matthijs Velsink
f2df7c3115 docs: Add GTYPE_TO_POINTER/GPOINTER_TO_TYPE
Commit d0e03f09 introduced GTYPE_TO_POINTER/GPOINTER_TO_TYPE, on which
work started before the move of conversion macros to Markdown. It did
get merged after that move, but the macros never made it into the docs.

Let's do so now.
2024-05-27 23:24:42 +02:00
Matthijs Velsink
9b153495b6 docs: Improve conversion-macros formatting
There is no need to use double backticks. Also, insert extra newlines
between header and item, which paragraphs the item [1, 2], increading
readability by giving a little more "breathing" room between items. This
is also done in `macros.md`. Also, indentation of the definition block
should technically be 4 if extra paragraphs are needed, but it's better
to use 4 indentation always to prevent future problems after edits.

[1] https://python-markdown.github.io/extensions/definition_lists/
[2] https://michelf.ca/projects/php-markdown/extra/#def-list
2024-05-22 22:40:31 +02:00
Emmanuele Bassi
af7c7c0495 Merge branch '3369-dead-links' into 'main'
docs: Fix broken links in gdbus-codegen documentation

Closes #3369

See merge request GNOME/glib!4086
2024-05-21 10:27:29 +00:00
Philip Withnall
066a2cd8cc
docs: Fix broken links in gdbus-codegen documentation
Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3369
2024-05-20 13:50:46 +01:00
Jan Tojnar
c068c1cd74 docs: Remove hex escape mention in gvariant-text-format bytestring
bytestring_parse does not actually support hexadecimal escape sequences.
2024-05-20 13:31:03 +01:00
Jan Tojnar
460a9c299c docs: Adjust gvariant-text-format reference on bytestring escapes
- Do not refer to people’s expectation, they can wildly differ.
- Do not link to `strcompress`, that confusingly does not support `\a`. Link Wikipedia instead.
- Reiterate the C escape sequences from string section, they are not that many.
- Mention escaping newline and other characters (also copied from string section).
- Mention Unicode escapes not being supported to contrast with strings.
2024-05-19 00:55:45 +02:00
Jan Tojnar
32b8a8400d docs: Link Wikipedia on C escapes in gvariant-text-format for strings
Unlike in the bytestring section there is no link to explanation.
2024-05-19 00:55:45 +02:00
Jan Tojnar
56d8f14ab2 docs: Correct octal format in gvariant-text-format
There is no o or 0 prefix, just one to three octal numbers.
2024-05-19 00:31:25 +02:00
Philip Withnall
3807fae17e Fix consistency of code blocks
Use the appropriate code blocks for strings, file names,
and extensions.
2024-05-16 22:45:53 +01:00
Emmanuele Bassi
91a08c01f3 Document the magic gettext macros in gi18n.h
These symbols are barely introspectable, which means they have to be
collected into the existing i18n content document.

Fixes: #3361
2024-05-16 22:45:53 +01:00
Michael Catanzaro
412805357a Merge branch 'update-fedora-ci-image' into 'main'
ci: Update Fedora CI image to Fedora 39

See merge request GNOME/glib!4075
2024-05-15 14:27:02 +00:00
Philip Withnall
21fa4ea91b
ci: Update Fedora CI image to Fedora 39
Fedora 37 is out of support so, as per our policy, update the CI image
to the oldest still-supported release, which is 39.

Update the mingw CI image too, as it’s built on top of the Fedora one.

Update the supported platforms documentation (and fix the Debian version
listed there to match what’s currently in CI, which is up to date).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-15 13:27:47 +01:00
Matthijs Velsink
a8537918bc docs: Fix string-utils paragraph heading
Commit 425731f7 moved string utils docs to a Markdown file, but one of
the paragraph headings was left broken.
2024-05-15 12:07:44 +01:00
Philip Withnall
021d58b251
ci: Add a policy for how to deal with CI failures due to changes in msys2
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-15 11:31:20 +01:00
Michael Catanzaro
cd45ba8638 Correct installation directory of GVariant specification
548ec9f186 accidentally moved the GVariant
spec to the toplevel /usr/share/doc directory, which is surely not
right. Let's move it back into the glib-2.0 subdirectory.

It's debatable whether this is the best place to install the GVariant
specification, since it's not part of the gi-docgen docs, but surely
it's much better than not putting it in any subdirectory.

Fixes #3351
2024-05-07 14:24:38 -05:00
FeRD (Frank Dana)
471bd469f1 docs(gio/overview): Restore missing heading 2024-04-21 23:03:54 +00:00
Jan Tojnar
156e0c865a docs: Fix broken links
The file was renamed in 5d80471d4b.
2024-04-16 14:33:45 +01:00
Jan Tojnar
4a1f1e3681 docs/variant-format: Clarify h type string
It was confusing that int32 was mentioned twice.
2024-04-16 11:41:13 +02:00
Jan Tojnar
f94fc9da1c docs/gvariant-spec: Mention d and h type strings 2024-04-16 11:41:13 +02:00
Ville Skyttä
b20647c2e2 docs: spelling and grammar fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2024-04-01 11:01:06 +00:00
Philip Withnall
ed4f29cce8 gio: Change ‘unrecognised’ to ‘unrecognized’ in various user-visible places
The source language of GLib is technically en-US, so we should
consistently use en-US spellings.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3269
2024-03-27 12:07:42 +00:00
liulinsong
ce39797fa3 Fix a typo 2024-03-27 17:37:55 +08:00
Philip Withnall
548ec9f186 docs: Reduce nesting of documentation directories
The `gi-docgen` tool is not designed to be used like that. In
particular, when nesting documentation directories, the generated
`*.devhelp2` files (needed by Devhelp to show the documentation) are
nested one directory level too deep for Devhelp to find them, and hence
are useless, and the documentation doesn’t show up in this common
documentation viewer.

So, change the installed documentation directory hierarchy:
 * `${PREFIX}/share/doc/glib-2.0/gio` → `${PREFIX}/share/doc/gio-2.0`
 * `${PREFIX}/share/doc/glib-2.0/glib-unix` →
   `${PREFIX}/share/doc/glib-unix-2.0`
 * `${PREFIX}/share/doc/glib-2.0/gobject` →
   `${PREFIX}/share/doc/gobject-2.0`
 * etc.
 * `${PREFIX}/share/doc/glib-2.0/glib` → `${PREFIX}/share/doc/glib-2.0`

This is going to seem like pointless churn (the contents of the
documentation have not changed), and packagers may mourn the split of
content in `/usr/share/doc` from `/usr/share/doc/${package_name}` to
`/usr/share/doc/${pkg_config_id}` instead, but that seems to be the best
approach to fix this issue in GLib. gi-docgen’s behaviour does feel
fairly consistent and correct with the rest of how it works (single
output directory).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3287
2024-03-13 18:51:21 +00:00
Philip Withnall
fafe1a14a8 docs: Minor reformatting / gi-docgenification of signals docs
This is nowhere near a complete check-through and gi-docgenification of
the signals docs, just a few bits I was looking at anyway.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3250
2024-03-07 13:12:07 +00:00
Philip Withnall
8a640f50ca docs: Document signal handler types and arguments
It seems this was missing from the documentation (or, at least, not in
an obvious place).

As spotted on
https://discourse.gnome.org/t/calling-g-main-loop-quit-from-a-signal-handler/19785.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-07 13:12:07 +00:00
Philip Withnall
a6dbfcd601 docs: Slightly rephrase signals docs to not use the first person
The rest of the documentation style is to be more indirect, so let’s
consistently use that.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-06 13:21:56 +00:00
Philip Withnall
536bdabd6e docs: Add subheadings to signals documentation page
Splits the text up a bit and allows linking directly to those subsections.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-06 13:21:30 +00:00
Michael Catanzaro
a767439117 Merge branch 'wip/bobby285271/fix-docs-dir' into 'main'
docs: Fix building with docs enabled and introspection disabled

See merge request GNOME/glib!3955
2024-03-06 01:12:51 +00:00
Bobby Rong
dd97c88f90 docs: Fix building with docs enabled and introspection disabled
We install gvariant-specification-1.0.html to `docs_dir` but that shouldn't require `enable_gir`.

Fixes: docs/reference/glib/meson.build:26:16: ERROR: Unknown variable "docs_dir"
Part-of: <https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3955>
2024-03-05 16:45:21 +00:00
Bobby Rong
c7476cd615 docs: Specify gi-docgen as a native dependency
gi-docgen is supposed to be ran natively on the build machine.

Part-of: <https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3953>
2024-03-05 22:23:01 +08:00
Philip Withnall
9ed0ce21df docs: Fix a typo in the macros docs page
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-29 13:58:53 +00:00
Philip Withnall
257b98027b Merge branch 'wip/smcv/gir-man-pages' into 'main'
Add man pages for gi-* tools

Closes #3260 and gobject-introspection#55

See merge request GNOME/glib!3924
2024-02-15 21:37:35 +00:00