docs: Use code for class names in links

So that they fit with the documentation guidelines, and with the links
generated by gi-docgen.
This commit is contained in:
Emmanuele Bassi 2024-01-15 14:43:53 +00:00
parent 3f9f5c1420
commit b5c07063c3
10 changed files with 46 additions and 38 deletions

View File

@ -14,7 +14,7 @@ The [type@GLib.Quark] methods are quicker, since the strings have to be
converted to [type@GLib.Quark]s anyway. converted to [type@GLib.Quark]s anyway.
Data lists are used for associating arbitrary data with Data lists are used for associating arbitrary data with
[GObject](../gobject/class.Object.html)s, using [`g_object_set_data()`](../gobject/method.Object.set_data.html) and related [`GObject`](../gobject/class.Object.html)s, using [`g_object_set_data()`](../gobject/method.Object.set_data.html) and related
functions. The data is stored inside opaque [type@GLib.Data] elements. functions. The data is stored inside opaque [type@GLib.Data] elements.
To create a datalist, use [func@GLib.datalist_init]. To create a datalist, use [func@GLib.datalist_init].

View File

@ -5,8 +5,8 @@ SPDX-FileCopyrightText: 2012 Dan Winship
# File Utilities # File Utilities
Do not use these APIs unless you are porting a POSIX application to Windows. Do not use these APIs unless you are porting a POSIX application to Windows.
A more high-level file access API is provided as GIO see the documentation A more high-level file access API is provided as GIO; see the documentation
for [GFile](../gio/iface.File.html). for [`GFile`](../gio/iface.File.html).
## POSIX File Wrappers ## POSIX File Wrappers

View File

