Source.this

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 Source.attach before it will be executed.

  1. this(GSource* gSource, bool ownedRef)
  2. this(GSourceFuncs* sourceFuncs, uint structSize)
    class Source

Parameters

sourceFuncs GSourceFuncs*

structure containing functions that implement the sources behavior.

structSize uint

size of the glib.Source structure to create.

Return Value

the newly-created glib.Source

Throws

ConstructionException GTK+ fails to create the object.