new

fun new(sourceFuncs: SourceFuncs, structSize: <Error class: unknown class>): Source

Creates a new struct@GLib.Source structure. The size is specified to allow creating structures derived from struct@GLib.Source 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 method@GLib.Source.attach before it will be executed.

Return

the newly-created #GSource.

Parameters

sourceFuncs

structure containing functions that implement the sources behavior.

structSize

size of the struct@GLib.Source structure to create.