Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 677c1b5134368504c2e447757584d19e > files > 661

ghc-gtk-devel-0.11.2-5.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Graphics.UI.Gtk.General.General</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Graphics-UI-Gtk-General-General.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>gtk-0.11.2: Binding to the Gtk+ graphical user interface library.</TD
><TD CLASS="topbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html"
>Source code</A
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Graphics.UI.Gtk.General.General</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>portable (depends on GHC)</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>provisional</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>gtk2hs-users@lists.sourceforge.net</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>Initialisation
</A
></DT
><DD
><DL
><DT
><A HREF="#2"
>Support for OS threads
</A
></DT
></DL
></DD
><DT
><A HREF="#3"
>Main event loop
</A
></DT
><DD
><DL
><DT
><A HREF="#4"
>Less commonly used event loop functions
</A
></DT
></DL
></DD
><DT
><A HREF="#5"
>Grab widgets
</A
></DT
><DT
><A HREF="#6"
>Timeout and idle callbacks
</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>library initialization, main event loop, and events
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3AinitGUI"
>initGUI</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AunsafeInitGUIForThreadedRTS"
>unsafeInitGUIForThreadedRTS</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApostGUISync"
>postGUISync</A
> ::  <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> a -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApostGUIAsync"
>postGUIAsync</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AthreadsEnter"
>threadsEnter</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AthreadsLeave"
>threadsLeave</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmainGUI"
>mainGUI</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmainQuit"
>mainQuit</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AeventsPending"
>eventsPending</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmainLevel"
>mainLevel</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmainIteration"
>mainIteration</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmainIterationDo"
>mainIterationDo</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmainDoEvent"
>mainDoEvent</A
> ::  <A HREF="Graphics-UI-Gtk-Gdk-EventM.html#t%3AEventM"
>EventM</A
> t <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgrabAdd"
>grabAdd</A
> :: <A HREF="Graphics-UI-Gtk-Abstract-Widget.html#t%3AWidgetClass"
>WidgetClass</A
> wd =&gt; wd -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgrabGetCurrent"
>grabGetCurrent</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Graphics-UI-Gtk-Abstract-Widget.html#t%3AWidget"
>Widget</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgrabRemove"
>grabRemove</A
> :: <A HREF="Graphics-UI-Gtk-Abstract-Widget.html#t%3AWidgetClass"
>WidgetClass</A
> w =&gt; w -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3APriority"
>Priority</A
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApriorityLow"
>priorityLow</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApriorityDefaultIdle"
>priorityDefaultIdle</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApriorityHighIdle"
>priorityHighIdle</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApriorityDefault"
>priorityDefault</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApriorityHigh"
>priorityHigh</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtimeoutAdd"
>timeoutAdd</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtimeoutAddFull"
>timeoutAddFull</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Graphics-UI-Gtk-General-General.html#t%3APriority"
>Priority</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtimeoutRemove"
>timeoutRemove</A
> :: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> ()</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AidleAdd"
>idleAdd</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Graphics-UI-Gtk-General-General.html#t%3APriority"
>Priority</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AidleRemove"
>idleRemove</A
> :: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> ()</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinputAdd"
>inputAdd</A
> :: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AFD"
>FD</A
> -&gt; [<A HREF="Graphics-UI-Gtk-General-General.html#t%3AIOCondition"
>IOCondition</A
>] -&gt; <A HREF="Graphics-UI-Gtk-General-General.html#t%3APriority"
>Priority</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinputRemove"
>inputRemove</A
> :: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> ()</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AIOCondition"
>IOCondition</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3AIOIn"
>IOIn</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AIOOut"
>IOOut</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AIOPri"
>IOPri</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AIOErr"
>IOErr</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AIOHup"
>IOHup</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AIOInvalid"
>IOInvalid</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3AHandlerId"
>HandlerId</A
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Foreign-C-Types.html#t%3ACUInt"
>CUInt</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3AFD"
>FD</A
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
><A NAME="1"
>Initialisation
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:initGUI"
><A NAME="v%3AinitGUI"
></A
></A
><B
>initGUI</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#initGUI"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Initialize the GUI.
</P
><P
>This must be called before any other function in the Gtk2Hs library.
</P
><P
>This function initializes the GUI toolkit and parses all Gtk
 specific arguments. The remaining arguments are returned. If the
 initialization of the toolkit fails for whatever reason, an exception
 is thrown.
