This file is indexed.

/usr/share/doc/libghc-gloss-doc/html/Graphics-Gloss.html is in libghc-gloss-doc 1.7.8.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!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.Gloss</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-Gloss.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-Gloss.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">gloss-1.7.8.3: Painless 2D vector graphics, animations and simulations.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Graphics.Gloss</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Gloss hides the pain of drawing simple vector graphics behind a nice data type and
	a few display functions. 
</p><p>Getting something on the screen is as easy as:
</p><pre>
    import Graphics.Gloss
    main = <code><a href="Graphics-Gloss.html#v:display">display</a></code> (InWindow &quot;Nice Window&quot; (200, 200) (10, 10)) <code><a href="Graphics-Gloss-Data-Color.html#v:white">white</a></code> (<code><a href="Graphics-Gloss-Data-Picture.html#v:Circle">Circle</a></code> 80)
</pre><p>Once the window is open you can use the following:
</p><ul><li> Quit - esc-key.
</li><li> Move Viewport - left-click drag, arrow keys.
</li><li> Rotate Viewport - right-click drag, control-left-click drag, or home/end-keys.
</li><li> Zoom Viewport - mouse wheel, or page up/down-keys.
</li></ul><p>Animations can be constructed similarly using the <code><a href="Graphics-Gloss.html#v:animate">animate</a></code>.
</p><p>If you want to run a simulation based around finite time steps then try
   <code><a href="Graphics-Gloss.html#v:simulate">simulate</a></code>.
</p><p>If you want to manage your own key/mouse events then use <code><a href="Graphics-Gloss.html#v:play">play</a></code>.
</p><p>Gloss uses OpenGL under the hood, but you don't have to worry about any of that.
</p><p>Gloss programs should be compiled with <code>-threaded</code>, otherwise the GHC runtime
   will limit the frame-rate to around 20Hz.
</p><pre>Release Notes:

For 1.7.0:
   * Tweaked circle level-of-detail reduction code.
   * Increased frame rate cap to 100hz.
   Thanks to Doug Burke
   * Primitives for drawing arcs and sectors.
   Thanks to Thomas DuBuisson
   * IO versions of animate, simplate and play.

For 1.6.0:
   Thanks to Anthony Cowley
   * Full screen display mode.

For 1.5.0:
   * O(1) Conversion of ForeignPtrs to bitmaps.
   * An extra flag on the Bitmap constructor allows bitmaps to be cached
     in texture memory between frames.

For 1.4.0:
   Thanks to Christiaan Baaij: 
   * Refactoring of Gloss internals to support multiple window manager backends.
   * Support for using GLFW as the window library instead of GLUT.
     GLUT is still the default, but to use GLFW install gloss with:
        cabal install gloss --flags=&quot;GLFW -GLUT&quot;
