o\`      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ (Safe0MSimulation 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 stateNone0M-Dump internal state of the OpenGL framebuffer -Dump internal state of the fragment renderer.   Safe0M  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              Safe0M%Convert degrees to radians&Convert radians to degrees'3Normalize an angle to be between 0 and 2*pi radians%&'%&'%&'%&'Safe0M(.Describes how Gloss should display its output.);Display in a window with the given name, size and position.*:Display full screen with a drawing area of the given size.()*()*()*()*Safe0MOT$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.-Check if this is an . callback.s./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/01.23 !"#$%&'()*+,-v()*./0123789:;<=>?@ABRPSQ[\]^WXYZ_`abcd456CDEFGHIJKLMNOTUVefghijklmnopqrstuvwxyz{|}~/0.123)+ !"#$%&'(*,- ./0123B456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/01.23 !"#$%&'()*+,-Safe0M /0.123Safe0MOT45445None0M6'State information for the GLUT backend.7Initial GLUT state.80Oneshot timer callback that re-registers itself.9Call back when glut is idle.:-Convert GLUTs key codes to our internal ones.;.Convert GLUTs key states to our internal ones.<.Convert GLUTs key states to our internal ones.6=>?@7ABCDE8FGHIJKL9:;<M66=>?@7ABCDE8FGHIJKL9:;<MNone0MNx()*./0123789:;<=>?@ABRPSQ[\]^WXYZ_`abcd456CDEFGHIJKLMNOTUVefghijklmnopqrstuvwxyz{|}~/0.123)+ !"#$%&'(*,-6NNNone0MOTPossible input events.OPQOPOPQNone0MOTRVHandles animation timing details. Call this function at the start of each frame.STHandles animation timing details. Call this function at the end of each frame.RSTRSRSTNone0MUWCallback to handle keyboard and mouse button events for controlling the viewport.UVUVUVNone0M! $#"! $#"None0M %Mix two colors with the given ratios.Add RGB components of a color component-wise, then normalise them to the highest resulting one. The alpha components are averaged.8Make a dimmer version of a color, scaling towards black.:Make a brighter version of a color, scaling towards white.Lighten a color, adding white.Darken a color, adding black.Set the red value of a .Set the green value of a .Set the blue value of a .Set the alpha value of a .A greyness of a given order.!Range is 0 = black, to 1 = white.W<Normalise a color to the value of its largest RGB component.Proportion of first color.Proportion of second color. First color. Second color.Resulting color.WWNone0MX5Convert one of our Colors to OpenGL's representation.XXX None0MYEOpen a window and use the supplied callbacks to handle window events.YColor to use when clearing.Callbacks to use.EGive the backend back to the caller before entering the main loop.YYNone0M$A blank picture, with nothing in it.+A convex polygon filled with a solid color.A line along an arbitrary path.A circle with the given radius.bA circle with the given thickness and radius. If the thickness is 0 then this is equivalent to ._A circular arc drawn counter-clockwise between two angles (in degrees) at the given radius.A circular arc drawn counter-clockwise between two angles (in degrees), with the given radius and thickness. If the thickness is 0 then this is equivalent to .%Some text to draw with a vector font.YA bitmap image with a width, height and a Vector holding the 32-bit RGBA bitmap data.The boolean flag controls whether Gloss should cache the data between frames for speed. If you are programatically generating the image for each frame then use Z1. If you have loaded it from a file then use [. A picture drawn with this color.6A picture translated by the given x and y coordinates.<A picture rotated clockwise by the given angle (in degrees)..A picture scaled by the given x and y factors.'A picture consisting of several others.A closed loop along a path.%A solid circle with the given radius.LA solid arc, drawn counter-clockwise between two angles at the given radius.A wireframe sector of a circle. An arc is draw counter-clockwise from the first to the second angle at the given radius. Lines are drawn from the origin to the ends of the arc.9A path representing a rectangle centered about the origin0A wireframe rectangle centered about the origin.9A wireframe rectangle in the y > 0 half of the x-y plane.CA path representing a rectangle in the y > 0 half of the x-y plane.,A solid rectangle centered about the origin.5A solid rectangle in the y > 0 half of the x-y plane.width of rectangleheight of rectangle*   * None0M The  represents the global transformation applied to the displayed picture. When the user pans, zooms, or rotates the display then this changes the .Global translation.Global rotation (in degrees).-Global scaling (of both x and y coordinates)."The initial state of the viewport.:Translates, rotates, and scales an image according to the .5Takes a point using screen coordinates, and uses the A to convert it to Picture coordinates. This is the inverse of  for points.\Convert degrees to radians]Multiply a vector by a scalar.^IRotate a vector by an angle (in radians). +ve angle is counter-clockwise. \]^\]^None0M&Functions to asynchronously control a Gloss display.0Indicate that we want the picture to be redrawn.GModify the current viewport, also indicating that it should be redrawn.!None0MOT_wThe 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 world<how much time to advance world by in single step modeabc__abc None09;MTest whether a point lies within a rectangular box that is oriented on the x-y plane. The points P1-P2 are opposing points of the box, but need not be in a particular order. S P2 +-------+ | | | + P0 | | | +-------+ P1  None09M The magnitude of a vector.5The angle of this vector, relative to the +ve x-axis.The dot product of two vectors.The determinant of two vectors.Multiply a vector by a scalar.IRotate a vector by an angle (in radians). +ve angle is counter-clockwise.9Compute the inner angle (in radians) between two vectors./Normalise a vector, so it has a magnitude of 1.jProduce a unit vector at a given angle relative to the +ve x-axis. The provided angle is in radians.   None0M[State for controlling the viewport. These are used by the viewport control component.The 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.@How much to scale the world by for each step of the mouse wheel.CHow many degrees to rotate the world by for each pixel of x motion.7Ratio to scale the world by for each pixel of y motion.dDuring viewport translation, where the mouse was clicked on the window to start the translate.aDuring viewport rotation, where the mouse was clicked on the window to starte the rotate.ZDuring viewport scale, where the mouse was clicked on the window to start the scale.The current viewport.-The commands suported by the view controller.\The default commands. Left click pans, wheel zooms, right click rotates, "r" key resets.dECheck if the provided key combination is some gloss viewport command.eECheck 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 .Like , but returns f if no update was needed.g Zoom in a  by the scale step.h Zoom out a  by the scale step.iOffset a viewport.jApply a translation to the .kApply a rotation to the .lApply a scale to the .%deghijkl deghijkl"None0MOTmNCallback to handle keyboard and mouse button events for controlling the .mnmmn#None0MOToWCallback to handle keyboard and mouse button events for controlling the viewport.opoop None0M LCheck if line segment (P1-P2) clears a box (P3-P4) by being well outside it.(Given an infinite line which intersects P1 and P19, return the point on that line that is closest to P3oGiven an infinite line which intersects P1 and P2, let P4 be the point on the line that is closest to P3.FReturn an indication of where on the line P4 is relative to P1 and P2. a if P4 == P1 then 0 if P4 == P2 then 1 if P4 is halfway between P1 and P2 then 0.5 M | P1 | P4 +---- P3 | P2 | Given four points specifying two lines, get the point where the two lines cross, if any. Note that the lines extend off to infinity, so the intersection point might not line between either of the two pairs of points. N \ / P1 P4 \ / + / \ P3 P2 / \ Get the point where a segment P1-P2 crosses an infinite line P3-P4 , if any.@Get the point where a segment crosses a horizontal line, if any. a + P1 / -------+--------- / y0 P2 + >Get the point where a segment crosses a vertical line, if any. u | | + P1 | / + / | P2 + | | x0 Get the point where a segment P1-P2 crosses another segement P3-P4 , if any.>Check if an arbitrary segment intersects a horizontal segment. a + P2 / (xa, y3) +---+----+ (xb, y3) / P1 + <Check if an arbitrary segment intersects a vertical segment.  (x3, yb) + | + P1 | / + / | P2 + | + (x3, ya) P1 First point of segment. P2 Second point of segment.P3 Lower left point of box.P4 Upper right point of box.P1P2P3/the point on the line P1-P2 that is closest to P3P1P2P3P1P2P3P4P1P2P3P4P1 First point of segment.P2 Second point of segment.y value of line.P1 First point of segment.P2 Second point of segment.x value of line.P1P2P3P4P1 First point of segment.P2 Second point of segment.#(y3) y value of horizontal segment.,(xa) Leftmost x value of horizontal segment.-(xb) Rightmost x value of horizontal segment.$(x3, y3) Intersection point, if any.P1 First point of segment.P2 Second point of segment. (x3) x value of vertical segment((ya) Lowest y value of vertical segment.)(yb) Highest y value of vertical segment.$(x3, y3) Intersection point, if any. $None0MqInitial state of the backend.Display config.Background color.Make the picture to draw.Eat the controllerqq None0M0Open a new window and display the given picture. Display mode.Background color.The picture to draw.K   ()*%None0MrInitial 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.Eat the controller.srrsNone0M2Open 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.K   ()*&None0MOTtInitial 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).ttNone0MOTRun 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).P   ()*'None0MOTuCallback for KeyMouse events.vCallback for Motion events.w"Callback for Handle reshape event.x 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.uref to world statefn to handle input eventsyvref to world statefn to handle input eventszw{xxuyvzw{None0MTPlay a game in a window. Like simulate', but you manage your own input events. 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.   ()*./0123789:;<=>?@ABRPSQ[\]^WXYZ_`abcd456CDEFGHIJKLMNOTUVefghijklmnopqrstuvwxyz{|}~[3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuyz{|}~vwx./012None0M2Open 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.(Callback to take the display controller. Display mode.Background color.sFunction to produce the next frame of animation. It is passed the time in seconds since the program started.(Callback to take the display controller.P   ()*None0M>Open a new window and display an infrequently updated picture.>Once the window is open you can use the same commands as with display.]This wrapper is intended for mostly static pictures that do not need to be updated more than once per second. For example, the picture could show network activity over the last minute, a daily stock price, or a weather forecast. If you want to show a real-time animation where the frames are redrawn more frequently then use the animate wrapper instead.The provided picture generating action will be invoked, and the display redrawn in two situation: 1) We receive a display event, like someone clicks on the window. 2) When ^ has been set, some indeterminate time between the last redraw, and one second from that.Note that calling  indicates that the picture should be redrawn, but does not cause this to happen immediately, due to limitations in the GLUT and GLFW window managers. The display runs on a one second timer interrupt, and if there have been no display events we need to wait for the next timer interrupt before redrawing. Having the timer interrupt period at 1 second keeps the CPU usage due to the context switches at under 1%.^Also note that the picture generating action is called for every display event, so if the user pans the display then it will be invoked at 10hz or more during the pan. If you are generating the picture by reading some on-disk files then you should track when the files were last updated and cache the picture between updates. Caching the picture avoids repeatedly reading and re-parsing your files during a pan. Consider storing your current picture in an IORef, passing an action that just reads this IORef, and forking a new thread that watches your files for updates. Display mode.Background color.&Action to produce the current picture.(Callback to take the display controller.O   ()*None0MOT 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).P   ()*None0MTAPlay 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.   ()*./0123789:;<=>?@ABRPSQ[\]^WXYZ_`abcd456CDEFGHIJKLMNOTUVefghijklmnopqrstuvwxyz{|}~[3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuyz{|}~vwx./012(None0M]   ! $#"()*()*|)*+)*,)*-)*.)*/)*0)*1)*2)*3)*4)*5)*6)*7)*8)*9)*:)*;)*<)*=)*>)*?)*@)AB)AC)AD)A6)EF)EG)EH)EI)EI)EJ)EK)EL)EM)EN)EOPQRSTUVWXYYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]                                    !"#$%&'()*+',-'./0123456'7+89:;<=>?@ABCDEFGHIJKLMNOPSQRSTUVWXYZ[\V]^_`abcdefghijklmnopqrstuvw xyz{yz|P!}~!!s!  ~      ""##$%%s&'''''''%gloss-1.10.2.2-6XHBYvZ1Pak1yfpjl3CJ3cGraphics.Gloss.Data.BitmapGraphics.Gloss.Data.PictureGraphics.Gloss.Data.ColorGraphics.Gloss.Geometry.AngleGraphics.Gloss.Data.Display"Graphics.Gloss.Interface.Pure.GameGraphics.Gloss.Data.ViewPortGraphics.Gloss.Data.ControllerGraphics.Gloss.Data.PointGraphics.Gloss.Data.VectorGraphics.Gloss.Data.ViewStateGraphics.Gloss.Geometry.Line%Graphics.Gloss.Interface.Pure.Display%Graphics.Gloss.Interface.Pure.Animate&Graphics.Gloss.Interface.Pure.Simulate#Graphics.Gloss.Interface.IO.Animate#Graphics.Gloss.Interface.IO.Display$Graphics.Gloss.Interface.IO.Simulate Graphics.Gloss.Interface.IO.Game1Graphics.Gloss.Internals.Interface.Simulate.State(Graphics.Gloss.Internals.Interface.Debug0Graphics.Gloss.Internals.Interface.Animate.State0Graphics.Gloss.Internals.Interface.Backend.Types+Graphics.Gloss.Internals.Interface.Callback.Graphics.Gloss.Internals.Interface.Common.Exit/Graphics.Gloss.Internals.Interface.Backend.GLUT*Graphics.Gloss.Internals.Interface.Backend(Graphics.Gloss.Internals.Interface.Event1Graphics.Gloss.Internals.Interface.Animate.Timing4Graphics.Gloss.Internals.Interface.ViewState.ReshapeGraphics.Gloss.Internals.Color)Graphics.Gloss.Internals.Interface.Window0Graphics.Gloss.Internals.Interface.Simulate.Idle5Graphics.Gloss.Internals.Interface.ViewState.KeyMouse3Graphics.Gloss.Internals.Interface.ViewState.Motion*Graphics.Gloss.Internals.Interface.Display*Graphics.Gloss.Internals.Interface.Animate+Graphics.Gloss.Internals.Interface.Simulate'Graphics.Gloss.Internals.Interface.GameGraphics.Gloss/gloss-rendering-1.10.2.1-FV6UAqe94hE6Hon7WZ0zuD%Graphics.Gloss.Internals.Data.PictureloadBMP bitmapOfBMPbitmapOfByteStringbitmapOfForeignPtrPointVectorPathPicturesScaleRotate TranslateColorBitmapTextThickArcArc ThickCircleCircleLinePolygonBlankPicture#Graphics.Gloss.Internals.Data.Color rgbaOfColor makeColorI makeColor)Graphics.Gloss.Internals.Rendering.Bitmap BitmapData pixelFormatrowOrder BitmapFormat BottomToTop TopToBottomRowOrderPxABGRPxRGBA PixelFormatdegToRadradToDegnormalizeAngleDisplayInWindow FullScreen $fEqDisplay $fReadDisplay $fShowDisplay Modifiersshiftctrlalt SpecialKey KeyUnknownKeySpaceKeyEscKeyF1KeyF2KeyF3KeyF4KeyF5KeyF6KeyF7KeyF8KeyF9KeyF10KeyF11KeyF12KeyF13KeyF14KeyF15KeyF16KeyF17KeyF18KeyF19KeyF20KeyF21KeyF22KeyF23KeyF24KeyF25KeyUpKeyDownKeyLeftKeyRightKeyTabKeyEnter KeyBackspace KeyInsert KeyNumLockKeyBegin KeyDelete KeyPageUp KeyPageDownKeyHomeKeyEnd KeyShiftL KeyShiftRKeyCtrlLKeyCtrlRKeyAltLKeyAltRKeyPad0KeyPad1KeyPad2KeyPad3KeyPad4KeyPad5KeyPad6KeyPad7KeyPad8KeyPad9 KeyPadDivideKeyPadMultiplyKeyPadSubtract KeyPadAdd KeyPadDecimal KeyPadEqual KeyPadEnterKeyStateDownUp MouseButton LeftButton MiddleButton RightButtonWheelUp WheelDownAdditionalButtonKeyCharEventEventKey EventMotion EventResize mixColors addColorsdimbrightlightdarkwithRed withGreenwithBlue withAlphagreyNblackwhiteredgreenblueyellowcyanmagentarosevioletazure aquamarine chartreuseorangeblankpolygonlinecircle thickCirclearcthickArctextbitmapcolor translaterotatescalepictureslineLoop circleSolidarcSolid sectorWire rectanglePath rectangleWirerectangleUpperWirerectangleUpperPathrectangleSolidrectangleUpperSolidViewPortviewPortTranslateviewPortRotate viewPortScale viewPortInitapplyViewPortToPictureinvertViewPort ControllercontrollerSetRedrawcontrollerModifyViewPort pointInBoxmagVargVdotVdetVmulSVrotateVangleVV normalizeVunitVectorAtAngle ViewStateviewStateCommandsviewStateScaleStepviewStateRotateFactorviewStateScaleFactorviewStateTranslateMarkviewStateRotateMarkviewStateScaleMarkviewStateViewPort CommandConfigCommandCRestore CTranslateCRotateCScale CBumpZoomOut CBumpZoomIn CBumpLeft CBumpRightCBumpUp CBumpDownCBumpClockwiseCBumpCClockwisedefaultCommandConfig viewStateInitviewStateInitWithConfigupdateViewStateWithEventupdateViewStateWithEventMaybe $fShowCommand $fEqCommand $fOrdCommand segClearsBoxclosestPointOnLineclosestPointOnLineParamintersectLineLineintersectSegLineintersectSegHorzLineintersectSegVertLineintersectSegSegintersectSegHorzSegintersectSegVertSegdisplayanimatesimulateplay animateIOanimateFixedIO displayIO simulateIOplayIOStatestateIterationstateResolution stateSimTime stateInitdumpFramebufferStatedumpFragmentState stateAnimatestateAnimateCountstateAnimateStartstateAnimateTimestateDisplayTimestateDisplayTimeClampstateGateTimeStartstateGateTimeEndstateGateTimeElapsedstateDisplayTimeLastReshapeCallback IdleCallbackMotionCallbackKeyboardMouseCallbackDisplayCallbackBackendinitBackendStateinitializeBackend exitBackend openWindowdumpBackendStateinstallDisplayCallbackinstallWindowCloseCallbackinstallReshapeCallbackinstallKeyMouseCallbackinstallMotionCallbackinstallIdleCallback runMainLoop postRedisplaygetWindowDimensions elapsedTimesleepisIdleCallbackIdleCallbackKeyMouseMotionReshape callback_exit keyMouse_exit GLUTState glutStateInit timerCallback callbackIdle glutKeyToKeyglutKeyStateToKeyStateglutModifiersToModifiersglutStateFrameCountglutStateHasTimeoutglutStateHasIdleinitializeGLUTopenWindowGLUT dumpStateGLUTinstallDisplayCallbackGLUTcallbackDisplayinstallReshapeCallbackGLUTcallbackReshapeinstallKeyMouseCallbackGLUTcallbackKeyMouseinstallMotionCallbackGLUTcallbackMotioninstallIdleCallbackGLUT$fBackendGLUTStatedefaultBackendState keyMouseEvent motionEvent convertPoint animateBegin animateEnd getsIORefcallback_viewState_reshapeviewState_reshapenormalizeColorglColor4OfColor createWindowghc-prim GHC.TypesFalseTruecallback_simulate_idlebase GHC.IORefIORef simulate_rununtilM isCommand isCommand2GHC.BaseNothing controlZoomIncontrolZoomOut motionBumpmotionTranslate motionRotate motionScalecallback_viewState_keyMouseviewState_keyMousecallback_viewState_motionviewState_motiondisplayWithBackendanimateWithBackendIOsimulateWithBackendIOcallback_keyMousecallback_motioncallback_reshapeplayWithBackendIOhandle_keyMouse handle_motionhandle_reshape