Closures Functions as first-class objects @closure: @cl: @cclosure: @f: @in_marshal: @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate() The #GType for #GClosure. @closure: @callback: @closure: @return_value: @n_param_values: @param_values: @invocation_hint: @marshal_data: @data: @closure: @data: @notify: @callback_func: @user_data: @destroy_data: @Returns: @callback_func: @user_data: @destroy_data: @Returns: @callback_func: @object: @Returns: @callback_func: @object: @Returns: @sizeof_closure: @object: @Returns: Increment the reference count on a closure to force it staying alive while the caller holds a pointer to it. @closure: #GClosure to increment the reference count on @Returns: The @closure passed in, for convenience Take over the initial ownership of a closure. When closures are newly created, they get an initial reference count of 1, eventhough no caller has yet invoked g_closure_ref() on the @closure. Code entities that store closures for notification purposes are supposed to call this function, for example like this: static GClosure *notify_closure = NULL; void foo_notify_set_closure (GClosure *closure) { if (notify_closure) g_closure_unref (notify_closure); notify_closure = closure; if (notify_closure) { g_closure_ref (notify_closure); g_closure_sink (notify_closure); } } Because g_closure_sink() may decrement the reference count of a closure (if it hasn't been called on @closure yet) just like g_closure_unref(), g_closure_ref() should be called prior to this function. @closure: #GClosure to decrement the initial reference count on, if it's still being held Decrement the reference count of a closure after it was previously incremented by the same caller. The closure will most likely be destroyed and freed after this function returns. @closure: #GClosure to decrement the reference count on @closure: @return_value: @n_param_values: @param_values: @invocation_hint: This function sets a flag on the closure to indicate that it's calling environment has become invalid, and thus causes any future invocations of g_closure_invoke() on this @closure to be ignored. Also, invalidation notifiers installed on the closure will be called at this point, and since invalidation notifiers may unreference the closure, @closure should be considered an invalidated pointer atfer this function, unles g_closure_ref() was called beforehand. @closure: GClosure to invalidate @closure: @notify_data: @notify_func: @closure: @notify_data: @notify_func: @closure: @notify_data: @notify_func: @closure: @notify_data: @notify_func: @sizeof_closure: @data: @Returns: @closure: @marshal: @closure: @pre_marshal_data: @pre_marshal_notify: @post_marshal_data: @post_marshal_notify: @closure: @marshal_data: @meta_marshal: @source: @closure: The #GType for #GIOChannel. The #GType for #GIOCondition.