Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gclosure.h File Reference
#include <gobject/gtype.h>

Go to the source code of this file.

Data Structures

struct  _GClosureNotifyData
 
struct  _GClosure
 
struct  _GCClosure
 

Macros

#define G_CLOSURE_NEEDS_MARSHAL(closure)   (((GClosure*) (closure))->marshal == NULL)
 
#define G_CLOSURE_N_NOTIFIERS(cl)
 
#define G_CCLOSURE_SWAP_DATA(cclosure)   (((GClosure*) (cclosure))->derivative_flag)
 
#define G_CALLBACK(f)   ((GCallback) (f))
 

Typedefs

typedef struct _GClosure GClosure
 
typedef struct _GClosureNotifyData GClosureNotifyData
 
typedef void(* GCallback) (void)
 
typedef void(* GClosureNotify) (gpointer data, GClosure *closure)
 
typedef void(* GClosureMarshal) (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data)
 
typedef void(* GVaClosureMarshal) (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types)
 
typedef struct _GCClosure GCClosure
 

Functions

GOBJECT_AVAILABLE_IN_ALL GClosureg_cclosure_new (GCallback callback_func, gpointer user_data, GClosureNotify destroy_data)
 
GOBJECT_AVAILABLE_IN_ALL GClosureg_cclosure_new_swap (GCallback callback_func, gpointer user_data, GClosureNotify destroy_data)
 
GOBJECT_AVAILABLE_IN_ALL GClosureg_signal_type_cclosure_new (GType itype, guint struct_offset)
 
GOBJECT_AVAILABLE_IN_ALL GClosureg_closure_ref (GClosure *closure)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_sink (GClosure *closure)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_unref (GClosure *closure)
 
GOBJECT_AVAILABLE_IN_ALL GClosureg_closure_new_simple (guint sizeof_closure, gpointer data)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_add_finalize_notifier (GClosure *closure, gpointer notify_data, GClosureNotify notify_func)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_remove_finalize_notifier (GClosure *closure, gpointer notify_data, GClosureNotify notify_func)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_add_invalidate_notifier (GClosure *closure, gpointer notify_data, GClosureNotify notify_func)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_remove_invalidate_notifier (GClosure *closure, gpointer notify_data, GClosureNotify notify_func)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_add_marshal_guards (GClosure *closure, gpointer pre_marshal_data, GClosureNotify pre_marshal_notify, gpointer post_marshal_data, GClosureNotify post_marshal_notify)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_set_marshal (GClosure *closure, GClosureMarshal marshal)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_set_meta_marshal (GClosure *closure, gpointer marshal_data, GClosureMarshal meta_marshal)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_invalidate (GClosure *closure)
 
GOBJECT_AVAILABLE_IN_ALL void g_closure_invoke (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint)
 
GOBJECT_AVAILABLE_IN_ALL void g_cclosure_marshal_generic (GClosure *closure, GValue *return_gvalue, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data)
 
GOBJECT_AVAILABLE_IN_ALL void g_cclosure_marshal_generic_va (GClosure *closure, GValue *return_value, gpointer instance, va_list args_list, gpointer marshal_data, int n_params, GType *param_types)
 

Macro Definition Documentation

◆ G_CALLBACK

#define G_CALLBACK ( f)    ((GCallback) (f))

G_CALLBACK: @f: a function pointer.

Cast a function pointer to a GCallback.

Definition at line 73 of file gclosure.h.

Referenced by activate(), and main().

◆ G_CCLOSURE_SWAP_DATA

#define G_CCLOSURE_SWAP_DATA ( cclosure)    (((GClosure*) (cclosure))->derivative_flag)

G_CCLOSURE_SWAP_DATA: @cclosure: a GCClosure

Checks whether the user data of the GCClosure should be passed as the first parameter to the callback. See g_cclosure_new_swap().

Returns: TRUE if data has to be swapped.

Definition at line 66 of file gclosure.h.

◆ G_CLOSURE_N_NOTIFIERS

#define G_CLOSURE_N_NOTIFIERS ( cl)
Value:
(((cl)->n_guards << 1L) + \
(cl)->n_fnotifiers + (cl)->n_inotifiers)

G_CLOSURE_N_NOTIFIERS: @cl: a GClosure

Get the total number of notifiers connected with the closure @cl.

The count includes the meta marshaller, the finalize and invalidate notifiers and the marshal guards. Note that each guard counts as two notifiers. See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(), g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().

Returns: number of notifiers

Definition at line 55 of file gclosure.h.

55#define G_CLOSURE_N_NOTIFIERS(cl) (((cl)->n_guards << 1L) + \
56 (cl)->n_fnotifiers + (cl)->n_inotifiers)

◆ G_CLOSURE_NEEDS_MARSHAL

#define G_CLOSURE_NEEDS_MARSHAL ( closure)    (((GClosure*) (closure))->marshal == NULL)

G_CLOSURE_NEEDS_MARSHAL: @closure: a GClosure

Check if the closure still needs a marshaller. See g_closure_set_marshal().

Returns: TRUE if a GClosureMarshal marshaller has not yet been set on @closure.

Definition at line 41 of file gclosure.h.

Typedef Documentation

◆ GCallback

typedef void(* GCallback) (void)

GCallback:

The type used for callback functions in structure definitions and function signatures.

This doesn't mean that all callback functions must take no parameters and return void. The required signature of a callback function is determined by the context in which is used (e.g. the signal to which it is connected).

Use G_CALLBACK() to cast the callback function to a GCallback.

Definition at line 92 of file gclosure.h.

◆ GCClosure

typedef struct _GCClosure GCClosure

GCClosure: @closure: the GClosure @callback: the callback function

