5      !"#$ % & ' ( )*+,-./0123456789:;<=>?@ABCDEFGHIJKL M N O P Q R S TUVWXYZ[\]^_`ab c d e f g h i j k lmnopqrstuvwxyz { | } ~  (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)Safe(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)SafeNone(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternalportableNoneHow to draw in a window.use a  double bufferA to reduce flicker. You should probably use this for animations.Vdraw directly to the window. This runs slightly faster but is more prone to flicker.Title of a window.Vertical alignment of text.7align the top edge of the text with the reference point7align the baseline of the text with the reference point:align the bottom edge of the text with the reference point JHorizontal alignment of text. Names have a tick to distinguish them from Prelude names. 8align the left edge of the text with the reference point (center the text with the reference point 9align the right edge of the text with the reference point How strings drawn with ; are positioned relative to the specified reference point.!Background mode for drawing text.LDraw text on a bounding rectangle filled with the current background color.)Draw text without a background rectangle.!The style of line drawn by a pen.3A color, comprising red, green and blue components.Time, measured in milliseconds.An angle in degrees (0 to 360).0A (width, height) pair, both measured in pixels._A position within a window, measured in pixels to the right and down from the top left corner.-A distance on the screen, measured in pixels.0Time in milliseconds since some arbitrary epoch.      (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)None! !"# !"# !"#(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)None$,Monad for sequential construction of images.%'An abstract representation of an image.& Embed an  action in a drawing action.'AWrap a drawing action in initialization and finalization actions.( A variant of 'Q in which the inner drawing action does not use the result of the pre-operation. $%&'Da pre-operation, whose value is passed to the other two components._a post-operation, to be performed on exit from the bracket, whether normal or by an exception.&the drawing action inside the bracket.(Da pre-operation, whose value is passed to the other two components._a post-operation, to be performed on exit from the bracket, whether normal or by an exception.&the drawing action inside the bracket.$%&'( $%&'((c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)None(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)None  (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)None$%&'(%$&'((c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableNone)(Converts a character key to a character.)*+,-./0123456789:;<=>#)*+,-./0123456789:;<=>#)*+,-./0123456789:;<=>)*+,-./0123456789:;<=>(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)None ?A user interface event.Notes:#Programmers should assume that the ? datatype will be extended in the not-too-distant future and that individual events may change slightly. As a minimum, you should add a "match anything" alternative to any function which pattern matches against ?s.X11 systems typically have three button mice. Button 1 is used as the left button, button 3 as the right button and button 2 (the middle button) is ignored.@9a properly translated character, sent after a key press.A.the character represented by a key combinationB*occurs when a key was pressed or released.C+representation of the keyboard keys pressedDif 1, the key was pressed; otherwise it was releasedE2occurs when a mouse button is pressed or released.F the position of the mouse cursorGif , it was the left buttonH1occurs when the mouse is moved inside the window.I"occurs when the window is resized.J!occurs when the window is closed. ?@ABCDEFGHIJ ?@ABCDEFGHIJ? @BEHIJACDFGDF(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)None                (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orginternal#non-portable (requires concurrency)None $K !"#$%&'()*+,-./01 K"$%&+,-1K !"#$%&'()*+,-./01 (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)NoneLInitialize the system to do graphics, run an action while collecting user interface events and forwarding them to the action, and then clean up everything else at the end. The other functions of the library may only be used inside L.LLLL(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableNone (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)NoneMA filled arc from an ellipse.N>A filled ellipse that fits inside a rectangle defined by two s on the window.OLA filled sheared ellipse that fits inside a parallelogram defined by three Us on the window. This function is implemented using polygons on both Win32 and X11.PA line between two s.Q$A series of lines through a list of s.R&A filled polygon defined by a list of s.S;A series of (unfilled) Bezier curves defined by a list of 3n +1 control Ms. This function is not supported on X11 (it yields an error message and a Q). M/a corner of the rectangle bounding the ellipse.:the opposite corner of the rectangle bounding the ellipse.Lthe start angle of the arc, measured counter-clockwise from the horizontal.Hthe extent of the arc, measured counter-clockwise from the start angle.a filled shapeN/a corner of the rectangle bounding the ellipse.:the opposite corner of the rectangle bounding the ellipse.a filled shape2O'a corner of the bounding parallelogram.;another corner of the parallelogram, adjacent to the first.\another corner of the parallelogram, adjacent to the first and thus opposite to the second.a filled shape34PQRS56MNOPQRSMNOPQRS MN2O34PQRS56(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)NoneT Render a 7& positioned relative to the specified .UU s returns: bThe offset at which the string would be drawn according to the current text alignment (e.g., ( , )/ will result in an offset of (-width/2,0))AThe size at which the text would be drawn using the current font.VHSet the foreground color for drawing text, returning the previous value.W{Set the background color for drawing text, returning the previous value. The background color is ignored when the mode is .XGSet the background mode for drawing text, returning the previous value.YASet the alignment for drawing text, returning the previous value.TUVWXY TUVWXYTUVWX YTUVWXY(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)NoneZ Create a !.[ Destroy a ! created with Z.\Set the !8 for subsequent drawing, returning the previous setting.] Create a ! locally to a drawing.Z[\]!Z[\]!Z[\]Z[\](c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)None^ Create a  ._ Destroy a   created with ^.`Set the  8 for subsequent drawing, returning the previous setting.a Create a   locally to a drawing.^_`a  ^_`a ^_`a^_`a (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)None ckAn empty region. This is not supported on Win32. It is possible to use an empty rectangle region instead.d@A rectangular region, with the given points as opposite corners.e[An elliptical region that fits in the rectangle with the given points as opposite corners.f(A polygonal region defined by a list of s.g The intersection of two regions.hThe union of two regions.i<The part of the first region that is not also in the second.j(The symmetric difference of two regions.kFill a b using the current .8b9:cde;<fghij=k bcdefghijk bcdefghijk8b9:cde;<fghij=k(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)NonelGenerate a font for use in a drawing, and delete it afterwards. The rotation angle is ignored if the font is not a "TrueType" font (e.g., a System font on Win32).m]Create a font. The rotation angle is ignored if the font is not a "TrueType" font (e.g., a System font on Win32).nDelete a font created with m.o?Set the font for subsequent text, and return the previous font.l"size of character glyphs in pixelsrotation angle bold font? italic font? font familym"size of character glyphs in pixelsrotation angle bold font? italic font? font familyno"lmno"mnollmno(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)NoneA  !"$%&'(MNOPQRSTUVWXYZ[\]^_`abcdefghijklmno(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)None p,Wait for the next event on the given window.q.Check for a pending event on the given window.r@Wait for the next tick event from the timer on the given window.s$Get the current drawing in a window.t$Set the current drawing in a window.uIUpdate the drawing for a window. Note that this does not force a redraw.vGeneral window creation.wClose the window.x]The position of the top left corner of the window on the screen, and the size of the window. pqrstuvtitle of the window)the optional initial position of a windowinitial size of the window&how to display a graphic on the windowYthe time between ticks (in milliseconds) of an optional timer associated with the windowwx>y?@ABCDEFGHIJKpqrstuvwxyKvxwtsuy?@BEHIJACDFGDFpqr pqrstuvwx>y(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)Noney  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy (c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)Nonez Named colors..Create a window with the given title and size.4Erase all drawing in the window. (That is, set the % held by the window to .)The current size of the window.nDraw the given graphic on the window, on top of anything that is already there. (That is, combine the given %' and the one held by the window using 2, store the result in the window, and display it.)RRun an action inside a new window, ensuring that the window is destroyed on exit. A variant of ' that ignores the result of the action.A combination of L and .XWait for a press of the left mouse button, and return the position of the mouse cursor.YWait for a press of the right mouse button, and return the position of the mouse cursor.)Wait until a key is pressed and released.7Wait until a key is pressed (if the second argument is ) or released (otherwise).`Wait for a mouse button to be pressed or released, and return the position of the mouse cursor.JWait for a translated character (from a key press). Use in preference to  if the aim is to read text.An empty drawing.HA composite drawing made by overlaying the first argument on the second.Overlay a list of drawings.#Set the default font for a drawing./Set the default alignment of text in a drawing.'Set the default color for drawing text.HSet the default background color for drawing text with background mode 5. The background color is ignored when the mode is .1Set the default background mode for drawing text.&Set the default pen for drawing lines.)Set the default brush for filling shapes.SA convenience function that sets the brush, pen and text colors to the same value. A mapping of z names to  triples. A mapping of z names to  triples.$Set the default drawing color for a %.Run two ? actions in parallel and terminate when both actions terminate.Run two g actions in parallel and terminate when both actions terminate, discarding the results of the actions. Run several f actions in parallel and terminate when all actions terminate, discarding the results of the actions.'z{|}~if , wait for the left buttonif 2, wait for a press; otherwise wait for a release.'z{|}~'z{|}~z{|}~(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional#non-portable (requires concurrency)None  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Alastair Reid, 1999-2003/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable#non-portable (requires concurrency)NoneUser interface events*occurs when a key was pressed or released."character corresponding to the keyif 1, the key was pressed; otherwise it was released2occurs when a mouse button is pressed or released. the position of the mouse cursorif , it was the left button1occurs when the mouse is moved inside the window.Qoccurs when the window is resized. The new window size can be discovered using .!occurs when the window is closed.an extended version of .@A rectangular region, with the given points as opposite corners.[An elliptical region that fits in the rectangle with the given points as opposite corners.(A polygonal region defined by a list of s.The union of two regions. The intersection of two regions.<The part of the first region that is not also in the second.Draw a b in the current color.3Draw directly to the window (slightly faster than , but more prone to flicker).Use a  double buffer< to reduce flicker and thus improve the look of animations.Another name for ', retained for backwards compatibility.*The current time of day (in milliseconds).An obsolete special case of ?.RWait until a key is pressed and released, and return the corresponding character.@7Wait until a key is pressed (if the second argument is Q) or released (otherwise), and return the corresponding character. (not in SOE)&Wait for the next event in the window.,Return a pending eventin the window, if any.the title of the window"the initial position of the windowthe initial size of the window&how to display a graphic on the windowcoptionally attach a timer to the window, with the specified time (in milliseconds) between ticks.A@BC%KLMNOPQRSTbjrtwz{|}~ELKtw%z{|}~TNOPRQSMbjr A@BC !"#$%&'()*+,-./01234567899:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_A`abcdefgh i j k l m n o pqrstuvwxyz{|} ~            ]A_abcdefgEF?@       !"#$%&'()*+,-./012 3 4 5 6 789 : ; < 4 5 =.>?@ABHGL_3UAsXr8r2jMLdByMRcpAEx Graphics.SOEGraphics.HGL.WindowGraphics.HGL.Draw.TextGraphics.HGL.Draw.PenGraphics.HGL.UnitsGraphics.HGL.Draw.BrushGraphics.HGL.Draw.FontGraphics.HGL.KeyGraphics.HGL.Draw.MonadGraphics.HGL.RunGraphics.HGL.Draw.PictureGraphics.HGL.Draw.RegionGraphics.HGL.UtilsGraphics.HGL.Internals.Flag Graphics.HGL.Internals.UtilitiesGraphics.HGL.X11.DisplayGraphics.HGL.Internals.TypestextGraphics.HGL.X11.TypesGraphics.HGL.Internals.DrawGraphics.HGL.X11.DCGraphics.HGL.X11.TimerGraphics.HGL.Internals.EventGraphics.HGL.Internals.EventsGraphics.HGL.X11.WindowGraphics.HGL.DrawBrushGraphics.HGL.Core Graphics.HGLbaseGHC.WordWord32 RedrawModeDoubleBuffered UnbufferedTitleVAlignTopBaselineBottomHAlignLeft'CenterRight' AlignmentBkModeOpaque TransparentStyleSolidDashDotDashDot DashDotDotNull InsideFrameRGBTimeAngleSizePointgetTimePenFontKeyDrawGraphicioToDrawbracketbracket_ keyToChar isCharKeyisBackSpaceKeyisTabKey isClearKey isReturnKey isEscapeKey isDeleteKey isHomeKey isLeftKeyisUpKey isRightKey isDownKey isPriorKey isPageUpKey isNextKey isPageDownKeyisEndKey isShiftLKey isShiftRKey isControlLKey isControlRKeyEventCharcharkeysymisDownButtonptisLeft MouseMoveResizeClosedWindow runGraphicsarcellipse shearEllipselinepolylinepolygon polyBeziertextInfo setTextColor setBkColor setBkModesetTextAlignment createBrush deleteBrush selectBrushmkBrush createPen deletePen selectPenmkPenRegion emptyRegionrectangleRegion ellipseRegion polygonRegionintersectRegion unionRegionsubtractRegion xorRegionregionToGraphicmkFont createFont deleteFont selectFontgetWindowEventmaybeGetWindowEvent getWindowTick getGraphic setGraphic modGraphic openWindowEx closeWindow getWindowRect directDrawColorBlackBlueGreenCyanRedMagentaYellowWhite openWindow clearWindow getWindowSize drawInWindow withWindow withWindow_ runWindowgetLBPgetRBPgetKeygetKeyEx getButtonwGetChar emptyGraphic overGraphic overGraphicswithFontwithTextAlignment withTextColor withBkColor withBkModewithPen withBrushwithRGB colorList colorTable withColorparpar_parManycreateRectangle createEllipse createPolygonorRegion andRegion diffRegion drawRegion drawGraphicdrawBufferedGraphicdrawInWindowNow timeGetTime word32ToIntFlagnewFlagsetFlag resetFlag ExceptionsafeTrymodMVarmodMVar_getDisplayName displayRef openDisplay closeDisplay getDisplay DimensionMkKeyDC_Bits textColorbkColorbkMode textAlignmentbrushpenfontDCMkDCdispdrawabletextGCpaintGCbrushGCref_rectref_bits fromPointtoPointfromSizetoSize defaultPen lookupColor xcolor_flagsghc-prim GHC.TypesIOMkDrawunDrawmkDraw $fFunctorDraw $fMonadDraw$fApplicativeDrawdrawUnbuffered drawBufferederaseTimersTimerperiodactiontag newTimers clearTimers fireTimersnextTicknewstop insertTimer deleteTimer firedTimers $fEqTimer keySymToCharTrueEventseventstick newEventsgetEvent isNoEvent sendEventsendTickgetTick RedrawStuffUnbufferedStuff BufferedStuffMkWindowwndref_dcexposedgraphicredrawtimerthreaded closeWindow' removeBufferremoveDeadWindowscloseAllWindows sendTickswndstimers runGraphicsEx catchErrors main_eloop minor_eloopdrawOnDC newWindow redrawWindow findWindowsend dispatchEvent showEvent threeSixty cos'n'sinsangles minAndDeltaavgGHC.BaseString XRegionOpMkRegion emptyXRegioncombineGHC.Real fromIntegralintegerToWord32 toSOEEvent