docs: Move the GClosure SECTION

Move the contents to the struct docs.

Helps: #3037
This commit is contained in:
Matthias Clasen 2023-09-25 15:32:12 -04:00 committed by Philip Withnall
parent 7eba4e8f49
commit bedf11b330
2 changed files with 8 additions and 14 deletions

View File

@ -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.

View File

@ -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 >*/