From f471ebd300e55afa33bc6132a62a2c3bba913b3b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 25 Sep 2023 13:37:36 -0400 Subject: [PATCH] docs: Move the GObject SECTION Move the contents into the struct docs. Helps: #3037 --- gobject/gobject.c | 32 ++++++++++++++++++++------------ gobject/gobject.h | 17 +---------------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/gobject/gobject.c b/gobject/gobject.c index e69b91747..88a1d8063 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -38,22 +38,30 @@ #include "gconstructor.h" /** - * SECTION:objects - * @title: GObject - * @short_description: The base object type - * @see_also: #GParamSpecObject, g_param_spec_object() + * GObject: * - * GObject is the fundamental type providing the common attributes and + * The base object type. + * + * `GObject` is the fundamental type providing the common attributes and * methods for all object types in GTK, Pango and other libraries - * based on GObject. The GObject class provides methods for object + * based on GObject. The `GObject` class provides methods for object * construction and destruction, property access methods, and signal - * support. Signals are described in detail [here][gobject-Signals]. + * support. Signals are described in detail [here][gobject-Signals]. * - * For a tutorial on implementing a new GObject class, see [How to define and - * implement a new GObject][howto-gobject]. For a list of naming conventions for - * GObjects and their methods, see the [GType conventions][gtype-conventions]. - * For the high-level concepts behind GObject, read [Instantiatable classed types: - * Objects][gtype-instantiatable-classed]. + * For a tutorial on implementing a new `GObject` class, see [How to define and + * implement a new GObject](tutorial.html#how-to-define-and-implement-a-new-gobject). + * For a list of naming conventions for GObjects and their methods, see the + * [GType conventions](concepts.html#conventions). For the high-level concepts + * behind GObject, read + * [Instantiatable classed types: Objects](concepts.html#instantiatable-classed-types-objects). + * + * Since GLib 2.72, all `GObject`s are guaranteed to be aligned to at least the + * alignment of the largest basic GLib type (typically this is `guint64` or + * `gdouble`). If you need larger alignment for an element in a `GObject`, you + * should allocate it on the heap (aligned), or arrange for your `GObject` to be + * appropriately padded. This guarantee applies to the `GObject` (or derived) + * struct, the `GObjectClass` (or derived) struct, and any private data allocated + * by `G_ADD_PRIVATE()`. */ /* --- macros --- */ diff --git a/gobject/gobject.h b/gobject/gobject.h index ea0157c35..7d987c4b9 100644 --- a/gobject/gobject.h +++ b/gobject/gobject.h @@ -248,22 +248,7 @@ typedef void (*GObjectFinalizeFunc) (GObject *object); */ typedef void (*GWeakNotify) (gpointer data, GObject *where_the_object_was); -/** - * GObject: - * - * The base object type. - * - * All the fields in the `GObject` structure are private to the implementation - * and should never be accessed directly. - * - * Since GLib 2.72, all #GObjects are guaranteed to be aligned to at least the - * alignment of the largest basic GLib type (typically this is #guint64 or - * #gdouble). If you need larger alignment for an element in a #GObject, you - * should allocate it on the heap (aligned), or arrange for your #GObject to be - * appropriately padded. This guarantee applies to the #GObject (or derived) - * struct, the #GObjectClass (or derived) struct, and any private data allocated - * by G_ADD_PRIVATE(). - */ + struct _GObject { GTypeInstance g_type_instance;