Cancellable.sourceNew

Creates a source that triggers if cancellable is cancelled and calls its callback of type GCancellableSourceFunc This is primarily useful for attaching to another (non-cancellable) source with Source.addChildSource to add cancellability to it.

For convenience, you can call this with a NULL gio.Cancellable, in which case the source will never trigger.

The new glib.Source will hold a reference to the gio.Cancellable

class Cancellable
sourceNew
()

Return Value

Type: Source

the new glib.Source

Meta

Since

2.28