Gnome::Glib — N-MainLoop
#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Gnome::Glib::N-MainLoop
Description
The Gnome::Glib::N-MainLoop struct is an opaque data type representing the main event loop of a GLib or GTK+ application.
=end rakudoc
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-mainloop
Creates a new Gnome::Glib::N-MainLoop structure.
method new-mainloop ( N-Object $context, Bool() $is-running --> Gnome::Glib::MainLoop \)
$context; a Gnome::Glib::N-MainContext (if undefined, the default context will be used).
$is-running; set to
Trueto indicate that the loop is running. This is not very important since calling.run()will set this toTrueanyway..
=end rakudoc
#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Methods =end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-context
Returns the Gnome::Glib::N-MainContext of $loop.
method get-context (--> N-Object )
Return value; the Gnome::Glib::N-MainContext of $loop.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
is-running
Checks to see if the main loop is currently being run via .run().
method is-running (--> Bool )
Return value; True if the mainloop is currently being run..
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
quit
Stops a Gnome::Glib::N-MainLoop from running. Any calls to .run()
for the loop will return.
Note that sources that have already been dispatched when
.quit() is called will still be executed.
method quit ( )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
ref
Increases the reference count on a Gnome::Glib::N-MainLoop object by one.
method ref (--> N-Object )
Return value; $loop.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
run
Runs a main loop until .quit() is called on the loop.
If this is called for the thread of the loop's Gnome::Glib::N-MainContext,
it will process events from the loop, otherwise it will
simply wait.
method run ( )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
unref
Decreases the reference count on a Gnome::Glib::N-MainLoop object by one. If the result is zero, free the loop and free all associated memory.
method unref ( )
=end rakudoc