Gtk2HsContentsIndex
Graphics.SOE.Gtk
Portabilityportable (depends on GHC)
Stabilitystable
Maintainergtk2hs-devel@lists.sourceforge.net
Description

An alternative implementation of the graphics library used in The Haskell School of Expression, by Paul Hudak, http://www.haskell.org/soe/.

It has exaclty the same interface as the original implementation Graphics.SOE. See the original for an API reference.

Documentation
runGraphics :: IO () -> IO ()
type Title = String
type Size = (Int, Int)
data Window
openWindow :: Title -> Size -> IO Window
getWindowSize :: Window -> IO Size
clearWindow :: Window -> IO ()
drawInWindow :: Window -> Graphic -> IO ()
drawInWindowNow :: Window -> Graphic -> IO ()
setGraphic :: Window -> Graphic -> IO ()
closeWindow :: Window -> IO ()
openWindowEx :: Title -> Maybe Point -> Maybe Size -> RedrawMode -> IO Window
data RedrawMode
drawGraphic :: RedrawMode
drawBufferedGraphic :: RedrawMode
data Graphic
emptyGraphic :: Graphic
overGraphic :: Graphic -> Graphic -> Graphic
overGraphics :: [Graphic] -> Graphic
data Color
Constructors
Black
Blue
Green
Cyan
Red
Magenta
Yellow
White
show/hide Instances
Bounded Color
Enum Color
Eq Color
Ix Color
Ord Color
Read Color
Show Color
withColor :: Color -> Graphic -> Graphic
text :: Point -> String -> Graphic
type Point = (Int, Int)
ellipse :: Point -> Point -> Graphic
shearEllipse :: Point -> Point -> Point -> Graphic
line :: Point -> Point -> Graphic
polygon :: [Point] -> Graphic
polyline :: [Point] -> Graphic
polyBezier :: [Point] -> Graphic
type Angle = Float
arc :: Point -> Point -> Angle -> Angle -> Graphic
data Region
createRectangle :: Point -> Point -> Region
createEllipse :: Point -> Point -> Region
createPolygon :: [Point] -> Region
andRegion :: Region -> Region -> Region
orRegion :: Region -> Region -> Region
xorRegion :: Region -> Region -> Region
diffRegion :: Region -> Region -> Region
drawRegion :: Region -> Graphic
getKey :: Window -> IO Char
getLBP :: Window -> IO Point
getRBP :: Window -> IO Point
data Event
Constructors
Key
char :: Char
isDown :: Bool
Button
pt :: Point
isLeft :: Bool
isDown :: Bool
MouseMove
pt :: Point
Resize
Closed
show/hide Instances
Show Event
maybeGetWindowEvent :: Window -> IO (Maybe Event)
getWindowEvent :: Window -> IO Event
timeGetTime :: IO Word32
word32ToInt :: Word32 -> Int
Produced by Haddock version 0.8