@<.      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ &Safe+GSimulation 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 stateNone+G-Dump internal state of the OpenGL framebuffer-Dump internal state of the fragment renderer.Safe+G 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  Safe+GConvert degrees to radiansConvert radians to degrees3Normalize an angle to be between 0 and 2*pi radiansSafe+G.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.    Safe+GIN$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[\]^_`abcdefghijklmnopqrstuv     u !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv      !"#$%&B'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv     Safe+G Safe+GINNone+G]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. !"#$%&'()*+, !"#$%&'()*+,None+G-w !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv     --None+GINwPossible input events.wxyz./0wxyz./wxyz./0None+GIN1VHandles animation timing details. Call this function at the start of each frame.2THandles animation timing details. Call this function at the end of each frame.12312123None+G4WCallback to handle keyboard and mouse button events for controlling the viewport.454545None+GNone+G6<Normalise a color to the value of its largest RGB component.{%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.A greyness of a given order.6{Ratio of first color.Ratio of second color. First color. Second color.Resulting color.|}~!Range is 0 = black, to 1 = white.{|}~{|}~6{|}~None+G75Convert one of our Colors to OpenGL's representation.777None+G8EOpen a window and use the supplied callbacks to handle window events.8Color to use when clearing.Callbacks to use88None+G$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 91. 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* * None+35GTest 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 None+3G 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.   None+G 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. None+G 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. ;<=;<= None+G[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.MDuring viewport translation, where the mouse was clicked on the window.KDuring viewport rotation, where the mouse was clicked on the window-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 .Like , but returns @ if no update was needed.A Zoom in a  by the scale step.B Zoom out a  by the scale step.COffset a viewport.DApply a translation to the .EApply a rotation to the .!>?ABCDE >?ABCDENone+GINFNCallback to handle keyboard and mouse button events for controlling the .FGFFG None+GINHWCallback to handle keyboard and mouse button events for controlling the viewport.HIHHI!None+GINJwThe graphics library calls back on this function when it's finished drawing and it's time to do some computation.Jthe simulation statethe animation stateaaction to get the . We don't use an K0 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 modeLMNJJLMN"None+GOInitial state of the backend.Display config.Background color.The picture to draw.OO None+G0Open 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.G  {|}~#None+GPInitial 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.QPPQ None+G2Open 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.G  {|}~$None+GINRInitial 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).RRNone+GINRun 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).L  {|}~%None+GINSCallback for KeyMouse events.TCallback for Motion events.U"Callback for Handle reshape event.V 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.Sref to world statefn to handle input eventsWTref to world statefn to handle input eventsXUYwxyzVVSWTXUYNone+GNPlay 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.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~[wxyzstuv&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghlmnopqrijk!"#$%None+G2Open 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.H  {|}~None+GIN 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).L  {|}~None+GNAPlay 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.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~[wxyzstuv&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghlmnopqrijk!"#$%&None+GO  {|}~ Z'()'(*'(+'(,'(-'(.'(/'(0'(1'(2'(3'(4'(5'(6'(7'(8'(9'(:'(;'(<'(='(>'?@'?A'?B'?4'CDEFGHIJKKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~O                               !"#$%&'()*+,-./012H3456789:;<9=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZXY[ E \ ]^_` a b c d efg h i!j^kl!m!R!n"o#p#R$q%r%s%t%u%v%w%xygloss_5BQsp4KjjZhAR00o19WR6WGraphics.Gloss.Data.BitmapGraphics.Gloss.Data.PictureGraphics.Gloss.Data.ColorGraphics.Gloss.Geometry.AngleGraphics.Gloss.Data.Display"Graphics.Gloss.Interface.Pure.GameGraphics.Gloss.Data.PointGraphics.Gloss.Data.VectorGraphics.Gloss.Geometry.LineGraphics.Gloss.Data.ViewPortGraphics.Gloss.Data.ViewState%Graphics.Gloss.Interface.Pure.Display%Graphics.Gloss.Interface.Pure.Animate&Graphics.Gloss.Interface.Pure.Simulate#Graphics.Gloss.Interface.IO.Animate$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.Window5Graphics.Gloss.Internals.Interface.ViewState.KeyMouse3Graphics.Gloss.Internals.Interface.ViewState.Motion0Graphics.Gloss.Internals.Interface.Simulate.Idle*Graphics.Gloss.Internals.Interface.Display*Graphics.Gloss.Internals.Interface.Animate+Graphics.Gloss.Internals.Interface.Simulate'Graphics.Gloss.Internals.Interface.GameGraphics.Glossgloss_K0GNsRLG7bB2JVM3ZweqlO%Graphics.Gloss.Internals.Data.PictureloadBMP bitmapOfBMPbitmapOfByteStringbitmapOfForeignPtrPointVectorPathPicturesScaleRotate TranslateColorBitmapTextThickArcArc ThickCircleCircleLinePolygonBlankPicture#Graphics.Gloss.Internals.Data.Color rgbaOfColor makeColorI makeColor)Graphics.Gloss.Internals.Rendering.Bitmap BitmapDatadegToRadradToDegnormalizeAngleDisplayInWindow FullScreen Modifiersshiftctrlalt SpecialKey KeyUnknownKeySpaceKeyEscKeyF1KeyF2KeyF3KeyF4KeyF5KeyF6KeyF7KeyF8KeyF9KeyF10KeyF11KeyF12KeyF13KeyF14KeyF15KeyF16KeyF17KeyF18KeyF19KeyF20KeyF21KeyF22KeyF23KeyF24KeyF25KeyUpKeyDownKeyLeftKeyRightKeyTabKeyEnter KeyBackspace KeyInsert KeyNumLockKeyBegin KeyDelete KeyPageUp KeyPageDownKeyHomeKeyEnd KeyShiftL KeyShiftRKeyCtrlLKeyCtrlRKeyAltLKeyAltRKeyPad0KeyPad1KeyPad2KeyPad3KeyPad4KeyPad5KeyPad6KeyPad7KeyPad8KeyPad9 KeyPadDivideKeyPadMultiplyKeyPadSubtract KeyPadAdd KeyPadDecimal KeyPadEqual KeyPadEnterKeyStateDownUp MouseButton LeftButton MiddleButton RightButtonWheelUp WheelDownAdditionalButtonKeyCharEventEventKey EventMotion EventResize mixColors addColorsdimbrightlightdarkgreyNblackwhiteredgreenblueyellowcyanmagentarosevioletazure aquamarine chartreuseorangeblankpolygonlinecircle thickCirclearcthickArctextbitmapcolor translaterotatescalepictureslineLoop circleSolidarcSolid sectorWire rectanglePath rectangleWirerectangleUpperWirerectangleUpperPathrectangleSolidrectangleUpperSolid pointInBoxmagVargVdotVdetVmulSVrotateVangleVV normalizeVunitVectorAtAngle segClearsBoxclosestPointOnLineclosestPointOnLineParamintersectLineLineintersectSegLineintersectSegHorzLineintersectSegVertLineintersectSegSegintersectSegHorzSegintersectSegVertSegViewPortviewPortTranslateviewPortRotate viewPortScale viewPortInitapplyViewPortToPictureinvertViewPort ViewStateviewStateCommandsviewStateScaleStepviewStateRotateFactorviewStateTranslateMarkviewStateRotateMarkviewStateViewPort CommandConfigCommandCRestore CTranslateCRotate CBumpZoomOut CBumpZoomIn CBumpLeft CBumpRightCBumpUp CBumpDownCBumpClockwiseCBumpCClockwisedefaultCommandConfig viewStateInitviewStateInitWithConfigupdateViewStateWithEventupdateViewStateWithEventMaybedisplayanimatesimulateplay animateIOanimateFixedIO simulateIOplayIOStatestateIterationstateResolution stateSimTime stateInitdumpFramebufferStatedumpFragmentState stateAnimatestateAnimateCountstateAnimateStartstateAnimateTimestateDisplayTimestateDisplayTimeClampstateGateTimeStartstateGateTimeEndstateGateTimeElapsedstateDisplayTimeLastReshapeCallback IdleCallbackMotionCallbackKeyboardMouseCallbackDisplayCallbackBackendinitBackendStateinitializeBackend exitBackend openWindowdumpBackendStateinstallDisplayCallbackinstallWindowCloseCallbackinstallReshapeCallbackinstallKeyMouseCallbackinstallMotionCallbackinstallIdleCallback runMainLoop postRedisplaygetWindowDimensions elapsedTimesleepCallbackKeyMouseIdleMotionReshape callback_exit keyMouse_exit GLUTState glutKeyToKeyglutKeyStateToKeyStateglutModifiersToModifiers glutStateInitinitializeGLUTopenWindowGLUT dumpStateGLUTinstallDisplayCallbackGLUTcallbackDisplayinstallReshapeCallbackGLUTcallbackReshapeinstallKeyMouseCallbackGLUTcallbackKeyMouseinstallMotionCallbackGLUTcallbackMotioninstallIdleCallbackGLUT callbackIdle$fBackendGLUTStatedefaultBackendState keyMouseEvent motionEvent convertPoint animateBegin animateEnd getsIORefcallback_viewState_reshapeviewState_reshapenormalizeColorglColor4OfColor createWindowghc-prim GHC.TypesFalseTrue isCommand isCommand2baseGHC.BaseNothing controlZoomIncontrolZoomOut motionBumpmotionTranslate motionRotatecallback_viewState_keyMouseviewState_keyMousecallback_viewState_motionviewState_motioncallback_simulate_idle GHC.IORefIORef simulate_rununtilMdisplayWithBackendanimateWithBackendIOsimulateWithBackendIOcallback_keyMousecallback_motioncallback_reshapeplayWithBackendIOhandle_keyMouse handle_motionhandle_reshape