Method

GObjectClosureadd_marshal_guards

Declaration

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

Description

Adds a pair of notifiers which get invoked before and after the closure callback, respectively.

This is typically used to protect the extra arguments for the duration of the callback. See g_object_watch_closure() for an example of marshal guards.

This method is not directly available to language bindings.

Parameters

pre_marshal_data gpointer
 

Data to pass to pre_marshal_notify.

 The argument can be NULL.
 The data is owned by the caller of the function.
pre_marshal_notify GClosureNotify
 

A function to call before the closure callback.

 The argument can be NULL.
post_marshal_data gpointer
 

Data to pass to post_marshal_notify.

 The argument can be NULL.
 The data is owned by the caller of the function.
post_marshal_notify GClosureNotify
 

A function to call after the closure callback.

 The argument can be NULL.