Function

GLibclear_handle_id

Declaration

void
g_clear_handle_id (
  guint* tag_ptr,
  GClearHandleFunc clear_func
)

Description

Clears a numeric handler, such as a GSource ID.

tag_ptr must be a valid pointer to the variable holding the handler.

If the ID is zero then this function does nothing. Otherwise, clear_func() is called with the ID as a parameter, and the tag is set to zero.

A macro is also included that allows this function to be used without pointer casts.

Available since:2.56

Parameters

tag_ptr guint*
 

A pointer to the handler ID.

 The data is owned by the caller of the function.
clear_func GClearHandleFunc
 

The function to call to clear the handler.