Function

GObjectCClosurenew

Declaration [src]

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

Description [src]

Creates a new closure which invokes callback_func with user_data as the last parameter.

destroy_data will be called as a finalize notifier on the GClosure.

This function is not directly available to language bindings.

Parameters

callback_func

Type: GCallback

The function to invoke.

user_data

Type: gpointer

User data to pass to callback_func.

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

Type: GClosureNotify

Destroy notify to be called when user_data is no longer used.

Return value

Type: GClosure

A floating reference to a new GCClosure.

The data is owned by the called function.