gi-glib-2.0.12: GLib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GLib.Structs.MainLoop

Contents

Description

The GMainLoop struct is an opaque data type representing the main event loop of a GLib or GTK+ application.

Synopsis

Exported types

newtype MainLoop #

Constructors

MainLoop (ManagedPtr MainLoop) 

Instances

BoxedObject MainLoop # 

Methods

boxedType :: MainLoop -> IO GType #

((~) * info (ResolveMainLoopMethod t MainLoop), MethodInfo * info MainLoop p) => IsLabel t (MainLoop -> p) # 

Methods

fromLabel :: Proxy# Symbol t -> MainLoop -> p #

((~) * info (ResolveMainLoopMethod t MainLoop), MethodInfo * info MainLoop p) => IsLabelProxy t (MainLoop -> p) # 

Methods

fromLabelProxy :: Proxy Symbol t -> MainLoop -> p #

HasAttributeList * MainLoop # 
((~) * signature (m ()), MonadIO m) => MethodInfo * MainLoopUnrefMethodInfo MainLoop signature # 
((~) * signature (m ()), MonadIO m) => MethodInfo * MainLoopRunMethodInfo MainLoop signature # 
((~) * signature (m MainLoop), MonadIO m) => MethodInfo * MainLoopRefMethodInfo MainLoop signature # 
((~) * signature (m ()), MonadIO m) => MethodInfo * MainLoopQuitMethodInfo MainLoop signature # 
((~) * signature (m Bool), MonadIO m) => MethodInfo * MainLoopIsRunningMethodInfo MainLoop signature # 
((~) * signature (m MainContext), MonadIO m) => MethodInfo * MainLoopGetContextMethodInfo MainLoop signature # 
type AttributeList MainLoop # 

Methods

getContext

mainLoopGetContext #

Arguments

:: (HasCallStack, MonadIO m) 
=> MainLoop

loop: a MainLoop.

-> m MainContext

Returns: the MainContext of loop

Returns the MainContext of loop.

isRunning

mainLoopIsRunning #

Arguments

:: (HasCallStack, MonadIO m) 
=> MainLoop

loop: a MainLoop.

-> m Bool

Returns: True if the mainloop is currently being run.

Checks to see if the main loop is currently being run via mainLoopRun.

new

mainLoopNew #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe MainContext

context: a MainContext (if Nothing, the default context will be used).

-> Bool

isRunning: set to True to indicate that the loop is running. This is not very important since calling mainLoopRun will set this to True anyway.

-> m MainLoop

Returns: a new MainLoop.

Creates a new MainLoop structure.

quit

data MainLoopQuitMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * MainLoopQuitMethodInfo MainLoop signature # 

mainLoopQuit #

Arguments

:: (HasCallStack, MonadIO m) 
=> MainLoop

loop: a MainLoop

-> m () 

Stops a MainLoop from running. Any calls to mainLoopRun for the loop will return.

Note that sources that have already been dispatched when mainLoopQuit is called will still be executed.

ref

data MainLoopRefMethodInfo #

Instances

((~) * signature (m MainLoop), MonadIO m) => MethodInfo * MainLoopRefMethodInfo MainLoop signature # 

mainLoopRef #

Arguments

:: (HasCallStack, MonadIO m) 
=> MainLoop

loop: a MainLoop

-> m MainLoop

Returns: loop

Increases the reference count on a MainLoop object by one.

run

data MainLoopRunMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * MainLoopRunMethodInfo MainLoop signature # 

mainLoopRun #

Arguments

:: (HasCallStack, MonadIO m) 
=> MainLoop

loop: a MainLoop

-> m () 

Runs a main loop until mainLoopQuit is called on the loop. If this is called for the thread of the loop's MainContext, it will process events from the loop, otherwise it will simply wait.

unref

data MainLoopUnrefMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * MainLoopUnrefMethodInfo MainLoop signature # 

mainLoopUnref #

Arguments

:: (HasCallStack, MonadIO m) 
=> MainLoop

loop: a MainLoop

-> m () 

Decreases the reference count on a MainLoop object by one. If the result is zero, free the loop and free all associated memory.