From: <kr_...@us...> - 2003-05-30 08:44:06
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1:/tmp/cvs-serv31982/src/Graphics/UI/GIO Modified Files: Canvas.hs Window.hs Log Message: Enable adjustment of BufferedMode for GIO Window Index: Canvas.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Canvas.hs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Canvas.hs 12 Apr 2003 07:30:58 -0000 1.7 --- Canvas.hs 30 May 2003 08:23:08 -0000 1.8 *************** *** 145,152 **** -- Paint on a primitive canvas. Just for internal use. ! withCanvas :: CanvasHandle -> Color -> Color -> HatchStyle -> (Canvas -> IO ()) -> IO () ! withCanvas handle fgcolor bgcolor hatch f = do c <- createCanvas handle p ! Port.initCanvas p Port.Buffered handle f c Port.doneCanvas handle --- 145,152 ---- -- Paint on a primitive canvas. Just for internal use. ! withCanvas :: CanvasHandle -> BufferMode -> Color -> Color -> HatchStyle -> (Canvas -> IO ()) -> IO () ! withCanvas handle bmode fgcolor bgcolor hatch f = do c <- createCanvas handle p ! Port.initCanvas p bmode handle f c Port.doneCanvas handle Index: Window.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Window.hs 26 Apr 2003 20:54:00 -0000 1.14 --- Window.hs 30 May 2003 08:23:09 -0000 1.15 *************** *** 12,16 **** ----------------------------------------------------------------------------------------- module Graphics.UI.GIO.Window ! ( Window, window, domain, resizeable, view, layout, autosize , dialog, runDialog -- * Internal --- 12,16 ---- ----------------------------------------------------------------------------------------- module Graphics.UI.GIO.Window ! ( Window, window, domain, resizeable, view, layout, autosize, bufferMode , dialog, runDialog -- * Internal *************** *** 39,42 **** --- 39,43 ---- , vpaint :: Var PaintFunction , vlayout :: Var Layout + , vbufferMode :: Var BufferMode } *************** *** 71,85 **** form :: WindowHandle -> IO Window form hwindow ! = do w <- do vpaint <- newVar (\_ _ _ -> return ()) ! vautosize <- newVar True ! vlayout <- newVar empty ! vdomain <- newVar (sz 0 0) ! vresizeable <- newVar True ! vcolor <- newVar black ! vbgcolor <- newVar dialoggray ! vhatch <- newVar HatchSolid return (Window hwindow vdomain vresizeable vautosize vcolor vbgcolor vhatch ! vpaint vlayout ) recolorWindow w --- 72,87 ---- form :: WindowHandle -> IO Window form hwindow ! = do w <- do vpaint <- newVar (\_ _ _ -> return ()) ! vautosize <- newVar True ! vlayout <- newVar empty ! vdomain <- newVar (sz 0 0) ! vresizeable<- newVar True ! vcolor <- newVar black ! vbgcolor <- newVar dialoggray ! vhatch <- newVar HatchSolid ! vbufferMode<- newVar UnBuffered return (Window hwindow vdomain vresizeable vautosize vcolor vbgcolor vhatch ! vpaint vlayout vbufferMode ) recolorWindow w *************** *** 141,144 **** --- 143,152 ---- (\w sz-> Lib.setWindowViewSize (hwindow w) sz) + -- | The buffering mode for Window. If the window is buffered then all + -- drawing operations are first performed to memory buffer and after + -- that the buffer is copied to the screen. + bufferMode :: Attr Window BufferMode + bufferMode = newAttr (getVar . vbufferMode) (setVar . vbufferMode) + instance Dismissible Window where dismissWidget w = Lib.dismissWindow (hwindow w) *************** *** 185,189 **** bgcol <- get w bgcolor hat <- get w hatch ! withCanvas hcanvas col bgcol hat $ \can -> paintfun can updArea [] instance Able Window where --- 193,198 ---- bgcol <- get w bgcolor hat <- get w hatch ! bmode <- get w bufferMode ! withCanvas hcanvas bmode col bgcol hat $ \can -> paintfun can updArea [] instance Able Window where |