2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-. / 0 1 None'The current dimensions of the window. "The current width of the window. #The current height of the window. None2A data structure describing a button on a mouse. $The current position of the mouse. (The current x-coordinate of the mouse. (The current y-coordinate of the mouse. -The current state of a certain mouse button. 1 True if the mouse is down, false otherwise.  2    2None ;A data structure describing a physical key on a keyboard. 3 The SDL bindings for Haskell don'3t wrap this, so we have to use the FFI ourselves. 4EA utility function for getting a list of SDL keys currently pressed.  Based on  Khttp://coderepos.org/share/browser/lang/haskell/nario/Main.hs?rev=22646#L49. &Whether either shift key is pressed. (Whether either control key is pressed. Whether a key is pressed. 3Whether the enter (a.k.a. return) key is pressed. #Whether the space key is pressed. 2A list of keys that are currently being pressed. NA directional tuple combined from the arrow keys. When none of the arrow keys - are being pressed this signal samples to (0, 0), otherwise it samples to a R direction based on which keys are pressed. For example, pressing the left key  results in (-1, 0), the down key (0, 1), up and right (1, -1), etc. 5JA utility function for setting up a vector signal from directional keys. Similar to the ? signal, but uses the popular WASD movement controls instead.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!  ~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!  3456NoneA type describing a joystick. $The amount of joysticks available. The name of a joystick. !The joystick at a certain slot. The index of a joystick. .The amount of axes available for a joystick. /The amount of balls available for a joystick. .The amount of hats available for a joystick. 1The amount of buttons available for a joystick. 0The current state of the axis of the joystick. 7The current state of the hat of the joystick, returned / as a directional tuple. For example, up is (0, -1),  left (-1, 0), bottom-right is (1, 1), etc. 7WA utility function for mapping a list of hat states to an averaged directional tuple. 8BA utility function for accumulating the total directional tuple. 2The current state of the button of the joystick. 0The current state of the ball of the joystick. 9XA utility function for mapping the optional value to a null tuple or the actual tuple. 789 789None *A data structure describing an automaton. K An automaton is essentially a high-level way to package piped behavior F between an input signal and an output signal. Automatons can also B be composed, allowing you to connect one automaton to another H and pipe data between them. Automatons are an easy and powerful way D to create composable dynamic behavior, like animation systems. LCreates a pure automaton that has no accumulated state. It applies input to  a function at each step. KCreates an automaton that has an initial and accumulated state. It applies : input and the last state to a function at each step. ASteps an automaton forward, returning the next automaton to step ( and output of the step in a tuple. 3Combines a list of automatons that take some input . and turns it into an automaton that takes 5 the same input and outputs a list of all outputs # from each separate automaton. .Pipes two automatons together. It essentially ; returns an automaton that takes the input of the first > automaton and outputs the output of the second automaton, 9 with the directly connected values being discarded. .Pipes two automatons in the opposite order of . IA useful automaton that outputs the amount of times it has been stepped, ! discarding its input value. JRuns an automaton with an initial output value and input signal generator N and creates an output signal generator that contains a signal that can be # sampled for the output value.  Safe-InferredJA data structure describing a gradient. There are two types of gradients: R radial and linear. Radial gradients are based on a set of colors transitioned O over certain radii in an arc pattern. Linear gradients are a set of colors & transitioned in a straight line. LA data structure describing a color. It is represented interally as an RGBA % color, but the utility functions , , etc. can be used to convert 3 from other popular formats to this structure. Creates an RGB color. *Creates an RGB color, with transparency. A bright red color. A bright green color. A bright blue color. 4A yellow color, made from combining red and green. 4A cyan color, combined from bright green and blue. 5A magenta color, combined from bright red and blue. A black color. A white color. 8A gray color, exactly halfway between black and white. Common alternative spelling of . A medium red color. A medium blue color. A medium green color. 4A teal color, combined from medium green and blue. 4A purple color, combined from medium red and blue. A violet color. A dark green color. KCalculate a complementary color for a provided color. Useful for outlining L a filled shape in a color clearly distinguishable from the fill color. (Create an RGBA color from HSVA values. &Create an RGB color from HSV values. QCreates a linear gradient. Takes a starting position, ending position and a list L of color stops (which are colors combined with a floating value between 0.0 and 1.0 M that describes at what step along the line between the starting position E and ending position the paired color should be transitioned to).  3 linear (0, 0) (100, 100) [(0, black), (1, white)] 4The above example creates a gradient that starts at (0, 0)  and ends at  (100, 100). In other words, it'7s a diagonal gradient, transitioning from the top-left Y to the bottom-right. The provided color stops result in the gradient transitioning from  black to white. \Creates a radial gradient. Takes a starting position and radius, ending position and radius 4 and a list of color stops. See the document for ' for more information on color stops. !!!None*MA data structure describing a some sort of graphically representable object, C such as a polygon formed from a set of points or a rectangle. JA data type made up a collection of points that form a path when joined. SA data structure describing a few ways that graphics that can be wrapped in a form  and hence transformed. EA data structure describing how a shape or path looks when stroked. BA data structure describing the shape of the join of a line, i.e. + where separate line segments join. The  variant takes 2 an argument to limit the length of the join. >A data structure describing the shape of the ends of a line. DA data structure describing how a shape or path looks when filled. TA data structure describing a form. A form is essentially a notion of a transformed 4 graphic, whether it be an element or shape. See  for an insight : into what sort of graphics can be wrapped in a form. 8A data structure describing a piece of formatted text. ;A data structure describing something that can be rendered = to the screen. Elements are the most important structure 8 in Helm. Games essentially feed the engine a stream @ of elements which are then rendered directly to the screen. : The usual way to render art in a Helm game is to call  off to the  function, which essentially - renders a collection of forms together. PCreate an element from an image with a given width, height and image file path. K If the image dimensions are not the same as given, then it will stretch/shrink to fit. - Only PNG files are supported currently. PCreate an element from an image with a given width, height and image file path. a If the image dimensions are not the same as given, then it will only use the relevant pixels d (i.e. cut out the given dimensions instead of scaling). If the given dimensions are bigger than ; the actual image, than irrelevant pixels are ignored. VCreate an element from an image by cropping it with a certain position, width, height Z and image file path. This can be used to divide a single image up into smaller ones. QCreates the default line style. By default, the line is black with a width of 1, ) flat caps and regular sharp joints. )Create a solid line style with a color.  *Create a dashed line style with a color.  *Create a dotted line style with a color. :'Utility function for creating a form. ;JUtility function for creating a filled form from a fill style and shape.  BCreates a form from a shape by filling it with a specific color.  GCreates a form from a shape with a tiled texture and image file path.  5Creates a form from a shape filled with a gradient. ICreates a form from a shape by outlining it with a specific line style. FCreates a form from a path by tracing it with a specific line style. \Creates a form from a image file path with additional position, width and height arguments. = Allows you to splice smaller parts from a single image. !Creates a form from an element. 1Groups a collection of forms into a single one. XGroups a collection of forms into a single one, also applying a matrix transformation. +Rotates a form by an amount (in radians). ,Scales a form by an amount, e.g. scaling by 2.0 will double the size. 0Moves a form relative to its current position.  Moves a form'2s x-coordinate relative to its current position.  Moves a form'2s y-coordinate relative to its current position. OCreate an element from a collection of forms, with width and height arguments. : Can be used to directly render a collection of forms. = collage 800 600 [move (100, 100) $ filled red $ square 100, H move (100, 100) $ outlined (solid white) $ circle 50] ,Creates a path for a collection of points. ACreates a path from a line segment, i.e. a start and end point. 0Creates a shape from a path (a set of points). 6Creates a rectangular shape with a width and height. ,Creates a square shape with a side length. 0Creates an oval shape with a width and height.  'Creates a circle shape with a radius. !ECreates a generic n-sided polygon (e.g. octagon, pentagon, etc) with $ an amount of sides and radius. Q  :;    !O      !O      !*  :;    !None "BCreates the default text. By default the text is black sans-serif  with a height of 14px. #Creates a text from a string. $'Creates a text element from a string. %=Creates a text element from any showable type, defaulting to  the monospace typeface. &!Creates an element from a text. '-Sets the weight of a piece of text to bold. (.Sets the slant of a piece of text to italic. )$Sets the color of a piece of text. *-Sets the typeface of the text to monospace. +*Sets the typeface of the text. Only fonts  supported by Cairo's toy font API are currently  supported. ,+Sets the size of a text noticeably large. -#Sets the size of a piece of text. "#$%&'()*+,- "#$%&'()*+,- $%&"#'()*+,- "#$%&'()*+,- None<6A data structure describing the current engine state. 7 This may be in userland in the future, for setting $ window dimensions, title, etc. =XAttempt to change the window dimensions (and initialize the video mode if not already). W Will try to get a hardware accelerated window and then fallback to a software one. 0 Throws an exception if the software mode can't be used as a fallback. .AConverts radians into the standard angle measurement (radians). /AConverts degrees into the standard angle measurement (radians). 0>Converts turns into the standard angle measurement (radians). @ Turns are essentially full revolutions of the unit circle. >JCreates a new engine state, spawning an empty cache spawned in an IORef. 1GInitializes and runs the game engine. The supplied signal generator is G constantly sampled for an element to render until the user quits.  import FRP.Helm , import qualified FRP.Helm.Window as Window  ! render :: (Int, Int) -> Element S render (w, h) = collage w h [filled red $ rect (fromIntegral w) (fromIntegral h)]   main :: IO ()  main = run $ do  dims <- Window.dimensions   return $ fmap render dims ?A utility function called by 1 that samples the element < or quits the entire engine if SDL events say to do so. @A utility function called by 'run\'' that polls all SDL events C off the stack, returning true if the game should keep running,  false otherwise. A=A utility function that renders a previously sampled element  using an engine state. BA utility function called by  'render\'' that does  the actual heavy lifting. CA utility function called by  'render\'\'' that is called by Cairo  when it's ready to do rendering. DFA utility function that lazily grabs an image surface from the cache,  i.e. creating it if it's not already stored in it. E6A utility function for rendering a specific element. F]A utility function that goes into a state of transformation and then pops it when finished. GKA utility function that sets the Cairo line cap based off of our version. HMA utility function that sets the Cairo line style based off of our version. IFA utility function that sets up all the necessary settings with Cairo E to render with a line style and then strokes afterwards. Assumes I that all drawing paths have already been setup before being called. JFA utility function that sets up all the necessary settings with Cairo C to render with a fill style and then fills afterwards. Assumes I that all drawing paths have already been setup before being called. K A utility that renders a form. <LMN=./0>1?@ABCDEFGHIJKt      !./011./0<LMN=./0>1?@ABCDEFGHIJKO     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       !"#$%&'()*+, - . / 0123456789 : ; < = > ? @ A B C D E F G H I : J KL helm-0.3.0FRP.Helm.WindowFRP.Helm.MouseFRP.Helm.KeyboardFRP.Helm.JoystickFRP.Helm.AutomatonFRP.Helm.ColorFRP.Helm.Graphics FRP.Helm.TextFRP.Helm dimensionswidthheightMouse RightMouse MiddleMouse LeftMousepositionxyisDownKeyUndoKeyEuroKeyPowerKeyMenuKeyBreakKey SysReqKeyPrintKeyHelpKey ComposeKeyModeKey LSuperKey RSuperKeyLMetaKeyRMetaKeyLAltKeyRAltKeyLCtrlKeyRCtrlKey LShiftKey RShiftKey ScrollLockKey CapsLockKey NumLockKeyF15KeyF14KeyF13KeyF12KeyF11KeyF10KeyF9KeyF8KeyF7KeyF6KeyF5KeyF4KeyF3KeyF2KeyF1Key PageDownKey PageUpKeyEndKeyHomeKey InsertKeyLeftKeyRightKeyDownKeyUpKeyKeypadEqualsKeyKeypadEnterKey KeypadPlusKeyKeypadMinusKeyKeypadMultiplyKeyKeypadDivideKeyKeypadPeriodKey KeypadNum9Key KeypadNum8Key KeypadNum7Key KeypadNum6Key KeypadNum5Key KeypadNum4Key KeypadNum3Key KeypadNum2Key KeypadNum1Key KeypadNum0Key DeleteKeyZKeyYKeyXKeyWKeyVKeyUKeyTKeySKeyRKeyQKeyPKeyOKeyNKeyMKeyLKeyKKeyJKeyIKeyHKeyGKeyFKeyEKeyDKeyCKeyBKeyAKey BackquoteKey UnderscoreKeyCaretKeyRightBracketKey BackslashKeyLeftBracketKeyAtKey QuestionKey GreaterKey EqualsKeyLessKey SemicolonKeyColonKeyNum9KeyNum8KeyNum7KeyNum6KeyNum5KeyNum4KeyNum3KeyNum2KeyNum1KeyNum0KeySlashKey PeriodKeyMinusKeyCommaKeyPlusKey AsteriskKey RightParenKey LeftParenKeyQuoteKey AmpersandKey DollarKeyHashKey QuotedBlKey ExclaimKeySpaceKey EscapeKeyPauseKeyEnterKeyClearKeyTabKey BackspaceKeyshiftctrlenterspacekeysDownarrowswasdJoystick availablenameopenindex availableAxesavailableBalls availableHatsavailableButtonsaxishatbuttonball AutomatonSteppurestatefulstepcombine>>><<<counterrunGradientRadialLinearColorrgbargbrgbaredlimeblueyellowcyanmagentablackwhitegraygreymaroonnavygreentealpurpleviolet forestGreen complementhsvahsvlinearradialShapeArcShapeRectangleShape PolygonShapePath FormStyle GroupForm ElementForm ShapeFormPathForm LineStylecolorcapjoindashing dashOffsetLineJoinClippedSharpSmoothLineCapPaddedRoundFlat FillStyleTextureSolidFormthetascalarstyleTexttextUTF8 textColor fontTypefacefontSize fontWeight fontSlantElement TextElement ImageElementCollageElementimage fittedImage croppedImage defaultLinesoliddasheddottedfilledtexturedgradientoutlinedtracedspritetoFormgroupgroupTransformrotatescalemovemoveXmoveYcollagepathsegmentpolygonrectsquareovalcirclengon defaultTexttoText plainTextasTexttextbolditalic monospacetypefaceheaderradiansdegreesturns $fEnumMousesdlGetKeyState getKeyStatearrows' $fEnumKeyhat'hat''ball'formfill EngineStaterequestDimensionsnewEngineStaterun'run''renderrender'render'' getSurface renderElement withTransform setLineCap setLineJoin setLineStyle setFillStyle renderFormsmpcache