Skip to content

Instantly share code, notes, and snippets.

@jmazon
jmazon / example-4.hs
Created September 13, 2017 17:05
GTK+ Custom Drawing example in Haskell
import Data.IORef
import Control.Arrow ((***))
import Control.Monad (when,void)
import Graphics.UI.Gtk hiding (rectangle)
import Graphics.Rendering.Cairo
type SR = IORef (Maybe Surface)
clearSurface :: Surface -> IO ()
clearSurface surface =