</P
><UL
><LI
> Throws: <TT
>error &quot;Cannot initialize GUI.&quot;</TT
>
</LI
><LI
> If you want to use Gtk2Hs and in a multi-threaded application then it is your obligation
   to ensure that all calls to Gtk+ happen in a single OS thread.
   If you want to make calls to Gtk2Hs functions from a Haskell thread other
   than the one that calls this functions and <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AmainGUI"
>mainGUI</A
></TT
> then you will have to
   'post' your GUI actions to the main GUI thread. You can do this using
   <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3ApostGUISync"
>postGUISync</A
></TT
> or <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3ApostGUIAsync"
>postGUIAsync</A
></TT
>. See also <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AthreadsEnter"
>threadsEnter</A
></TT
>.
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="2"
><A NAME="2"
>Support for OS threads
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:unsafeInitGUIForThreadedRTS"
><A NAME="v%3AunsafeInitGUIForThreadedRTS"
></A
></A
><B
>unsafeInitGUIForThreadedRTS</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#unsafeInitGUIForThreadedRTS"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:postGUISync"
><A NAME="v%3ApostGUISync"
></A
></A
><B
>postGUISync</B
> ::  <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> a -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> a</TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#postGUISync"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Post an action to be run in the main GUI thread.
</P
><P
>The current thread blocks until the action completes and the result is
 returned.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:postGUIAsync"
><A NAME="v%3ApostGUIAsync"
></A
></A
><B
>postGUIAsync</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#postGUIAsync"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Post an action to be run in the main GUI thread.
</P
><P
>The current thread continues and does not wait for the result of the
 action.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:threadsEnter"
><A NAME="v%3AthreadsEnter"
></A
></A
><B
>threadsEnter</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#threadsEnter"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Acquire the global Gtk lock.
</P
><UL
><LI
> During normal operation, this lock is held by the thread from which all
   interaction with Gtk is performed. When calling <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AmainGUI"
>mainGUI</A
></TT
>, the thread will
   release this global lock before it waits for user interaction. During this
   time it is, in principle, possible to use a different OS thread (any other
   Haskell thread that is bound to the Gtk OS thread will be blocked anyway)
   to interact with Gtk by explicitly acquiring the lock, calling Gtk functions
   and releasing the lock. However, the Gtk functions that are called from this
   different thread may not trigger any calls to the OS since this will
   lead to a crash on Windows (the Win32 API can only be used from a single
   thread). Since it is very hard to tell which function only interacts on
   Gtk data structures and which function call actual OS functions, it
   is best not to use this feature at all. A better way to perform updates
   in the background is to spawn a Haskell thread and to perform the update
   to Gtk widgets using <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3ApostGUIAsync"
