function new(source_funcs: GLib.SourceFuncs, struct_size: Number(guint)): GLib.Source {
    // Gjs wrapper for g_source_new()

Creates a new GLib.Source structure. The size is specified to allow creating structures derived from 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 GLib.MainContext and must be added to one with GLib.Source.prototype.attach before it will be executed.


structure containing functions that implement the sources behavior.


size of the GLib.Source structure to create.


the newly-created GLib.Source.