Source.getId

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 glib.main_context.MainContext.findSourceById.

You can only call this function while the source is associated to a #GMainContext instance; calling this function before glib.source.Source.attach or after glib.source.Source.destroy yields undefined behavior. The ID returned is unique within the #GMainContext instance passed to glib.source.Source.attach.

class Source
uint
getId
()

Return Value

Type: uint

the ID (greater than 0) for the source