[Haskell-beginners] gcNew with simple draw example haskell gtk
Berlin Brown
berlin.brown at gmail.com
Sat Mar 12 21:37:58 CET 2011
I am trying to draw a simple pixel with gtk/haskell. This is the code, but
I get an error.
GHC 6.12.3? with the most recent gtk library.
Error:
# ghc --make SimpleCells.hs
[1 of 1] Compiling Main ( SimpleCells.hs, SimpleCells.o )
Graphics\UI\Gtk\Misc\DrawingArea.chs:22:10: Not in scope: `gcNew'
-----
import Graphics.UI.Gtk
renderScene d ev = do
dw <- widgetGetDrawWindow d
(w,h) <- widgetGetSize d
gc <- gcNew dw
return True
main = do
initGUI
window <- windowNew
drawing <- drawingAreaNew
onExpose drawing (renderScene drawing)
window `onDestroy` mainQuit
windowSetDefaultSize window 800 600
windowSetPosition window WinPosCenter
widgetShowAll window
mainGUI
--
Berlin Brown (berlin dot brown at gmail.com)
http://botnode.com
http://berlinbrowndev.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110312/25671151/attachment.htm>
More information about the Beginners
mailing list