gi-gtk-hs-0.3.9: A wrapper for gi-gtk, adding a few more idiomatic API parts on top
Stability provisional portable (depends on GHC) None Haskell2010

Description

Synopsis

# Documentation

Utility functions to run IO actions on the GUI thread. You must call setGUIThread or setCurrentThreadAsGUIThread before using the synchronous options, or you risk deadlocking.

Inform gi-gtk-hs what thread is running the gtk main loop.

Get the Thread that is running the Gtk main loop, if it has been set.

Inform gi-gtk-hs that the current thread is, or will be, running the gtk main loop.

Equivalent to threadSelf >>= setGUIThread

postGUISyncWithPriority :: Int32 -> IO a -> IO a Source #

Queue an action to be run in the GTK event loop. If called from the same process as the event loop, this runs the action directly. Otherwise, this queues it in GTK's event loop and blocks until the action is complete

You must call setGUIThread or setCurrentThreadAsGUIThread before this.

Priority is typically between PRIORITY_HIGH_IDLE (100) and PRIORITY_DEFAULT_IDLE (200)

postGUISync :: IO a -> IO a Source #

Queue an action to be run in the GTK event loop. If called from the same process as the event loop, this runs the action directly. Otherwise, this queues it in GTK's event loop and blocks until the action is complete

You must call setGUIThread or setCurrentThreadAsGUIThread before this.

Equivalent to postGUISyncWithPriority PRIORITY_DEFAULT_IDLE

postGUIASyncWithPriority :: Int32 -> IO () -> IO () Source #

Queue an action to be run in the GTK event loop. This function queues the event regardless of what process it is called from, and returns immidietly.

Priority is typically between PRIORITY_HIGH_IDLE (100) and PRIORITY_DEFAULT_IDLE (200)

postGUIASync :: IO () -> IO () Source #

Queue an action to be run in the GTK event loop. This function queues the event regardless of what process it is called from, and returns immidietly.

Equivalent to postGUIASyncWithPriority PRIORITY_DEFAULT_IDLE

Test if two Threads refer to the same OS thread. A Thread can be gotten from threadSelf. Note that threadSelf only makes sense from a bound thread.

isGUIThread :: IO Bool Source #

You must call setGUIThread or setCurrentThreadAsGUIThread before this. This only makes sense when called from a bound thread.