</pre><p>For more information, check out <a href="http://gloss.ouroborus.net">http://gloss.ouroborus.net</a>.
</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">module <a href="Graphics-Gloss-Data-Picture.html">Graphics.Gloss.Data.Picture</a></li><li class="src short">module <a href="Graphics-Gloss-Data-Color.html">Graphics.Gloss.Data.Color</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Display">Display</a> <ul class="subs"><li>= <a href="#v:InWindow">InWindow</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>) (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)  </li><li>| <a href="#v:FullScreen">FullScreen</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)  </li></ul></li><li class="src short"><a href="#v:display">display</a> :: <a href="Graphics-Gloss.html#t:Display">Display</a> -&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a> -&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:animate">animate</a> :: <a href="Graphics-Gloss.html#t:Display">Display</a> -&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a> -&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a>) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:simulate">simulate</a> :: <span class="keyword">forall</span> model.  <a href="Graphics-Gloss.html#t:Display">Display</a> -&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; model -&gt; (model -&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a>) -&gt; (<a href="Graphics-Gloss-Interface-Pure-Simulate.html#t:ViewPort">ViewPort</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a> -&gt; model -&gt; model) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:play">play</a> :: <span class="keyword">forall</span> world.  <a href="Graphics-Gloss.html#t:Display">Display</a> -&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; world -&gt; (world -&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a>) -&gt; (<a href="Graphics-Gloss-Interface-Pure-Game.html#t:Event">Event</a> -&gt; world -&gt; world) -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a> -&gt; world -&gt; world) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src">module <a href="Graphics-Gloss-Data-Picture.html">Graphics.Gloss.Data.Picture</a></p></div><div class="top"><p class="src">module <a href="Graphics-Gloss-Data-Color.html">Graphics.Gloss.Data.Color</a></p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Display" class="def">Display</a>  <a href="src/Graphics-Gloss-Data-Display.html#Display" class="link">Source</a></p><div class="doc"><p>Describes how Gloss should display its output.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:InWindow" class="def">InWindow</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>) (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</td><td class="doc"><p>Display in a window with the given name, size and position.
</p></td></tr><tr><td class="src"><a name="v:FullScreen" class="def">FullScreen</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</td><td class="doc"><p>Display full screen with a drawing area of the given size.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Display" class="caption collapser" onclick="toggleSection('i:Display')">Instances</p><div id="section.i:Display" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-Gloss.html#t:Display">Display</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> <a href="Graphics-Gloss.html#t:Display">Display</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Graphics-Gloss.html#t:Display">Display</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:display" class="def">display</a><a href="src/Graphics-Gloss-Interface-Pure-Display.html#display" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-Gloss.html#t:Display">Display</a></td><td class="doc"><p>Display mode.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a></td><td class="doc"><p>Background color.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a></td><td class="doc"><p>The picture to draw.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Open a new window and display the given picture.
</p><p>Use the following commands once the window is open:
</p><ul><li> Quit - esc-key.
</li><li> Move Viewport - left-click drag, arrow keys.
</li><li> Rotate Viewport - right-click drag, control-left-click drag, or home/end-keys.
</li><li> Zoom Viewport - mouse wheel, or page up/down-keys.
</li></ul></div></div><div class="top"><p class="src"><a name="v:animate" class="def">animate</a><a href="src/Graphics-Gloss-Interface-Pure-Animate.html#animate" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-Gloss.html#t:Display">Display</a></td><td class="doc"><p>Display mode.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a></td><td class="doc"><p>Background color.
</p></td></tr><tr><td class="src">-&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a> -&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a>)</td><td class="doc"><p>Function to produce the next frame of animation. 
      It is passed the time in seconds since the program started.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Open a new window and display the given animation.
</p><p>Once the window is open you can use the same commands as with <code>display</code>.
</p></div></div><div class="top"><p class="src"><a name="v:simulate" class="def">simulate</a><a href="src/Graphics-Gloss-Interface-Pure-Simulate.html#simulate" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <span class="keyword">forall</span> model . </td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Graphics-Gloss.html#t:Display">Display</a></td><td class="doc"><p>Display mode.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a></td><td class="doc"><p>Background color.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of simulation steps to take for each second of real time.
</p></td></tr><tr><td class="src">-&gt; model</td><td class="doc"><p>The initial model.
</p></td></tr><tr><td class="src">-&gt; (model -&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a>)</td><td class="doc"><p>A function to convert the model to a picture.
</p></td></tr><tr><td class="src">-&gt; (<a href="Graphics-Gloss-Interface-Pure-Simulate.html#t:ViewPort">ViewPort</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a> -&gt; model -&gt; model)</td><td class="doc"><p>A function to step the model one iteration. It is passed the 
     current viewport and the amount of time for this simulation
     step (in seconds).
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Run a finite-time-step simulation in a window. You decide how the model is represented,
      how to convert the model to a picture, and how to advance the model for each unit of time. 
      This function does the rest.
</p><p>Once the window is open you can use the same commands as with <code>display</code>.
</p></div></div><div class="top"><p class="src"><a name="v:play" class="def">play</a><a href="src/Graphics-Gloss-Interface-Pure-Game.html#play" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <span class="keyword">forall</span> world . </td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Graphics-Gloss.html#t:Display">Display</a></td><td class="doc"><p>Display mode.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-Color.html#t:Color">Color</a></td><td class="doc"><p>Background color.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of simulation steps to take for each second of real time.
</p></td></tr><tr><td class="src">-&gt; world</td><td class="doc"><p>The initial world.
</p></td></tr><tr><td class="src">-&gt; (world -&gt; <a href="Graphics-Gloss-Data-Picture.html#t:Picture">Picture</a>)</td><td class="doc"><p>A function to convert the world a picture.
</p></td></tr><tr><td class="src">-&gt; (<a href="Graphics-Gloss-Interface-Pure-Game.html#t:Event">Event</a> -&gt; world -&gt; world)</td><td class="doc"><p>A function to handle input events.
</p></td></tr><tr><td class="src">-&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a> -&gt; world -&gt; world)</td><td class="doc"><p>A function to step the world one iteration.
   It is passed the period of time (in seconds) needing to be advanced.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Play a game in a window. 
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>