Gleam 0.1.0.1 → 0.1.0.2
raw patch · 5 files changed
+27/−16 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Gleam: Arc :: Double -> Double -> Double -> Picture
- Gleam: Blank :: Picture
- Gleam: Char :: Char -> Key
- Gleam: Circle :: Double -> Picture
- Gleam: Color :: Color -> Picture -> Picture
- Gleam: Down :: KeyState
- Gleam: EventKey :: Key -> KeyState -> InputEvent
- Gleam: EventMotion :: Point -> Point -> InputEvent
- Gleam: File :: String -> Source
- Gleam: Image :: Source -> Double -> Double -> Picture
- Gleam: KeyAlt :: SpecialKey
- Gleam: KeyBackspace :: SpecialKey
- Gleam: KeyCaps :: SpecialKey
- Gleam: KeyCtrl :: SpecialKey
- Gleam: KeyDown :: SpecialKey
- Gleam: KeyEnter :: SpecialKey
- Gleam: KeyEsc :: SpecialKey
- Gleam: KeyLeft :: SpecialKey
- Gleam: KeyRight :: SpecialKey
- Gleam: KeyShift :: SpecialKey
- Gleam: KeySpace :: SpecialKey
- Gleam: KeyTab :: SpecialKey
- Gleam: KeyUnknown :: SpecialKey
- Gleam: KeyUp :: SpecialKey
- Gleam: Line :: Path -> Picture
- Gleam: Mouse :: Point -> Key
- Gleam: Pictures :: [Picture] -> Picture
- Gleam: Polygon :: Path -> Picture
- Gleam: Rectangle :: Double -> Double -> Picture
- Gleam: Scale :: Double -> Double -> Picture -> Picture
- Gleam: SpecialKey :: SpecialKey -> Key
- Gleam: Stroke :: Color -> Double -> Picture -> Picture
- Gleam: Text :: String -> Font -> FontSize -> Picture
- Gleam: Translate :: Double -> Double -> Picture -> Picture
- Gleam: Up :: KeyState
- Gleam: Url :: String -> Source
- Gleam: convertColor :: Color -> String
- Gleam: data InputEvent
- Gleam: data Key
- Gleam: data KeyState
- Gleam: data Picture
- Gleam: data Source
- Gleam: data SpecialKey
- Gleam: defaultGleamConfig :: GleamConfig
- Gleam: lineLoop :: Path -> Picture
- Gleam: rectanglePath :: Double -> Double -> Path
- Gleam: rectangleSolid :: Double -> Double -> Picture
- Gleam: rectangleWire :: Double -> Double -> Picture
- Gleam: sectorWire :: Double -> Double -> Double -> Picture
- Gleam: type Path = [Point]
- Gleam: type Point = (Double, Double)
- Gleam: type Vector = Point
+ Color: Aquamarine :: Color
+ Color: Azure :: Color
+ Color: Black :: Color
+ Color: Blue :: Color
+ Color: Chartreuse :: Color
+ Color: Cyan :: Color
+ Color: Green :: Color
+ Color: Magenta :: Color
+ Color: Orange :: Color
+ Color: RGBA :: String -> Color
+ Color: Red :: Color
+ Color: Rose :: Color
+ Color: Transparent :: Color
+ Color: Violet :: Color
+ Color: White :: Color
+ Color: Yellow :: Color
+ Color: convertColor :: Color -> String
+ Color: data Color
+ Color: instance GHC.Classes.Eq Color.Color
+ Color: instance GHC.Show.Show Color.Color
+ InputEvent: Char :: Char -> Key
+ InputEvent: Down :: KeyState
+ InputEvent: EventKey :: Key -> KeyState -> InputEvent
+ InputEvent: EventMotion :: Point -> Point -> InputEvent
+ InputEvent: KeyAlt :: SpecialKey
+ InputEvent: KeyBackspace :: SpecialKey
+ InputEvent: KeyCaps :: SpecialKey
+ InputEvent: KeyCtrl :: SpecialKey
+ InputEvent: KeyDown :: SpecialKey
+ InputEvent: KeyEnter :: SpecialKey
+ InputEvent: KeyEsc :: SpecialKey
+ InputEvent: KeyLeft :: SpecialKey
+ InputEvent: KeyRight :: SpecialKey
+ InputEvent: KeyShift :: SpecialKey
+ InputEvent: KeySpace :: SpecialKey
+ InputEvent: KeyTab :: SpecialKey
+ InputEvent: KeyUnknown :: SpecialKey
+ InputEvent: KeyUp :: SpecialKey
+ InputEvent: Mouse :: Point -> Key
+ InputEvent: SpecialKey :: SpecialKey -> Key
+ InputEvent: Up :: KeyState
+ InputEvent: data InputEvent
+ InputEvent: data Key
+ InputEvent: data KeyState
+ InputEvent: data SpecialKey
+ InputEvent: instance GHC.Classes.Eq InputEvent.InputEvent
+ InputEvent: instance GHC.Classes.Eq InputEvent.Key
+ InputEvent: instance GHC.Classes.Eq InputEvent.KeyState
+ InputEvent: instance GHC.Classes.Eq InputEvent.SpecialKey
+ InputEvent: instance GHC.Classes.Ord InputEvent.Key
+ InputEvent: instance GHC.Classes.Ord InputEvent.KeyState
+ InputEvent: instance GHC.Classes.Ord InputEvent.SpecialKey
+ InputEvent: instance GHC.Show.Show InputEvent.InputEvent
+ InputEvent: instance GHC.Show.Show InputEvent.Key
+ InputEvent: instance GHC.Show.Show InputEvent.KeyState
+ InputEvent: instance GHC.Show.Show InputEvent.SpecialKey
+ Picture: Arc :: Double -> Double -> Double -> Picture
+ Picture: Blank :: Picture
+ Picture: Circle :: Double -> Picture
+ Picture: Color :: Color -> Picture -> Picture
+ Picture: File :: String -> Source
+ Picture: Image :: Source -> Double -> Double -> Picture
+ Picture: Line :: Path -> Picture
+ Picture: Pictures :: [Picture] -> Picture
+ Picture: Polygon :: Path -> Picture
+ Picture: Rectangle :: Double -> Double -> Picture
+ Picture: Scale :: Double -> Double -> Picture -> Picture
+ Picture: Stroke :: Color -> Double -> Picture -> Picture
+ Picture: Text :: String -> Font -> FontSize -> Picture
+ Picture: Translate :: Double -> Double -> Picture -> Picture
+ Picture: Url :: String -> Source
+ Picture: data Picture
+ Picture: data Source
+ Picture: instance Data.Semigroup.Semigroup Picture.Picture
+ Picture: instance GHC.Base.Monoid Picture.Picture
+ Picture: instance GHC.Classes.Eq Picture.Picture
+ Picture: instance GHC.Classes.Eq Picture.Source
+ Picture: instance GHC.Show.Show Picture.Picture
+ Picture: instance GHC.Show.Show Picture.Source
+ Picture: lineLoop :: Path -> Picture
+ Picture: rectanglePath :: Double -> Double -> Path
+ Picture: rectangleSolid :: Double -> Double -> Picture
+ Picture: rectangleWire :: Double -> Double -> Picture
+ Picture: sectorWire :: Double -> Double -> Double -> Picture
+ Picture: type Path = [Point]
+ Picture: type Point = (Double, Double)
+ Picture: type Vector = Point
+ Settings: GleamConfig :: Int -> Int -> GleamConfig
+ Settings: Simulation :: GleamConfig -> model -> (model -> Picture) -> (model -> model) -> (InputEvent -> model -> model) -> String -> Simulation
+ Settings: [height] :: GleamConfig -> Int
+ Settings: [simConfig] :: Simulation -> GleamConfig
+ Settings: [simDraw] :: Simulation -> (model -> Picture)
+ Settings: [simHandler] :: Simulation -> (InputEvent -> model -> model)
+ Settings: [simInitialModel] :: Simulation -> model
+ Settings: [simTitle] :: Simulation -> String
+ Settings: [simUpdate] :: Simulation -> (model -> model)
+ Settings: [width] :: GleamConfig -> Int
+ Settings: data GleamConfig
+ Settings: data Simulation
+ Settings: defaultGleamConfig :: GleamConfig
+ Text: Arial :: Font
+ Text: CourierNew :: Font
+ Text: Font :: String -> Font
+ Text: SansSerif :: Font
+ Text: Serif :: Font
+ Text: Size :: Int -> FontSize
+ Text: TimesNewRoman :: Font
+ Text: Verdana :: Font
+ Text: data Font
+ Text: data FontSize
+ Text: getCombinedFont :: Font -> FontSize -> String
+ Text: instance GHC.Classes.Eq Text.Font
+ Text: instance GHC.Classes.Eq Text.FontSize
+ Text: instance GHC.Show.Show Text.Font
+ Text: instance GHC.Show.Show Text.FontSize
Files
- Gleam.cabal +8/−8
- src/Color.hs +7/−7
- src/Gleam.hs +2/−0
- src/InputEvent.hs +9/−0
- src/Picture.hs +1/−1
Gleam.cabal view
@@ -1,5 +1,5 @@ name: Gleam-version: 0.1.0.1+version: 0.1.0.2 cabal-version: >=1.10 license: BSD3 license-file: LICENSE@@ -19,20 +19,20 @@ location: https://github.com/Ebin-Benny/Gleam.git library- exposed-modules: Gleam-- other-modules: Animate,+ exposed-modules: Gleam, Color,- Handler, InputEvent, Picture,- Render, Settings,- Text,+ Text++ other-modules: Animate,+ Handler,+ Render, Utility -- Other library packages from which modules are imported.- build-depends: base >=4.9 && <= 5+ build-depends: base >= 4.9 && <= 5 ,mtl >= 2.2.2 && < 2.3 ,split >= 0.2.3 && < 0.3 ,threepenny-gui >= 0.8.3 && < 0.9
src/Color.hs view
@@ -35,11 +35,11 @@ Green -> "green" Blue -> "blue" Yellow -> "yellow"- Cyan -> "cyan"- Magenta -> "magenta"- Rose -> "rose"- Violet -> "violet"- Azure -> "azure"- Chartreuse -> "chartreuse"- Orange -> "orange"+ Cyan -> "#00FFFF"+ Magenta -> "#FF00FF"+ Rose -> "#FF007F"+ Violet -> "#EE82EE"+ Azure -> "#007FFF"+ Chartreuse -> "#7FFF00"+ Orange -> "ffa500" (RGBA string) -> string
src/Gleam.hs view
@@ -7,6 +7,7 @@ , module InputEvent , module Color , module Settings+ , module Text ) where @@ -22,6 +23,7 @@ import Utility import Color import Settings+import Text config = defaultConfig { jsStatic = Just "./images" }
src/InputEvent.hs view
@@ -8,22 +8,31 @@ import Picture +-- | An input event. data InputEvent+ -- | A key or mouse button event = EventKey Key KeyState+ -- | A mouse motion event | EventMotion Point Point deriving (Eq, Show) +-- | A key. data Key+ -- | A key that can be represented by a character = Char Char+ -- | A special key. | SpecialKey SpecialKey+ -- | A mouse button. | Mouse Point deriving (Show, Eq, Ord) +-- | State of the key event. data KeyState = Down | Up deriving (Show, Eq, Ord) +-- | Special keys data SpecialKey = KeyUnknown | KeySpace
src/Picture.hs view
@@ -38,7 +38,7 @@ | Url String deriving (Show, Eq) --- | A 2D picture+-- | A 2D picture. data Picture -- | A blank picture, with nothing in it. = Blank