Package ch.bailu.gtk.glib
Class SourceFuncs
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.SourceFuncs
- All Implemented Interfaces:
PointerInterface
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.
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
static interface
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
ch.bailu.gtk.glib.JnaSourceFuncs.OnCheck
ch.bailu.gtk.glib.JnaSourceFuncs.OnSourceFunc
ch.bailu.gtk.glib.JnaSourceFuncs.OnSourceDummyMarshal
ch.bailu.gtk.glib.JnaSourceFuncs.OnFinalize
ch.bailu.gtk.glib.JnaSourceFuncs.OnPrepare
void
setFieldCheck
(SourceFuncs.OnCheck check) void
setFieldClosureCallback
(SourceFuncs.OnSourceFunc closure_callback) void
setFieldClosureMarshal
(SourceFuncs.OnSourceDummyMarshal closure_marshal) void
setFieldFinalize
(SourceFuncs.OnFinalize finalize) void
setFieldPrepare
(SourceFuncs.OnPrepare prepare) Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
PREPARE
- See Also:
-
CHECK
- See Also:
-
DISPATCH
Private field: cb-with-cb- See Also:
-
FINALIZE
- See Also:
-
CLOSURE_CALLBACK
- See Also:
-
CLOSURE_MARSHAL
- See Also:
-
-
Constructor Details
-
SourceFuncs
-
SourceFuncs
public SourceFuncs()
-
-
Method Details
-
getClassHandler
-
setFieldPrepare
-
getFieldPrepare
public ch.bailu.gtk.glib.JnaSourceFuncs.OnPrepare getFieldPrepare() -
setFieldCheck
-
getFieldCheck
public ch.bailu.gtk.glib.JnaSourceFuncs.OnCheck getFieldCheck() -
setFieldFinalize
-
getFieldFinalize
public ch.bailu.gtk.glib.JnaSourceFuncs.OnFinalize getFieldFinalize() -
setFieldClosureCallback
-
getFieldClosureCallback
public ch.bailu.gtk.glib.JnaSourceFuncs.OnSourceFunc getFieldClosureCallback() -
setFieldClosureMarshal
-
getFieldClosureMarshal
public ch.bailu.gtk.glib.JnaSourceFuncs.OnSourceDummyMarshal getFieldClosureMarshal()
-