רF      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    Safe-Inferred+FSimulation state!The iteration number we're up to.>How many simulation setps to take for each second of real time6How many seconds worth of simulation we've done so farInitial control state None+F-Dump internal state of the OpenGL framebuffer-Dump internal state of the fragment renderer.  Safe-Inferred+FHM$Arguments: (Width,Height) in pixels. No arguments.!Arguments: (PosX,PosY) in pixels.UArguments: KeyType, Key Up / Down, Ctrl / Alt / Shift pressed, latest mouse location."Display callback has no arguments.DThe functions every backend window managed backend needs to support.The Backend module interfaces with the window manager, and handles opening and closing the window, and managing key events etc.It doesn't know anything about drawing lines or setting colors. When we get a display callback, Gloss will perform OpenGL actions, and the backend needs to have OpenGL in a state where it's able to accept them.Initialize the state used by the backend. If you don't use any state, make a Unit-like type; see the GLUT backend for an example.Perform any initialization that needs to happen before opening a window The Boolean flag indicates if any debug information should be printed to the terminal3Perform any deinitialization and close the backend.*Open a window with the given display mode.3Dump information about the backend to the terminal.Install the display callbacks."Install the window close callback.Install the reshape callbacks.%Install the keymouse press callbacks.#Install the mouse motion callbacks.Install the idle callbacks.The mainloop of the backend.6A function that signals that screen has to be updated.=Function that returns (width,height) of the window in pixels.UFunction that reports the time elapsed since the application started. (in seconds)3Function that puts the current thread to sleep for n seconds.r  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_u  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_  BQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! RTSU[ZYXWV\_^] Safe-Inferred+F  Safe-Inferred+FHMNone+F]We don't maintain any state information for the GLUT backend, so this data type is empty.-Convert GLUTs key codes to our internal ones..Convert GLUTs key states to our internal ones..Convert GLUTs key states to our internal ones. Safe-Inferred+F Animation State!Whether the animation is running.0How many times we've entered the animation loop.1Whether this is the first frame of the animation.1Number of msec the animation has been running forDThe time when we entered the display callback for the current frame.xClamp the minimum time between frames to this value (in seconds) Setting this to < 10ms probably isn't worthwhile.BThe time when the last call to the users render function finished.JThe time when displayInWindow last finished (after sleeping to clamp fps).#How long it took to draw this frame  None+FHM`The quadtree contains cells of unit extent (NetHack style). Given a line segement (P1-P2) through the tree, get the cell closest to P1 that intersects the segment, if any.ETODO: This currently uses a naive algorithm. It just calls a and sorts the results to get the one closest to P1. It'd be better to do a proper walk over the tree in the direction of the ray.aThe quadtree contains cells of unit extent (NetHack style). Given a line segment (P1-P2) through the tree, return the list of cells that intersect the segment.`(P1) Starting point of seg.(P2) Final point of seg. Extent convering the whole tree. The tree.;Intersection point, extent of cell, value of cell (if any).a(P1) Starting point of seg.(P2) Final point of seg.Extent covering the whole tree. The tree.2Intersection point, extent of cell, value of cell.`a`a`aNone+Fw  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_None+FHMbPossible input events.bcdebcdebedcNone+FHMQHandles animation timing details. Call this function at the start of each frame.OHandles animation timing details. Call this function at the end of each frame.None+FHMrThe graphics library calls back on this function when it's finished drawing and it's time to do some computation.the simulation statethe animation stateaaction to get the . We don't use an 0 directly because sometimes we hold a ref to a % (in Game) and sometimes a ref to a  ViewState.the current worldfn to advance the world7how much time to advance world by in single step modeNone+FRCallback to handle keyboard and mouse button events for controlling the viewport.None+Ff[State for controlling the viewport. These are used by the viewport control component.hThe command list for the viewport controller. These can be safely overwridden at any time by deleting or adding entries to the list. Entries at the front of the list take precedence.i@How much to scale the world by for each step of the mouse wheel.jCHow many degrees to rotate the world by for each pixel of x motion.kMDuring viewport translation, where the mouse was clicked on the window.lKDuring viewport rotation, where the mouse was clicked on the windowo-The commands suported by the view controller.{\The default commands. Left click pans, wheel zooms, right click rotates, "r" key resets.ECheck if the provided key combination is some gloss viewport command.ECheck if the provided key combination is some gloss viewport command.|The initial view state.}-Initial view state, with user defined config.~Apply an event to a f.Like ~, but returns  if no update was needed. Zoom in a f by the scale step. Zoom out a f by the scale step.Offset a viewport.Apply a translation to the f.Apply a rotation to the f.!fghijklmnopqrstuvwxyz{|}~!fghijklmnopqrstuvwxyz{|}~!ozyxwvutsrqpn{fghijklm|}~fghijklmno zyxwvutsrqp{|}~None+FHMICallback to handle keyboard and mouse button events for controlling the f.None+FHMRCallback to handle keyboard and mouse button events for controlling the viewport.None+F5Convert one of our Colors to OpenGL's representation.None+FEOpen a window and use the supplied callbacks to handle window events.Color to use when clearing.Callbacks to useNone+FInitial state of the backend.Display config.Background color.The picture to draw.None+F0Open a new window and display the given picture.3Use the following commands once the window is open:Quit - esc-key.,Move Viewport - left-click drag, arrow keys.NRotate Viewport - right-click drag, control-left-click drag, or home/end-keys.2Zoom Viewport - mouse wheel, or page up/down-keys. Display mode.Background color.The picture to draw.N      !"#$%&'()*+,-./0123456 7None+F8Initial State of the backend/Whether to allow the image to be panned around. Display mode.Background color.qFunction to produce the next frame of animation. It is passed the time in seconds since the program started.9889None+F2Open a new window and display the given animation.>Once the window is open you can use the same commands as with display. Display mode.Background color.sFunction to produce the next frame of animation. It is passed the time in seconds since the program started.N      !"#$%&'()*+,-./0123456 7None+F2Open a new window and display the given animation.>Once the window is open you can use the same commands as with display.Like 1 but don't allow the display to be panned around. Display mode.Background color.sFunction to produce the next frame of animation. It is passed the time in seconds since the program started. Display mode.Background color.sFunction to produce the next frame of animation. It is passed the time in seconds since the program started.O      !"#$%&'()*+,-./0123456 7None+FHM:Initial state of the backend Display mode.Background color.@Number of simulation steps to take for each second of real time.The initial model.-A function to convert the model to a picture.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).::None+FHMRun 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.>Once the window is open you can use the same commands as with display. Display mode.Background color.@Number of simulation steps to take for each second of real time.The initial model.-A function to convert the model to a picture.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).S      !"#$%&'()*+,-./0123456 7 None+FHM Display mode.Background color.@Number of simulation steps to take for each second of real time.The initial model.-A function to convert the model to a picture.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).S      !"#$%&'()*+,-./0123456 7None+FHM;Callback for KeyMouse events.<Callback for Motion events.="Callback for Handle reshape event.> Initial state of the backend Display mode.Background color.@Number of simulation steps to take for each second of real time.The initial world.-A function to convert the world to a picture."A function to handle input events.sA function to step the world one iteration. It is passed the period of time (in seconds) needing to be advanced.(Whether to use the callback_exit or not.;ref to world statefn to handle input events?<ref to world statefn to handle input events@=Abcde>>;?<@=ANone+FMPlay a game in a window.  Display mode.Background color.@Number of simulation steps to take for each second of real time.The initial world.*A function to convert the world a picture."A function to handle input events.sA function to step the world one iteration. It is passed the period of time (in seconds) needing to be advanced.      !"#$%&'()*+,-./0123456 7  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_bcde[bedc\_^]QPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! U[ZYXWVRTS None+FQ      !"#$%&'()*+,-./0123456 7  None+FMAPlay a game in a window, using IO actions to build the pictures.  Display mode.Background color.@Number of simulation steps to take for each second of real time.The initial world.)An action to convert the world a picture."A function to handle input events.sA function to step the world one iteration. It is passed the period of time (in seconds) needing to be advanced.      !"#$%&'()*+,-./0123456 7  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_bcde[bedc\_^]QPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! U[ZYXWVRTS B ! " # $ % & &'(')'* + + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | u / }~               *      !"#$%&'()*+,-./012345464748494:4;4<4=4>4?4@4A4B4C4D4E4F4G4H4I4J4K4L4M4N4.OPQRSTUVWXYZ[\]^ gloss-1.9.1.1Graphics.Gloss.Data.ViewStateGraphics.Gloss"Graphics.Gloss.Interface.Pure.Game!Graphics.Gloss.Algorithms.RayCast%Graphics.Gloss.Interface.Pure.Display%Graphics.Gloss.Interface.Pure.Animate#Graphics.Gloss.Interface.IO.Animate&Graphics.Gloss.Interface.Pure.Simulate$Graphics.Gloss.Interface.IO.Simulate Graphics.Gloss.Interface.IO.Game1Graphics.Gloss.Internals.Interface.Simulate.State(Graphics.Gloss.Internals.Interface.Debug0Graphics.Gloss.Internals.Interface.Backend.Types+Graphics.Gloss.Internals.Interface.Callback.Graphics.Gloss.Internals.Interface.Common.Exit/Graphics.Gloss.Internals.Interface.Backend.GLUT0Graphics.Gloss.Internals.Interface.Animate.State*Graphics.Gloss.Internals.Interface.Backend(Graphics.Gloss.Internals.Interface.Event1Graphics.Gloss.Internals.Interface.Animate.Timing0Graphics.Gloss.Internals.Interface.Simulate.Idle4Graphics.Gloss.Internals.Interface.ViewState.Reshape5Graphics.Gloss.Internals.Interface.ViewState.KeyMouse3Graphics.Gloss.Internals.Interface.ViewState.MotionGraphics.Gloss.Internals.Color)Graphics.Gloss.Internals.Interface.Window*Graphics.Gloss.Internals.Interface.Display*Graphics.Gloss.Internals.Interface.Animate+Graphics.Gloss.Internals.Interface.Simulate'Graphics.Gloss.Internals.Interface.Gamegloss-rendering-1.9.1.1Graphics.Gloss.Data.ViewPortinvertViewPortapplyViewPortToPicture viewPortScaleviewPortRotateviewPortTranslateViewPortGraphics.Gloss.Data.DisplayInWindow FullScreenDisplay Modifiersshiftctrlalt SpecialKey KeyPadEnter KeyPadEqual KeyPadDecimal KeyPadAddKeyPadSubtractKeyPadMultiply KeyPadDivideKeyPad9KeyPad8KeyPad7KeyPad6KeyPad5KeyPad4KeyPad3KeyPad2KeyPad1KeyPad0KeyAltRKeyAltLKeyCtrlRKeyCtrlL KeyShiftR KeyShiftLKeyEndKeyHome KeyPageDown KeyPageUp KeyDeleteKeyBegin KeyNumLock KeyInsert KeyBackspaceKeyEnterKeyTabKeyRightKeyLeftKeyDownKeyUpKeyF25KeyF24KeyF23KeyF22KeyF21KeyF20KeyF19KeyF18KeyF17KeyF16KeyF15KeyF14KeyF13KeyF12KeyF11KeyF10KeyF9KeyF8KeyF7KeyF6KeyF5KeyF4KeyF3KeyF2KeyF1KeyEscKeySpace KeyUnknownKeyStateUpDown MouseButtonAdditionalButton WheelDownWheelUp RightButton MiddleButton LeftButtonKeyCharcastSegIntoCellularQuadTreetraceSegIntoCellularQuadTreeEvent EventResize EventMotionEventKey ViewStateviewStateCommandsviewStateScaleStepviewStateRotateFactorviewStateTranslateMarkviewStateRotateMarkviewStateViewPort CommandConfigCommandCBumpCClockwiseCBumpClockwise CBumpDownCBumpUp CBumpRight CBumpLeft CBumpZoomIn CBumpZoomOutCRotate CTranslateCRestoredefaultCommandConfig viewStateInitviewStateInitWithConfigupdateViewStateWithEventupdateViewStateWithEventMaybedisplayanimate animateIOanimateFixedIOsimulate simulateIOplayplayIOStatestateIterationstateResolution stateSimTime stateInitdumpFramebufferStatedumpFragmentStateReshapeCallback IdleCallbackMotionCallbackKeyboardMouseCallbackDisplayCallbackBackendinitBackendStateinitializeBackend exitBackend openWindowdumpBackendStateinstallDisplayCallbackinstallWindowCloseCallbackinstallReshapeCallbackinstallKeyMouseCallbackinstallMotionCallbackinstallIdleCallback runMainLoop postRedisplaygetWindowDimensions elapsedTimesleepCallbackReshapeMotionIdleKeyMouse callback_exit keyMouse_exit GLUTState glutKeyToKeyglutKeyStateToKeyStateglutModifiersToModifiers glutStateInitinitializeGLUTopenWindowGLUT dumpStateGLUTinstallDisplayCallbackGLUTcallbackDisplayinstallReshapeCallbackGLUTcallbackReshapeinstallKeyMouseCallbackGLUTcallbackKeyMouseinstallMotionCallbackGLUTcallbackMotioninstallIdleCallbackGLUT callbackIdle$fBackendGLUTState stateAnimatestateAnimateCountstateAnimateStartstateAnimateTimestateDisplayTimestateDisplayTimeClampstateGateTimeStartstateGateTimeEndstateGateTimeElapsedstateDisplayTimeLastcompareDistanceTodistancedefaultBackendState keyMouseEvent motionEvent convertPoint animateBegin animateEnd getsIORefcallback_simulate_idlebase GHC.IORefIORef simulate_rununtilMcallback_viewState_reshapeviewState_reshape isCommand isCommand2 Data.MaybeNothing controlZoomIncontrolZoomOut motionBumpmotionTranslate motionRotatecallback_viewState_keyMouseviewState_keyMousecallback_viewState_motionviewState_motionglColor4OfColor createWindowdisplayWithBackendGraphics.Gloss.Data.PicturerectangleUpperSolidrectangleSolidrectangleUpperPathrectangleUpperWire rectangleWire rectanglePath sectorWirearcSolid circleSolidlineLooploadBMP bitmapOfBMPbitmapOfByteStringbitmapOfForeignPtrpicturesscalerotate translatecolorbitmaptextthickArcarc thickCirclecirclelinepolygonblankPathBlankPolygonLineCircle ThickCircleArcThickArcTextBitmapColor TranslateRotateScalePicturesPictureGraphics.Gloss.Data.Colororange chartreuse aquamarineazurevioletrosemagentacyanyellowbluegreenredwhiteblackgreyNdarklightbrightdim addColors mixColorsrawColor rgbaOfColor makeColor8 makeColor' makeColorGraphics.Gloss.Data.VectorVectorGraphics.Gloss.Data.PointPoint&Graphics.Gloss.Internals.Render.Bitmap BitmapDataanimateWithBackendIOsimulateWithBackendIOcallback_keyMousecallback_motioncallback_reshapeplayWithBackendIOhandle_keyMouse handle_motionhandle_reshape