docs: Move the GIcon SECTION

Move it to the struct docs.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Helps: #3037
This commit is contained in:
Philip Withnall
2023-10-23 00:23:46 +01:00
parent 9b4bcf1a44
commit 824ae3f931
3 changed files with 21 additions and 26 deletions

View File

@@ -1,6 +1,7 @@
// SPDX-License-Identifier: LGPL-2.1-or-later // SPDX-License-Identifier: LGPL-2.1-or-later
// SPDX-FileCopyrightText: 2023 Matthias Clasen // SPDX-FileCopyrightText: 2023 Matthias Clasen
var baseURLs = [ var baseURLs = [
[ 'GdkPixbuf', 'https://docs.gtk.org/gdk-pixbuf/' ],
[ 'GLib', 'https://docs.gtk.org/glib/' ], [ 'GLib', 'https://docs.gtk.org/glib/' ],
[ 'GModule', 'https://docs.gtk.org/gmodule/' ], [ 'GModule', 'https://docs.gtk.org/gmodule/' ],
[ 'GObject', 'https://docs.gtk.org/gobject/' ], [ 'GObject', 'https://docs.gtk.org/gobject/' ],

View File

@@ -41,38 +41,37 @@
#define G_ICON_SERIALIZATION_MAGIC0 ". " #define G_ICON_SERIALIZATION_MAGIC0 ". "
/** /**
* SECTION:gicon * GIcon:
* @short_description: Interface for icons
* @include: gio/gio.h
* *
* #GIcon is a very minimal interface for icons. It provides functions * `GIcon` is a very minimal interface for icons. It provides functions
* for checking the equality of two icons, hashing of icons and * for checking the equality of two icons, hashing of icons and
* serializing an icon to and from strings. * serializing an icon to and from strings.
* *
* #GIcon does not provide the actual pixmap for the icon as this is out * `GIcon` does not provide the actual pixmap for the icon as this is out
* of GIO's scope, however implementations of #GIcon may contain the name * of GIO's scope, however implementations of `GIcon` may contain the name
* of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon). * of an icon (see [class@Gio.ThemedIcon]), or the path to an icon
* (see [iface@Gio.LoadableIcon]).
* *
* To obtain a hash of a #GIcon, see g_icon_hash(). * To obtain a hash of a `GIcon`, see [method@Gio.Icon.hash].
* *
* To check if two #GIcons are equal, see g_icon_equal(). * To check if two `GIcon`s are equal, see [method@Gio.Icon.equal].
* *
* For serializing a #GIcon, use g_icon_serialize() and * For serializing a `GIcon`, use [method@Gio.Icon.serialize] and
* g_icon_deserialize(). * [func@Gio.Icon.deserialize].
* *
* If you want to consume #GIcon (for example, in a toolkit) you must * If you want to consume `GIcon` (for example, in a toolkit) you must
* be prepared to handle at least the three following cases: * be prepared to handle at least the three following cases:
* #GLoadableIcon, #GThemedIcon and #GEmblemedIcon. It may also make * [iface@Gio.LoadableIcon], [class@Gio.ThemedIcon] and [class@Gio.EmblemedIcon].
* sense to have fast-paths for other cases (like handling #GdkPixbuf * It may also make sense to have fast-paths for other cases (like handling
* directly, for example) but all compliant #GIcon implementations * [class@GdkPixbuf.Pixbuf] directly, for example) but all compliant `GIcon`
* outside of GIO must implement #GLoadableIcon. * 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
* implements #GLoadableIcon. Additionally, you must provide an * implements [iface@Gio.LoadableIcon]. Additionally, you must provide an
* implementation of g_icon_serialize() that gives a result that is * implementation of [method@Gio.Icon.serialize] that gives a result that is
* understood by g_icon_deserialize(), yielding one of the built-in icon * understood by [func@Gio.Icon.deserialize], yielding one of the built-in
* types. * icon types.
**/ **/
typedef GIconIface GIconInterface; typedef GIconIface GIconInterface;

View File

@@ -36,11 +36,6 @@ G_BEGIN_DECLS
#define G_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ICON)) #define G_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ICON))
#define G_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ICON, GIconIface)) #define G_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ICON, GIconIface))
/**
* GIcon:
*
* An abstract type that specifies an icon.
**/
typedef struct _GIconIface GIconIface; typedef struct _GIconIface GIconIface;
/** /**