A GCClosure is a specialization of GClosure for C function callbacks.

Definition at line 163 of file gclosure.h.

◆ GClosure

typedef struct _GClosure GClosure

Definition at line 77 of file gclosure.h.

◆ GClosureMarshal

typedef void(* GClosureMarshal) (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data)

GClosureMarshal: @closure: the GClosure to which the marshaller belongs @return_value: (nullable): a GValue to store the return value. May be NULL if the callback of @closure doesn't return a value. @n_param_values: the length of the @param_values array @param_values: (array length=n_param_values): an array of #GValues holding the arguments on which to invoke the callback of @closure @invocation_hint: (nullable): the invocation hint given as the last argument to g_closure_invoke() @marshal_data: (nullable): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

The type used for marshaller functions.

Definition at line 121 of file gclosure.h.

◆ GClosureNotify

typedef void(* GClosureNotify) (gpointer data, GClosure *closure)

GClosureNotify: @data: data specified when registering the notification callback @closure: the GClosure on which the notification is emitted

The type used for the various notification callbacks which can be registered on closures.

Definition at line 101 of file gclosure.h.

◆ GClosureNotifyData

Definition at line 78 of file gclosure.h.

◆ GVaClosureMarshal

typedef void(* GVaClosureMarshal) (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types)

GVaClosureMarshal: @closure: the GClosure to which the marshaller belongs @return_value: (nullable): a GValue to store the return value. May be NULL if the callback of @closure doesn't return a value. @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. @args: va_list of arguments to be passed to the closure. @marshal_data: (nullable): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal() @n_params: the length of the @param_types array @param_types: (array length=n_params): the GType of each argument from @args.

This is the signature of va_list marshaller functions, an optional marshaller that can be used in some situations to avoid marshalling the signal argument into GValues.

Definition at line 148 of file gclosure.h.

Function Documentation

◆ g_cclosure_marshal_generic()

GOBJECT_AVAILABLE_IN_ALL void g_cclosure_marshal_generic ( GClosure * closure,
GValue * return_gvalue,
guint n_param_values,
const GValue * param_values,
gpointer invocation_hint,
gpointer marshal_data )

◆ g_cclosure_marshal_generic_va()

GOBJECT_AVAILABLE_IN_ALL void g_cclosure_marshal_generic_va ( GClosure * closure,
GValue * return_value,
gpointer instance,
va_list args_list,
gpointer marshal_data,
int n_params,
GType * param_types )

◆ g_cclosure_new()

GOBJECT_AVAILABLE_IN_ALL GClosure * g_cclosure_new ( GCallback callback_func,
gpointer user_data,
GClosureNotify destroy_data )

◆ g_cclosure_new_swap()

GOBJECT_AVAILABLE_IN_ALL GClosure * g_cclosure_new_swap ( GCallback callback_func,
gpointer user_data,
GClosureNotify destroy_data )

◆ g_closure_add_finalize_notifier()

GOBJECT_AVAILABLE_IN_ALL void g_closure_add_finalize_notifier ( GClosure * closure,
gpointer notify_data,
GClosureNotify notify_func )

◆ g_closure_add_invalidate_notifier()

GOBJECT_AVAILABLE_IN_ALL void g_closure_add_invalidate_notifier ( GClosure * closure,
gpointer notify_data,
GClosureNotify notify_func )

◆ g_closure_add_marshal_guards()

GOBJECT_AVAILABLE_IN_ALL void g_closure_add_marshal_guards ( GClosure * closure,
gpointer pre_marshal_data,
GClosureNotify pre_marshal_notify,
gpointer post_marshal_data,
GClosureNotify post_marshal_notify )

◆ g_closure_invalidate()

GOBJECT_AVAILABLE_IN_ALL void g_closure_invalidate ( GClosure * closure)

◆ g_closure_invoke()

GOBJECT_AVAILABLE_IN_ALL void g_closure_invoke ( GClosure * closure,
GValue * return_value,
guint n_param_values,
const GValue * param_values,
gpointer invocation_hint )

◆ g_closure_new_simple()

GOBJECT_AVAILABLE_IN_ALL GClosure * g_closure_new_simple ( guint sizeof_closure,
gpointer data )

◆ g_closure_ref()

GOBJECT_AVAILABLE_IN_ALL GClosure * g_closure_ref ( GClosure * closure)

◆ g_closure_remove_finalize_notifier()

GOBJECT_AVAILABLE_IN_ALL void g_closure_remove_finalize_notifier ( GClosure * closure,
gpointer notify_data,
GClosureNotify notify_func )

◆ g_closure_remove_invalidate_notifier()

GOBJECT_AVAILABLE_IN_ALL void g_closure_remove_invalidate_notifier ( GClosure * closure,
gpointer notify_data,
GClosureNotify notify_func )

◆ g_closure_set_marshal()

GOBJECT_AVAILABLE_IN_ALL void g_closure_set_marshal ( GClosure * closure,
GClosureMarshal marshal )

◆ g_closure_set_meta_marshal()

GOBJECT_AVAILABLE_IN_ALL void g_closure_set_meta_marshal ( GClosure * closure,
gpointer marshal_data,
GClosureMarshal meta_marshal )

◆ g_closure_sink()

GOBJECT_AVAILABLE_IN_ALL void g_closure_sink ( GClosure * closure)

◆ g_closure_unref()

GOBJECT_AVAILABLE_IN_ALL void g_closure_unref ( GClosure * closure)

◆ g_signal_type_cclosure_new()

GOBJECT_AVAILABLE_IN_ALL GClosure * g_signal_type_cclosure_new ( GType itype,
guint struct_offset )