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
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30366/tools/apiGen Modified Files: Makefile atk-sources.xml gdk-sources.xml glade-sources.xml gnomecanvas-sources.xml gtk-sources.xml pango-sources.xml Log Message: Made Mogul's TreePath which is [Int] the only TreePath, even in TreeModel. Completed DrawWindow (gdk_window). Make apiGen Makefile work with different versions. Index: gdk-sources.xml =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/gdk-sources.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gdk-sources.xml 27 Jan 2005 23:10:15 -0000 1.3 +++ gdk-sources.xml 17 Feb 2005 00:13:21 -0000 1.4 @@ -2,12 +2,12 @@ <api filename="gdk-api.xml"> <library name="gdk"> <namespace name="Gdk"> - <dir>gtk+-2.4.14/gdk</dir> + <dir>gtk+/gdk</dir> </namespace> </library> <library name="gdk_pixbuf"> <namespace name="Gdk"> - <dir>gtk+-2.4.14/gdk-pixbuf</dir> + <dir>gtk+/gdk-pixbuf</dir> </namespace> </library> </api> Index: atk-sources.xml =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/atk-sources.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- atk-sources.xml 27 Jan 2005 23:10:15 -0000 1.2 +++ atk-sources.xml 17 Feb 2005 00:13:21 -0000 1.3 @@ -2,7 +2,7 @@ <api filename="atk-api.xml"> <library name="atk"> <namespace name="Atk"> - <dir>atk-1.6.1/atk</dir> + <dir>atk/atk</dir> </namespace> </library> </api> Index: pango-sources.xml =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/pango-sources.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pango-sources.xml 27 Jan 2005 23:10:15 -0000 1.3 +++ pango-sources.xml 17 Feb 2005 00:13:21 -0000 1.4 @@ -2,16 +2,16 @@ <api filename="pango-api.xml"> <library name="pango"> <namespace name="Pango"> - <dir>pango-1.4.1/pango</dir> - <exclude>pango-1.4.1/pango/pangox-fontcache.c</exclude> - <exclude>pango-1.4.1/pango/pangox-fontmap.c</exclude> - <exclude>pango-1.4.1/pango/pangox-private.h</exclude> - <exclude>pango-1.4.1/pango/pangox.h</exclude> - <exclude>pango-1.4.1/pango/pangox.c</exclude> - <exclude>pango-1.4.1/pango/pangoxft.h</exclude> - <exclude>pango-1.4.1/pango/pangoxft-font.h</exclude> - <exclude>pango-1.4.1/pango/pangoxft-fontmap.h</exclude> - <exclude>pango-1.4.1/pango/pangoxft-private.h</exclude> + <dir>pango/pango</dir> + <exclude>pango/pango/pangox-fontcache.c</exclude> + <exclude>pango/pango/pangox-fontmap.c</exclude> + <exclude>pango/pango/pangox-private.h</exclude> + <exclude>pango/pango/pangox.h</exclude> + <exclude>pango/pango/pangox.c</exclude> + <exclude>pango/pango/pangoxft.h</exclude> + <exclude>pango/pango/pangoxft-font.h</exclude> + <exclude>pango/pango/pangoxft-fontmap.h</exclude> + <exclude>pango/pango/pangoxft-private.h</exclude> </namespace> </library> </api> Index: glade-sources.xml =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/glade-sources.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- glade-sources.xml 27 Jan 2005 23:10:15 -0000 1.3 +++ glade-sources.xml 17 Feb 2005 00:13:21 -0000 1.4 @@ -2,7 +2,7 @@ <api filename="glade-api.xml"> <library name="glade"> <namespace name="Glade"> - <dir>libglade-2.3.6/glade</dir> + <dir>libglade/glade</dir> </namespace> </library> </api> Index: gtk-sources.xml =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/gtk-sources.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gtk-sources.xml 27 Jan 2005 23:10:15 -0000 1.3 +++ gtk-sources.xml 17 Feb 2005 00:13:21 -0000 1.4 @@ -2,73 +2,73 @@ <api filename="gtk-api.xml"> <library name="gtk"> <namespace name="Gtk"> - <dir>gtk+-2.4.14/gtk</dir> + <dir>gtk+/gtk</dir> <!-- Internal stuff --> - <exclude>gtk+-2.4.14/gtk/gtkfilechooserdefault.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilechooserdefault.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilechooserentry.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilechooserentry.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilechooserutils.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilechooserutils.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystem.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystem.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystemmodel.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystemmodel.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystemunix.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystemunix.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystemwin32.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkfilesystemwin32.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkiconcache.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkiconcache.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkiconthemeparser.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkpathbar.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkpathbar.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkrbtree.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkrbtree.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtksequence.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtksequence.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktextbtree.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktextbtree.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktextsegment.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktextsegment.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktexttypes.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktexttypes.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktextutil.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktextutil.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkthemes.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkthemes.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktreedatalist.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktreedatalist.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkwindow-decorate.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkwindow-decorate.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkxembed.h</exclude> - <exclude>gtk+-2.4.14/gtk/xembed.h</exclude> + <exclude>gtk+/gtk/gtkfilechooserdefault.c</exclude> + <exclude>gtk+/gtk/gtkfilechooserdefault.h</exclude> + <exclude>gtk+/gtk/gtkfilechooserentry.c</exclude> + <exclude>gtk+/gtk/gtkfilechooserentry.h</exclude> + <exclude>gtk+/gtk/gtkfilechooserutils.c</exclude> + <exclude>gtk+/gtk/gtkfilechooserutils.h</exclude> + <exclude>gtk+/gtk/gtkfilesystem.c</exclude> + <exclude>gtk+/gtk/gtkfilesystem.h</exclude> + <exclude>gtk+/gtk/gtkfilesystemmodel.c</exclude> + <exclude>gtk+/gtk/gtkfilesystemmodel.h</exclude> + <exclude>gtk+/gtk/gtkfilesystemunix.c</exclude> + <exclude>gtk+/gtk/gtkfilesystemunix.h</exclude> + <exclude>gtk+/gtk/gtkfilesystemwin32.c</exclude> + <exclude>gtk+/gtk/gtkfilesystemwin32.h</exclude> + <exclude>gtk+/gtk/gtkiconcache.c</exclude> + <exclude>gtk+/gtk/gtkiconcache.h</exclude> + <exclude>gtk+/gtk/gtkiconthemeparser.h</exclude> + <exclude>gtk+/gtk/gtkpathbar.c</exclude> + <exclude>gtk+/gtk/gtkpathbar.h</exclude> + <exclude>gtk+/gtk/gtkrbtree.c</exclude> + <exclude>gtk+/gtk/gtkrbtree.h</exclude> + <exclude>gtk+/gtk/gtksequence.c</exclude> + <exclude>gtk+/gtk/gtksequence.h</exclude> + <exclude>gtk+/gtk/gtktextbtree.c</exclude> + <exclude>gtk+/gtk/gtktextbtree.h</exclude> + <exclude>gtk+/gtk/gtktextsegment.c</exclude> + <exclude>gtk+/gtk/gtktextsegment.h</exclude> + <exclude>gtk+/gtk/gtktexttypes.c</exclude> + <exclude>gtk+/gtk/gtktexttypes.h</exclude> + <exclude>gtk+/gtk/gtktextutil.c</exclude> + <exclude>gtk+/gtk/gtktextutil.h</exclude> + <exclude>gtk+/gtk/gtkthemes.c</exclude> + <exclude>gtk+/gtk/gtkthemes.h</exclude> + <exclude>gtk+/gtk/gtktreedatalist.c</exclude> + <exclude>gtk+/gtk/gtktreedatalist.h</exclude> + <exclude>gtk+/gtk/gtkwindow-decorate.c</exclude> + <exclude>gtk+/gtk/gtkwindow-decorate.h</exclude> + <exclude>gtk+/gtk/gtkxembed.h</exclude> + <exclude>gtk+/gtk/xembed.h</exclude> <!-- Exclude all pre gtk+-2.2 deprecated widgets --> <!-- on second thoughts don't exclude them - <exclude>gtk+-2.4.14/gtk/gtkclist.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkclist.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkctree.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkctree.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtklist.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtklist.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtklistitem.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtklistitem.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkoldeditable.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkoldeditable.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkpixmap.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkpixmap.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkpreview.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkpreview.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtkprogress.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtkprogress.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktext.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktext.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktipsquery.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktipsquery.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktree.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktree.h</exclude> - <exclude>gtk+-2.4.14/gtk/gtktreeitem.c</exclude> - <exclude>gtk+-2.4.14/gtk/gtktreeitem.h</exclude> + <exclude>gtk+/gtk/gtkclist.c</exclude> + <exclude>gtk+/gtk/gtkclist.h</exclude> + <exclude>gtk+/gtk/gtkctree.c</exclude> + <exclude>gtk+/gtk/gtkctree.h</exclude> + <exclude>gtk+/gtk/gtklist.c</exclude> + <exclude>gtk+/gtk/gtklist.h</exclude> + <exclude>gtk+/gtk/gtklistitem.c</exclude> + <exclude>gtk+/gtk/gtklistitem.h</exclude> + <exclude>gtk+/gtk/gtkoldeditable.c</exclude> + <exclude>gtk+/gtk/gtkoldeditable.h</exclude> + <exclude>gtk+/gtk/gtkpixmap.c</exclude> + <exclude>gtk+/gtk/gtkpixmap.h</exclude> + <exclude>gtk+/gtk/gtkpreview.c</exclude> + <exclude>gtk+/gtk/gtkpreview.h</exclude> + <exclude>gtk+/gtk/gtkprogress.c</exclude> + <exclude>gtk+/gtk/gtkprogress.h</exclude> + <exclude>gtk+/gtk/gtktext.c</exclude> + <exclude>gtk+/gtk/gtktext.h</exclude> + <exclude>gtk+/gtk/gtktipsquery.c</exclude> + <exclude>gtk+/gtk/gtktipsquery.h</exclude> + <exclude>gtk+/gtk/gtktree.c</exclude> + <exclude>gtk+/gtk/gtktree.h</exclude> + <exclude>gtk+/gtk/gtktreeitem.c</exclude> + <exclude>gtk+/gtk/gtktreeitem.h</exclude> --> </namespace> </library> Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 14 Feb 2005 02:10:49 -0000 1.7 +++ Makefile 17 Feb 2005 00:13:21 -0000 1.8 @@ -32,23 +32,27 @@ PANGO_VERSION = 1.4.1 ATK_VERSION = 1.6.1 GTK_VERSION = 2.4.14 -GLADE_VERSION = 2.3.6 +GLADE_VERSION = 2.0.1 DOWNLOADS = \ - ftp://ftp.gtk.org/pub/gtk/v2.4/glib-$(GLIB_VERSION).tar.gz \ - ftp://ftp.gtk.org/pub/gtk/v2.4/pango-$(PANGO_VERSION).tar.gz \ - ftp://ftp.gtk.org/pub/gtk/v2.4/atk-$(ATK_VERSION).tar.gz \ - ftp://ftp.gtk.org/pub/gtk/v2.4/gtk+-$(GTK_VERSION).tar.gz \ - http://ftp.gnome.org/pub/GNOME/desktop/2.6/2.6.2/sources/libglade-$(GLADE_VERSION).tar.gz\ - http://ftp.gnome.org/pub/GNOME/desktop/2.6/2.6.2/sources/libgnomecanvas-2.6.1.1.tar.gz + ftp://ftp.gtk.org/pub/gtk/v2.4/glib-$(GLIB_VERSION).tar.bz2 \ + ftp://ftp.gtk.org/pub/gtk/v2.4/pango-$(PANGO_VERSION).tar.bz2 \ + ftp://ftp.gtk.org/pub/gtk/v2.4/atk-$(ATK_VERSION).tar.bz2 \ + ftp://ftp.gtk.org/pub/gtk/v2.4/gtk+-$(GTK_VERSION).tar.bz2 \ + http://ftp.gnome.org/pub/GNOME/desktop/2.4/2.4.2/sources/libglade-$(GLADE_VERSION).tar.bz2\ + http://ftp.gnome.org/pub/GNOME/desktop/2.4/2.4.2/sources/libgnomecanvas-2.4.0.tar.bz2 get-source-code: - for i in $(DOWNLOADS); do \ - wget $$i --output-document=- | tar -xz ; \ + for i in $(DOWNLOADS); do \ + UNPACKDIR=`echo $$i | sed 's:.*/\([a-z+]*\)-\([0-9.]*\).tar.bz2:\1-\2:'`;\ + FINALDIR=`echo $$i | sed 's:.*/\([a-z+]*\)-\([0-9.]*\).tar.bz2:\1:'`;\ + if ! test -d $$FINALDIR ; then \ + wget $$i --output-document=- | tar -xj && mv $$UNPACKDIR $$FINALDIR; \ + fi; \ done; # following fixes borrowed from Gtk# - ln -f -s gtkfilechooserprivate.h gtk+-$(GTK_VERSION)/gtk/gtkfilechooserpriv.h - sed -i 's:( \*link_activated):(\* link_activated):' atk-1.6.1/atk/atkhyperlink.h + ln -f -s gtkfilechooserprivate.h gtk+/gtk/gtkfilechooserpriv.h + sed -i 's:( \*link_activated):(\* link_activated):' atk/atk/atkhyperlink.h ############################# # @@ -69,7 +73,7 @@ #prep-gtk-docs : gtk+-$(GTK_VERSION) # cd $< && ./configure --enable-gtk-doc && make -gtk-docs.xml : gtk+-$(GTK_VERSION)/docs/reference/gtk/xml format-docs.xsl +gtk-docs.xml : gtk+/docs/reference/gtk/xml format-docs.xsl ./mkdocxml.sh $< | xsltproc format-docs.xsl - > $@ gtk-modules : gtk-api.xml gtk-docs.xml Template.chs ApiGen \ @@ -86,8 +90,8 @@ # # Gdk modules # -gdk-docs.xml : gtk+-$(GTK_VERSION)/docs/reference/gdk/xml \ - gtk+-$(GTK_VERSION)/docs/reference/gdk-pixbuf/xml \ +gdk-docs.xml : gtk+/docs/reference/gdk/xml \ + gtk+/docs/reference/gdk-pixbuf/xml \ format-docs.xsl ./mkdocxml.sh $< | xsltproc format-docs.xsl - > $@ @@ -103,7 +107,7 @@ #prep-pango-docs : pango-$(PANGO_VERSION) # cd $< && ./configure --enable-gtk-doc && make -pango-docs.xml : pango-$(PANGO_VERSION)/docs/xml format-docs.xsl +pango-docs.xml : pango/docs/xml format-docs.xsl ./mkdocxml.sh $< | xsltproc format-docs.xsl - > $@ pango-modules : pango-api.xml pango-docs.xml Template.chs ApiGen Index: gnomecanvas-sources.xml =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/gnomecanvas-sources.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gnomecanvas-sources.xml 14 Feb 2005 02:10:49 -0000 1.3 +++ gnomecanvas-sources.xml 17 Feb 2005 00:13:21 -0000 1.4 @@ -2,7 +2,7 @@ <api filename="gnomecanvas-api.xml"> <library name="gnomecanvas"> <namespace name="Gnome"> - <dir>libgnomecanvas-2.6.1.1/libgnomecanvas</dir> + <dir>libgnomecanvas/libgnomecanvas</dir> </namespace> </library> </api> |
From: Axel S. <as...@us...> - 2005-02-17 00:13:30
|
Update of /cvsroot/gtk2hs/gtk2hs/mogul/Graphics/UI/Gtk/Mogul In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30366/mogul/Graphics/UI/Gtk/Mogul Modified Files: TreeList.hs Log Message: Made Mogul's TreePath which is [Int] the only TreePath, even in TreeModel. Completed DrawWindow (gdk_window). Make apiGen Makefile work with different versions. Index: TreeList.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/Graphics/UI/Gtk/Mogul/TreeList.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TreeList.hs 8 Jan 2005 16:40:16 -0000 1.1 +++ TreeList.hs 17 Feb 2005 00:13:21 -0000 1.2 @@ -79,17 +79,12 @@ treeViewColumnNewPixbuf, treeViewColumnNewToggle, treeViewColumnAssociate, - treeViewGetPathAtPos, -- * CellRenderer cellRendererSetAttribute, cellRendererGetAttribute, -- * CellRendererText onEdited, afterEdited, - -- * TreeModel - TreePath, - treeModelGetIter, - treeModelGetPath ) where import Monad (liftM, mapM, mapM_, foldM) @@ -97,21 +92,6 @@ import Graphics.UI.Gtk hiding ( -- TreeModel treeModelGetValue, - TreePath, - treePathNew, - treePathNewFromString, - treePathToString, - treePathNewFirst, - treePathAppendIndex, - treePathPrependIndex, - treePathGetDepth, - treePathGetIndices, - treePathCopy, - treePathCompare, - treePathNext, - treePathPrev, - treePathUp, - treePathDown, treeModelGetIter, treeModelGetPath, -- ListStore @@ -345,31 +325,6 @@ mapM_ (\(attr,col) -> Gtk.treeViewColumnAddAttribute tvc ren attr col) assocs' --- | Map a pixel to the specific cell. --- --- * Finds the path at the 'Point' @(x, y)@. The --- coordinates @x@ and @y@ are relative to the top left --- corner of the 'TreeView' drawing window. As such, coordinates --- in a mouse click event can be used directly to determine the cell --- which the user clicked on. This is therefore a way to realize for --- popup menus. --- --- * The returned point is the input point relative to the cell's upper --- left corner. The whole 'TreeView' is divided between all cells. --- The returned point is relative to the rectangle this cell occupies --- within the 'TreeView'. --- -treeViewGetPathAtPos :: TreeViewClass tv => tv -> Point -> - IO (Maybe (TreePath, TreeViewColumn, Point)) -treeViewGetPathAtPos tv pt = do - maybePath <- Gtk.treeViewGetPathAtPos tv pt - case maybePath of - Nothing -> return Nothing - Just (realPath, col, relPt) -> do - -- convert path component to mogul's TreePath representation - path <- Gtk.treePathGetIndices realPath - return $ Just (path, col, relPt) - -- | Set an 'Attribute' globally. -- -- * An 'Attribute' of a 'Renderer' can either be set @@ -400,27 +355,3 @@ IO (ConnectId CellRendererText) onEdited (Renderer ren _) = Gtk.onEdited ren afterEdited (Renderer ren _) = Gtk.afterEdited ren - --- | A simple way of addressing nodes. --- --- These integer lists are used to address nodes in a hierarchical --- 'ListStore' structure. --- -type TreePath = [Int] - --- | Turn a 'TreePath' into an abstract 'TreeIter'ator. --- -treeModelGetIter :: TreeModelClass tm => tm -> TreePath -> IO (Maybe TreeIter) -treeModelGetIter _ [] = throw $ AssertionFailed "Mogul.treeModelGetIter: \ - \a path must contain at least one element." -treeModelGetIter tm tp = do - realPath <- Gtk.treePathNew - mapM_ (Gtk.treePathAppendIndex realPath) tp - Gtk.treeModelGetIter tm realPath - --- | Turn an abstract 'TreeIter' into a 'TreePath'. --- -treeModelGetPath :: TreeModelClass tm => tm -> TreeIter -> IO TreePath -treeModelGetPath tm ti = do - realPath <- Gtk.treeModelGetPath tm ti - Gtk.treePathGetIndices realPath |
From: Axel S. <as...@us...> - 2005-02-17 00:13:30
|
Update of /cvsroot/gtk2hs/gtk2hs/mogul/Graphics/UI/Gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30366/mogul/Graphics/UI/Gtk Modified Files: Mogul.hs Log Message: Made Mogul's TreePath which is [Int] the only TreePath, even in TreeModel. Completed DrawWindow (gdk_window). Make apiGen Makefile work with different versions. Index: Mogul.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/Graphics/UI/Gtk/Mogul.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Mogul.hs 8 Jan 2005 16:42:15 -0000 1.1 +++ Mogul.hs 17 Feb 2005 00:13:21 -0000 1.2 @@ -106,23 +106,6 @@ treeViewNew, -- TreeModel treeModelGetValue, - TreePath, - treePathNew, - treePathNewFromString, - treePathToString, - treePathNewFirst, - treePathAppendIndex, - treePathPrependIndex, - treePathGetDepth, - treePathGetIndices, - treePathCopy, - treePathCompare, - treePathNext, - treePathPrev, - treePathUp, - treePathDown, - treeModelGetIter, - treeModelGetPath, -- ListStore listStoreNew, listStoreSetValue, @@ -136,8 +119,6 @@ afterEdited, CellRendererPixbuf, CellRendererToggle, - -- TreeView - treeViewGetPathAtPos, calendarNew, --drawingAreaNew, |
From: Axel S. <as...@us...> - 2005-02-17 00:13:30
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Gdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30366/gtk/Graphics/UI/Gtk/Gdk Modified Files: Enums.chs Added Files: DrawWindow.chs.pp Removed Files: DrawWindow.hs Log Message: Made Mogul's TreePath which is [Int] the only TreePath, even in TreeModel. Completed DrawWindow (gdk_window). Make apiGen Makefile work with different versions. Index: Enums.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Gdk/Enums.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Enums.chs 12 Feb 2005 17:19:22 -0000 1.2 +++ Enums.chs 17 Feb 2005 00:13:20 -0000 1.3 @@ -139,7 +139,7 @@ {#enum VisibilityState {underscoreToCase, VISIBILITY_PARTIAL as VisibilityPartialObscured}#} --- | the state a GDK window is in +-- | The state a @DrawWindow@ is in. -- {#enum WindowState {underscoreToCase} deriving (Bounded)#} --- DrawWindow.hs DELETED --- --- NEW FILE: DrawWindow.chs.pp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) DrawWindow -- -- Author : Axel Simon -- -- Created: 5 November 2002 -- -- Version $Revision: 1.1 $ from $Date: 2005/02/17 00:13:20 $ -- -- Copyright (C) 2002-2005 Axel Simon -- -- 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 2.1 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. -- -- | -- Maintainer : gtk2hs-users\@lists.sourceforge.net -- Stability : provisional -- Portability : portable (depends on GHC) -- -- A "DrawWindow" is a rectangular region on the screen. -- -- * A "DrawWindow" is -- used to implement high-level objects such as "Widget" and "Window" -- on the GTK+ level. -- -- * Most widgets draws its content into a "DrawWindow", in particular -- "DrawingArea" is nothing but a widget that contains a "DrawWindow". -- This object derives from "Drawable" which defines the basic drawing -- primitives. -- -- * Class Hierarchy -- | -- @ -- | "GObject" -- | +----"Drawable" -- | +----DrawWindow -- @ -- module Graphics.UI.Gtk.Gdk.DrawWindow ( -- * Types DrawWindow, DrawWindowClass, castToDrawWindow, WindowState(..), -- * Methods drawWindowGetState, drawWindowClear, drawWindowClearArea, drawWindowClearAreaExpose, drawWindowRaise, drawWindowLower, drawWindowBeginPaintRect, drawWindowBeginPaintRegion, drawWindowEndPaint, drawWindowInvalidateRect, drawWindowInvalidateRegion, drawWindowGetUpdateArea, drawWindowFreezeUpdates, drawWindowThawUpdates, drawWindowProcessUpdates, #if GTK_CHECK_VERSION(2,4,0) drawWindowSetAcceptFocus, #endif drawWindowShapeCombineRegion, drawWindowSetChildShapes, drawWindowMergeChildShapes, drawWindowGetPointer ) where import Monad (liftM) import System.Glib.FFI {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Gdk.Enums#} {#import Graphics.UI.Gtk.Gdk.Region#} import Graphics.UI.Gtk.Gdk.Events (Modifier) import Graphics.UI.Gtk.General.Structs {# context lib="gdk" prefix="gdk" #} -- | Gets the bitwise OR of the currently active drawWindow state flags, from the -- "WindowState" enumeration. -- drawWindowGetState :: DrawWindowClass self => self -> IO [WindowState] -- ^ returns @DrawWindow@ flags drawWindowGetState self = liftM (toFlags . fromIntegral) $ {# call gdk_window_get_state #} (toDrawWindow self) -- | Scroll the contents of @DrawWindow@. -- -- * Scroll both, pixels and children, by the given amount. -- @DrawWindow@ itself does not move. Portions of the window that the -- scroll operation brings in from offscreen areas are invalidated. The -- invalidated region may be bigger than what would strictly be necessary. (For -- X11, a minimum area will be invalidated if the window has no subwindows, or -- if the edges of the window's parent do not extend beyond the edges of the -- drawWindow. In other cases, a multi-step process is used to scroll the window -- which may produce temporary visual artifacts and unnecessary invalidations.) -- drawWindowScroll :: DrawWindowClass self => self -> Int -- ^ @dx@ - Amount to scroll in the X direction -> Int -- ^ @dy@ - Amount to scroll in the Y direction -> IO () drawWindowScroll self dx dy = {# call gdk_window_scroll #} (toDrawWindow self) (fromIntegral dx) (fromIntegral dy) -- | Clears an entire @DrawWindow@ to the background color or background pixmap. -- drawWindowClear :: DrawWindowClass self => self -> IO () drawWindowClear self = {# call gdk_window_clear #} (toDrawWindow self) -- | Clears an area of @DrawWindow@ to the background color or background pixmap. -- drawWindowClearArea :: DrawWindowClass self => self -> Int -- ^ @x@ - x coordinate of rectangle to clear -> Int -- ^ @y@ - y coordinate of rectangle to clear -> Int -- ^ @width@ - width of rectangle to clear -> Int -- ^ @height@ - height of rectangle to clear -> IO () drawWindowClearArea self x y width height = {# call gdk_window_clear_area #} (toDrawWindow self) (fromIntegral x) (fromIntegral y) (fromIntegral width) (fromIntegral height) -- | Like 'drawWindowClearArea', but also generates an expose event for the -- cleared area. -- drawWindowClearAreaExpose :: DrawWindowClass self => self -> Int -- ^ @x@ - x coordinate of rectangle to clear -> Int -- ^ @y@ - y coordinate of rectangle to clear -> Int -- ^ @width@ - width of rectangle to clear -> Int -- ^ @height@ - height of rectangle to clear -> IO () drawWindowClearAreaExpose self x y width height = {# call gdk_window_clear_area_e #} (toDrawWindow self) (fromIntegral x) (fromIntegral y) (fromIntegral width) (fromIntegral height) -- | Raises @DrawWindow@ to the top of the Z-order (stacking order), so that other -- drawWindows with the same parent drawWindow appear below @DrawWindow@. This is true -- whether or not the drawWindows are visible. -- -- If @DrawWindow@ is a toplevel, the drawWindow manager may choose to deny the -- request to move the drawWindow in the Z-order, 'drawWindowRaise' only requests the -- restack, does not guarantee it. -- drawWindowRaise :: DrawWindowClass self => self -> IO () drawWindowRaise self = {# call gdk_window_raise #} (toDrawWindow self) -- | Lowers @DrawWindow@ to the bottom of the Z-order (stacking order), so that -- other drawWindows with the same parent drawWindow appear above @DrawWindow@. This is -- true whether or not the other drawWindows are visible. -- -- If @DrawWindow@ is a toplevel, the drawWindow manager may choose to deny the -- request to move the drawWindow in the Z-order, 'drawWindowLower' only requests the -- restack, does not guarantee it. -- -- Note that 'drawWindowShow' raises the drawWindow again, so don\'t call this -- function before 'drawWindowShow'. (Try 'drawWindowShowUnraised'.) -- drawWindowLower :: DrawWindowClass self => self -> IO () drawWindowLower self = {# call gdk_window_lower #} (toDrawWindow self) -- | Registers a drawWindow as a potential drop destination. -- drawWindowRegisterDnd :: DrawWindowClass self => self -> IO () drawWindowRegisterDnd self = {# call gdk_window_register_dnd #} (toDrawWindow self) -- | A convenience wrapper around 'drawWindowBeginPaintRegion' which creates a -- rectangular region for you. -- -- * See 'drawWindowBeginPaintRegion' for details. -- drawWindowBeginPaintRect :: DrawWindowClass self => self -> Rectangle -- ^ @rectangle@ - rectangle you intend to draw to -> IO () drawWindowBeginPaintRect self rectangle = withObject rectangle $ \rectPtr -> {#call gdk_window_begin_paint_rect#} (toDrawWindow self) (castPtr rectPtr) -- | Indicate that you are beginning the process of redrawing @region@. -- -- * A -- backing store (offscreen buffer) large enough to contain @region@ will be -- created. The backing store will be initialized with the background color or -- background pixmap for @DrawWindow@. Then, all drawing operations performed on -- @DrawWindow@ will be diverted to the backing store. When you call -- 'drawWindowEndPaint', the backing store will be copied to @DrawWindow@, making it -- visible onscreen. Only the part of @DrawWindow@ contained in @region@ will be -- modified; that is, drawing operations are clipped to @region@. -- -- The net result of all this is to remove flicker, because the user sees -- the finished product appear all at once when you call 'drawWindowEndPaint'. If -- you draw to @DrawWindow@ directly without calling 'drawWindowBeginPaintRegion', the -- user may see flicker as individual drawing operations are performed in -- sequence. The clipping and background-initializing features of -- 'drawWindowBeginPaintRegion' are conveniences for the programmer, so you can -- avoid doing that work yourself. -- -- When using GTK+, the widget system automatically places calls to -- 'drawWindowBeginPaintRegion' and 'drawWindowEndPaint' around emissions of the -- expose_event signal. That is, if you\'re writing an expose event handler, -- you can assume that the exposed area in "EventExpose" has already been -- cleared to the window background, is already set as the clip region, and -- already has a backing store. Therefore in most cases, application code need -- not call 'drawWindowBeginPaintRegion'. (You can disable the automatic calls -- around expose events on a widget-by-widget basis by calling -- 'widgetSetDoubleBuffered'.) -- -- If you call this function multiple times before calling the matching -- 'drawWindowEndPaint', the backing stores are pushed onto a stack. -- 'drawWindowEndPaint' copies the topmost backing store onscreen, subtracts the -- topmost region from all other regions in the stack, and pops the stack. All -- drawing operations affect only the topmost backing store in the stack. One -- matching call to 'drawWindowEndPaint' is required for each call to -- 'drawWindowBeginPaintRegion'. -- drawWindowBeginPaintRegion :: DrawWindowClass self => self -> Region -- ^ @region@ - region you intend to draw to -> IO () drawWindowBeginPaintRegion self region = {# call gdk_window_begin_paint_region #} (toDrawWindow self) region -- | Signal that drawing has finished. -- -- * Indicates that the backing store created by the most recent call to -- 'drawWindowBeginPaintRegion' should be copied onscreen and deleted, leaving the -- next-most-recent backing store or no backing store at all as the active -- paint region. See 'drawWindowBeginPaintRegion' for full details. It is an error -- to call this function without a matching 'drawWindowBeginPaintRegion' first. -- drawWindowEndPaint :: DrawWindowClass self => self -> IO () drawWindowEndPaint self = {# call gdk_window_end_paint #} (toDrawWindow self) -- | A convenience wrapper around 'drawWindowInvalidateRegion' which invalidates a -- rectangular region. See 'drawWindowInvalidateRegion' for details. -- drawWindowInvalidateRect :: DrawWindowClass self => self -> Rectangle -- ^ @rect@ - rectangle to invalidate -> Bool -- ^ @invalidateChildren@ - whether to also invalidate -- child drawWindows -> IO () drawWindowInvalidateRect self rect invalidateChildren = withObject rect $ \rectPtr -> {# call gdk_window_invalidate_rect #} (toDrawWindow self) (castPtr rectPtr) (fromBool invalidateChildren) -- | Adds @region@ to the update area for @DrawWindow@. The update area is the -- region that needs to be redrawn, or \"dirty region.\". During the -- next idle period of the main look, an expose even for this region -- will be created. An application would normally redraw -- the contents of @DrawWindow@ in response to those expose events. -- -- The @invalidateChildren@ parameter controls whether the region of each -- child drawWindow that intersects @region@ will also be invalidated. If @False@, -- then the update area for child drawWindows will remain unaffected. -- drawWindowInvalidateRegion :: DrawWindowClass self => self -> Region -- ^ @region@ - a "Region" -> Bool -- ^ @invalidateChildren@ - @True@ to also invalidate child -- drawWindows -> IO () drawWindowInvalidateRegion self region invalidateChildren = {# call gdk_window_invalidate_region #} (toDrawWindow self) region (fromBool invalidateChildren) -- | Ask for the dirty region of this window. -- -- * Transfers ownership of the update area from @DrawWindow@ to the caller of the -- function. That is, after calling this function, @DrawWindow@ will no longer have -- an invalid\/dirty region; the update area is removed from @DrawWindow@ and -- handed to you. If a this window has no update area, 'drawWindowGetUpdateArea' returns 'Nothing'. -- drawWindowGetUpdateArea :: DrawWindowClass self => self -> IO (Maybe Region) -- ^ returns the update area for @DrawWindow@ drawWindowGetUpdateArea self = do reg <- {# call gdk_window_get_update_area #} (toDrawWindow self) if reg==nullPtr then return Nothing else liftM Just (makeNewRegion reg) -- | Temporarily freezes a drawWindow such that it won\'t receive expose events. -- * The drawWindow will begin receiving expose events again when -- 'drawWindowThawUpdates' -- is called. If 'drawWindowFreezeUpdates' has been called more than once, -- 'drawWindowThawUpdates' must be called an equal number of times to begin -- processing exposes. -- drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO () drawWindowFreezeUpdates self = {# call gdk_window_freeze_updates #} (toDrawWindow self) -- | Thaws a drawWindow frozen with 'drawWindowFreezeUpdates'. -- drawWindowThawUpdates :: DrawWindowClass self => self -> IO () drawWindowThawUpdates self = {# call gdk_window_thaw_updates #} (toDrawWindow self) -- | Sends one or more expose events to @DrawWindow@. -- -- * The areas in each expose -- event will cover the entire update area for the window (see -- 'drawWindowInvalidateRegion' for details). Normally Gtk calls -- 'drawWindowProcessAllUpdates' on your behalf, so there's no need to call this -- function unless you want to force expose events to be delivered immediately -- and synchronously (vs. the usual case, where Gtk delivers them in an idle -- handler). Occasionally this is useful to produce nicer scrolling behavior, -- for example. -- drawWindowProcessUpdates :: DrawWindowClass self => self -> Bool -- ^ @updateChildren@ - whether to also process updates for child -- drawWindows -> IO () drawWindowProcessUpdates self updateChildren = {# call gdk_window_process_updates #} (toDrawWindow self) (fromBool updateChildren) #if GTK_CHECK_VERSION(2,4,0) -- | Setting @acceptFocus@ to @False@ hints the desktop environment that the -- window doesn\'t want to receive input focus. -- -- On X, it is the responsibility of the drawWindow manager to interpret this -- hint. ICCCM-compliant drawWindow manager usually respect it. -- -- * Available since Gdk version 2.4 -- drawWindowSetAcceptFocus :: DrawWindowClass self => self -> Bool -- ^ @acceptFocus@ - @True@ if the drawWindow should receive input focus -> IO () drawWindowSetAcceptFocus self acceptFocus = {# call gdk_window_set_accept_focus #} (toDrawWindow self) (fromBool acceptFocus) #endif -- | Makes pixels in @DrawWindow@ outside @shapeRegion@ transparent. -- -- * Makes pixels in @DrawWindow@ outside @shapeRegion@ transparent, so that -- the window may be nonrectangular. -- -- If @shapeRegion@ is 'Nothing', the shape will be unset, so the whole drawWindow will be -- opaque again. @offsetX@ and @offsetY@ are ignored if @shapeRegion@ is -- 'Nothing'. -- -- On the X11 platform, this uses an X server extension which is widely -- available on most common platforms, but not available on very old X servers, -- and occasionally the implementation will be buggy. On servers without the -- shape extension, this function will do nothing. -- -- This function works on both toplevel and child drawWindows. -- drawWindowShapeCombineRegion :: DrawWindowClass self => self -> Maybe Region -- ^ @shapeRegion@ - region of drawWindow to be non-transparent -> Int -- ^ @offsetX@ - X position of @shapeRegion@ in @DrawWindow@ -- coordinates -> Int -- ^ @offsetY@ - Y position of @shapeRegion@ in @DrawWindow@ -- coordinates -> IO () drawWindowShapeCombineRegion self (Just reg) offsetX offsetY = {# call gdk_window_shape_combine_region #} (toDrawWindow self) reg (fromIntegral offsetX) (fromIntegral offsetY) drawWindowShapeCombineRegion self Nothing offsetX offsetY = {# call gdk_window_shape_combine_region #} (toDrawWindow self) (Region nullForeignPtr) (fromIntegral offsetX) (fromIntegral offsetY) -- | Sets the shape mask of @DrawWindow@ to the union of shape masks for all -- children of @DrawWindow@, ignoring the shape mask of @DrawWindow@ itself. Contrast -- with 'drawWindowMergeChildShapes' which includes the shape mask of @DrawWindow@ in -- the masks to be merged. -- drawWindowSetChildShapes :: DrawWindowClass self => self -> IO () drawWindowSetChildShapes self = {# call gdk_window_set_child_shapes #} (toDrawWindow self) -- | Merges the shape masks for any child drawWindows into the shape mask for -- @DrawWindow@. i.e. the union of all masks for @DrawWindow@ and its children will -- become the new mask for @DrawWindow@. See 'drawWindowShapeCombineMask'. -- -- This function is distinct from 'drawWindowSetChildShapes' because it includes -- @DrawWindow@'s shape mask in the set of shapes to be merged. -- drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO () drawWindowMergeChildShapes self = {# call gdk_window_merge_child_shapes #} (toDrawWindow self) -- | Obtains the current pointer position and modifier state. -- -- * The position is -- given in coordinates relative to the given window. -- -- * The return value is @Just (same, x, y, mod)@ where @same@ is @True@ -- if the passed in window is the window over which the mouse currently -- resides. -- -- * The return value is @Nothing@ if the mouse cursor is over a different -- application. -- drawWindowGetPointer :: DrawWindowClass self => self -> IO (Maybe (Bool, Int, Int, Modifier)) drawWindowGetPointer self = alloca $ \xPtr -> alloca $ \yPtr -> alloca $ \mPtr -> do winPtr <- {# call gdk_window_get_pointer #} (toDrawWindow self) xPtr yPtr mPtr if winPtr==nullPtr then return Nothing else do same <- withForeignPtr (unDrawWindow (toDrawWindow self)) $ \dPtr -> return (winPtr==dPtr) x <- peek xPtr y <- peek yPtr m <- peek mPtr return (Just (same, fromIntegral x, fromIntegral y, fromIntegral m)) |
From: Axel S. <as...@us...> - 2005-02-17 00:13:29
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30366/demo/unicode Modified Files: Arabic.hs Log Message: Made Mogul's TreePath which is [Int] the only TreePath, even in TreeModel. Completed DrawWindow (gdk_window). Make apiGen Makefile work with different versions. Index: Arabic.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/demo/unicode/Arabic.hs,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Arabic.hs 16 Jan 2005 14:15:36 -0000 1.11 +++ Arabic.hs 17 Feb 2005 00:13:19 -0000 1.12 @@ -21,7 +21,7 @@ _ -> return () arabic :: Markup -arabic = markSpan [FontSize SizeGiant] $ +arabic = markSpan [FontSize (SizePoint 36)] $ --"Is Haskell a "++markSpan [FontForeground "red"] "fantastic"++" language?"++ -- Do you find Haskell a fantastic language? (language has a grammatical -- mistake in it) |
From: Axel S. <as...@us...> - 2005-02-17 00:13:29
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30366/gtk/Graphics/UI Modified Files: Gtk.hs Log Message: Made Mogul's TreePath which is [Int] the only TreePath, even in TreeModel. Completed DrawWindow (gdk_window). Make apiGen Makefile work with different versions. Index: Gtk.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk.hs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Gtk.hs 11 Feb 2005 18:26:28 -0000 1.3 +++ Gtk.hs 17 Feb 2005 00:13:20 -0000 1.4 @@ -230,8 +230,10 @@ onInsertAtCursor, afterPasteClipboard, onPasteClipboard, afterToggleOverwrite, onToggleOverwrite) -- tree and list widget -import Graphics.UI.Gtk.TreeList.TreeModel hiding (createTreeIter, - createTreePath, gtk_tree_model_get_iter_from_string) +import Graphics.UI.Gtk.TreeList.TreeModel hiding (NativeTreePath(..), + createTreeIter, nativeTreePathFree, nativeTreePathNew, withTreePath, + nativeTreePathGetIndices, fromTreePath, + gtk_tree_model_get_iter_from_string) import Graphics.UI.Gtk.TreeList.TreeSelection import Graphics.UI.Gtk.TreeList.TreeViewColumn import Graphics.UI.Gtk.TreeList.TreeView |
From: Duncan C. <dun...@us...> - 2005-02-15 19:04:35
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20635/tools/apiGen Modified Files: CodeGen.hs Marshal.hs Log Message: Deal with the win32 _utf8 issue. Generate code for {# call #}'s using the appropriate #if's. Index: Marshal.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Marshal.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Marshal.hs 14 Feb 2005 02:10:49 -0000 1.2 +++ Marshal.hs 15 Feb 2005 19:03:27 -0000 1.3 @@ -6,7 +6,8 @@ stripKnownPrefixes, genMarshalParameter, genMarshalResult, - genMarshalProperty + genMarshalProperty, + genCall ) where import StringUtils @@ -225,3 +226,54 @@ typeKind = lookupFM knownSymbols typeName genMarshalProperty _ unknown = ("{-" ++ unknown ++ "-}", "{-" ++ unknown ++ "-}") + + +------------------------------------------------------------------------------- +-- Now for some special cases, we can override the generation of {# call #}'s +------------------------------------------------------------------------------- + +-- The ordinary case: +genCallOrdinary :: String -> Bool -> String +genCallOrdinary cname unsafe@True = "{# call unsafe " ++ cname ++ " #}" +genCallOrdinary cname unsafe@False = "{# call " ++ cname ++ " #}" + +-- On win32 for glib/gtk 2.6 they changed the interpretation of functions that +-- take or return system file names (as opposed to user displayable +-- representations of file names). Previously the string encoding of the file +-- name was that of the systems native 'codepage' which was usually ascii but +-- could be one of several obscure multi-byte encodings. For 2.6 they have +-- changed to always use a UTF8 encoding. However to maintain binary backwards +-- compatability they kept the old names and added new ones with a _utf8 suffix +-- for the new interpretation. However the old names are only in the binary, +-- they are not exposed through the C header files so all software building +-- against glib/gtk 2.6 on windows must use the _utf8 versions. Hence we +-- generate code uses the _utf8 version if we're building on windows and using +-- gtk version 2.6 or later. Ugh. + +win32FileNameFunctions = + ["gtk_image_new_from_file" + ,"gdk_pixbuf_new_from_file" + ,"gtk_icon_source_get_filename" + ,"gtk_icon_source_set_filename" + ,"gtk_file_chooser_get_filename" + ,"gtk_file_chooser_set_filename" + ,"gtk_file_chooser_select_filename" + ,"gtk_file_chooser_unselect_filename" + ,"gtk_file_chooser_get_filenames" + ,"gtk_file_chooser_set_current_folder" + ,"gtk_file_chooser_get_current_folder" + ,"gtk_file_chooser_get_preview_filename" + ,"gtk_file_chooser_add_shortcut_folder" + ,"gtk_file_chooser_remove_shortcut_folder" + ,"gtk_file_chooser_list_shortcut_folders" + ,"gtk_file_selection_set_filename" + ,"gtk_file_selection_get_filename"] + +genCall :: String -> Bool -> String +genCall cname safty | cname `elem` win32FileNameFunctions + = "#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)\n " + ++ genCallOrdinary (cname ++ "_utf8") safty + ++ "\n #else\n " + ++ genCallOrdinary cname safty + ++ "\n #endif" +genCall cname unsafe = genCallOrdinary cname unsafe Index: CodeGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/CodeGen.hs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CodeGen.hs 14 Feb 2005 02:10:49 -0000 1.3 +++ CodeGen.hs 15 Feb 2005 19:03:16 -0000 1.4 @@ -55,10 +55,10 @@ formatParamTypes (paramTypes ++ [returnType]) body = foldl (\body marshaler -> marshaler body) call (paramMarshalers++[returnMarshaler]) - call = ss "{# call ". safety. ss (method_cname method). ss " #}" + call = ss (genCall (method_cname method) safety) safety = case info of - Nothing -> id - Just info -> if methodinfo_unsafe info then ss "unsafe " else id + Nothing -> False + Just info -> methodinfo_unsafe info formattedDoc = case doc of Nothing -> ss "-- | \n-- \n" Just doc -> ss "-- | ". haddocFormatParas knownSymbols (funcdoc_paragraphs doc). nl. |
From: Duncan C. <dun...@us...> - 2005-02-15 19:04:01
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20635 Modified Files: ChangeLog Log Message: Deal with the win32 _utf8 issue. Generate code for {# call #}'s using the appropriate #if's. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.355 retrieving revision 1.356 diff -u -d -r1.355 -r1.356 --- ChangeLog 15 Feb 2005 17:54:55 -0000 1.355 +++ ChangeLog 15 Feb 2005 19:03:13 -0000 1.356 @@ -3,6 +3,10 @@ * gtk/Graphics/UI/Gtk/Display/Image.chs.pp: fix an #if test so that it works correctly and is consistent with the other similar ones. + * tools/apiGen/CodeGen.hs, tools/apiGen/Marshal.hs: deal with the + _utf8 issue on win32. Generate code for {# call #}'s using the + appropriate #if's. + 2005-02-14 Duncan Coutts <du...@co...> * tools/apiGen/glib-sources.xml: add extra sources spec. |
From: Duncan C. <dun...@us...> - 2005-02-15 17:55:12
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3854 Modified Files: ChangeLog Log Message: Fix an #if test so that it works correctly and is consistent with the other similar ones. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.354 retrieving revision 1.355 diff -u -d -r1.354 -r1.355 --- ChangeLog 14 Feb 2005 02:10:47 -0000 1.354 +++ ChangeLog 15 Feb 2005 17:54:55 -0000 1.355 @@ -1,3 +1,8 @@ +2005-02-15 Duncan Coutts <du...@co...> + + * gtk/Graphics/UI/Gtk/Display/Image.chs.pp: fix an #if test so that it + works correctly and is consistent with the other similar ones. + 2005-02-14 Duncan Coutts <du...@co...> * tools/apiGen/glib-sources.xml: add extra sources spec. |
From: Duncan C. <dun...@us...> - 2005-02-15 17:55:12
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Display In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3854/gtk/Graphics/UI/Gtk/Display Modified Files: Image.chs.pp Log Message: Fix an #if test so that it works correctly and is consistent with the other similar ones. Index: Image.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Display/Image.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Image.chs.pp 12 Feb 2005 17:19:22 -0000 1.2 +++ Image.chs.pp 15 Feb 2005 17:54:57 -0000 1.3 @@ -76,7 +76,7 @@ -- imageNewFromFile :: FilePath -> IO Image imageNewFromFile path = makeNewObject mkImage $ liftM castPtr $ -#ifdef WIN32 && GTK_VERSION(2,6,0) +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) withUTFString path {#call unsafe image_new_from_file_utf8#} #else withUTFString path {#call unsafe image_new_from_file#} |
From: Duncan C. <dun...@us...> - 2005-02-14 02:11:01
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18599/tools/apiGen Modified Files: Api.hs ApiGen.hs CodeGen.hs Docs.hs FormatDocs.hs Makefile Marshal.hs format-docs.xsl gnomecanvas-sources.xml Added Files: glib-sources.xml Log Message: Lots of little improvements to the generated documentation. Generalise the "KnownTypes" table to "KnownSymbols" and use that in various places to make the recognition of things we should hyperlink more accurate. Convert enum value names to Haskell style names. Recognise type names and enum value names even when they are not marked up in the original docs. Deal with deprecated objects and methods, but only generate deprecated methods where they exist in the original modules (ie don't add new deprecated methods) Handle "shared" methods but ignore the *_get_type() ones. Change to using FM's for the KnownSymbols map so it's not all quite so slow. Index: Marshal.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Marshal.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Marshal.hs 5 Feb 2005 02:57:40 -0000 1.1 +++ Marshal.hs 14 Feb 2005 02:10:49 -0000 1.2 @@ -1,6 +1,8 @@ module Marshal ( - KnownTypes, - CTypeKind(..), + KnownSymbols, + CSymbol(..), + ObjectKind(..), + EnumKind(..), stripKnownPrefixes, genMarshalParameter, genMarshalResult, @@ -9,15 +11,35 @@ import StringUtils import Char (isUpper) +import Data.FiniteMap -type KnownTypes = [(String, CTypeKind)] +type KnownSymbols = FiniteMap String CSymbol -data CTypeKind = GObjectKind - | GtkObjectKind - | EnumKind - | FlagsKind - deriving (Eq, Show) +data CSymbol = SymObjectType ObjectKind + | SymEnumType EnumKind + | SymEnumValue + | SymStructType + deriving Eq +data ObjectKind = GObjectKind | GtkObjectKind + deriving Eq +data EnumKind = EnumKind | FlagsKind + deriving Eq + +symbolIsObject (Just (SymObjectType _)) = True +symbolIsObject _ = False + +symbolIsGObject (Just (SymObjectType GObjectKind)) = True +symbolIsGObject _ = False + +symbolIsGtkObject (Just (SymObjectType GtkObjectKind)) = True +symbolIsGtkObject _ = False + +symbolIsEnum (Just (SymEnumType EnumKind)) = True +symbolIsEnum _ = False + +symbolIsFlags (Just (SymEnumType FlagsKind)) = True +symbolIsFlags _ = False stripKnownPrefixes :: String -> String stripKnownPrefixes ('A':'t':'k':remainder) = remainder @@ -32,7 +54,7 @@ ------------------------------------------------------------------------------- genMarshalParameter :: - KnownTypes -> --a collection of types we know to be objects or enums + KnownSymbols -> --a collection of types we know to be objects or enums String -> --parameter name suggestion (will be unique) String -> --C type decleration for the parameter we will marshal (Maybe String, --parameter class constraints (or none) @@ -77,36 +99,35 @@ indent 1. body. indent 2. sc ' '. ss name. ss "Ptr") -genMarshalParameter knownTypes name typeName' +genMarshalParameter knownSymbols name typeName' | isUpper (head typeName') && last typeName' == '*' && last typeName /= '*' - && (typeKind == Just GObjectKind - || typeKind == Just GtkObjectKind) = + && symbolIsObject typeKind = (Just $ shortTypeName ++ "Class " ++ name, Just name, \body -> body. indent 2. ss " (to". ss shortTypeName. sc ' '. ss name. ss ")") where typeName = init typeName' shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName -genMarshalParameter knownTypes name typeName +genMarshalParameter knownSymbols name typeName | isUpper (head typeName) - && typeKind == Just EnumKind = + && symbolIsEnum typeKind = (Nothing, Just shortTypeName, \body -> body. indent 2. ss " ((fromIntegral . fromEnum) ". ss name. ss ")") where shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName -genMarshalParameter knownTypes name typeName +genMarshalParameter knownSymbols name typeName | isUpper (head typeName) - && typeKind == Just FlagsKind = + && symbolIsFlags typeKind = (Nothing, Just shortTypeName, \body -> body. indent 2. ss " ((fromIntegral . fromFlags) ". ss name. ss ")") where shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName genMarshalParameter _ name unknownType = (Nothing, Just $ "{-" ++ unknownType ++ "-}", @@ -115,7 +136,7 @@ -- Takes the type string and returns the Haskell Type and the marshaling code -- -genMarshalResult :: KnownTypes -> String -> (String, ShowS -> ShowS) +genMarshalResult :: KnownSymbols -> String -> (String, ShowS -> ShowS) genMarshalResult _ "gboolean" = ("IO Bool", \body -> ss "liftM toBool $". indent 1. body) genMarshalResult _ "gint" = ("IO Int", \body -> ss "liftM fromIntegral $". indent 1. body) genMarshalResult _ "guint" = ("IO Int", \body -> ss "liftM fromIntegral $". indent 1. body) @@ -140,42 +161,41 @@ indent 1. ss ">>= fromGList". indent 1. ss ">>= mapM (\\elemPtr -> {-marshal elem-})") -genMarshalResult knownTypes typeName' +genMarshalResult knownSymbols typeName' | isUpper (head typeName') && last typeName' == '*' && last typeName /= '*' - && (typeKind == Just GObjectKind - || typeKind == Just GtkObjectKind) = + && symbolIsObject typeKind = ("IO " ++ shortTypeName, \body -> ss constructor. ss " mk". ss shortTypeName. ss " $". indent 1. body) where typeName = init typeName' shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes - constructor | typeKind == Just GObjectKind = "makeNewGObject" - | typeKind == Just GtkObjectKind = "makeNewObject" + typeKind = lookupFM knownSymbols typeName + constructor | symbolIsGObject typeKind = "makeNewGObject" + | symbolIsGtkObject typeKind = "makeNewObject" -genMarshalResult knownTypes typeName +genMarshalResult knownSymbols typeName | isUpper (head typeName) - && typeKind == Just EnumKind = + && symbolIsEnum typeKind = ("IO " ++ shortTypeName, \body -> ss "liftM (toEnum . fromIntegral) $". indent 1. body) where shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName -genMarshalResult knownTypes typeName +genMarshalResult knownSymbols typeName | isUpper (head typeName) - && typeKind == Just FlagsKind = + && symbolIsFlags typeKind = ("IO " ++ shortTypeName, \body -> ss "liftM (toFlags . fromIntegral) $". indent 1. body) where shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName genMarshalResult _ unknownType = ("{-" ++ unknownType ++ "-}", id) -genMarshalProperty :: KnownTypes -> String -> (String, String) +genMarshalProperty :: KnownSymbols -> String -> (String, String) genMarshalProperty _ "gint" = ("Int", "GVint") genMarshalProperty _ "guint" = ("Int", "GVuint") genMarshalProperty _ "gfloat" = ("Float", "GVfloat") @@ -183,26 +203,25 @@ genMarshalProperty _ "gboolean" = ("Bool", "GVboolean") genMarshalProperty _ "gchar*" = ("String", "GVstring") -genMarshalProperty knownTypes typeName +genMarshalProperty knownSymbols typeName | isUpper (head typeName) - && (typeKind == Just GObjectKind - || typeKind == Just GtkObjectKind) = + && symbolIsObject typeKind = (shortTypeName, "GVobject") where shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName -genMarshalProperty knownTypes typeName +genMarshalProperty knownSymbols typeName | isUpper (head typeName) - && typeKind == Just EnumKind = + && symbolIsEnum typeKind = (shortTypeName, "GVenum") where shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName -genMarshalProperty knownTypes typeName +genMarshalProperty knownSymbols typeName | isUpper (head typeName) - && typeKind == Just FlagsKind = + && symbolIsFlags typeKind = (shortTypeName, "GVflags") where shortTypeName = stripKnownPrefixes typeName - typeKind = shortTypeName `lookup` knownTypes + typeKind = lookupFM knownSymbols typeName genMarshalProperty _ unknown = ("{-" ++ unknown ++ "-}", "{-" ++ unknown ++ "-}") Index: CodeGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/CodeGen.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CodeGen.hs 10 Feb 2005 02:58:01 -0000 1.2 +++ CodeGen.hs 14 Feb 2005 02:10:49 -0000 1.3 @@ -2,7 +2,8 @@ genModuleBody, genExports, genTodoItems, - makeKnownTypesMap + makeKnownSymbolsMap, + mungeMethodInfo ) where import Api @@ -13,23 +14,28 @@ import ModuleScan import Prelude hiding (Enum, lines) -import List (groupBy, sortBy, isPrefixOf) +import List (groupBy, sortBy, isPrefixOf, isSuffixOf) +import Maybe (isNothing) +import Data.FiniteMap import Debug.Trace (trace) ------------------------------------------------------------------------------- -- Now lets actually generate some code fragments based on the api info ------------------------------------------------------------------------------- -genFunction :: KnownTypes -> Method -> Maybe FuncDoc -> Maybe MethodInfo -> ShowS -genFunction knownTypes method doc info = +genFunction :: KnownSymbols -> Method -> Maybe FuncDoc -> Maybe MethodInfo -> ShowS +genFunction knownSymbols method doc info = formattedDoc. + (if method_deprecated method + then ss "-- * Warning this function is deprecated\n--\n" + else id). ss functionName. ss " :: ". functionType. nl. ss functionName. sc ' '. sepBy " " paramNames. ss " =". indent 1. body where functionName = cFuncNameToHsName (method_cname method) (classConstraints', paramTypes', paramMarshalers) = - unzip3 [ case genMarshalParameter knownTypes + unzip3 [ case genMarshalParameter knownSymbols (changeIllegalNames (cParamNameToHsName (parameter_name p))) (parameter_type p) of (c, ty, m) -> (c, (ty, parameter_name p), m) @@ -40,7 +46,7 @@ paramNames = [ changeIllegalNames (cParamNameToHsName (parameter_name p)) | ((Just _, _), p) <- zip paramTypes' (method_parameters method) ] (returnType', returnMarshaler) = - genMarshalResult knownTypes (method_return_type method) + genMarshalResult knownSymbols (method_return_type method) returnType = (returnType', lookup "Returns" paramDocMap) functionType = (case classConstraints of [] -> id @@ -55,7 +61,7 @@ Just info -> if methodinfo_unsafe info then ss "unsafe " else id formattedDoc = case doc of Nothing -> ss "-- | \n-- \n" - Just doc -> ss "-- | ". haddocFormatParas (funcdoc_paragraphs doc). nl. + Just doc -> ss "-- | ". haddocFormatParas knownSymbols (funcdoc_paragraphs doc). nl. comment. nl paramDocMap = case doc of Nothing -> [] @@ -91,41 +97,44 @@ sepBy' ("\n" ++ replicate (columnIndent+5) ' ' ++ "-- ") . map (sepBy " ") . wrapText 3 (80 - columnIndent - 8) + . map (mungeWord knownSymbols) . words - . concatMap haddocFormatSpan + . concatMap (haddocFormatSpan knownSymbols) columnIndent = maximum [ length parmType | (parmType, _) <- paramTypes ] -genModuleBody :: String -> KnownTypes -> Object -> ModuleDoc -> ModuleInfo -> ShowS -genModuleBody modPrefix knownTypes object apiDoc modInfo = +genModuleBody :: KnownSymbols -> Object -> ModuleDoc -> ModuleInfo -> ShowS +genModuleBody knownSymbols object apiDoc modInfo = doVersionIfDefs (sepBy' "\n\n") $ - genConstructors knownTypes object (moduledoc_functions apiDoc) - ++ genMethods knownTypes object (moduledoc_functions apiDoc) - (mungeMethodInfo modPrefix object (module_methods modInfo)) - ++ genProperties knownTypes object (moduledoc_properties apiDoc) - ++ genSignals knownTypes object (moduledoc_signals apiDoc) + genConstructors knownSymbols object (moduledoc_functions apiDoc) + ++ genMethods knownSymbols object (moduledoc_functions apiDoc) (module_methods modInfo) + ++ genProperties knownSymbols object (moduledoc_properties apiDoc) + ++ genSignals knownSymbols object (moduledoc_signals apiDoc) -- fixup the names of the C functions we got from scaning the original modules -- we want the fully qualified "gtk_foo_bar" rather than "foo_bar" so that the -- names match up consistently with the ones from the API xml file. -mungeMethodInfo :: String -> Object -> [MethodInfo] -> [MethodInfo] -mungeMethodInfo nameSpacePrefix object = - map (\methodInfo -> if methodinfo_cname methodInfo `elem` shortMethodNames - then methodInfo { - methodinfo_cname = prefix ++ methodinfo_cname methodInfo - } - else methodInfo) +mungeMethodInfo :: Object -> ModuleInfo -> ModuleInfo +mungeMethodInfo object modInfo = + modInfo { + module_methods = map (\methodInfo -> + if methodinfo_cname methodInfo `elem` shortMethodNames + then methodInfo { + methodinfo_cname = prefix ++ methodinfo_cname methodInfo + } + else methodInfo) (module_methods modInfo) + } where shortMethodNames = map (stripPrefix . method_cname) (object_methods object) stripPrefix cname | prefix `isPrefixOf` cname = drop (length prefix) cname | otherwise = cname - prefix = nameSpacePrefix ++ "_" + prefix = module_context_prefix modInfo ++ "_" -genMethods :: KnownTypes -> Object -> [FuncDoc] -> [MethodInfo] -> [(ShowS, Since)] -genMethods knownTypes object apiDoc methodInfo = - [ (genFunction knownTypes method doc info, maybe "" funcdoc_since doc) - | (method, doc, info) <- methods object apiDoc methodInfo] +genMethods :: KnownSymbols -> Object -> [FuncDoc] -> [MethodInfo] -> [(ShowS, (Since, Deprecated))] +genMethods knownSymbols object apiDoc methodInfo = + [ (genFunction knownSymbols method doc info, (maybe "" funcdoc_since doc, method_deprecated method)) + | (method, doc, info) <- methods object apiDoc methodInfo True] -methods :: Object -> [FuncDoc] -> [MethodInfo] -> [(Method, Maybe FuncDoc, Maybe MethodInfo)] -methods object docs methodsInfo = +methods :: Object -> [FuncDoc] -> [MethodInfo] -> Bool -> [(Method, Maybe FuncDoc, Maybe MethodInfo)] +methods object docs methodsInfo sortByExisting = map snd $ sortBy (comparing fst) [ let (doc, docIndex) = case lookup (method_cname method) docmap of @@ -133,10 +142,14 @@ Just (doc, index) -> (Just doc, index) (info,infoIndex)= case lookup (method_cname method) infomap of Nothing -> (Nothing, endInfoIndex) - Just (info, index) -> (Just info, index) - in ((infoIndex,docIndex),(mungeMethod object method, doc, info)) + Just (info, index) -> (Just info, index) + index | sortByExisting = (infoIndex, docIndex) --preserve order from existing module + | otherwise = (docIndex, infoIndex) --use gtk-doc order + in (index,(mungeMethod object method, doc, info)) | method <- object_methods object - , null [ () | VarArgs <- method_parameters method] ] --exclude VarArgs methods + , null [ () | VarArgs <- method_parameters method] --exclude VarArgs methods + , not ("_get_type" `isSuffixOf` method_cname method && method_shared method) + , not (method_deprecated method && isNothing (lookup (method_cname method) infomap)) ] where docmap = [ (funcdoc_name doc, (doc,index)) | (doc,index) <- zip docs [1..] ] infomap = [ (methodinfo_cname info, (info,index)) @@ -156,9 +169,9 @@ method_parameters = self : method_parameters method } -genConstructors :: KnownTypes -> Object -> [FuncDoc] -> [(ShowS, Since)] -genConstructors knownTypes object apiDoc = - [ (genFunction knownTypes constructor doc Nothing, maybe "" funcdoc_since doc) +genConstructors :: KnownSymbols -> Object -> [FuncDoc] -> [(ShowS, (Since, Deprecated))] +genConstructors knownSymbols object apiDoc = + [ (genFunction knownSymbols constructor doc Nothing, (maybe "" funcdoc_since doc, notDeprecated)) | (constructor, doc) <- constructors object apiDoc ] constructors :: Object -> [FuncDoc] -> [(Method, Maybe FuncDoc)] @@ -174,7 +187,9 @@ method_name = cFuncNameToHsName (constructor_cname constructor), method_cname = constructor_cname constructor, method_return_type = object_cname object ++ "*", - method_parameters = constructor_parameters constructor + method_parameters = constructor_parameters constructor, + method_shared = False, + method_deprecated = False } properties :: Object -> [PropDoc] -> [(Property, Maybe PropDoc)] @@ -186,13 +201,13 @@ dashToUnderscore '-' = '_' dashToUnderscore c = c -genProperties :: KnownTypes -> Object -> [PropDoc] -> [(ShowS, Since)] -genProperties knownTypes object apiDoc = - [ (genProperty knownTypes object property doc, maybe "" propdoc_since doc) +genProperties :: KnownSymbols -> Object -> [PropDoc] -> [(ShowS, (Since, Deprecated))] +genProperties knownSymbols object apiDoc = + [ (genProperty knownSymbols object property doc, (maybe "" propdoc_since doc, notDeprecated)) | (property, doc) <- properties object apiDoc ] -genProperty :: KnownTypes -> Object -> Property -> Maybe PropDoc -> ShowS -genProperty knownTypes object property doc = +genProperty :: KnownSymbols -> Object -> Property -> Maybe PropDoc -> ShowS +genProperty knownSymbols object property doc = formattedDoc. ss propertyName. ss " :: Attr ". objectType. sc ' '. ss propertyType. nl. ss propertyName. ss " = Attr ". @@ -201,13 +216,13 @@ where objectType = ss (object_name object) propertyName = cFuncNameToHsName (property_cname property) getter = ss "(\\obj -> do ". ss gvalueConstructor. ss " result <- objectGetProperty \"". ss (property_cname property). ss "\"". - indent 7. ss "return result" + indent 7. ss "return result)" setter = ss "(\\obj val -> objectSetProperty obj \"". ss (property_cname property). ss "\" (". ss gvalueConstructor. ss " val))" formattedDoc = case doc of Nothing -> ss "-- | \n-- \n" - Just doc -> ss "-- | ". haddocFormatParas (propdoc_paragraphs doc). nl. + Just doc -> ss "-- | ". haddocFormatParas knownSymbols (propdoc_paragraphs doc). nl. comment. nl - (propertyType, gvalueConstructor) = genMarshalProperty knownTypes (property_type property) + (propertyType, gvalueConstructor) = genMarshalProperty knownSymbols (property_type property) signals :: Object -> [SignalDoc] -> [(Signal, Maybe SignalDoc)] signals object docs = @@ -218,13 +233,13 @@ dashToUnderscore '-' = '_' dashToUnderscore c = c -genSignals :: KnownTypes -> Object -> [SignalDoc] -> [(ShowS, Since)] -genSignals knownTypes object apiDoc = - [ (genSignal object signal doc, maybe "" signaldoc_since doc) +genSignals :: KnownSymbols -> Object -> [SignalDoc] -> [(ShowS, (Since, Deprecated))] +genSignals knownSymbols object apiDoc = + [ (genSignal knownSymbols object signal doc, (maybe "" signaldoc_since doc, notDeprecated)) | (signal, doc) <- signals object apiDoc ] -genSignal :: Object -> Signal -> Maybe SignalDoc -> ShowS -genSignal object property doc = +genSignal :: KnownSymbols -> Object -> Signal -> Maybe SignalDoc -> ShowS +genSignal knownSymbols object property doc = formattedDoc. ss "on". signalName. ss ", after". signalName. ss " :: ". nl. ss "on". signalName. ss " = connect_{-type-}". connectType. sc ' '. signalCName. ss " False". nl. @@ -235,30 +250,35 @@ signalCName = sc '"'. ss (signal_cname property). sc '"' formattedDoc = case doc of Nothing -> ss "-- | \n-- \n" - Just doc -> ss "-- | ". haddocFormatParas (signaldoc_paragraphs doc). nl. + Just doc -> ss "-- | ". haddocFormatParas knownSymbols (signaldoc_paragraphs doc). nl. comment. nl -makeKnownTypesMap :: API -> KnownTypes -makeKnownTypesMap api = - concat - [ [ (enum_name enum +makeKnownSymbolsMap :: API -> KnownSymbols +makeKnownSymbolsMap api = + (listToFM + . reverse + . concat) + [ [ (enum_cname enum ,case enum_variety enum of - "enum" -> EnumKind - "flags" -> FlagsKind) + EnumVariety -> SymEnumType EnumKind + FlagsVariety -> SymEnumType FlagsKind) | enum <- namespace_enums namespace ] - ++ [ (object_name object, objectKind object) + ++ [ (object_cname object, objectKind object) | object <- namespace_objects namespace ] + ++ [ ("GObject", SymObjectType GObjectKind) ] + ++ [ (member_cname member, SymEnumValue) + | enum <- namespace_enums namespace + , member <- enum_members enum ] | namespace <- api ] -- find if an object inherits via GtkObject or directly from GObject - where objectKind :: Object -> CTypeKind + where objectKind :: Object -> CSymbol objectKind object = lookup (objectParents object) where lookup [] = trace ( "Warning: " ++ object_name object ++ " does not inherit from GObject! " - ++ show (objectParents object)) GObjectKind - lookup ("GTypeModule":os) = GObjectKind -- GTypeModule is a GObject - lookup ("GObject":os) = GObjectKind - lookup ("GtkObject":os) = GtkObjectKind + ++ show (objectParents object)) SymStructType + lookup ("GObject":os) = SymObjectType GObjectKind + lookup ("GtkObject":os) = SymObjectType GtkObjectKind lookup (_:os) = lookup os objectParents :: Object -> [String] objectParents object = object_cname object : @@ -270,26 +290,27 @@ | namespace <- api , object <- namespace_objects namespace ] -genExports :: Object -> ModuleDoc -> ShowS -genExports object docs = +genExports :: Object -> ModuleDoc -> ModuleInfo -> ShowS +genExports object docs modInfo = comment.ss "* Types". indent 1.ss (object_name object).sc ','. indent 1.ss (object_name object).ss "Class,". indent 1.ss "castTo".ss (object_name object).sc ','. (case [ (ss " ". ss (cFuncNameToHsName (method_cname constructor)). sc ',' - ,maybe "" funcdoc_since doc) + ,(maybe "" funcdoc_since doc, notDeprecated)) | (constructor, doc) <- constructors object (moduledoc_functions docs)] of [] -> id cs -> nl.nl.comment.ss "* Constructors".nl. doVersionIfDefs lines cs). (case [ (ss " ". ss (cFuncNameToHsName (method_cname method)). sc ',' - ,maybe "" funcdoc_since doc) - | (method, doc, _) <- methods object (moduledoc_functions docs) []] of + ,(maybe "" funcdoc_since doc, method_deprecated method)) + | (method, doc, _) <- methods object (moduledoc_functions docs) + (module_methods modInfo) False] of [] -> id cs -> nl.nl.comment.ss "* Methods".nl. doVersionIfDefs lines cs). (case [ (ss " ". ss (cFuncNameToHsName (property_cname property)). sc ',' - ,maybe "" propdoc_since doc) + ,(maybe "" propdoc_since doc, notDeprecated)) | (property, doc) <- properties object (moduledoc_properties docs)] of [] -> id cs -> nl.nl.comment.ss "* Properties".nl. @@ -297,7 +318,7 @@ (case [ let signalName = (upperCaseFirstChar . cFuncNameToHsName . signal_cname) signal in (ss " on". ss signalName. sc ','.nl. ss " after". ss signalName. sc ',' - ,maybe "" signaldoc_since doc) + ,(maybe "" signaldoc_since doc, notDeprecated)) | (signal, doc) <- signals object (moduledoc_signals docs)] of [] -> id cs -> nl.nl.comment.ss "* Signals".nl. @@ -319,11 +340,16 @@ ss "TODO: the following varargs functions were not bound\n". lines (map (ss "-- * ".) varargsFunctions) -doVersionIfDefs :: ([ShowS] -> ShowS) -> [(ShowS, Since)] -> ShowS +type Deprecated = Bool +notDeprecated = False + +doVersionIfDefs :: ([ShowS] -> ShowS) -> [(ShowS, (Since, Deprecated))] -> ShowS doVersionIfDefs lines = lines - . map (\group -> sinceVersion (snd (head group)) - (lines (map fst group))) + . map (\group@((_,(since, deprecated)):_) -> + sinceVersion since + . ifdefDeprecated deprecated + $ (lines (map fst group))) . groupBy (\(_,a) (_,b) -> a == b) sinceVersion :: Since -> ShowS -> ShowS @@ -333,5 +359,12 @@ ss "\n#endif" sinceVersion _ body = body +ifdefDeprecated :: Deprecated -> ShowS -> ShowS +ifdefDeprecated True body = + ss "#ifndef DISABLE_DEPRECATED\n". + body. + ss "\n#endif" +ifdefDeprecated _ body = body + comparing :: (Ord a) => (b -> a) -> b -> b -> Ordering comparing p x y = compare (p x) (p y) Index: Api.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Api.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Api.hs 5 Feb 2005 02:57:39 -0000 1.1 +++ Api.hs 14 Feb 2005 02:10:48 -0000 1.2 @@ -2,6 +2,7 @@ API, NameSpace(..), Enum(..), + EnumVariety(..), Member(..), Object(..), Constructor(..), @@ -32,10 +33,13 @@ data Enum = Enum { enum_name :: String, enum_cname :: String, - enum_variety :: String, + enum_variety :: EnumVariety, enum_members :: [Member] } deriving Show +data EnumVariety = EnumVariety | FlagsVariety + deriving Show + data Member = Member { member_name :: String, member_cname :: String, @@ -49,7 +53,9 @@ object_constructors :: [Constructor], object_methods :: [Method], object_properties :: [Property], - object_signals :: [Signal] + object_signals :: [Signal], + object_deprecated :: Bool, + object_isinterface ::Bool } deriving Show data Constructor = Constructor { @@ -69,7 +75,9 @@ method_name :: String, method_cname :: String, method_return_type :: String, - method_parameters :: [Parameter] + method_parameters :: [Parameter], + method_shared :: Bool, --TODO: figure out what this means! + method_deprecated :: Bool } deriving Show data Property = Property { @@ -116,37 +124,47 @@ Just $ Enum { enum_name = Xml.verbatim name, enum_cname = Xml.verbatim cname, - enum_variety = Xml.verbatim variety, + enum_variety = case Xml.verbatim variety of + "enum" -> EnumVariety + "flags" -> FlagsVariety, enum_members = map extractEnumMember members } extractEnum _ = Nothing extractEnumMember :: Xml.Content -> Member -extractEnumMember (Xml.CElem (Xml.Elem "enum" - (("name", Xml.AttValue name): - ("cname", Xml.AttValue cname):value) [])) = +extractEnumMember (Xml.CElem (Xml.Elem "member" + (("cname", Xml.AttValue cname): + ("name", Xml.AttValue name):value) [])) = Member { member_name = Xml.verbatim name, member_cname = Xml.verbatim cname, member_value = case value of [] -> "" - [("cname", Xml.AttValue value)] -> Xml.verbatim value + [("value", Xml.AttValue value)] -> Xml.verbatim value } extractObject :: Xml.Content -> Maybe Object extractObject (Xml.CElem (Xml.Elem "object" - [("name", Xml.AttValue name), - ("cname", Xml.AttValue cname), - ("parent", Xml.AttValue parent)] content)) = - Just $ Object { + (("name", Xml.AttValue name): + ("cname", Xml.AttValue cname): + remainder) content)) = + let (parent, deprecated) = + case remainder of + [] | Xml.verbatim cname == "GdkBitmap" -> ([Left "GdkDrawable"], False) --Hack + [("parent", Xml.AttValue parent)] -> (parent, False) + [("deprecated", Xml.AttValue deprecated), + ("parent", Xml.AttValue parent)] -> (parent, True) + in Just $ Object { object_name = Xml.verbatim name, object_cname = Xml.verbatim cname, object_parent = Xml.verbatim parent, object_constructors = catMaybes (map extractConstructor content), object_methods = catMaybes (map extractMethod content), object_properties = catMaybes (map extractProperty content), - object_signals = catMaybes (map extractSignal content) + object_signals = catMaybes (map extractSignal content), + object_deprecated = deprecated, + object_isinterface = False } extractObject (Xml.CElem (Xml.Elem "interface" [("name", Xml.AttValue name), @@ -158,18 +176,30 @@ object_constructors = catMaybes (map extractConstructor content), object_methods = catMaybes (map extractMethod content), object_properties = catMaybes (map extractProperty content), - object_signals = catMaybes (map extractSignal content) + object_signals = catMaybes (map extractSignal content), + object_deprecated = False, + object_isinterface = True } +extractObject (Xml.CElem (Xml.Elem "object" [("name", Xml.AttValue name)] [])) | null (Xml.verbatim name) = Nothing +extractObject other@(Xml.CElem (Xml.Elem "object" _ _)) = error $ "extractObject: " ++ Xml.verbatim other +extractObject other@(Xml.CElem (Xml.Elem "interface" _ _)) = error $ "extractObject: " ++ Xml.verbatim other extractObject _ = Nothing extractMethod :: Xml.Content -> Maybe Method extractMethod (Xml.CElem (Xml.Elem "method" - [("name", Xml.AttValue name), - ("cname", Xml.AttValue cname)] + (("name", Xml.AttValue name): + ("cname", Xml.AttValue cname): + remainder) (Xml.CElem (Xml.Elem "return-type" [("type", Xml.AttValue return_type)] []) :content))) = - Just $ Method { + let (shared, deprecated) = + case remainder of + [] -> (False, False) + [("shared", _)] -> (True, False) + [("deprecated", _)] -> (False, True) + [("deprecated", _), ("shared", _)] -> (True, True) + in Just $ Method { method_name = Xml.verbatim name, method_cname = Xml.verbatim cname, method_return_type = Xml.verbatim return_type, @@ -177,8 +207,11 @@ case content of [] -> [] [Xml.CElem (Xml.Elem "parameters" [] parameters)] - -> map extractParameter parameters + -> map extractParameter parameters, + method_shared = shared, + method_deprecated = deprecated } +extractMethod other@(Xml.CElem (Xml.Elem "method" _ _)) = error $ "extractMethod: " ++ Xml.verbatim other extractMethod _ = Nothing extractParameter :: Xml.Content -> Parameter Index: FormatDocs.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/FormatDocs.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FormatDocs.hs 5 Feb 2005 02:57:39 -0000 1.1 +++ FormatDocs.hs 14 Feb 2005 02:10:49 -0000 1.2 @@ -11,45 +11,50 @@ cFuncNameToHsName, cParamNameToHsName, haddocFormatParas, + haddocFormatSpans, haddocFormatSpan, + mungeWord, changeIllegalNames, addVersionParagraphs ) where import Api (NameSpace(namespace_name)) import Docs -import Marshal (stripKnownPrefixes) +import Marshal (stripKnownPrefixes, KnownSymbols, CSymbol(..)) import StringUtils +import Maybe (isJust) +import Char (toLower, isUpper, isAlpha) import qualified List (lines) +import Data.FiniteMap ------------------------------------------------------------------------------- -- Functions for formatting haddock documentation ------------------------------------------------------------------------------- -genModuleDocumentation :: ModuleDoc -> ShowS -genModuleDocumentation moduledoc = +genModuleDocumentation :: KnownSymbols -> ModuleDoc -> ShowS +genModuleDocumentation knownSymbols moduledoc = (if null (moduledoc_description moduledoc) then id else comment.ss "* Description".nl. comment.nl. - comment.ss "| ".haddocFormatParas (moduledoc_description moduledoc).nl). + comment.ss "| ".haddocFormatParas knownSymbols (moduledoc_description moduledoc).nl). (if null (moduledoc_sections moduledoc) then id - else nl.comment.haddocFormatSections (moduledoc_sections moduledoc).nl.comment.nl). + else nl.comment.haddocFormatSections knownSymbols (moduledoc_sections moduledoc).nl.comment.nl). (if null (moduledoc_hierarchy moduledoc) then id else nl.comment.ss "* Class Hierarchy".nl. comment.ss "|".nl. comment.ss "@".nl. - comment.ss "| ".haddocFormatHierarchy (moduledoc_hierarchy moduledoc).nl. + comment.ss "| ".haddocFormatHierarchy knownSymbols (moduledoc_hierarchy moduledoc).nl. comment.ss "@".nl) -haddocFormatHierarchy :: [DocParaSpan] -> ShowS -haddocFormatHierarchy = +haddocFormatHierarchy :: KnownSymbols -> [DocParaSpan] -> ShowS +haddocFormatHierarchy knownSymbols = sepBy "\n-- |" . Prelude.lines - . concatMap haddocFormatSpan + . concatMap (haddocFormatSpan knownSymbols) addVersionParagraphs :: NameSpace -> ModuleDoc -> ModuleDoc addVersionParagraphs namespace apiDoc = @@ -85,75 +90,93 @@ [] -> "" versions -> minimum versions -haddocFormatSections :: [DocSection] -> ShowS -haddocFormatSections = +haddocFormatSections :: KnownSymbols -> [DocSection] -> ShowS +haddocFormatSections knownSymbols = sepBy' "\n\n-- " . map (\section -> ss "** ". ss (section_title section). nl. comment.nl. - comment.ss "| ".haddocFormatParas (section_paras section)) + comment.ss "| ".haddocFormatParas knownSymbols (section_paras section)) -haddocFormatParas :: [DocPara] -> ShowS -haddocFormatParas = +haddocFormatParas :: KnownSymbols -> [DocPara] -> ShowS +haddocFormatParas knownSymbols = sepBy' "\n--\n-- " - . map haddocFormatPara + . map (haddocFormatPara knownSymbols) -haddocFormatPara :: DocPara -> ShowS -haddocFormatPara (DocParaText spans) = haddocFormatSpans 3 spans -haddocFormatPara (DocParaProgram prog) = +haddocFormatPara :: KnownSymbols -> DocPara -> ShowS +haddocFormatPara knownSymbols (DocParaText spans) = haddocFormatSpans knownSymbols 3 spans +haddocFormatPara knownSymbols (DocParaProgram prog) = ((ss "* FIXME: if the follwing is a C code example, port it to Haskell or remove it".nl. comment).) . sepBy "\n-- > " . List.lines $ prog -haddocFormatPara (DocParaTitle title) = +haddocFormatPara knownSymbols (DocParaTitle title) = ss "* ". ss title -haddocFormatPara (DocParaDefItem term spans) = - let def = (unwords . words . escape . concatMap haddocFormatSpan) term in +haddocFormatPara knownSymbols (DocParaDefItem term spans) = + let def = (unwords . words . escape . concatMap (haddocFormatSpan knownSymbols)) term in sc '['. ss def. ss "] ". - haddocFormatSpans (length def + 6) spans + haddocFormatSpans knownSymbols (length def + 6) spans where escape [] = [] escape (']':cs) = '\\': ']' : escape cs --we must escape ] in def terms escape (c:cs) = c : escape cs -haddocFormatPara (DocParaListItem spans) = +haddocFormatPara knownSymbols (DocParaListItem spans) = ss "* ". - haddocFormatSpans 5 spans + haddocFormatSpans knownSymbols 5 spans -haddocFormatSpans :: Int -> [DocParaSpan] -> ShowS -haddocFormatSpans initialCol = +haddocFormatSpans :: KnownSymbols -> Int -> [DocParaSpan] -> ShowS +haddocFormatSpans knownSymbols initialCol = sepBy' "\n-- " . map (sepBy " ") . wrapText initialCol 77 + . map (mungeWord knownSymbols) . words - . concatMap haddocFormatSpan + . concatMap (haddocFormatSpan knownSymbols) -haddocFormatSpan :: DocParaSpan -> String -haddocFormatSpan (DocText text) = escapeHaddockSpecialChars text -haddocFormatSpan (DocTypeXRef text) = "\"" ++ stripKnownPrefixes text ++ "\"" -haddocFormatSpan (DocFuncXRef text) = "'" ++ cFuncNameToHsName text ++ "'" -haddocFormatSpan (DocOtherXRef text) = "'{FIXME: gtk-doc cross reference to:" ++ text ++ "}'" -haddocFormatSpan (DocEmphasis text) = "/" ++ text ++ "/" -haddocFormatSpan (DocLiteral "TRUE") = "@True@" -haddocFormatSpan (DocLiteral "FALSE") = "@False@" +haddocFormatSpan :: KnownSymbols -> DocParaSpan -> String +haddocFormatSpan _ (DocText text) = escapeHaddockSpecialChars text +haddocFormatSpan knownSymbols (DocTypeXRef text) = + case lookupFM knownSymbols text of + Nothing -> "{" ++ text ++ ", FIXME: unknown type/value}" + Just (SymObjectType _) -> "\"" ++ stripKnownPrefixes text ++ "\"" + Just (SymEnumType _) -> "'" ++ stripKnownPrefixes text ++ "'" + Just SymEnumValue -> "'" ++ cConstNameToHsName text ++ "'" + _ -> "{" ++ text ++ ", FIXME: unknown type/value}" --TODO fill in the other cases +-- | looksLikeConstant text = "'" ++ cConstNameToHsName text ++ "'" +-- | otherwise = "\"" ++ stripKnownPrefixes text ++ "\"" +haddocFormatSpan _ (DocFuncXRef text) = "'" ++ cFuncNameToHsName text ++ "'" +haddocFormatSpan _ (DocOtherXRef text) = "'{FIXME: gtk-doc cross reference to:" ++ text ++ "}'" +haddocFormatSpan _ (DocEmphasis text) = "/" ++ text ++ "/" +haddocFormatSpan _ (DocLiteral "TRUE") = "@True@" +haddocFormatSpan _ (DocLiteral "FALSE") = "@False@" --likely that something should be changed to a Maybe type if this is emitted: -haddocFormatSpan (DocLiteral "NULL") = "{@NULL@, FIXME: this should probably be converted" +haddocFormatSpan _ (DocLiteral "NULL") = "{@NULL@, FIXME: this should probably be converted" ++ " to a Maybe data type}" -haddocFormatSpan (DocLiteral text) = "@" ++ escapeHaddockSpecialChars text ++ "@" -haddocFormatSpan (DocArg text) = "@" ++ cParamNameToHsName text ++ "@" +haddocFormatSpan _ (DocLiteral text) = "@" ++ escapeHaddockSpecialChars text ++ "@" +haddocFormatSpan _ (DocArg text) = "@" ++ cParamNameToHsName text ++ "@" cFuncNameToHsName :: String -> String cFuncNameToHsName = lowerCaseFirstChar . stripKnownPrefixes - . concatMap upperCaseFirstChar - . filter (not.null) --to ignore leading underscores - . splitBy '_' + . toStudlyCaps . takeWhile ('('/=) cParamNameToHsName :: String -> String cParamNameToHsName = --change "gtk_foo_bar" to "gtkFooBar" lowerCaseFirstChar - . concatMap upperCaseFirstChar + . toStudlyCaps + +cConstNameToHsName :: String -> String +cConstNameToHsName = --change "GTK_UPDATE_DISCONTINUOUS" to "updateDiscontinuous" + lowerCaseFirstChar + . stripKnownPrefixes + . toStudlyCaps + . map toLower + +toStudlyCaps :: String -> String +toStudlyCaps = --change "gtk_foo_bar" to "GtkFooBar" + concatMap upperCaseFirstChar . filter (not.null) --to ignore tailing underscores . splitBy '_' @@ -169,4 +192,43 @@ || c == '"' || c == '@' || c == '<' || c == ''' = '\\': c : escape cs - escape (c:cs) = c : escape cs + escape (c:cs) = c : escape cs + +mungeWord :: KnownSymbols -> String -> String +mungeWord knownSymbols ('G':'T':'K':'+':remainder) = "Gtk+" ++ remainder +mungeWord knownSymbols word + | word' == "TRUE" = "@True@" ++ remainder + | word' == "FALSE" = "@False@" ++ remainder + | word' == "NULL" = "{@NULL@, FIXME: this should probably be converted to a Maybe data type}" + ++ remainder + | isJust e = case e of + Just (SymObjectType _) -> "\"" ++ stripKnownPrefixes word' ++ "\"" ++ remainder + Just (SymEnumType _) -> "'" ++ stripKnownPrefixes word' ++ "'" ++ remainder + Just SymEnumValue -> "'" ++ cConstNameToHsName word' ++ "'" ++ remainder + | otherwise = word + where e = lookupFM knownSymbols word' + (word', remainder) = span (\c -> isAlpha c || c == '_') word +{- +mungeWord _ "GTK+" = "Gtk+" +mungeWord _ "GTK+," = "Gtk+," +mungeWord _ "GTK+." = "Gtk+." +mungeWord _ "TRUE" = "@True@" +mungeWord _ "FALSE" = "@False@" +mungeWord _ "TRUE," = "@True@," +mungeWord _ "FALSE," = "@False@," +mungeWord _ "NULL" = "{@NULL@, FIXME: this should probably be converted to a Maybe data type}" +mungeWord knownSymbols word | isJust e = case e of + Just (SymObjectType _) -> "\"" ++ stripKnownPrefixes word' ++ "\"" ++ remainder + Just (SymEnumType _) -> "'" ++ stripKnownPrefixes word' ++ "'" ++ remainder + Just SymEnumValue -> "'" ++ cConstNameToHsName word' ++ "'" ++ remainder + where e = lookupFM knownSymbols word' + (word', remainder) = span (\c -> isAlpha c || c == '_') word +mungeWord _ word = word +-} + +-- eg C constants with names like GTK_UPDATE_DISCONTINUOUS +looksLikeConstant :: String -> Bool +looksLikeConstant ('G':'T':'K':'_':rest) = all (\c -> isUpper c || c == '_') rest +looksLikeConstant ('G':'D':'K':'_':rest) = all (\c -> isUpper c || c == '_') rest +looksLikeConstant ('P':'A':'N':'G':'O':'_':rest) = all (\c -> isUpper c || c == '_') rest +looksLikeConstant _ = False Index: ApiGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/ApiGen.hs,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ApiGen.hs 10 Feb 2005 02:58:01 -0000 1.14 +++ ApiGen.hs 14 Feb 2005 02:10:48 -0000 1.15 @@ -14,7 +14,7 @@ import StringUtils (ss, templateSubstitute, splitOn) import ModuleScan -import Monad (when) +import Monad (when, liftM) import List (isPrefixOf, intersperse) import System (getArgs, exitWith, ExitCode(..)) import Directory (doesDirectoryExist, createDirectory) @@ -75,7 +75,7 @@ -- included from Gdk and Pango includeApi = [ extractAPI (Xml.xmlParse apiFile content) | (apiFile, content) <- zip includeApiFiles includeApiFilesContents] - knownTypes = makeKnownTypesMap (api ++ concat includeApi) + knownTypes = makeKnownSymbolsMap (api ++ concat includeApi) ----------------------------------------------------------------------------- -- Read in the documentation xml file if supplied @@ -118,6 +118,7 @@ return noModuleDoc Just moduleDoc -> return $ addVersionParagraphs namespace moduleDoc moduleInfo <- + liftM (mungeMethodInfo object) $ case maybeModuleInfo of Just moduleInfo -> do mkDirHier outdir (splitOn '.' (module_prefix moduleInfo)) return moduleInfo @@ -147,19 +148,18 @@ "OBJECT_NAME" -> ss $ module_name moduleInfo "AUTHORS" -> ss $ concat $ intersperse ", " $ module_authors moduleInfo "COPYRIGHT" -> ss $ concat $ intersperse ", " $ module_copyright_holders moduleInfo - "DESCRIPTION" -> ss (moduledoc_summary moduleDoc) - "DOCUMENTATION" -> genModuleDocumentation moduleDoc + "DESCRIPTION" -> haddocFormatSpans knownTypes 3 (moduledoc_summary moduleDoc) + "DOCUMENTATION" -> genModuleDocumentation knownTypes moduleDoc "TODO" -> genTodoItems object "MODULE_NAME" -> ss $ if null (module_prefix moduleInfo) then module_name moduleInfo else module_prefix moduleInfo ++ "." ++ module_name moduleInfo - "EXPORTS" -> genExports object moduleDoc + "EXPORTS" -> genExports object moduleDoc moduleInfo "IMPORTS" -> ss $ "{#import Graphics.UI.Gtk.Types#}\n" ++ "-- CHECKME: extra imports may be required\n" "CONTEXT_LIB" -> ss $ module_context_lib moduleInfo "CONTEXT_PREFIX" -> ss $ module_context_prefix moduleInfo - "MODULE_BODY" -> genModuleBody (module_context_prefix moduleInfo) - knownTypes object moduleDoc moduleInfo + "MODULE_BODY" -> genModuleBody knownTypes object moduleDoc moduleInfo _ -> ss "" ) "" ) [ (namespace ,object --- NEW FILE: glib-sources.xml --- <gapi-parser-input> <api filename="glib-api.xml"> <library name="gobject"> <namespace name="GObject"> <dir>glib-2.4.8/gobject</dir> <!-- exclude programs --> <exclude>glib-2.4.8/gobject/glib-genmarshal.c</exclude> <exclude>glib-2.4.8/gobject/gobject-query.c</exclude> <exclude>glib-2.4.8/gobject/stamp-gmarshal.h</exclude> <exclude>glib-2.4.8/gobject/testgobject.c</exclude> <!-- this file causes the gapi parser to go into a infinite loop --> <exclude>glib-2.4.8/gobject/gvalue.h</exclude> </namespace> </library> </api> </gapi-parser-input> Index: format-docs.xsl =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/format-docs.xsl,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- format-docs.xsl 5 Feb 2005 01:21:47 -0000 1.10 +++ format-docs.xsl 14 Feb 2005 02:10:49 -0000 1.11 @@ -100,7 +100,7 @@ <module-info> <name><xsl:value-of select="refentry/refnamediv/refname"/></name> <altname><xsl:value-of select="refentry/refsynopsisdiv/anchor/@id"/></altname> - <summary><xsl:value-of select="refentry/refnamediv/refpurpose"/></summary> + <summary><xsl:apply-templates select="refentry/refnamediv/refpurpose"/></summary> <description> <xsl:for-each select="refentry/refsect1[title='Description']"> <xsl:apply-templates select="para | section | refsect2"/> @@ -155,7 +155,7 @@ </xsl:for-each> --> <!-- Properties documentation (new formatting) --> - <xsl:for-each select="refentry/refsect1[title='Properties']/refsect2"> + <xsl:for-each select="refentry/refsect1[title='Properties' or title='Style Properties']/refsect2"> <property> <name><xsl:value-of select="substring-before(substring-after(title,'"'),'"')"/></name> <since> Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 7 Feb 2005 00:38:02 -0000 1.6 +++ Makefile 14 Feb 2005 02:10:49 -0000 1.7 @@ -73,11 +73,11 @@ ./mkdocxml.sh $< | xsltproc format-docs.xsl - > $@ gtk-modules : gtk-api.xml gtk-docs.xml Template.chs ApiGen \ - gdk-api.xml pango-api.xml atk-api.xml + gdk-api.xml pango-api.xml atk-api.xml glib-api.xml @mkdir -p $@ ./ApiGen $< Template.chs --doc=gtk-docs.xml --outdir=$@ \ --includeapi=gdk-api.xml --includeapi=pango-api.xml \ - --includeapi=atk-api.xml \ + --includeapi=atk-api.xml --includeapi=glib-api.xml \ --modprefix=Graphics.UI.Gtk.{-Category-} \ --scanmodules=../../gtk/Graphics/UI/Gtk @@ -124,9 +124,11 @@ # # gnomecanvas modules # -gnomecanvas-modules : gnomecanvas-api.xml Template.chs ApiGen +gnomecanvas-modules : gnomecanvas-api.xml Template.chs ApiGen \ + gtk-api.xml @mkdir -p $@ - ./ApiGen $< Template.chs --outdir=$@ + ./ApiGen $< Template.chs --outdir=$@ \ + --includeapi=gtk-api.xml ######################## Index: Docs.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Docs.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Docs.hs 5 Feb 2005 02:58:45 -0000 1.1 +++ Docs.hs 14 Feb 2005 02:10:49 -0000 1.2 @@ -23,7 +23,7 @@ data ModuleDoc = ModuleDoc { moduledoc_name :: String, -- these docs apply to this object moduledoc_altname :: String, -- sometimes a better index entry - moduledoc_summary :: String, -- a one line summary + moduledoc_summary :: [DocParaSpan], -- a one line summary moduledoc_description :: [DocPara], -- the main description moduledoc_sections :: [DocSection], -- any additional titled subsections moduledoc_hierarchy :: [DocParaSpan], -- a tree of parent objects (as text) @@ -35,7 +35,7 @@ noModuleDoc = ModuleDoc { moduledoc_name = "", moduledoc_altname = "", - moduledoc_summary = "", + moduledoc_summary = [], moduledoc_description = [], moduledoc_sections = [], moduledoc_hierarchy = [], @@ -126,7 +126,7 @@ in ModuleDoc { moduledoc_name = Xml.verbatim name, moduledoc_altname = Xml.verbatim altname, - moduledoc_summary = Xml.verbatim summary, + moduledoc_summary = map extractDocParaSpan summary, moduledoc_description = concatMap extractDocPara paras, moduledoc_sections = map extractDocSection sections, moduledoc_hierarchy = map extractDocParaSpan objHierSpans, @@ -241,6 +241,9 @@ extractDocParaOrSpan (Xml.CElem (Xml.Elem "programlisting" _ content)) = let listing = concat [ str | (Xml.CString _ str) <- content ] in Right $ DocParaProgram listing +extractDocParaOrSpan para@(Xml.CElem (Xml.Elem "para" _ _)) = + case extractDocPara para of + [para'] -> Right para' --handle this special case, we do not expect nested paras very often extractDocParaOrSpan content@(Xml.CElem _ ) = Left $ extractDocParaSpan content extractDocParaOrSpan content@(Xml.CString _ _) = Left $ extractDocParaSpan content extractDocParaOrSpan other = error $ "extractDocParaOrSpan: " ++ Xml.verbatim other Index: gnomecanvas-sources.xml =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/gnomecanvas-sources.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gnomecanvas-sources.xml 27 Jan 2005 23:10:15 -0000 1.2 +++ gnomecanvas-sources.xml 14 Feb 2005 02:10:49 -0000 1.3 @@ -2,7 +2,7 @@ <api filename="gnomecanvas-api.xml"> <library name="gnomecanvas"> <namespace name="Gnome"> - <dir>libgnomecanvas-2.6.0/libgnomecanvas</dir> + <dir>libgnomecanvas-2.6.1.1/libgnomecanvas</dir> </namespace> </library> </api> |
From: Duncan C. <dun...@us...> - 2005-02-14 02:10:57
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18599 Modified Files: ChangeLog Log Message: Lots of little improvements to the generated documentation. Generalise the "KnownTypes" table to "KnownSymbols" and use that in various places to make the recognition of things we should hyperlink more accurate. Convert enum value names to Haskell style names. Recognise type names and enum value names even when they are not marked up in the original docs. Deal with deprecated objects and methods, but only generate deprecated methods where they exist in the original modules (ie don't add new deprecated methods) Handle "shared" methods but ignore the *_get_type() ones. Change to using FM's for the KnownSymbols map so it's not all quite so slow. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.353 retrieving revision 1.354 diff -u -d -r1.353 -r1.354 --- ChangeLog 13 Feb 2005 16:25:53 -0000 1.353 +++ ChangeLog 14 Feb 2005 02:10:47 -0000 1.354 @@ -1,3 +1,29 @@ +2005-02-14 Duncan Coutts <du...@co...> + + * tools/apiGen/glib-sources.xml: add extra sources spec. + + * tools/apiGen/gnomecanvas-sources.xml: refer to the correct version. + + * tools/apiGen/format-docs.xsl: collect docs on "Style Properties" and + allow formatting in module summary. + + * tools/apiGen/Api.hs, tools/apiGen/Docs.hs, tools/apiGen/Marshal.hs, + tools/apiGen/FormatDocs.hs, tools/apiGen/CodeGen.hs, + tools/apiGen/ApiGen.hs: lots of little improvements to the generated + documentation. Generalise the "KnownTypes" table to "KnownSymbols" and + use that in various places to make the recognition of things we should + hyperlink more accurate. Convert enum value names to Haskell style + names. Recognise type names and enum value names even when they are + not marked up in the original docs. Deal with deprecated objects and + methods, but only generate deprecated methods where they exist in the + original modules (ie don't add new deprecated methods). Handle + "shared" methods but ignore the *_get_type() ones. Cchange to using + FM's for the KnownSymbols map so it's not all quite so slow. + + * tools/apiGen/Makefile: use the glib api when generating the gtk + modules, and similarly, use the gtk api when generating the + gnomecanvas modules. + 2005-02-13 Axel Simon <A....@ke...> * configure.ac: Removed some unnecessary tests and variable. @@ -16,7 +42,7 @@ renamed from .chs to .chs.pp. * Makefile.am: Rename the files from .chs to .chs.pp. - + 2005-02-12 Duncan Coutts <du...@co...> * gtk/Graphics/UI/Gtk/Abstract/Bin.chs, |
From: Axel S. <as...@us...> - 2005-02-13 16:59:21
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Display In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4174 Removed Files: Image.chs Log Message: Remove this file which was renamed to Image.chs.pp. --- Image.chs DELETED --- |
From: Axel S. <as...@us...> - 2005-02-13 16:26:37
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286 Modified Files: ChangeLog Makefile.am configure.ac Log Message: Make compile on Windows against Gtk 2.6.1. All functions that pass filenames were redefined to a name that ends in _utf8. Added preprocessor magic to circumvent this. Furthermore added --subsystem windows as a linker flag whenever the gtk package is used during linking. This prevents a console window from opening. Index: configure.ac =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.ac,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- configure.ac 11 Feb 2005 14:49:29 -0000 1.30 +++ configure.ac 13 Feb 2005 16:25:54 -0000 1.31 @@ -1,4 +1,4 @@ -dnl Mogul - a monad based gui library +dnl Gtk2hs - a wrapper around Gtk+ for Haskell dnl dnl Copyright (c) 2001, 2002 Axel Simon <as...@uk...> dnl with parts stolen from Manuel Chakravaty, Sven Panne and Micheal Weber @@ -64,67 +64,32 @@ dnl FIXME: this should probably be taken from ghc's config.h AC_CHECK_SIZEOF(void *, 4) -dnl On some systems (Solaris,...) asking sh for the current directory -dnl (with a built-in pwd) and asking make for the current directory -dnl gives different results. Thus, if possible, we use the same external -dnl program for determining the current path. -dnl The AC_PATH_PROG macro does not work because pwd is a built-in and -dnl therefore evaluated in the body of the expanded macro. -AC_MSG_CHECKING(for external pwd) -PWD=`which pwd 2> /dev/null` -if test -z "$PWD"; then - AC_MSG_RESULT([none found]) - PWD="pwd"; -else - AC_MSG_RESULT($PWD) -fi; - dnl Figure out file extensions. AC_EXEEXT dnl Check for library pre- and suffixes. if test x$EXEEXT = x; then dnl must be unix - SLSUFFIX=".a"; - SLPREFIX="lib"; - DLSUFFIX=".so"; - DLPREFIX="lib"; - dnl the hash sign is a comment for sed - PATHSED=["\#"]; HSCFLAGS=; C2HSFLAGS=" -C-D__signed=signed"; dnl Where are we? (only used during configuration) - TOP=`$PWD`; CREATE_TYPES="plugNsocket default"; + STARTUP_CODE=; else dnl must be Win32 - SLSUFFIX=".lib"; - SLPREFIX=""; - DLSUFFIX=".dll"; - DLPREFIX=""; - dnl replace something like /c/ with c:/ - case $host_os in - *cygwin* ) PATHSED=["s+/cygdrive/\([a-z]\)/+\1:/+"];; - *mingw32* ) PATHSED=["s+/\([a-z]\)/+\1:/+"];; - * ) PATHSED=["\#"];; - esac; HSCFLAGS="-C -optc-mms-bitfields" C2HSFLAGS=; dnl Where are we? (only used during configuration) - TOP=`$PWD | $SED $PATHSED`; WIN32=yes; CREATE_TYPES=default; + # It would be nice to say -Wl,--subsystem,windows which seems to be the + # normal way. However, Solaris' sed is broken and won't deal with the + # commas correctly: Symptom: "./configure: Bad substitution" + STARTUP_CODE="-Xlinker --subsystem -Xlinker windows"; fi; AM_CONDITIONAL(WIN32, test "$WIN32" = "yes") -dnl determine a temporary directory for c2hs -TMPDIR="/tmp" -if test "$WIN32" = "yes"; then - TMPDIR="C:\TMP" -fi -AC_SUBST(TMPDIR) - dnl Check for libraries. dnl Is Manuels Ports library present? @@ -411,23 +376,23 @@ dnl Furthermore we remove all libraries and directories for packages that dnl built on top of gtk so that they don't appear several times on the dnl command line. -GLIB_CFLAGS=`tools/checkDirs.sh $GLIB_CFLAGS`; -GLIB_LIBS=`tools/checkDirs.sh $GLIB_LIBS`; +GLIB_CFLAGS=`SED=$SED GREP=$GREP tools/checkDirs.sh $GLIB_CFLAGS`; +GLIB_LIBS=`SED=$SED GREP=$GREP tools/checkDirs.sh $GLIB_LIBS`; -GTK_CFLAGS=`CFLAGS="$GLIB_CFLAGS" tools/checkDirs.sh $GTK_CFLAGS`; -GTK_LIBS=`LDFLAGS="$GLIB_LIBS" tools/checkDirs.sh $GTK_LIBS`; +GTK_CFLAGS=`CFLAGS="$GLIB_CFLAGS" SED=$SED GREP=$GREP tools/checkDirs.sh $GTK_CFLAGS`; +GTK_LIBS=`LDFLAGS="$GLIB_LIBS" SED=$SED GREP=$GREP tools/checkDirs.sh $GTK_LIBS $STARTUP_CODE`; -SOURCEVIEW_CFLAGS=`CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS" tools/checkDirs.sh $SOURCEVIEW_CFLAGS`; -SOURCEVIEW_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" tools/checkDirs.sh $SOURCEVIEW_LIBS`; +SOURCEVIEW_CFLAGS=`CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS" SED=$SED GREP=$GREP tools/checkDirs.sh $SOURCEVIEW_CFLAGS`; +SOURCEVIEW_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" SED=$SED GREP=$GREP tools/checkDirs.sh $SOURCEVIEW_LIBS`; -LIBGLADE_CFLAGS=`CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS" tools/checkDirs.sh $LIBGLADE_CFLAGS`; -LIBGLADE_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" tools/checkDirs.sh $LIBGLADE_LIBS`; +LIBGLADE_CFLAGS=`CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS" SED=$SED GREP=$GREP tools/checkDirs.sh $LIBGLADE_CFLAGS`; +LIBGLADE_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" SED=$SED GREP=$GREP tools/checkDirs.sh $LIBGLADE_LIBS`; -GCONF_CFLAGS=`CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS" tools/checkDirs.sh $GCONF_CFLAGS`; -GCONF_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" tools/checkDirs.sh $GCONF_LIBS`; +GCONF_CFLAGS=`CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS" SED=$SED GREP=$GREP tools/checkDirs.sh $GCONF_CFLAGS`; +GCONF_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" SED=$SED GREP=$GREP tools/checkDirs.sh $GCONF_LIBS`; MOZEMBED_CFLAGS=`CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS" tools/checkDirs.sh $MOZEMBED_CFLAGS`; -MOZEMBED_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" tools/checkDirs.sh $MOZEMBED_LIBS`; +MOZEMBED_LIBS=`LDFLAGS="$GLIB_LIBS $GTK_LIBS" SED=$SED GREP=$GREP tools/checkDirs.sh $MOZEMBED_LIBS`; dnl Change the representation of these flags to "flag1","flag2". The @@ -515,18 +480,12 @@ [ --with-mlist=GTK-SOURCE use special marshall list from GTK+ sources], [MARSHALLDEFS=$withval; AC_MSG_RESULT($withval)], - [MARSHALLDEFS='$(TOP)/tools/callbackGen/gtkmarshal.list'; + [MARSHALLDEFS='tools/callbackGen/gtkmarshal.list'; AC_MSG_RESULT(built-in)]) dnl c2hs Dilemma. -dnl We provide a local copy of Manuel's c2hs which is patched so that is can -dnl process several .chs files at the same invocation. This patch was not -dnl incooperated into the main c2hs version since Manuel wants to do some -dnl other fundamental changes first. The nice thing is that with the built-in -dnl c2hs this whole package can be built without any other libraries. - dnl Check if the user supplied a specific C->Haskell installation or wants to dnl use the version in the current search path (--with-c2hs-config=yes). dnl The default is to use the built-in version. @@ -564,7 +523,7 @@ if test $BUILT_IN_C2HS = yes; then AC_MSG_RESULT([built-in]) dnl Use the local c2hs. - C2HS='$(TOP)/tools/c2hs/c2hsLocal$(EXEEXT)'; + C2HS='./tools/c2hs/c2hsLocal$(EXEEXT)'; dnl These are the settings needed to compile c2hs. LEGACY_FFI=no; @@ -631,8 +590,6 @@ [GHC_DOCDIR=$withval]) dnl Needed substitution. -AC_SUBST(PWD) -AC_SUBST(TOP) AC_SUBST(BUILT_IN_C2HS) AC_SUBST(MULTIPLE_CHS) AC_SUBST(FOUR_WORD_CALLBACK) @@ -645,12 +602,6 @@ AC_SUBST(MARSHALLDEFS) AC_SUBST(VERSION) dnl Platform specific flags -AC_SUBST(DLPREFIX) -AC_SUBST(DLSUFFIX) -AC_SUBST(SLPREFIX) -AC_SUBST(SLSUFFIX) -AC_SUBST(WIN32) -AC_SUBST(PATHSED) AC_SUBST(HSCFLAGS) AC_SUBST(C2HSFLAGS) AC_SUBST(EXTRA_HFILES) Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- Makefile.am 12 Feb 2005 15:59:31 -0000 1.48 +++ Makefile.am 13 Feb 2005 16:25:54 -0000 1.49 @@ -396,14 +396,14 @@ gtk/Graphics/UI/Gtk/TreeList/TreeStore.chs.pp \ gtk/Graphics/UI/Gtk/TreeList/TreeView.chs.pp \ gtk/Graphics/UI/Gtk/Windows/Dialog.chs \ - gtk/Graphics/UI/Gtk/Windows/FileSel.chs \ + gtk/Graphics/UI/Gtk/Windows/FileSel.chs.pp \ gtk/Graphics/UI/Gtk/Windows/Window.chs.pp \ gtk/Graphics/UI/Gtk/Gdk/Drawable.chs.pp \ gtk/Graphics/UI/Gtk/Gdk/GC.chs \ gtk/Graphics/UI/Gtk/Gdk/Gdk.chs \ gtk/Graphics/UI/Gtk/Gdk/Enums.chs \ gtk/Graphics/UI/Gtk/Gdk/Keys.chs \ - gtk/Graphics/UI/Gtk/Gdk/Pixbuf.chs \ + gtk/Graphics/UI/Gtk/Gdk/Pixbuf.chs.pp \ gtk/Graphics/UI/Gtk/Pango/Description.chs \ gtk/Graphics/UI/Gtk/Pango/Enums.chs.pp \ gtk/Graphics/UI/Gtk/Pango/Layout.chs \ Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.352 retrieving revision 1.353 diff -u -d -r1.352 -r1.353 --- ChangeLog 12 Feb 2005 18:33:34 -0000 1.352 +++ ChangeLog 13 Feb 2005 16:25:53 -0000 1.353 @@ -1,3 +1,22 @@ +2005-02-13 Axel Simon <A....@ke...> + + * configure.ac: Removed some unnecessary tests and variable. + + * tools/checkDir: Use $SED from the configure file instead of sed, + similar for grep. This helps on Solaris where the native sed cannot + cope with the expression in this file, giving a "Bad substitution". + + * gtk/Graphics/UI/Gtk/General/IconFactory.chs.pp, + gtk/Graphics/UI/Gtk/Selectors/FileChooser.chs.pp: Conditionally + rename functions that take file names to match the special convention + of having a _utf8 ending on Windows. + + * gtk/Graphics/UI/Gtk/Gdk/Pixbuf.chs.pp, + gtk/Graphics/UI/Gtk/Windows/FileSel.chs.pp: As above. Furthermore + renamed from .chs to .chs.pp. + + * Makefile.am: Rename the files from .chs to .chs.pp. + 2005-02-12 Duncan Coutts <du...@co...> * gtk/Graphics/UI/Gtk/Abstract/Bin.chs, |
From: Axel S. <as...@us...> - 2005-02-13 16:26:07
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286/gtk/Graphics/UI/Gtk/Selectors Modified Files: FileChooser.chs.pp Log Message: Make compile on Windows against Gtk 2.6.1. All functions that pass filenames were redefined to a name that ends in _utf8. Added preprocessor magic to circumvent this. Furthermore added --subsystem windows as a linker flag whenever the gtk package is used during linking. This prevents a console window from opening. Index: FileChooser.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Selectors/FileChooser.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FileChooser.chs.pp 12 Feb 2005 17:19:25 -0000 1.2 +++ FileChooser.chs.pp 13 Feb 2005 16:25:57 -0000 1.3 @@ -151,23 +151,42 @@ fileChooserGetFilename :: FileChooserClass chooser => chooser -> IO (Maybe String) fileChooserGetFilename chooser = do - strPtr <- {# call gtk_file_chooser_get_filename #} (toFileChooser chooser) +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + strPtr <- {# call gtk_file_chooser_get_filename_utf8 #} +#else + strPtr <- {# call gtk_file_chooser_get_filename #} +#endif + (toFileChooser chooser) maybePeek readCString strPtr fileChooserSetFilename :: FileChooserClass chooser => chooser -> String -> IO Bool fileChooserSetFilename chooser filename = liftM toBool $ withCString filename $ \strPtr -> +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + {# call gtk_file_chooser_set_filename_utf8 #} (toFileChooser chooser) strPtr +#else {# call gtk_file_chooser_set_filename #} (toFileChooser chooser) strPtr +#endif fileChooserSelectFilename :: FileChooserClass chooser => chooser -> String -> IO Bool fileChooserSelectFilename chooser filename = liftM toBool $ withCString filename $ \strPtr -> - {# call gtk_file_chooser_select_filename #} (toFileChooser chooser) strPtr +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + {# call gtk_file_chooser_select_filename_utf8 #} +#else + {# call gtk_file_chooser_select_filename #} +#endif + (toFileChooser chooser) strPtr fileChooserUnselectFilename :: FileChooserClass chooser => chooser -> String -> IO () fileChooserUnselectFilename chooser filename = withCString filename $ \strPtr -> - {# call gtk_file_chooser_unselect_filename #} (toFileChooser chooser) strPtr +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + {# call gtk_file_chooser_unselect_filename_utf8 #} +#else + {# call gtk_file_chooser_unselect_filename #} +#endif + (toFileChooser chooser) strPtr fileChooserSelectAll :: FileChooserClass chooser => chooser -> IO () fileChooserSelectAll chooser = @@ -179,17 +198,32 @@ fileChooserGetFilenames :: FileChooserClass chooser => chooser -> IO [String] fileChooserGetFilenames chooser = do - strList <- {# call gtk_file_chooser_get_filenames #} (toFileChooser chooser) +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + strList <- {# call gtk_file_chooser_get_filenames_utf8 #} +#else + strList <- {# call gtk_file_chooser_get_filenames #} +#endif + (toFileChooser chooser) fromStringGSList strList fileChooserSetCurrentFolder :: FileChooserClass chooser => chooser -> String -> IO Bool fileChooserSetCurrentFolder chooser foldername = liftM toBool $ withCString foldername $ \strPtr -> - {# call gtk_file_chooser_set_current_folder #} (toFileChooser chooser) strPtr +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + {# call gtk_file_chooser_set_current_folder_utf8 #} +#else + {# call gtk_file_chooser_set_current_folder #} +#endif + (toFileChooser chooser) strPtr fileChooserGetCurrentFolder :: FileChooserClass chooser => chooser -> IO (Maybe String) fileChooserGetCurrentFolder chooser = do - strPtr <- {# call gtk_file_chooser_get_current_folder #} (toFileChooser chooser) +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + strPtr <- {# call gtk_file_chooser_get_current_folder_utf8 #} +#else + strPtr <- {# call gtk_file_chooser_get_current_folder #} +#endif + (toFileChooser chooser) maybePeek readCString strPtr fileChooserGetURI :: FileChooserClass chooser => chooser -> IO (Maybe String) @@ -258,7 +292,12 @@ fileChooserGetPreviewFilename :: FileChooserClass chooser => chooser -> IO (Maybe String) fileChooserGetPreviewFilename chooser = do - strPtr <- {# call gtk_file_chooser_get_preview_filename #} (toFileChooser chooser) +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + strPtr <- {# call gtk_file_chooser_get_preview_filename_utf8 #} +#else + strPtr <- {# call gtk_file_chooser_get_preview_filename #} +#endif + (toFileChooser chooser) maybePeek readCString strPtr fileChooserGetPreviewURI :: FileChooserClass chooser => chooser -> IO (Maybe String) @@ -304,21 +343,33 @@ fileChooserAddShortcutFolder chooser foldername = propagateGError $ \gerrorPtr -> withCString foldername $ \strPtr -> do - {# call gtk_file_chooser_add_shortcut_folder #} (toFileChooser chooser) - strPtr gerrorPtr +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + {# call gtk_file_chooser_add_shortcut_folder_utf8 #} +#else + {# call gtk_file_chooser_add_shortcut_folder #} +#endif + (toFileChooser chooser) strPtr gerrorPtr return () fileChooserRemoveShortcutFolder :: FileChooserClass chooser => chooser -> String -> IO () fileChooserRemoveShortcutFolder chooser foldername = propagateGError $ \gerrorPtr -> withCString foldername $ \strPtr -> do - {# call gtk_file_chooser_remove_shortcut_folder #} (toFileChooser chooser) - strPtr gerrorPtr +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + {# call gtk_file_chooser_remove_shortcut_folder_utf8 #} +#else + {# call gtk_file_chooser_remove_shortcut_folder #} +#endif + (toFileChooser chooser) strPtr gerrorPtr return () fileChooserlistShortcutFolders :: FileChooserClass chooser => chooser -> IO [String] fileChooserlistShortcutFolders chooser = do +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + strList <- {# call gtk_file_chooser_list_shortcut_folders_utf8 #} +#else strList <- {# call gtk_file_chooser_list_shortcut_folders #} +#endif (toFileChooser chooser) fromStringGSList strList |
From: Axel S. <as...@us...> - 2005-02-13 16:26:07
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286/gtk/Graphics/UI/Gtk/Windows Added Files: FileSel.chs.pp Removed Files: FileSel.chs Log Message: Make compile on Windows against Gtk 2.6.1. All functions that pass filenames were redefined to a name that ends in _utf8. Added preprocessor magic to circumvent this. Furthermore added --subsystem windows as a linker flag whenever the gtk package is used during linking. This prevents a console window from opening. --- NEW FILE: FileSel.chs.pp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget FileSelection -- -- Author : Manuel M T Chakravarty -- -- Created: 20 January 1999 -- -- Version $Revision: 1.1 $ from $Date: 2005/02/13 16:25:57 $ -- -- Copyright (C) 1999-2005 Manuel M T Chakravarty, Jens Petersen -- -- 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 2.1 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. -- -- | -- Maintainer : gtk...@li... -- Stability : provisional -- Portability : portable (depends on GHC) -- -- The file selection widget is a quick and simple way to display a File -- dialog box. It comes complete with Ok & Cancel buttons; optionally, it -- can have file operation buttons. -- -- * As of gtk 2.4 this module has been deprecated in favour of "FileChooser" -- -- TODO -- -- * Fix fileSelectionQueryButtons -- module Graphics.UI.Gtk.Windows.FileSel ( FileSelectionClass, FileSelection, fileSelectionNew, fileSelectionSetFilename, fileSelectionGetFilename, fileSelectionShowFileopButtons, fileSelectionHideFileopButtons, fileSelectionGetButtons, fileSelectionComplete ) where import Monad (liftM) import System.Glib.FFI import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.General.Structs (fileSelectionGetButtons) {#context lib="libgtk" prefix ="gtk"#} -- operations -- ---------- -- | Create a new file selection dialog with -- the given window title. -- fileSelectionNew :: String -> IO FileSelection fileSelectionNew title = do withUTFString title $ \strPtr -> makeNewObject mkFileSelection $ liftM castPtr $ {#call unsafe file_selection_new#} strPtr -- | Set the filename for the given file -- selection dialog. -- fileSelectionSetFilename :: FileSelectionClass fsel => fsel -> String -> IO () fileSelectionSetFilename fsel str = withUTFString str $ \strPtr -> #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) {#call unsafe file_selection_set_filename_utf8#} #else {#call unsafe file_selection_set_filename#} #endif (toFileSelection fsel) strPtr -- | Get the filename currently selected by -- the given file selection dialog. -- fileSelectionGetFilename :: FileSelectionClass fsel => fsel -> IO String fileSelectionGetFilename fsel = do #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) strPtr <- {#call unsafe file_selection_get_filename_utf8#} #else strPtr <- {#call unsafe file_selection_get_filename#} #endif (toFileSelection fsel) peekUTFString strPtr -- | Show the file operation buttons -- of the given file selection dialog. -- fileSelectionShowFileopButtons :: FileSelectionClass fsel => fsel -> IO () fileSelectionShowFileopButtons = {#call file_selection_show_fileop_buttons#} . toFileSelection -- | Hide the file operation buttons -- of the given file selection dialog. -- fileSelectionHideFileopButtons :: FileSelectionClass fsel => fsel -> IO () fileSelectionHideFileopButtons = {#call file_selection_hide_fileop_buttons#} . toFileSelection -- currently broken -- -- query the widgets of the file selectors buttons -- -- -- -- * this is useful to attach signals handlers to these buttons -- -- -- -- * the buttons are OK & Cancel (in this order) -- -- -- fileSelectionQueryButtons :: FileSelectionClass fsel -- => fsel -- -> IO (Button, Button) -- fileSelectionQueryButtons fsel = -- withForeignPtr (unFileSelection $ toFileSelection fsel) $ \ ptr -> do -- ok <- {#get FileSelection.ok_button #} ptr -- cancel <- {#get FileSelection.cancel_button#} ptr -- return (castToButton ok, castToButton cancel) -- | Only show files matching pattern. -- fileSelectionComplete :: FileSelectionClass fsel => fsel -> String -> IO () fileSelectionComplete fsel pattern = withUTFString pattern $ \patternPtr -> {#call file_selection_complete#} (toFileSelection fsel) patternPtr --- FileSel.chs DELETED --- |
From: Axel S. <as...@us...> - 2005-02-13 16:26:07
|
Update of /cvsroot/gtk2hs/gtk2hs/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286/tools Modified Files: checkDirs.sh Log Message: Make compile on Windows against Gtk 2.6.1. All functions that pass filenames were redefined to a name that ends in _utf8. Added preprocessor magic to circumvent this. Furthermore added --subsystem windows as a linker flag whenever the gtk package is used during linking. This prevents a console window from opening. Index: checkDirs.sh =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/checkDirs.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- checkDirs.sh 28 Nov 2004 22:03:21 -0000 1.2 +++ checkDirs.sh 13 Feb 2005 16:25:58 -0000 1.3 @@ -4,20 +4,22 @@ # Usage: # ./checkDirs.sh {-I<dir1> | -L<dir2> | <flag>} # +if test -z "$SED"; then SED=sed; fi; +if test -z "$GREP"; then GREP=grep; fi; RES=; for FLAG in $@; do case $FLAG in - -L*) DIR=`echo $FLAG | sed "s/-L//"`; + -L*) DIR=`echo $FLAG | $SED "s/-L//"`; if test -d $DIR; then - if test -z "`echo $LDFLAGS | grep -e $FLAG`"; then + if test -z "`echo $LDFLAGS | $GREP -e $FLAG`"; then RES="$RES $FLAG"; fi; fi;; - -I*) DIR=`echo $FLAG | sed "s/-I//"`; + -I*) DIR=`echo $FLAG | $SED "s/-I//"`; if test -d $DIR; then - if test -z "`echo $CFLAGS | grep -e $FLAG`"; then + if test -z "`echo $CFLAGS | $GREP -e $FLAG`"; then RES="$RES $FLAG"; fi; fi;; - *) if test -z "`echo $CFLAGS $LDFLAGS | grep -e $FLAG`"; then + *) if test -z "`echo $CFLAGS $LDFLAGS | $GREP -e $FLAG`"; then RES="$RES $FLAG"; fi;; esac; done; |
From: Axel S. <as...@us...> - 2005-02-13 16:26:06
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/General In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286/gtk/Graphics/UI/Gtk/General Modified Files: IconFactory.chs.pp Log Message: Make compile on Windows against Gtk 2.6.1. All functions that pass filenames were redefined to a name that ends in _utf8. Added preprocessor magic to circumvent this. Furthermore added --subsystem windows as a linker flag whenever the gtk package is used during linking. This prevents a console window from opening. Index: IconFactory.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/General/IconFactory.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- IconFactory.chs.pp 12 Feb 2005 17:19:23 -0000 1.2 +++ IconFactory.chs.pp 13 Feb 2005 16:25:57 -0000 1.3 @@ -295,7 +295,11 @@ -- iconSourceGetFilename :: IconSource -> IO (Maybe String) iconSourceGetFilename is = do +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + strPtr <- {#call unsafe icon_source_get_filename_utf8#} is +#else strPtr <- {#call unsafe icon_source_get_filename#} is +#endif if strPtr==nullPtr then return Nothing else liftM Just $ peekUTFString strPtr -- | Retrieve the 'IconSize' of this @@ -372,7 +376,11 @@ -- iconSourceSetFilename :: IconSource -> FilePath -> IO () iconSourceSetFilename is name = - withUTFString name $ {#call unsafe icon_source_set_filename#} is +#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) + withUTFString name $ {# call unsafe icon_source_set_filename_utf8 #} is +#else + withUTFString name $ {# call unsafe icon_source_set_filename #} is +#endif -- | Retrieves the source pixbuf, or Nothing if none is set. -- |
From: Axel S. <as...@us...> - 2005-02-13 16:26:06
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Gdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286/gtk/Graphics/UI/Gtk/Gdk Added Files: Pixbuf.chs.pp Removed Files: Pixbuf.chs Log Message: Make compile on Windows against Gtk 2.6.1. All functions that pass filenames were redefined to a name that ends in _utf8. Added preprocessor magic to circumvent this. Furthermore added --subsystem windows as a linker flag whenever the gtk package is used during linking. This prevents a console window from opening. --- Pixbuf.chs DELETED --- --- NEW FILE: Pixbuf.chs.pp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) Pixbuf -- -- Author : Vincenzo Ciancia, Axel Simon -- -- Created: 26 March 2002 -- -- Version $Revision: 1.1 $ from $Date: 2005/02/13 16:25:56 $ -- -- Copyright (C) 2002-2005 Axel Simon, Vincenzo Ciancia -- -- 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 2.1 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. -- -- | -- Maintainer : gtk2hs-users\@lists.sourceforge.net -- Stability : provisional -- Portability : portable (depends on GHC) -- -- 'Pixbuf's are bitmap images in memory. -- -- * A Pixbuf is used to represent images. It contains information -- about the image's pixel data, its color space, bits per sample, width -- and height, and the rowstride or number of bytes between rows. -- -- * This module contains functions to scale and crop -- 'Pixbuf's and to scale and crop a 'Pixbuf' and -- compose the result with an existing image. -- -- TODO -- -- * if there is a portable way of modifying external arrays in Haskell do: -- gdk_pixbuf_get_pixels, gdk_pixbuf_new_from_data, everything in -- Inline data, -- -- * if anybody writes an image manipulation program, do the checker board -- functions: gdk_pixbuf_composite_color_simple and -- gdk_pixbuf_composite_color. Moreover, do: pixbuf_saturate_and_pixelate -- -- * the animation functions -- -- * pixbuf loader -- -- * module interface -- -- * rendering function for Bitmaps and Pixmaps when the latter are added -- module Graphics.UI.Gtk.Gdk.Pixbuf ( Pixbuf, PixbufClass, PixbufError(..), Colorspace(..), pixbufGetColorSpace, pixbufGetNChannels, pixbufGetHasAlpha, pixbufGetBitsPerSample, pixbufGetWidth, pixbufGetHeight, pixbufGetRowstride, pixbufGetOption, pixbufNewFromFile, ImageType, pixbufGetFormats, pixbufSave, pixbufNew, pixbufNewFromXPMData, InlineImage, pixbufNewFromInline, pixbufNewSubpixbuf, pixbufCopy, InterpType(..), pixbufScaleSimple, pixbufScale, pixbufComposite, pixbufAddAlpha, pixbufCopyArea, pixbufFill, pixbufGetFromDrawable ) where import Monad (liftM) import Control.Exception(bracket) import Data.Bits ((.|.), shiftL) import System.Glib.FFI import System.Glib.UTFString import System.Glib.GObject {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.Structs (Rectangle(..)) import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain, checkGError, checkGErrorWithCont) {#context prefix="gdk" #} -- | Error codes for loading image files. -- {#enum PixbufError {underscoreToCase} #} -- | Enumerate all supported color spaces. -- -- * Only RGB is supported right now. -- {#enum Colorspace {underscoreToCase} #} -- | Queries the color space of a pixbuf. -- pixbufGetColorSpace :: Pixbuf -> IO Colorspace pixbufGetColorSpace pb = liftM (toEnum . fromIntegral) $ {#call unsafe pixbuf_get_colorspace#} pb -- | Queries the number of colors for each pixel. -- pixbufGetNChannels :: Pixbuf -> IO Int pixbufGetNChannels pb = liftM fromIntegral $ {#call unsafe pixbuf_get_n_channels#} pb -- | Query if the image has an alpha channel. -- -- * The alpha channel determines the opaqueness of the pixel. -- pixbufGetHasAlpha :: Pixbuf -> IO Bool pixbufGetHasAlpha pb = liftM toBool $ {#call unsafe pixbuf_get_has_alpha#} pb -- | Queries the number of bits for each color. -- -- * Each pixel is has a number of cannels for each pixel, each channel -- has this many bits. -- pixbufGetBitsPerSample :: Pixbuf -> IO Int pixbufGetBitsPerSample pb = liftM fromIntegral $ {#call unsafe pixbuf_get_bits_per_sample#} pb -- | Queries the width of this image. -- pixbufGetWidth :: Pixbuf -> IO Int pixbufGetWidth pb = liftM fromIntegral $ {#call unsafe pixbuf_get_width#} pb -- | Queries the height of this image. -- pixbufGetHeight :: Pixbuf -> IO Int pixbufGetHeight pb = liftM fromIntegral $ {#call unsafe pixbuf_get_height#} pb -- | Queries the rowstride of this image. -- -- * Queries the rowstride of a pixbuf, which is the number of bytes between -- rows. Use this value to caculate the offset to a certain row. -- pixbufGetRowstride :: Pixbuf -> IO Int pixbufGetRowstride pb = liftM fromIntegral $ {#call unsafe pixbuf_get_rowstride#} pb -- | Returns an attribut of an image. -- -- * Looks up if some information was stored under the @key@ when -- this image was saved. -- pixbufGetOption :: Pixbuf -> String -> IO (Maybe String) pixbufGetOption pb key = withUTFString key $ \strPtr -> do resPtr <- {#call unsafe pixbuf_get_option#} pb strPtr if (resPtr==nullPtr) then return Nothing else liftM Just $ peekUTFString resPtr -- helper functions pixbufErrorDomain :: GErrorDomain pixbufErrorDomain = unsafePerformIO {#call unsafe pixbuf_error_quark#} instance GErrorClass PixbufError where gerrorDomain _ = pixbufErrorDomain handlePixbufError :: GError -> IO (PixbufError,String) handlePixbufError (GError dom code msg) | dom == pixbufErrorDomain = return (toEnum code, msg) | otherwise = fail msg -- | Load an image synchonously. -- -- * Use this function to load only small images as this call will block. -- -- * The function will return @Left (err,msg)@ where @err@ -- is the error code and @msg@ is a human readable description -- of the error. If an error occurs which is not captured by any of -- those in 'PixbufError', an exception is thrown. -- pixbufNewFromFile :: FilePath -> IO (Either (PixbufError,String) Pixbuf) pixbufNewFromFile fname = checkGErrorWithCont (\errPtrPtr -> withUTFString fname $ \strPtr -> #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) {#call unsafe pixbuf_new_from_file_utf8#} #else {#call unsafe pixbuf_new_from_file#} #endif strPtr errPtrPtr) (\gerror -> liftM Left $ handlePixbufError gerror) (\pbPtr -> liftM Right $ makeNewGObject mkPixbuf (return pbPtr)) -- | A string representing an image file format. -- type ImageType = String -- constant pixbufGetFormats A list of valid image file formats. -- pixbufGetFormats :: [ImageType] pixbufGetFormats = ["png","bmp","wbmp", "gif","ico","ani","jpeg","pnm", "ras","tiff","xpm","xbm","tga"] -- | Save an image to disk. -- -- * The function takes a list of key - value pairs to specify -- either how an image is saved or to actually save this additional -- data with the image. JPEG images can be saved with a \"quality\" -- parameter; its value should be in the range [0,100]. Text chunks -- can be attached to PNG images by specifying parameters of the form -- \"tEXt::key\", where key is an ASCII string of length 1-79. -- The values are Unicode strings. -- -- * The function returns @Nothing@ if writing was successful. -- Otherwise the error code and a description is returned or, -- if the error is not captured by one of the error codes in -- 'PixbufError', an exception is thrown. -- pixbufSave :: Pixbuf -> FilePath -> ImageType -> [(String, String)] -> IO (Maybe (PixbufError, String)) pixbufSave pb fname iType options = let (keys, values) = unzip options in let optLen = length keys in checkGError (\errPtrPtr -> withUTFString fname $ \fnPtr -> withUTFString iType $ \tyPtr -> allocaArray0 optLen $ \keysPtr -> allocaArray optLen $ \valuesPtr -> do keyPtrs <- mapM newUTFString keys valuePtrs <- mapM newUTFString values pokeArray keysPtr keyPtrs pokeArray valuesPtr valuePtrs {#call unsafe pixbuf_savev#} pb fnPtr tyPtr keysPtr valuesPtr errPtrPtr mapM_ free keyPtrs mapM_ free valuePtrs return Nothing) (\gerror -> liftM Just $ handlePixbufError gerror) -- | Create a new image in memory. -- -- * Creates a new pixbuf structure and allocates a buffer for -- it. Note that the buffer is not cleared initially. -- pixbufNew :: Colorspace -> Bool -> Int -> Int -> Int -> IO Pixbuf pixbufNew colorspace hasAlpha bitsPerSample width height = makeNewGObject mkPixbuf $ {#call pixbuf_new#} ((fromIntegral . fromEnum) colorspace) (fromBool hasAlpha) (fromIntegral bitsPerSample) (fromIntegral width) (fromIntegral height) -- | Create a new image from a String. -- -- * Creates a new pixbuf from a string description. -- pixbufNewFromXPMData :: [String] -> IO Pixbuf pixbufNewFromXPMData s = bracket (mapM newUTFString s) (mapM free) $ \strPtrs -> withArray0 nullPtr strPtrs $ \strsPtr -> makeNewGObject mkPixbuf $ {#call pixbuf_new_from_xpm_data#} strsPtr -- | A dymmy type for inline picture data. -- -- * This dummy type is used to declare pointers to image data -- that is embedded in the executable. See -- 'pixbufNewFromInline' for an example. -- data InlineImage = InlineImage -- | Create a new image from a static pointer. -- -- * Like 'pixbufNewFromXPMData', this function allows to -- include images in the final binary program. The method used by this -- function uses a binary representation and therefore needs less space -- in the final executable. Save the image you want to include as -- @png@ and run: -- @echo #include \"my_image.h\" > my_image.c@ -- gdk-pixbuf-csource --raw --extern --name=my_image myimage.png >> my_image.c -- on it. Write a header file @my_image.h@ containing: -- @#include <gdk\gdk.h> -- extern guint8 my_image\[\];@ -- and save it in the current directory. -- The created file can be compiled with: -- @cc -c my_image.c \`pkg-config --cflags gdk-2.0\`@ -- into an object file which must be linked into your Haskell program by -- specifying @my_image.o@ and @\"-#include my_image.h\"@ on -- the command line of GHC. -- Within you application you delcare a pointer to this image: -- @foreign label \"my_image\" myImage :: Ptr InlineImage@ -- Calling 'pixbufNewFromInline' with this pointer will -- return the image in the object file. Creating the C file with -- the @--raw@ flag will result in a non-compressed image in the -- object file. The advantage is that the picture will not be -- copied when this function is called. -- -- pixbufNewFromInline :: Ptr InlineImage -> IO Pixbuf pixbufNewFromInline iPtr = alloca $ \errPtrPtr -> do pbPtr <- {#call unsafe pixbuf_new_from_inline#} (-1) (castPtr iPtr) (fromBool False) (castPtr errPtrPtr) if pbPtr/=nullPtr then makeNewGObject mkPixbuf (return pbPtr) else do errPtr <- peek errPtrPtr (GError dom code msg) <- peek errPtr error msg -- | Create a restricted view of an image. -- -- * This function returns a 'Pixbuf' object which shares -- the image of the original one but only shows a part of it. -- Modifying either buffer will affect the other. -- -- * This function throw an exception if the requested bounds are invalid. -- pixbufNewSubpixbuf :: Pixbuf -> Int -> Int -> Int -> Int -> IO Pixbuf pixbufNewSubpixbuf pb srcX srcY height width = makeNewGObject mkPixbuf $ do pbPtr <- {#call unsafe pixbuf_new_subpixbuf#} pb (fromIntegral srcX) (fromIntegral srcY) (fromIntegral height) (fromIntegral width) if pbPtr==nullPtr then error "pixbufNewSubpixbuf: invalid bounds" else return pbPtr -- | Create a deep copy of an image. -- pixbufCopy :: Pixbuf -> IO Pixbuf pixbufCopy pb = makeNewGObject mkPixbuf $ {#call unsafe pixbuf_copy#} pb -- | How an image is scaled. -- -- [@InterpNearest@] Nearest neighbor sampling; this is the -- fastest and lowest quality mode. Quality is normally unacceptable when -- scaling down, but may be OK when scaling up. -- -- [@InterpTiles@] This is an accurate simulation of the -- PostScript image operator without any interpolation enabled. Each -- pixel is rendered as a tiny parallelogram of solid color, the edges of -- which are implemented with antialiasing. It resembles nearest neighbor -- for enlargement, and bilinear for reduction. -- -- [@InterpBilinear@] Best quality\/speed balance; use this -- mode by default. Bilinear interpolation. For enlargement, it is -- equivalent to point-sampling the ideal bilinear-interpolated -- image. For reduction, it is equivalent to laying down small tiles and -- integrating over the coverage area. -- -- [@InterpHyper@] This is the slowest and highest quality -- reconstruction function. It is derived from the hyperbolic filters in -- Wolberg's \"Digital Image Warping\", and is formally defined as the -- hyperbolic-filter sampling the ideal hyperbolic-filter interpolated -- image (the filter is designed to be idempotent for 1:1 pixel mapping). -- {#enum InterpType {underscoreToCase} #} -- | Scale an image. -- -- * Creates a new 'GdkPixbuf' containing a copy of -- @src@ scaled to the given measures. Leaves @src@ -- unaffected. -- -- * @interp@ affects the quality and speed of the scaling function. -- 'InterpNearest' is the fastest option but yields very poor quality -- when scaling down. 'InterpBilinear' is a good trade-off between -- speed and quality and should thus be used as a default. -- pixbufScaleSimple :: Pixbuf -> Int -> Int -> InterpType -> IO Pixbuf pixbufScaleSimple pb width height interp = makeNewGObject mkPixbuf $ liftM castPtr $ {#call pixbuf_scale_simple#} (toPixbuf pb) (fromIntegral width) (fromIntegral height) (fromIntegral $ fromEnum interp) -- | Copy a scaled image part to another image. -- -- * This function is the generic version of 'pixbufScaleSimple'. -- It scales @src@ by @scaleX@ and @scaleY@ and -- translate the image by @offsetX@ and @offsetY@. Whatever -- is in the intersection with the rectangle @destX@, -- @destY@, @destWidth@, @destHeight@ will be -- rendered into @dest@. -- -- * The rectangle in the destination is simply overwritten. Use -- 'pixbufComposite' if you need to blend the source -- image onto the destination. -- pixbufScale :: Pixbuf -> Pixbuf -> Int -> Int -> Int -> Int -> Double -> Double -> Double -> Double -> InterpType -> IO () pixbufScale src dest destX destY destWidth destHeight offsetX offsetY scaleX scaleY interp = {#call unsafe pixbuf_scale#} src dest (fromIntegral destX) (fromIntegral destY) (fromIntegral destHeight) (fromIntegral destWidth) (realToFrac offsetX) (realToFrac offsetY) (realToFrac scaleX) (realToFrac scaleY) ((fromIntegral . fromEnum) interp) -- | Blend a scaled image part onto another image. -- -- * This function is similar to 'pixbufScale' but allows the -- original image to \"shine through\". The @alpha@ value determines -- how opaque the source image is. Passing @0@ is -- equivalent to not calling this function at all, passing -- @255@ has the -- same effect as calling 'pixbufScale'. -- pixbufComposite :: Pixbuf -> Pixbuf -> Int -> Int -> Int -> Int -> Double -> Double -> Double -> Double -> InterpType -> Word8 -> IO () pixbufComposite src dest destX destY destWidth destHeight offsetX offsetY scaleX scaleY interp alpha = {#call unsafe pixbuf_composite#} src dest (fromIntegral destX) (fromIntegral destY) (fromIntegral destHeight) (fromIntegral destWidth) (realToFrac offsetX) (realToFrac offsetY) (realToFrac scaleX) (realToFrac scaleY) ((fromIntegral . fromEnum) interp) (fromIntegral alpha) -- | Add an opacity layer to the 'Pixbuf'. -- -- * This function returns a copy of the given @src@ -- 'Pixbuf', leaving @src@ unmodified. -- The new 'Pixbuf' has an alpha (opacity) -- channel which defaults to @255@ (fully opaque pixels) -- unless @src@ already had an alpha channel in which case -- the original values are kept. -- Passing in a color triple @(r,g,b)@ makes all -- pixels that have this color fully transparent -- (opacity of @0@). The pixel color itself remains unchanged -- during this substitution. -- pixbufAddAlpha :: Pixbuf -> Maybe (Word8, Word8, Word8) -> IO Pixbuf pixbufAddAlpha pb Nothing = makeNewGObject mkPixbuf $ {#call unsafe pixbuf_add_alpha#} pb (fromBool False) 0 0 0 pixbufAddAlpha pb (Just (r,g,b)) = makeNewGObject mkPixbuf $ {#call unsafe pixbuf_add_alpha#} pb (fromBool True) (fromIntegral r) (fromIntegral g) (fromIntegral b) -- | Copy a rectangular portion into another -- 'Pixbuf'. -- -- * The source 'Pixbuf' remains unchanged. Converion between -- different formats is done automatically. -- pixbufCopyArea :: Pixbuf -> Int -> Int -> Int -> Int -> Pixbuf -> Int -> Int -> IO () pixbufCopyArea src srcX srcY srcWidth srcHeight dest destX destY = {#call unsafe pixbuf_copy_area#} src (fromIntegral srcX) (fromIntegral srcY) (fromIntegral srcHeight) (fromIntegral srcWidth) dest (fromIntegral destX) (fromIntegral destY) -- | Fills a 'Pixbuf' with a color. -- -- * The passed-in color is a quadruple consisting of the red, green, blue -- and alpha component of the pixel. If the 'Pixbuf' does not -- have an alpha channel, the alpha value is ignored. -- pixbufFill :: Pixbuf -> Word8 -> Word8 -> Word8 -> Word8 -> IO () pixbufFill pb red green blue alpha = {#call unsafe pixbuf_fill#} pb ((fromIntegral red) `shiftL` 24 .|. (fromIntegral green) `shiftL` 16 .|. (fromIntegral blue) `shiftL` 8 .|. (fromIntegral alpha)) -- | Take a screenshot of a 'Drawable'. -- -- * This function creates a 'Pixbuf' and fills it with the image -- currently in the 'Drawable' (which might be invalid if the -- window is obscured or minimized). Note that this transfers data from -- the server to the client on X Windows. -- -- * This function will return a 'Pixbuf' with no alpha channel -- containing the part of the 'Drawable' specified by the -- rectangle. The function will return @Nothing@ if the window -- is not currently visible. -- pixbufGetFromDrawable :: DrawableClass d => d -> Rectangle -> IO (Maybe Pixbuf) pixbufGetFromDrawable d (Rectangle x y width height) = do pbPtr <- {#call unsafe pixbuf_get_from_drawable#} (mkPixbuf nullForeignPtr) (toDrawable d) (mkColormap nullForeignPtr) (fromIntegral x) (fromIntegral y) 0 0 (fromIntegral width) (fromIntegral height) if pbPtr==nullPtr then return Nothing else liftM Just $ makeNewGObject mkPixbuf (return pbPtr) |
From: Axel S. <as...@us...> - 2005-02-13 16:26:05
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Display In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21286/gtk/Graphics/UI/Gtk/Display Modified Files: Image.chs Log Message: Make compile on Windows against Gtk 2.6.1. All functions that pass filenames were redefined to a name that ends in _utf8. Added preprocessor magic to circumvent this. Furthermore added --subsystem windows as a linker flag whenever the gtk package is used during linking. This prevents a console window from opening. Index: Image.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Display/Image.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Image.chs 4 Feb 2005 11:14:56 -0000 1.2 +++ Image.chs 13 Feb 2005 16:25:56 -0000 1.3 @@ -1,25 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget Image -- -- Author : Axel Simon --- +-- -- Created: 23 May 2001 -- -- Version $Revision$ from $Date$ -- --- Copyright (c) 1999..2002 Axel Simon +-- Copyright (C) 2001-2005 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 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 2.1 of the License, or (at your option) any later version. -- --- This file is distributed in the hope that it will be useful, +-- 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 General Public License for more details. +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. -- -- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) -- -- This widget displays an image. -- @@ -73,8 +187,12 @@ -- imageNewFromFile :: FilePath -> IO Image imageNewFromFile path = makeNewObject mkImage $ liftM castPtr $ + + + withUTFString path {#call unsafe image_new_from_file#} + -- | Create a set of images by specifying a stock -- object. -- |
From: Duncan C. <dun...@us...> - 2005-02-12 18:33:43
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16128 Modified Files: ChangeLog Log Message: Add and update some of the cvsignore files. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.351 retrieving revision 1.352 diff -u -d -r1.351 -r1.352 --- ChangeLog 12 Feb 2005 18:25:28 -0000 1.351 +++ ChangeLog 12 Feb 2005 18:33:34 -0000 1.352 @@ -142,6 +142,15 @@ * compat/LocalControl.hs, compat/LocalData.hs: remove old compat modules. + * tools/c2hs/toplevel/.cvsignore, tools/c2hs/.cvsignore, + tools/apiGen/.cvsignore, mozembed/.cvsignore, glib/.cvsignore, + glade/Graphics/UI/Gtk/Glade/.cvsignore, + glade/Graphics/UI/Gtk/.cvsignore, gconf/.cvsignore, + gconf/System/Gnome/GConf/.cvsignore, glade/.cvsignore, gtk/.cvsignore, + mogul/.cvsignore, sourceview/.cvsignore, tools/callbackGen/.cvsignore, + tools/hierarchyGen/.cvsignore, .cvsignore: add and update some of the + cvsignore files. + 2005-02-12 Axel Simon <A....@ke...> * Makefile.am: Let the pre-processor run over Image.chs by renaming |
From: Duncan C. <dun...@us...> - 2005-02-12 18:32:35
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15455 Modified Files: .cvsignore Log Message: Add and update some of the cvsignore files. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 11 Nov 2003 12:10:23 -0000 1.3 +++ .cvsignore 12 Feb 2005 18:32:26 -0000 1.4 @@ -7,3 +7,9 @@ gtk2hs-0.9.* i386 localpackage.conf +Makefile +Makefile.in +aclocal.m4 +config.h +config.h.in +stamp-h1 |
From: Duncan C. <dun...@us...> - 2005-02-12 18:32:35
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15455/tools/hierarchyGen Modified Files: .cvsignore Log Message: Add and update some of the cvsignore files. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 3 Aug 2004 16:56:54 -0000 1.1 +++ .cvsignore 12 Feb 2005 18:32:25 -0000 1.2 @@ -1 +1,3 @@ TypeGenerator +.deps +.dirstamp |
From: Duncan C. <dun...@us...> - 2005-02-12 18:32:34
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15455/glade Modified Files: .cvsignore Log Message: Add and update some of the cvsignore files. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 19 Aug 2004 07:54:19 -0000 1.2 +++ .cvsignore 12 Feb 2005 18:32:24 -0000 1.3 @@ -1,3 +1,3 @@ -Glade.hs -GladeType.* -doc +glade.pkg +glade.precomp +libHSglade_a.deps |
From: Duncan C. <dun...@us...> - 2005-02-12 18:32:34
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15455/gtk Modified Files: .cvsignore Log Message: Add and update some of the cvsignore files. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 19 Aug 2004 07:54:20 -0000 1.2 +++ .cvsignore 12 Feb 2005 18:32:24 -0000 1.3 @@ -1,3 +1,3 @@ -*.i -doc -gtk2.conf +gtk.pkg +gtk.precomp +libHSgtk_a.deps |