Function
GLibSourcenew
Description
Creates a new GSource structure. The size is specified to
allow creating structures derived from GSource that contain
additional data. The size passed in must be at least
sizeof (GSource).
The source will not initially be associated with any GMainContext
and must be added to one with g_source_attach() before it will be executed.
Parameters
source_funcs-
Type:
GSourceFuncsStructure containing functions that implement the sources behavior.
The data is owned by the caller of the function. struct_size-
Type:
guintSize of the
GSourcestructure to create.
Return value
Type: GSource
The newly-created GSource.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |