Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1c54a99948cf54d4f14424bc76b2b75d > files > 69

ghc-GLUT-devel-2.1.2.1-9.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.UI.GLUT.Window</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Graphics-UI-GLUT-Window.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-UI-GLUT-Window.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">GLUT-2.1.2.1: A binding for the OpenGL Utility Toolkit</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>stable</td></tr><tr><th>Maintainer</th><td>sven.panne@aedion.de</td></tr></table><p class="caption">Graphics.UI.GLUT.Window</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Window identifiers
</a></li><li><a href="#g:2">Creating and destroying (sub-)windows
</a></li><li><a href="#g:3">Manipulating the <em>current window</em>
</a></li><li><a href="#g:4">Re-displaying and double buffer management
</a></li><li><a href="#g:5">Changing the window geometry
</a></li><li><a href="#g:6">Manipulating the stacking order
</a></li><li><a href="#g:7">Managing a window's display status
</a></li><li><a href="#g:8">Changing the window/icon title
</a></li><li><a href="#g:9">Cursor management
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>GLUT supports two types of windows: top-level windows and subwindows. Both
 types support OpenGL rendering and GLUT callbacks. There is a single
 identifier space for both types of windows.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span>  <a href="#t:Window">Window</a> </li><li class="src short"><a href="#v:createWindow">createWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></li><li class="src short"><a href="#v:createSubWindow">createSubWindow</a> :: <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Position">Position</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Size">Size</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></li><li class="src short"><a href="#v:destroyWindow">destroyWindow</a> :: <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:parentWindow">parentWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a>)</li><li class="src short"><a href="#v:numSubWindows">numSubWindows</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:currentWindow">currentWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a>)</li><li class="src short"><a href="#v:postRedisplay">postRedisplay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:swapBuffers">swapBuffers</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:windowPosition">windowPosition</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Position">Position</a></li><li class="src short"><a href="#v:windowSize">windowSize</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Size">Size</a></li><li class="src short"><a href="#v:fullScreen">fullScreen</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:fullScreenToggle">fullScreenToggle</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:pushWindow">pushWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:popWindow">popWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:WindowStatus">WindowStatus</a> <ul class="subs"><li>= <a href="#v:Shown">Shown</a>  </li><li>| <a href="#v:Hidden">Hidden</a>  </li><li>| <a href="#v:Iconified">Iconified</a>  </li></ul></li><li class="src short"><a href="#v:windowStatus">windowStatus</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="Graphics-UI-GLUT-Window.html#t:WindowStatus">WindowStatus</a></li><li class="src short"><a href="#v:windowTitle">windowTitle</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><a href="#v:iconTitle">iconTitle</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Cursor">Cursor</a> <ul class="subs"><li>= <a href="#v:RightArrow">RightArrow</a>  </li><li>| <a href="#v:LeftArrow">LeftArrow</a>  </li><li>| <a href="#v:Info">Info</a>  </li><li>| <a href="#v:Destroy">Destroy</a>  </li><li>| <a href="#v:Help">Help</a>  </li><li>| <a href="#v:Cycle">Cycle</a>  </li><li>| <a href="#v:Spray">Spray</a>  </li><li>| <a href="#v:Wait">Wait</a>  </li><li>| <a href="#v:Text">Text</a>  </li><li>| <a href="#v:Crosshair">Crosshair</a>  </li><li>| <a href="#v:UpDown">UpDown</a>  </li><li>| <a href="#v:LeftRight">LeftRight</a>  </li><li>| <a href="#v:TopSide">TopSide</a>  </li><li>| <a href="#v:BottomSide">BottomSide</a>  </li><li>| <a href="#v:LeftSide">LeftSide</a>  </li><li>| <a href="#v:RightSide">RightSide</a>  </li><li>| <a href="#v:TopLeftCorner">TopLeftCorner</a>  </li><li>| <a href="#v:TopRightCorner">TopRightCorner</a>  </li><li>| <a href="#v:BottomRightCorner">BottomRightCorner</a>  </li><li>| <a href="#v:BottomLeftCorner">BottomLeftCorner</a>  </li><li>| <a href="#v:Inherit">Inherit</a>  </li><li>| <a href="#v:None">None</a>  </li><li>| <a href="#v:FullCrosshair">FullCrosshair</a>  </li></ul></li><li class="src short"><a href="#v:cursor">cursor</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="Graphics-UI-GLUT-Window.html#t:Cursor">Cursor</a></li><li class="src short"><a href="#v:pointerPosition">pointerPosition</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Position">Position</a></li></ul></div><div id="interface"><h1 id="g:1">Window identifiers
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Window" class="def">Window</a>  <a href="src/Graphics-UI-GLUT-Types.html#Window" class="link">Source</a></p><div class="doc"><p>An opaque identifier for a top-level window or a subwindow.
</p></div><div class="subs instances"><p id="control.i:Window" class="caption collapser" onclick="toggleSection('i:Window')">Instances</p><div id="section.i:Window" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Creating and destroying (sub-)windows
</h1><div class="doc"><p>Each created window has a unique associated OpenGL context. State changes to
 a window's associated OpenGL context can be done immediately after the
 window is created.
</p><p>The <em>display state</em> of a window is initially for the window to be shown. But
 the window's <em>display state</em> is not actually acted upon until
 <code>Graphics.UI.GLUT.Begin.mainLoop</code> is entered. This means until
 <code>Graphics.UI.GLUT.Begin.mainLoop</code> is called, rendering to a created window is
 ineffective because the window can not yet be displayed.
</p><p>The value returned by <code><a href="Graphics-UI-GLUT-Window.html#v:createWindow">createWindow</a></code> and <code><a href="Graphics-UI-GLUT-Window.html#v:createSubWindow">createSubWindow</a></code> is a unique
 identifier for the window, which can be used with <code><a href="Graphics-UI-GLUT-Window.html#v:currentWindow">currentWindow</a></code>.
</p></div><div class="top"><p class="src"><a name="v:createWindow" class="def">createWindow</a><a href="src/Graphics-UI-GLUT-Window.html#createWindow" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc"><p>The window name
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></td><td class="doc"><p>The identifier for the newly created window
</p></td></tr></table></div><div class="doc"><p>Create a top-level window. The given name will be provided to the window
 system as the window's name. The intent is that the window system will label
 the window with the name.Implicitly, the <em>current window</em> is set to the newly
 created window.
</p><p><em>X Implementation Notes:</em> The proper X Inter-Client Communication Conventions
 Manual (ICCCM) top-level properties are established. The <code>WM_COMMAND</code>
 property that lists the command line used to invoke the GLUT program is only
 established for the first window created.
</p></div></div><div class="top"><p class="src"><a name="v:createSubWindow" class="def">createSubWindow</a><a href="src/Graphics-UI-GLUT-Window.html#createSubWindow" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></td><td class="doc"><p>Identifier of the subwindow's parent window.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Position">Position</a></td><td class="doc"><p>Window position in pixels relative to parent window's
   origin.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Size">Size</a></td><td class="doc"><p>Window size in pixels
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a></td><td class="doc"><p>The identifier for the newly created subwindow
</p></td></tr></table></div><div class="doc"><p>Create a subwindow of the identified window with the given relative
 position and size. Implicitly, the <em>current window</em> is set to the
 newly created subwindow. Subwindows can be nested arbitrarily deep.
</p></div></div><div class="top"><p class="src"><a name="v:destroyWindow" class="def">destroyWindow</a> :: <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-GLUT-Window.html#destroyWindow" class="link">Source</a></p><div class="doc"><p>Destroy the specified window and the window's associated OpenGL context,
 logical colormap (if the window is color index), and overlay and related
 state (if an overlay has been established). Any subwindows of the destroyed
 window are also destroyed by <code><a href="Graphics-UI-GLUT-Window.html#v:destroyWindow">destroyWindow</a></code>. If the specified window was the
 <em>current window</em>, the <em>current window</em> becomes invalid (<code><a href="Graphics-UI-GLUT-Window.html#v:currentWindow">currentWindow</a></code> will
 contain <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code>).
</p></div></div><div class="top"><p class="src"><a name="v:parentWindow" class="def">parentWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a>)<a href="src/Graphics-UI-GLUT-Window.html#parentWindow" class="link">Source</a></p><div class="doc"><p>Contains the <em>current window\'s</em> parent. If the <em>current window</em> is a
 top-level window, <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> is returned.
</p></div></div><div class="top"><p class="src"><a name="v:numSubWindows" class="def">numSubWindows</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a><a href="src/Graphics-UI-GLUT-Window.html#numSubWindows" class="link">Source</a></p><div class="doc"><p>Contains the number of subwindows the <em>current window</em> has, not counting
 children of children.
</p></div></div><h1 id="g:3">Manipulating the <em>current window</em>
</h1><div class="top"><p class="src"><a name="v:currentWindow" class="def">currentWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a>)<a href="src/Graphics-UI-GLUT-Window.html#currentWindow" class="link">Source</a></p><div class="doc"><p>Controls the <em>current window</em>. It does <em>not</em> affect the <em>layer in use</em> for
 the window; this is done using <code>Graphics.UI.GLUT.Overlay.layerInUse</code>.
 Contains <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if no windows exist or the previously <em>current window</em> was
 destroyed. Setting the <em>current window</em> to <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> is a no-op.
</p></div></div><h1 id="g:4">Re-displaying and double buffer management
</h1><div class="top"><p class="src"><a name="v:postRedisplay" class="def">postRedisplay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-GLUT-Window.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-GLUT-Window.html#postRedisplay" class="link">Source</a></p><div class="doc"><p>Mark the normal plane of given window (or the <em>current window</em>, if none
 is supplied) as needing to be redisplayed. The next iteration through
 <code>Graphics.UI.GLUT.Begin.mainLoop</code>, the window's display callback will be
 called to redisplay the window's normal plane. Multiple calls to
 <code><a href="Graphics-UI-GLUT-Window.html#v:postRedisplay">postRedisplay</a></code> before the next display callback opportunity generates only a
 single redisplay callback. <code><a href="Graphics-UI-GLUT-Window.html#v:postRedisplay">postRedisplay</a></code> may be called within a window's
 display or overlay display callback to re-mark that window for redisplay.
</p><p>Logically, normal plane damage notification for a window is treated as a
 <code><a href="Graphics-UI-GLUT-Window.html#v:postRedisplay">postRedisplay</a></code> on the damaged window. Unlike damage reported by the window
 system, <code><a href="Graphics-UI-GLUT-Window.html#v:postRedisplay">postRedisplay</a></code> will <em>not</em> set to true the normal plane's damaged
 status (see <code>Graphics.UI.GLUT.State.damaged</code>).
</p><p>Also, see <code>Graphics.UI.GLUT.Overlay.postOverlayRedisplay</code>.
</p></div></div><div class="top"><p class="src"><a name="v:swapBuffers" class="def">swapBuffers</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-GLUT-Window.html#swapBuffers" class="link">Source</a></p><div class="doc"><p>Perform a buffer swap on the <em>layer in use</em> for the <em>current window</em>.
 Specifically, <code><a href="Graphics-UI-GLUT-Window.html#v:swapBuffers">swapBuffers</a></code> promotes the contents of the back buffer of the
 <em>layer in use</em> of the <em>current window</em> to become the contents of the front
 buffer. The contents of the back buffer then become undefined. The update
 typically takes place during the vertical retrace of the monitor, rather than
 immediately after <code><a href="Graphics-UI-GLUT-Window.html#v:swapBuffers">swapBuffers</a></code> is called.
</p><p>An implicit <code>Graphics.Rendering.OpenGL.GL.FlushFinish.flush</code> is done by
 <code><a href="Graphics-UI-GLUT-Window.html#v:swapBuffers">swapBuffers</a></code> before it returns. Subsequent OpenGL commands can be issued
 immediately after calling <code><a href="Graphics-UI-GLUT-Window.html#v:swapBuffers">swapBuffers</a></code>, but are not executed until the
 buffer exchange is completed.
</p><p>If the <em>layer in use</em> is not double buffered, <code><a href="Graphics-UI-GLUT-Window.html#v:swapBuffers">swapBuffers</a></code> has no effect.
</p></div></div><h1 id="g:5">Changing the window geometry
</h1><div class="doc"><p>Note that the requests by <code><a href="Graphics-UI-GLUT-Window.html#v:windowPosition">windowPosition</a></code>, <code><a href="Graphics-UI-GLUT-Window.html#v:windowSize">windowSize</a></code>, and <code><a href="Graphics-UI-GLUT-Window.html#v:fullScreen">fullScreen</a></code>
 are not processed immediately. A request is executed after returning to the
 main event loop. This allows multiple requests to the same window to be
 coalesced.
</p><p><code><a href="Graphics-UI-GLUT-Window.html#v:windowPosition">windowPosition</a></code> and <code><a href="Graphics-UI-GLUT-Window.html#v:windowSize">windowSize</a></code> requests on a window will disable the full
 screen status of the window.
</p></div><div class="top"><p class="src"><a name="v:windowPosition" class="def">windowPosition</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Position">Position</a><a href="src/Graphics-UI-GLUT-Window.html#windowPosition" class="link">Source</a></p><div class="doc"><p>Controls the position of the <em>current window</em>. For top-level windows,
 parameters of <code><a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Position">Position</a></code> are pixel offsets from the screen origin. For
 subwindows, the parameters are pixel offsets from the window's parent window
 origin.
</p><p>In the case of top-level windows, setting <code><a href="Graphics-UI-GLUT-Window.html#v:windowPosition">windowPosition</a></code> is considered only
 a request for positioning the window. The window system is free to apply its
 own policies to top-level window placement. The intent is that top-level
 windows should be repositioned according to the value of <code><a href="Graphics-UI-GLUT-Window.html#v:windowPosition">windowPosition</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:windowSize" class="def">windowSize</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Size">Size</a><a href="src/Graphics-UI-GLUT-Window.html#windowSize" class="link">Source</a></p><div class="doc"><p>Controls the size of the <em>current window</em>. The parameters of <code><a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Size">Size</a></code> are
 size extents in pixels. The width and height must be positive values.
</p><p>In the case of top-level windows, setting <code><a href="Graphics-UI-GLUT-Window.html#v:windowSize">windowSize</a></code> is considered only a
 request for sizing the window. The window system is free to apply its own
 policies to top-level window sizing. The intent is that top-level windows
 should be reshaped according to the value of <code><a href="Graphics-UI-GLUT-Window.html#v:windowSize">windowSize</a></code>. Whether a reshape
 actually takes effect and, if so, the reshaped dimensions are reported to the
 program by a reshape callback.
</p></div></div><div class="top"><p class="src"><a name="v:fullScreen" class="def">fullScreen</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-GLUT-Window.html#fullScreen" class="link">Source</a></p><div class="doc"><p>Request that the <em>current window</em> be made full screen. The exact semantics
 of what full screen means may vary by window system. The intent is to make
 the window as large as possible and disable any window decorations or borders
 added the window system. The window width and height are not guaranteed to be
 the same as the screen width and height, but that is the intent of making a
 window full screen.
</p><p><code><a href="Graphics-UI-GLUT-Window.html#v:fullScreen">fullScreen</a></code> is defined to work only on top-level windows.
</p><p><em>X Implementation Notes:</em> In the X implementation of GLUT, full screen is
 implemented by sizing and positioning the window to cover the entire screen
 and posting the <code>_MOTIF_WM_HINTS</code> property on the window requesting
 absolutely no decorations. Non-Motif window managers may not respond to
 <code>_MOTIF_WM_HINTS</code>.
</p></div></div><div class="top"><p class="src"><a name="v:fullScreenToggle" class="def">fullScreenToggle</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-GLUT-Window.html#fullScreenToggle" class="link">Source</a></p><div class="doc"><p>(<em>freeglut only</em>) Toggle between windowed and full screen mode.
</p></div></div><h1 id="g:6">Manipulating the stacking order
</h1><div class="doc"><p><code><a href="Graphics-UI-GLUT-Window.html#v:pushWindow">pushWindow</a></code> and <code><a href="Graphics-UI-GLUT-Window.html#v:popWindow">popWindow</a></code> work on both top-level windows and subwindows.
 The effect of pushing and popping windows does not take place immediately.
 Instead the push or pop is saved for execution upon return to the GLUT event
 loop. Subsequent pop or push requests on a window replace the previously
 saved request for that window. The effect of pushing and popping top-level
 windows is subject to the window system's policy for restacking windows.
</p></div><div class="top"><p class="src"><a name="v:pushWindow" class="def">pushWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-GLUT-Window.html#pushWindow" class="link">Source</a></p><div class="doc"><p>Change the stacking order of the <em>current window</em> relative to its siblings
 (lowering it).
</p></div></div><div class="top"><p class="src"><a name="v:popWindow" class="def">popWindow</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-GLUT-Window.html#popWindow" class="link">Source</a></p><div class="doc"><p>Change the stacking order of the <em>current window</em> relative to its siblings,
 bringing the <em>current window</em> closer to the top.
</p></div></div><h1 id="g:7">Managing a window's display status
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:WindowStatus" class="def">WindowStatus</a>  <a href="src/Graphics-UI-GLUT-Window.html#WindowStatus" class="link">Source</a></p><div class="doc"><p>The display status of a window.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Shown" class="def">Shown</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Hidden" class="def">Hidden</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Iconified" class="def">Iconified</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:WindowStatus" class="caption collapser" onclick="toggleSection('i:WindowStatus')">Instances</p><div id="section.i:WindowStatus" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-GLUT-Window.html#t:WindowStatus">WindowStatus</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Graphics-UI-GLUT-Window.html#t:WindowStatus">WindowStatus</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-GLUT-Window.html#t:WindowStatus">WindowStatus</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:windowStatus" class="def">windowStatus</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="Graphics-UI-GLUT-Window.html#t:WindowStatus">WindowStatus</a><a href="src/Graphics-UI-GLUT-Window.html#windowStatus" class="link">Source</a></p><div class="doc"><p>Controls the display status of the <em>current window</em>.
</p><p>Note that the effect of showing, hiding, and iconifying windows does not take
 place immediately. Instead the requests are saved for execution upon return
 to the GLUT event loop. Subsequent show, hide, or iconification requests on a
 window replace the previously saved request for that window. The effect of
 hiding, showing, or iconifying top-level windows is subject to the window
 system's policy for displaying windows. Subwindows can't be iconified.
</p></div></div><h1 id="g:8">Changing the window/icon title
</h1><div class="doc"><p><code><a href="Graphics-UI-GLUT-Window.html#v:windowTitle">windowTitle</a></code> and <code><a href="Graphics-UI-GLUT-Window.html#v:iconTitle">iconTitle</a></code> should be set only when the /current
 window/ is a top-level window. Upon creation of a top-level window, the
 window and icon names are determined by the name given to <code><a href="Graphics-UI-GLUT-Window.html#v:createWindow">createWindow</a></code>.
 Once created, setting <code><a href="Graphics-UI-GLUT-Window.html#v:windowTitle">windowTitle</a></code> and <code><a href="Graphics-UI-GLUT-Window.html#v:iconTitle">iconTitle</a></code> can change the window and
 icon names respectively of top-level windows. Each call requests the window
 system change the title appropriately. Requests are not buffered or
 coalesced. The policy by which the window and icon name are displayed is
 window system dependent.
