You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Axel S. <si...@co...> - 2009-02-17 18:10:35
|
Tue Feb 17 13:09:09 EST 2009 Axe...@en... * Fix documentation. hunk ./gtk/Graphics/UI/Gtk/General/Structs.hsc 686 --- This may be @Nothing@ if the widget has not yet been realized, since a --- widget does not allocate its window resources until just before it is +-- This function thows an error if the widget has not yet been realized, since +-- a widget does not allocate its window resources until just before it is |
From: Peter g. <pg...@co...> - 2009-02-07 05:49:16
|
Sat Feb 7 00:48:15 EST 2009 Peter Gavin <pg...@gm...> tagged 0.10.0 |
From: Peter g. <pg...@co...> - 2009-02-06 21:28:38
|
Fri Feb 6 14:45:11 EST 2009 pg...@gm... * gtk: fix warning about redefinition of PANGO_CHECK_VERSION when using -fvia-C hunk ./gtk/hsgtk.h 31 +#include <gtk2hs-config.h> hunk ./gtk/hsgtk.h 34 - ((_PANGO_MAJOR_VERSION == 1) && (_PANGO_MINOR_VERSION < 16)) || \ - ((_PANGO_MAJOR_VERSION == 1) && (_PANGO_MINOR_VERSION == 16) && (_PANGO_MICRO_VERSION < 0))) + ((_PANGO_MAJOR_VERSION == 1) && (_PANGO_MINOR_VERSION < 16))) + |
From: Peter g. <pg...@co...> - 2009-02-06 21:28:30
|
Fri Feb 6 14:44:39 EST 2009 pg...@gm... * configure.ac: protect gtk2hs-config.h from multiple inclusions hunk ./configure.ac 38 +#ifndef _GTK2HS_CONFIG_H_ +#define _GTK2HS_CONFIG_H_ + hunk ./configure.ac 554 +#endif + |
From: Axel S. <si...@co...> - 2009-02-06 09:33:51
|
Fri Feb 6 04:31:19 EST 2009 Axe...@en... * Add the menu demo directory. hunk ./Makefile.am 2996 - demo/scaling/Makefile + demo/scaling/Makefile \ + demo/menu/ComboDemo.hs \ + demo/menu/MenuDemo.hs \ + demo/menu/Makefile |
From: Peter g. <pg...@co...> - 2009-02-05 23:51:21
|
Tue Jan 13 21:23:19 EST 2009 Peter Gavin <pg...@gm...> * bump version to 0.10.0 hunk ./configure.ac 25 -AC_INIT([gtk2hs],[0.9.13]) +AC_INIT([gtk2hs],[0.10.0]) |
From: Peter g. <pg...@co...> - 2009-02-05 23:51:21
|
Thu Feb 5 00:39:25 EST 2009 Peter Gavin <pg...@gm...> * win32: name installer gtk2hs-0.10.0-win32-installer hunk ./tools/win32/gtk2hs.iss 15 -OutputBaseFilename=gtk2hs-0.10.0[_^M_][_$_] +OutputBaseFilename=gtk2hs-0.10.0-win32-installer[_^M_][_$_] |
From: Axel S. <si...@co...> - 2009-02-01 22:28:50
|
Sun Feb 1 17:24:39 EST 2009 Axe...@en... * Add a new demo on context sensitive scaling. This demo is due to Pawel Bulkowski. adddir ./demo/scaling hunk ./Makefile.am 2877 - demo/graphic demo/unicode demo/soe demo/menu + demo/graphic demo/unicode demo/soe demo/menu \ + demo/scaling hunk ./Makefile.am 2990 - demo/gnomevfs/Makefile + demo/gnomevfs/Makefile \ + demo/scaling/London_Eye.jpg \ + demo/scaling/Mountains.jpg \ + demo/scaling/Stones.jpg \ + demo/scaling/Scaling.hs \ + demo/scaling/scaling.glade \ + demo/scaling/Makefile addfile ./demo/scaling/London_Eye.jpg binary ./demo/scaling/London_Eye.jpg addfile ./demo/scaling/Makefile hunk ./demo/scaling/Makefile 1 + +PROG = scaling +SOURCES = Scaling.hs +#HCFLAGS = -prof -auto-all +# use -fglasgow-exts since older ghc versions don't know about FlexibleContexts +HCFLAGS = -O3 -fglasgow-exts +#HCFLAGS = -O3 -fvia-C -optc-O3 +#HCFLAGS = -O0 -keep-hc-file -keep-s-files -fvia-C + +$(PROG) : $(SOURCES) + $(HC) --make $< -o $@ $(HCFLAGS) + +clean: + rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROG) + +HC=ghc addfile ./demo/scaling/Mountains.jpg binary ./demo/scaling/Mountains.jpg addfile ./demo/scaling/Scaling.hs hunk ./demo/scaling/Scaling.hs 1 +{-# OPTIONS -O #-} + --- {-# OPTIONS_GHC -XFlexibleContexts #-} see Makefile +-- Author: Pawel Bulkowski (paw...@gm...) +-- Thanks to Michal Palka for teaching me Haskell +-- Photos by: Magdalena Niedziela +-- based on other gtk2hs example applications +-- the code is public domain +import Graphics.UI.Gtk +import Graphics.UI.Gtk.Gdk.EventM + +import Data.Array.MArray +import Data.Array.IO +--import Data.Array.IO.Internals +import Data.Array.Storable +import Data.Bits +import Data.Word +import Data.Maybe +import Data.IORef +import Data.Ord +import Control.Monad ( when, unless, liftM ) +import Control.Monad.Trans ( liftIO ) +import Control.Monad.ST +import Data.Array.Base ( unsafeWrite, unsafeRead ) [_$_] +import Graphics.UI.Gtk +import Graphics.UI.Gtk.Glade +import Graphics.UI.Gtk.ModelView as New [_$_] +import CPUTime +import System.Environment ( getArgs ) +import System.Directory ( doesFileExist ) +type ArrayType = IOUArray +--type ArrayType = StorableArray + +-- The state and GUI + +data ImageState = Empty|NonEmpty +data State = State { + pb :: Pixbuf, + is :: ImageState +} + + [_$_] +main = do + args <- getArgs + case args of + [fName] -> do + exists <- doesFileExist fName + if exists then runGUI fName else + putStrLn ("File "++fName++" not found.") + _ -> putStrLn "Usage: scaling <image.jpg>" + [_$_] +runGUI fName = do [_$_] + initGUI + + window <- windowNew + window `onDestroy` mainQuit + set window [ windowTitle := "Scaling" + , windowResizable := True ] + label <- labelNew (Just "Content Aware Image Scaling") + vboxOuter <- vBoxNew False 0 + vboxInner <- vBoxNew False 5 + [_$_] + (mb,miOpen,miSave,miScale, miGradient, miSeamCarve, miQuit) <- makeMenuBar + canvas <- drawingAreaNew + containerAdd vboxInner canvas + [_$_] + [_$_] + -- Assemble the bits + set vboxOuter [ containerChild := mb + , containerChild := vboxInner ] + set vboxInner [ containerChild := label + , containerBorderWidth := 10 ] + set window [ containerChild := vboxOuter ] + [_$_] + -- create the Pixbuf + pb <- pixbufNew ColorspaceRgb False 8 256 256 + -- Initialize the state + state <- newIORef State { pb = pb, is = Empty } + let modifyState f = readIORef state >>= f >>= writeIORef state + + canvas `onSizeRequest` return (Requisition 256 256) + [_$_] + + -- Add action handlers + onActivateLeaf miQuit mainQuit +-- onActivateLeaf miOpen $ modifyState $ reset gui + onActivateLeaf miOpen $ modifyState $ loadImageDlg canvas window + onActivateLeaf miSave $ modifyState $ saveImageDlg canvas window + onActivateLeaf miScale $ modifyState $ scaleImageDlg canvas window + onActivateLeaf miGradient $ modifyState $ gradientImageDlg canvas window + onActivateLeaf miSeamCarve $ modifyState $ seamCarveImageDlg canvas window + + modifyState (loadImage canvas window fName) + [_$_] + canvas `on` exposeEvent $ updateCanvas state + boxPackStartDefaults vboxInner canvas + widgetShowAll window + mainGUI + + return () + + --uncomment for ghc < 6.8.3 +--instance Show Rectangle where +-- show (Rectangle x y w h) = "x="++show x++", y="++show y++ +-- ", w="++show w++", h="++show h++";" + +updateCanvas :: IORef State -> EventM EExpose Bool +updateCanvas rstate = do + region <- eventRegion + win <- eventWindow + liftIO $ do + state <- readIORef rstate + let (State pb is) = state + gc <- gcNew win + width <- pixbufGetWidth pb + height <- pixbufGetHeight pb + pbregion <- regionRectangle (Rectangle 0 0 width height) + regionIntersect region pbregion + rects <- regionGetRectangles region + putStrLn ("redrawing: "++show rects) + (flip mapM_) rects $ \(Rectangle x y w h) -> do + drawPixbuf win gc pb x y x y w h RgbDitherNone 0 0 + return True + +{-# INLINE doFromTo #-} +-- do the action for [from..to], ie it's inclusive. +doFromTo :: Int -> Int -> (Int -> IO ()) -> IO () +doFromTo from to action = + let loop n | n > to = return () + | otherwise = do action n + loop (n+1) + in loop from + +-- do the action for [to..from], ie it's inclusive. +{-# INLINE doFromToDown #-} +doFromToDown :: Int -> Int -> (Int -> IO ()) -> IO () +doFromToDown from to action = + let loop n | n < to = return () + | otherwise = do action n + loop (n-1) + in loop from + +-- do the action for [from..to] with step, ie it's inclusive. +{-# INLINE doFromToStep #-} +doFromToStep :: Int -> Int -> Int -> (Int -> IO ()) -> IO () +doFromToStep from to step action = + let loop n | n > to = return () + | otherwise = do action n + loop (n+step) + in loop from + [_$_] +--forM = flip mapM + [_$_] +makeMenuBar = do + mb <- menuBarNew + fileMenu <- menuNew + open <- menuItemNewWithMnemonic "_Open" + save <- menuItemNewWithMnemonic "_Save" + scale <- menuItemNewWithMnemonic "_Scale" + gradient <- menuItemNewWithMnemonic "_Gradient" + seamCarve <- menuItemNewWithMnemonic "Seam _Carve" + quit <- menuItemNewWithMnemonic "_Quit" + file <- menuItemNewWithMnemonic "_File" + menuShellAppend fileMenu open + menuShellAppend fileMenu save + menuShellAppend fileMenu scale + menuShellAppend fileMenu gradient + menuShellAppend fileMenu seamCarve + menuShellAppend fileMenu quit + menuItemSetSubmenu file fileMenu + containerAdd mb file + return (mb,open,save,scale,gradient,seamCarve,quit) + +loadImageDlg canvas window (State pb is) = do + putStrLn ("loadImage") + ret <- openFileDialog window + case ret of + Just (filename) -> (loadImage canvas window filename (State pb is)) + Nothing -> return (State pb is) + + +loadImage canvas window filename (State pb is) = do + putStrLn ("loadImage") + pxb <- pixbufNewFromFile filename + width <- pixbufGetWidth pxb + height <- pixbufGetHeight pxb + widgetSetSizeRequest canvas width height + widgetQueueDraw canvas +-- updateCanvas canvas pxb + return (State pxb NonEmpty) + + [_$_] +saveImageDlg canvas window (State pb is) = do + putStrLn ("saveImage") + ret <- openFileDialog window + case ret of + Just (filename) -> do + pixbufSave pb filename "png" [] + return (State pb is) + Nothing -> return (State pb is) + +scaleImageDlg canvas window (State pb is) = do + putStrLn ("scaleImage") + [_$_] + origWidth <- pixbufGetWidth pb + origHeight <- pixbufGetHeight pb + ret <- scaleDialog window origWidth origHeight + + let update w h = do + putStrLn ("seamCarveImage::update w: "++show w++" h: "++show h) + --scalePixbuf :: Pixbuf -> Int -> Int -> IO Pixbuf + pxb <- scalePixbuf pb w h + width <- pixbufGetWidth pxb + height <- pixbufGetHeight pxb + widgetSetSizeRequest canvas width height + widgetQueueDraw canvas + --updateCanvas canvas pxb + return (State pxb NonEmpty) + + case ret of + Nothing -> return (State pb NonEmpty) + Just (w,h) -> (update w h) +[_^I_][_$_] +gradientImageDlg canvas window (State pb is) = do + putStrLn ("gradientImageDlg") + --scalePixbuf :: Pixbuf -> Int -> Int -> IO Pixbuf + pxb <- gradientPixbuf pb + width <- pixbufGetWidth pxb + height <- pixbufGetHeight pxb + widgetSetSizeRequest canvas width height + widgetQueueDraw canvas +-- updateCanvas canvas pxb + return (State pxb NonEmpty) +[_^I_][_$_] +seamCarveImageDlg canvas window (State pb is) = do + origWidth <- pixbufGetWidth pb + origHeight <- pixbufGetHeight pb + ret <- seamCarveDialog window origWidth origHeight 2 + + let update w h grdCnt = do + putStrLn ("seamCarveImageDlg::update w: "++show w++" h: "++show h) + --scalePixbuf :: Pixbuf -> Int -> Int -> IO Pixbuf + --pxb <- scalePixbuf pb w h + cpuStart <- getCPUTime + pxb <- seamCarvePixbuf pb w h grdCnt + cpuEnd <- getCPUTime + putStrLn ("seamCarveImageDlg::cpu time: "++show ((fromIntegral (cpuEnd-cpuStart) :: Double) /1e12)) + width <- pixbufGetWidth pxb + height <- pixbufGetHeight pxb + widgetSetSizeRequest canvas width height + widgetQueueDraw canvas + --updateCanvas canvas pxb + return (State pxb NonEmpty) + + case ret of + Nothing -> return (State pb NonEmpty) + Just (w,h,grdCnt) -> (update w h grdCnt) + +[_^I_][_$_] +scaleDialog :: Window -> Int -> Int-> IO (Maybe (Int, Int)) +scaleDialog parent width height = do + + Just xml <- xmlNew "scaling.glade" [_$_] + + dia <- xmlGetWidget xml castToDialog "dialogScale" + dialogAddButton dia stockCancel ResponseCancel + dialogAddButton dia stockOk ResponseOk + entryWidth <- xmlGetWidget xml castToEntry "entryScalingWidth" [_$_] + entryHeight <- xmlGetWidget xml castToEntry "entryScalingHeight" [_$_] + entrySetText entryWidth (show width) + entrySetText entryHeight (show height) + res <- dialogRun dia + widthStr <- entryGetText entryWidth + heightStr <- entryGetText entryHeight + widgetDestroy dia + putStrLn ("scaleDialog width: "++show width++" height: "++show height) + case res of + ResponseOk -> return (Just (read widthStr,read heightStr)) + _ -> return Nothing + +seamCarveDialog :: Window -> Int -> Int -> Int -> IO (Maybe (Int, Int, Int)) +seamCarveDialog parent width height grdCnt= do + + Just xml <- xmlNew "scaling.glade" [_$_] + + dia <- xmlGetWidget xml castToDialog "dialogSeamCarve" + dialogAddButton dia stockCancel ResponseCancel + dialogAddButton dia stockOk ResponseOk + entryWidth <- xmlGetWidget xml castToEntry "entryWidth" [_$_] + entryHeight <- xmlGetWidget xml castToEntry "entryHeight" [_$_] + entryGrdCnt <- xmlGetWidget xml castToEntry "entryGrdCnt" [_$_] + entrySetText entryWidth (show width) + entrySetText entryHeight (show height) + entrySetText entryGrdCnt (show grdCnt) + res <- dialogRun dia + widthStr <- entryGetText entryWidth + heightStr <- entryGetText entryHeight + grdCntStr <- entryGetText entryGrdCnt + widgetDestroy dia + putStrLn ("scaleDialog width: "++show width++" height: "++show height++" grdCnt: "++show grdCnt) + case res of + ResponseOk -> return (Just (read widthStr,read heightStr, read grdCntStr)) + _ -> return Nothing + + [_$_] +openFileDialog :: Window -> IO (Maybe String) +openFileDialog parentWindow = do + dialog <- fileChooserDialogNew + (Just "Open Profile... ") + (Just parentWindow) + FileChooserActionOpen + [("gtk-cancel", ResponseCancel) + ,("gtk-open", ResponseAccept)] + widgetShow dialog + response <- dialogRun dialog + widgetHide dialog + case response of + ResponseAccept -> fileChooserGetFilename dialog + _ -> return Nothing + +--simple pixbuf scaling +scalePixbuf :: Pixbuf -> Int -> Int -> IO Pixbuf +scalePixbuf pb newWidth newHeight = do + width <- pixbufGetWidth pb + height <- pixbufGetHeight pb + row <- pixbufGetRowstride pb + chan <- pixbufGetNChannels pb + bits <- pixbufGetBitsPerSample pb + pbData <- (pixbufGetPixels pb :: IO (PixbufData Int Word8)) + pbn <- pixbufNew ColorspaceRgb False 8 newWidth newHeight + pbnData <- (pixbufGetPixels pbn :: IO (PixbufData Int Word8)) + newRow <- pixbufGetRowstride pbn + putStrLn ("bytes per row: "++show row++", channels per pixel: "++show chan++ + ", bits per sample: "++show bits) + putStrLn ("width: "++show width++", height: "++show height++", newWidth: "++show newWidth++", newHeight: "++show newHeight++" bytes per row new: "++show newRow) + [_$_] +[_^I_] [_$_] + let stepX = (fromIntegral width) / (fromIntegral newWidth) :: Double + let stepY = (fromIntegral height) / (fromIntegral newHeight) :: Double + + doFromTo 0 (newHeight-1) $ \y -> do + let y1 = truncate ((fromIntegral y) * stepY) + doFromTo 0 (newWidth-1) $ \x -> do + let x1 = truncate ((fromIntegral x) * stepX) + let off = (x1*chan+y1*row) + let offNew = (x*chan+y*newRow) + --putStrLn ("x: "++show x++", y: "++show y++" x1: "++show x1++", y1: "++show y1++" off:"++show off++" offNew:"++show offNew) + r <- unsafeRead pbData (off) + g <- unsafeRead pbData (1+off) + b <- unsafeRead pbData (2+off) + unsafeWrite pbnData (offNew) r + unsafeWrite pbnData (1+offNew) g + unsafeWrite pbnData (2+offNew) b + return pbn + + +{-# INLINE arrmove #-} +arrmove :: (Ix i, MArray a e IO) => a i e -> Int -> Int -> Int -> IO () +arrmove arr src dst size = do + + --putStrLn("arrmove "++show src++" "++show dst++" "++show size) + doFromTo 0 (size-1) $ \x -> do + --forM [0..(size-1)] $ \x -> do + v <- unsafeRead arr (src+x) + unsafeWrite arr (dst+x) v + --putStrLn("arrmove2 "++show src++" "++show dst++" "++show size) + return () + + [_$_] +{-# INLINE arrmovesd #-} +arrmovesd :: (Ix b, MArray a c IO) => a b c -> a b c -> Int -> Int -> Int -> IO () +arrmovesd arrsrc arrdst src dst size = do + doFromTo 0 (size-1) $ \x -> do + --forM [0..(size-1)] $ \x -> do + v <- unsafeRead arrsrc (src+x) + unsafeWrite arrdst (dst+x) v + return () + +{-# INLINE arrmoven #-} +arrmoven :: (Ix i, MArray a e IO) => a i e -> Int -> Int -> Int -> Int -> Int -> IO () +arrmoven arr src dst size w n = do + --putStrLn("arrmoven "++show src++" "++show dst++" "++show size++" "++show w++" "++show n) + doFromToStep 0 ((n-1)*w) w $ \yoff -> do + arrmove arr (src+yoff) (dst+yoff) size + return () + +-- content Aware scaling +--TODO! +seamCarvePixbuf :: Pixbuf -> Int -> Int -> Int -> IO Pixbuf +seamCarvePixbuf pb newWidth newHeight grdCnt = do + width <- pixbufGetWidth pb + height <- pixbufGetHeight pb + row <- pixbufGetRowstride pb + chan <- pixbufGetNChannels pb + bits <- pixbufGetBitsPerSample pb + pbData <- (pixbufGetPixels pb :: IO (PixbufData Int Word8)) + --pbn <- pixbufNew ColorspaceRgb False 8 newWidth newHeight + pbn <- pixbufNew ColorspaceRgb False 8 newWidth newHeight + pbnData <- (pixbufGetPixels pbn :: IO (PixbufData Int Word8)) + newRow <- pixbufGetRowstride pbn + putStrLn ("bytes per row: "++show row++", channels per pixel: "++show chan++ + ", bits per sample: "++show bits) + putStrLn ("width: "++show width++", height: "++show height++", newWidth: "++show newWidth++", newHeight: "++show newHeight++" bytes per row new: "++show newRow) + + tmpPB <- pixbufCopy pb + tmpData <- (pixbufGetPixels tmpPB) :: IO (PixbufData Int Word8) + ----double gradient + [_$_] + let computeSrcPic pb cnt | cnt <= 0 = do pixbufCopy pb + | cnt > 0 = do + pb <- computeSrcPic pb (cnt-1) + gradientPixbuf pb + + --computing gradient but one more gradient + --will be compute later by gradientArray function [_$_] + tmpPB2 <- computeSrcPic tmpPB (grdCnt-1) + tmpData2 <- (pixbufGetPixels tmpPB2) :: IO (PixbufData Int Word8) + + -- array to store x coord of removed pixels + coordArr <- newArray (0, (max width height)) 0 :: IO (ArrayType Int Int) [_$_] + [_$_] + let removeVPixel pixData x y w = do + --unsafeWrite pixData (0+x*chan+y*row) 255 + --unsafeWrite pixData (1+x*chan+y*row) 255 + --unsafeWrite pixData (2+x*chan+y*row) 255 + --store x-coord of removed pixel + unsafeWrite coordArr y x + arrmove pixData ((x+1)*chan+y*row) (x*chan+y*row) ((w-x-1)*chan) + return () [_$_] + [_$_] + let removeHPixel pixData x y h = do + --putStrLn("removeHPixel "++show x++" "++show y++" "++show h) + --store y-coord of removed pixel + unsafeWrite coordArr y x + --putStrLn("removeHPixel1.5 "++show x++" "++show y++" "++show h) + arrmoven pixData (y*chan+(x+1)*row) (y*chan+x*row) chan row (h-x-1) + --putStrLn("removeHPixel2 "++show x++" "++show y++" "++show h) + return () [_$_] + [_$_] + let removeVGrdPixel grdData x y w = do + arrmove grdData (x+1+y*width) (x+y*width) (w-x-1) + return () + [_$_] + let removeHGrdPixel grdData x y h = do + --putStrLn("removeHGrdPixel "++show x++" "++show y++" "++show h) + arrmoven grdData (y+(x+1)*width) (y+x*width) 1 width (h-x-1) + --putStrLn("removeHGrdPixel2 "++show x++" "++show y++" "++show h) + return () + [_$_] + let vPixIndex x y chan row = (x*chan)+(y*row) + let hPixIndex x y chan row = (y*chan)+(x*row) + + -- possibly it can be made shorted + let removeSeam pixIndex rmPixel rmGrdPixel seamArr grdArr x y w = do + rmPixel tmpData x y w + rmPixel tmpData2 x y w + rmGrdPixel grdArr x y w + unless (y == 0) $ do + v0 <- if x==0 then return 0x7fffffff else unsafeRead seamArr (pixIndex (x-1) y 1 width) + v1 <- unsafeRead seamArr (pixIndex x y 1 width) + v2 <- if x==(w-1) then return 0x7fffffff else unsafeRead seamArr (pixIndex (x+1) y 1 width) + let nextX | v0 < v1 && v0 < v2 = (x-1) + | v2 < v1 = (x+1) [_$_] + | True = x + removeSeam pixIndex rmPixel rmGrdPixel seamArr grdArr nextX (y-1) w + + -- possibly it can be update to be more general + let updateGradientArray pixIndex grdArr y w h = unless (y == -1) $ do + x <- unsafeRead coordArr y + unless (x == 0) $ do + g <- pixelGradient pixIndex tmpData2 row chan w h (x-1) y + unsafeWrite grdArr (pixIndex (x-1) y 1 width) g + unless (y == 0) $ do + g <- pixelGradient pixIndex tmpData2 row 1 w h (x-1) (y-1) + unsafeWrite grdArr (pixIndex (x-1) (y-1) 1 width) g + unless (y == (h-1)) $ do + g <- pixelGradient pixIndex tmpData2 row 1 w h (x-1) (y+1) + unsafeWrite grdArr (pixIndex (x-1) (y+1) 1 width) g + g <- pixelGradient pixIndex tmpData2 row 1 w h x y + unsafeWrite grdArr (pixIndex x y 1 width) g + unless (y == 0) $ do + g <- pixelGradient pixIndex tmpData2 row 1 w h x (y-1) + unsafeWrite grdArr (pixIndex x (y-1) 1 width) g + g <- pixelGradient pixIndex tmpData2 row 1 w h x (y+1) + unless (y == (h-1)) $ do + g <- pixelGradient pixIndex tmpData2 row 1 w h x (y+1) + unsafeWrite grdArr (pixIndex x (y+1) 1 width) g + updateGradientArray pixIndex grdArr (y-1) w h + return () + [_$_] + let findMinVal pixIndex seamArr w h = do + v <- unsafeRead seamArr (pixIndex 0 (h-1) 1 width) + xRef <- newIORef (v :: Int, 0 :: Int) + --let modifyState f = readIORef state >>= f >>= writeIORef state + doFromTo 1 (w-1) $ \x -> do + --putStrLn("findMinVal loop x: "++show x++" (h-1): "++show (h-1)) + v <- unsafeRead seamArr (pixIndex x (h-1) 1 width) + (mval, m) <- readIORef xRef + writeIORef xRef (if v < mval then (v, x) else (mval, m)) + (mval, m) <- readIORef xRef + [_$_] + putStrLn("w: " ++show w++ " minSeam: " ++ show mval ++ " at: "++show m) [_$_] + return m + + grdArr <- gradientArray tmpPB2 width height + [_$_] + let removeVSeam w = do + seamArr <- (computeVSeamArray grdArr width height w) + m <- findMinVal vPixIndex seamArr w (height-1) + removeSeam vPixIndex removeVPixel removeVGrdPixel seamArr grdArr m (height-1) w + updateGradientArray vPixIndex grdArr (height-1) w height + return () + + let removeHSeam h = do + seamArr <- (computeHSeamArray grdArr width height h) + m <- findMinVal hPixIndex seamArr h (width-1) + removeSeam hPixIndex removeHPixel removeHGrdPixel seamArr grdArr m (width-1) h + updateGradientArray hPixIndex grdArr (width-1) h width + return () + [_$_] + --let nextX | v0 < v1 && v0 < v2 = (x-1) + -- | v2 < v1 = (x+1) [_$_] + -- | True = x + [_$_] + let grdSeam w h | w > newWidth && h > newHeight = do + --putStrLn("grdSeam: "++show w++" "++show h) + vSeamArr <- (computeVSeamArray grdArr width height w) + mv <- findMinVal vPixIndex vSeamArr w (height-1) + hSeamArr <- (computeHSeamArray grdArr width height h) + mh <- findMinVal hPixIndex hSeamArr h (width-1) + if mv < mh + then do + removeSeam vPixIndex removeVPixel removeVGrdPixel vSeamArr grdArr mv (height-1) w + updateGradientArray vPixIndex grdArr (height-1) w height + grdSeam (w-1) h + else do + removeSeam hPixIndex removeHPixel removeHGrdPixel hSeamArr grdArr mh (width-1) h + updateGradientArray hPixIndex grdArr (width-1) h width + grdSeam w (h-1) + | w > newWidth = do + --putStrLn("grdSeam2: "++show w++" "++show h) + removeVSeam w + grdSeam (w-1) h + [_$_] + | h > newHeight = do + --putStrLn("grdSeam3: "++show w++" "++show h) + removeHSeam h + grdSeam w (h-1) + | True = do + return () + [_$_] + -- remove/add seams + --doFromToDown width (newWidth+1) $ \w -> do + -- removeVSeam w + [_$_] + --doFromToDown height (newHeight+1) $ \h -> do + -- removeHSeam h + [_$_] + grdSeam width height + [_$_] + [_$_] + doFromTo 0 (newHeight-1) $ \y -> do + arrmovesd tmpData pbnData (y*row) (y*newRow) newRow + [_$_] + return pbn + +-- compute the gradient map +gradientPixbuf :: Pixbuf -> IO Pixbuf +gradientPixbuf pb = do + width <- pixbufGetWidth pb + height <- pixbufGetHeight pb + row <- pixbufGetRowstride pb + chan <- pixbufGetNChannels pb + bits <- pixbufGetBitsPerSample pb + pbData <- (pixbufGetPixels pb :: IO (PixbufData Int Word8)) + pbn <- pixbufNew ColorspaceRgb False 8 width height + pbnData <- (pixbufGetPixels pbn :: IO (PixbufData Int Word8)) + putStrLn ("bytes per row: "++show row++", channels per pixel: "++show chan++", bits per sample: "++show bits) + putStrLn ("width: "++show width++", height: "++show height) +[_^I_][_$_] + let getpix x y c = do + case (x < 1 || x >= width || y < 1 || y >= height) of + True -> return 0 + False -> (unsafeRead pbData (c+x*chan+y*row)) + [_$_] + let gradient x y c = do + let convM = liftM fromIntegral + blah a b = convM (getpix a b c) + v00 <- blah (x-1) (y-1) + v10 <- blah x (y-1) + v20 <- blah (x+1) (y-1) + v01 <- blah (x-1) y + v21 <- blah (x+1) y + v02 <- blah (x-1) (y+1) + v12 <- blah x (y+1) + v22 <- blah (x+1) (y+1) + [_$_] + let gx = abs ((v20-v00)+2*(v21-v01)+(v22-v02)) + let gy = abs ((v02-v00)+2*(v12-v10)+(v22-v20)) + let g = (gx + gy)::Int + --let g8 = (shiftR g 3) + let g8 = if g > 255 then 255 else g + return (fromIntegral(g8) :: Word8) + + let totalGradient x y = do + rg <- gradient x y 0 + gg <- gradient x y 1 + bg <- gradient x y 2 + let g = rg + gg + bg + return ((fromIntegral g)::Word8) + [_$_] + + doFromTo 0 (height-1) $ \y -> do + let offY = y*row + doFromTo 0 (width-1) $ \x -> do + let offX = x*chan + doFromTo 0 2 $ \c -> do + let off = offY+offX + c + --putStrLn ("x: "++show x++", y: "++show y++" off:"++show off) + --v <- (totalGradient x y) + v <- (gradient x y c) + unsafeWrite pbnData (off) v + return pbn + +-- compute gradient fo single pixel +{-# INLINE pixelGradient #-} +pixelGradient :: (Int -> Int -> Int -> Int -> Int) -> (PixbufData Int Word8) -> Int -> Int -> Int -> Int -> Int -> Int -> (IO Word16) +pixelGradient pixIndex pbData row chan w h x y = do +[_^I_][_$_] + let getpix x y c = do + case (x < 0 || x >= w || y < 0 || y >= h) of + True -> return 0 + False -> (unsafeRead pbData (c+(pixIndex x y chan row))) + --False -> (unsafeRead pbData (c+x*chan+y*row)) + + let gradient x y c = do + let convM = liftM fromIntegral + blah a b = convM (getpix a b c) + v00 <- blah (x-1) (y-1) + v10 <- blah x (y-1) + v20 <- blah (x+1) (y-1) + v01 <- blah (x-1) y + v21 <- blah (x+1) y + v02 <- blah (x-1) (y+1) + v12 <- blah x (y+1) + v22 <- blah (x+1) (y+1) + [_$_] + let gx = abs ((v20-v00)+2*(v21-v01)+(v22-v02)) + let gy = abs ((v02-v00)+2*(v12-v10)+(v22-v20)) + let g = (gx + gy)::Int + --let g8 = (shiftR g 3) + let g8 = if g > 255 then 255 else g + return (fromIntegral(g8) :: Word8) + [_$_] + [_$_] + let gradient x y c = do + let convM = liftM fromIntegral + blah a b = convM (getpix a b c) + v00 <- blah (x-1) (y-1) + v10 <- blah x (y-1) + v20 <- blah (x+1) (y-1) + v01 <- blah (x-1) y + v21 <- blah (x+1) y + v02 <- blah (x-1) (y+1) + v12 <- blah x (y+1) + v22 <- blah (x+1) (y+1) + let gx = abs ((v20-v00)+2*(v21-v01)+(v22-v02)) + let gy = abs ((v02-v00)+2*(v12-v10)+(v22-v20)) + let g = gx + gy + return (g :: Int) + + rg <- gradient x y 0 + gg <- gradient x y 1 + bg <- gradient x y 2 + let g = rg + gg + bg + return ((fromIntegral g) :: Word16) + + [_$_] +-- compute the gradient map +gradientArray :: Pixbuf -> Int -> Int -> IO (ArrayType Int Word16) +gradientArray pb w h = do + width <- pixbufGetWidth pb + height <- pixbufGetHeight pb + row <- pixbufGetRowstride pb + chan <- pixbufGetNChannels pb + bits <- pixbufGetBitsPerSample pb + pbData <- (pixbufGetPixels pb :: IO (PixbufData Int Word8)) + grdArr <- newArray (0, width * height) 0 + putStrLn ("bytes per row: "++show row++", channels per pixel: "++show chan++", bits per sample: "++show bits) + putStrLn ("width: "++show width++", height: "++show height) + + let vPixIndex x y chan row = x*chan+y*row + [_$_] + doFromTo 0 (h-1) $ \y -> do + let offY = y*width + doFromTo 0 (w-1) $ \x -> do + let off = x + offY + --v <- (totalGradient x y) + v <- (pixelGradient vPixIndex pbData row chan w h x y) + unsafeWrite grdArr (off) v + --putStrLn ("x: "++show x++" y: "++show y++" v: "++show v) + return grdArr + +computeVSeamArray :: (ArrayType Int Word16) -> Int -> Int -> Int -> IO (ArrayType Int Int) +computeVSeamArray grdArr width height currentWidth = do + [_$_] + seamArr <- newArray (0, width * height) 0 + --grdArr <- gradientArr + [_$_] + doFromTo 0 (currentWidth-1) $ \x -> do + v <- unsafeRead grdArr x + unsafeWrite seamArr x (fromIntegral v :: Int) + [_$_] + doFromTo 1 (height-1) $ \y -> do + let offY = y*width + let prevOffY = offY-width + doFromTo 1 (currentWidth-2) $ \x -> do + p1 <- unsafeRead seamArr ((x-1)+prevOffY) + p2 <- unsafeRead seamArr (x+prevOffY) + p3 <- unsafeRead seamArr ((x+1)+prevOffY) + v <- unsafeRead grdArr (x+offY) + unsafeWrite seamArr (x+offY) ((fromIntegral v :: Int) +(min(min p1 p2) p3)) + p2l <- unsafeRead seamArr (0+prevOffY) + p3l <- unsafeRead seamArr (1+prevOffY) + vl <- unsafeRead grdArr (0+offY) + unsafeWrite seamArr (0+offY) ((fromIntegral vl)+(min p2l p3l)) + p1r <- unsafeRead seamArr (currentWidth-2+prevOffY) + p2r <- unsafeRead seamArr (currentWidth-1+prevOffY) + vr <- unsafeRead grdArr (currentWidth-1+offY) + unsafeWrite seamArr (currentWidth-1+offY) ((fromIntegral vr :: Int) +(min p1r p2r)) + [_$_] + return seamArr + +computeHSeamArray :: (ArrayType Int Word16) -> Int -> Int -> Int -> IO (ArrayType Int Int) +computeHSeamArray grdArr width height currentHeight = do + [_$_] + seamArr <- newArray (0, width * height) 0 + --grdArr <- gradientArr + [_$_] + doFromTo 0 (currentHeight-1) $ \y -> do + v <- unsafeRead grdArr (y*width) + unsafeWrite seamArr (y*width) (fromIntegral v :: Int) + [_$_] + doFromTo 1 (width-1) $ \x -> do + doFromTo 1 (currentHeight-2) $ \y -> do + let offY = y*width + let prevOffY = offY-width + let nextOffY = offY+width + p1 <- unsafeRead seamArr (x-1+prevOffY) + p2 <- unsafeRead seamArr (x-1+offY) + p3 <- unsafeRead seamArr (x-1+nextOffY) + v <- unsafeRead grdArr (x+offY) + unsafeWrite seamArr (x+offY) ((fromIntegral v :: Int) +(min(min p1 p2) p3)) + p2l <- unsafeRead seamArr (x-1+0) + p3l <- unsafeRead seamArr (x-1+width) + vl <- unsafeRead grdArr (x+0) + unsafeWrite seamArr (x+0) ((fromIntegral vl)+(min p2l p3l)) + p1r <- unsafeRead seamArr (x-1+((currentHeight-2)*width)) + p2r <- unsafeRead seamArr (x-1+((currentHeight-1)*width)) + vr <- unsafeRead grdArr (x+((currentHeight-1)*width)) + unsafeWrite seamArr (x+((currentHeight-1)*width)) ((fromIntegral vr :: Int) +(min p1r p2r)) + [_$_] + return seamArr addfile ./demo/scaling/Stones.jpg binary ./demo/scaling/Stones.jpg addfile ./demo/scaling/scaling.glade hunk ./demo/scaling/scaling.glade 1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> +<!--Generated with glade3 3.0.2 on Sun Dec 14 03:54:14 2008 by btronic@EVO8--> +<glade-interface> + <widget class="GtkDialog" id="dialogScale"> + <property name="border_width">5</property> + <property name="title" translatable="yes">Scale</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="has_separator">False</property> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox2"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> + <property name="spacing">2</property> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Width:</property> + </widget> + </child> + <child> + <widget class="GtkEntry" id="entryScalingWidth"> + <property name="visible">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Height:</property> + </widget> + </child> + <child> + <widget class="GtkEntry" id="entryScalingHeight"> + <property name="visible">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">3</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area2"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + </widget> + </child> + </widget> + <widget class="GtkDialog" id="dialogSeamCarve"> + <property name="border_width">5</property> + <property name="title" translatable="yes">Seam Carve</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="has_separator">False</property> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox3"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> + <property name="spacing">2</property> + <child> + <widget class="GtkHBox" id="hbox5"> + <property name="visible">True</property> + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes">Gradient Count:</property> + <property name="width_chars">16</property> + </widget> + </child> + <child> + <widget class="GtkEntry" id="entryGrdCnt"> + <property name="visible">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="hbox1"> + <property name="visible">True</property> + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes">Width:</property> + <property name="width_chars">16</property> + </widget> + </child> + <child> + <widget class="GtkEntry" id="entryWidth"> + <property name="visible">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="hbox4"> + <property name="visible">True</property> + <child> + <widget class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="label" translatable="yes">Height:</property> + <property name="width_chars">16</property> + </widget> + </child> + <child> + <widget class="GtkEntry" id="entryHeight"> + <property name="visible">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">3</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area3"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + </widget> + </child> + </widget> +</glade-interface> |
From: Axel S. <si...@co...> - 2009-02-01 22:28:46
|
Sun Feb 1 16:55:14 EST 2009 Axe...@en... * Add another function to the simple text API for combo boxes. Correct documentation. Due to Peter Hercek. hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 85 + comboBoxGetActiveText, hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 170 - listStoreInsert, listStorePrepend, listStoreAppend, listStoreRemove ) + listStoreInsert, listStorePrepend, listStoreAppend, listStoreRemove, + listStoreGetValue ) hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 220 --- widget that contains only strings. This model is also returned when calling --- 'comboBoxGetModel'. Note that only the functions 'comboBoxAppendText', --- 'comboBoxInsertText', 'comboBoxPrependText' and 'comboBoxRemoveText' should --- be called on this widget once 'comboBoxSetModelText' is called. Any --- exisiting model or renderers are removed before setting the new text model. +-- widget and sets the model to the list store. The widget can contain only +-- strings. The model can be retrieved with 'comboBoxGetModel'. The list +-- store can be retrieved with 'comboBoxGetModelText'. +-- Any exisiting model or renderers are removed before setting the new text +-- model. +-- Note that the functions 'comboBoxAppendText', 'comboBoxInsertText', +-- 'comboBoxPrependText', 'comboBoxRemoveText' and 'comboBoxGetActiveText' +-- can be called on a combo box only once 'comboBoxSetModelText' is called. hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 291 - +-- | Returns the currently active string in @comboBox@ or @Nothing@ if none is +-- selected. Note that you can only use this function with combo boxes +-- constructed with 'comboBoxNewText'. +-- +comboBoxGetActiveText :: ComboBoxClass self => self -> IO (Maybe String) +comboBoxGetActiveText self = do + activeId <- comboBoxGetActive self + if activeId < 0 + then return Nothing + else do + listStore <- comboBoxGetModelText self + value <- listStoreGetValue listStore activeId + return $ Just value hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 148 --- This function stores a --- 'Graphics.UI.Gtk.ModelView.ListStore' with the widget that contains only --- strings. This model is also returned when calling 'comboBoxGetModel'. Note --- that only the functions 'comboBoxAppendText', 'comboBoxInsertText', --- 'comboBoxPrependText' and 'comboBoxRemoveText' should be called on this --- widget once 'comboBoxSetModelText' is called. Any exisiting model or --- renderers are removed before setting the new text model. In order to --- respond to new texts that the user enters, it is necessary to connect to --- the 'Graphics.UI.Gtk.Entry.Entry.entryActivate' signal of the contained --- 'Graphics.UI.Gtk.Entry.Entry.Entry' an insert the text into the text model --- which can be retrieved with +-- This function stores a 'Graphics.UI.Gtk.ModelView.ListStore' with the +-- widget and sets the model to the list store. The widget can contain only +-- strings. The model can be retrieved with 'comboBoxGetModel'. The list +-- store can be retrieved with 'comboBoxGetModelText'. +-- Any exisiting model or renderers are removed before setting the new text +-- model. +-- In order to respond to new texts that the user enters, it is necessary to +-- connect to the 'Graphics.UI.Gtk.Entry.Entry.entryActivate' signal of the +-- contained 'Graphics.UI.Gtk.Entry.Entry.Entry' an insert the text into the +-- text model which can be retrieved with hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 159 +-- Note that the functions 'comboBoxAppendText', 'comboBoxInsertText', +-- 'comboBoxPrependText', 'comboBoxRemoveText' and 'comboBoxGetActiveText' +-- can be called on a combo box only once 'comboBoxEntrySetModelText' is +-- called. |
From: Axel S. <si...@co...> - 2009-02-01 13:45:51
|
Sun Feb 1 08:43:39 EST 2009 Axel Simon <Axe...@en...> * Resurrect the simple text API for ComboBox and ComboBoxEntry. Adapt the demo. Include demo in 'make installcheck'. hunk ./Makefile.am 2877 - demo/graphic demo/unicode demo/soe + demo/graphic demo/unicode demo/soe demo/menu hunk ./demo/menu/ComboDemo.hs 16 - (combo, store) <- - comboBoxEntryNewText id (words "ice-cream turkey pasta sandwich steak") + combo <- comboBoxEntryNewText + mapM_ (comboBoxAppendText combo) + (words "ice-cream turkey pasta sandwich steak") + hunk ./demo/menu/ComboDemo.hs 31 + store <- comboBoxGetModelText combo hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 77 + +-- ** Simple Text API + comboBoxSetModelText, + comboBoxGetModelText, + comboBoxAppendText, + comboBoxInsertText, + comboBoxPrependText, + comboBoxRemoveText, + +-- ** Standard API hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 158 - mkFunPtrDestroyNotify) + mkFunPtrDestroyNotify, + Quark, objectSetAttribute, objectGetAttributeUnsafe ) hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 163 - receiveTreeIter) + receiveTreeIter, + comboQuark) hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 168 -import Graphics.UI.Gtk.ModelView.ListStore ( ListStore, listStoreNew ) +import Graphics.UI.Gtk.ModelView.ListStore ( ListStore, listStoreNew, + listStoreInsert, listStorePrepend, listStoreAppend, listStoreRemove ) hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 171 - cellLayoutPackStart ) + cellLayoutPackStart, cellLayoutClear ) hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 188 --- | Convenience function which constructs a new text combo box, which is a --- 'ComboBox' just displaying strings. If you use this function to create a --- text combo box, you can supply the @id@ function as first argument. In this --- case 'comboBoxNewText' will return a @'Graphics.UI.Gtk.ModelView.ListStore' --- String@ containing the initial list of strings. +-- | Convenience function which constructs a new text combo box that is a +-- 'ComboBox' just displaying strings. This function internally calls +-- 'comboBoxSetModelText' after creating a new combo box. hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 192 -comboBoxNewText :: - (a -> String) -- ^ a function to extract elements from a the store - -> [a] -- ^ the initial contents of the store - -> IO (ComboBox, ListStore a) -- the resulting combo box and the store -comboBoxNewText extract initial = do - store <- listStoreNew initial - combo <- comboBoxNewWithModel store - ren <- cellRendererTextNew - cellLayoutPackStart combo ren True - cellLayoutSetAttributes combo ren store (\a -> [cellText := extract a]) - return (combo, store) +comboBoxNewText :: IO ComboBox +comboBoxNewText = do + combo <- comboBoxNew + comboBoxSetModelText combo + return combo hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 213 +-- the text API + +-- | Create a combo box that holds strings. +-- +-- This function stores a 'Graphics.UI.Gtk.ModelView.ListStore' with the +-- widget that contains only strings. This model is also returned when calling +-- 'comboBoxGetModel'. Note that only the functions 'comboBoxAppendText', +-- 'comboBoxInsertText', 'comboBoxPrependText' and 'comboBoxRemoveText' should +-- be called on this widget once 'comboBoxSetModelText' is called. Any +-- exisiting model or renderers are removed before setting the new text model. +-- +comboBoxSetModelText :: ComboBoxClass self => self -> IO (ListStore String) +comboBoxSetModelText combo = do + cellLayoutClear (toComboBox combo) + store <- listStoreNew ([] :: [String]) + comboBoxSetModel combo (Just store) + ren <- cellRendererTextNew + cellLayoutPackStart (toComboBox combo) ren True + cellLayoutSetAttributes (toComboBox combo) ren store (\a -> [cellText := a]) + objectSetAttribute comboQuark combo (Just store) + return store + +-- | Retrieve the model that was created with 'comboBoxSetModelText'. +-- +comboBoxGetModelText :: ComboBoxClass self => self -> IO (ListStore String) +comboBoxGetModelText self = do + (Just store) <- objectGetAttributeUnsafe comboQuark (toComboBox self) + return store + +-- %hash c:7228 d:5c35 +-- | Appends @string@ to the list of strings stored in @comboBox@. Note that +-- you can only use this function with combo boxes constructed with +-- 'comboBoxNewText'. Returns the index of the appended text. +-- +comboBoxAppendText :: ComboBoxClass self => self -> String -> IO Int +comboBoxAppendText self text = do + store <- comboBoxGetModelText self + listStoreAppend store text + [_$_] +-- %hash c:41de d:8ab0 +-- | Inserts @string@ at @position@ in the list of strings stored in +-- @comboBox@. Note that you can only use this function with combo boxes +-- constructed with 'comboBoxNewText'. +-- +comboBoxInsertText :: ComboBoxClass self => self + -> Int -- ^ @position@ - An index to insert @text@. + -> String -- ^ @text@ - A string. + -> IO () +comboBoxInsertText self position text = do + store <- comboBoxGetModelText self + listStoreInsert store position text + [_$_] +-- %hash c:98ea d:9fab +-- | Prepends @string@ to the list of strings stored in @comboBox@. Note that +-- you can only use this function with combo boxes constructed with +-- 'comboBoxNewText'. +-- +comboBoxPrependText :: ComboBoxClass self => self -> String -> IO () +comboBoxPrependText self text = do + store <- comboBoxGetModelText self + listStorePrepend store text + +-- %hash c:7ff6 d:ffbf +-- | Removes the string at @position@ from @comboBox@. Note that you can only +-- use this function with combo boxes constructed with 'comboBoxNewText'. +-- +comboBoxRemoveText :: ComboBoxClass self => self + -> Int -- ^ @position@ - Index of the item to remove. + -> IO () +comboBoxRemoveText self position = do + store <- comboBoxGetModelText self + listStoreRemove store position + + + hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 73 - comboBoxEntryNewWithModel, hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 74 + comboBoxEntryNewWithModel, hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 77 + comboBoxEntrySetModelText, + hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 121 +-- | Creates a new 'ComboBoxEntry' with a store containing strings. +-- See 'comboBoxEntrySetModelText'. +-- +comboBoxEntryNewText :: IO ComboBoxEntry +comboBoxEntryNewText = do + combo <- comboBoxEntryNew + comboBoxEntrySetModelText combo + return combo + [_$_] hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 143 --- | Convenience function which constructs a new editable text combo box, --- which is a 'ComboBoxEntry' just displaying strings. Note that this --- function does not setup any functionality to insert newly typed --- text into the model. See the module introduction for information --- about this. --- -comboBoxEntryNewText :: - (a -> String) -- ^ a function to extract elements from a the store - -> [a] -- ^ the initial entries in the 'ComboBoxEntry' - -> IO (ComboBoxEntry, ListStore a) -comboBoxEntryNewText extract initial = do - store <- listStoreNew initial - let colId = makeColumnIdString 0 - customStoreSetColumn store colId extract - combo <- makeNewObject mkComboBoxEntry $ - liftM (castPtr :: Ptr Widget -> Ptr ComboBoxEntry) $ - {# call gtk_combo_box_entry_new_with_model #} - (toTreeModel store) - (fromIntegral (columnIdToNumber colId)) - return (combo, store) - hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 146 +-- | Set a model box that holds strings. +-- +-- This function stores a +-- 'Graphics.UI.Gtk.ModelView.ListStore' with the widget that contains only +-- strings. This model is also returned when calling 'comboBoxGetModel'. Note +-- that only the functions 'comboBoxAppendText', 'comboBoxInsertText', +-- 'comboBoxPrependText' and 'comboBoxRemoveText' should be called on this +-- widget once 'comboBoxSetModelText' is called. Any exisiting model or +-- renderers are removed before setting the new text model. In order to +-- respond to new texts that the user enters, it is necessary to connect to +-- the 'Graphics.UI.Gtk.Entry.Entry.entryActivate' signal of the contained +-- 'Graphics.UI.Gtk.Entry.Entry.Entry' an insert the text into the text model +-- which can be retrieved with +-- 'Graphics.UI.Gtk.MenuComboToolbar.ComboBox.comboBoxGetModelText'. +-- +comboBoxEntrySetModelText :: ComboBoxEntryClass self => self -> + IO (ListStore String) +comboBoxEntrySetModelText combo = do + store <- listStoreNew ([] :: [String]) + comboBoxSetModel combo (Just store) + let colId = makeColumnIdString 0 + customStoreSetColumn store colId id + comboBoxEntrySetTextColumn (toComboBoxEntry combo) colId + objectSetAttribute comboQuark (toComboBoxEntry combo) (Just store) + return store + hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 58 - ColumnId(..), [_$_] + ColumnId(..), + [_$_] + -- Storing the model in a ComboBox + comboQuark, [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 68 +import System.Glib.GObject (Quark, quarkFromString) hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 251 +-- it shouldn't matter if the following function is actually inlined +{-# NOINLINE comboQuark #-} [_$_] +comboQuark :: Quark +comboQuark = + unsafePerformIO $ quarkFromString "comboBoxHaskellStringModelQuark" + [_$_] |
From: Axel S. <si...@co...> - 2009-02-01 13:45:47
|
Sun Feb 1 08:40:46 EST 2009 Axel Simon <Axe...@en...> * Don't use Word64 in printf as it makes ghc 6.6 fail. hunk ./demo/gstreamer/VorbisPlay.hs 76 - printf "%10d / %10d\r" (position' `div` Gst.second) (duration' `div` Gst.second) + printf "%10d / %10d\r" [_$_] + (fromIntegral (position' `div` Gst.second)::Integer) + (fromIntegral (duration' `div` Gst.second)::Integer) |
From: Axel S. <si...@co...> - 2009-01-31 11:24:17
|
Sat Jan 31 06:17:35 EST 2009 Axel Simon <Axe...@en...> * Make functions in Cairo runnable in both, Render and IO monad. Add a function to set font options. hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 134 + , setFontOptions hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 992 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 998 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1014 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1021 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1039 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1042 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1048 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1050 - -> Render Matrix + -> m Matrix hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1056 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1059 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1065 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1067 - -> Render Extend + -> m Extend hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1073 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1076 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1082 + MonadIO m => hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1084 - -> Render Filter + -> m Filter hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1229 +-- | Sets a set of custom font rendering options. Rendering options are +-- derived by merging these options with the options derived from underlying +-- surface; if the value in @options@ has a default value (like +-- 'AntialiasDefault'), then the value from the surface is used. +-- +setFontOptions :: FontOptions -> Render () +setFontOptions = liftRender1 Internal.setFontOptions +[_^I_][_$_] hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1289 -fontOptionsCreate :: Render FontOptions +fontOptionsCreate :: MonadIO m => m FontOptions hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1295 + MonadIO m => [_$_] hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1297 - -> Render FontOptions + -> m FontOptions hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1305 + MonadIO m => [_$_] hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1308 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1314 -fontOptionsHash :: FontOptions -> Render Int +fontOptionsHash :: MonadIO m => FontOptions -> m Int hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1319 -fontOptionsEqual :: FontOptions -> FontOptions -> Render Bool +fontOptionsEqual :: MonadIO m => FontOptions -> FontOptions -> m Bool hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1325 -fontOptionsSetAntialias :: FontOptions -> Antialias -> Render () +fontOptionsSetAntialias :: MonadIO m => FontOptions -> Antialias -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1330 -fontOptionsGetAntialias :: FontOptions -> Render Antialias +fontOptionsGetAntialias :: MonadIO m => FontOptions -> m Antialias hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1338 -fontOptionsSetSubpixelOrder :: FontOptions -> SubpixelOrder-> Render () +fontOptionsSetSubpixelOrder :: MonadIO m => FontOptions -> SubpixelOrder-> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1344 -fontOptionsGetSubpixelOrder :: FontOptions -> Render SubpixelOrder +fontOptionsGetSubpixelOrder :: MonadIO m => FontOptions -> m SubpixelOrder hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1352 -fontOptionsSetHintStyle :: FontOptions -> HintStyle -> Render () +fontOptionsSetHintStyle :: MonadIO m => FontOptions -> HintStyle -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1358 -fontOptionsGetHintStyle :: FontOptions -> Render HintStyle +fontOptionsGetHintStyle :: MonadIO m => FontOptions -> m HintStyle hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1365 -fontOptionsSetHintMetrics :: FontOptions -> HintMetrics -> Render () +fontOptionsSetHintMetrics :: MonadIO m => FontOptions -> HintMetrics -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1371 -fontOptionsGetHintMetrics :: FontOptions -> Render HintMetrics +fontOptionsGetHintMetrics :: MonadIO m => FontOptions -> m HintMetrics hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1462 -surfaceFinish :: (MonadIO m) => Surface -> m () +surfaceFinish :: MonadIO m => Surface -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1475 -surfaceFlush :: Surface -> Render () +surfaceFlush :: MonadIO m => Surface -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1493 -surfaceMarkDirty :: Surface -> Render () +surfaceMarkDirty :: MonadIO m => Surface -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1501 + MonadIO m => [_$_] hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1507 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1522 + MonadIO m => [_$_] hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1526 - -> Render () + -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1571 -imageSurfaceGetWidth :: Surface -> Render Int +imageSurfaceGetWidth :: MonadIO m => Surface -> m Int hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1576 -imageSurfaceGetHeight :: Surface -> Render Int +imageSurfaceGetHeight :: MonadIO m => Surface -> m Int hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1583 -imageSurfaceGetStride :: Surface -> Render Int +imageSurfaceGetStride :: MonadIO m => Surface -> m Int hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1634 -pdfSurfaceSetSize :: Surface -> Double -> Double -> Render () +pdfSurfaceSetSize :: MonadIO m => Surface -> Double -> Double -> m () hunk ./cairo/Graphics/Rendering/Cairo.hs.pp 1697 -psSurfaceSetSize :: Surface -> Double -> Double -> Render () +psSurfaceSetSize :: MonadIO m => Surface -> Double -> Double -> m () hunk ./cairo/Graphics/Rendering/Cairo/Internal/Drawing/Text.chs 29 +{#fun set_font_options as setFontOptions { unCairo `Cairo', withFontOptions* `FontOptions' } -> `()'#} |
From: Peter g. <pg...@co...> - 2009-01-28 17:54:23
|
Tue Jan 27 23:00:10 EST 2009 pg...@gm... * gio: fileMakeDirectoryWithParents only since glib 2.18.0 hunk ./gio/System/GIO/File.chs.pp 92 +#if GLIB_CHECK_VERSION(2,18,0) hunk ./gio/System/GIO/File.chs.pp 94 +#endif hunk ./gio/System/GIO/File.chs.pp 731 +#if GLIB_CHECK_VERSION(2,18,0) hunk ./gio/System/GIO/File.chs.pp 742 +#endif |
From: Peter g. <pg...@co...> - 2009-01-28 17:54:22
|
Tue Jan 27 23:00:07 EST 2009 pg...@gm... * gio: System/GIO/File.chs -> System/GIO/File.chs.pp move ./gio/System/GIO/File.chs ./gio/System/GIO/File.chs.pp hunk ./Makefile.am 459 - gio/System/GIO/File.chs \ + gio/System/GIO/File.chs.pp \ |
From: Peter g. <pg...@co...> - 2009-01-28 17:54:18
|
Sun Jan 25 15:59:28 EST 2009 Peter Gavin <pg...@gm...> * Makefile.am: clean up and add some dependencies hunk ./Makefile.am 298 -glib/libHSglib_a.deps : $(libHSglib_a_HSFILES) - hunk ./Makefile.am 379 +glib/libHSglib_a.deps: $(libHSglib_a_HSFILES) | \ + $(foreach pkg,$(libHSglib_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSglib_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,glib $(libHSglib_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 384 +$(libHSglib_a_OBJECTS) : \ + $(foreach pkg,$(libHSglib_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 448 -gio/libHSgio_a.deps : $(libHSgio_a_HSFILES) | glib/libHSglib_a.deps - hunk ./Makefile.am 497 -$(libHSgio_a_OBJECTS) : $(libHSglib_a_OBJECTS) hunk ./Makefile.am 534 +gio/libHSgio_a.deps: $(libHSgio_a_HSFILES) | \ + $(foreach pkg,$(libHSgio_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSgio_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,gio $(libHSgio_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 539 -$(libHSgio_a_CHSFILES:.chs=.dep) : \ - $(libHSgio_a_GENERATEDSOURCES) +$(libHSgio_a_OBJECTS) : \ + $(foreach pkg,$(libHSgio_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 598 -$(libHSgtk_a_PRECOMP): $(libHSgtk_a_HEADER) hunk ./Makefile.am 605 -gtk/libHSgtk_a.deps : $(libHSgtk_a_HSFILES) | glib/libHSglib_a.deps - hunk ./Makefile.am 607 -gtk/libHSgtk_a.deps : | cairo/libHScairo_a.deps hunk ./Makefile.am 911 -$(libHSgtk_a_OBJECTS) : $(libHSgtk_a_objects_deps) hunk ./Makefile.am 946 -$(libHSgtk_a_CHSFILES_HS): $(libHSgtk_a_PRECOMP) -$(libHSgtk_a_CHSFILES:.chs=.dep) : $(libHSgtk_a_GENERATEDSOURCES) +$(libHSgtk_a_PRECOMP): $(libHSgtk_a_HEADER) +gtk/libHSgtk_a.deps: $(libHSgtk_a_HSFILES) | \ + $(foreach pkg,$(libHSgtk_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSgtk_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,gtk $(libHSgtk_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) +$(libHSgtk_a_CHSFILES_HS): $(libHSgtk_a_PRECOMP) $(libHSgtk_a_HEADER) +$(libHSgtk_a_HSCFILES_HS): $(libHSgtk_a_HEADER) +$(libHSgtk_a_OBJECTS) : \ + $(foreach pkg,$(libHSgtk_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1016 -glade/libHSglade_a.deps : $(libHSglade_a_HSFILES) | gtk/libHSgtk_a.deps - hunk ./Makefile.am 1042 -$(libHSglade_a_OBJECTS) : $(libHSglib_a_OBJECTS) $(libHSgtk_a_OBJECTS) hunk ./Makefile.am 1072 +glade/libHSglade_a.deps: $(libHSglade_a_HSFILES) | \ + $(foreach pkg,$(libHSglade_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSglade_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,glade $(libHSglib_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 1077 -$(libHSglade_a_CHSFILES:.chs=.dep) : \ - $(libHSgtk_a_GENERATEDSOURCES) \ - $(libHSglade_a_GENERATEDSOURCES) +$(libHSglade_a_OBJECTS) : \ + $(foreach pkg,$(libHSglade_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1144 -gconf/libHSgconf_a.deps : $(libHSgconf_a_HSFILES) | glib/libHSglib_a.deps - hunk ./Makefile.am 1188 -$(libHSgconf_a_OBJECTS) : $(libHSglib_a_OBJECTS) hunk ./Makefile.am 1222 +gconf/libHSgconf_a.deps: $(libHSgconf_a_HSFILES) | \ + $(foreach pkg,$(libHSgconf_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSgconf_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,gconf $(libHSgconf_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 1227 -$(libHSgconf_a_CHSFILES:.chs=.dep) : \ - $(libHSgconf_a_GENERATEDSOURCES) +$(libHSgconf_a_OBJECTS) : \ + $(foreach pkg,$(libHSgconf_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1289 -sourceview/libHSsourceview_a.deps : $(libHSsourceview_a_HSFILES) | gtk/libHSgtk_a.deps - hunk ./Makefile.am 1326 -$(libHSsourceview_a_OBJECTS) : $(libHSglib_a_OBJECTS) $(libHSgtk_a_OBJECTS) hunk ./Makefile.am 1356 +sourceview/libHSsourceview_a.deps: $(libHSsourceview_a_HSFILES) | \ + $(foreach pkg,$(libHSsourceview_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSsourceview_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,sourceview $(libHSsourceview_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 1361 -$(libHSsourceview_a_CHSFILES:.chs=.dep) : \ - $(libHSgtk_a_GENERATEDSOURCES) \ - $(libHSsourceview_a_GENERATEDSOURCES) +$(libHSsourceview_a_OBJECTS) : \ + $(foreach pkg,$(libHSsourceview_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1423 -gtksourceview2/libHSgtksourceview2_a.deps : $(libHSgtksourceview2_a_HSFILES) | gtk/libHSgtk_a.deps - hunk ./Makefile.am 1476 -$(libHSgtksourceview2_a_OBJECTS) : $(libHSglib_a_OBJECTS) $(libHSgtk_a_OBJECTS) hunk ./Makefile.am 1506 +gtksourceview2/libHSgtksourceview2_a.deps: $(libHSgtksourceview2_a_HSFILES) | \ + $(foreach pkg,$(libHSgtksourceview2_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSgtksourceview2_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,gtksourceview2 $(libHSgtksourceview2_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 1511 -$(libHSgtksourceview2_a_CHSFILES:.chs=.dep) : \ - $(libHSgtk_a_GENERATEDSOURCES) \ - $(libHSgtksourceview2_a_GENERATEDSOURCES) +$(libHSgtksourceview2_a_OBJECTS) : \ + $(foreach pkg,$(libHSgtksourceview2_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1573 -mozembed/libHSmozembed_a.deps : $(libHSmozembed_a_HSFILES) | gtk/libHSgtk_a.deps - hunk ./Makefile.am 1599 -$(libHSmozembed_a_OBJECTS) : $(libHSglib_a_OBJECTS) $(libHSgtk_a_OBJECTS) hunk ./Makefile.am 1628 +mozembed/libHSmozembed_a.deps: $(libHSmozembed_a_HSFILES) | \ + $(foreach pkg,$(libHSmozembed_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSmozembed_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,mozembed $(libHSmozembed_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 1633 -$(libHSmozembed_a_CHSFILES:.chs=.dep) : \ - $(libHSgtk_a_GENERATEDSOURCES) \ - $(libHSmozembed_a_GENERATEDSOURCES) +$(libHSmozembed_a_OBJECTS) : \ + $(foreach pkg,$(libHSmozembed_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1698 -cairo/libHScairo_a.deps: $(libHScairo_a_HSFILES) | glib/libHSglib_a.deps - hunk ./Makefile.am 1744 -$(libHScairo_a_OBJECTS) : $(libHSglib_a_OBJECTS) hunk ./Makefile.am 1774 -$(libHScairo_a_CHSFILES_HS): $(libHScairo_a_PRECOMP) +$(libHScairo_a_PRECOMP): $(libHScairo_a_HEADER) +cairo/libHScairo_a.deps: $(libHScairo_a_HSFILES) | \ + $(foreach pkg,$(libHScairo_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHScairo_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,cairo $(libHScairo_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) +$(libHScairo_a_CHSFILES_HS): $(libHScairo_a_PRECOMP) $(libHScairo_a_HEADER) +$(libHScairo_a_HSCFILES_HS): $(libHScairo_a_HEADER) +$(libHScairo_a_OBJECTS) : \ + $(foreach pkg,$(libHScairo_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1843 -svgcairo/libHSsvgcairo_a.deps: $(libHSsvgcairo_a_HSFILES) | cairo/libHScairo_a.deps - hunk ./Makefile.am 1854 -$(libHSsvgcairo_a_OBJECTS) : $(libHSglib_a_OBJECTS) $(libHScairo_a_OBJECTS) hunk ./Makefile.am 1884 -$(libHSsvgcairo_a_CHSFILES_HS): $(libHSsvgcairo_a_PRECOMP) +$(libHSsvgcairo_a_PRECOMP): $(libHSsvgcairo_a_HEADER) +svgcairo/libHSsvgcairo_a.deps: $(libHSsvgcairo_a_HSFILES) | \ + $(foreach pkg,$(libHSsvgcairo_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSsvgcairo_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,svgcairo $(libHSsvgcairo_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) +$(libHSsvgcairo_a_CHSFILES_HS): $(libHSsvgcairo_a_PRECOMP) $(libHSsvgcairo_a_HEADER) +$(libHSsvgcairo_a_HSCFILES_HS): $(libHSsvgcairo_a_HEADER) +$(libHSsvgcairo_a_OBJECTS) : \ + $(foreach pkg,$(libHSsvgcairo_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 1953 -gtkglext/libHSgtkglext_a.deps : $(libHSgtkglext_a_HSFILES) | gtk/libHSgtk_a.deps - hunk ./Makefile.am 1986 -$(libHSgtkglext_a_OBJECTS) : $(libHSglib_a_OBJECTS) $(libHSgtk_a_OBJECTS) hunk ./Makefile.am 2016 +gtkglext/libHSgtkglext_a.deps: $(libHSgtkglext_a_HSFILES) | \ + $(foreach pkg,$(libHSgtkglext_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSgtkglext_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,gtkglext $(libHSgtkglext_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) hunk ./Makefile.am 2021 -$(libHSgtkglext_a_CHSFILES:.chs=.dep) : \ - $(libHSgtk_a_GENERATEDSOURCES) \ - $(libHSgtkglext_a_GENERATEDSOURCES) +$(libHSgtkglext_a_OBJECTS) : \ + $(foreach pkg,$(libHSgtkglext_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 2085 -soegtk/libHSsoegtk_a.deps : $(libHSsoegtk_a_HSFILES) | gtk/libHSgtk_a.deps - hunk ./Makefile.am 2088 -gtk/libHSsoegtk_a.deps : cairo/libHScairo_a.deps hunk ./Makefile.am 2095 -$(libHSsoegtk_a_OBJECTS) : $(libHSglib_a_OBJECTS) $(libHSgtk_a_OBJECTS) hunk ./Makefile.am 2109 +soegtk/libHSsoegtk_a.deps : cairo/libHScairo_a.deps +$(libHSsoegtk_a_OBJECTS) : \ + $(foreach pkg,$(libHSsoegtk_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) + hunk ./Makefile.am 2167 -$(libHSgnomevfs_a_PRECOMP): $(libHSgnomevfs_a_HEADER) hunk ./Makefile.am 2187 -gnomevfs/libHSgnomevfs_a.deps : $(libHSgnomevfs_a_HSFILES) glib/libHSglib_a.deps - hunk ./Makefile.am 2251 -$(libHSgnomevfs_a_OBJECTS) : $(libHSglib_a_OBJECTS) hunk ./Makefile.am 2286 -$(libHSgnomevfs_a_CHSFILES_HS): $(libHSgnomevfs_a_PRECOMP) -$(libHSgnomevfs_a_CHSFILES:.chs=.dep) : \ - $(libHSgnomevfs_a_GENERATEDSOURCES) +$(libHSgnomevfs_a_PRECOMP): $(libHSgnomevfs_a_HEADER) +gnomevfs/libHSgnomevfs_a.deps: $(libHSgnomevfs_a_HSFILES) | \ + $(foreach pkg,$(libHSgnomevfs_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSgnomevfs_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,gnomevfs $(libHSgnomevfs_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) +$(libHSgnomevfs_a_CHSFILES_HS): $(libHSgnomevfs_a_PRECOMP) $(libHSgnomevfs_a_HEADER) +$(libHSgnomevfs_a_HSCFILES_HS): $(libHSgnomevfs_a_HEADER) +$(libHSgnomevfs_a_OBJECTS) : \ + $(foreach pkg,$(libHSgnomevfs_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) hunk ./Makefile.am 2352 -$(libHSgstreamer_a_PRECOMP): $(libHSgstreamer_a_HEADER) hunk ./Makefile.am 2369 -gstreamer/libHSgstreamer_a.deps : $(libHSgstreamer_a_HSFILES) | glib/libHSglib_a.deps - hunk ./Makefile.am 2557 -$(libHSgstreamer_a_OBJECTS) : $(libHSglib_a_OBJECTS) hunk ./Makefile.am 2592 -$(libHSgstreamer_a_CHSFILES_HS): $(libHSgstreamer_a_PRECOMP) -$(libHSgstreamer_a_CHSFILES:.chs=.dep) : \ - $(libHSgstreamer_a_GENERATEDSOURCES) +$(libHSgstreamer_a_PRECOMP): $(libHSgstreamer_a_HEADER) +gstreamer/libHSgstreamer_a.deps: $(libHSgstreamer_a_HSFILES) | \ + $(foreach pkg,$(libHSgstreamer_a_INTERNALDEPS),$(pkg)/libHS$(pkg)_a.deps) +$(libHSgstreamer_a_CHSFILES:.chs=.dep): \ + $(foreach pkg,gstreamer $(libHSgstreamer_a_INTERNALDEPS),$(libHS$(pkg)_a_CHSFILES)) +$(libHSgstreamer_a_CHSFILES_HS): $(libHSgstreamer_a_PRECOMP) $(libHSgstreamer_a_HEADER) +$(libHSgstreamer_a_HSCFILES_HS): $(libHSgstreamer_a_HEADER) +$(libHSgstreamer_a_OBJECTS) : \ + $(foreach pkg,$(libHSgstreamer_a_INTERNALDEPS),$(libHS$(pkg)_a_OBJECTS)) |
From: Peter g. <pg...@co...> - 2009-01-28 17:54:14
|
Sun Jan 25 15:12:35 EST 2009 Peter Gavin <pg...@gm...> * gtk: add gtk/hsgtk.h, define PANGO_CHECK_VERSION for versions that don't define it hunk ./Makefile.am 24 + gtk/hsgtk.h \ hunk ./Makefile.am 591 -libHSgtk_a_HEADER = gtk/gtk.h +libHSgtk_a_HEADER = gtk/hsgtk.h hunk ./Makefile.am 593 +$(libHSgtk_a_PRECOMP): $(libHSgtk_a_HEADER) hunk ./Makefile.am 597 -libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) +libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) -I. addfile ./gtk/hsgtk.h hunk ./gtk/hsgtk.h 1 +/* GIMP Toolkit (GTK) Binding for Haskell: binding to gtk + * + * Author : Peter Gavin + * Created: 25-Jan-2009 + * + * Copyright (c) 2009 Peter Gavin + * + * This library is free software: you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * [_$_] + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * [_$_] + * You should have received a copy of the GNU Lesser General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * [_$_] + * GStreamer, the C library which this Haskell library depends on, is + * available under LGPL Version 2. The documentation included with + * this library is based on the original GStreamer documentation. + */ +#ifndef __HSGTK_H__ +#define __HSGTK_H__ + +#include <gtk/gtk.h> +#include <pango/pango.h> + +#if ((_PANGO_MAJOR_VERSION < 1) || \ + ((_PANGO_MAJOR_VERSION == 1) && (_PANGO_MINOR_VERSION < 16)) || \ + ((_PANGO_MAJOR_VERSION == 1) && (_PANGO_MINOR_VERSION == 16) && (_PANGO_MICRO_VERSION < 0))) +#define PANGO_VERSION_MAJOR _PANGO_MAJOR_VERSION +#define PANGO_VERSION_MINOR _PANGO_MINOR_VERSION +#define PANGO_VERSION_MICRO _PANGO_MICRO_VERSION + +/* Encode a Pango version as an integer */ +#define PANGO_VERSION_ENCODE(major, minor, micro) ( \ + ((major) * 10000) \ + + ((minor) * 100) \ + + ((micro) * 1)) + +/* Encoded version of Pango at compile-time */ +#define PANGO_VERSION PANGO_VERSION_ENCODE( \ + PANGO_VERSION_MAJOR, \ + PANGO_VERSION_MINOR, \ + PANGO_VERSION_MICRO) + +/* Check that compile-time Pango is as new as required */ +#define PANGO_VERSION_CHECK(major,minor,micro) \ + (PANGO_VERSION >= PANGO_VERSION_ENCODE(major,minor,micro)) +#endif + +#endif |
From: Peter g. <pg...@co...> - 2009-01-28 17:54:08
|
Sun Jan 25 14:57:35 EST 2009 Peter Gavin <pg...@gm...> * gstreamer: do the version check correctly in hsgstreamer.h hunk ./gstreamer/hsgstreamer.h 31 +#if !((GST_VERSION_MAJOR > 0) || \ + (GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR > 10) || \ + (GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR == 10 && GST_VERSION_MICRO >= 18)) +#define GST_CHECK_VERSION(major,minor,micro) \ + (GST_VERSION_MAJOR > (major) || \ + (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR > (minor)) || \ + (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \ + GST_VERSION_MICRO >= (micro))) +#endif + hunk ./gstreamer/hsgstreamer.h 46 -#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR > 10 || GST_VERSION_MICRO > 10 +#if GST_CHECK_VERSION(0,10,10) hunk ./gstreamer/hsgstreamer.h 57 -#if !(GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR > 10 || GST_VERSION_MICRO > 18) -#define GST_CHECK_VERSION(major,minor,micro) \ - (GST_VERSION_MAJOR > (major) || \ - (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR > (minor)) || \ - (GST_VERSION_MAJOR == (major) && GST_VERSION_MINOR == (minor) && \ - GST_VERSION_MICRO >= (micro))) -#endif - |
From: Peter g. <pg...@co...> - 2009-01-28 17:54:07
|
Sun Jan 25 12:19:09 EST 2009 Peter Gavin <pg...@gm...> * gtk: G.U.G.ModelView.TreeView: several functions/values only available after 2.10.0 hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 202 +#if GTK_CHECK_VERSION(2,10,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 204 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 206 +#if GTK_CHECK_VERSION(2,10,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 209 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1583 +#if GTK_CHECK_VERSION(2,10,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1592 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1602 +#if GTK_CHECK_VERSION(2,10,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1620 +#endif |
From: Peter g. <pg...@co...> - 2009-01-25 00:42:13
|
Wed Jan 21 02:03:21 EST 2009 Peter Gavin <pg...@gm...> * Makefile.am, configure.ac: change install-exec-local to install-exec-hook; update package.conf files after installation (not before) hunk ./Makefile.am 2982 -install-exec-local: +install-exec-hook: hunk ./Makefile.am 2987 - > $(call getVar,$(pkgname),CONFIG).tmp; \ - mv $(call getVar,$(pkgname),CONFIG).tmp $(call getVar,$(pkgname),CONFIG); \ + > $(DESTDIR)/$(pkglibdir)/$(notdir $(call getVar,$(pkgname),CONFIG)).tmp; \ + mv $(DESTDIR)/$(pkglibdir)/$(notdir $(call getVar,$(pkgname),CONFIG)){.tmp,} ; \ hunk ./Makefile.am 2991 - > $(patsubst %.package.conf,%.cabal,$(call getVar,$(pkgname),CONFIG)).tmp; \ - mv $(patsubst %.package.conf,%.cabal,$(call getVar,$(pkgname),CONFIG)).tmp \ - $(patsubst %.package.conf,%.cabal,$(call getVar,$(pkgname),CONFIG));) + > $(DESTDIR)/$(pkglibdir)/$(notdir $(patsubst %.package.conf,%.cabal,$(call getVar,$(pkgname),CONFIG))).tmp; \ + mv $(DESTDIR)/$(pkglibdir)/$(notdir $(patsubst %.package.conf,%.cabal,$(call getVar,$(pkgname),CONFIG))){.tmp,};) hunk ./Makefile.am 3006 -install-exec-local: +install-exec-hook: hunk ./Makefile.am 3008 - $(SED) -e 's|$(GTK_BASEPATH)|$${GTK_BASEPATH}|g' \ - -e 's|$${modules}|$(call getModules,$(pkgname))|' \ - $(call getVar,$(pkgname),CONFIG) \ - > $(call getVar,$(pkgname),CONFIG).tmp; \ - mv $(call getVar,$(pkgname),CONFIG).tmp $(call getVar,$(pkgname),CONFIG);) + $(SHELL) mk/fix-package-conf.sh \ + $(DESTDIR)/$(pkglibdir)/$(notdir $(call getVar,$(pkgname),CONFIG)) \ + "$(call getModules,$(pkgname))" && \ + ) true + hunk ./configure.ac 908 + mk/fix-package-conf.sh addfile ./mk/fix-package-conf.sh.in hunk ./mk/fix-package-conf.sh.in 1 +#!/bin/sh + +FILE="$1" +MODULES="$2" +TMPFILE="${FILE}.tmp" + +if [ "$#" != 2 ] ; then + echo "usage: $0 foo.package.conf \"Module1 Module2 ...\"" 1>&2 + exit 1 +fi + +if [ ! -f "$FILE" ] ; then + echo "$FILE does not exist" + exit 1 +fi + +WIN32_INSTALLER= +@WIN32_INSTALLER_TRUE@ WIN32_INSTALLER=yes + +if [ -z "$WIN32_INSTALLER" ] ; then + [_$_] + @SED@ \ + -e 's|\${pkglibdir}|@libdir@/@PACKAGE@|g' + -e "s|\${modules}|${MODULES}|" \ + < "${FILE}" > "${TMPFILE}" || exit 1 + [_$_] +else # WIN32_INSTALLER + + @SED@ \ + -e 's|@GTK_BASEPATH@|${GTK_BASEPATH}|g' \ + -e "s|\${modules}|${MODULES}|" \ + < "${FILE}" > "${TMPFILE}" || exit 1 + + DLLS="" + + ORIG_SHORTNAMES="$( cat "$FILE" | \ + @GREP@ '^[ ]*extra-libraries[ ]*:' | \ + @SED@ -e 's/^[ ]*extra-libraries[ ]*:[ ]*//' -e 's/[ ]*,[ ]*/ /g' -e 's,\",,g' )" + + echo "processing $FILE" 1>&2 + for lib in $ORIG_SHORTNAMES ; do + echo "processing library $lib" 1>&2 + [_$_] + case $lib in + glu32|opengl32|user32|kernel32|gdi32) + DLLS="$DLLS $lib" + ;; + *) + foundfile= + IFS=: + for dir in $PATH ; do + unset IFS + for base in {,lib}${lib} {,lib}${lib}-{0,1,2,3,4,5,6,7,8,9} ; do + testfile="$dir/$base.dll" + #echo "testing $testfile" 1>&2 + if [ -f "$testfile" ] ; then + if [ -n "$foundfile" ] ; then + echo duplicate found for "$lib": "$testfile" 1>&2 + exit 1 + else + foundfile="$testfile" + echo "found $foundfile" 1>&2 + if [ -n "$DLLS" ]; then + DLLS="$DLLS, \"$base\"" + else + DLLS="\"$base\"" + fi + fi + fi + done + done + if [ -z "$foundfile" ] + then + echo "file for $lib not found" 1>&2 + exit 1 + fi + ;; + esac + done + [_$_] + echo "extra-ghci-libraries: ${DLLS}" >> "$TMPFILE" +fi + +mv -f "$TMPFILE" "$FILE" || exit 1 |
From: Peter g. <pg...@co...> - 2009-01-25 00:42:10
|
Wed Jan 21 00:37:54 EST 2009 Peter Gavin <pg...@gm...> * win32: more changes to the build scripts hunk ./tools/win32/gtk2hs.iss 440 + BaseDir: String;[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 443 - PackageLibDir := ExpandConstant('{app}') + '\lib\gtk2hs';[_^M_][_$_] + BaseDir := ExpandConstant('{app}');[_^M_][_$_] + PackageLibDir := BaseDir + '\lib\gtk2hs';[_^M_][_$_] + StringChange(BaseDir, '\', '/');[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 451 - StringChange(PackageFileContent, '${GTK_BASEPATH}', PackageLibDir);[_^M_][_$_] + StringChange(PackageFileContent, '${GTK_BASEPATH}', BaseDir);[_^M_][_$_] hunk ./tools/win32/win32-build-version.sh 12 -BUILD_DIR="build-${VERSIONED_DIR}" +BUILD_DIR="`pwd`/build-${VERSIONED_DIR}" hunk ./tools/win32/win32-build-version.sh 20 - cd ${BUILD_DIR} + pushd ${BUILD_DIR} hunk ./tools/win32/win32-build-version.sh 23 - cd ${BUILD_DIR} + pushd ${BUILD_DIR} hunk ./tools/win32/win32-build-version.sh 34 -make HSTOOLFLAGS=-M256m -make install DESTDIR="$DESTDIR" +make HSTOOLFLAGS=-M256m || exit 1 +make install DESTDIR="$DESTDIR" || exit 1 hunk ./tools/win32/win32-build-version.sh 47 -cp -av $PREFIX/* ${INSTALL_CLIBS_DIR} || exit 1 -mv -v ${DESTDIR}/${PREFIX}/lib ${INSTALL_GHC_LIBS_DIR} || exit 1 +cp -a $PREFIX/* ${INSTALL_CLIBS_DIR} || exit 1 +mv ${DESTDIR}/${PREFIX}/lib ${INSTALL_GHC_LIBS_DIR} || exit 1 hunk ./tools/win32/win32-build-version.sh 50 -mv -v ${DESTDIR}/${PREFIX}/share/doc/gtk2hs/html ${INSTALL_DOC_DIR}/share/doc || exit 1 +mv ${DESTDIR}/${PREFIX}/share/doc/gtk2hs/html ${INSTALL_DOC_DIR}/share/doc || exit 1 hunk ./tools/win32/win32-build-version.sh 52 -cp -av ${BUILD_DIR}/gtk2hs-${VERSION}/demo/* ${INSTALL_DEMO_DIR}/share/demo/ || exit 1 +cp -a ${BUILD_DIR}/gtk2hs-${VERSION}/demo/* ${INSTALL_DEMO_DIR}/share/demo/ || exit 1 hunk ./tools/win32/win32-build-version.sh 54 -rm -rf ${BUILD_DIR} +popd +rm -rf ${BUILD_DIR} ${DESTDIR} |
From: Peter g. <pg...@co...> - 2009-01-25 00:42:09
|
Thu Jan 15 23:55:31 EST 2009 Peter Gavin <pg...@gm...> * win32: update scripts hunk ./Makefile.am 3011 - -e '/^extra-libraries:/ \ - p; \ - s/extra-libraries/extra-ghci-libraries/; \ - s/"\([a-z0-9._-]*\.0\)"/"lib\1-0"/g; \ - s/"cairo"/"libcairo-2"/; \ - s/"rsvg-2"/"librsvg-2-2"/; \ - s/"xml2"/"libxml2"/' \ hunk ./tools/win32/clean.sh 10 -rm -rf gtk2hs-clibs-${GTK_VERSION} -rm -f gtk2hs-clibs-${GTK_VERSION}.tar.gz - -rm -rf gtk2hs-clibs-dev-${GTK_VERSION} -rm -f gtk2hs-clibs-dev-${GTK_VERSION}.tar.gz +rm -rf gtk2hs +rm -f gtk2hs-${GTK2HS_VERSION}-clibs-win32{,-dev}.zip hunk ./tools/win32/combine.sh 2 - +set -x hunk ./tools/win32/combine.sh 17 -rm -rf gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32 -mkdir gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32 -pushd gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32 -for tar in ../zips/*.tar +rm -rf gtk2hs +mkdir -p gtk2hs/${GTK2HS_VERSION} +pushd gtk2hs/${GTK2HS_VERSION} +for tar in ../../zips/*.tar hunk ./tools/win32/combine.sh 25 -cp -v ../pc/*.pc lib/pkgconfig/ +cp -v ../../pc/*.pc lib/pkgconfig/ hunk ./tools/win32/combine.sh 27 - sed "s,^prefix=.*,prefix=/gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32/${GTK2HS_VERSION}," < "$file" > "$file".new + sed "s,^prefix=.*,prefix=/c/gtk2hs/${GTK2HS_VERSION}," < "$file" > "$file".new hunk ./tools/win32/combine.sh 32 -rm -rf gtk2hs-clibs-${GTK2HS_VERSION}-win32 -cp -rl gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32 gtk2hs-clibs-${GTK2HS_VERSION}-win32 -pushd gtk2hs-clibs-${GTK2HS_VERSION}-win32 - rm -f bin/pkg-config.exe - rm -r include - rm lib/*.lib - rm -rf lib/pkgconfig - rm -rf lib/*/include - rm -rf lib/glib-2.0 lib/gtkglext-1.0 -popd +rm -f gtk2hs-${GTK2HS_VERSION}-clibs-win32{,-dev}.zip +zip -9 -q -r gtk2hs-${GTK2HS_VERSION}-clibs-win32-dev.zip gtk2hs +echo "created gtk2hs-${GTK2HS_VERSION}-clibs-win32-dev.zip" hunk ./tools/win32/combine.sh 36 -rm -f gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32.zip -zip -9 -q -r gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32.zip gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32/ -echo "created gtk2hs-clibs-dev-${GTK2HS_VERSION}-win32.zip" +mkdir no-dev +cp -a gtk2hs no-dev/gtk2hs +pushd no-dev +rm -rvf \ + gtk2hs/${GTK2HS_VERSION}/bin/gdk-pixbuf-csource.exe \ + gtk2hs/${GTK2HS_VERSION}/bin/glib-* \ + gtk2hs/${GTK2HS_VERSION}/bin/gobject-query.exe \ + gtk2hs/${GTK2HS_VERSION}/bin/gtk-demo.exe \ + gtk2hs/${GTK2HS_VERSION}/bin/ior-decode-2.exe \ + gtk2hs/${GTK2HS_VERSION}/bin/orbit-idl-2.exe \ + gtk2hs/${GTK2HS_VERSION}/bin/pkg-config.exe \ + gtk2hs/${GTK2HS_VERSION}/bin/typelib-dump.exe \ + gtk2hs/${GTK2HS_VERSION}/include \ + gtk2hs/${GTK2HS_VERSION}/lib/*.lib \ + gtk2hs/${GTK2HS_VERSION}/lib/gtk-2.0/include \ + gtk2hs/${GTK2HS_VERSION}/lib/glib-2.0 \ + gtk2hs/${GTK2HS_VERSION}/lib/gtkglext-1.0 \ + gtk2hs/${GTK2HS_VERSION}/lib/pkgconfig \ + gtk2hs/${GTK2HS_VERSION}/share/idl +zip -9 -q -r ../gtk2hs-${GTK2HS_VERSION}-clibs-win32.zip gtk2hs +echo "created gtk2hs-${GTK2HS_VERSION}-clibs-win32-dev.zip" +popd hunk ./tools/win32/combine.sh 59 -rm -f gtk2hs-clibs-${GTK2HS_VERSION}-win32.zip -zip -9 -q -r gtk2hs-clibs-${GTK2HS_VERSION}-win32.zip gtk2hs-clibs-${GTK2HS_VERSION}-win32/ -echo "created gtk2hs-clibs-${GTK2HS_VERSION}-win32.zip" +rm -rf no-dev hunk ./tools/win32/download.sh 8 +GTKGLEXT_DIR=/cygdrive/c/GtkGLExt/1.0 hunk ./tools/win32/download.sh 11 -#wget -c $BASE_URL/glib/2.12/glib-${GLIB_VERSION}.zip [_$_] -#wget -c $BASE_URL/glib/2.12/glib-dev-${GLIB_VERSION}.zip [_$_] +wget -c $BASE_URL/gtk+/2.14/gtk+-bundle_${GTK_BUNDLE_VERSION}_win32.zip [_$_] hunk ./tools/win32/download.sh 13 -#wget -c $BASE_URL/pango/1.16/pango-${PANGO_VERSION}.zip [_$_] -#wget -c $BASE_URL/pango/1.16/pango-dev-${PANGO_VERSION}.zip [_$_] - -#wget -c $BASE_URL/atk/1.18/atk-${ATK_VERSION}.zip [_$_] -#wget -c $BASE_URL/atk/1.18/atk-dev-${ATK_VERSION}.zip [_$_] - -#wget -c $BASE_URL/dependencies/cairo-${CAIRO_VERSION}.zip [_$_] -#wget -c $BASE_URL/dependencies/cairo-dev-${CAIRO_VERSION}.zip [_$_] - -#wget -c $BASE_URL/gtk+/2.10/gtk+-${GTK_VERSION}.zip [_$_] -#wget -c $BASE_URL/gtk+/2.10/gtk+-dev-${GTK_VERSION}.zip [_$_] - -wget -c $BASE_URL/gtk+/2.12/gtk+-bundle-${GTK_VERSION}.zip [_$_] - -wget -c $BASE_URL/libglade/2.6/libglade-${LIBGLADE_VERSION}.zip [_$_] -wget -c $BASE_URL/libglade/2.6/libglade-dev-${LIBGLADE_VERSION}.zip [_$_] +wget -c $BASE_URL/libglade/2.6/libglade_${LIBGLADE_VERSION}_win32.zip [_$_] +wget -c $BASE_URL/libglade/2.6/libglade-dev_${LIBGLADE_VERSION}_win32.zip [_$_] hunk ./tools/win32/download.sh 17 +#gtkglext binaries are not provided as a zip any more +if test ! -d gtkglext-${GTKGLEXT_VERSION}-win32.zip; then + pushd $GTKGLEXT_DIR + zip -r ~-/gtkglext-${GTKGLEXT_VERSION}-win32.zip bin/ include/ lib/ share/ + popd +fi hunk ./tools/win32/download.sh 24 -#wget -c $BASE_URL/gtksourceview/1.8/gtksourceview-${SOURCEVIEW_VERSION}.zip -#wget -c $BASE_URL/gtksourceview/1.8/gtksourceview-dev-${SOURCEVIEW_VERSION}.zip +wget -c $BASE_URL/gtksourceview/2.4/gtksourceview-${GTKSOURCEVIEW2_VERSION}.zip +wget -c $BASE_URL/gtksourceview/2.4/gtksourceview-dev-${GTKSOURCEVIEW2_VERSION}.zip hunk ./tools/win32/download.sh 41 -wget -c $BASE_URL/librsvg/2.22/librsvg-${LIBRSVG_VERSION}.zip -wget -c $BASE_URL/librsvg/2.22/librsvg-dev-${LIBRSVG_VERSION}.zip +wget -c $BASE_URL/librsvg/2.22/librsvg_${LIBRSVG_VERSION}_win32.zip +wget -c $BASE_URL/librsvg/2.22/librsvg-dev_${LIBRSVG_VERSION}_win32.zip hunk ./tools/win32/download.sh 47 -wget -c $BASE_URL/ORBit2/2.14/ORBit2-${ORBIT_VERSION}.zip -wget -c $BASE_URL/ORBit2/2.14/ORBit2-dev-${ORBIT_VERSION}.zip - -wget -c $BASE_URL/gnome-vfs/2.22/gnome-vfs-${GNOMEVFS_VERSION}.zip -wget -c $BASE_URL/gnome-vfs/2.22/gnome-vfs-dev-${GNOMEVFS_VERSION}.zip +wget -c $BASE_URL/ORBit2/2.14/ORBit2_${ORBIT_VERSION}_win32.zip +wget -c $BASE_URL/ORBit2/2.14/ORBit2-dev_${ORBIT_VERSION}_win32.zip hunk ./tools/win32/fix.sh 2 - +set -x hunk ./tools/win32/fix.sh 16 -pushd gtk+-bundle-${GTK_VERSION} +pushd gtk+-bundle_${GTK_BUNDLE_VERSION}_win32 hunk ./tools/win32/fix.sh 22 -mkdir gtkglext-${GTKGLEXT_VERSION} -mkdir gtkglext-dev-${GTKGLEXT_VERSION} -cp -av /c/GtkGLExt/1.0/bin gtkglext-${GTKGLEXT_VERSION} -cp -av /c/GtkGLExt/1.0/{lib,include} gtkglext-dev-${GTKGLEXT_VERSION} +#mkdir gtkglext-${GTKGLEXT_VERSION} +#mkdir gtkglext-dev-${GTKGLEXT_VERSION} +#cp -av /c/GtkGLExt/1.0/bin gtkglext-${GTKGLEXT_VERSION} +#cp -av /c/GtkGLExt/1.0/{lib,include} gtkglext-dev-${GTKGLEXT_VERSION} hunk ./tools/win32/gtk2hs.iss 7 -AppVerName=Gtk2Hs 0.9.13[_^M_][_$_] -AppVersion=0.9.13[_^M_][_$_] +AppVerName=Gtk2Hs 0.10.0[_^M_][_$_] +AppVersion=0.10.0[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 14 -DefaultDirName={pf}\Gtk2Hs[_^M_][_$_] -OutputBaseFilename=gtk2hs-0.9.13[_^M_][_$_] +DefaultDirName=c:\gtk2hs\0.10.0[_^M_][_$_] +OutputBaseFilename=gtk2hs-0.10.0[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 17 -VersionInfoVersion=0.9.13[_^M_][_$_] -VersionInfoCopyright=Copyright (C) 2001-2008 The Gtk2Hs Team[_^M_][_$_] +VersionInfoVersion=0.10.0[_^M_][_$_] +VersionInfoCopyright=Copyright (C) 2001-2009 The Gtk2Hs Team[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 29 -Name: "gtk2hs"; Description: "Gtk2Hs libraries for GHC 6.8.3"; Check: UseWithGhcVersion('6.8.3'); Types: full compact custom; Flags: fixed[_^M_][_$_] -Name: "docs"; Description: "API reference documentation"; Types: full[_^M_][_$_] -Name: "demos"; Description: "Source files for the Gtk2Hs demo programs"; Types: full[_^M_][_$_] +Name: "gtk2hs"; Description: "Gtk2Hs libraries for GHC 6.10.1"; Check: UseWithGhcVersion('6.10.1'); Types: full compact custom; Flags: fixed[_^M_][_$_] +Name: "doc"; Description: "API reference documentation"; Types: full[_^M_][_$_] +Name: "demo"; Description: "Source files for the Gtk2Hs demo programs"; Types: full[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 34 -Source: "gtk2hs-clibs-0.9.13\*"; DestDir: "{app}"; Components: clibs; Flags: ignoreversion recursesubdirs createallsubdirs;[_^M_][_$_] -Source: "gtk2hs-0.9.13-ghc-6.8.3\*"; DestDir: "{app}"; Components: gtk2hs; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: AfterPkgInstall;[_^M_][_$_] -Source: "gtk2hs-demo-0.9.13\*"; DestDir: "{app}\demos"; Components: demos; Flags: ignoreversion recursesubdirs createallsubdirs;[_^M_][_$_] -Source: "gtk2hs-docs-0.9.13\*"; DestDir: "{app}\docs"; Components: docs; Flags: ignoreversion recursesubdirs createallsubdirs;[_^M_][_$_] +Source: "gtk2hs-0.10.0-clibs\*"; DestDir: "{app}"; Components: clibs; Flags: ignoreversion recursesubdirs createallsubdirs;[_^M_][_$_] +Source: "gtk2hs-0.10.0-ghc-6.10.1\*"; DestDir: "{app}"; Components: gtk2hs; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: AfterPkgInstall;[_^M_][_$_] +Source: "gtk2hs-0.10.0-demo\*"; DestDir: "{app}"; Components: demo; Flags: ignoreversion recursesubdirs createallsubdirs;[_^M_][_$_] +Source: "gtk2hs-0.10.0-doc\*"; DestDir: "{app}"; Components: doc; Flags: ignoreversion recursesubdirs createallsubdirs;[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 45 -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\glib.package.conf"""; StatusMsg: "Registering glib package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\cairo.package.conf"""; StatusMsg: "Registering cairo package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\svgcairo.package.conf"""; StatusMsg: "Registering svgcairo package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\gtk.package.conf"""; StatusMsg: "Registering gtk package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\glade.package.conf"""; StatusMsg: "Registering glade package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\soegtk.package.conf"""; StatusMsg: "Registering soegtk package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\gtkglext.package.conf"""; StatusMsg: "Registering gtkglext package..."; Flags: runhidden[_^M_][_$_] -;Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\sourceview.package.conf"""; StatusMsg: "Registering sourceview package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\gnomevfs.package.conf"""; StatusMsg: "Registering gnomevfs package..."; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\gstreamer.package.conf"""; StatusMsg: "Registering gstreamer package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\glib.package.conf"""; StatusMsg: "Registering glib package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\cairo.package.conf"""; StatusMsg: "Registering cairo package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\svgcairo.package.conf"""; StatusMsg: "Registering svgcairo package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\gtk.package.conf"""; StatusMsg: "Registering gtk package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\glade.package.conf"""; StatusMsg: "Registering glade package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\soegtk.package.conf"""; StatusMsg: "Registering soegtk package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\gtkglext.package.conf"""; StatusMsg: "Registering gtkglext package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\gtksourceview2.package.conf"""; StatusMsg: "Registering gtksourceview2 package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\gio.package.conf"""; StatusMsg: "Registering gio package..."; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "update ""{app}\lib\gtk2hs\gstreamer.package.conf"""; StatusMsg: "Registering gstreamer package..."; Flags: runhidden[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 57 -Filename: "{code:ghcpkg}"; Parameters: "unregister gstreamer-0.9.13"; RunOnceId: "gstreamer"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister gnomevfs-0.9.13"; RunOnceId: "gnomevfs"; Flags: runhidden[_^M_][_$_] -;Filename: "{code:ghcpkg}"; Parameters: "unregister sourceview-0.9.13"; RunOnceId: "gtkglext"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister gtkglext-0.9.13"; RunOnceId: "gtkglext"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister soegtk-0.9.13"; RunOnceId: "soegtk"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister glade-0.9.13"; RunOnceId: "glade"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister gtk-0.9.13"; RunOnceId: "gtk"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister svgcairo-0.9.13"; RunOnceId: "svgcairo"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister cairo-0.9.13"; RunOnceId: "cairo"; Flags: runhidden[_^M_][_$_] -Filename: "{code:ghcpkg}"; Parameters: "unregister glib-0.9.13"; RunOnceId: "glib"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister gstreamer-0.10.0"; RunOnceId: "gstreamer"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister gio-0.10.0"; RunOnceId: "gio"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister gtksourceview2-0.10.0"; RunOnceId: "gtkglext"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister gtkglext-0.10.0"; RunOnceId: "gtkglext"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister soegtk-0.10.0"; RunOnceId: "soegtk"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister glade-0.10.0"; RunOnceId: "glade"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister gtk-0.10.0"; RunOnceId: "gtk"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister svgcairo-0.10.0"; RunOnceId: "svgcairo"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister cairo-0.10.0"; RunOnceId: "cairo"; Flags: runhidden[_^M_][_$_] +Filename: "{code:ghcpkg}"; Parameters: "unregister glib-0.10.0"; RunOnceId: "glib"; Flags: runhidden[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 143 - Result := (Version = '6.8.3');[_^M_][_$_] + Result := (Version = '6.10.1');[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 179 - RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Haskell\GHC\ghc-6.8.3', 'InstallDir', GhcInstallDir);[_^M_][_$_] + RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Haskell\GHC\ghc-6.10.1', 'InstallDir', GhcInstallDir);[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 186 - RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Haskell\GHC\ghc-6.8.3', 'InstallDir', GhcInstallDir);[_^M_][_$_] + RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Haskell\GHC\ghc-6.10.1', 'InstallDir', GhcInstallDir);[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 195 - InstallationErrorMessage := 'This version of Gtk2Hs requires GHC version 6.8.3.' #13#10 #13#10[_^M_][_$_] + InstallationErrorMessage := 'This version of Gtk2Hs requires GHC version 6.10.1.' #13#10 #13#10[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 203 - InstallationErrorMessage := 'GHC does not appear to be installed correctly, try reinstalling GHC version 6.8.3' #13#10 #13#10[_^M_][_$_] + InstallationErrorMessage := 'GHC does not appear to be installed correctly, try reinstalling GHC version 6.10.1' #13#10 #13#10[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 211 - InstallationErrorMessage := 'GHC does not appear to be installed (or the installation is corrupted), please install GHC version 6.8.3';[_^M_][_$_] + InstallationErrorMessage := 'GHC does not appear to be installed (or the installation is corrupted), please install GHC version 6.10.1';[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 217 - InstallationErrorMessage := 'Gtk2Hs requires GHC to be installed first, please install GHC version 6.8.3' #13#10 #13#10[_^M_][_$_] + InstallationErrorMessage := 'Gtk2Hs requires GHC to be installed first, please install GHC version 6.10.1' #13#10 #13#10[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 270 + 'charset.dll',[_^M_][_$_] + 'gconftool-2.exe',[_^M_][_$_] + 'gdk-pixbuf-csource.exe',[_^M_][_$_] + 'gdk-pixbuf-query-loaders.exe',[_^M_][_$_] + 'glib-genmarshal.exe',[_^M_][_$_] + 'gobject-query.exe',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 280 - 'charset.dll',[_^M_][_$_] + 'gtk-demo.exe',[_^M_][_$_] + 'gtk-query-immodules-2.0.exe',[_^M_][_$_] + 'gtk-update-icon-cache.exe',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 285 + 'ior-decode-2.exe',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 287 - 'libORBit-2-0.dll',[_^M_][_$_] - 'libORBit-imodule-2-0.dll',[_^M_][_$_] - 'libORBitCosNaming-2-0.dll',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 289 + 'libgailutil-18.dll',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 292 - 'libgdk_pixbuf-2.0-0.dll',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 293 + 'libgdk_pixbuf-2.0-0.dll',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 298 - 'libgnomevfs-2-0.dll',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 319 + 'libgtksourceview-2.0-0.dll',[_^M_][_$_] + 'libORBit-2-0.dll',[_^M_][_$_] + 'libORBit-imodule-2-0.dll',[_^M_][_$_] + 'libORBitCosNaming-2-0.dll',[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 331 - 'zlib1.dll'[_^M_][_$_] + 'orbit-idl-2.exe',[_^M_][_$_] + 'pkg-config.exe',[_^M_][_$_] + 'rsvg-convert.exe',[_^M_][_$_] + 'rsvg-view.exe',[_^M_][_$_] + 'typelib-dump.exe',[_^M_][_$_] + 'zlib1.dll',[_^M_][_$_] + 'libgconfbackend-oldxml.dll',[_^M_][_$_] + 'libgconfbackend-xml.dll',[_^M_][_$_] + 'libgstadder.dll',[_^M_][_$_] + 'libgstaudioconvert.dll',[_^M_][_$_] + 'libgstaudiorate.dll',[_^M_][_$_] + 'libgstaudioresample.dll',[_^M_][_$_] + 'libgstaudiotestsrc.dll',[_^M_][_$_] + 'libgstcoreelements.dll',[_^M_][_$_] + 'libgstdecodebin.dll',[_^M_][_$_] + 'libgstdecodebin2.dll',[_^M_][_$_] + 'libgstffmpegcolorspace.dll',[_^M_][_$_] + 'libgstgdp.dll',[_^M_][_$_] + 'libgstogg.dll',[_^M_][_$_] + 'libgstplaybin.dll',[_^M_][_$_] + 'libgsttheora.dll',[_^M_][_$_] + 'libgsttypefindfunctions.dll',[_^M_][_$_] + 'libgstvideorate.dll',[_^M_][_$_] + 'libgstvideoscale.dll',[_^M_][_$_] + 'libgstvideotestsrc.dll',[_^M_][_$_] + 'libgstvolume.dll',[_^M_][_$_] + 'libgstvorbis.dll',[_^M_][_$_] + 'libpixmap.dll',[_^M_][_$_] + 'libwimp.dll',[_^M_][_$_] + 'libpixbufloader-ani.dll',[_^M_][_$_] + 'libpixbufloader-bmp.dll',[_^M_][_$_] + 'libpixbufloader-gif.dll',[_^M_][_$_] + 'libpixbufloader-icns.dll',[_^M_][_$_] + 'libpixbufloader-ico.dll',[_^M_][_$_] + 'libpixbufloader-jpeg.dll',[_^M_][_$_] + 'libpixbufloader-pcx.dll',[_^M_][_$_] + 'libpixbufloader-png.dll',[_^M_][_$_] + 'libpixbufloader-pnm.dll',[_^M_][_$_] + 'libpixbufloader-ras.dll',[_^M_][_$_] + 'libpixbufloader-tga.dll',[_^M_][_$_] + 'libpixbufloader-tiff.dll',[_^M_][_$_] + 'libpixbufloader-wbmp.dll',[_^M_][_$_] + 'libpixbufloader-xbm.dll',[_^M_][_$_] + 'libpixbufloader-xpm.dll',[_^M_][_$_] + 'libgail.dll',[_^M_][_$_] + 'gconfd-2.exe'[_^M_][_$_] hunk ./tools/win32/gtk2hs.iss 442 - PackageLibDir := ExpandConstant('{app}');[_^M_][_$_] + PackageLibDir := ExpandConstant('{app}') + '\lib\gtk2hs';[_^M_][_$_] hunk ./tools/win32/prune.sh 2 - +set -x hunk ./tools/win32/prune.sh 11 -rm -rf */make/ */share/man/ */man/ */share/gtk-doc/ */share/doc/ +rm -rvf */make/ */share/man/ */man/ */share/gtk-doc/ */share/doc/ */src hunk ./tools/win32/prune.sh 14 -rm -rf */share/aclocal/ +rm -rvf */share/aclocal/ hunk ./tools/win32/prune.sh 17 -rm -rf *-dev-*/bin/ +rm -rvf *-dev-*/bin/ hunk ./tools/win32/prune.sh 20 -rm -rf */manifest/ +rm -rvf */manifest/ hunk ./tools/win32/prune.sh 23 -rm -rf *-dev-*/lib/*.a *-dev-*/lib/*.def +rm -rvf *-dev-*/lib/*.a *-dev-*/lib/*.def hunk ./tools/win32/prune.sh 26 -rm -rf */lib/locale/ */share/locale/ +rm -rvf */lib/locale/ */share/locale/ hunk ./tools/win32/prune.sh 28 +rm -rvf */contrib/ hunk ./tools/win32/prune.sh 33 -pushd gtk+-bundle-${GTK_VERSION} +pushd gtk+-bundle_${GTK_BUNDLE_VERSION}_win32 hunk ./tools/win32/prune.sh 35 -rm -rf share/gtk-2.0/ -rmdir share/gtk-2.0 -# don't need the glib gettext stuff -rm -rf share/glib-2.0/ -rmdir share/glib-2.0 -rm bin/pango-querymodules.exe -rm lib/libz.a lib/zdll.lib +rm -rvf share/gtk-2.0/demo +rm -vf bin/pango-querymodules.exe +rm -vf lib/libz.a lib/zdll.lib +rm -rvf share/glib-2.0 hunk ./tools/win32/prune.sh 49 -pushd gtkglext-${GTKGLEXT_VERSION} +pushd gtkglext-${GTKGLEXT_VERSION}-win32 hunk ./tools/win32/unpack.sh 2 - +set -x hunk ./tools/win32/unpack.sh 5 +if test -z "$UNZIPPER" ; then + UNZIPPER=unzip +fi + hunk ./tools/win32/unpack.sh 16 - unzip -q ../$f + $UNZIPPER ../$f hunk ./tools/win32/versions.conf 1 -GTK2HS_VERSION=0.9.13 -#GLIB_VERSION=2.16.3 -#PANGO_VERSION=1.20.3 -#ATK_VERSION=1.22.0 -#CAIRO_VERSION=1.6.4 -GTK_VERSION=2.12.10 -LIBGLADE_VERSION=2.6.2 +GTK2HS_VERSION=0.10.0 +GTK_BUNDLE_VERSION=2.14.6-20081216 +LIBGLADE_VERSION=2.6.3-1 hunk ./tools/win32/versions.conf 5 -#SOURCEVIEW_VERSION=1.8.5 +GTKSOURCEVIEW2_VERSION=2.4.1 hunk ./tools/win32/versions.conf 7 -#GETTEXT_VERSION=0.14.5 -#LIBPNG_VERSION=1.2.8 -#LIBJPEG_VERSION=6b-4 hunk ./tools/win32/versions.conf 8 -#ZLIB_VERSION=1.2.3 -#PKGCONFIG_VERSION=0.20 hunk ./tools/win32/versions.conf 9 -ORBIT_VERSION=2.14.13 +ORBIT_VERSION=2.14.16-1 hunk ./tools/win32/versions.conf 11 -GNOMEVFS_VERSION=2.22.0 -LIBRSVG_VERSION=2.22.2 +LIBRSVG_VERSION=2.22.3-1 hunk ./tools/win32/win32-build-version.sh 1 -#! /bin/sh[_^M_][_$_] -[_^M_][_$_] -. ./win32-build.conf[_^M_][_$_] -[_^M_][_$_] -PATH=${BASE_PATH}[_^M_][_$_] -case $1 in[_^M_][_$_] - ghc-6.8.3) PATH="${PATH}:${GHC_683_PATH}";;[_^M_][_$_] - *) echo "GHC version parameter must be ghc-6.8.3"; exit;;[_^M_][_$_] -esac[_^M_][_$_] -[_^M_][_$_] -export PATH="${PATH}:${CLIBS_BASEPATH}/bin"[_^M_][_$_] -export INCLUDE="${CLIBS_BASEPATH}/include"[_^M_][_$_] -export LIB="${CLIBS_BASEPATH}/lib"[_^M_][_$_] -[_^M_][_$_] -GTK_VERSION=$(pkg-config --modversion gtk+-2.0 | sed 's:\([0-9]*\.[0-9]*\).[0-9]*:\1:')[_^M_][_$_] -GHC_VERSION=$(ghc --numeric-version)[_^M_][_$_] -[_^M_][_$_] -case $3 in[_^M_][_$_] - env-only) echo ${PATH}; exit;;[_^M_][_$_] - *);;[_^M_][_$_] -esac[_^M_][_$_] -[_^M_][_$_] -echo "Building Gtk2Hs ${VERSION} with GHC ${GHC_VERSION} and Gtk+ ${GTK_VERSION} ..."[_^M_][_$_] -[_^M_][_$_] -VERSION_SUFFIX="ghc-${GHC_VERSION}"[_^M_][_$_] -VERSIONED_DIR="gtk2hs-${VERSION}-${VERSION_SUFFIX}"[_^M_][_$_] -BUILD_DIR="build-${VERSIONED_DIR}"[_^M_][_$_] -[_^M_][_$_] -CONFIGURE_FLAGS="--enable-packager-mode --enable-split-objs --enable-profiling --enable-docs"[_^M_][_$_] -ENABLE_PACKAGES="--enable-libglade --enable-opengl --enable-gnomevfs --enable-gstreamer --enable-cairo --enable-svg --enable-gconf"[_^M_][_$_] -[_^M_][_$_] -#rm -rf ${BUILD_DIR}[_^M_][_$_] +#! /bin/sh +set -x +. ./win32-build.conf + +GTK_VERSION=$(pkg-config --modversion gtk+-2.0 | sed 's:\([0-9]*\.[0-9]*\).[0-9]*:\1:') +GHC_VERSION=$(ghc --numeric-version) + +echo "Building Gtk2Hs ${VERSION} with GHC ${GHC_VERSION} and Gtk+ ${GTK_VERSION} ..." + +VERSION_SUFFIX="ghc-${GHC_VERSION}" +VERSIONED_DIR="gtk2hs-${VERSION}-${VERSION_SUFFIX}" +BUILD_DIR="build-${VERSIONED_DIR}" + +CONFIGURE_FLAGS="--enable-packager-mode --enable-split-objs --enable-profiling --enable-docs" +ENABLE_PACKAGES="--enable-gtk --enable-libglade --enable-opengl --enable-gio --enable-gstreamer --enable-cairo --enable-svg --enable-gconf --enable-gtksourceview2" + +rm -rf ${BUILD_DIR} hunk ./tools/win32/win32-build-version.sh 19 - mkdir ${BUILD_DIR}[_^M_][_$_] - cd ${BUILD_DIR}[_^M_][_$_] - tar -xzf ../gtk2hs-${VERSION}.tar.gz[_^M_][_$_] + mkdir ${BUILD_DIR} + cd ${BUILD_DIR} + tar -xzf ../gtk2hs-${VERSION}.tar.gz hunk ./tools/win32/win32-build-version.sh 23 - cd ${BUILD_DIR}[_^M_][_$_] + cd ${BUILD_DIR} hunk ./tools/win32/win32-build-version.sh 25 -cd gtk2hs-${VERSION}[_^M_][_$_] +cd gtk2hs-${VERSION} + +PREFIX=/c/gtk2hs/$VERSION +DESTDIR="${INSTALL_SOURCE_DIR}/destdir-ghc-$GHC_VERSION" + hunk ./tools/win32/win32-build-version.sh 31 - ./configure --prefix=/ ${CONFIGURE_FLAGS} ${ENABLE_PACKAGES} ${CONFIGURE_EXTRAFLAGS}[_^M_][_$_] + XARGS="/bin/xargs -L128" ./configure --prefix=$PREFIX ${CONFIGURE_FLAGS} ${ENABLE_PACKAGES} ${CONFIGURE_EXTRAFLAGS} || exit 1 hunk ./tools/win32/win32-build-version.sh 33 -make HSTOOLFLAGS=-M256m[_^M_][_$_] -make install DESTDIR="${INSTALL_SOURCE_DIR}/tmp-${VERSIONED_DIR}"[_^M_][_$_] -rm -rf ${INSTALL_SOURCE_DIR}/${VERSIONED_DIR}[_^M_][_$_] -mv ${INSTALL_SOURCE_DIR}/tmp-${VERSIONED_DIR}/lib/gtk2hs ${INSTALL_SOURCE_DIR}/${VERSIONED_DIR}[_^M_][_$_] -mv ${INSTALL_SOURCE_DIR}/tmp-${VERSIONED_DIR}/share/doc/gtk2hs/html ${INSTALL_SOURCE_DIR}/${VERSIONED_DIR}[_^M_][_$_] -rmdir ${INSTALL_SOURCE_DIR}/tmp-${VERSIONED_DIR}/lib[_^M_][_$_] -rmdir ${INSTALL_SOURCE_DIR}/tmp-${VERSIONED_DIR}/share{/doc{/gtk2hs,},} -rmdir ${INSTALL_SOURCE_DIR}/tmp-${VERSIONED_DIR}[_^M_][_$_] + +make HSTOOLFLAGS=-M256m +make install DESTDIR="$DESTDIR" + +rm -rf "$/ghclibs" +INSTALL_GHC_LIBS_DIR=${INSTALL_SOURCE_DIR}/gtk2hs-${VERSION}-ghc-${GHC_VERSION} +INSTALL_CLIBS_DIR=${INSTALL_SOURCE_DIR}/gtk2hs-${VERSION}-clibs +INSTALL_DOC_DIR=${INSTALL_SOURCE_DIR}/gtk2hs-${VERSION}-doc +INSTALL_DEMO_DIR=${INSTALL_SOURCE_DIR}/gtk2hs-${VERSION}-demo +mkdir -p ${INSTALL_GHC_LIBS_DIR} || exit 1 +mkdir -p ${INSTALL_CLIBS_DIR} || exit 1 +mkdir -p ${INSTALL_DOC_DIR} || exit 1 +mkdir -p ${INSTALL_DEMO_DIR} || exit 1 + +cp -av $PREFIX/* ${INSTALL_CLIBS_DIR} || exit 1 +mv -v ${DESTDIR}/${PREFIX}/lib ${INSTALL_GHC_LIBS_DIR} || exit 1 +mkdir -p ${INSTALL_DOC_DIR}/share/doc || exit 1 +mv -v ${DESTDIR}/${PREFIX}/share/doc/gtk2hs/html ${INSTALL_DOC_DIR}/share/doc || exit 1 +mkdir -p ${INSTALL_DEMO_DIR}/share/demo || exit 1 +cp -av ${BUILD_DIR}/gtk2hs-${VERSION}/demo/* ${INSTALL_DEMO_DIR}/share/demo/ || exit 1 + +rm -rf ${BUILD_DIR} hunk ./tools/win32/win32-build.conf 2 -VERSION=0.9.13[_^M_][_$_] +VERSION=0.10.0[_^M_][_$_] hunk ./tools/win32/win32-build.conf 5 -INSTALL_SOURCE_DIR=/gtk2hs-win32[_^M_][_$_] +INSTALL_SOURCE_DIR=`pwd` hunk ./tools/win32/win32-build.conf 9 -# The path that wel will start with (without ghc or gtk on it)[_^M_][_$_] -# this should be just the initial mingw path[_^M_][_$_] -BASE_PATH=".:/usr/local/bin:/mingw/bin:/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem"[_^M_][_$_] -[_^M_][_$_] -# extra path components to tack on for version of GTK[_^M_][_$_] -# this is the base path under which we find bin, lib and include[_^M_][_$_] -CLIBS_BASEPATH="/gtk2hs-clibs-dev-${VERSION}-win32"[_^M_][_$_] -[_^M_][_$_] -# extra path components to tack on for version of GHC[_^M_][_$_] -#GHC_622_PATH="/d/dcoutts/ghc-6.2.2/bin"[_^M_][_$_] -#GHC_642_PATH="/d/dcoutts/ghc-6.4.2/bin"[_^M_][_$_] -#GHC_661_PATH="/d/dcoutts/ghc-6.6.1/bin"[_^M_][_$_] -GHC_683_PATH="/c/ghc/ghc-6.8.3/bin" +PATH=/c/gtk2hs/0.10.0/bin:/c/ghc/ghc-6.10.1/bin:/c/ghc/alex-2.2:/c/ghc/happy-1.17:/c/MinGW/bin:/bin |
From: Axel S. <si...@co...> - 2009-01-24 20:35:13
|
Fri Jan 23 19:08:54 EST 2009 Hamish Mackenzie <ha...@fi...> * Change hierarchy.list so GtkSourceMark is a GtkTextMark hunk ./tools/hierarchyGen/hierarchy.list 45 + GtkSourceMark if gtksourceview2-2.2 hunk ./tools/hierarchyGen/hierarchy.list 202 - GtkSourceMark if gtksourceview2-2.2 |
From: Axel S. <si...@co...> - 2009-01-22 19:02:30
|
Thu Jan 22 13:55:51 EST 2009 Axe...@en... * Docu fix. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeSortable.chs.pp 27 --- Maintainer : gtk...@li... Stability : provisional +-- Maintainer : gtk...@li... +-- Stability : provisional |
From: Peter g. <pg...@co...> - 2009-01-22 00:36:42
|
Tue Jan 20 21:43:26 EST 2009 Peter Gavin <pg...@gm...> * Makefile.am: enable parallel builds again hunk ./Makefile.am 108 -# Sadly the generated Makefile is not safe for parallel builds -# so prevent people from shooting themselves in the foot: -.NOTPARALLEL: - |
From: Peter g. <pg...@co...> - 2009-01-22 00:36:41
|
Tue Jan 20 21:38:19 EST 2009 Peter Gavin <pg...@gm...> * mk/chsDepend.in: allow spaces and tabs inside import tags hunk ./mk/chsDepend.in 27 - DEPS=`$GREP "{#import" $FULLNAME 2> /dev/null \ - | $SED 'y|.|/|;s|^{#import \([a-zA-Z1-9/]*\)#}.*|\1|'`; + DEPS="`$GREP '{#[ \t]*import' $FULLNAME 2> /dev/null \ + | $SED 'y|.|/|;s|^.*{#[ ]*import[ ][ ]*\([a-zA-Z1-9/]*\)[ ]*#}.*|\1|'`"; |