helic-0.5.2.0: Clipboard Manager
Safe HaskellNone
LanguageHaskell2010

Helic.GtkMain

Description

API for the GTK main loop. Internal.

Synopsis

Documentation

gtkMain :: Members [Scoped resource (Gtk s), GtkMain s, Resource] r => Sem r () -> Sem r () Source #

Run the GTK main loop. Before that, initialize the GTK client environment, store the default display in the state of GtkMain, and execute the user-supplied initialization action.

loopGtkMain :: Members [Scoped resource (Gtk s) !! Text, GtkMain s, Resource, Log] r => Sem r () -> Sem r () Source #

Run the GTK main loop in an infinite loop, recovering from errors by logging them. After the loop has failed or was terminated, the default implementation waits for 10 seconds before restarting it, but can be forced to start when a consumer tries to use it.

gtkResource :: Members [GtkMain s, Log, Stop Text] r => Sem r s Source #

Acquire a GTK resource by first examining the value currently stored in GtkMain, and if there is none, requesting the GTK main loop to be started.

gtkMainLoop :: Members [Scoped resource (Gtk s) !! Text, GtkMain s, Log, Race, Resource, Async] r => Sem r () -> Sem r a -> Sem r a Source #

Run loopGtkMain in a thread.