>postGUIAsync</A
></TT
> or <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3ApostGUISync"
>postGUISync</A
></TT
>. These will execute
   their arguments from the main loop, that is, from the OS thread of Gtk,
   thereby ensuring that any Gtk and OS function can be called.
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:threadsLeave"
><A NAME="v%3AthreadsLeave"
></A
></A
><B
>threadsLeave</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#threadsLeave"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Release the global Gtk lock.
</P
><UL
><LI
> The use of this function is not recommended. See <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AthreadsEnter"
>threadsEnter</A
></TT
>.
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="3"
><A NAME="3"
>Main event loop
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mainGUI"
><A NAME="v%3AmainGUI"
></A
></A
><B
>mainGUI</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#mainGUI"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Run the Gtk+ main event loop.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mainQuit"
><A NAME="v%3AmainQuit"
></A
></A
><B
>mainQuit</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#mainQuit"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Exit the main event loop.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="4"
><A NAME="4"
>Less commonly used event loop functions
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:eventsPending"
><A NAME="v%3AeventsPending"
></A
></A
><B
>eventsPending</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#eventsPending"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Inquire the number of events pending on the event queue
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mainLevel"
><A NAME="v%3AmainLevel"
></A
></A
><B
>mainLevel</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#mainLevel"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Inquire the main loop level.
</P
><UL
><LI
> Callbacks that take more time to process can call <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AmainIteration"
>mainIteration</A
></TT
> to keep
 the GUI responsive. Each time the main loop is restarted this way, the main
 loop counter is increased. This function returns this counter.
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mainIteration"
><A NAME="v%3AmainIteration"
></A
></A
><B
>mainIteration</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#mainIteration"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Process an event, block if necessary.
</P
><UL
><LI
> Returns <TT
>True</TT
> if <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AmainQuit"
>mainQuit</A
></TT
> was called while processing the event.
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mainIterationDo"
><A NAME="v%3AmainIterationDo"
></A
></A
><B
>mainIterationDo</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#mainIterationDo"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Process a single event.
</P
><UL
><LI
> Called with <TT
>True</TT
>, this function behaves as <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AmainIteration"
>mainIteration</A
></TT
> in that it
 waits until an event is available for processing. It will return
 immediately, if passed <TT
>False</TT
>.
</LI
><LI
> Returns <TT
>True</TT
> if the <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3AmainQuit"
>mainQuit</A
></TT
> was called while processing the event.
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mainDoEvent"
><A NAME="v%3AmainDoEvent"
></A
></A
><B
>mainDoEvent</B
> ::  <A HREF="Graphics-UI-Gtk-Gdk-EventM.html#t%3AEventM"
>EventM</A
> t <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#mainDoEvent"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Processes a single GDK event. This is public only to allow filtering of events between GDK and
 GTK+. You will not usually need to call this function directly.
</P
><P
>While you should not call this function directly, you might want to know how exactly events are
 handled. So here is what this function does with the event:
</P
><P
>1. Compress enter<EM
>leave notify events. If the event passed build an enter</EM
>leave pair together with
     the next event (peeked from GDK) both events are thrown away. This is to avoid a backlog of
     (de-)highlighting widgets crossed by the pointer.
</P
><P
>2. Find the widget which got the event. If the widget can't be determined the event is thrown away
     unless it belongs to a INCR transaction. In that case it is passed to
     selectionIncrEvent.
</P
><P
>3. Then the event is passed on a stack so you can query the currently handled event with
  getCurrentEvent.
</P
><P
>4. The event is sent to a widget. If a grab is active all events for widgets that are not in the
     contained in the grab widget are sent to the latter with a few exceptions:
</P
><UL
><LI
> Deletion and destruction events are still sent to the event widget for obvious reasons.
</LI
><LI
> Events which directly relate to the visual representation of the event widget.
</LI
><LI
> Leave events are delivered to the event widget if there was an enter event delivered to it
         before without the paired leave event.
</LI
><LI
> Drag events are not redirected because it is unclear what the semantics of that would be.
</LI
></UL
><P
>Another point of interest might be that all key events are first passed through the key snooper
     functions if there are any. Read the description of keySnooperInstall if you need this
     feature.