</p></div><div class="top"><p class="src"><a name="v:windowTitle" class="def">windowTitle</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Graphics-UI-GLUT-Window.html#windowTitle" class="link">Source</a></p><div class="doc"><p>Controls the window title of the <em>current top-level window</em>.
</p></div></div><div class="top"><p class="src"><a name="v:iconTitle" class="def">iconTitle</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Graphics-UI-GLUT-Window.html#iconTitle" class="link">Source</a></p><div class="doc"><p>Controls the icon title of the <em>current top-level window</em>.
</p></div></div><h1 id="g:9">Cursor management
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Cursor" class="def">Cursor</a>  <a href="src/Graphics-UI-GLUT-Window.html#Cursor" class="link">Source</a></p><div class="doc"><p>The different cursor images GLUT supports.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RightArrow" class="def">RightArrow</a></td><td class="doc"><p>Arrow pointing up and to the right.
</p></td></tr><tr><td class="src"><a name="v:LeftArrow" class="def">LeftArrow</a></td><td class="doc"><p>Arrow pointing up and to the left.
</p></td></tr><tr><td class="src"><a name="v:Info" class="def">Info</a></td><td class="doc"><p>Pointing hand.
</p></td></tr><tr><td class="src"><a name="v:Destroy" class="def">Destroy</a></td><td class="doc"><p>Skull &amp; cross bones.
</p></td></tr><tr><td class="src"><a name="v:Help" class="def">Help</a></td><td class="doc"><p>Question mark.
</p></td></tr><tr><td class="src"><a name="v:Cycle" class="def">Cycle</a></td><td class="doc"><p>Arrows rotating in a circle.
</p></td></tr><tr><td class="src"><a name="v:Spray" class="def">Spray</a></td><td class="doc"><p>Spray can.
</p></td></tr><tr><td class="src"><a name="v:Wait" class="def">Wait</a></td><td class="doc"><p>Wrist watch.
</p></td></tr><tr><td class="src"><a name="v:Text" class="def">Text</a></td><td class="doc"><p>Insertion point cursor for text.
</p></td></tr><tr><td class="src"><a name="v:Crosshair" class="def">Crosshair</a></td><td class="doc"><p>Simple cross-hair.
</p></td></tr><tr><td class="src"><a name="v:UpDown" class="def">UpDown</a></td><td class="doc"><p>Bi-directional pointing up &amp; down.
</p></td></tr><tr><td class="src"><a name="v:LeftRight" class="def">LeftRight</a></td><td class="doc"><p>Bi-directional pointing left &amp; right.
</p></td></tr><tr><td class="src"><a name="v:TopSide" class="def">TopSide</a></td><td class="doc"><p>Arrow pointing to top side.
</p></td></tr><tr><td class="src"><a name="v:BottomSide" class="def">BottomSide</a></td><td class="doc"><p>Arrow pointing to bottom side.
</p></td></tr><tr><td class="src"><a name="v:LeftSide" class="def">LeftSide</a></td><td class="doc"><p>Arrow pointing to left side.
</p></td></tr><tr><td class="src"><a name="v:RightSide" class="def">RightSide</a></td><td class="doc"><p>Arrow pointing to right side.
</p></td></tr><tr><td class="src"><a name="v:TopLeftCorner" class="def">TopLeftCorner</a></td><td class="doc"><p>Arrow pointing to top-left corner.
</p></td></tr><tr><td class="src"><a name="v:TopRightCorner" class="def">TopRightCorner</a></td><td class="doc"><p>Arrow pointing to top-right corner.
</p></td></tr><tr><td class="src"><a name="v:BottomRightCorner" class="def">BottomRightCorner</a></td><td class="doc"><p>Arrow pointing to bottom-left corner.
</p></td></tr><tr><td class="src"><a name="v:BottomLeftCorner" class="def">BottomLeftCorner</a></td><td class="doc"><p>Arrow pointing to bottom-right corner.
</p></td></tr><tr><td class="src"><a name="v:Inherit" class="def">Inherit</a></td><td class="doc"><p>Use parent's cursor.
</p></td></tr><tr><td class="src"><a name="v:None" class="def">None</a></td><td class="doc"><p>Invisible cursor.
</p></td></tr><tr><td class="src"><a name="v:FullCrosshair" class="def">FullCrosshair</a></td><td class="doc"><p>Full-screen cross-hair cursor (if possible, otherwise <code><a href="Graphics-UI-GLUT-Window.html#v:Crosshair">Crosshair</a></code>).
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Cursor" class="caption collapser" onclick="toggleSection('i:Cursor')">Instances</p><div id="section.i:Cursor" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-GLUT-Window.html#t:Cursor">Cursor</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Graphics-UI-GLUT-Window.html#t:Cursor">Cursor</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-GLUT-Window.html#t:Cursor">Cursor</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:cursor" class="def">cursor</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="Graphics-UI-GLUT-Window.html#t:Cursor">Cursor</a><a href="src/Graphics-UI-GLUT-Window.html#cursor" class="link">Source</a></p><div class="doc"><p>Change the cursor image of the <em>current window</em>. Each call requests the
 window system change the cursor appropriately. The cursor image when a window
 is created is <code><a href="Graphics-UI-GLUT-Window.html#v:Inherit">Inherit</a></code>. The exact cursor images used are implementation
 dependent. The intent is for the image to convey the meaning of the cursor
 name. For a top-level window, <code><a href="Graphics-UI-GLUT-Window.html#v:Inherit">Inherit</a></code> uses the default window system
 cursor.
</p><p><em>X Implementation Notes:</em> GLUT for X uses SGI's <code>_SGI_CROSSHAIR_CURSOR</code>
 convention to access a full-screen cross-hair cursor if possible.
</p></div></div><div class="top"><p class="src"><a name="v:pointerPosition" class="def">pointerPosition</a> :: <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-StateVar.html#t:SettableStateVar">SettableStateVar</a> <a href="/usr/share/doc/ghc/html/libraries/OpenGL-2.2.3.0/Graphics-Rendering-OpenGL-GL-CoordTrans.html#t:Position">Position</a><a href="src/Graphics-UI-GLUT-Window.html#pointerPosition" class="link">Source</a></p><div class="doc"><p>Setting <code><a href="Graphics-UI-GLUT-Window.html#v:pointerPosition">pointerPosition</a></code> warps the window system's pointer to a new
 location relative to the origin of the <em>current window</em> by the specified
 pixel offset, which may be negative. The warp is done immediately.
</p><p>If the pointer would be warped outside the screen's frame buffer region, the
 location will be clamped to the nearest screen edge. The window system is
 allowed to further constrain the pointer's location in window system
 dependent ways.
</p><p>Good advice from Xlib's <code>XWarpPointer</code> man page: &quot;There is seldom any
 reason for calling this function. The pointer should normally be left to the
 user.&quot;
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>