N-MainLoop

#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------

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.

#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

#-------------------------------------------------------------------------------

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 True to indicate that the loop is running. This is not very important since calling .run() will set this to True anyway..

#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------

Methods

#-------------------------------------------------------------------------------

get-context

Returns the Gnome::Glib::N-MainContext of $loop.

method get-context (--> N-Object )

Return value; the Gnome::Glib::N-MainContext of $loop.

#-------------------------------------------------------------------------------

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..

#-------------------------------------------------------------------------------

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 ( )

#-------------------------------------------------------------------------------

ref

Increases the reference count on a Gnome::Glib::N-MainLoop object by one.

method ref (--> N-Object )

Return value; $loop.

#-------------------------------------------------------------------------------

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 ( )

#-------------------------------------------------------------------------------

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 ( )

Gnome::Glib v0.1.12

Modules for package Gnome::Glib:api<2>. The language binding to GNOME's lowest level library

Authors

    License

    Artistic-2.0

    Dependencies

    Gnome::N:api<2>

    Test Dependencies

    Provides

    • Gnome::Glib::N-Array
    • Gnome::Glib::N-ByteArray
    • Gnome::Glib::N-Bytes
    • Gnome::Glib::N-Error
    • Gnome::Glib::N-List
    • Gnome::Glib::N-MainContext
    • Gnome::Glib::N-MainLoop
    • Gnome::Glib::N-PtrArray
    • Gnome::Glib::N-SList
    • Gnome::Glib::N-Variant
    • Gnome::Glib::N-VariantBuilder
    • Gnome::Glib::N-VariantDict
    • Gnome::Glib::N-VariantIter
    • Gnome::Glib::N-VariantType
    • Gnome::Glib::T-array
    • Gnome::Glib::T-error
    • Gnome::Glib::T-list
    • Gnome::Glib::T-main
    • Gnome::Glib::T-quark
    • Gnome::Glib::T-slist
    • Gnome::Glib::T-variant
    • Gnome::Glib::T-varianttype

    The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.