</P
><P
>5. After finishing the delivery the event is popped from the event stack.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="5"
><A NAME="5"
>Grab widgets
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:grabAdd"
><A NAME="v%3AgrabAdd"
></A
></A
><B
>grabAdd</B
> :: <A HREF="Graphics-UI-Gtk-Abstract-Widget.html#t%3AWidgetClass"
>WidgetClass</A
> wd =&gt; wd -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#grabAdd"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>add a grab widget
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:grabGetCurrent"
><A NAME="v%3AgrabGetCurrent"
></A
></A
><B
>grabGetCurrent</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Graphics-UI-Gtk-Abstract-Widget.html#t%3AWidget"
>Widget</A
>)</TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#grabGetCurrent"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>inquire current grab widget
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:grabRemove"
><A NAME="v%3AgrabRemove"
></A
></A
><B
>grabRemove</B
> :: <A HREF="Graphics-UI-Gtk-Abstract-Widget.html#t%3AWidgetClass"
>WidgetClass</A
> w =&gt; w -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#grabRemove"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>remove a grab widget
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="6"
><A NAME="6"
>Timeout and idle callbacks
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:Priority"
><A NAME="t%3APriority"
></A
></A
><B
>Priority</B
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#Priority"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Priorities for installing callbacks.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:priorityLow"
><A NAME="v%3ApriorityLow"
></A
></A
><B
>priorityLow</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#priorityLow"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:priorityDefaultIdle"
><A NAME="v%3ApriorityDefaultIdle"
></A
></A
><B
>priorityDefaultIdle</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#priorityDefaultIdle"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:priorityHighIdle"
><A NAME="v%3ApriorityHighIdle"
></A
></A
><B
>priorityHighIdle</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#priorityHighIdle"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:priorityDefault"
><A NAME="v%3ApriorityDefault"
></A
></A
><B
>priorityDefault</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#priorityDefault"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:priorityHigh"
><A NAME="v%3ApriorityHigh"
></A
></A
><B
>priorityHigh</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#priorityHigh"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:timeoutAdd"
><A NAME="v%3AtimeoutAdd"
></A
></A
><B
>timeoutAdd</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#timeoutAdd"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Sets a function to be called at regular intervals, with the default
 priority <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3ApriorityDefault"
>priorityDefault</A
></TT
>. The function is called repeatedly until it
 returns <TT
>False</TT
>, after which point the timeout function will not be called
 again. The first call to the function will be at the end of the first interval.
</P
><P
>Note that timeout functions may be delayed, due to the processing of other
 event sources. Thus they should not be relied on for precise timing. After
 each call to the timeout function, the time of the next timeout is
 recalculated based on the current time and the given interval (it does not
 try to 'catch up' time lost in delays).
</P
><P
>This function differs from <TT
><A HREF="/usr/share/doc/ghc/html/libraries/glib-0.11.2/System-Glib-MainLoop.html#v%3AtimeoutAdd"
>timeoutAdd</A
></TT
> in that the action will
 be executed within the global Gtk+ lock. It is therefore possible to
 call Gtk+ functions from the action.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:timeoutAddFull"
><A NAME="v%3AtimeoutAddFull"
></A
></A
><B
>timeoutAddFull</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Graphics-UI-Gtk-General-General.html#t%3APriority"
>Priority</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#timeoutAddFull"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Sets a function to be called at regular intervals, with the given
 priority. The function is called repeatedly until it returns <TT
>False</TT
>, after
 which point the timeout function will not be called again. The first call
 to the function will be at the end of the first interval.
</P
><P
>Note that timeout functions may be delayed, due to the processing of other
 event sources. Thus they should not be relied on for precise timing. After
 each call to the timeout function, the time of the next timeout is
 recalculated based on the current time and the given interval (it does not
 try to 'catch up' time lost in delays).
</P
><P
>This function differs from <TT
><A HREF="/usr/share/doc/ghc/html/libraries/glib-0.11.2/System-Glib-MainLoop.html#v%3AtimeoutAddFull"
>timeoutAddFull</A
></TT
> in that the action will
 be executed within the global Gtk+ lock. It is therefore possible to
 call Gtk+ functions from the action.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:timeoutRemove"
><A NAME="v%3AtimeoutRemove"
></A
></A
><B
>timeoutRemove</B
> :: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> ()</TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#timeoutRemove"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Remove a previously added timeout handler by its <TT
><A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:idleAdd"
><A NAME="v%3AidleAdd"
></A
></A
><B
>idleAdd</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Graphics-UI-Gtk-General-General.html#t%3APriority"
>Priority</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#idleAdd"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Add a callback that is called whenever the system is idle.
</P
><UL
><LI
> A priority can be specified via an integer. This should usually be
   <TT
><A HREF="Graphics-UI-Gtk-General-General.html#v%3ApriorityDefaultIdle"
>priorityDefaultIdle</A
></TT
>.
</LI
><LI
> If the function returns <TT
>False</TT
> it will be removed.
</LI
></UL
><P
>This function differs from <TT
><A HREF="/usr/share/doc/ghc/html/libraries/glib-0.11.2/System-Glib-MainLoop.html#v%3AidleAdd"
>idleAdd</A
></TT
> in that the action will
 be executed within the global Gtk+ lock. It is therefore possible to
 call Gtk+ functions from the action.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:idleRemove"
