The GSource struct is an opaque data type representing an event source.
Sets our main struct and passes it to the parent class.
A destructor is present on this object, but not explicitly documented in the source.
Adds child_source to source as a "polled" source; when source is added to a glib.MainContext, child_source will be automatically added with the same priority, when child_source is triggered, it will cause source to dispatch (in addition to calling its own callback), and when source is destroyed, it will destroy child_source as well. (source will also still be dispatched if its own prepare/check functions indicate that it is ready.)
Monitors fd for the IO events in events.
Removes a source from its glib.MainContext, if any, and mark it as destroyed. The source cannot be subsequently added to another context. It is safe to call this on sources which have already been removed from their context.
Checks whether a source is allowed to be called recursively. see Source.setCanRecurse.
Gets the glib.MainContext with which the source is associated.
This function ignores source and is otherwise the same as g_get_current_time().
Returns the numeric ID for a particular source. The ID of a source is a positive integer which is unique within a particular main loop context. The reverse mapping from ID to source is done by MainContext.findSourceById.
Gets the priority of a source.
Gets the "ready time" of source, as set by Source.setReadyTime.
Get the main Gtk struct
the main Gtk struct as a void*
Gets the time to be used when checking this source. The advantage of calling this function over calling g_get_monotonic_time() directly is that when checking multiple sources, GLib can cache a single value instead of having to repeatedly get the system monotonic time.
Returns whether source has been destroyed.
Updates the event mask to watch for the fd identified by tag.
Queries the events reported for the fd corresponding to tag on source during the last poll.
Increases the reference count on a source by one.
Detaches child_source from source and destroys it.
Removes a file descriptor from the set of file descriptors polled for this source.
Reverses the effect of a previous call to Source.addUnixFd.
Sets the callback function for a source. The callback for a source is called from the source's dispatch function.
Sets the callback function storing the data as a refcounted callback "object". This is used internally. Note that calling Source.setCallbackIndirect assumes an initial reference count on callback_data, and thus callback_funcs->unref will eventually be called once more than callback_funcs->ref.
Sets whether a source can be called recursively. If can_recurse is TRUE, then while the source is being dispatched then this source will be processed normally. Otherwise, all processing of this source is blocked until the dispatch function returns.
Set dispose as dispose function on source. dispose will be called once the reference count of source reaches 0 but before any of the state of the source is freed, especially before the finalize function is called.
Sets the source functions (can be used to override default implementations) of an unattached source.
Sets a name for the source, used in debugging and profiling. The name defaults to NULL
Sets the priority of a source. While the main loop is being run, a source will be dispatched if it is ready to be dispatched and no sources at a higher (numerically smaller) priority are ready to be dispatched.
Sets a glib.Source to be dispatched when the given monotonic time is reached (or passed). If the monotonic time is in the past (as it always will be if ready_time is 0) then the source will be dispatched immediately.
Decreases the reference count of a source by one. If the resulting reference count is zero the source and associated memory will be destroyed.
Removes the source with the given ID from the default main context. You must use Source.destroy for sources added to a non-default main context.
Removes a source from the default main loop context given the source functions and user data. If multiple sources exist with the same source functions and user data, only one will be destroyed.
Removes a source from the default main loop context given the user data for the callback. If multiple sources exist with the same user data, only one will be destroyed.
Sets the name of a source using its ID.
the main Gtk struct