Basics
Guides
API Reference
Basics
Guides
API Reference
[26:7] extends: object
The GSourceFuncs struct contains a table of functions used to handle event
sources in a generic manner. For idle sources, the prepare and check
functions always return %TRUE to indicate that the source is always ready to
be processed. The prepare function also returns a timeout value of 0 to
ensure that the poll() call doesn't block (since that would be time wasted
which could have been spent running the idle function). For timeout sources,
the prepare and check functions both return %TRUE if the timeout interval has
expired. The prepare function also returns a timeout value to ensure that the
poll() call doesn't block too long and miss the next timeout. For file
descriptor sources, the prepare function typically returns %FALSE, since it
must wait until poll() has been called before it knows whether any events
need to be processed. It sets the returned timeout to -1 to indicate that it
doesn't mind how long the poll() call blocks. In the check function, it tests
the results of the poll() call to see if the required condition has been met,
and returns %TRUE if so.
SourceFuncs (Handle = null)
Creates a new
SourceFuncsby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.