You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Duncan C. <dun...@us...> - 2004-04-27 18:08:01
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28199/tools/hierarchyGen Modified Files: hierarchy.list Log Message: change comments style to be compatible with preprocessor and added some new gtk 2.4 classes Index: hierarchy.list =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/hierarchy.list,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- hierarchy.list 11 Dec 2003 22:48:23 -0000 1.4 +++ hierarchy.list 27 Apr 2004 18:07:52 -0000 1.5 @@ -1,24 +1,30 @@ -# This list is the result of a copy-and-paste from the GtkObject hierarchy -# html documentation. Deprecated widgets are uncommented. Some additional -# object have been defined at the end of the copied list. +## This list is the result of a copy-and-paste from the GtkObject hierarchy +## html documentation. Deprecated widgets are uncommented. Some additional +## object have been defined at the end of the copied list. + +## The Gtk prefix of every object is removed, the other prefixes are +## kept. The indentation implies the object hierarchy. In case the +## type query function cannot be derived from the name or the type name +## is different, an alternative name and type query function can be +## specified by appending 'as typename, <query_func>'. In case this +## function is not specified, the <name> is converted to +## gtk_<name'>_get_type where <name'> is <name> where each upperscore +## letter is converted to an underscore and lowerletter. The underscore +## is omitted if an upperscore letter preceeded: GtkHButtonBox -> +## gtk_hbutton_box_get_type. The generation of a type can be +## conditional by appending 'if <tag>'. Such types are only produces if +## --only=<tag> is given on the command line of TypeGenerator. +## This file is preprocessed so you can also generate types conditional +## on the version of gtk by using the GTK_CHECK_VERSION(major,minor,micro) +## macro. + +#include <gtk/gtkversion.h> -# The Gtk prefix of every object is removed, the other prefixes are -# kept. The indentation implies the object hierarchy. In case the -# type query function cannot be derived from the name or the type name -# is different, an alternative name and type query function can be -# specified by appending `as typename, <query_func>'. In case this -# function is not specified, the <name> is converted to -# gtk_<name'>_get_type where <name'> is <name> where each upperscore -# letter is converted to an underscore and lowerletter. The underscore -# is omitted if an upperscore letter preceeded: GtkHButtonBox -> -# gtk_hbutton_box_get_type. The generation of a type can be -# conditional by appending `if <tag>'. Such types are only produces if -# --only=<tag> is given on the command line of TypeGenerator. GObject GdkDrawable as Drawable, gdk_drawable_get_type GdkWindow as DrawWindow, gdk_window_object_get_type -# GdkDrawableImplX11 -# GdkWindowImplX11 +## GdkDrawableImplX11 +## GdkWindowImplX11 GdkPixmap as Pixmap, gdk_pixmap_get_type GdkColormap as Colormap, gdk_colormap_get_type GtkSettings @@ -59,11 +65,14 @@ GtkTearoffMenuItem GtkImageMenuItem GtkListItem -# GtkTreeItem +## GtkTreeItem GtkWindow GtkDialog GtkColorSelectionDialog GtkFileSelection +#if GTK_CHECK_VERSION(2,4,0) + GtkFileChooserDialog +#endif GtkFontSelectionDialog GtkInputDialog GtkMessageDialog @@ -72,6 +81,11 @@ GtkHandleBox GtkScrolledWindow GtkViewport +#if GTK_CHECK_VERSION(2,4,0) + GtkExpander + GtkComboBox + GtkComboBoxEntry +#endif GtkBox GtkButtonBox GtkHButtonBox @@ -80,6 +94,9 @@ GtkColorSelection GtkFontSelection GtkGammaCurve +#if GTK_CHECK_VERSION(2,4,0) + GtkFileChooserWidget +#endif GtkHBox GtkCombo GtkStatusbar @@ -95,7 +112,7 @@ GtkMenu GtkMenuBar GtkNotebook -# GtkPacker +## GtkPacker GtkSocket if plugNsocket GtkTable GtkTextView @@ -121,11 +138,11 @@ GtkHSeparator GtkVSeparator GtkInvisible -# GtkOldEditable -# GtkText +## GtkOldEditable +## GtkText GtkPreview -# Progress is deprecated, ProgressBar contains everything necessary -# GtkProgress +## Progress is deprecated, ProgressBar contains everything necessary +## GtkProgress GtkProgressBar GtkAdjustment GtkIMContext @@ -133,30 +150,37 @@ GtkItemFactory GtkTooltips -# These object were added by hand because they do not show up in the hierarchy -# chart. -# These are derived from GtkObject: +## These object were added by hand because they do not show up in the hierarchy +## chart. +## These are derived from GtkObject: GtkTreeViewColumn GtkCellRenderer GtkCellRendererPixbuf GtkCellRendererText -# GtkCellRendererTextPixbuf +## GtkCellRendererTextPixbuf GtkCellRendererToggle -# These are derived from GObject: + GtkFileFilter +## These are derived from GObject: GtkTreeSelection GtkTreeModel GtkTreeStore GtkListStore GtkTreeModelSort GtkIconFactory +#if GTK_CHECK_VERSION(2,4,0) + GtkEntryCompletion +#endif GtkSourceLanguage if sourceview GtkSourceLanguagesManager if sourceview -#this one is actualy an interface, but all interface implementations must be GObjects + GladeXML as GladeXML, glade_xml_get_type if libglade +## These ones are actualy interfaces, but all interface implementations must be GObjects GtkSourceStyleScheme if sourceview - GladeXML as GladeXML, glade_xml_get_type if libglade -# This now became a GObject in version 2: +#if GTK_CHECK_VERSION(2,4,0) + GtkFileChooser +#endif +## This now became a GObject in version 2: GdkGC as GC, gdk_gc_get_type -# These are Pango structures +## These are Pango structures PangoContext as PangoContext, pango_context_get_type PangoLayout as PangoLayout, pango_layout_get_type PangoFont as Font, pango_font_get_type @@ -164,5 +188,5 @@ PangoFontFace as FontFace, pango_font_face_get_type PangoFontMap as FontMap, pango_font_face_get_type PangoFontset as FontSet, pango_fontset_get_type -# This type is only available for PANGO_ENABLE_BACKEND compiled source -# PangoFontsetSimple as FontSetSimple, pango_fontset_simple_get_type +## This type is only available for PANGO_ENABLE_BACKEND compiled source +## PangoFontsetSimple as FontSetSimple, pango_fontset_simple_get_type |
From: Duncan C. <dun...@us...> - 2004-04-27 18:08:01
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28199 Modified Files: ChangeLog Log Message: change comments style to be compatible with preprocessor and added some new gtk 2.4 classes Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- ChangeLog 27 Apr 2004 17:59:37 -0000 1.130 +++ ChangeLog 27 Apr 2004 18:07:53 -0000 1.131 @@ -5,6 +5,9 @@ * tools/hierarchyGen/TypeGen.hs: allow to read stdin + * tools/hierarchyGen/hierarchy.list: change comments style to be + compatible with preprocessor and add some new gtk 2.4 classes + 2004-04-24 Duncan Coutts <du...@co...> * gtk/abstract/Object.chs: fixed warning |
From: Duncan C. <dun...@us...> - 2004-04-27 17:59:48
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26441 Modified Files: ChangeLog Log Message: added proprocessor pass to hierarchy.list so we can selectively generate types depending on the gtk version. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- ChangeLog 24 Apr 2004 17:20:48 -0000 1.129 +++ ChangeLog 27 Apr 2004 17:59:37 -0000 1.130 @@ -1,3 +1,10 @@ +2004-04-27 Duncan Coutts <du...@co...> + + * gtk/Makefile: added proprocessor pass to hierarchy.list before + so we can selectively generate types depending on the gtk version. + + * tools/hierarchyGen/TypeGen.hs: allow to read stdin + 2004-04-24 Duncan Coutts <du...@co...> * gtk/abstract/Object.chs: fixed warning |
From: Duncan C. <dun...@us...> - 2004-04-27 17:59:48
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26441/tools/hierarchyGen Modified Files: TypeGen.hs Log Message: added proprocessor pass to hierarchy.list so we can selectively generate types depending on the gtk version. Index: TypeGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/TypeGen.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TypeGen.hs 11 Dec 2003 16:15:57 -0000 1.4 +++ TypeGen.hs 27 Apr 2004 17:59:37 -0000 1.5 @@ -96,7 +96,9 @@ let prefix = case map (drop 9) (filter ("--prefix=" `isPrefixOf`) rem) of [] -> "gtk" (prefix:_) -> prefix - content <- readFile hierFile + content <- if hierFile == "-" + then getContents -- read stdin + else readFile hierFile let (objs, specialQueries) = unzip $ pFreshLine (freshParserState tags) content let bareFName = reverse . |
From: Duncan C. <dun...@us...> - 2004-04-27 17:59:45
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26441/gtk Modified Files: Makefile Log Message: added proprocessor pass to hierarchy.list so we can selectively generate types depending on the gtk version. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Makefile,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Makefile 15 Nov 2003 11:17:03 -0000 1.26 +++ Makefile 27 Apr 2004 17:59:37 -0000 1.27 @@ -208,8 +208,8 @@ endif general/Hierarchy.chs : $(TOP)/tools/hierarchyGen/hierarchy.list - $(strip $(TOP)/tools/hierarchyGen/TypeGenerator \ - $(TOP)/tools/hierarchyGen/hierarchy.list \ + cpp $(GTK_CFLAGS) $(TOP)/tools/hierarchyGen/hierarchy.list | \ + $(strip $(TOP)/tools/hierarchyGen/TypeGenerator - \ general/Hierarchy.chs $(addprefix --tag=,$(CREATE_TYPES))) include $(TOP)/mk/common.mk |
From: Duncan C. <dun...@us...> - 2004-04-24 17:20:58
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/abstract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11135/gtk/abstract Modified Files: Object.chs Log Message: fixed warning Index: Object.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/abstract/Object.chs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Object.chs 9 Jul 2003 22:42:43 -0000 1.7 +++ Object.chs 24 Apr 2004 17:20:49 -0000 1.8 @@ -37,7 +37,7 @@ -- module Object( Object, - ObjectClass(..), + ObjectClass, castToObject, objectSink, makeNewObject, |
From: Duncan C. <dun...@us...> - 2004-04-24 17:20:58
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11135 Modified Files: ChangeLog Log Message: fixed warning Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- ChangeLog 18 Apr 2004 18:20:49 -0000 1.128 +++ ChangeLog 24 Apr 2004 17:20:48 -0000 1.129 @@ -1,3 +1,7 @@ +2004-04-24 Duncan Coutts <du...@co...> + + * gtk/abstract/Object.chs: fixed warning + 2004-04-18 Axel Simon <A....@ke...> * demo/glade/Makefile, glade/Makefile: Renamed the glade library |
From: Axel S. <as...@us...> - 2004-04-18 18:20:59
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3319/glade Modified Files: Makefile Log Message: Don't change the package name, just change the library name. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 18 Apr 2004 18:03:17 -0000 1.2 +++ Makefile 18 Apr 2004 18:20:50 -0000 1.3 @@ -2,7 +2,11 @@ include $(TOP)/mk/config.mk -PACKAGENAME = glade2hs +PACKAGENAME = glade + +# Choose a name for the library that is not libglade.a which is the +# C library. +LIBNAME = glade2hs MAIN = Glade.hs |
From: Axel S. <as...@us...> - 2004-04-18 18:20:59
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3319/demo/glade Modified Files: Makefile Log Message: Don't change the package name, just change the library name. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/demo/glade/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 18 Apr 2004 18:03:16 -0000 1.2 +++ Makefile 18 Apr 2004 18:20:50 -0000 1.3 @@ -6,6 +6,6 @@ APPNAME = gladetest -NEEDPACKAGES = lang gtk2 glade2hs +NEEDPACKAGES = lang gtk2 glade include $(TOP)/mk/common.mk |
From: Axel S. <as...@us...> - 2004-04-18 18:20:58
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3319 Modified Files: ChangeLog Log Message: Don't change the package name, just change the library name. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- ChangeLog 18 Apr 2004 18:03:15 -0000 1.127 +++ ChangeLog 18 Apr 2004 18:20:49 -0000 1.128 @@ -1,6 +1,6 @@ 2004-04-18 Axel Simon <A....@ke...> - * demo/glade/Makefile, glade/Makefile: Renamed the glade package + * demo/glade/Makefile, glade/Makefile: Renamed the glade library to glade2hs. I got link errors since the only libglade which is picked up is the real libglade.a whereas the Haskell binding is never found. |
From: Axel S. <as...@us...> - 2004-04-18 18:03:25
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32049/glade Modified Files: Makefile Log Message: Renamed the glade package to glade2hs. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 11 Dec 2003 22:48:24 -0000 1.1 +++ Makefile 18 Apr 2004 18:03:17 -0000 1.2 @@ -2,7 +2,7 @@ include $(TOP)/mk/config.mk -PACKAGENAME = glade +PACKAGENAME = glade2hs MAIN = Glade.hs |
From: Axel S. <as...@us...> - 2004-04-18 18:03:25
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32049/demo/glade Modified Files: Makefile Log Message: Renamed the glade package to glade2hs. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/demo/glade/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 11 Dec 2003 22:48:24 -0000 1.1 +++ Makefile 18 Apr 2004 18:03:16 -0000 1.2 @@ -6,6 +6,6 @@ APPNAME = gladetest -NEEDPACKAGES = lang gtk2 glade +NEEDPACKAGES = lang gtk2 glade2hs include $(TOP)/mk/common.mk |
From: Axel S. <as...@us...> - 2004-04-18 18:03:25
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32049 Modified Files: ChangeLog Log Message: Renamed the glade package to glade2hs. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- ChangeLog 17 Apr 2004 13:19:45 -0000 1.126 +++ ChangeLog 18 Apr 2004 18:03:15 -0000 1.127 @@ -1,3 +1,10 @@ +2004-04-18 Axel Simon <A....@ke...> + + * demo/glade/Makefile, glade/Makefile: Renamed the glade package + to glade2hs. I got link errors since the only libglade which is + picked up is the real libglade.a whereas the Haskell binding is + never found. + 2004-04-17 Axel Simon <A....@ke...> * VERSION: bumped to 0.9.5 |
From: Axel S. <as...@us...> - 2004-04-17 13:19:55
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26781 Modified Files: ChangeLog VERSION Log Message: Create new version that compiles with ghc 6.2.1. Index: VERSION =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/VERSION,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- VERSION 18 Jul 2003 16:20:05 -0000 1.6 +++ VERSION 17 Apr 2004 13:19:46 -0000 1.7 @@ -1 +1 @@ -0.9.4 +0.9.5 Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- ChangeLog 16 Apr 2004 11:53:18 -0000 1.125 +++ ChangeLog 17 Apr 2004 13:19:45 -0000 1.126 @@ -1,3 +1,7 @@ +2004-04-17 Axel Simon <A....@ke...> + + * VERSION: bumped to 0.9.5 + 2004-04-16 Duncan Coutts <du...@co...> * gtk/layout/Notebook.chs: added ifdef's for compatibility |
From: Duncan C. <dun...@us...> - 2004-04-16 11:53:38
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11689 Modified Files: ChangeLog Log Message: added extra file with SourceIter bindings Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- ChangeLog 16 Apr 2004 10:03:25 -0000 1.124 +++ ChangeLog 16 Apr 2004 11:53:18 -0000 1.125 @@ -3,6 +3,15 @@ * gtk/layout/Notebook.chs: added ifdef's for compatibility with gtk 2.4 as well as 2.2 & 2.0 + * sourceview/SourceIter.chs: new file with bindings for + three extra TextIter methods + + * sourceview/Makefile: added header for extra file + + * sourceview/sourceview.h: added header for extra file + + * sourceview/SourceView.chs: added extra exported module + 2004-04-15 Duncan Coutts <du...@co...> * modul/WidgetTable.hs: added import of FFI (foreignPtrToPtr) |
From: Duncan C. <dun...@us...> - 2004-04-16 11:53:38
|
Update of /cvsroot/gtk2hs/gtk2hs/sourceview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11689/sourceview Modified Files: Makefile sourceview.h SourceView.chs Added Files: SourceIter.chs Log Message: added extra file with SourceIter bindings Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 19 Nov 2003 19:33:55 -0000 1.7 +++ Makefile 16 Apr 2004 11:53:18 -0000 1.8 @@ -29,6 +29,7 @@ SourceTagStyle-HEADER = gtksourceview/gtksourcetagstyle.h SourcePringJob-HEADER = gtksourceview/gtksourceprintjob.h SourceStyleScheme-HEADER = gtksourceview/gtksourcestylescheme.h +SourceIter-HEADER = gtksourceview/gtksourceiter.h endif # Further options to the C preprocessor are passed verbatim: Index: SourceView.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/SourceView.chs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SourceView.chs 26 Oct 2003 22:29:51 -0000 1.2 +++ SourceView.chs 16 Apr 2004 11:53:18 -0000 1.3 @@ -54,7 +54,8 @@ module SourceTag, module SourceTagTable, module SourceTagStyle, - module SourceStyleScheme + module SourceStyleScheme, + module SourceIter ) where import Monad (liftM) @@ -71,6 +72,7 @@ import SourceTag import SourceTagTable import SourceTagStyle +import SourceIter {# context lib="gtk" prefix="gtk" #} --- NEW FILE: SourceIter.chs --- -- -*-haskell-*- -- GIMP Toolkit (GTK) @entry SourceIter@ -- -- Author : Duncan Coutts -- -- Created: 15 April 2004 -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- @description@ -------------------------------------------------------------- -- -- Adds extra useful methods for GtkTextIter for searching forwards and -- backwards within a region in the buffer and matching brackets. -- -- @documentation@ ------------------------------------------------------------ -- -- There is no SourceIter object, just extra methods for TextIter -- -- @todo@ --------------------------------------------------------------------- -- -- module SourceIter ( sourceIterForwardSearch, sourceIterBackwardSearch, sourceIterFindMatchingBracket ) where import Monad (liftM) import Maybe (fromMaybe) import FFI import Object (makeNewObject) import GObject (makeNewGObject) {#import Hierarchy#} {#import SourceViewType#} {#import TextIter#} import Enums (Flags(fromFlags)) {# context lib="gtk" prefix="gtk" #} {# enum SourceSearchFlags {underscoreToCase} deriving(Bounded) #} instance Flags SourceSearchFlags -- methods -- @method sourceIterForwardSearch@ same as textIterForwardSearch but allows -- case insensitive search and possibly in the future regular expressions. -- sourceIterForwardSearch :: TextIter -> String -> [SourceSearchFlags] -> Maybe TextIter -> IO (Maybe (TextIter, TextIter)) sourceIterForwardSearch ti str flags limit = do start <- makeEmptyTextIter end <- makeEmptyTextIter found <- liftM toBool $ withUTFString str $ \cStr -> {#call unsafe source_iter_forward_search#} ti cStr ((fromIntegral.fromFlags) flags) start end (fromMaybe (TextIter nullForeignPtr) limit) return $ if found then Just (start,end) else Nothing -- @method sourceIterForwardSearch@ same as textIterForwardSearch but allows -- case insensitive search and possibly in the future regular expressions. -- sourceIterBackwardSearch :: TextIter -> String -> [SourceSearchFlags] -> Maybe TextIter -> IO (Maybe (TextIter, TextIter)) sourceIterBackwardSearch ti str flags limit = do start <- makeEmptyTextIter end <- makeEmptyTextIter found <- liftM toBool $ withUTFString str $ \cStr -> {#call unsafe source_iter_backward_search#} ti cStr ((fromIntegral.fromFlags) flags) start end (fromMaybe (TextIter nullForeignPtr) limit) return $ if found then Just (start,end) else Nothing -- @method sourceIterFindMatchingBracket@ Tries to match the bracket character -- currently at the given iter with its opening/closing counterpart, and if -- found moves iter to the position where it was found. -- -- * the TextIter must belong to a SourceBuffer -- sourceIterFindMatchingBracket :: TextIter -> IO Bool sourceIterFindMatchingBracket ti = liftM toBool $ {# call unsafe source_iter_find_matching_bracket #} ti Index: sourceview.h =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/sourceview.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sourceview.h 19 Nov 2003 19:33:55 -0000 1.3 +++ sourceview.h 16 Apr 2004 11:53:18 -0000 1.4 @@ -3,4 +3,4 @@ #include <gtksourceview/gtksourcelanguagesmanager.h> #include <gtksourceview/gtksourcetag.h> #include <gtksourceview/gtksourcemarker.h> - +#include <gtksourceview/gtksourceiter.h> |
From: Duncan C. <dun...@us...> - 2004-04-16 10:04:07
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23149 Modified Files: ChangeLog Log Message: added ifdefs for gtk 2.4 compatibility, preserving 2.2,2.0 compatibility with 2.4, some methods that previously returned void/() now return gint/Int Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 --- ChangeLog 15 Apr 2004 18:02:15 -0000 1.123 +++ ChangeLog 16 Apr 2004 10:03:25 -0000 1.124 @@ -1,3 +1,8 @@ +2004-04-16 Duncan Coutts <du...@co...> + + * gtk/layout/Notebook.chs: added ifdef's for compatibility + with gtk 2.4 as well as 2.2 & 2.0 + 2004-04-15 Duncan Coutts <du...@co...> * modul/WidgetTable.hs: added import of FFI (foreignPtrToPtr) |
From: Duncan C. <dun...@us...> - 2004-04-16 10:03:49
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23149/gtk/layout Modified Files: Notebook.chs Log Message: added ifdefs for gtk 2.4 compatibility, preserving 2.2,2.0 compatibility with 2.4, some methods that previously returned void/() now return gint/Int Index: Notebook.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/layout/Notebook.chs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Notebook.chs 16 Nov 2003 11:13:35 -0000 1.6 +++ Notebook.chs 16 Apr 2004 10:03:29 -0000 1.7 @@ -103,6 +103,29 @@ notebookNew = makeNewObject mkNotebook $ liftM castPtr {#call unsafe notebook_new#} +#if GTK_CHECK_VERSION(2,4,0) +-- @method notebookAppendPage@ Insert a new tab to the right of the existing +-- tabs. +-- +-- * The @ref arg tabName@ will be inserted as a Label widget. In case the +-- context menu is enabled, this name will appear in the menu. If you want +-- to specify something else to go in the tab, use +-- @ref method notebookAppendPageMenu@ and specify some suitable widget for +-- @ref arg menuLabel@. Returns index (starting from 0) of the appended page +-- in the notebook, or -1 if function fails. +-- +-- * <warning><para>This function returned @literal ()@ in Gtk version +-- 2.2.X and earlier</warning><para> +-- +notebookAppendPage :: (NotebookClass nb, WidgetClass child) => nb -> child -> + String -> IO Int +notebookAppendPage nb child tabLabel = do + tab <- labelNew (Just tabLabel) + liftM fromIntegral $ + {#call notebook_append_page#} (toNotebook nb) (toWidget child) + (toWidget tab) + +#else -- @method notebookAppendPage@ Insert a new tab to the right of the existing -- tabs. -- @@ -112,24 +135,74 @@ -- @ref method notebookAppendPageMenu@ and specify some suitable widget for -- @ref arg menuLabel@. -- +-- * <warning><para>This function returns @literal Int@ in Gtk version +-- 2.4.0 and later</warning><para> +-- notebookAppendPage :: (NotebookClass nb, WidgetClass child) => nb -> child -> String -> IO () notebookAppendPage nb child tabLabel = do tab <- labelNew (Just tabLabel) {#call notebook_append_page#} (toNotebook nb) (toWidget child) (toWidget tab) +#endif + +#if GTK_CHECK_VERSION(2,4,0) +-- @method notebookAppendPageMenu@ Insert a new tab to the right of the +-- existing tabs. @ref arg menuLabel@ is the label for the context menu +-- (useful if @ref arg tabLabel@ is not a Label widget). Return index +-- (starting from 0) of the appended page in the notebook, or -1 if +-- function fails +-- +-- * <warning><para>This function returned @literal ()@ in Gtk version +-- 2.2.X and earlier</warning><para> +-- +notebookAppendPageMenu ::(NotebookClass nb, WidgetClass child, + WidgetClass tab) => nb -> child -> tab -> String -> IO Int +notebookAppendPageMenu nb child tabWidget menuLabel = do + menu <- labelNew (Just menuLabel) + liftM fromIntegral $ + {#call notebook_append_page_menu#} (toNotebook nb) (toWidget child) + (toWidget tabWidget) (toWidget menu) +#else -- @method notebookAppendPageMenu@ Insert a new tab to the right of the -- existing tabs. @ref arg menuLabel@ is the label for the context menu -- (useful if @ref arg tabLabel@ is not a Label widget). -- +-- * <warning><para>This function returns @literal Int@ in Gtk version +-- 2.4.0 and later</warning><para> +-- notebookAppendPageMenu ::(NotebookClass nb, WidgetClass child, WidgetClass tab) => nb -> child -> tab -> String -> IO () notebookAppendPageMenu nb child tabWidget menuLabel = do menu <- labelNew (Just menuLabel) {#call notebook_append_page_menu#} (toNotebook nb) (toWidget child) (toWidget tabWidget) (toWidget menu) +#endif +#if GTK_CHECK_VERSION(2,4,0) +-- @method notebookPrependPage@ Insert a new tab to the left of the existing +-- tabs. +-- +-- * The @ref arg tabName@ will be inserted as a Label widget. In case the +-- context menu is enabled, this name will appear in the menu. If you want +-- to specify something else to go in the tab, use +-- @ref method notebookPrependPageMenu@ and specify some suitable widget for +-- @ref arg menuLabel@. Return index (starting from 0) of the prepended page +-- in the notebook, or -1 if function fails +-- +-- * <warning><para>This function returned @literal ()@ in Gtk version +-- 2.2.X and earlier</warning><para> +-- +notebookPrependPage :: (NotebookClass nb, WidgetClass child) => nb -> child -> + String -> IO Int +notebookPrependPage nb child tabLabel = do + tab <- labelNew (Just tabLabel) + liftM fromIntegral $ + {#call notebook_prepend_page#} (toNotebook nb) (toWidget child) + (toWidget tab) + +#else -- @method notebookPrependPage@ Insert a new tab to the left of the existing -- tabs. -- @@ -139,24 +212,72 @@ -- @ref method notebookPrependPageMenu@ and specify some suitable widget for -- @ref arg menuLabel@. -- +-- * <warning><para>This function returns @literal Int@ in Gtk version +-- 2.4.0 and later</warning><para> +-- notebookPrependPage :: (NotebookClass nb, WidgetClass child) => nb -> child -> String -> IO () notebookPrependPage nb child tabLabel = do tab <- labelNew (Just tabLabel) {#call notebook_prepend_page#} (toNotebook nb) (toWidget child) (toWidget tab) +#endif +#if GTK_CHECK_VERSION(2,4,0) +-- @method notebookPrependPageMenu@ Insert a new tab to the left of the +-- existing tabs. @ref arg menuLabel@ is the label for the context menu +-- (useful if @ref arg tabLabel@ is not a Label widget). Return index +-- (starting from 0) of the prepended page in the notebook, or -1 if +-- function fails +-- +-- * <warning><para>This function returned @literal ()@ in Gtk version +-- 2.2.X and earlier</warning><para> +-- +notebookPrependPageMenu ::(NotebookClass nb, WidgetClass child, + WidgetClass tab) => nb -> child -> tab -> String -> IO Int +notebookPrependPageMenu nb child tabWidget menuLabel = do + menu <- labelNew (Just menuLabel) + liftM fromIntegral $ + {#call notebook_prepend_page_menu#} (toNotebook nb) (toWidget child) + (toWidget tabWidget) (toWidget menu) + +#else -- @method notebookPrependPageMenu@ Insert a new tab to the left of the -- existing tabs. @ref arg menuLabel@ is the label for the context menu -- (useful if @ref arg tabLabel@ is not a Label widget). -- +-- * <warning><para>This function returns @literal Int@ in Gtk version +-- 2.4.0 and later</warning><para> +-- notebookPrependPageMenu ::(NotebookClass nb, WidgetClass child, WidgetClass tab) => nb -> child -> tab -> String -> IO () notebookPrependPageMenu nb child tabWidget menuLabel = do menu <- labelNew (Just menuLabel) {#call notebook_prepend_page_menu#} (toNotebook nb) (toWidget child) (toWidget tabWidget) (toWidget menu) +#endif +#if GTK_CHECK_VERSION(2,4,0) +-- @method notebookInsertPage@ Insert a new tab at the specified position. +-- +-- * The @ref arg tabName@ will be inserted as a Label widget. In case the +-- context menu is enabled, this name will appear in the menu. If you want +-- to specify something else to go in the tab, use +-- @ref method notebookInsertPageMenu@ and specify some suitable widget for +-- @ref arg menuLabel@. Return index (starting from 0) of the inserted page +-- in the notebook, or -1 if function fails +-- +-- * <warning><para>This function returned @literal ()@ in Gtk version +-- 2.2.X and earlier</warning><para> +-- +notebookInsertPage :: (NotebookClass nb, WidgetClass child) => nb -> child -> + String -> Int -> IO Int +notebookInsertPage nb child tabLabel pos = do + lbl <- labelNew (Just tabLabel) + liftM fromIntegral $ + {#call notebook_insert_page#} (toNotebook nb) (toWidget child) + (toWidget lbl) (fromIntegral pos) +#else -- @method notebookInsertPage@ Insert a new tab at the specified position. -- -- * The @ref arg tabName@ will be inserted as a Label widget. In case the @@ -165,23 +286,50 @@ -- @ref method notebookInsertPageMenu@ and specify some suitable widget for -- @ref arg menuLabel@. -- +-- * <warning><para>This function returns @literal Int@ in Gtk version +-- 2.4.0 and later</warning><para> +-- notebookInsertPage :: (NotebookClass nb, WidgetClass child) => nb -> child -> String -> Int -> IO () notebookInsertPage nb child tabLabel pos = do lbl <- labelNew (Just tabLabel) {#call notebook_insert_page#} (toNotebook nb) (toWidget child) (toWidget lbl) (fromIntegral pos) +#endif +#if GTK_CHECK_VERSION(2,4,0) +-- @method notebookInsertPageMenu@ Insert a new tab between the tab no. +-- @ref arg pos@ and @ref arg pos@+1. @ref arg menuLabel@ is the label for the +-- context menu (useful if @ref arg tabLabel@ is not a Label widget). Return +-- index (starting from 0) of the inserted page in the notebook, or -1 if +-- function fails +-- +-- * <warning><para>This function returned @literal ()@ in Gtk version +-- 2.2.X and earlier</warning><para> +-- +notebookInsertPageMenu ::(NotebookClass nb, WidgetClass child, + WidgetClass tab) => nb -> child -> tab -> String -> Int -> IO Int +notebookInsertPageMenu nb child tabWidget menuLabel pos = do + menu <- labelNew (Just menuLabel) + liftM fromIntegral $ + {#call notebook_insert_page_menu#} (toNotebook nb) (toWidget child) + (toWidget tabWidget) (toWidget menu) (fromIntegral pos) + +#else -- @method notebookInsertPageMenu@ Insert a new tab between the tab no. -- @ref arg pos@ and @ref arg pos@+1. @ref arg menuLabel@ is the label for the -- context menu (useful if @ref arg tabLabel@ is not a Label widget). -- +-- * <warning><para>This function returns @literal Int@ in Gtk version +-- 2.4.0 and later</warning><para> +-- notebookInsertPageMenu ::(NotebookClass nb, WidgetClass child, WidgetClass tab) => nb -> child -> tab -> String -> Int -> IO () notebookInsertPageMenu nb child tabWidget menuLabel pos = do menu <- labelNew (Just menuLabel) {#call notebook_insert_page_menu#} (toNotebook nb) (toWidget child) (toWidget tabWidget) (toWidget menu) (fromIntegral pos) +#endif -- @method notebookRemovePage@ Remove a specific page from the notebook, -- counting from 0. |
From: Duncan C. <dun...@us...> - 2004-04-15 18:02:25
|
Update of /cvsroot/gtk2hs/gtk2hs/mogul In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13176/mogul Modified Files: WidgetTable.hs Log Message: add import in mogul/WidgetTable.hs for GHC 6.2 compatibility Index: WidgetTable.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/WidgetTable.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- WidgetTable.hs 3 Dec 2002 13:20:07 -0000 1.4 +++ WidgetTable.hs 15 Apr 2004 18:02:16 -0000 1.5 @@ -38,6 +38,7 @@ import Monad (liftM) import Foreign +import FFI (foreignPtrToPtr) import LocalControl (MVar, newMVar, takeMVar, putMVar, readMVar) import LocalData (unsafePerformIO, FiniteMap, emptyFM, addToFM, delFromFM, lookupFM, elemFM) |
From: Duncan C. <dun...@us...> - 2004-04-15 18:02:24
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13176 Modified Files: ChangeLog Log Message: add import in mogul/WidgetTable.hs for GHC 6.2 compatibility Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- ChangeLog 7 Jan 2004 09:37:47 -0000 1.122 +++ ChangeLog 15 Apr 2004 18:02:15 -0000 1.123 @@ -1,3 +1,8 @@ +2004-04-15 Duncan Coutts <du...@co...> + + * modul/WidgetTable.hs: added import of FFI (foreignPtrToPtr) + for GHC 6.2 + 2004-01-07 Axel Simon <A....@ke...> * c2hs/c/Attrs.hs: Remove a superfluous comma. |
From: <as...@us...> - 2004-01-07 09:37:50
|
Update of /cvsroot/gtk2hs/gtk2hs/c2hs/c In directory sc8-pr-cvs1:/tmp/cvs-serv5276/c2hs/c Modified Files: CAttrs.hs Log Message: Make compile for GHC 6.2. Index: CAttrs.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/c2hs/c/CAttrs.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CAttrs.hs 1 Oct 2002 15:17:05 -0000 1.2 +++ CAttrs.hs 7 Jan 2004 09:37:47 -0000 1.3 @@ -144,7 +144,7 @@ -- leaveObjRangeC :: AttrC -> AttrC leaveObjRangeC ac = ac { - defObjsAC = fst . leaveRange . defObjsAC $ ac, + defObjsAC = fst . leaveRange . defObjsAC $ ac } -- add another definitions to the object name space (EXPORTED) |
From: <as...@us...> - 2004-01-07 09:37:50
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1:/tmp/cvs-serv5276 Modified Files: AUTHORS ChangeLog Log Message: Make compile for GHC 6.2. Index: AUTHORS =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/AUTHORS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- AUTHORS 21 Oct 2003 23:41:03 -0000 1.5 +++ AUTHORS 7 Jan 2004 09:37:46 -0000 1.6 @@ -11,6 +11,7 @@ Duncan Coutts <du...@co...> (GtkSourceView) +JP Bernardy <jy...@ya...> Jonas Svensson <d99...@dt...> Vincenzo Ciancia <ci...@cl...> Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- ChangeLog 11 Dec 2003 22:48:23 -0000 1.121 +++ ChangeLog 7 Jan 2004 09:37:47 -0000 1.122 @@ -1,3 +1,12 @@ +2004-01-07 Axel Simon <A....@ke...> + + * c2hs/c/Attrs.hs: Remove a superfluous comma. + + * gtk/general/FFI.hs: Rename unsafeForeignPtrToPtr to + foreignPtrToPtr for GHC 6.2. + + * AUTHORS: Mention JP Bernardy who supplied the patch. + 2003-12-11 Duncan Coutts <du...@co...> * tools/hierarchyGen/TypeGen.hs: changed the way the object |
From: <as...@us...> - 2004-01-07 09:37:50
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1:/tmp/cvs-serv5276/gtk/general Modified Files: FFI.hs Log Message: Make compile for GHC 6.2. Index: FFI.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/FFI.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FFI.hs 10 Jul 2003 08:20:25 -0000 1.1 +++ FFI.hs 7 Jan 2004 09:37:47 -0000 1.2 @@ -40,6 +40,8 @@ newUTFStringLen, peekUTFString, peekUTFStringLen, + newForeignPtr, + foreignPtrToPtr, module Foreign, #if __GLASGOW_HASKELL__>=504 module Foreign.C @@ -56,7 +58,12 @@ import Data.Bits import Foreign.C import qualified Foreign +# if __GLASGOW_HASKELL__>=602 +import Foreign hiding (with, newForeignPtr) +import qualified Foreign hiding (newForeignPtr) +# else import Foreign hiding (with) +# endif #else import Bits import CForeign @@ -71,6 +78,12 @@ #else with :: (Storable a) => a -> (Ptr a -> IO b) -> IO b with = Foreign.withObject +#endif + +#if __GLASGOW_HASKELL__>=602 +newForeignPtr = flip Foreign.newForeignPtr + +foreignPtrToPtr = unsafeForeignPtrToPtr #endif #if __GLASGOW_HASKELL__>=600 |
From: <dun...@us...> - 2003-12-11 22:48:27
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1:/tmp/cvs-serv20828/glade Added Files: Glade.chs Makefile Log Message: Added libglade bindings, including configury and demo program it will build a package called "glade" --- NEW FILE: Glade.chs --- -- |GIMP Toolkit (GTK) Binding for Haskell: binding to Libglade -*-haskell-*- -- for loading XML widget specifications -- -- Author : Manuel M T Chakravarty -- Created: 13 March 2002 -- -- Version $Revision: 1.1 $ from $Date: 2003/12/11 22:48:24 $ -- -- Copyright (c) 2002 Manuel M T Chakravarty -- Modified 2003 by Duncan Coutts (gtk2hs port) -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library 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 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 -- Library General Public License for more details. -- --- Description --------------------------------------------------------------- -- -- Language: Haskell 98 Binding Module -- -- Libglade facilitates loading of XML specifications of whole widget trees -- that have been interactively designed with the GUI builder Glade. The -- present module exports operations for manipulating `GladeXML' objects. -- -- `glade_xml_signal_autoconnect()' is not supported. The C variant is not -- suitable for Haskell as `-rdynamic' leads to huge executable and we -- usually don't want to connect staticly named functions, but closures. -- -- NB: `glade_xml_construct()' is not bound, as it doesn't seem to be useful -- in Haskell. As usual, the `signal_connect_data' variant for -- registering signal handlers isn't bound either. Moreover, the -- `connect_full' functions are not bound. -- -- NB: This binding does not support Libglade functionality that is -- exclusively meant for extending Libglade with new widgets. Like new -- widgets, such functionality is currently expected to be implemented in -- C. -- module Glade ( -- data types -- GladeXMLClass, GladeXML, -- creation operations -- xmlNew, xmlNewWithRootAndDomain, -- obtaining widget handles -- xmlGetWidget, xmlGetWidgetRaw ) where import Monad (liftM) import FFI import GType import Object (makeNewObject) import GObject (makeNewGObject) {#import Hierarchy#} {#import GladeType#} import GList {#context lib="libglade" prefix ="glade"#} -- |Operations -- ----------- -- |Creation operations -- - -- @constructor xmlNew@ Create a new XML object (and the corresponding -- widgets) from the given XML file; corresponds to -- `xmlNewWithRootAndDomain', but without the ability to specify a root -- widget or translation domain. -- xmlNew :: FilePath -> IO (Maybe GladeXML) xmlNew file = withCString file $ \strPtr1 -> do xmlPtr <- {#call unsafe xml_new#} strPtr1 nullPtr nullPtr if xmlPtr==nullPtr then return Nothing else liftM Just $ makeNewGObject mkGladeXML (return xmlPtr) -- @constructor xmlNewWithRootAndDomain@ Create a new GladeXML object (and -- the corresponding widgets) from the given XML file with an optional -- root widget and translation domain. -- -- * If the second argument is not `Nothing', the interface will only be built -- from the widget whose name is given. This feature is useful if you only -- want to build say a toolbar or menu from the XML file, but not the window -- it is embedded in. Note also that the XML parse tree is cached to speed -- up creating another `XML' object for the same file. -- xmlNewWithRootAndDomain :: FilePath -> Maybe String -> Maybe String -> IO (Maybe GladeXML) xmlNewWithRootAndDomain file rootWidgetName domain = withCString file $ \strPtr1 -> withMaybeCString rootWidgetName $ \strPtr2 -> withMaybeCString domain $ \strPtr3 -> do xmlPtr <- {#call unsafe xml_new#} strPtr1 strPtr2 strPtr3 if xmlPtr==nullPtr then return Nothing else liftM Just $ makeNewGObject mkGladeXML (return xmlPtr) -- |Obtaining widget handles -- - -- @method xmlGetWidget@ Get the widget that has the given name in -- the interface description. If the named widget cannot be found -- or is of the wrong type the result is an error. -- -- * the second parameter is the ID of the widget in the glade xml -- file, eg "button1". -- -- * the third parameter should be a dynamic cast function that -- returns the type of object that you expect, eg castToButton -- xmlGetWidget :: (WidgetClass widget) => GladeXML -> (GObject -> widget) -> String -> IO widget xmlGetWidget xml cast name = do maybeWidget <- xmlGetWidgetRaw xml name return $ case maybeWidget of Just widget -> cast (toGObject widget) --the cast will return an error if the object is of the wrong type Nothing -> error $ "glade.xmlGetWidget: no object named " ++ show name ++ " in the glade file" xmlGetWidgetRaw :: GladeXML -> String -> IO (Maybe Widget) xmlGetWidgetRaw xml name = withCString name $ \strPtr1 -> do widgetPtr <- {#call unsafe xml_get_widget#} xml strPtr1 if widgetPtr==nullPtr then return Nothing else liftM Just $ makeNewObject mkWidget (return widgetPtr) -- Auxilliary routines -- ------------------- -- Marshall an optional string -- withMaybeCString :: Maybe String -> (Ptr CChar -> IO a) -> IO a withMaybeCString = maybeWith withCString --- NEW FILE: Makefile --- TOP = .. include $(TOP)/mk/config.mk PACKAGENAME = glade MAIN = Glade.hs # In order for ghc and c2hs to find .chi and .hi files in ../gtk/* we # need to set these directories here. Note that this list is different # from SUBDIRS in that the directories given here are not searched for # compilable files. HIDIRS = ../gtk/glib ../gtk/abstract ../gtk/general HEADER = glade/glade.h #EXTRA_HFILES = #EXTRA_TARFILES = ifneq (x$(MULTIPLE_CHS),xyes) Glade-HEADER = glade/glade-init.h GladeXML-HEADER = glade/glade-xml.h endif # Further options to the C preprocessor are passed verbatim: EXTRA_CPPFLAGS = $(LIBGLADE_CFLAGS) EXTRA_LIBS = $(LIBGLADE_LIBS) ifeq ($(strip $(NEW_MODULE_SYS)),yes) NEEDPACKAGES = gtk2 else NEEDPACKAGES = gtk2 lang data endif EXTRA_CHSFILES += GladeType.chs TYPE_TAGS += libglade EXTRA_CLEANFILES+= GladeType.chs NEEDCHI = GladeType GladeType.chs : ../tools/hierarchyGen/hierarchy.list $(strip ../tools/hierarchyGen/TypeGenerator \ ../tools/hierarchyGen/hierarchy.list \ GladeType.chs \ $(addprefix --tag=,$(TYPE_TAGS))) --lib=glade --prefix=glade include $(TOP)/mk/common.mk |
From: <dun...@us...> - 2003-12-11 22:48:27
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/glade In directory sc8-pr-cvs1:/tmp/cvs-serv20828/demo/glade Added Files: Makefile simple.glade GladeTest.hs Log Message: Added libglade bindings, including configury and demo program it will build a package called "glade" --- NEW FILE: Makefile --- TOP = ../.. include $(TOP)/mk/config.mk MAIN = GladeTest.hs APPNAME = gladetest NEEDPACKAGES = lang gtk2 glade include $(TOP)/mk/common.mk --- NEW FILE: simple.glade --- <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> <requires lib="gnome"/> <widget class="GtkWindow" id="window1"> <property name="visible">True</property> <property name="title" translatable="yes">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <child> <widget class="GtkVBox" id="vbox1"> <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> <widget class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="label" translatable="yes">A simple dialog created in Glade</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkButton" id="button1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <child> <widget class="GtkAlignment" id="alignment1"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> <child> <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <widget class="GtkImage" id="image1"> <property name="visible">True</property> <property name="stock">gtk-apply</property> <property name="icon_size">4</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="label" translatable="yes">Press me!</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> </child> </widget> </glade-interface> --- NEW FILE: GladeTest.hs --- module Main where import Gtk import Glade main = do initGUI -- load up the glade file dialogXmlM <- xmlNew "simple.glade" let dialogXml = case dialogXmlM of (Just dialogXml) -> dialogXml Nothing -> error "can't find the glade file \"simple.glade\" in the current directory" -- get a handle on a couple widgets from the glade file window <- xmlGetWidget dialogXml castToWindow "window1" button <- xmlGetWidget dialogXml castToButton "button1" -- do something with the widgets, just to prove it works button `onClicked` putStrLn "button pressed!" window `onDestroy` mainQuit -- show everything widgetShowAll window mainGUI |