From bedf11b330ebf89e3f813a69f774fb16ee2c49a2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 25 Sep 2023 15:32:12 -0400 Subject: [PATCH] docs: Move the GClosure SECTION Move the contents to the struct docs. Helps: #3037 --- gobject/gclosure.c | 12 +++++++----- gobject/gclosure.h | 10 +--------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/gobject/gclosure.c b/gobject/gclosure.c index 8d5d88d94..d114638c0 100644 --- a/gobject/gclosure.c +++ b/gobject/gclosure.c @@ -39,11 +39,13 @@ /** - * SECTION:gclosure - * @short_description: Functions as first-class objects - * @title: Closures + * GClosure: + * @in_marshal: Indicates whether the closure is currently being invoked with + * g_closure_invoke() + * @is_invalid: Indicates whether the closure has been invalidated by + * g_closure_invalidate() * - * A #GClosure represents a callback supplied by the programmer. + * A `GClosure` represents a callback supplied by the programmer. * * It will generally comprise a function of some kind and a marshaller * used to call it. It is the responsibility of the marshaller to @@ -76,7 +78,7 @@ * * Using closures has a number of important advantages over a simple * callback function/data pointer combination: - * + * * - Closures allow the callee to get the types of the callback parameters, * which means that language bindings don't have to write individual glue * for each callback type. diff --git a/gobject/gclosure.h b/gobject/gclosure.h index 3b139b062..2462bce5e 100644 --- a/gobject/gclosure.h +++ b/gobject/gclosure.h @@ -169,15 +169,7 @@ struct _GClosureNotifyData gpointer data; GClosureNotify notify; }; -/** - * GClosure: - * @in_marshal: Indicates whether the closure is currently being invoked with - * g_closure_invoke() - * @is_invalid: Indicates whether the closure has been invalidated by - * g_closure_invalidate() - * - * A #GClosure represents a callback supplied by the programmer. - */ + struct _GClosure { /*< private >*/