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: Duncan C. <dun...@us...> - 2004-12-13 20:22:29
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15296/tools/hierarchyGen Modified Files: TypeGen.hs Added Files: Hierarchy.chs.template Log Message: make the TypeGenerator tool use an external template file rather than embeding all the module text. Also added a --parentname parameter to allow modules to inherit definitions from other modules - this replaces the 'if fname/="Hierarchy" then' hack. Updated Makefile.am invocations of TypeGenerator correspondingly. --- NEW FILE: Hierarchy.chs.template --- {-# OPTIONS -fglasgow-exts #-} --due to use of unsafeCoerce# -- -*-haskell-*- -- -------------------- automatically generated file - do not edit ---------- -- Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell -- -- Author : Axel Simon -- -- Copyright (c) 2001-2004 Axel Simon -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file 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 General Public License for more details. -- -- | -- This file reflects the Gtk object hierarchy in terms of Haskell classes. -- module @MODULE_NAME@ ( @MODULE_EXPORTS@ ) where import FFI (ForeignPtr, castForeignPtr, foreignPtrToPtr, CULong, withForeignPtr) import GType (typeInstanceIsA) import GHC.Base (unsafeCoerce#) @IMPORT_PARENT@ {#context lib="@CONTEXT_LIB@" prefix="@CONTEXT_PREFIX@" #} castToGObject :: GObjectClass obj => obj -> obj castToGObject = id -- The usage of foreignPtrToPtr should be safe as the evaluation will only be -- forced if the object is used afterwards @CASTING_FUNCTIONS@ @CLASS_DECLERATIONS@ Index: TypeGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/TypeGen.hs,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- TypeGen.hs 24 Oct 2004 17:19:26 -0000 1.9 +++ TypeGen.hs 13 Dec 2004 20:22:18 -0000 1.10 @@ -4,7 +4,7 @@ module Main(main) where import Char(showLitChar, isAlpha, isAlphaNum, isSpace, toLower, toUpper, isUpper) -import List(nub, isPrefixOf) +import List(nub, isPrefixOf, partition) import Maybe(catMaybes, fromMaybe) import Monad(when) import System(getArgs, exitWith, ExitCode(..)) @@ -92,7 +92,11 @@ main = do args <- getArgs when (length args<2) usage - let (hierFile: goalFile: rem) = args + + ----------------------------------------------------------------------------- + -- Parse command line parameters + -- + let (hierFile: templateFile: goalFile: rem) = args let tags = map (drop 6) (filter ("--tag=" `isPrefixOf`) rem) let lib = case map (drop 6) (filter ("--lib=" `isPrefixOf`) rem) of [] -> "gtk" @@ -108,33 +112,64 @@ drop 1 . dropWhile isAlpha . reverse + let parentName = case map (drop 13) (filter ("--parentname=" `isPrefixOf`) rem) of + [] -> "" + (parentName:_) -> parentName + + ----------------------------------------------------------------------------- + -- Read in the input files + -- content <- if hierFile == "-" then getContents -- read stdin else readFile hierFile - let (objs, specialQueries) = unzip $ + template <- readFile templateFile + + ----------------------------------------------------------------------------- + -- Parse the contents of the hierarchy file + -- + let (objs', specialQueries) = unzip $ pFreshLine (freshParserState tags) content + objs = map (map snd) objs' + + ----------------------------------------------------------------------------- + -- Write the result file by substituting values into the template file + -- writeFile goalFile $ - generate modName lib prefix - (map (map snd) objs) specialQueries "" + templateSubstitute template (\var -> + case var of + "MODULE_NAME" -> ss modName + "MODULE_EXPORTS" -> generateExports objs + "IMPORT_PARENT" -> if null parentName + then ss "" + else ss "{#import " .ss parentName .ss "#}" + "CONTEXT_LIB" -> ss lib + "CONTEXT_PREFIX" -> ss prefix + "CASTING_FUNCTIONS" -> generateCastFunctions objs specialQueries + "CLASS_DECLERATIONS" -> generateClassDeclerations prefix objs specialQueries + _ -> ss "" + ) "" usage = do putStr "\nProgram to generate Gtk's object hierarchy in Haskell. Usage:\n\ - \TypeGenerator <hierFile> <outFile> {--tag=<tag>}\n\ + \TypeGenerator <hierFile> <templateFile> <outFile> {--tag=<tag>}\n\ \ {--lib=<lib>} {--prefix=<prefix>}\n\ - \ {--modname=<modName>}\n\ + \ {--modname=<modName>} {--parentname=<parentName>}\n\ \where\n\ - \ <hierFile> a list of all possible objects, the hierarchy is\n\ - \ taken from the indentation\n\ - \ <outFile> is the name and path of the output file\n\ + \ <hierFile> a list of all possible objects, the hierarchy is\n\ + \ taken from the indentation\n\ + \ <templateFile> is the name and path of the output template file\n\ + \ <outFile> is the name and path of the output file\n\ \ <tag> generate entries that have the tag <tag>\n\ - \ specify `default' for types without tags\n\ + \ specify `default' for types without tags\n\ \ <lib> set the lib to use in the c2hs {#context #}\n\ \ declaration (the default is \"gtk\")\n\ \ <prefix> set the prefix to use in the c2hs {#context #}\n\ \ declaration (the default is \"gtk\")\n\ \ <modName> specify module name if it does not match the\n\ - \ file name, eg a hierarchical module name\n" + \ file name, eg a hierarchical module name\n\ + \ <parentName> specify the name of the module that defines any\n\ + \ parent classes eg Hierarchy (default is none)\n" exitWith $ ExitFailure 1 @@ -143,75 +178,21 @@ -- generate dynamic fragments ------------------------------------------------------------------------------- -generate :: String -> String -> String -> [[String]] -> TypeTable -> ShowS -generate fname lib prefix objs typeTable = - let fillCol str = ss $ replicate - (maximum (map (length.head) objs)-length str) ' ' - in - ss "-- -*-haskell-*-". - indent 0.ss "-- -------------------- automatically generated file - do not edit ----------". - indent 0.ss "-- Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell". - indent 0.ss "--". - indent 0.ss "-- Author : Axel Simon". - indent 0.ss "--". - indent 0.ss "-- Copyright (c) 2001-2004 Axel Simon". - indent 0.ss "--". - indent 0.ss "-- This file is free software; you can redistribute it and/or modify". - indent 0.ss "-- it under the terms of the GNU General Public License as published by". - indent 0.ss "-- the Free Software Foundation; either version 2 of the License, or". - indent 0.ss "-- (at your option) any later version.". - indent 0.ss "--". - indent 0.ss "-- This file is distributed in the hope that it will be useful,". - indent 0.ss "-- but WITHOUT ANY WARRANTY; without even the implied warranty of". - indent 0.ss "-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the". - indent 0.ss "-- GNU General Public License for more details.". - indent 0.ss "--". - indent 0.ss "-- |". - indent 0.ss "-- This file reflects the Gtk object hierarchy in terms of Haskell classes.". - indent 0.ss "--". - indent 0.ss "module ".ss fname.sc '('. --- indent 1.ss "ObjectTag(..)". +generateExports :: [[String]] -> ShowS +generateExports objs = tail. foldl (\s1 s2 -> s1.ss ", ".s2) id (map (\(n:_) -> indent 1.ss n.ss "(".ss n.ss "), ".ss n.ss "Class,". indent 1.ss "to".ss n.ss ", ". indent 1.ss "from".ss n.ss ", ". indent 1.ss "mk".ss n.ss ", un".ss n.sc ','. - indent 1.ss "castTo".ss n) objs). - indent 1.ss ") where". - indent 0. - indent 0.ss "import FFI (ForeignPtr, castForeignPtr, foreignPtrToPtr,". - indent 8.ss " CULong, withForeignPtr)". - indent 0.ss "import GType (typeInstanceIsA)". - indent 0.ss "import GHC.Base (unsafeCoerce#)". - -- this is a very bad hack to get the definition of the ancestors whenever - -- these are not created in this file - (if fname/="Hierarchy" then indent 0.ss "{#import Hierarchy#}" else id). - indent 0. - indent 0.ss "{#context lib=\"".ss lib.ss "\" prefix=\"".ss prefix.ss "\" #}". - indent 0. - indent 0.ss "castToGObject :: GObjectClass obj => obj -> obj". - indent 0.ss "castToGObject = id". - indent 0. - indent 0.ss "-- The usage of foreignPtrToPtr should be safe as the evaluation will only be". - indent 0.ss "-- forced if the object is used afterwards". - indent 0. - foldl (.) id (map (makeUpcast typeTable) objs). - indent 0. --- indent 0.ss "data ObjectTag ".makeTypeTags '=' (map head objs). --- indent 0. --- indent 0.ss "instance Ord ObjectTag where". --- foldl (.) id (map (makeOrd fillCol) objs). --- indent 1.ss "compare ".ss "_ ".fillCol "_".ss " _ ".fillCol "_". --- ss " = LT". --- indent 0. - indent 0. - foldl (.) id (map (makeClass prefix typeTable) objs) + indent 1.ss "castTo".ss n) objs) -makeTypeTags :: Char -> [String] -> ShowS -makeTypeTags c [] = ss "deriving Eq" -makeTypeTags c (obj:ects) = sc c.sc ' '.ss obj.ss "Tag".indent 8. - makeTypeTags '|' ects +generateCastFunctions :: [[String]] -> TypeTable -> ShowS +generateCastFunctions objs typeTable = foldl (.) id (map (makeUpcast typeTable) objs) + +generateClassDeclerations :: String -> [[String]] -> TypeTable -> ShowS +generateClassDeclerations prefix objs typeTable = foldl (.) id (map (makeClass prefix typeTable) objs) makeUpcast :: TypeTable -> [String] -> ShowS makeUpcast table [obj] = id -- no casting for GObject @@ -285,3 +266,9 @@ +templateSubstitute :: String -> (String -> ShowS) -> ShowS +templateSubstitute template varSubst = doSubst template + where doSubst [] = id + doSubst ('@':cs) = let (var,_:cs') = span ('@'/=) cs + in varSubst var . doSubst cs' + doSubst (c:cs) = sc c . doSubst cs |
From: Duncan C. <dun...@us...> - 2004-12-12 21:57:42
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24125 Modified Files: ChangeLog Makefile.am Log Message: Fix linker bug (use haskell98 rather than base as a gtk package dependency) When registering packages during installation use update rather than add so that reinstalls do not fail. Resture use of $(HCFLAGS) provided by ./configure --with-hcflags small notation fix in Makefile.am Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile.am 12 Dec 2004 14:28:12 -0000 1.21 +++ Makefile.am 12 Dec 2004 21:57:31 -0000 1.22 @@ -210,7 +210,7 @@ libHSgtk_a_PACKAGEDEPS = libHSgtk_a_HEADER = gtk/gtk.h libHSgtk_a_PRECOMP = gtk/gtk.precomp -libHSgtk_a_LIBS = @GTK_LIBS@ +libHSgtk_a_LIBS = $(GTK_LIBS) libHSgtk_a_HCFLAGS = -fglasgow-exts libHSgtk_a_CFLAGS = $(filter-out -I% -D%,$(GTK_CFLAGS)) libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GTK_CFLAGS)) Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.252 retrieving revision 1.253 diff -u -d -r1.252 -r1.253 --- ChangeLog 12 Dec 2004 18:23:55 -0000 1.252 +++ ChangeLog 12 Dec 2004 21:57:31 -0000 1.253 @@ -1,3 +1,16 @@ +2004-12-12 Duncan Coutts <du...@co...> + + * gtk/gtk.pkg.in: change package_deps to haskell98 rather than base to + fix linker problem. + + * Makefile.am: use $()-style make variable rather than @@-style + variable substitution. + + * mk/common.mk: restore use of the $(HCFLAGS) in compile and link + commands. The variable comes from ./configure's --with-hcflags + parameter. Also when registering packages use update rather than add + so that reinstallations do not fail. + 2004-12-12 Axel Simon <A....@ke...> * gtk/menuComboToolbar/Toolbar.chs.pp: Change comments in order |
From: Duncan C. <dun...@us...> - 2004-12-12 21:57:42
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24125/mk Modified Files: common.mk Log Message: Fix linker bug (use haskell98 rather than base as a gtk package dependency) When registering packages during installation use update rather than add so that reinstalls do not fail. Resture use of $(HCFLAGS) provided by ./configure --with-hcflags small notation fix in Makefile.am Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- common.mk 12 Dec 2004 14:28:12 -0000 1.42 +++ common.mk 12 Dec 2004 21:57:32 -0000 1.43 @@ -10,13 +10,13 @@ $(if $(subst .,,$(srcdir)),$(addprefix $(srcdir)/,$(SOURCEDIRS)), \ $(SOURCEDIRS)))) -LINK = $(strip $(HC) -o $@ $($(NAME)_HCFLAGS) \ +LINK = $(strip $(HC) -o $@ $(HCFLAGS) $($(NAME)_HCFLAGS) \ $(addprefix -package ,$($(NAME)_PACKAGEDEPS)) \ $(AM_LDFLAGS) $($(NAME)_LDFLAGS)) .hs.o: $(CONFIG_H) @echo Building for $(NAME) - $(strip $(HC) -c $< -o $@ $($(NAME)_HCFLAGS) -i$(VPATH) \ + $(strip $(HC) -c $< -o $@ $(HCFLAGS) $($(NAME)_HCFLAGS) -i$(VPATH) \ $(addprefix -package ,$($(NAME)_PACKAGEDEPS)) \ $(addprefix -package-name ,$(notdir $(basename $($(NAME)_PACKAGE)))) \ $(addprefix '-\#include<,$(addsuffix >',$(CONFIG_H) \ @@ -114,7 +114,7 @@ $(if $(PKGCONF),if test -f $(PKGCONF); then :; \ else echo "[]" > $(PKGCONF); fi;) $(foreach pkgname,$(lib_LIBRARIES), \ - $(GHCPKG) $(addprefix -f ,$(PKGCONF)) -a -g \ + $(GHCPKG) $(addprefix -f ,$(PKGCONF)) -u -g \ -Dprefix=$(prefix) -Dexec_prefix=$(exec_prefix) \ -i $(call getVar,$(pkgname),PACKAGE);) |
From: Duncan C. <dun...@us...> - 2004-12-12 21:57:41
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24125/gtk Modified Files: gtk.pkg.in Log Message: Fix linker bug (use haskell98 rather than base as a gtk package dependency) When registering packages during installation use update rather than add so that reinstalls do not fail. Resture use of $(HCFLAGS) provided by ./configure --with-hcflags small notation fix in Makefile.am Index: gtk.pkg.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/gtk.pkg.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gtk.pkg.in 9 Dec 2004 18:44:59 -0000 1.1 +++ gtk.pkg.in 12 Dec 2004 21:57:31 -0000 1.2 @@ -8,7 +8,7 @@ extra_libraries = [@GTK_LIBS_CQ@], include_dirs = [@GTK_CFLAGS_CQ@], c_includes = ["gtk/gtk.h"], - package_deps = ["base"], + package_deps = ["haskell98"], extra_ghc_opts = [], extra_cc_opts = [], extra_ld_opts = [@GTK_LIBEXTRA_CQ@] |
From: Axel S. <as...@us...> - 2004-12-12 18:24:37
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9191/gtk/menuComboToolbar Modified Files: Toolbar.chs.pp Log Message: Changed comments in Toolbar, removed duplicated entry in Adjustment. Index: Toolbar.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/menuComboToolbar/Toolbar.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Toolbar.chs.pp 1 Dec 2004 10:12:39 -0000 1.2 +++ Toolbar.chs.pp 12 Dec 2004 18:23:58 -0000 1.3 @@ -19,49 +19,47 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- | --- --- Create bars of buttons and other widgets. --- --- * This widget underwent a signficant overhaul in gtk 2.4 and the recommended --- api changed substantially. The old interface is still supported but it is --- not recommended. --- --- * The following information applies to the /new/ interface only. --- --- A toolbar is created using 'toolbarNew'. A toolbar can contain instances of --- a subclass of "ToolItem". To add a "ToolItem" to the a toolbar, use --- 'toolbarInsert'. To remove an item from the toolbar use 'containerRemove'. --- To add a button to the toolbar, add an instance of "ToolButton". --- --- Toolbar items can be visually grouped by adding instances of --- "SeparatorToolItem" to the toolbar. If a "SeparatorToolItem" has the --- \"expand\" property set to True and the \"draw\" property set to False the --- effect is to force all following items to the end of the toolbar. --- --- Creating a context menu for the toolbar can be done using --- 'onPopupContextMenu'. --- +{- | Create bars of buttons and other widgets. + + * This widget underwent a signficant overhaul in gtk 2.4 and the recommended + api changed substantially. The old interface is still supported but it is + not recommended. + + * The following information applies to the new interface only. + + A toolbar is created using 'toolbarNew'. A toolbar can contain instances of + a subclass of "ToolItem". To add a "ToolItem" to the a toolbar, use + 'toolbarInsert'. To remove an item from the toolbar use 'containerRemove'. + To add a button to the toolbar, add an instance of "ToolButton". + + Toolbar items can be visually grouped by adding instances of + "SeparatorToolItem" to the toolbar. If a "SeparatorToolItem" has the + \"expand\" property set to True and the \"draw\" property set to False the + effect is to force all following items to the end of the toolbar. + + Creating a context menu for the toolbar can be done using + 'onPopupContextMenu'. + #ifndef DISABLE_DEPRECATED --- * The following information applies to the old interface only. --- --- 'Button's, 'RadioButton's and 'ToggleButton's can be added by refering to --- stock images. Their size can be changed by calling 'toolbarSetIconSize'. In --- contrast, normal widget cannot be added. Due to the bad interface of --- GtkToolbar mnemonics of 'RadioButton's and 'ToggleButton's are not honored. --- --- All the append, insert and prepend functions use an internal function to --- do the actual work. In fact the interface is pretty skrewed up: To insert --- icons by using stock items is definitely the best practice as all other --- images cannot react to 'toolbarSetIconSize' and other theming actions. On --- the other hand 'toolbarInsertStock' always generates simple 'Button's --- but is the only function that is able to insert 'Mnemonic's on the label. --- Our solution is to use 'StockItem's to specify all 'Images' of the --- 'Buttons'. If the user inserts 'RadioButton's or 'ToggleButton's, the stock --- image lookup is done manually. A mnemonic in the labels is sadly not --- honored this way. --- + * The following information applies to the old interface only. + + 'Button's, 'RadioButton's and 'ToggleButton's can be added by refering to + stock images. Their size can be changed by calling 'toolbarSetIconSize'. In + contrast, normal widget cannot be added. Due to the bad interface of + GtkToolbar mnemonics of 'RadioButton's and 'ToggleButton's are not honored. + + All the append, insert and prepend functions use an internal function to + do the actual work. In fact the interface is pretty skrewed up: To insert + icons by using stock items is definitely the best practice as all other + images cannot react to 'toolbarSetIconSize' and other theming actions. On + the other hand 'toolbarInsertStock' always generates simple 'Button's + but is the only function that is able to insert 'Mnemonic's on the label. + Our solution is to use 'StockItem's to specify all 'Images' of the + 'Buttons'. If the user inserts 'RadioButton's or 'ToggleButton's, the stock + image lookup is done manually. A mnemonic in the labels is sadly not + honored this way. #endif +-} module Toolbar( Toolbar, ToolbarClass, |
From: Axel S. <as...@us...> - 2004-12-12 18:24:36
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9191 Modified Files: ChangeLog Log Message: Changed comments in Toolbar, removed duplicated entry in Adjustment. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.251 retrieving revision 1.252 diff -u -d -r1.251 -r1.252 --- ChangeLog 12 Dec 2004 18:09:38 -0000 1.251 +++ ChangeLog 12 Dec 2004 18:23:55 -0000 1.252 @@ -1,5 +1,10 @@ 2004-12-12 Axel Simon <A....@ke...> + * gtk/menuComboToolbar/Toolbar.chs.pp: Change comments in order + not to confuse haddock. The pre-processor leaves blank lines which + makes haddock assume the comment has ended. Use mult-line + comments. + * gtk/abstract/Range.chs, abstract/Widget.chs, display/Label.chs, misc/Adjustment.chs, scrolling/HScrollbar.chs, scrolling/VScrollbar.chs: Add some more functions. |
From: Axel S. <as...@us...> - 2004-12-12 18:24:20
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/pango In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9191/gtk/pango Modified Files: PangoEnums.chs Log Message: Changed comments in Toolbar, removed duplicated entry in Adjustment. Index: PangoEnums.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/PangoEnums.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PangoEnums.chs 12 Dec 2004 11:18:41 -0000 1.1 +++ PangoEnums.chs 12 Dec 2004 18:24:09 -0000 1.2 @@ -1,3 +1,4 @@ +-- -*-haskell-*- -- GIMP Toolkit (GTK) Enumerations for Pango. -- -- Author : Axel Simon |
From: Axel S. <as...@us...> - 2004-12-12 18:24:20
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9191/gtk/misc Modified Files: Adjustment.chs Log Message: Changed comments in Toolbar, removed duplicated entry in Adjustment. Index: Adjustment.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/misc/Adjustment.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Adjustment.chs 12 Dec 2004 18:09:50 -0000 1.6 +++ Adjustment.chs 12 Dec 2004 18:23:59 -0000 1.7 @@ -143,13 +143,7 @@ adjustmentGetValue adj = liftM realToFrac $ {#call adjustment_get_value#} adj --- | Retrieve the current value. -adjustmentGetValue :: Adjustment -> IO Double -adjustmentGetValue a = - liftM realToFrac $ {#call adjustment_get_value#} (toAdjustment a) - --- | Ensure that the alignment is within these --- bounds. +-- | Ensure that the alignment is within these bounds. -- -- * Updates the Adjustment value to ensure that the range between lower and -- upper is in the current page (i.e. between value and value + page_size). |
From: Axel S. <as...@us...> - 2004-12-12 18:10:18
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5882 Modified Files: ChangeLog Log Message: Add some more functions for better scrollbar support. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.250 retrieving revision 1.251 diff -u -d -r1.250 -r1.251 --- ChangeLog 12 Dec 2004 14:28:11 -0000 1.250 +++ ChangeLog 12 Dec 2004 18:09:38 -0000 1.251 @@ -1,5 +1,9 @@ 2004-12-12 Axel Simon <A....@ke...> + * gtk/abstract/Range.chs, abstract/Widget.chs, + display/Label.chs, misc/Adjustment.chs, scrolling/HScrollbar.chs, + scrolling/VScrollbar.chs: Add some more functions. + * Makefile.am, mk/common.mk: Avoid building dependencies when saying "make clean". @@ -23,6 +27,7 @@ * sourceview/sourceview.pkg.in: Added forgotten comma. + 2004-12-9 Duncan Coutts <du...@co...> * gtk/embedding/Embedding.hsc, gtk/entry/EntryCompletion.chs.pp, |
From: Axel S. <as...@us...> - 2004-12-12 18:10:01
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/display In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5882/d/display Modified Files: Label.chs Log Message: Add some more functions for better scrollbar support. Index: Label.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/display/Label.chs,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Label.chs 6 Aug 2004 01:31:42 -0000 1.8 +++ Label.chs 12 Dec 2004 18:09:49 -0000 1.9 @@ -20,9 +20,8 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- | +-- | A label is a piece of static text in a user interface. -- - module Label( Label, LabelClass, @@ -32,7 +31,6 @@ labelSetText, labelSetLabel, labelSetTextWithMnemonic, - module Markup, labelSetMarkup, labelSetMarkupWithMnemonic, labelSetMnemonicWidget, |
From: Axel S. <as...@us...> - 2004-12-12 18:10:00
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/scrolling In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5882/d/scrolling Modified Files: HScrollbar.chs VScrollbar.chs Log Message: Add some more functions for better scrollbar support. Index: VScrollbar.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/scrolling/VScrollbar.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- VScrollbar.chs 23 May 2004 16:14:09 -0000 1.5 +++ VScrollbar.chs 12 Dec 2004 18:09:50 -0000 1.6 @@ -29,7 +29,8 @@ VScrollbar, VScrollbarClass, castToVScrollbar, - vScrollbarNew + vScrollbarNew, + vScrollbarNewDefaults ) where import Monad (liftM) @@ -48,3 +49,12 @@ vScrollbarNew :: Adjustment -> IO VScrollbar vScrollbarNew adj = makeNewObject mkVScrollbar $ liftM castPtr $ {#call unsafe vscrollbar_new#} adj + +-- | Create a new HScrollbar with a default 'Adjustment'. +-- +vScrollbarNewDefaults :: IO VScrollbar +vScrollbarNewDefaults = makeNewObject mkVScrollbar $ liftM castPtr $ + {#call unsafe vscrollbar_new#} (mkAdjustment nullForeignPtr) + + + Index: HScrollbar.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/scrolling/HScrollbar.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- HScrollbar.chs 23 May 2004 16:14:09 -0000 1.5 +++ HScrollbar.chs 12 Dec 2004 18:09:50 -0000 1.6 @@ -29,7 +29,8 @@ HScrollbar, HScrollbarClass, castToHScrollbar, - hScrollbarNew + hScrollbarNew, + hScrollbarNewDefaults ) where import Monad (liftM) @@ -48,3 +49,11 @@ hScrollbarNew :: Adjustment -> IO HScrollbar hScrollbarNew adj = makeNewObject mkHScrollbar $ liftM castPtr $ {#call unsafe hscrollbar_new#} adj + +-- | Create a new HScrollbar without an 'Adjustment'. +-- +hScrollbarNewDefaults :: IO HScrollbar +hScrollbarNewDefaults = makeNewObject mkHScrollbar $ liftM castPtr $ + {#call unsafe hscrollbar_new#} (mkAdjustment nullForeignPtr) + + |
From: Axel S. <as...@us...> - 2004-12-12 18:10:00
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5882/d/misc Modified Files: Adjustment.chs Log Message: Add some more functions for better scrollbar support. Index: Adjustment.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/misc/Adjustment.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Adjustment.chs 29 Jul 2004 12:15:55 -0000 1.5 +++ Adjustment.chs 12 Dec 2004 18:09:50 -0000 1.6 @@ -19,10 +19,11 @@ -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- --- | +-- | An adjustment is a bounded value controlled by the user. -- -- An Adjustment object contains a value with maximum bounds and a step size. --- It is used to represent the value of a scoll bar and similar widgets. +-- It is used to represent the value of a scoll bar and similar widgets. In +-- particular it is contained in the abstract 'Range' widget. -- module Adjustment( @@ -30,6 +31,16 @@ AdjustmentClass, castToAdjustment, adjustmentNew, + adjustmentSetLower, + adjustmentGetLower, + adjustmentSetPageIncrement, + adjustmentGetPageIncrement, + adjustmentSetPageSize, + adjustmentGetPageSize, + adjustmentSetStepIncrement, + adjustmentGetStepIncrement, + adjustmentSetUpper, + adjustmentGetUpper, adjustmentSetValue, adjustmentGetValue, adjustmentClampPage, @@ -42,9 +53,10 @@ import Monad (liftM) import FFI -import Object (makeNewObject) +import Object (makeNewObject, objectSetProperty, objectGetProperty) {#import Hierarchy#} {#import Signal#} +{#import GValue#} {# context lib="gtk" prefix="gtk" #} @@ -67,6 +79,58 @@ (realToFrac stepIncrement) (realToFrac pageIncrement) (realToFrac pageSize) +-- | Set the lower value. +adjustmentSetLower :: Adjustment -> Double -> IO () +adjustmentSetLower a val = objectSetProperty a "lower" (GVdouble val) + +-- | Retrieve the lower value. +adjustmentGetLower :: Adjustment -> IO Double +adjustmentGetLower a = do + (GVdouble res) <- objectGetProperty a "lower" + return res + +-- | Set the page increment value. +adjustmentSetPageIncrement :: Adjustment -> Double -> IO () +adjustmentSetPageIncrement a val = objectSetProperty a "page-increment" + (GVdouble val) + +-- | Retrieve the pageincrement value. +adjustmentGetPageIncrement :: Adjustment -> IO Double +adjustmentGetPageIncrement a = do + (GVdouble res) <- objectGetProperty a "page-increment" + return res + +-- | Set the page size value. +adjustmentSetPageSize :: Adjustment -> Double -> IO () +adjustmentSetPageSize a val = objectSetProperty a "page_size" (GVdouble val) + +-- | Retrieve the page size value. +adjustmentGetPageSize :: Adjustment -> IO Double +adjustmentGetPageSize a = do + (GVdouble res) <- objectGetProperty a "page_size" + return res + +-- | Set the step-increment value. +adjustmentSetStepIncrement :: Adjustment -> Double -> IO () +adjustmentSetStepIncrement a val = objectSetProperty a "step-increment" + (GVdouble val) + +-- | Retrieve the step-increment value. +adjustmentGetStepIncrement :: Adjustment -> IO Double +adjustmentGetStepIncrement a = do + (GVdouble res) <- objectGetProperty a "step-increment" + return res + +-- | Set the upper value. +adjustmentSetUpper :: Adjustment -> Double -> IO () +adjustmentSetUpper a val = objectSetProperty a "upper" (GVdouble val) + +-- | Retrieve the upper value. +adjustmentGetUpper :: Adjustment -> IO Double +adjustmentGetUpper a = do + (GVdouble res) <- objectGetProperty a "upper" + return res + -- | Set the current value of the Adjustment object. -- adjustmentSetValue :: Adjustment -> Double -> IO () @@ -79,6 +143,11 @@ adjustmentGetValue adj = liftM realToFrac $ {#call adjustment_get_value#} adj +-- | Retrieve the current value. +adjustmentGetValue :: Adjustment -> IO Double +adjustmentGetValue a = + liftM realToFrac $ {#call adjustment_get_value#} (toAdjustment a) + -- | Ensure that the alignment is within these -- bounds. -- |
From: Axel S. <as...@us...> - 2004-12-12 18:09:59
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/abstract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5882/d/abstract Modified Files: Range.chs Widget.chs Log Message: Add some more functions for better scrollbar support. Index: Range.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/Range.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Range.chs 1 Aug 2004 16:08:14 -0000 1.6 +++ Range.chs 12 Dec 2004 18:09:39 -0000 1.7 @@ -23,18 +23,24 @@ -- -- An abstract base class to handle widgets that represent some value range. -- - +-- * For signals regarding a change in the range or increments, refer to +-- 'Adjustment' which is contained in the 'Range' object. +-- module Range( Range, RangeClass, castToRange, rangeGetAdjustment, + rangeSetAdjustment, UpdateType(..), - rangeSetUpdatePolicy, rangeGetUpdatePolicy, - rangeSetAdjustment, + rangeSetUpdatePolicy, rangeGetInverted, rangeSetInverted, + rangeGetValue, + rangeSetValue, + rangeSetIncrements, + rangeSetRange, ScrollType(..), rangeSetIncrements, rangeSetRange, @@ -62,11 +68,10 @@ rangeGetAdjustment r = makeNewObject mkAdjustment $ {#call unsafe range_get_adjustment#} (toRange r) --- | Set how the internal 'Adjustment' object is updated. +-- | Insert a new 'Adjustment' object. -- -rangeSetUpdatePolicy :: RangeClass r => r -> UpdateType -> IO () -rangeSetUpdatePolicy r up = {#call range_set_update_policy#} - (toRange r) ((fromIntegral.fromEnum) up) +rangeSetAdjustment :: RangeClass r => r -> Adjustment -> IO () +rangeSetAdjustment r adj = {#call range_set_adjustment#} (toRange r) adj -- | Get the update policy for the range widget. -- @@ -74,10 +79,14 @@ rangeGetUpdatePolicy r = liftM (toEnum.fromIntegral) $ {#call unsafe range_get_update_policy#} (toRange r) --- | Insert a new 'Adjustment' object. +-- | Set how the internal 'Adjustment' object is updated. -- -rangeSetAdjustment :: RangeClass r => r -> Adjustment -> IO () -rangeSetAdjustment r adj = {#call range_set_adjustment#} (toRange r) adj +-- * The value of 'UpdateType' determines how frequently value-changed +-- signals are emitted on the internal 'Adjustment' object. +-- +rangeSetUpdatePolicy :: RangeClass r => r -> UpdateType -> IO () +rangeSetUpdatePolicy r up = {#call range_set_update_policy#} + (toRange r) ((fromIntegral.fromEnum) up) -- | Get the inverted flag (determines if the range is reversed). -- @@ -90,7 +99,24 @@ rangeSetInverted :: RangeClass r => r -> Bool -> IO () rangeSetInverted r inv = {#call range_set_inverted#} (toRange r) (fromBool inv) --- | Sets the step and page sizes for the range. The step size is used when the +-- | Gets the current value of the range. +-- +rangeGetValue :: RangeClass r => r -> IO Double +rangeGetValue r = liftM realToFrac $ + {#call unsafe range_get_value#} (toRange r) + +-- | Sets the current value of the range. The range emits the \"value_changed\" +-- signal if the value changes. +-- +-- * If the value is outside the minimum or maximum range values, it will be +-- clamped to fit inside them. +-- +rangeSetValue :: RangeClass r => r -> Double -> IO () +rangeSetValue r value = + {#call range_set_value#} (toRange r) (realToFrac value) + +-- | Sets the step and page sizes for the range. +-- The step size is used when the -- user clicks the "Scrollbar" arrows or moves "Scale" via arrow keys. The -- page size is used for example when moving via Page Up or Page Down keys. -- @@ -111,22 +137,6 @@ rangeSetRange r min max = {#call range_set_range#} (toRange r) (realToFrac min) (realToFrac max) --- | Sets the current value of the range. The range emits the \"value_changed\" --- signal if the value changes. --- --- * If the value is outside the minimum or maximum range values, it will be --- clamped to fit inside them. --- -rangeSetValue :: RangeClass r => r -> Double -> IO () -rangeSetValue r value = - {#call range_set_value#} (toRange r) (realToFrac value) - --- | Gets the current value of the range. --- -rangeGetValue :: RangeClass r => r -> IO Double -rangeGetValue r = liftM realToFrac $ - {#call unsafe range_get_value#} (toRange r) - -- signals -- | The slide has moved. The arguments give Index: Widget.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/Widget.chs,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Widget.chs 23 May 2004 15:46:02 -0000 1.14 +++ Widget.chs 12 Dec 2004 18:09:49 -0000 1.15 @@ -128,6 +128,8 @@ afterProximityIn, onProximityOut, afterProximityOut, + onRealize, + afterRealize, onScroll, afterScroll, onShow, @@ -592,6 +594,13 @@ onProximityOut = event "proximity_out_event" [ProximityOutMask] False afterProximityOut = event "proximity_out_event" [ProximityOutMask] True +-- | This widget's drawing area is about to be +-- destroyed. +-- +onRealize, afterRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w) +onRealize = connect_NONE__NONE "realize" False +afterRealize = connect_NONE__NONE "realize" True + -- | The mouse wheel has turned. -- -- * The 'Event' is always 'Scroll'. |
From: Axel S. <as...@us...> - 2004-12-12 14:28:26
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23205/mk Modified Files: common.mk Log Message: Make installation work. mogul is broken since it's not in configure. Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- common.mk 9 Dec 2004 18:45:01 -0000 1.41 +++ common.mk 12 Dec 2004 14:28:12 -0000 1.42 @@ -120,11 +120,10 @@ uninstall-hook : $(foreach pkgname,$(lib_LIBRARIES), \ - if test -f $(PKGCONF); then \ $(GHCPKG) $(addprefix -f ,$(PKGCONF)) \ - -r $(patsubst lib%,%,$(basename $(notdir $(pkgname)))); \ - $(if $(PKGCONF),\ + -r `cat $(call getVar,$(pkgname),PACKAGE) | $(GREP) name | $(SED) "s/ *name *= *\"\([a-zA-Z0-9]*\)\",/\1/"`;) \ + $(if $(PKGCONF),if test -f $(PKGCONF); then \ if test -n `head $(PKGCONF) | $(GREP) -e "\[\]"`; then \ - $(RM) $(PKGCONF) $(PKGCONF).old; fi;) \ - fi;) + $(RM) $(PKGCONF) $(PKGCONF).old; fi; \ + fi) |
From: Axel S. <as...@us...> - 2004-12-12 14:28:25
|
Update of /cvsroot/gtk2hs/gtk2hs/sourceview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23205/sourceview Modified Files: sourceview.pkg.in Log Message: Make installation work. mogul is broken since it's not in configure. Index: sourceview.pkg.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/sourceview.pkg.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sourceview.pkg.in 9 Dec 2004 18:45:00 -0000 1.2 +++ sourceview.pkg.in 12 Dec 2004 14:28:13 -0000 1.3 @@ -12,7 +12,7 @@ "gtksourceview/gtksourcelanguagesmanager.h", "gtksourceview/gtksourcetag.h", "gtksourceview/gtksourcemarker.h", - "gtksourceview/gtksourceiter.h"] + "gtksourceview/gtksourceiter.h"], package_deps = ["gtk"], extra_ghc_opts = [], extra_cc_opts = [], |
From: Axel S. <as...@us...> - 2004-12-12 14:28:25
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23205 Modified Files: ChangeLog Makefile.am acinclude.m4 configure.ac Log Message: Make installation work. mogul is broken since it's not in configure. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/acinclude.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- acinclude.m4 9 Dec 2004 18:44:58 -0000 1.3 +++ acinclude.m4 12 Dec 2004 14:28:12 -0000 1.4 @@ -108,7 +108,7 @@ dnl GTKHS_REFORMAT_PACKAGE_LIBS(LIBS, LIBS_CQ, LIBDIR_CQ, LIBEXTRA_CQ) dnl dnl for ghc package.conf files, we need to convert from -dnl LIBS = -Wl,--export-dynamic -lfoo -lbar -I/usr/lib/foo -I/usr/lib/bar +dnl LIBS = -Wl,--export-dynamic -lfoo -lbar -L/usr/lib/foo -L/usr/lib/bar dnl to dnl LIBS_CQ = "foo", "bar" dnl LIBDIR_CQ = "/usr/lib/bar","/usr/lib/bar" @@ -120,8 +120,14 @@ for FLAG in [$][$1]; do case [$]FLAG in -l*) [$2]="[$][$2][$]C_LIBS\"[$]{FLAG#-l}\""; C_LIBS=",";; - -L*) [$3]="[$][$3][$]C_LDIR\"[$]{FLAG#-I}\""; C_LDIR=",";; + -L*) [$3]="[$][$3][$]C_LDIR\"[$]{FLAG#-L}\""; C_LDIR=",";; *) [$4]="[$][$4][$]C_XTRA\"[$]FLAG\""; C_XTRA=",";; esac; done; +dnl Fix for ghc-pkg in that it doesn't differ between paths to extra +dnl libraries and paths to Haskell libraries. We have to append the +dnl path to where the Haskell libraries are going to be installed in +dnl case they go into a non-standard directory. If they go into a +dnl standard directory then we duplicate a path here. Dough. +[$3]="[$][$3][$]C_LDIR\"[$]libdir\""; ])dnl Index: configure.ac =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- configure.ac 9 Dec 2004 18:44:58 -0000 1.11 +++ configure.ac 12 Dec 2004 14:28:12 -0000 1.12 @@ -284,12 +284,6 @@ GCONF_CFLAGS=`CFLAGS="$GTK_CFLAGS" tools/checkDirs.sh $GCONF_CFLAGS`; GCONF_LIBS=`LDFLAGS="$GTK_LIBS" tools/checkDirs.sh $GCONF_LIBS`; -dnl Fix for ghc-pkg in that it doesn't differ between paths to extra -dnl libraries and paths to Haskell libraries. We have to append the -dnl path to where the Haskell libraries are going to be installed in -dnl case they go into a non-standard directory. If they go into a -dnl standard directory then we duplicate a path here. Dough. -GTK_LIBS="$GTK_LIBS -L$libdir"; dnl Change the representation of these flags to "flag1","flag2". The dnl letters CQ stand for Comma, Quote. @@ -300,6 +294,8 @@ AC_SUBST(GTK_LIBDIR_CQ) AC_SUBST(GTK_LIBEXTRA_CQ) +dnl Fix another bug in ghc-pkg where it doesn't look into directories +dnl for dependant packages when building the .o file. GTKHS_REFORMAT_PACKAGE_CFLAGS(SOURCEVIEW_CFLAGS, SOURCEVIEW_CFLAGS_CQ) GTKHS_REFORMAT_PACKAGE_LIBS(SOURCEVIEW_LIBS, SOURCEVIEW_LIBS_CQ, SOURCEVIEW_LIBDIR_CQ, SOURCEVIEW_LIBEXTRA_CQ) Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Makefile.am 12 Dec 2004 12:45:18 -0000 1.20 +++ Makefile.am 12 Dec 2004 14:28:12 -0000 1.21 @@ -420,7 +420,7 @@ mogul/TreeList.hs \ mogul/WidgetTable.hs -libHSmogul_a_LIBADD = libHSgtk.a +libHSmogul_a_DEPENDENCIES = libHSgtk.a am_libHSmogul_a_OBJECTS = \ $(addsuffix .$(OBJEXT),$(basename $(basename $(libHSmogul_a_SOURCES)))) @@ -457,7 +457,7 @@ glade/GladeType.chs \ glade/Glade.chs -libHSglade_a_LIBADD = libHSgtk.a +libHSglade_a_DEPENDENCIES = libHSgtk.a glade/GladeType.chs : $(srcdir)/tools/hierarchyGen/hierarchy.list \ $(srcdir)/tools/hierarchyGen/TypeGenerator @@ -514,7 +514,7 @@ gconf/System/Gnome/GConf/GConfClient.chs \ gconf/System/Gnome/GConf.hs -libHSgconf_a_LIBADD = libHSgtk.a +libHSgconf_a_DEPENDENCIES = libHSgtk.a gconf/System/Gnome/GConf/GConfType.chs : \ $(srcdir)/tools/hierarchyGen/hierarchy.list \ @@ -581,7 +581,7 @@ sourceview/SourceTagTable.chs \ sourceview/SourceView.chs -libHSsourceview_a_LIBADD = libHSgtk.a +libHSsourceview_a_DEPENDENCIES = libHSgtk.a sourceview/SourceViewType.chs : \ $(srcdir)/tools/hierarchyGen/hierarchy.list \ Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.249 retrieving revision 1.250 diff -u -d -r1.249 -r1.250 --- ChangeLog 12 Dec 2004 12:45:18 -0000 1.249 +++ ChangeLog 12 Dec 2004 14:28:11 -0000 1.250 @@ -17,6 +17,11 @@ * gtk/general/Structs.hsc: Changed the type of pangoScale from Int to Integer. + + * acinclude.m4: Replaced a -I with a -L which fixes installation + of packages. + + * sourceview/sourceview.pkg.in: Added forgotten comma. 2004-12-9 Duncan Coutts <du...@co...> |
From: Axel S. <as...@us...> - 2004-12-12 12:45:31
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1863 Modified Files: ChangeLog Makefile.am Log Message: Make the newly added bits on font handling compile. Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Makefile.am 12 Dec 2004 11:04:20 -0000 1.19 +++ Makefile.am 12 Dec 2004 12:45:18 -0000 1.20 @@ -215,7 +215,7 @@ libHSgtk_a_CFLAGS = $(filter-out -I% -D%,$(GTK_CFLAGS)) libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GTK_CFLAGS)) -libHSgtk_a_SOURCES = \ +libHSgtk_a_SOURCES = \ gtk/general/Hierarchy.chs \ gtk/general/Signal.chs \ gtk/glib/GValue.chs \ @@ -329,6 +329,8 @@ gtk/glib/GError.chs.pp \ gtk/glib/GType.chs \ gtk/glib/GValueTypes.chs \ + gtk/pango/Description.chs \ + gtk/pango/PangoEnums.chs \ gtk/pango/PangoLayout.chs \ gtk/pango/Rendering.chs \ gtk/embedding/Plug.chs \ Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.248 retrieving revision 1.249 diff -u -d -r1.248 -r1.249 --- ChangeLog 12 Dec 2004 11:04:20 -0000 1.248 +++ ChangeLog 12 Dec 2004 12:45:18 -0000 1.249 @@ -3,6 +3,21 @@ * Makefile.am, mk/common.mk: Avoid building dependencies when saying "make clean". + * gtk/pango/Description.chs, gtk/pango/PangoEnums.chs: Rearranged + enumerations, added new functions to query fonts. + + * gtk/pango/Markup.hs, gtk/pango/PangoLayout.chs, + gtk/pango/PangoTypes.chs.pp, gtk/pango/Rendering.chs: As above. + New functionality only available due to fixed in c2hs that allow + type synonyms in hooks. + + * tools/hierarchyGen/hierarchy.list: Corrected a typo. + + * demo/unicode/Arabic.hs: Simplify example. + + * gtk/general/Structs.hsc: Changed the type of pangoScale from Int + to Integer. + 2004-12-9 Duncan Coutts <du...@co...> * gtk/embedding/Embedding.hsc, gtk/entry/EntryCompletion.chs.pp, |
From: Axel S. <as...@us...> - 2004-12-12 12:45:29
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/pango In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1863/gtk/pango Modified Files: Description.chs PangoTypes.chs.pp Rendering.chs Log Message: Make the newly added bits on font handling compile. Index: Description.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/Description.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Description.chs 12 Dec 2004 11:18:41 -0000 1.1 +++ Description.chs 12 Dec 2004 12:45:19 -0000 1.2 @@ -1,3 +1,4 @@ +-- -*-haskell-*- -- GIMP Toolkit (GTK) - text layout functions: Font Descriptions -- -- Author : Axel Simon @@ -106,12 +107,12 @@ -- * Most fonts will have either a 'StyleItalic' or 'StyleQblique' -- but rarely both. -- -fontDescriptionSetStyle :: FontDescription -> Style -> IO () +fontDescriptionSetStyle :: FontDescription -> FontStyle -> IO () fontDescriptionSetStyle fd p = {#call unsafe set_style#} fd (fromIntegral (fromEnum p)) -- | Get the style field. -fontDescriptionGetStyle :: FontDescription -> IO (Maybe Style) +fontDescriptionGetStyle :: FontDescription -> IO (Maybe FontStyle) fontDescriptionGetStyle fd = do fields <- {#call unsafe get_set_fields#} fd if (fromEnum PangoFontMaskStyle) .&. (fromIntegral fields) /=0 @@ -243,7 +244,7 @@ strPtr <- {#call unsafe to_string#} fd str <- peekUTFString strPtr {#call unsafe g_free#} (castPtr strPtr) - return strPtr + return str Index: PangoTypes.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/PangoTypes.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- PangoTypes.chs.pp 12 Dec 2004 11:18:41 -0000 1.2 +++ PangoTypes.chs.pp 12 Dec 2004 12:45:19 -0000 1.3 @@ -1,3 +1,4 @@ +-- -*-haskell-*- -- GIMP Toolkit (GTK) - pango non-GObject types PangoTypes -- -- Author : Axel Simon @@ -151,5 +152,5 @@ emptyLanguage = Language nullPtr languageFromString :: String -> IO Language -languageFromString language = +languageFromString language = liftM Language $ withUTFString language {#call language_from_string#} Index: Rendering.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/Rendering.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Rendering.chs 12 Dec 2004 11:18:41 -0000 1.4 +++ Rendering.chs 12 Dec 2004 12:45:19 -0000 1.5 @@ -1,3 +1,4 @@ +-- -*-haskell-*- -- GIMP Toolkit (GTK) - text layout functions Rendering -- -- Author : Axel Simon @@ -156,7 +157,7 @@ -- | Set the default 'Language' of this context. -- contextSetLanguage :: PangoContext -> Language -> IO () -contextSetLanguage pc (Language l) = {#call unsafe context_set_language#} pc l +contextSetLanguage = {#call unsafe context_set_language#} -- | Get the current 'Language' of this context. -- |
From: Axel S. <as...@us...> - 2004-12-12 12:45:28
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1863/gtk/general Modified Files: Structs.hsc Log Message: Make the newly added bits on font handling compile. Index: Structs.hsc =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/Structs.hsc,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Structs.hsc 9 Dec 2004 18:26:01 -0000 1.28 +++ Structs.hsc 12 Dec 2004 12:45:19 -0000 1.29 @@ -663,7 +663,7 @@ -- setting font sizes, device units are always considered to be points -- (as in \"12 point font\"), rather than pixels. -- -pangoScale :: Int +pangoScale :: Integer pangoScale = #const PANGO_SCALE |
From: Axel S. <as...@us...> - 2004-12-12 12:45:28
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1863/demo/unicode Modified Files: Arabic.hs Log Message: Make the newly added bits on font handling compile. Index: Arabic.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/demo/unicode/Arabic.hs,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Arabic.hs 3 Dec 2004 10:13:31 -0000 1.9 +++ Arabic.hs 12 Dec 2004 12:45:19 -0000 1.10 @@ -24,11 +24,10 @@ --"Is Haskell a "++markSpan [FontForeground "red"] "fantastic"++" language?"++ -- Do you find Haskell a fantastic language? (language has a grammatical -- mistake in it) - map chr [0x647,0x644,32,0x62A,0x62C,0x62F,0x646,32,0x647,0x622, - 0x633,0x643,0x622,0x644,32,0x644,0x63A,0x62A,32]++ + map chr [0x647,0x644,32,0x62A,0x62C,0x62F,0x646,32]++ markSpan [FontForeground "red"] - (map chr [0x645,0x62F,0x647,0x634,0x62A])++ - [chr 0x61F] + (map chr [0x647,0x622,0x633,0x643,0x622,0x644])++ + map chr [32,0x644,0x63A,0x62A,32,0x645,0x62F,0x647,0x634,0x62A,0x61F] yell :: IO () yell = do |
From: Axel S. <as...@us...> - 2004-12-12 12:10:13
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19720 Modified Files: hierarchy.list Log Message: Corrected a typo in FontFamily. Index: hierarchy.list =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/hierarchy.list,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- hierarchy.list 6 Aug 2004 01:48:03 -0000 1.11 +++ hierarchy.list 12 Dec 2004 12:09:53 -0000 1.12 @@ -181,16 +181,16 @@ # These ones are actualy interfaces, but interface implementations are GObjects GtkEditable GtkSourceStyleScheme if sourceview - GtkFileChooser if gtk-2.4 -# This became a GObject in version 2: - GdkGC -# These are Pango structures: - PangoContext - PangoLayout - PangoFont as Font - PangoFontFamily as FontFamiliy - PangoFontFace as FontFace - PangoFontMap as FontMap - PangoFontset as FontSet -# This type is only available for PANGO_ENABLE_BACKEND compiled source -# PangoFontsetSimple as FontSetSimple, pango_fontset_simple_get_type + GtkFileChooser +## This now became a GObject in version 2: + GdkGC as GC, gdk_gc_get_type +## These are Pango structures + PangoContext as PangoContext, pango_context_get_type + PangoLayout as PangoLayout, pango_layout_get_type + PangoFont as Font, pango_font_get_type + PangoFontFamily as FontFamily, pango_font_family_get_type + PangoFontFace as FontFace, pango_font_face_get_type + PangoFontMap as FontMap, pango_font_face_get_type + PangoFontset as FontSet, pango_fontset_get_type +## This type is only available for PANGO_ENABLE_BACKEND compiled source +## PangoFontsetSimple as FontSetSimple, pango_fontset_simple_get_type |
From: Axel S. <as...@us...> - 2004-12-12 11:18:50
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/pango In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9646 Modified Files: Markup.hs PangoLayout.chs PangoTypes.chs.pp Rendering.chs Added Files: Description.chs PangoEnums.chs Log Message: Added more stuff on querying fonts and rearranged enumerations. --- NEW FILE: Description.chs --- -- GIMP Toolkit (GTK) - text layout functions: Font Descriptions -- -- Author : Axel Simon -- -- Created: 8 Feburary 2003 -- -- Version $Revision: 1.1 $ from $Date: 2004/12/12 11:18:41 $ -- -- Copyright (c) 1999..2003 Axel Simon -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file 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 General Public License for more details. -- -- | -- -- Functions to manage font description. -- -- * Font descriptions provide a way to query and state requirements of -- fonts. This data structure has several fields describing different -- characteristics of a font. Each of these fields can be set of left -- unspecified. -- module Description( FontDescription, fontDescriptionNew, fontDescriptionCopy, fontDescriptionSetFamily, fontDescriptionGetFamily, fontDescriptionSetStyle, fontDescriptionGetStyle, fontDescriptionSetVariant, fontDescriptionGetVariant, fontDescriptionSetWeight, fontDescriptionGetWeight, fontDescriptionSetStretch, fontDescriptionGetStretch, fontDescriptionSetSize, fontDescriptionGetSize, fontDescriptionUnsetFields, fontDescriptionMerge, fontDescriptionBetterMatch, fontDescriptionFromString, fontDescriptionToString ) where import Monad (liftM) import FFI {#import Hierarchy#} import GObject (makeNewGObject) {#import PangoTypes#} import PangoEnums import Data.Ratio import Enums import Structs (pangoScale) {# context lib="pango" prefix="pango_font_description" #} -- | Create a new font description. -- -- * All field are unset. -- fontDescriptionNew :: IO FontDescription fontDescriptionNew = {#call unsafe new#} >>= makeNewFontDescription -- | Make a deep copy of a font description. -- fontDescriptionCopy :: FontDescription -> IO FontDescription fontDescriptionCopy fd = {#call unsafe copy#} fd >>= makeNewFontDescription -- | Set the font famliy. -- -- * A font family is a name designating the design of the font (e.g. Sans -- or Times) without the variant. -- -- * In some contexts a comma separated list of font families can be used. -- fontDescriptionSetFamily :: FontDescription -> String -> IO () fontDescriptionSetFamily fd family = withUTFString family $ \strPtr -> {#call unsafe set_family_static#} fd strPtr -- | Get the font family. -- -- * 'Nothing' is returned if the font family is not set. -- fontDescriptionGetFamily :: FontDescription -> IO (Maybe String) fontDescriptionGetFamily fd = do strPtr <- {#call unsafe get_family#} fd if strPtr==nullPtr then return Nothing else liftM Just $ peekUTFString strPtr -- Flags denoting which fields in a font description are set. {#enum PangoFontMask as FontMask {underscoreToCase} deriving(Bounded) #} instance Flags FontMask -- | Set the style field. -- -- * Most fonts will have either a 'StyleItalic' or 'StyleQblique' -- but rarely both. -- fontDescriptionSetStyle :: FontDescription -> Style -> IO () fontDescriptionSetStyle fd p = {#call unsafe set_style#} fd (fromIntegral (fromEnum p)) -- | Get the style field. fontDescriptionGetStyle :: FontDescription -> IO (Maybe Style) fontDescriptionGetStyle fd = do fields <- {#call unsafe get_set_fields#} fd if (fromEnum PangoFontMaskStyle) .&. (fromIntegral fields) /=0 then liftM (Just . toEnum . fromIntegral) $ {#call unsafe get_style#} fd else return Nothing -- | Set the variant field. -- fontDescriptionSetVariant :: FontDescription -> Variant -> IO () fontDescriptionSetVariant fd p = {#call unsafe set_variant#} fd (fromIntegral (fromEnum p)) -- | Get the variant field. fontDescriptionGetVariant :: FontDescription -> IO (Maybe Variant) fontDescriptionGetVariant fd = do fields <- {#call unsafe get_set_fields#} fd if (fromEnum PangoFontMaskVariant) .&. (fromIntegral fields) /=0 then liftM (Just . toEnum . fromIntegral) $ {#call unsafe get_variant#} fd else return Nothing -- | Set the weight field. -- fontDescriptionSetWeight :: FontDescription -> Weight -> IO () fontDescriptionSetWeight fd p = {#call unsafe set_weight#} fd (fromIntegral (fromEnum p)) -- | Get the weight field. fontDescriptionGetWeight :: FontDescription -> IO (Maybe Weight) fontDescriptionGetWeight fd = do fields <- {#call unsafe get_set_fields#} fd if (fromEnum PangoFontMaskWeight) .&. (fromIntegral fields) /=0 then liftM (Just . toEnum . fromIntegral) $ {#call unsafe get_weight#} fd else return Nothing -- | Set the stretch field. -- fontDescriptionSetStretch :: FontDescription -> Stretch -> IO () fontDescriptionSetStretch fd p = {#call unsafe set_stretch#} fd (fromIntegral (fromEnum p)) -- | Get the stretch field. fontDescriptionGetStretch :: FontDescription -> IO (Maybe Stretch) fontDescriptionGetStretch fd = do fields <- {#call unsafe get_set_fields#} fd if (fromEnum PangoFontMaskStretch) .&. (fromIntegral fields) /=0 then liftM (Just . toEnum . fromIntegral) $ {#call unsafe get_stretch#} fd else return Nothing -- | Set the size field. -- -- * The given size is in points (pts). One point is 1/72 inch. -- fontDescriptionSetSize :: FontDescription -> Rational -> IO () fontDescriptionSetSize fd p = {#call unsafe set_size#} fd (round (p*fromIntegral pangoScale)) -- | Get the size field. fontDescriptionGetSize :: FontDescription -> IO (Maybe Rational) fontDescriptionGetSize fd = do fields <- {#call unsafe get_set_fields#} fd if (fromEnum PangoFontMaskSize) .&. (fromIntegral fields) /=0 then liftM (\x -> Just (fromIntegral x % pangoScale)) $ {#call unsafe get_size#} fd else return Nothing -- | Reset fields in a font description. -- fontDescriptionUnsetFields :: FontDescription -> [FontMask] -> IO () fontDescriptionUnsetFields fd mask = {#call unsafe unset_fields#} fd (fromIntegral (fromFlags mask)) -- | Merge two font descriptions. -- -- * Copy fields from the second description to the first. If the boolean -- parameter is set, existing fields in the first description will be -- replaced. -- fontDescriptionMerge :: FontDescription -> FontDescription -> Bool -> IO () fontDescriptionMerge fd1 fd2 replace = {#call unsafe merge#} fd1 fd2 (fromBool replace) -- | Determine if two descriptions are simliar. -- -- * Returns 'True' if the two descriptions only differ in weight or style. -- fontDescriptionIsMatch :: FontDescription -> FontDescription -> Bool fontDescriptionIsMatch fdA fdB = unsafePerformIO $ liftM toBool $ {#call unsafe better_match#} fdA (FontDescription nullForeignPtr) fdB -- | Determine which of two descriptions matches a given description better. -- -- * Returns 'True' if the last description is a better match to the first -- arguement than the middle one. -- -- * Approximate matching is done on weight and style. If the other -- attributes do not match, the function returns 'False'. -- fontDescriptionBetterMatch :: FontDescription -> FontDescription -> FontDescription -> Bool fontDescriptionBetterMatch fd fdA fdB = unsafePerformIO $ liftM toBool $ {#call unsafe better_match#} fd fdA fdB -- | Create a font description from a string. -- -- * The given argument must have the form -- "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]" where FAMILY_LIST is a comma -- separated list of font families optionally terminated by a comma, -- STYLE_OPTIONS is a whitespace separated list of words where each -- word describes one of style, variant, weight or stretch. SIZE is -- a decimal number giving the size of the font in points. If any of -- these fields is absent, the resulting 'FontDescription' will have -- the corresponing fields unset. -- fontDescriptionFromString :: String -> IO FontDescription fontDescriptionFromString descr = withUTFString descr $ \strPtr -> {#call unsafe from_string#} strPtr >>= makeNewFontDescription -- | Convert a font description to a string. -- -- * Creates a string representation of a font description. See -- 'fontDescriptionFromString' for the format of the string. -- fontDescriptionToString :: FontDescription -> IO String fontDescriptionToString fd = do strPtr <- {#call unsafe to_string#} fd str <- peekUTFString strPtr {#call unsafe g_free#} (castPtr strPtr) return strPtr Index: Markup.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/Markup.hs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Markup.hs 27 May 2004 04:21:21 -0000 1.7 +++ Markup.hs 12 Dec 2004 11:18:41 -0000 1.8 @@ -30,15 +30,12 @@ module Markup( Markup, SpanAttribute(..), - FontSizeDef(..), - FontStyleDef(..), - FontWeightDef(..), - FontVariantDef(..), - FontStretchDef(..), - FontUnderlineDef(..), - markSpan + markSpan, + Size(..) ) where +import PangoTypes ( Language ) +import qualified PangoEnums as Pango -- | Define a synonym for text with embedded markup commands. -- @@ -53,47 +50,46 @@ -- | Choose a font by textual description. -- -- * Takes a string to completely describe the font, example: - -- @FontDescr \"Sans Italic 12\"@ + -- @FontDescr@ \"Sans Italic 12\" = FontDescr String -- | Specify the family of font to use. -- - -- * Example: @FontFamily \"Sans\"@ + -- * Example: @FontFamily@ \"Sans\" | FontFamily String -- | Change the size of the current font. -- - -- * The constuctor takes the size in points (pt) or as predefined + -- * The constuctor takes the size in points (pt) or a predefined -- sizes. Setting the absolute size 12.5pt can be achieved by passing - -- @FontSize ('FSPoint' 12.5)@ to 'markSpan'. Next to predefined - -- absolute sizes such as 'FSsmall' the size can be changed by asking - -- for the next larger or smaller front with 'FSlarger' and - -- 'FSsmaller', respectively. - | FontSize FontSizeDef + -- 'FontSize' ('SizePoint' 12.5) to 'markSpan'. Next to predefined + -- absolute sizes such as 'SizeSmall' the size can be changed by + -- asking for the next larger or smaller front with + -- 'SizeLarger' and 'SizeSmaller', respectively. + | FontSize Size -- | Change the slant of the current font. -- - -- * The constructor takes one of three styles: 'FYnormal', - -- 'FYoblique' or 'FYitalic'. - | FontStyle FontStyleDef + | FontStyle Pango.FontStyle -- | Change the thickness of the current font. -- -- * The constructor takes one of the six predefined weights. Most likely to - -- be supported: 'FWbold'. - | FontWeight FontWeightDef + -- be supported: 'WeightBold'. + -- + | FontWeight Pango.Weight -- | Choosing an alternative rendering for lower case letters. -- - -- * The argument 'FVsmallcaps' will display lower case letters + -- * The argument 'VariangtSmallCaps' will display lower case letters -- as smaller upper case letters, if this option is available. - | FontVariant FontVariantDef + | FontVariant Pango.Variant -- | Choose a different width. -- - -- * Takes one of nine font widths, e.g. 'FTcondensed' or - -- 'FTexpanded'. - | FontStretch FontStretchDef + -- * Takes one of nine font widths, e.g. 'WidthExpanded'. + -- + | FontStretch Pango.Stretch -- | Foreground color. -- @@ -106,9 +102,7 @@ -- | Specify underlining of text. -- - -- * 'FUnone', 'FUsingle', 'FUdouble' or - -- 'FUlow' are possible choices. - | FontUnderline FontUnderlineDef + | FontUnderline Pango.Underline -- | Specify a vertical displacement. -- @@ -117,7 +111,11 @@ | FontRise Double -- | Give a hint about the language to be displayed. - | FontLang String -- FIXME: enumeration? what's the use anyway? + -- + -- * This hint might help the system rendering a particular piece of text + -- with different fonts that are more suitable for the given language. + -- + | FontLang Language instance Show SpanAttribute where showsPrec _ (FontDescr str) = showString " font_desc=".shows str @@ -134,110 +132,6 @@ (show (round (r*10000))) showsPrec _ (FontLang l) = showString " lang=".shows l --- | Define attributes for 'FontSize'. --- -data FontSizeDef - = FSPoint Double - | FSunreadable - | FStiny - | FSsmall - | FSmedium - | FSlarge - | FShuge - | FSgiant - | FSsmaller - | FSlarger - -instance Show FontSizeDef where - showsPrec _ (FSPoint v) = shows $ show (round (v*1000)) - showsPrec _ (FSunreadable) = shows "xx-small" - showsPrec _ (FStiny) = shows "x-small" - showsPrec _ (FSsmall) = shows "small" - showsPrec _ (FSmedium) = shows "medium" - showsPrec _ (FSlarge) = shows "large" - showsPrec _ (FShuge) = shows "x-large" - showsPrec _ (FSgiant) = shows "xx-large" - showsPrec _ (FSsmaller) = shows "smaller" - showsPrec _ (FSlarger) = shows "larger" - --- | Define attributes for 'FontStyle'. --- -data FontStyleDef - = FYnormal - | FYoblique - | FYitalic - -instance Show FontStyleDef where - showsPrec _ FYnormal = shows "normal" - showsPrec _ FYoblique = shows "oblique" - showsPrec _ FYitalic = shows "italic" - --- | Define attributes for 'FontWeight'. --- -data FontWeightDef - = FWultralight - | FWlight - | FWnormal - | FWbold - | FWultrabold - | FWheavy - -instance Show FontWeightDef where - showsPrec _ FWultralight = shows "ultralight" - showsPrec _ FWlight = shows "light" - showsPrec _ FWnormal = shows "normal" - showsPrec _ FWbold = shows "bold" - showsPrec _ FWultrabold = shows "ultrabold" - showsPrec _ FWheavy = shows "heavy" - --- | Define attributes for 'FontVariant'. --- -data FontVariantDef - = FVnormal - | FVsmallcaps - -instance Show FontVariantDef where - showsPrec _ FVnormal = shows "normal" - showsPrec _ FVsmallcaps = shows "smallcaps" - --- | Define attributes for 'FontStretch'. --- -data FontStretchDef - = FTultracondensed - | FTextracondensed - | FTcondensed - | FTsemicondensed - | FTnormal - | FTsemiexpanded - | FTexpanded - | FTextraexpanded - | FTultraexpanded - -instance Show FontStretchDef where - showsPrec _ FTultracondensed = shows "ultracondensed" - showsPrec _ FTextracondensed = shows "extracondensed" - showsPrec _ FTcondensed = shows "condensed" - showsPrec _ FTsemicondensed = shows "semicondensed" - showsPrec _ FTnormal = shows "normal" - showsPrec _ FTsemiexpanded = shows "semiexpanded" - showsPrec _ FTexpanded = shows "expanded" - showsPrec _ FTextraexpanded = shows "extraexpanded" - showsPrec _ FTultraexpanded = shows "ultraexpanded" - --- | Define attributes for 'FontUnderline'. --- -data FontUnderlineDef - = FUsingle - | FUdouble - | FUlow - | FUnone - -instance Show FontUnderlineDef where - showsPrec _ FUsingle = shows "single" - showsPrec _ FUdouble = shows "double" - showsPrec _ FUlow = shows "low" - showsPrec _ FUnone = shows "none" - -- | Create the most generic span attribute. -- markSpan :: [SpanAttribute] -> String -> String @@ -246,5 +140,32 @@ showString text. showString "</span>" $ "" +-- | Define attributes for 'FontSize'. +-- +data Size + = SizePoint Double + | SizeUnreadable + | SizeTiny + | SizeSmall + | SizeMedium + | SizeLarge + | SizeHuge + | SizeGiant + | SizeSmaller + | SizeLarger + +instance Show Size where + showsPrec _ (SizePoint v) = shows $ show (round (v*1000)) + showsPrec _ (SizeUnreadable) = shows "xx-small" + showsPrec _ (SizeTiny) = shows "x-small" + showsPrec _ (SizeSmall) = shows "small" + showsPrec _ (SizeMedium) = shows "medium" + showsPrec _ (SizeLarge) = shows "large" + showsPrec _ (SizeHuge) = shows "x-large" + showsPrec _ (SizeGiant) = shows "xx-large" + showsPrec _ (SizeSmaller) = shows "smaller" + showsPrec _ (SizeLarger) = shows "larger" + + Index: PangoTypes.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/PangoTypes.chs.pp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PangoTypes.chs.pp 21 Nov 2004 15:06:16 -0000 1.1 +++ PangoTypes.chs.pp 12 Dec 2004 11:18:41 -0000 1.2 @@ -26,7 +26,12 @@ LayoutIter(LayoutIter), layout_iter_free, LayoutLine(LayoutLine), - mkLayoutLine + makeNewLayoutLine, + FontDescription(FontDescription), + makeNewFontDescription, + Language(Language), + emptyLanguage, + languageFromString ) where import Monad (liftM) @@ -40,15 +45,6 @@ -- {#pointer *PangoLayoutIter as LayoutIter foreign newtype #} --- | A single line in a 'PangoLayout'. --- -{#pointer *PangoLayoutLine as LayoutLine foreign newtype #} - -mkLayoutLine :: Ptr LayoutLine -> IO LayoutLine -mkLayoutLine llPtr = do - pango_layout_line_ref llPtr - liftM LayoutLine $ newForeignPtr llPtr (pango_layout_line_unref llPtr) - #if __GLASGOW_HASKELL__>=600 @@ -70,6 +66,15 @@ #endif +-- | A single line in a 'PangoLayout'. +-- +{#pointer *PangoLayoutLine as LayoutLine foreign newtype #} + +makeNewLayoutLine :: Ptr LayoutLine -> IO LayoutLine +makeNewLayoutLine llPtr = do + liftM LayoutLine $ newForeignPtr llPtr (pango_layout_line_unref llPtr) + + #if __GLASGOW_HASKELL__>=600 foreign import ccall unsafe "&pango_layout_line_unref" @@ -102,3 +107,49 @@ #endif + +-- | A possibly partial description of font(s). +-- +{#pointer *PangoFontDescription as FontDescription foreign newtype #} + +makeNewFontDescription :: Ptr FontDescription -> IO FontDescription +makeNewFontDescription llPtr = do + liftM FontDescription $ newForeignPtr llPtr + (pango_font_description_free llPtr) + +#if __GLASGOW_HASKELL__>=600 + +foreign import ccall unsafe "&pango_font_description_free" + pango_font_description_free' :: FinalizerPtr FontDescription + +pango_font_description_free :: Ptr FontDescription -> + FinalizerPtr FontDescription +pango_font_description_free _ = pango_font_description_free' + +#elif __GLASGOW_HASKELL__>=504 + +foreign import ccall unsafe "pango_font_description_free" + pango_font_description_free :: Ptr FontDescription -> IO () + +#else + +foreign import ccall "pango_font_description_free" unsafe + pango_font_description_free :: Ptr FontDescription -> IO () + +#endif + +-- | A Language designator to choose fonts. +-- +{#pointer* Language newtype#} deriving Eq + +instance Show Language where + show (Language ptr) + | ptr==nullPtr = "" + | otherwise = unsafePerformIO $ peekUTFString (castPtr ptr) + +-- | Specifying no particular language. +emptyLanguage = Language nullPtr + +languageFromString :: String -> IO Language +languageFromString language = + withUTFString language {#call language_from_string#} --- NEW FILE: PangoEnums.chs --- -- GIMP Toolkit (GTK) Enumerations for Pango. -- -- Author : Axel Simon -- -- Created: 12 September 2004 -- -- Version $Revision: 1.1 $ from $Date: 2004/12/12 11:18:41 $ -- -- Copyright (c) 1999..2004 Axel Simon -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file 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 General Public License for more details. -- -- | -- -- Enumerations for describing font characteristics. -- module PangoEnums( FontStyle(..), Weight(..), Variant(..), Stretch(..), Underline(..) ) where {# context lib="pango" prefix="pango" #} -- | The style of a font. -- -- * 'StyleOblique' is a slanted font like 'StyleItalic', -- but in a roman style. -- {#enum Style as FontStyle {underscoreToCase}#} instance Show FontStyle where showsPrec _ StyleNormal = shows "normal" showsPrec _ StyleOblique = shows "oblique" showsPrec _ StyleItalic = shows "italic" -- | Define attributes for 'FontWeight'. -- {#enum Weight {underscoreToCase}#} instance Show Weight where showsPrec _ WeightUltralight = shows "ultralight" showsPrec _ WeightLight = shows "light" showsPrec _ WeightNormal = shows "normal" showsPrec _ WeightBold = shows "bold" showsPrec _ WeightUltrabold = shows "ultrabold" showsPrec _ WeightHeavy = shows "heavy" -- | The variant of a font. -- -- * The 'VariantCmallCaps' is a version of a font where lower case -- letters are shown as physically smaller upper case letters. -- {#enum Variant {underscoreToCase}#} instance Show Variant where showsPrec _ VariantNormal = shows "normal" showsPrec _ VariantSmallCaps = shows "smallcaps" -- | Define how wide characters are. -- {#enum Stretch {underscoreToCase}#} instance Show Stretch where showsPrec _ StretchUltraCondensed = shows "ultracondensed" showsPrec _ StretchExtraCondensed = shows "extracondensed" showsPrec _ StretchCondensed = shows "condensed" showsPrec _ StretchSemiCondensed = shows "semicondensed" showsPrec _ StretchNormal = shows "normal" showsPrec _ StretchSemiExpanded = shows "semiexpanded" showsPrec _ StretchExpanded = shows "expanded" showsPrec _ StretchExtraExpanded = shows "extraexpanded" showsPrec _ StretchUltraExpanded = shows "ultraexpanded" -- | Define attributes for 'FontUnderline'. -- {#enum Underline {underscoreToCase}#} instance Show Underline where showsPrec _ UnderlineNone = shows "none" showsPrec _ UnderlineSingle = shows "single" showsPrec _ UnderlineDouble = shows "double" showsPrec _ UnderlineLow = shows "low" showsPrec _ UnderlineError = shows "error" Index: PangoLayout.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/PangoLayout.chs,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- PangoLayout.chs 27 May 2004 04:21:21 -0000 1.8 +++ PangoLayout.chs 12 Dec 2004 11:18:41 -0000 1.9 @@ -377,7 +377,7 @@ layoutGetLines pl = do listPtr <- {#call unsafe layout_get_lines#} pl list <- readGSList listPtr - mapM mkLayoutLine list + mapM makeNewLayoutLine list -- | Create an iterator to examine a layout. -- @@ -440,7 +440,7 @@ layoutIterGetLine li = do llPtr <- liftM castPtr $ {#call unsafe pango_layout_iter_get_line#} li if (llPtr==nullPtr) then return Nothing else - liftM Just $ mkLayoutLine llPtr + liftM Just $ makeNewLayoutLine llPtr -- | Retrieve a rectangle surrounding -- a character. Index: Rendering.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/Rendering.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Rendering.chs 23 May 2004 16:12:20 -0000 1.3 +++ Rendering.chs 12 Dec 2004 11:18:41 -0000 1.4 @@ -27,20 +27,163 @@ -- accomplish various steps of this process. -- module Rendering( - PangoContext + PangoContext, + contextListFamilies, +-- contextLoadFont, +-- contextLoadFontSet, + contextGetMetrics, + FontMetrics(..), + contextSetFontDescription, + contextGetFontDescription, + contextSetLanguage, + contextGetLanguage, + contextSetTextDir, + contextGetTextDir, + TextDirection(..) ) where import Monad (liftM) import FFI - +import Structs (pangoScale) {#import Hierarchy#} import GObject (makeNewGObject) +import Enums +{#import PangoTypes#} +import Data.Ratio {# context lib="pango" prefix="pango" #} --- The constructor context_new is not really public and only enabled if --- the header files are compiled with PANGO_ENABLE_BACKEND. The same holds --- for pango_context_set_font_map, so we better restrict ourselved to the --- gdk functions. +-- | Retrieve a list of all available font families. +-- +-- * A font family is the name of the font without further attributes +-- like slant, variant or size. +-- +contextListFamilies :: PangoContext -> IO [FontFamily] +contextListFamilies c = alloca $ \sizePtr -> alloca $ \ptrPtr -> do + {#call unsafe context_list_families#} c ptrPtr sizePtr + ptr <- peek ptrPtr + size <- peek sizePtr + -- c2hs get FontFamily*** wrong as FontFamily**, therefore the cast + familyPtrs <- peekArray (fromIntegral size) (castPtr ptr) + fams <- mapM (makeNewGObject mkFontFamily . return) familyPtrs + {#call unsafe g_free#} (castPtr ptr) + return fams + +-- | Load a font. +-- +--contextLoadFont :: PangoContext -> FontDescription -> Language -> +-- IO (Maybe Font) +--contextLoadFont pc fd l = do +-- fsPtr <- {#call context_load_font#} pc fd l +-- if fsPtr==nullPtr then return Nothing else +-- liftM Just $ makeNewGObject mkFont (return fsPtr) + +-- | Load a font set. +-- +--contextLoadFontSet :: PangoContext -> FontDescription -> Language -> +-- IO (Maybe FontSet) +--contextLoadFontSet pc fd l = do +-- fsPtr <- {#call context_load_fontset#} pc fd l +-- if fsPtr==nullPtr then return Nothing else +-- liftM Just $ makeNewGObject mkFontSet (return fsPtr) + +-- | Query the metrics of the given font implied by the font description. +-- +contextGetMetrics :: PangoContext -> FontDescription -> Language -> + IO FontMetrics +contextGetMetrics pc fd l = do + mPtr <- {#call unsafe context_get_metrics#} pc fd l + ascend <- liftM fromIntegral $ {#call unsafe font_metrics_get_ascent#} mPtr + descend <- liftM fromIntegral $ {#call unsafe font_metrics_get_descent#} mPtr + cWidth <- liftM fromIntegral $ + {#call unsafe font_metrics_get_approximate_char_width#} mPtr + dWidth <- liftM fromIntegral $ + {#call unsafe font_metrics_get_approximate_digit_width#} mPtr + {#call unsafe font_metrics_unref#} mPtr + return (FontMetrics + (ascend % pangoScale) + (descend % pangoScale) + (cWidth % pangoScale) + (dWidth % pangoScale)) + +-- | The characteristic measurements of a font. +-- +-- * All values are measured in pixels. +-- +data FontMetrics = FontMetrics { + -- | The ascent is the distance from the baseline to the logical top + -- of a line of text. (The logical top may be above or below the + -- top of the actual drawn ink. It is necessary to lay out the + -- text to figure where the ink will be.) + ascent :: Rational, + -- | The descent is the distance from the baseline to the logical + -- bottom of a line of text. (The logical bottom may be above or + -- below the bottom of the actual drawn ink. It is necessary to + -- lay out the text to figure where the ink will be.) + descent :: Rational, + -- | The approximate character width. This is merely a + -- representative value useful, for example, for determining the + -- initial size for a window. Actual characters in text will be + -- wider and narrower than this. + approximateCharWidth :: Rational, + -- | The approximate digit widt. This is merely a representative + -- value useful, for example, for determining the initial size for + -- a window. Actual digits in text can be wider and narrower than + -- this, though this value is generally somewhat more accurate + -- than @approximateCharWidth@. + approximateDigitWidth :: Rational +} + +-- | Set the default 'FontDescription' of this context. +-- +contextSetFontDescription :: PangoContext -> FontDescription -> IO () +contextSetFontDescription pc fd = + {#call unsafe context_set_font_description#} pc fd + +-- | Get the current 'FontDescription' of this context. +-- +contextGetFontDescription :: PangoContext -> IO FontDescription +contextGetFontDescription pc = do + fdPtrConst <- {#call unsafe context_get_font_description#} pc + fdPtr <- pango_font_description_copy fdPtrConst + makeNewFontDescription fdPtr + +foreign import ccall unsafe "pango_font_description_copy" + pango_font_description_copy :: Ptr FontDescription -> + IO (Ptr FontDescription) + +-- | Set the default 'Language' of this context. +-- +contextSetLanguage :: PangoContext -> Language -> IO () +contextSetLanguage pc (Language l) = {#call unsafe context_set_language#} pc l + +-- | Get the current 'Language' of this context. +-- +contextGetLanguage :: PangoContext -> IO Language +contextGetLanguage pc = liftM Language $ + {#call unsafe context_get_language#} pc + +-- only used internally +{#enum PangoDirection {underscoreToCase} #} + +-- | Set the default text direction of this context. +-- +contextSetTextDir :: PangoContext -> TextDirection -> IO () +contextSetTextDir pc dir = + {#call unsafe context_set_base_dir#} pc (convert dir) + where + convert TextDirNone = fromIntegral (fromEnum DirectionNeutral) + convert TextDirLtr = fromIntegral (fromEnum DirectionLtr) + convert TextDirRtl = fromIntegral (fromEnum DirectionRtl) + +-- | Get the current text direction of this context. +-- +contextGetTextDir :: PangoContext -> IO TextDirection +contextGetTextDir pc = liftM (convert . toEnum . fromIntegral) $ + {#call unsafe context_get_base_dir#} pc + where + convert DirectionLtr = TextDirLtr + convert DirectionRtl = TextDirRtl + convert _ = TextDirNone |
From: Axel S. <as...@us...> - 2004-12-12 11:04:30
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7302 Modified Files: ChangeLog Makefile.am Log Message: Avoid building dependencies when saying "make clean". Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Makefile.am 10 Dec 2004 03:08:55 -0000 1.18 +++ Makefile.am 12 Dec 2004 11:04:20 -0000 1.19 @@ -194,7 +194,9 @@ MOSTLYCLEANFILES+= $(tools_c2hs_c2hsLocal_HSFILES:.hs=.hi) CLEANFILES+= $(tools_c2hs_c2hsLocal_BUILDSOURCES) DISTCLEANFILES+= tools_c2hs_c2hsLocal.deps +ifneq ($(MAKECMDGOALS),clean) -include tools_c2hs_c2hsLocal.deps + endif # # gtk package @@ -389,7 +391,9 @@ CLEANFILES+= $(libHSgtk_a_BUILDSOURCES) DISTCLEANFILES+= libHSgtk_a.deps $(libHSgtk_a_CHSFILES_HS:.hs=.dep) +ifneq ($(MAKECMDGOALS),clean) -include libHSgtk_a.deps $(libHSgtk_a_CHSFILES_HS:.hs=.dep) + endif # # mogul package @@ -426,7 +430,9 @@ MOSTLYCLEANFILES+ = $(libHSmogul_a_HSFILES:.hs=.hi) DISTCLEANFILES+= libHSmogul_a.deps +ifneq ($(MAKECMDGOALS),clean) -include libHSmogul_a.deps + endif # # glade package @@ -479,7 +485,9 @@ CLEANFILES += $(libHSglade_a_BUILDSOURCES) DISTCLEANFILES+= libHSglade_a.deps $(libHSglade_a_CHSFILES_HS:.hs=.dep) +ifneq ($(MAKECMDGOALS),clean) -include libHSglade_a.deps $(libHSglade_a_CHSFILES:.chs=.dep) + endif # # gconf package @@ -536,7 +544,10 @@ CLEANFILES += $(libHSgconf_a_BUILDSOURCES) DISTCLEANFILES+= libHSgconf_a.deps $(libHSgconf_a_CHSFILES_HS:.hs=.dep) + +ifneq ($(MAKECMDGOALS),clean) -include libHSgconf_a.deps $(libHSgconf_a_CHSFILES:.chs=.dep) + endif # # sourceview package @@ -600,7 +611,10 @@ CLEANFILES += $(libHSsourceview_a_BUILDSOURCES) DISTCLEANFILES+= libHSsourceview_a.deps $(libHSsourceview_a_CHSFILES_HS:.hs=.dep) + +ifneq ($(MAKECMDGOALS),clean) -include libHSsourceview_a.deps $(libHSsourceview_a_CHSFILES:.chs=.dep) + endif # All generated source files go here. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.247 retrieving revision 1.248 diff -u -d -r1.247 -r1.248 --- ChangeLog 9 Dec 2004 18:44:58 -0000 1.247 +++ ChangeLog 12 Dec 2004 11:04:20 -0000 1.248 @@ -1,3 +1,8 @@ +2004-12-12 Axel Simon <A....@ke...> + + * Makefile.am, mk/common.mk: Avoid building dependencies when + saying "make clean". + 2004-12-9 Duncan Coutts <du...@co...> * gtk/embedding/Embedding.hsc, gtk/entry/EntryCompletion.chs.pp, |
From: Jens-Ulrik P. <ju...@us...> - 2004-12-10 03:09:10
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20196 Modified Files: Makefile.am Log Message: remove lines with only whitespace Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Makefile.am 9 Dec 2004 18:44:58 -0000 1.17 +++ Makefile.am 10 Dec 2004 03:08:55 -0000 1.18 @@ -44,7 +44,7 @@ libHSglade.a \ libHSgconf.a \ libHSsourceview.a - + noinst_PROGRAMS = \ tools/hierarchyGen/TypeGenerator \ tools/callbackGen/HookGenerator \ @@ -450,7 +450,7 @@ glade/Glade.chs libHSglade_a_LIBADD = libHSgtk.a - + glade/GladeType.chs : $(srcdir)/tools/hierarchyGen/hierarchy.list \ $(srcdir)/tools/hierarchyGen/TypeGenerator $(strip $(srcdir)/tools/hierarchyGen/TypeGenerator \ @@ -505,7 +505,7 @@ gconf/System/Gnome/GConf.hs libHSgconf_a_LIBADD = libHSgtk.a - + gconf/System/Gnome/GConf/GConfType.chs : \ $(srcdir)/tools/hierarchyGen/hierarchy.list \ $(srcdir)/tools/hierarchyGen/TypeGenerator |
From: Duncan C. <dun...@us...> - 2004-12-09 18:45:17
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31883/gtk Added Files: gtk.pkg.in Removed Files: gtk2hs.pkg.in Log Message: Rename package libs to libHS{pkg}.a, ie follow ghc convention and prefix them with HS so we do not get name clashes with system libraries. Rename the gtk2hs package to be just gtk. Get the flags to put into the *pkg.in files to work properly for packages other than the main gtk pacakge by adding a couple macros to aclocal.m4 and changing all the *.pkg.in files appropriately. Eliminate use of compat/* modules and lang & data pacakges in Makefile.am. Small fix to install-data-hook target in mk/common.mk. --- gtk2hs.pkg.in DELETED --- --- NEW FILE: gtk.pkg.in --- Package { name = "gtk", auto = False, import_dirs = ["@hidir@"], source_dirs = [], library_dirs = [@GTK_LIBDIR_CQ@], hs_libraries = ["HSgtk"], extra_libraries = [@GTK_LIBS_CQ@], include_dirs = [@GTK_CFLAGS_CQ@], c_includes = ["gtk/gtk.h"], package_deps = ["base"], extra_ghc_opts = [], extra_cc_opts = [], extra_ld_opts = [@GTK_LIBEXTRA_CQ@] } |