@ -15,8 +15,8 @@ and asynchronous variants ([func@GLib.spawn_async],
complete shell-like command line ([func@GLib.spawn_command_line_sync], complete shell-like command line ([func@GLib.spawn_command_line_sync],
[func@GLib.spawn_command_line_async]). [func@GLib.spawn_command_line_async]).
See [GSubprocess](../gio/class.Subprocess.html) in GIO for a higher-level API that provides See [`GSubprocess`](../gio/class.Subprocess.html) in GIO for a higher-level API
stream interfaces for communication with child processes. that provides stream interfaces for communication with child processes.
An example of using [func@GLib.spawn_async_with_pipes]: An example of using [func@GLib.spawn_async_with_pipes]:
```c ```c

View File

@ -63,8 +63,9 @@
* be prepared to handle at least the three following cases: * be prepared to handle at least the three following cases:
* [iface@Gio.LoadableIcon], [class@Gio.ThemedIcon] and [class@Gio.EmblemedIcon]. * [iface@Gio.LoadableIcon], [class@Gio.ThemedIcon] and [class@Gio.EmblemedIcon].
* It may also make sense to have fast-paths for other cases (like handling * It may also make sense to have fast-paths for other cases (like handling
* [GdkPixbuf](https://docs.gtk.org/gdk-pixbuf/class.Pixbuf.html) directly, for example) but all compliant `GIcon` * [`GdkPixbuf`](https://docs.gtk.org/gdk-pixbuf/class.Pixbuf.html) directly,
* implementations outside of GIO must implement [iface@Gio.LoadableIcon]. * for example) but all compliant `GIcon` implementations outside of GIO must
* implement [iface@Gio.LoadableIcon].
* *
* If your application or library provides one or more `GIcon` * If your application or library provides one or more `GIcon`
* implementations you need to ensure that your new implementation also * implementations you need to ensure that your new implementation also

View File

@ -103,10 +103,11 @@
* identifies an action in an action group. Which action group(s) provide * identifies an action in an action group. Which action group(s) provide
* actions depends on the context in which the menu model is used. * actions depends on the context in which the menu model is used.
* E.g. when the model is exported as the application menu of a * E.g. when the model is exported as the application menu of a
* [GtkApplication](https://docs.gtk.org/gtk4/class.Application.html), actions can be application-wide or window-specific * [`GtkApplication`](https://docs.gtk.org/gtk4/class.Application.html),
* (and thus come from two different action groups). By convention, the * actions can be application-wide or window-specific (and thus come from
* application-wide actions have names that start with `app.`, while the * two different action groups). By convention, the application-wide actions
* names of window-specific actions start with `win.`. * have names that start with `app.`, while the names of window-specific
* actions start with `win.`.
* *
* While a wide variety of stateful actions is possible, the following * While a wide variety of stateful actions is possible, the following
* is the minimum that is expected to be supported by all users of exported * is the minimum that is expected to be supported by all users of exported

View File

@ -45,9 +45,10 @@
* *
* Users should instantiate a subclass of this that implements all the * Users should instantiate a subclass of this that implements all the
* various callbacks to show the required dialogs, such as * various callbacks to show the required dialogs, such as
* [GtkMountOperation](https://docs.gtk.org/gtk4/class.MountOperation.html). If no user interaction is desired (for example * [`GtkMountOperation`](https://docs.gtk.org/gtk4/class.MountOperation.html).
* when automounting filesystems at login time), usually `NULL` can be * If no user interaction is desired (for example when automounting
* passed, see each method taking a `GMountOperation` for details. * filesystems at login time), usually `NULL` can be passed, see each method
* taking a `GMountOperation` for details.
* *
* Throughout the API, the term TCRYPT is used to mean compatible with TrueCrypt and VeraCrypt. * Throughout the API, the term TCRYPT is used to mean compatible with TrueCrypt and VeraCrypt.
* [TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for * [TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for

View File

@ -65,22 +65,23 @@
* in sync with the property value its state is the property value. * in sync with the property value its state is the property value.
* *
* For example, it might be useful to create a [iface@Gio.Action] corresponding * For example, it might be useful to create a [iface@Gio.Action] corresponding
* to the `visible-child-name` property of a [GtkStack](https://docs.gtk.org/gtk4/class.Stack.html) so that the * to the `visible-child-name` property of a [`GtkStack`](https://docs.gtk.org/gtk4/class.Stack.html)
* current page can be switched from a menu. The active radio indication in the * so that the current page can be switched from a menu. The active radio
* menu is then directly determined from the active page of the * indication in the menu is then directly determined from the active page of
* `GtkStack`. * the `GtkStack`.
* *
* An anti-example would be binding the `active-id` property on a * An anti-example would be binding the `active-id` property on a
* [GtkComboBox](https://docs.gtk.org/gtk4/class.ComboBox.html). This is because the state of the combo box itself is * [`GtkComboBox`](https://docs.gtk.org/gtk4/class.ComboBox.html). This is
* probably uninteresting and is actually being used to control * because the state of the combo box itself is probably uninteresting and is
* something else. * actually being used to control something else.
* *
* Another anti-example would be to bind to the `visible-child-name` * Another anti-example would be to bind to the `visible-child-name`
* property of a [GtkStack](https://docs.gtk.org/gtk4/class.Stack.html) if this value is actually stored in * property of a [`GtkStack`](https://docs.gtk.org/gtk4/class.Stack.html) if
* [class@Gio.Settings]. In that case, the real source of the value is * this value is actually stored in [class@Gio.Settings]. In that case, the
* [class@Gio.Settings]. If you want a [iface@Gio.Action] to control a setting * real source of the value is* [class@Gio.Settings]. If you want
* stored in [class@Gio.Settings], see [method@Gio.Settings.create_action] * a [iface@Gio.Action] to control a setting stored in [class@Gio.Settings],
* instead, and possibly combine its use with [method@Gio.Settings.bind]. * see [method@Gio.Settings.create_action] instead, and possibly combine its
* use with [method@Gio.Settings.bind].
* *
* Since: 2.38 * Since: 2.38
**/ **/

View File

@ -52,9 +52,10 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref)
* *
* Applications and libraries often contain binary or textual data that is * Applications and libraries often contain binary or textual data that is
* really part of the application, rather than user data. For instance * really part of the application, rather than user data. For instance
* [GtkBuilder](https://docs.gtk.org/gtk4/class.Builder.html) `.ui` files, splashscreen images, [class@Gio.Menu] markup * [`GtkBuilder`](https://docs.gtk.org/gtk4/class.Builder.html) `.ui` files,
* XML, CSS files, icons, etc. These are often shipped as files in * splashscreen images, [class@Gio.Menu] markup XML, CSS files, icons, etc.
* `$datadir/appname`, or manually included as literal strings in the code. * These are often shipped as files in `$datadir/appname`, or manually
* included as literal strings in the code.
* *
* The `GResource` API and the * The `GResource` API and the
* [`glib-compile-resources`](glib-compile-resources.html) program provide a * [`glib-compile-resources`](glib-compile-resources.html) program provide a
@ -82,7 +83,7 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref)
* the preprocessing step is skipped. * the preprocessing step is skipped.
* *
* - `to-pixdata` (deprecated since gdk-pixbuf 2.32) which will use the * - `to-pixdata` (deprecated since gdk-pixbuf 2.32) which will use the
* `gdk-pixbuf-pixdata` command to convert images to the [GdkPixdata](https://docs.gtk.org/gdk-pixbuf/class.Pixdata.html) * `gdk-pixbuf-pixdata` command to convert images to the [`GdkPixdata`](https://docs.gtk.org/gdk-pixbuf/class.Pixdata.html)
* format, which allows you to create pixbufs directly using the data inside * format, which allows you to create pixbufs directly using the data inside
* the resource file, rather than an (uncompressed) copy of it. For this, the * the resource file, rather than an (uncompressed) copy of it. For this, the
* `gdk-pixbuf-pixdata` program must be in the `PATH`, or the * `gdk-pixbuf-pixdata` program must be in the `PATH`, or the
@ -155,9 +156,10 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref)
* also use URIs like `resource:///org/gtk/Example/data/splashscreen.png` with * also use URIs like `resource:///org/gtk/Example/data/splashscreen.png` with
* [iface@Gio.File] to access the resource data. * [iface@Gio.File] to access the resource data.
* *
* Some higher-level APIs, such as [GtkApplication](https://docs.gtk.org/gtk4/class.Application.html), will automatically * Some higher-level APIs, such as [`GtkApplication`](https://docs.gtk.org/gtk4/class.Application.html),
* load resources from certain well-known paths in the resource namespace as a * will automatically load resources from certain well-known paths in the
* convenience. See the documentation for those APIs for details. * resource namespace as a convenience. See the documentation for those APIs
* for details.
* *
* There are two forms of the generated source, the default version uses the * There are two forms of the generated source, the default version uses the
* compiler support for constructor and destructor functions (where available) * compiler support for constructor and destructor functions (where available)

View File

@ -48,7 +48,7 @@
* *
* `GVariant` is useful whenever data needs to be serialized, for example when * `GVariant` is useful whenever data needs to be serialized, for example when
* sending method parameters in D-Bus, or when saving settings using * sending method parameters in D-Bus, or when saving settings using
* [GSettings](../gio/class.Settings.html). * [`GSettings`](../gio/class.Settings.html).
* *
* When creating a new `GVariant`, you pass the data you want to store in it * When creating a new `GVariant`, you pass the data you want to store in it
* along with a string representing the type of data you wish to pass to it. * along with a string representing the type of data you wish to pass to it.

View File

@ -88,9 +88,10 @@
* This is similar to how instances of abstract classes may not * This is similar to how instances of abstract classes may not
* directly exist in other type systems, but instances of their * directly exist in other type systems, but instances of their
* non-abstract subtypes may. For example, in GTK, no object that has * non-abstract subtypes may. For example, in GTK, no object that has
* the type of [GtkWidget](https://docs.gtk.org/gtk4/class.Widget.html) can exist (since `GtkWidget` is an * the type of [`GtkWidget`](https://docs.gtk.org/gtk4/class.Widget.html) can
* abstract class), but a [GtkWindow](https://docs.gtk.org/gtk4/class.Window.html) can certainly be instantiated, and * exist (since `GtkWidget` is an abstract class), but a [`GtkWindow`](https://docs.gtk.org/gtk4/class.Window.html)
* you would say that a `GtkWidget` is a `GtkWidget` (since `GtkWidget` is a subclass of `GtkWidget`). * can certainly be instantiated, and you would say that a `GtkWidget` is a
* `GtkWidget` (since `GtkWidget` is a subclass of `GtkWidget`).
* *
* Two types may not be compared by value; use [method@GLib.VariantType.equal] * Two types may not be compared by value; use [method@GLib.VariantType.equal]
* or [method@GLib.VariantType.is_subtype_of] May be copied using * or [method@GLib.VariantType.is_subtype_of] May be copied using
@ -118,7 +119,8 @@
* `a(aa(ui)(qna{ya(yd)}))`. In order to not hit memory limits, * `a(aa(ui)(qna{ya(yd)}))`. In order to not hit memory limits,
* [type@GLib.Variant] imposes a limit on recursion depth of 65 nested * [type@GLib.Variant] imposes a limit on recursion depth of 65 nested
* containers. This is the limit in the D-Bus specification (64) plus one to * containers. This is the limit in the D-Bus specification (64) plus one to
* allow a [GDBusMessage](../gio/class.DBusMessage.html) to be nested in a top-level tuple. * allow a [`GDBusMessage`](../gio/class.DBusMessage.html) to be nested in
* a top-level tuple.
* *
* The meaning of each of the characters is as follows: * The meaning of each of the characters is as follows:
* *