><A NAME="v%3AidleRemove"
></A
></A
><B
>idleRemove</B
> :: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> ()</TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#idleRemove"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Remove a previously added idle handler by its <TT
><A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:inputAdd"
><A NAME="v%3AinputAdd"
></A
></A
><B
>inputAdd</B
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#inputAdd"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AFD"
>FD</A
></TD
><TD CLASS="rdoc"
>a file descriptor
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="Graphics-UI-Gtk-General-General.html#t%3AIOCondition"
>IOCondition</A
>]</TD
><TD CLASS="rdoc"
>the condition to watch for
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="Graphics-UI-Gtk-General-General.html#t%3APriority"
>Priority</A
></TD
><TD CLASS="rdoc"
>the priority of the event source
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="rdoc"
>the function to call when the condition is satisfied.
   The function should return False if the event source
   should be removed.
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
></TD
><TD CLASS="rdoc"
>the event source id
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Adds the file descriptor into the main event loop with the given priority.
</P
><P
>This function differs from <TT
><A HREF="/usr/share/doc/ghc/html/libraries/glib-0.11.2/System-Glib-MainLoop.html#v%3AinputAdd"
>inputAdd</A
></TT
> in that the action will
 be executed within the global Gtk+ lock. It is therefore possible to
 call Gtk+ functions from the action.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:inputRemove"
><A NAME="v%3AinputRemove"
></A
></A
><B
>inputRemove</B
> :: <A HREF="Graphics-UI-Gtk-General-General.html#t%3AHandlerId"
>HandlerId</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> ()</TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#inputRemove"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:IOCondition"
><A NAME="t%3AIOCondition"
></A
></A
><B
>IOCondition</B
>  </TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#IOCondition"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
><P
>Flags representing a condition to watch for on a file descriptor.
</P
><DL
><DT
><TT
>IOIn</TT
></DT
><DD
> There is data to read.
 [<TT
>IOOut</TT
>] Data can be written (without blocking).
 [<TT
>IOPri</TT
>] There is urgent data to read.
 [<TT
>IOErr</TT
>] Error condition.
 [<TT
>IOHup</TT
>] Hung up (the connection has been broken, usually for
 pipes and sockets).
 [<TT
>IOInvalid</TT
>] Invalid request. The file descriptor is not open.
</DD
></DL
></TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:IOIn"
><A NAME="v%3AIOIn"
></A
></A
><B
>IOIn</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:IOOut"
><A NAME="v%3AIOOut"
></A
></A
><B
>IOOut</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:IOPri"
><A NAME="v%3AIOPri"
></A
></A
><B
>IOPri</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:IOErr"
><A NAME="v%3AIOErr"
></A
></A
><B
>IOErr</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:IOHup"
><A NAME="v%3AIOHup"
></A
></A
><B
>IOHup</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:IOInvalid"
><A NAME="v%3AIOInvalid"
></A
></A
><B
>IOInvalid</B
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:IOCondition')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:IOCondition" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t%3ABounded"
>Bounded</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AIOCondition"
>IOCondition</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t%3AEnum"
>Enum</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AIOCondition"
>IOCondition</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AIOCondition"
>IOCondition</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/glib-0.11.2/System-Glib-Flags.html#t%3AFlags"
>Flags</A
> <A HREF="Graphics-UI-Gtk-General-General.html#t%3AIOCondition"
>IOCondition</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:HandlerId"
><A NAME="t%3AHandlerId"
></A
></A
><B
>HandlerId</B
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Foreign-C-Types.html#t%3ACUInt"
>CUInt</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Glib-MainLoop.html#HandlerId"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:FD"
><A NAME="t%3AFD"
></A
></A
><B
>FD</B
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="declbut"
><A HREF="src/Graphics-UI-Gtk-General-General.html#FD"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.6.1</TD
></TR
></TABLE
></BODY
></HTML
>