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...> - 2005-03-24 17:31:09
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17311 Modified Files: ChangeLog Log Message: Documentation changes and code formatting changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.396 retrieving revision 1.397 diff -u -d -r1.396 -r1.397 --- ChangeLog 24 Mar 2005 15:21:09 -0000 1.396 +++ ChangeLog 24 Mar 2005 17:30:50 -0000 1.397 @@ -10,6 +10,21 @@ gtk/Graphics/UI/Gtk/Ornaments/VSeparator.chs: documentation changes and code formatting changes. + * gtk/Graphics/UI/Gtk/Layout/Alignment.chs.pp, + gtk/Graphics/UI/Gtk/Layout/AspectFrame.chs, + gtk/Graphics/UI/Gtk/Layout/Expander.chs.pp, + gtk/Graphics/UI/Gtk/Layout/Fixed.chs, + gtk/Graphics/UI/Gtk/Layout/HBox.chs, + gtk/Graphics/UI/Gtk/Layout/HButtonBox.chs, + gtk/Graphics/UI/Gtk/Layout/HPaned.chs, + gtk/Graphics/UI/Gtk/Layout/Layout.chs, + gtk/Graphics/UI/Gtk/Layout/Notebook.chs.pp, + gtk/Graphics/UI/Gtk/Layout/Table.chs, + gtk/Graphics/UI/Gtk/Layout/VBox.chs, + gtk/Graphics/UI/Gtk/Layout/VButtonBox.chs, + gtk/Graphics/UI/Gtk/Layout/VPaned.chs: documentation changes and code + formatting changes. + 2005-03-23 Duncan Coutts <du...@co...> * glib/glib.cabal.in, gtk/gtk.cabal.in, mogul/mogul.cabal.in, |
From: Duncan C. <dun...@us...> - 2005-03-23 19:35:25
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29699 Modified Files: ChangeLog Makefile.am Log Message: Use template substitution mechanism like the other code generators do. Replace use of tools/callbackGen/Signal.chs-boot1 and 2 with tools/callbackGen/Signal.chs.template Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- Makefile.am 23 Mar 2005 17:09:15 -0000 1.58 +++ Makefile.am 23 Mar 2005 19:34:51 -0000 1.59 @@ -5,8 +5,7 @@ DISTCLEANFILES = */*.precomp EXTRA_DIST = \ - tools/callbackGen/Signal.chs-boot1 \ - tools/callbackGen/Signal.chs-boot2 \ + tools/callbackGen/Signal.chs.template \ tools/callbackGen/gtkmarshal.list \ tools/checkDirs.sh \ tools/c2hs/toplevel/c2hs_config.h \ @@ -89,8 +88,7 @@ gtk/Graphics/UI/Gtk/Signals.chs : \ - $(srcdir)/tools/callbackGen/Signal.chs-boot1 \ - $(srcdir)/tools/callbackGen/Signal.chs-boot2 \ + $(srcdir)/tools/callbackGen/Signal.chs.template \ $(srcdir)/tools/callbackGen/gtkmarshal.list \ $(srcdir)/tools/callbackGen/HookGenerator$(EXEEXT) $(strip $(srcdir)/tools/callbackGen/HookGenerator$(EXEEXT) $(MARSHALLDEFS) \ Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.393 retrieving revision 1.394 diff -u -d -r1.393 -r1.394 --- ChangeLog 23 Mar 2005 17:24:56 -0000 1.393 +++ ChangeLog 23 Mar 2005 19:34:49 -0000 1.394 @@ -23,6 +23,13 @@ since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. + * tools/callbackGen/HookGenerator.hs, + tools/callbackGen/Signal.chs.template: use template substitution + mechanism like the other code generators do. + + * Makefile.am: use tools/callbackGen/Signal.chs.template rather than + tools/callbackGen/Signal.chs-boot1 and 2. + 2005-03-18 Duncan Coutts <du...@co...> * mk/common.mk: temporary fix for building with GHC 6.4. Temporary |
From: Duncan C. <dun...@us...> - 2005-03-23 19:35:14
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/callbackGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29699/tools/callbackGen Modified Files: HookGenerator.hs Added Files: Signal.chs.template Log Message: Use template substitution mechanism like the other code generators do. Replace use of tools/callbackGen/Signal.chs-boot1 and 2 with tools/callbackGen/Signal.chs.template Index: HookGenerator.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/callbackGen/HookGenerator.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- HookGenerator.hs 27 Feb 2005 19:42:07 -0000 1.4 +++ HookGenerator.hs 23 Mar 2005 19:34:56 -0000 1.5 @@ -412,17 +412,22 @@ generateHooks typesFile bootPath outFile brokenSolaris = do content <- readFile typesFile let sigs = parseSignatures content - boot1 <- readFile (bootPath++"Signal.chs-boot1") - boot2 <- readFile (bootPath++"Signal.chs-boot2") - let result = ss boot1. - genExport sigs. - ss boot2. - foldl (.) id (map (generate brokenSolaris) sigs) - writeFile outFile (result "") - - - + template <- readFile (bootPath++"Signal.chs.template") + writeFile outFile $ + templateSubstitute template (\var -> + case var of + "MODULE_EXPORTS" -> genExport sigs + "MODULE_BODY" -> foldl (.) id (map (generate brokenSolaris) sigs) + _ -> error var + ) "" +templateSubstitute :: String -> (String -> ShowS) -> ShowS +templateSubstitute template varSubst = doSubst template + where doSubst [] = id + doSubst ('\\':'@':cs) = sc '@' . doSubst cs + doSubst ('@':cs) = let (var,_:cs') = span ('@'/=) cs + in varSubst var . doSubst cs' + doSubst (c:cs) = sc c . doSubst cs ------------------------------------------------------------------------------- -- generate dynamic fragments --- NEW FILE: Signal.chs.template --- {-# OPTIONS -cpp #-} -- -*-haskell-*- -- -------------------- automatically generated file - do not edit ------------ -- Callback installers for the GIMP Toolkit (GTK) Binding for Haskell -- -- Author : Axel Simon -- -- Created: 1 July 2000 -- -- Version $Revision: 1.1 $ from $Date: 2005/03/23 19:34:55 $ -- -- Copyright (c) 2000 Axel Simon -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- #hide -- | -- These functions are used to connect signals to widgets. They are auto- -- matically created through HookGenerator.hs which takes a list of possible -- function signatures that are included in the GTK sources -- (gtkmarshal.list). -- -- * The object system in the second version of GTK is based on GObject from -- GLIB. This base class is rather primitive in that it only implements -- ref and unref methods (and others that are not interesting to us). If -- the marshall list mentions OBJECT it refers to an instance of this -- GObject which is automatically wrapped with a ref and unref call. -- Structures which are not derived from GObject have to be passed as -- BOXED which gives the signal connect function a possiblity to do the -- conversion into a proper ForeignPtr type. In special cases the signal -- connect function use a PTR type which will then be mangled in the -- user function directly. The latter is needed if a signal delivers a -- pointer to a string and its length in a separate integer. -- -- TODO -- -- * Check if we need all prototypes mentioned in gtkmarshal.list. -- module Graphics.UI.Gtk.Signals ( @MODULE_EXPORTS@SignalName, ConnectAfter, ConnectId, disconnect ) where import Monad (liftM) import Data.IORef import System.Glib.FFI import System.Glib.GError (failOnGError) {#import System.Glib.GObject#} hiding (mkFunPtrDestructor) {#context lib="gtk" prefix="gtk" #} -- Specify if the handler is to run before (False) or after (True) the -- default handler. type ConnectAfter = Bool type SignalName = String data GObjectClass o => ConnectId o = ConnectID {#type gulong#} o {#pointer GClosureNotify#} foreign import ccall "wrapper" mkDestructor :: IO () -> IO GClosureNotify mkFunPtrDestructor :: FunPtr a -> IO GClosureNotify mkFunPtrDestructor hPtr = do dRef <- newIORef nullFunPtr dPtr <- mkDestructor $ do freeHaskellFunPtr hPtr dPtr <- readIORef dRef freeHaskellFunPtr dPtr writeIORef dRef dPtr return dPtr disconnect :: GObjectClass obj => ConnectId obj -> IO () disconnect (ConnectID handler obj) = withForeignPtr ((unGObject.toGObject) obj) $ \objPtr -> {#call unsafe g_signal_handler_disconnect#} (castPtr objPtr) handler -- Here are the generators that turn a Haskell function into -- a C function pointer. The fist Argument is always the widget, -- the last one is the user g_pointer. Both are ignored. @MODULE_BODY@ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:25:07
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1408 Modified Files: ChangeLog Log Message: oops, forgot to commit the changelog Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.392 retrieving revision 1.393 diff -u -d -r1.392 -r1.393 --- ChangeLog 18 Mar 2005 14:25:35 -0000 1.392 +++ ChangeLog 23 Mar 2005 17:24:56 -0000 1.393 @@ -1,3 +1,28 @@ +2005-03-23 Duncan Coutts <du...@co...> + + * glib/glib.cabal.in, gtk/gtk.cabal.in, mogul/mogul.cabal.in, + glade/glade.cabal.in, sourceview/sourceview.cabal.in, + gconf/gconf.cabal.in, mozembed/mozembed.cabal.in: add new cabal + package file templates. + + * configure.ac: bump version to make it clear we're in a development + mode (we can no longer use _pre since cabal does not like that as a + version number). Add test for cabal support (ghc >= 6.4). Add + *.cabal.in files to the list of files that need substitution in + AC_OUTPUT. + + * acinclude.m4: modify the way the flags are formatted depending on + whether USE_CABAL is set. The old package format used " quotes around + elements in string lists, the new cabal package format does not. + + * Makefile.am: use $(PKGEXT) to specify which package file to use, the + .cabal one or the .pkg one. Add -ignore-package glib when compiling + modules in each package (conditionally on USE_CABAL) since otheriwse + if the package is already installed the compilation would fail. Modify + the package registering code. Use sed to substitute for ${pkglibdir} + since ghc-pkg no longer does substitution. Also substitute for + ${modules} the list of modules in the package. + 2005-03-18 Duncan Coutts <du...@co...> * mk/common.mk: temporary fix for building with GHC 6.4. Temporary |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:24
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408 Modified Files: configure.ac acinclude.m4 Makefile.am Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/acinclude.m4,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- acinclude.m4 19 Jan 2005 03:42:53 -0000 1.6 +++ acinclude.m4 23 Mar 2005 17:08:58 -0000 1.7 @@ -98,9 +98,14 @@ AC_DEFUN([GTKHS_REFORMAT_PACKAGE_CFLAGS], [ C=; [$2]=; +if test "$USE_CABAL" = "yes"; then + SEP=", "; QUOTE="" +else + SEP=","; QUOTE="\"" +fi for FLAG in [$][$1]; do case [$]FLAG in - -I*) [$2]="[$][$2][$]C\"[$]{FLAG#-I}\""; C=",";; + -I*) [$2]="[$][$2][$]C[$]QUOTE[$]{FLAG#-I}$QUOTE"; C=$SEP;; esac; done; ])dnl @@ -117,11 +122,16 @@ AC_DEFUN([GTKHS_REFORMAT_PACKAGE_LIBS], [ C_LIBS=; [$2]=; C_LDIR=; [$3]=; C_XTRA=; [$4]=; +if test "$USE_CABAL" = "yes"; then + SEP=", "; QUOTE="" +else + SEP=","; QUOTE="\"" +fi for FLAG in [$][$1]; do case [$]FLAG in - -l*) [$2]="[$][$2][$]C_LIBS\"[$]{FLAG#-l}\""; C_LIBS=",";; - -L*) [$3]="[$][$3][$]C_LDIR\"[$]{FLAG#-L}\""; C_LDIR=",";; - *) [$4]="[$][$4][$]C_XTRA\"[$]FLAG\""; C_XTRA=",";; + -l*) [$2]="[$][$2][$]C_LIBS[$]QUOTE[$]{FLAG#-l}$QUOTE"; C_LIBS=$SEP;; + -L*) [$3]="[$][$3][$]C_LDIR[$]QUOTE[$]{FLAG#-L}$QUOTE"; C_LDIR=$SEP;; + *) [$4]="[$][$4][$]C_XTRA[$]QUOTE[$]FLAG[$]QUOTE"; C_XTRA=$SEP;; esac; done; dnl Fix for ghc-pkg in that it doesn't differ between paths to extra @@ -129,7 +139,7 @@ dnl path to where the Haskell libraries are going to be installed in dnl case they go into a non-standard directory. If they go into a dnl standard directory then we duplicate a path here. Dough. -[$3]="[$][$3][$]C_LDIR\"\${pkglibdir}\""; +[$3]="[$][$3][$]C_LDIR[$]QUOTE\${pkglibdir}[$]QUOTE"; ])dnl dnl Another hack, on glibc systems GHCi cannot load the pthread library, Index: configure.ac =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.ac,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- configure.ac 24 Feb 2005 21:58:55 -0000 1.33 +++ configure.ac 23 Mar 2005 17:08:57 -0000 1.34 @@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script. dnl ###################################################################### -AC_INIT(gtk2hs, 0.9.7.1) +AC_INIT(gtk2hs, 0.9.7.9) AM_INIT_AUTOMAKE dnl * We require autoconf version 2.50 @@ -163,6 +163,19 @@ GHCPKG_USE_AUTOLIBS="auto = True," ]) +dnl From ghc 6.4 onwards, ghc-pkg only understands the cabal package format +dnl so we must produce and register .cabal files instead of the old .pkg +dnl files. +GTKHS_PROG_CHECK_VERSION($GHC_VERSION, -ge, 6.4.0, [ +USE_CABAL=yes +]) +AM_CONDITIONAL(USE_CABAL, test "$USE_CABAL" = "yes") +if test "$USE_CABAL" = "yes"; then + PKGEXT=cabal +else + PKGEXT=pkg +fi + dnl ghc-pkg 5 searches for libxxx.a, even on Windows. Hence, we need to dnl create libraries with these names instead of the windows names. GTKHS_PROG_CHECK_VERSION($GHC_VERSION, -lt, 6.0.0, [ @@ -599,8 +612,9 @@ AC_SUBST(BUILT_IN_C2HS) AC_SUBST(MULTIPLE_CHS) AC_SUBST(FOUR_WORD_CALLBACK) -AC_SUBST(GHCPKG_LISTLOCAL) AC_SUBST(PKGCONF) +AC_SUBST(USE_CABAL) +AC_SUBST(PKGEXT) AC_SUBST(HCFLAGS) AC_SUBST(C2HS) AC_SUBST(HSC2HS) @@ -646,13 +660,13 @@ tools/c2hs/toplevel/C2HSConfig.hs gtk2hs.spec mk/chsDepend - glib/glib.pkg - gtk/gtk.pkg - mogul/mogul.pkg - glade/glade.pkg - gconf/gconf.pkg - sourceview/sourceview.pkg - mozembed/mozembed.pkg], + glib/glib.pkg glib/glib.cabal + gtk/gtk.pkg gtk/gtk.cabal + mogul/mogul.pkg mogul/mogul.cabal + glade/glade.pkg glade/glade.cabal + gconf/gconf.pkg gconf/gconf.cabal + sourceview/sourceview.pkg sourceview/sourceview.cabal + mozembed/mozembed.pkg mozembed/mozembed.cabal], [chmod a+x mk/chsDepend && chmod a+x install-sh]) dnl ...and chat with the user Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- Makefile.am 16 Mar 2005 13:56:30 -0000 1.57 +++ Makefile.am 23 Mar 2005 17:09:15 -0000 1.58 @@ -215,12 +215,12 @@ glib_PKGNAME = libHSglib_a -libHSglib_a_PACKAGE = glib/glib.pkg +libHSglib_a_PACKAGE = glib/glib.$(PKGEXT) libHSglib_a_PACKAGEDEPS = libHSglib_a_HEADER = glib-object.h libHSglib_a_PRECOMP = glib/glib.precomp libHSglib_a_LIBS = $(GLIB_LIBS) -libHSglib_a_HCFLAGS = -fffi +libHSglib_a_HCFLAGS = -fffi $(if $(USE_CABAL),-ignore-package glib) libHSglib_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS)) libHSglib_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS)) @@ -287,12 +287,12 @@ gtk_PKGNAME = libHSgtk_a -libHSgtk_a_PACKAGE = gtk/gtk.pkg +libHSgtk_a_PACKAGE = gtk/gtk.$(PKGEXT) libHSgtk_a_PACKAGEDEPS = libHSgtk_a_HEADER = gtk/gtk.h libHSgtk_a_PRECOMP = gtk/gtk.precomp libHSgtk_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) -libHSgtk_a_HCFLAGS = -fffi +libHSgtk_a_HCFLAGS = -fffi $(if $(USE_CABAL),-ignore-package glib) libHSgtk_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) @@ -524,10 +524,10 @@ mogul_PKGNAME = libHSmogul_a -libHSmogul_a_PACKAGE = mogul/mogul.pkg +libHSmogul_a_PACKAGE = mogul/mogul.$(PKGEXT) libHSmogul_a_PACKAGEDEPS = libHSmogul_a_LIBS = -libHSmogul_a_HCFLAGS = +libHSmogul_a_HCFLAGS = $(if $(USE_CABAL),-ignore-package glib) libHSmogul_a_CFLAGS = libHSmogul_a_CPPFLAGS = @@ -570,12 +570,12 @@ glade_PKGNAME = libHSglade_a -libHSglade_a_PACKAGE = glade/glade.pkg +libHSglade_a_PACKAGE = glade/glade.$(PKGEXT) libHSglade_a_PACKAGEDEPS = libHSglade_a_HEADER = glade/glade.h libHSglade_a_PRECOMP = glade/glade.precomp libHSglade_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(LIBGLADE_LIBS) -libHSglade_a_HCFLAGS = -fffi +libHSglade_a_HCFLAGS = -fffi $(if $(USE_CABAL),-ignore-package glib) libHSglade_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(LIBGLADE_CFLAGS)) libHSglade_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(LIBGLADE_CFLAGS)) @@ -649,12 +649,13 @@ gconf_PKGNAME = libHSgconf_a -libHSgconf_a_PACKAGE = gconf/gconf.pkg +libHSgconf_a_PACKAGE = gconf/gconf.$(PKGEXT) libHSgconf_a_PACKAGEDEPS = libHSgconf_a_HEADER = gconf/gconf-client.h libHSgconf_a_PRECOMP = gconf/gconf.precomp libHSgconf_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(GCONF_LIBS) -libHSgconf_a_HCFLAGS = -fglasgow-exts -fallow-overlapping-instances +libHSgconf_a_HCFLAGS = -fglasgow-exts -fallow-overlapping-instances \ + $(if $(USE_CABAL),-ignore-package glib) libHSgconf_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS)) libHSgconf_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS)) @@ -735,12 +736,12 @@ sourceview_PKGNAME = libHSsourceview_a -libHSsourceview_a_PACKAGE = sourceview/sourceview.pkg +libHSsourceview_a_PACKAGE = sourceview/sourceview.$(PKGEXT) libHSsourceview_a_PACKAGEDEPS = libHSsourceview_a_HEADER = sourceview.h libHSsourceview_a_PRECOMP = sourceview/sourceview.precomp libHSsourceview_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(SOURCEVIEW_LIBS) -libHSsourceview_a_HCFLAGS = -fffi +libHSsourceview_a_HCFLAGS = -fffi $(if $(USE_CABAL),-ignore-package glib) libHSsourceview_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOURCEVIEW_CFLAGS)) libHSsourceview_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOURCEVIEW_CFLAGS)) -Isourceview @@ -825,12 +826,12 @@ mozembed_PKGNAME = libHSmozembed_a -libHSmozembed_a_PACKAGE = mozembed/mozembed.pkg +libHSmozembed_a_PACKAGE = mozembed/mozembed.$(PKGEXT) libHSmozembed_a_PACKAGEDEPS = libHSmozembed_a_HEADER = gtkmozembed.h libHSmozembed_a_PRECOMP = mozembed/mozembed.precomp libHSmozembed_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(MOZEMBED_LIBS) -libHSmozembed_a_HCFLAGS = -fffi +libHSmozembed_a_HCFLAGS = -fffi $(if $(USE_CABAL),-ignore-package glib) libHSmozembed_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(MOZEMBED_CFLAGS)) libHSmozembed_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(MOZEMBED_CFLAGS)) @@ -1002,6 +1003,16 @@ # and if your installation gets corrupt you can re-register the packages from them. pkglib_DATA = $(foreach pkgname,$(pkglib_LIBRARIES), $(call getVar,$(pkgname),PACKAGE)) +COMMA := , +getModules = \ + $(subst $(SPACE),$(COMMA) ,$(sort \ + $(foreach HSFILE,$(call getVar,$(1),HSFILES), \ + $(patsubst $(firstword $(subst /, ,$(HSFILE))).%.hs, %, \ + $(subst /,.,$(HSFILE)) \ + ) \ + ) \ + )) + if ENABLE_PKGREG # For distributors we usually do not want to register the packages using @@ -1013,10 +1024,10 @@ else echo "[]" > $(PKGCONF); fi;) $(foreach pkgname,$(pkglib_LIBRARIES), \ rm -f $(DESTDIR)$(pkglibdir)/$(patsubst lib%.a,%.o,$(pkgname)); \ - prefix=$(prefix) exec_prefix=$(exec_prefix) pkglibdir=$(pkglibdir) \ - $(GHCPKG) $(addprefix --config-file=,$(PKGCONF)) \ - --update-package $(GHCPKG_BUILD_GHCI_LIB) \ - --input-file=$(call getVar,$(pkgname),PACKAGE);) + sed 's:$${pkglibdir}:$(pkglibdir):g' $(call getVar,$(pkgname),PACKAGE) \ + | sed 's:$${modules}:$(call getModules,$(pkgname)):' \ + | $(GHCPKG) $(addprefix --config-file=,$(PKGCONF)) \ + --update-package $(GHCPKG_BUILD_GHCI_LIB);) uninstall-hook : $(foreach pkgname,$(pkglib_LIBRARIES), \ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:07
|
Update of /cvsroot/gtk2hs/gtk2hs/sourceview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408/sourceview Added Files: sourceview.cabal.in Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. --- NEW FILE: sourceview.cabal.in --- name: sourceview version: @PACKAGE_VERSION@ license: LGPL license-file: COPYING.LIB maintainer: gtk...@li... stability: provisional homepage: http://gtk2hs.sourceforge.net/ exposed: True exposed-modules: ${modules} import-dirs: @hidir@/sourceview library-dirs: @SOURCEVIEW_LIBDIR_CQ@ hs-libraries: HSsourceview extra-libraries: @SOURCEVIEW_LIBS_CQ@ include-dirs: @SOURCEVIEW_CFLAGS_CQ@ includes: gtksourceview/gtksourceview.h, gtksourceview/gtksourcemarker.h, gtksourceview/gtksourcelanguagesmanager.h, gtksourceview/gtksourcetag.h, gtksourceview/gtksourcemarker.h, gtksourceview/gtksourceiter.h depends: gtk-@PACKAGE_VERSION@ extra-ld-opts: @SOURCEVIEW_LIBEXTRA_CQ@ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:06
|
Update of /cvsroot/gtk2hs/gtk2hs/mozembed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408/mozembed Added Files: mozembed.cabal.in Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. --- NEW FILE: mozembed.cabal.in --- name: mozembed version: @PACKAGE_VERSION@ license: LGPL license-file: COPYING.LIB maintainer: gtk...@li... stability: provisional homepage: http://gtk2hs.sourceforge.net/ exposed: True exposed-modules: ${modules} import-dirs: @hidir@/mozembed library-dirs: @MOZEMBED_LIBDIR_CQ@ hs-libraries: HSmozembed extra-libraries: @MOZEMBED_LIBS_CQ@ include-dirs: @MOZEMBED_CFLAGS_CQ@ includes: gtkmozembed.h depends: gtk-@PACKAGE_VERSION@ extra-ld-opts: @MOZEMBED_LIBEXTRA_CQ@ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:05
|
Update of /cvsroot/gtk2hs/gtk2hs/gconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408/gconf Added Files: gconf.cabal.in Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. --- NEW FILE: gconf.cabal.in --- name: gconf version: @PACKAGE_VERSION@ license: LGPL license-file: COPYING.LIB maintainer: gtk...@li... stability: provisional homepage: http://gtk2hs.sourceforge.net/ exposed: True exposed-modules: ${modules} import-dirs: @hidir@/gconf library-dirs: @GCONF_LIBDIR_CQ@ hs-libraries: HSgconf extra-libraries: @GCONF_LIBS_CQ@ include-dirs: @GCONF_CFLAGS_CQ@ includes: gconf/gconf-client.h depends: gtk-@PACKAGE_VERSION@ extra-ld-opts: @GCONF_LIBEXTRA_CQ@ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:05
|
Update of /cvsroot/gtk2hs/gtk2hs/mogul In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408/mogul Added Files: mogul.cabal.in Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. --- NEW FILE: mogul.cabal.in --- name: mogul version: @PACKAGE_VERSION@ license: LGPL license-file: COPYING.LIB maintainer: gtk...@li... stability: provisional homepage: http://gtk2hs.sourceforge.net/ exposed: True exposed-modules: ${modules} import-dirs: @hidir@/mogul library-dirs: @GTK_LIBDIR_CQ@ hs-libraries: HSmogul depends: gtk-@PACKAGE_VERSION@ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:05
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408/glade Added Files: glade.cabal.in Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. --- NEW FILE: glade.cabal.in --- name: glade version: @PACKAGE_VERSION@ license: LGPL license-file: COPYING.LIB maintainer: gtk...@li... stability: provisional homepage: http://gtk2hs.sourceforge.net/ exposed: True exposed-modules: ${modules} import-dirs: @hidir@/glade library-dirs: @LIBGLADE_LIBDIR_CQ@ hs-libraries: HSglade extra-libraries: @LIBGLADE_LIBS_CQ@ include-dirs: @LIBGLADE_CFLAGS_CQ@ includes: glade/glade.h depends: gtk-@PACKAGE_VERSION@ extra-ld-opts: @LIBGLADE_LIBEXTRA_CQ@ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:04
|
Update of /cvsroot/gtk2hs/gtk2hs/glib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408/glib Added Files: glib.cabal.in Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. --- NEW FILE: glib.cabal.in --- name: glib version: @PACKAGE_VERSION@ license: LGPL license-file: COPYING.LIB maintainer: gtk...@li... stability: provisional homepage: http://gtk2hs.sourceforge.net/ exposed: True exposed-modules: ${modules} import-dirs: @hidir@/glib library-dirs: @GLIB_LIBDIR_CQ@ hs-libraries: HSglib extra-libraries: @GLIB_LIBS_CQ@ include-dirs: @GLIB_CFLAGS_CQ@ includes: glib.h, glib-object.h depends: haskell98 extra-ld-opts: @GLIB_LIBEXTRA_CQ@ |
From: Duncan C. <dun...@us...> - 2005-03-23 17:09:04
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25408/gtk Added Files: gtk.cabal.in Log Message: GHC 6.4 cabal support: add new cabal package file templates. configure.ac: bump version to make it clear we're in a development mode (we can no longer use _pre since cabal does not like that as a version number). Add test for cabal support (ghc >= 6.4). Add *.cabal.in files to the list of files that need substitution in AC_OUTPUT. acinclude.m4: modify the way the flags are formatted depending on whether USE_CABAL is set. The old package format used " quotes around elements in string lists, the new cabal package format does not. Makefile.am: use $(PKGEXT) to specify which package file to use, the .cabal one or the .pkg one. Add -ignore-package glib when compiling modules in each package (conditionally on USE_CABAL) since otheriwse if the package is already installed the compilation would fail. Modify the package registering code. Use sed to substitute for ${pkglibdir} since ghc-pkg no longer does substitution. Also substitute for ${modules} the list of modules in the package. --- NEW FILE: gtk.cabal.in --- name: gtk version: @PACKAGE_VERSION@ license: LGPL license-file: COPYING.LIB maintainer: gtk...@li... stability: provisional homepage: http://gtk2hs.sourceforge.net/ exposed: True exposed-modules: ${modules} import-dirs: @hidir@/gtk library-dirs: @GTK_LIBDIR_CQ@ hs-libraries: HSgtk extra-libraries: @GTK_LIBS_CQ@ include-dirs: @GTK_CFLAGS_CQ@ includes: gtk/gtk.h depends: glib-@PACKAGE_VERSION@ extra-ld-opts: @GTK_LIBEXTRA_CQ@ |
From: Duncan C. <dun...@us...> - 2005-03-18 14:25:45
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8970 Modified Files: ChangeLog Log Message: Temporary fix for building with GHC 6.4. Temporary until we fix c2hs to not override the pragmas at the top of generated files. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.391 retrieving revision 1.392 diff -u -d -r1.391 -r1.392 --- ChangeLog 16 Mar 2005 13:56:29 -0000 1.391 +++ ChangeLog 18 Mar 2005 14:25:35 -0000 1.392 @@ -1,3 +1,9 @@ +2005-03-18 Duncan Coutts <du...@co...> + + * mk/common.mk: temporary fix for building with GHC 6.4. Temporary + until we fix c2hs to not override the pragmas at the top of generated + files. + 2005-03-16 Duncan Coutts <du...@co...> * gtk/Graphics/UI/Gtk/Misc/Adjustment.chs, |
From: Duncan C. <dun...@us...> - 2005-03-18 14:25:45
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8970/mk Modified Files: common.mk Log Message: Temporary fix for building with GHC 6.4. Temporary until we fix c2hs to not override the pragmas at the top of generated files. Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- common.mk 7 Feb 2005 15:39:49 -0000 1.55 +++ common.mk 18 Mar 2005 14:25:36 -0000 1.56 @@ -65,7 +65,7 @@ touch $@; \ $(if $(word 2,$($(PKG)_HSFILES)),\ $(MAKE) $(AM_MAKEFLAGS) $($(PKG)_HSFILES); \ - $(HC) -M $(addprefix -optdep,-f $@) \ + $(HC) -M $(addprefix -optdep,-f $@) -fglasgow-exts \ $(HCFLAGS) $($(PKG)_HCFLAGS) -i$(pkgVPATH) \ $(AM_CPPFLAGS) $($(PKG)_CPPFLAGS) $($(PKG)_HSFILES);) \ fi;)) |
From: Duncan C. <dun...@us...> - 2005-03-16 13:56:41
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21474 Modified Files: ChangeLog Makefile.am Log Message: Makefile.am: specify AUTOMAKE_OPTIONS = 1.8 to require that version of automake. mozembed/Graphics/UI/Gtk/MozEmbed/.cvsignore: add .cvsignore file, but mainly this file being present will force a normal CVS checkout to create the directory, the lack of which will break the build. On the quest to make a clean CVS checkout build "just work"! Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- Makefile.am 13 Mar 2005 19:34:29 -0000 1.56 +++ Makefile.am 16 Mar 2005 13:56:30 -0000 1.57 @@ -1,4 +1,4 @@ -AUTOMAKE_OPTIONS = foreign subdir-objects +AUTOMAKE_OPTIONS = 1.8 foreign subdir-objects SUFFIXES = .hs.uncpp .chs.pp .chs .hsc .deps .dep MOSTLYCLEANFILES = */*.deps.bak tools/*/*.deps.bak CLEANFILES = Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.390 retrieving revision 1.391 diff -u -d -r1.390 -r1.391 --- ChangeLog 16 Mar 2005 02:32:25 -0000 1.390 +++ ChangeLog 16 Mar 2005 13:56:29 -0000 1.391 @@ -11,6 +11,14 @@ gtk/Graphics/UI/Gtk/Misc/Viewport.chs: documentation changes and code formatting changes. + * Makefile.am: specify AUTOMAKE_OPTIONS = 1.8 to require that version + of automake. + + * mozembed/Graphics/UI/Gtk/MozEmbed/.cvsignore: add .cvsignore file, + but mainly this file being present will force a normal CVS checkout to + create the directory, the lack of which will break the build. On the + quest to make a clean CVS checkout build "just work"! + 2005-03-15 Duncan Coutts <du...@co...> * glib/System/Glib/FFI.hs: add maybeNull function which is used by |
From: Duncan C. <dun...@us...> - 2005-03-16 13:56:40
|
Update of /cvsroot/gtk2hs/gtk2hs/mozembed/Graphics/UI/Gtk/MozEmbed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21474/mozembed/Graphics/UI/Gtk/MozEmbed Added Files: .cvsignore Log Message: Makefile.am: specify AUTOMAKE_OPTIONS = 1.8 to require that version of automake. mozembed/Graphics/UI/Gtk/MozEmbed/.cvsignore: add .cvsignore file, but mainly this file being present will force a normal CVS checkout to create the directory, the lack of which will break the build. On the quest to make a clean CVS checkout build "just work"! --- NEW FILE: .cvsignore --- Types.chs Types.hs |
From: Duncan C. <dun...@us...> - 2005-03-16 02:32:54
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4767/gtk/Graphics/UI/Gtk/Misc Modified Files: DrawingArea.chs Log Message: oops, missed one: Documentation changes and code formatting changes. Index: DrawingArea.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- DrawingArea.chs 25 Feb 2005 22:53:41 -0000 1.4 +++ DrawingArea.chs 16 Mar 2005 02:32:27 -0000 1.5 @@ -24,10 +24,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- A widget for custom user interface elements. +-- A widget for custom user interface elements -- module Graphics.UI.Gtk.Misc.DrawingArea ( --- * Description +-- * Detail -- -- | The 'DrawingArea' widget is used for creating custom user interface -- elements. It's essentially a blank widget; you can draw on @@ -99,8 +99,9 @@ -------------------- -- Constructors --- | Create a new custom widget. +-- | Creates a new drawing area. -- drawingAreaNew :: IO DrawingArea -drawingAreaNew = makeNewObject mkDrawingArea $ - liftM castPtr {#call unsafe drawing_area_new#} +drawingAreaNew = + makeNewObject mkDrawingArea $ liftM castPtr $ + {# call unsafe drawing_area_new #} |
From: Duncan C. <dun...@us...> - 2005-03-16 02:32:54
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4767 Modified Files: ChangeLog Log Message: oops, missed one: Documentation changes and code formatting changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.389 retrieving revision 1.390 diff -u -d -r1.389 -r1.390 --- ChangeLog 16 Mar 2005 01:42:45 -0000 1.389 +++ ChangeLog 16 Mar 2005 02:32:25 -0000 1.390 @@ -3,6 +3,7 @@ * gtk/Graphics/UI/Gtk/Misc/Adjustment.chs, gtk/Graphics/UI/Gtk/Misc/Arrow.chs, gtk/Graphics/UI/Gtk/Misc/Calendar.chs.pp, + gtk/Graphics/UI/Gtk/Misc/DrawingArea.chs, gtk/Graphics/UI/Gtk/Misc/EventBox.chs.pp, gtk/Graphics/UI/Gtk/Misc/HandleBox.chs, gtk/Graphics/UI/Gtk/Misc/SizeGroup.chs, |
From: Duncan C. <dun...@us...> - 2005-03-16 01:43:39
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26809 Modified Files: ChangeLog Log Message: Documentation changes and code formatting changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.388 retrieving revision 1.389 diff -u -d -r1.388 -r1.389 --- ChangeLog 15 Mar 2005 20:33:44 -0000 1.388 +++ ChangeLog 16 Mar 2005 01:42:45 -0000 1.389 @@ -1,3 +1,15 @@ +2005-03-16 Duncan Coutts <du...@co...> + + * gtk/Graphics/UI/Gtk/Misc/Adjustment.chs, + gtk/Graphics/UI/Gtk/Misc/Arrow.chs, + gtk/Graphics/UI/Gtk/Misc/Calendar.chs.pp, + gtk/Graphics/UI/Gtk/Misc/EventBox.chs.pp, + gtk/Graphics/UI/Gtk/Misc/HandleBox.chs, + gtk/Graphics/UI/Gtk/Misc/SizeGroup.chs, + gtk/Graphics/UI/Gtk/Misc/Tooltips.chs.pp, + gtk/Graphics/UI/Gtk/Misc/Viewport.chs: documentation changes and code + formatting changes. + 2005-03-15 Duncan Coutts <du...@co...> * glib/System/Glib/FFI.hs: add maybeNull function which is used by |
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26809/gtk/Graphics/UI/Gtk/Misc Modified Files: Adjustment.chs Arrow.chs Calendar.chs.pp EventBox.chs.pp HandleBox.chs SizeGroup.chs Tooltips.chs.pp Viewport.chs Log Message: Documentation changes and code formatting changes. Index: Adjustment.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/Adjustment.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Adjustment.chs 25 Feb 2005 01:11:35 -0000 1.3 +++ Adjustment.chs 16 Mar 2005 01:42:46 -0000 1.4 @@ -27,7 +27,7 @@ -- A 'Object' representing an adjustable bounded value -- module Graphics.UI.Gtk.Misc.Adjustment ( --- * Description +-- * Detail -- -- | The 'Adjustment' object represents a value which has an associated lower -- and upper bound, together with step and page increments, and a page size. It @@ -74,6 +74,9 @@ adjustmentGetValue, adjustmentClampPage, +-- * Properties + adjustmentValue, + -- * Signals onAdjChanged, afterAdjChanged, @@ -84,32 +87,43 @@ import Monad (liftM) import System.Glib.FFI +import System.Glib.Attributes (Attr(..)) +{#import System.Glib.GValue#} import Graphics.UI.Gtk.Abstract.Object (makeNewObject, objectSetProperty, objectGetProperty) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} -{#import System.Glib.GValue#} {# context lib="gtk" prefix="gtk" #} -------------------- -- Constructors --- | Create a new Adjustment object. +-- | Creates a new 'Adjustment'. -- --- * The creation function take every value that is contained in the object: --- @value@ is the initial value and should be between the --- @upper@ and @lower@ bounds of the slider. Clicking on the --- arrows increases this value by @stepIncrement@. Clicking in the --- slider advances by @pageIncrement@. The @pageSize@ is --- needed to determine if the end of the slider is still in the range. +-- The creation function take every value that is contained in the object: +-- @value@ is the initial value and should be between the @upper@ and @lower@ +-- bounds of the slider. Clicking on the arrows increases this value by +-- @stepIncrement@. Clicking in the slider advances by @pageIncrement@. The +-- @pageSize@ is needed to determine if the end of the slider is still in the +-- range. -- -adjustmentNew :: Double -> Double -> Double -> Double -> Double -> Double -> - IO Adjustment -adjustmentNew pageSize value lower upper stepIncrement pageIncrement = - makeNewObject mkAdjustment $ liftM castPtr $ {#call unsafe adjustment_new#} - (realToFrac value) (realToFrac lower) (realToFrac upper) - (realToFrac stepIncrement) (realToFrac pageIncrement) - (realToFrac pageSize) +adjustmentNew :: + Double -- ^ @value@ - the initial value. + -> Double -- ^ @lower@ - the minimum value. + -> Double -- ^ @upper@ - the maximum value. + -> Double -- ^ @stepIncrement@ - the step increment. + -> Double -- ^ @pageIncrement@ - the page increment. + -> Double -- ^ @pageSize@ - the page size. + -> IO Adjustment +adjustmentNew value lower upper stepIncrement pageIncrement pageSize = + makeNewObject mkAdjustment $ liftM castPtr $ + {# call unsafe adjustment_new #} + (realToFrac value) + (realToFrac lower) + (realToFrac upper) + (realToFrac stepIncrement) + (realToFrac pageIncrement) + (realToFrac pageSize) -------------------- -- Methods @@ -166,45 +180,71 @@ (GVdouble res) <- objectGetProperty a "upper" return res --- | Set the current value of the Adjustment object. +-- | Sets the current value of the Adjustment object. The value is clamped to +-- lie between the adjustment's @lower@ and @upper@ values. See 'adjustmentNew' +-- for details of these properties. +-- +-- Note that for adjustments which are used in a 'Scrollbar', the effective +-- range of allowed values goes from @lower@ to @upper - page_size@. -- adjustmentSetValue :: Adjustment -> Double -> IO () -adjustmentSetValue adj value = - {#call adjustment_set_value#} adj (realToFrac value) +adjustmentSetValue self value = + {# call adjustment_set_value #} + self + (realToFrac value) --- | Get the current value of the Adjustment object. +-- | Gets the current value of the adjustment. See 'adjustmentSetValue'. -- adjustmentGetValue :: Adjustment -> IO Double -adjustmentGetValue adj = - liftM realToFrac $ {#call adjustment_get_value#} adj +adjustmentGetValue self = + liftM realToFrac $ + {# call adjustment_get_value #} + self --- | Ensure that the alignment is within these bounds. +-- | Updates the 'Adjustment' @value@ to ensure that the range between @lower@ +-- and @upper@ is in the current page (i.e. between @value@ and @value + +-- pageSize@). If the range is larger than the page size, then only the start +-- of it will be in the current page. A \"changed\" signal will be emitted if +-- the value is changed. -- --- * Updates the Adjustment value to ensure that the range between lower and --- upper is in the current page (i.e. between value and value + page_size). --- If the range is larger than the page size, then only the start of it will --- be in the current page. A \"changed\" signal will be emitted if the value --- is changed. +adjustmentClampPage :: Adjustment + -> Double -- ^ @lower@ - the lower value. + -> Double -- ^ @upper@ - the upper value. + -> IO () +adjustmentClampPage self lower upper = + {# call adjustment_clamp_page #} + self + (realToFrac lower) + (realToFrac upper) + +-------------------- +-- Properties + +-- | The value of the adjustment. -- -adjustmentClampPage :: Adjustment -> Double -> Double -> IO () -adjustmentClampPage a lower upper = {#call adjustment_clamp_page#} - a (realToFrac lower) (realToFrac upper) +-- Default value: 0 +-- +adjustmentValue :: Attr Adjustment Double +adjustmentValue = Attr + adjustmentGetValue + adjustmentSetValue -------------------- -- Signals --- | This signal is emitted if some value of --- Adjustment except @value@ itself changes. +-- | Emitted when one or more of the 'Adjustment' fields have been changed, +-- other than the value field. -- -onAdjChanged, afterAdjChanged :: Adjustment -> IO () -> - IO (ConnectId Adjustment) +onAdjChanged, afterAdjChanged :: Adjustment + -> IO () + -> IO (ConnectId Adjustment) onAdjChanged = connect_NONE__NONE "changed" False afterAdjChanged = connect_NONE__NONE "changed" True --- | This signal is emitted if the value of the --- Alignment object changed. +-- | Emitted when the 'Adjustment' value field has been changed. -- -onValueChanged, afterValueChanged :: Adjustment -> IO () -> - IO (ConnectId Adjustment) +onValueChanged, afterValueChanged :: Adjustment + -> IO () + -> IO (ConnectId Adjustment) onValueChanged = connect_NONE__NONE "value-changed" False afterValueChanged = connect_NONE__NONE "value-changed" True Index: HandleBox.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/HandleBox.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- HandleBox.chs 13 Mar 2005 19:34:35 -0000 1.4 +++ HandleBox.chs 16 Mar 2005 01:42:46 -0000 1.5 @@ -24,10 +24,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- A widget for detachable window portions. +-- a widget for detachable window portions -- module Graphics.UI.Gtk.Misc.HandleBox ( --- * Description +-- * Detail -- -- | The 'HandleBox' widget allows a portion of a window to be \"torn off\". -- It is a bin widget which displays its child and a handle that the user can @@ -107,57 +107,80 @@ -- | Create a new handle box. -- handleBoxNew :: IO HandleBox -handleBoxNew = makeNewObject mkHandleBox $ - liftM castPtr {#call unsafe handle_box_new#} +handleBoxNew = + makeNewObject mkHandleBox $ liftM castPtr $ + {# call unsafe handle_box_new #} -------------------- -- Methods --- | Set the shadow type of the detached box. +-- | Sets the type of shadow to be drawn around the border of the handle box. -- -handleBoxSetShadowType :: HandleBoxClass hb => hb -> ShadowType -> IO () -handleBoxSetShadowType hb shadow = {#call handle_box_set_shadow_type#} - (toHandleBox hb) ((fromIntegral.fromEnum) shadow) +handleBoxSetShadowType :: HandleBoxClass self => self -> ShadowType -> IO () +handleBoxSetShadowType self type_ = + {# call handle_box_set_shadow_type #} + (toHandleBox self) + ((fromIntegral . fromEnum) type_) --- | Get the shadow type of the detached box. +-- | Gets the type of shadow drawn around the handle box. See +-- 'handleBoxSetShadowType'. -- -handleBoxGetShadowType :: HandleBoxClass hb => hb -> IO ShadowType -handleBoxGetShadowType hb = liftM (toEnum.fromIntegral) $ - {#call unsafe handle_box_get_shadow_type#} (toHandleBox hb) +handleBoxGetShadowType :: HandleBoxClass self => self + -> IO ShadowType -- ^ returns the type of shadow currently drawn around the + -- handle box. +handleBoxGetShadowType self = + liftM (toEnum . fromIntegral) $ + {# call unsafe handle_box_get_shadow_type #} + (toHandleBox self) --- | Set the position of the handle. +-- | Sets the side of the handlebox where the handle is drawn. -- -handleBoxSetHandlePosition :: HandleBoxClass hb => hb -> PositionType -> IO () -handleBoxSetHandlePosition hb pos = {#call handle_box_set_handle_position#} - (toHandleBox hb) ((fromIntegral.fromEnum) pos) +handleBoxSetHandlePosition :: HandleBoxClass self => self + -> PositionType -- ^ @position@ - the side of the handlebox where the handle + -- should be drawn. + -> IO () +handleBoxSetHandlePosition self position = + {# call handle_box_set_handle_position #} + (toHandleBox self) + ((fromIntegral . fromEnum) position) --- | Get the position of the handle. +-- | Gets the handle position of the handle box. See +-- 'handleBoxSetHandlePosition'. -- -handleBoxGetHandlePosition :: HandleBoxClass hb => hb -> IO PositionType -handleBoxGetHandlePosition hb = liftM (toEnum.fromIntegral) $ - {#call unsafe handle_box_get_handle_position#} (toHandleBox hb) +handleBoxGetHandlePosition :: HandleBoxClass self => self + -> IO PositionType -- ^ returns the current handle position. +handleBoxGetHandlePosition self = + liftM (toEnum . fromIntegral) $ + {# call unsafe handle_box_get_handle_position #} + (toHandleBox self) --- | Set the snap edge of the HandleBox. +-- | Sets the snap edge of the HandleBox. The snap edge is the edge of the +-- detached child that must be aligned with the corresponding edge of the +-- \"ghost\" left behind when the child was detached to reattach the torn-off +-- window. Usually, the snap edge should be chosen so that it stays in the same +-- place on the screen when the handlebox is torn off. -- --- * The snap edge is the edge of the detached child that must be aligned with --- the corresponding edge of the \"ghost\" left behind when the child was --- detached to reattach the torn-off window. Usually, the snap edge should --- be chosen so that it stays in the same place on the screen when the --- handlebox is torn off. If the snap edge is not set, then an appropriate --- value will be guessed from the handle position. If the handle position is --- 'PosRight' or 'PosLeft', then the snap edge will --- be 'PosTop', otherwise it will be 'PosLeft'. +-- If the snap edge is not set, then an appropriate value will be guessed +-- from the handle position. If the handle position is 'PosRight' or 'PosLeft', +-- then the snap edge will be 'PosTop', otherwise it will be 'PosLeft'. -- -handleBoxSetSnapEdge :: HandleBoxClass hb => hb -> PositionType -> IO () -handleBoxSetSnapEdge hb pos = {#call handle_box_set_snap_edge#} - (toHandleBox hb) ((fromIntegral.fromEnum) pos) +handleBoxSetSnapEdge :: HandleBoxClass self => self + -> PositionType + -> IO () +handleBoxSetSnapEdge self edge = + {# call handle_box_set_snap_edge #} + (toHandleBox self) + ((fromIntegral . fromEnum) edge) -- | Gets the edge used for determining reattachment of the handle box. See -- 'handleBoxSetSnapEdge'. -- -handleBoxGetSnapEdge :: HandleBoxClass hb => hb -> IO PositionType -handleBoxGetSnapEdge hb = liftM (toEnum.fromIntegral) $ - {#call unsafe handle_box_get_snap_edge#} (toHandleBox hb) +handleBoxGetSnapEdge :: HandleBoxClass self => self + -> IO PositionType +handleBoxGetSnapEdge self = + liftM (toEnum . fromIntegral) $ + {# call unsafe handle_box_get_snap_edge #} + (toHandleBox self) -------------------- -- Properties @@ -193,22 +216,23 @@ -------------------- -- Signals --- | Emitted when the contents of the handlebox --- are reattached to the main window. --- --- * (INTERNAL) We ignore the given Widget. +-- Note: for these two signales we ignore the given Widget in the handler. + +-- | This signal is emitted when the contents of the handlebox are reattached +-- to the main window. -- -onChildAttached, afterChildAttached :: HandleBoxClass hb => hb -> IO () -> - IO (ConnectId hb) +onChildAttached, afterChildAttached :: HandleBoxClass self => self + -> IO () + -> IO (ConnectId self) onChildAttached = connect_NONE__NONE "child-attached" False afterChildAttached = connect_NONE__NONE "child-attached" True - --- | Emitted when the 'HandleBox' is --- detached form the main window. +-- | This signal is emitted when the contents of the handlebox are detached +-- from the main window. -- -onChildDetached, afterChildDetached :: HandleBoxClass hb => hb -> IO () -> - IO (ConnectId hb) +onChildDetached, afterChildDetached :: HandleBoxClass self => self + -> IO () + -> IO (ConnectId self) onChildDetached = connect_NONE__NONE "child-detached" False afterChildDetached = connect_NONE__NONE "child-detached" True Index: Arrow.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/Arrow.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Arrow.chs 26 Feb 2005 02:17:27 -0000 1.1 +++ Arrow.chs 16 Mar 2005 01:42:46 -0000 1.2 @@ -24,10 +24,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- An Arrow pointing in one of the four cardinal directions. +-- Displays an arrow -- module Graphics.UI.Gtk.Misc.Arrow ( --- * Description +-- * Detail -- -- | 'Arrow' should be used to draw simple arrows that need to point in one of -- the four cardinal directions (up, down, left, or right). The style of the @@ -79,7 +79,7 @@ -------------------- -- Constructors --- | Creates a new arrow with display options. +-- | Creates a new arrow widget. -- arrowNew :: ArrowType Index: EventBox.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/EventBox.chs.pp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- EventBox.chs.pp 13 Mar 2005 19:34:35 -0000 1.4 +++ EventBox.chs.pp 16 Mar 2005 01:42:46 -0000 1.5 @@ -25,10 +25,10 @@ -- Portability : portable (depends on GHC) -- -- A widget used to catch events for widgets which do not have their own --- window. +-- window -- module Graphics.UI.Gtk.Misc.EventBox ( --- * Description +-- * Detail -- -- | The 'EventBox' widget is a subclass of 'Bin' which also has its own -- window. It is useful since it allows you to catch events for widgets which @@ -79,47 +79,80 @@ -------------------- -- Constructors --- | Create a new 'EventBox'. +-- | Creates a new 'EventBox'. -- eventBoxNew :: IO EventBox -eventBoxNew = makeNewObject mkEventBox $ - liftM castPtr {#call unsafe event_box_new#} +eventBoxNew = + makeNewObject mkEventBox $ liftM castPtr $ + {# call unsafe event_box_new #} -------------------- -- Methods #if GTK_CHECK_VERSION(2,4,0) -- | Set whether the event box uses a visible or invisible child window. The --- default is to use visible windows. The C documentation for details of what --- difference this makes. +-- default is to use visible windows. +-- +-- In an invisible window event box, the window that that the event box +-- creates is a \"input only\" window, which means that it is invisible and only +-- serves to receive events. +-- +-- A visible window event box creates a visible (\"input output\") window that +-- acts as the parent window for all the widgets contained in the event box. +-- +-- You should generally make your event box invisible if you just want to +-- trap events. Creating a visible window may cause artifacts that are visible +-- to the user, especially if the user is using a theme with gradients or +-- pixmaps. +-- +-- The main reason to create a non input-only event box is if you want to +-- set the background to a different color or draw on it. +-- +-- * Available since Gtk version 2.4 -- eventBoxSetVisibleWindow :: EventBox -> Bool -> IO () -eventBoxSetVisibleWindow ebox visible = - {#call event_box_set_visible_window#} ebox (fromBool visible) +eventBoxSetVisibleWindow self visibleWindow = + {# call event_box_set_visible_window #} + self + (fromBool visibleWindow) --- | Returns whether the event box has a visible window. +-- | Returns whether the event box has a visible window. See +-- 'eventBoxSetVisibleWindow' for details. +-- +-- * Available since Gtk version 2.4 -- eventBoxGetVisibleWindow :: EventBox -> IO Bool -eventBoxGetVisibleWindow ebox = - liftM toBool $ {#call unsafe event_box_get_visible_window#} ebox +eventBoxGetVisibleWindow self = + liftM toBool $ + {# call unsafe event_box_get_visible_window #} + self -- | Set whether the event box window is positioned above the windows of its --- child, as opposed to below it. +-- child, as opposed to below it. If the window is above, all events inside the +-- event box will go to the event box. If the window is below, events in +-- windows of child widgets will first got to that widget, and then to its +-- parents. -- --- * If the window is above, all events inside the event box will go to the --- event box. If the window is below, events in windows of child widgets will --- first got to that widget, and then to its parents. +-- The default is to keep the window below the child. +-- +-- * Available since Gtk version 2.4 -- eventBoxSetAboveChild :: EventBox -> Bool -> IO () -eventBoxSetAboveChild ebox above = - {#call event_box_set_above_child#} ebox (fromBool above) +eventBoxSetAboveChild self aboveChild = + {# call event_box_set_above_child #} + self + (fromBool aboveChild) -- | Returns whether the event box window is above or below the windows of its -- child. See 'eventBoxSetAboveChild' for details. -- +-- * Available since Gtk version 2.4 +-- eventBoxGetAboveChild :: EventBox -> IO Bool -eventBoxGetAboveChild ebox = - liftM toBool $ {#call unsafe event_box_get_above_child#} ebox +eventBoxGetAboveChild self = + liftM toBool $ + {# call unsafe event_box_get_above_child #} + self -------------------- -- Properties Index: Tooltips.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/Tooltips.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Tooltips.chs.pp 25 Feb 2005 01:11:35 -0000 1.3 +++ Tooltips.chs.pp 16 Mar 2005 01:42:46 -0000 1.4 @@ -24,10 +24,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- Add tips to your widgets. +-- Add tips to your widgets -- module Graphics.UI.Gtk.Misc.Tooltips ( --- * Description +-- * Detail -- -- | Tooltips are the messages that appear next to a widget when the mouse -- pointer is held over it for a short amount of time. They are especially @@ -97,51 +97,62 @@ -- | Create a new goup of 'Tooltips'. -- tooltipsNew :: IO Tooltips -tooltipsNew = makeNewObject mkTooltips $ - liftM castPtr {#call unsafe tooltips_new#} +tooltipsNew = + makeNewObject mkTooltips $ liftM castPtr $ + {# call unsafe tooltips_new #} -------------------- -- Methods --- | Display the help the 'Tooltips' group --- provides. +-- | Allows the user to see your tooltips as they navigate your application. -- -tooltipsEnable :: TooltipsClass t => t -> IO () -tooltipsEnable t = {#call unsafe tooltips_enable#} (toTooltips t) +tooltipsEnable :: TooltipsClass self => self -> IO () +tooltipsEnable self = + {# call unsafe tooltips_enable #} + (toTooltips self) --- | Disable 'Tooltips' group. --- --- * Causes all tooltips in tooltips to become inactive. Any widgets that have --- tips associated with that group will no longer display their tips until --- they are enabled again with 'tooltipsEnable'. +-- | Causes all tooltips in @tooltips@ to become inactive. Any widgets that +-- have tips associated with that group will no longer display their tips until +-- they are enabled again with 'tooltipsEnable'. -- -tooltipsDisable :: TooltipsClass t => t -> IO () -tooltipsDisable t = {#call unsafe tooltips_disable#} (toTooltips t) +tooltipsDisable :: TooltipsClass self => self -> IO () +tooltipsDisable self = + {# call unsafe tooltips_disable #} + (toTooltips self) #ifndef DISABLE_DEPRECATED --- | Sets the time between the user moving the mouse --- over a widget and the widget's tooltip appearing. +-- | Sets the time between the user moving the mouse over a widget and the +-- widget's tooltip appearing. -- --- * The @time@ parameter is in ms. +-- * Warning: this function is deprecated and should not be used in +-- newly-written code. -- -tooltipsSetDelay :: TooltipsClass t => t -> Int -> IO () -tooltipsSetDelay t time = {#call unsafe tooltips_set_delay#} - (toTooltips t) (fromIntegral time) +tooltipsSetDelay :: TooltipsClass self => self + -> Int -- ^ @delay@ - the delay in milliseconds + -> IO () +tooltipsSetDelay self delay = + {# call unsafe tooltips_set_delay #} + (toTooltips self) + (fromIntegral delay) #endif --- | Adds a tooltip containing the message tipText to --- the specified GtkWidget. --- --- * The @tipPrivate@ parameter is meant to give a thorough --- explaination. This might someday be accessible to a questionmark cursor --- (like MS Windows). +-- | Adds a tooltip containing the message @tipText@ to the specified +-- 'Widget'. -- -tooltipsSetTip :: (TooltipsClass t, WidgetClass w) => t -> w -> String -> - String -> IO () -tooltipsSetTip t w tipText tipPrivate = - withUTFString tipPrivate $ \priPtr -> - withUTFString tipText $ \txtPtr -> - {#call unsafe tooltips_set_tip#} (toTooltips t) (toWidget w) txtPtr priPtr +tooltipsSetTip :: (TooltipsClass self, WidgetClass widget) => self + -> widget -- ^ @widget@ - the 'Widget' you wish to associate the tip with. + -> String -- ^ @tipText@ - a string containing the tip itself. + -> String -- ^ @tipPrivate@ - a string of any further information that may be + -- useful if the user gets stuck. + -> IO () +tooltipsSetTip self widget tipText tipPrivate = + withUTFString tipPrivate $ \tipPrivatePtr -> + withUTFString tipText $ \tipTextPtr -> + {# call unsafe tooltips_set_tip #} + (toTooltips self) + (toWidget widget) + tipTextPtr + tipPrivatePtr {#pointer * TooltipsData#} Index: Viewport.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/Viewport.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Viewport.chs 13 Mar 2005 19:34:35 -0000 1.4 +++ Viewport.chs 16 Mar 2005 01:42:47 -0000 1.5 @@ -86,53 +86,77 @@ -------------------- -- Constructors --- | Create a new 'Viewport'. +-- | Creates a new 'Viewport' with the given adjustments. -- -viewportNew :: Adjustment -> Adjustment -> IO Viewport -viewportNew vAdj hAdj = makeNewObject mkViewport $ liftM castPtr $ - {#call unsafe viewport_new#} hAdj vAdj +viewportNew :: + Adjustment -- ^ @hadjustment@ - horizontal adjustment. + -> Adjustment -- ^ @vadjustment@ - vertical adjustment. + -> IO Viewport +viewportNew hadjustment vadjustment = + makeNewObject mkViewport $ liftM castPtr $ + {# call unsafe viewport_new #} + hadjustment + vadjustment -------------------- -- Methods --- | Retrieve the horizontal --- 'Adjustment' of the 'Viewport'. +-- | Returns the horizontal adjustment of the viewport. -- -viewportGetHAdjustment :: ViewportClass v => v -> IO Adjustment -viewportGetHAdjustment v = makeNewObject mkAdjustment $ - {#call unsafe viewport_get_hadjustment#} (toViewport v) +viewportGetHAdjustment :: ViewportClass self => self + -> IO Adjustment +viewportGetHAdjustment self = + makeNewObject mkAdjustment $ + {# call unsafe viewport_get_hadjustment #} + (toViewport self) --- | Retrieve the vertical 'Adjustment' --- of the 'Viewport'. +-- | Returns the vertical adjustment of the viewport. -- -viewportGetVAdjustment :: ViewportClass v => v -> IO Adjustment -viewportGetVAdjustment v = makeNewObject mkAdjustment $ - {#call unsafe viewport_get_vadjustment#} (toViewport v) +viewportGetVAdjustment :: ViewportClass self => self + -> IO Adjustment +viewportGetVAdjustment self = + makeNewObject mkAdjustment $ + {# call unsafe viewport_get_vadjustment #} + (toViewport self) --- | Set the horizontal 'Adjustment' of --- the 'Viewport'. +-- | Sets the horizontal adjustment of the viewport. -- -viewportSetHAdjustment :: ViewportClass v => v -> Adjustment -> IO () -viewportSetHAdjustment v adj = {#call viewport_set_hadjustment#} - (toViewport v) adj +viewportSetHAdjustment :: ViewportClass self => self + -> Adjustment + -> IO () +viewportSetHAdjustment self adjustment = + {# call viewport_set_hadjustment #} + (toViewport self) + adjustment --- | Set the vertical 'Adjustment' of the 'Viewport'. +-- | Sets the vertical adjustment of the viewport. -- -viewportSetVAdjustment :: ViewportClass v => v -> Adjustment -> IO () -viewportSetVAdjustment v adj = {#call viewport_set_vadjustment#} - (toViewport v) adj +viewportSetVAdjustment :: ViewportClass self => self + -> Adjustment + -> IO () +viewportSetVAdjustment self adjustment = + {# call viewport_set_vadjustment #} + (toViewport self) + adjustment --- | Specify if and how an outer frame should be drawn around the child. +-- | Sets the shadow type of the viewport. -- -viewportSetShadowType :: ViewportClass v => v -> ShadowType -> IO () -viewportSetShadowType v st = {#call viewport_set_shadow_type#} (toViewport v) - ((fromIntegral.fromEnum) st) +viewportSetShadowType :: ViewportClass self => self + -> ShadowType -- ^ @type@ - the new shadow type. + -> IO () +viewportSetShadowType self type_ = + {# call viewport_set_shadow_type #} + (toViewport self) + ((fromIntegral . fromEnum) type_) --- | Get the current shadow type of the 'Viewport'. +-- | Gets the shadow type of the 'Viewport'. See 'viewportSetShadowType'. -- -viewportGetShadowType :: ViewportClass v => v -> IO ShadowType -viewportGetShadowType v = liftM (toEnum.fromIntegral) $ - {#call unsafe viewport_get_shadow_type#} (toViewport v) +viewportGetShadowType :: ViewportClass self => self + -> IO ShadowType -- ^ returns the shadow type +viewportGetShadowType self = + liftM (toEnum . fromIntegral) $ + {# call unsafe viewport_get_shadow_type #} + (toViewport self) -------------------- -- Properties Index: Calendar.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/Calendar.chs.pp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Calendar.chs.pp 25 Feb 2005 01:11:35 -0000 1.3 +++ Calendar.chs.pp 16 Mar 2005 01:42:46 -0000 1.4 @@ -24,10 +24,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- Display a calendar and\/or allow the user to select a date. +-- Displays a calendar and allows the user to select a date -- module Graphics.UI.Gtk.Misc.Calendar ( --- * Description +-- * Detail -- -- | 'Calendar' is a widget that displays a calendar, one month at a time. It -- can be created with 'calendarNew'. @@ -110,108 +110,143 @@ -------------------- -- Constructors --- | Create a new calendar widget. --- --- * No sensible date will be set. +-- | Creates a new calendar, with the current date being selected. -- calendarNew :: IO Calendar -calendarNew = makeNewObject mkCalendar $ - liftM castPtr {#call unsafe calendar_new#} +calendarNew = + makeNewObject mkCalendar $ liftM castPtr $ + {# call unsafe calendar_new #} -------------------- -- Methods --- | Flip the page to a month , 0 is January,.., 11 --- is December. --- --- * Returns True if the operation succeeded. +-- | Shifts the calendar to a different month. -- -calendarSelectMonth :: CalendarClass c => c -> Int -> Int -> IO Bool -calendarSelectMonth cal month year = liftM toBool $ - {#call calendar_select_month#} (toCalendar cal) (fromIntegral month) - (fromIntegral year) +calendarSelectMonth :: CalendarClass self => self + -> Int -- ^ @month@ - a month number between 0 and 11. + -> Int -- ^ @year@ - the year the month is in. + -> IO Bool -- ^ returns @True@ if the operation succeeded. +calendarSelectMonth self month year = + liftM toBool $ + {# call calendar_select_month #} + (toCalendar self) + (fromIntegral month) + (fromIntegral year) --- | Shift to a day, counted form 1 to 31 (depending --- on the month of course). +-- | Selects a day from the current month. -- -calendarSelectDay :: CalendarClass c => c -> Int -> IO () -calendarSelectDay cal day = - {#call calendar_select_day#} (toCalendar cal) (fromIntegral day) +calendarSelectDay :: CalendarClass self => self + -> Int -- ^ @day@ - the day number between 1 and 31, or 0 to unselect the + -- currently selected day. + -> IO () +calendarSelectDay self day = + {# call calendar_select_day #} + (toCalendar self) + (fromIntegral day) --- | Mark (select) a day in the current month. --- --- * Returns True if the argument was within bounds and the day was previously --- deselected. +-- | Places a visual marker on a particular day. -- -calendarMarkDay :: CalendarClass c => c -> Int -> IO Bool -calendarMarkDay cal day = liftM toBool $ - {#call calendar_mark_day#} (toCalendar cal) (fromIntegral day) +calendarMarkDay :: CalendarClass self => self + -> Int -- ^ @day@ - the day number to mark between 1 and 31. + -> IO Bool -- ^ returns @True@ if the argument was within bounds and the day + -- was previously deselected. +calendarMarkDay self day = + liftM toBool $ + {# call calendar_mark_day #} + (toCalendar self) + (fromIntegral day) --- | Unmark (deselect) a day in the current month. --- --- * Returns True if the argument was within bounds and the day was previously --- selected. +-- | Removes the visual marker from a particular day. -- -calendarUnmarkDay :: CalendarClass c => c -> Int -> IO Bool -calendarUnmarkDay cal day = liftM toBool $ - {#call calendar_unmark_day#} (toCalendar cal) (fromIntegral day) +calendarUnmarkDay :: CalendarClass self => self + -> Int -- ^ @day@ - the day number to unmark between 1 and 31. + -> IO Bool -- ^ returns @True@ if the argument was within bounds and the day + -- was previously selected. +calendarUnmarkDay self day = + liftM toBool $ + {# call calendar_unmark_day #} + (toCalendar self) + (fromIntegral day) --- | Unmark every day in the current page. +-- | Remove all visual markers. -- -calendarClearMarks :: CalendarClass c => c -> IO () -calendarClearMarks cal = {#call calendar_clear_marks#} (toCalendar cal) +calendarClearMarks :: CalendarClass self => self -> IO () +calendarClearMarks self = + {# call calendar_clear_marks #} + (toCalendar self) #if GTK_CHECK_VERSION(2,4,0) --- | Specifies how the calendar should be displayed. +-- | Sets display options (whether to display the heading and the month +-- headings). -- -calendarSetDisplayOptions :: CalendarClass c => c - -> [CalendarDisplayOptions] -> IO () -calendarSetDisplayOptions cal opts = - {#call calendar_set_display_options#} (toCalendar cal) - ((fromIntegral.fromFlags) opts) +-- * Available since Gtk version 2.4 +-- +calendarSetDisplayOptions :: CalendarClass self => self + -> [CalendarDisplayOptions] + -> IO () +calendarSetDisplayOptions self flags = + {# call calendar_set_display_options #} + (toCalendar self) + ((fromIntegral . fromFlags) flags) -- | Returns the current display options for the calendar. -- -calendarGetDisplayOptions :: CalendarClass c => c - -> IO [CalendarDisplayOptions] -calendarGetDisplayOptions cal = liftM (toFlags.fromIntegral) $ - {#call calendar_get_display_options#} (toCalendar cal) - --- | Depreciaded, use 'calendarSetDisplayOptions'. +-- * Available since Gtk version 2.4 -- -calendarDisplayOptions :: CalendarClass c => c - -> [CalendarDisplayOptions] -> IO () -calendarDisplayOptions = calendarSetDisplayOptions -#else +calendarGetDisplayOptions :: CalendarClass self => self + -> IO [CalendarDisplayOptions] +calendarGetDisplayOptions self = + liftM (toFlags . fromIntegral) $ + {# call calendar_get_display_options #} + (toCalendar self) +#endif --- | Specifies how the calendar should be displayed. +#ifndef DISABLE_DEPRECATED +-- | Sets display options (whether to display the heading and the month +-- headings). -- -calendarDisplayOptions :: CalendarClass c => c -> [CalendarDisplayOptions] -> - IO () -calendarDisplayOptions cal opts = {#call calendar_display_options#} - (toCalendar cal) ((fromIntegral.fromFlags) opts) +-- * Warning: this function is deprecated and should not be used in +-- newly-written code. Use 'calendarSetDisplayOptions' instead. +-- +calendarDisplayOptions :: CalendarClass self => self + -> [CalendarDisplayOptions] + -> IO () +calendarDisplayOptions self flags = + {# call calendar_display_options #} + (toCalendar self) + ((fromIntegral . fromFlags) flags) #endif -- | Retrieve the currently selected date. -- --- * Returns (year, month, day) of the selection. --- -calendarGetDate :: CalendarClass c => c -> IO (Int,Int,Int) -calendarGetDate cal = alloca $ \yearPtr -> alloca $ \monthPtr -> +calendarGetDate :: CalendarClass self => self + -> IO (Int,Int,Int) -- ^ @(year, month, day)@ +calendarGetDate self = + alloca $ \yearPtr -> + alloca $ \monthPtr -> alloca $ \dayPtr -> do - {#call unsafe calendar_get_date#} (toCalendar cal) yearPtr monthPtr dayPtr - year <- liftM fromIntegral $ peek yearPtr - month <- liftM fromIntegral $ peek monthPtr - day <- liftM fromIntegral $ peek dayPtr - return (year,month,day) + {# call unsafe calendar_get_date #} + (toCalendar self) + yearPtr + monthPtr + dayPtr + year <- liftM fromIntegral $ peek yearPtr + month <- liftM fromIntegral $ peek monthPtr + day <- liftM fromIntegral $ peek dayPtr + return (year,month,day) --- | Freeze the calender for several update operations. +-- | Freeze the calender for several update operations. This prevents flicker +-- that would otherwise result from a series of updates to the calendar. -- -calendarFreeze :: CalendarClass c => c -> IO a -> IO a -calendarFreeze cal update = do - {#call unsafe calendar_freeze#} (toCalendar cal) +calendarFreeze :: CalendarClass self => self + -> IO a -- ^ An action that performs several update operations on the + -- calendar. After the action finnishes all the changes made by it + -- are displayed. + -> IO a +calendarFreeze self update = do + {# call unsafe calendar_freeze #} (toCalendar self) res <- update - {#call calendar_thaw#} (toCalendar cal) + {# call calendar_thaw #} (toCalendar self) return res -------------------- @@ -267,5 +302,3 @@ onPrevYear, afterPrevYear :: CalendarClass c => c -> IO () -> IO (ConnectId c) onPrevYear = connect_NONE__NONE "prev-year" False afterPrevYear = connect_NONE__NONE "prev-year" True - - Index: SizeGroup.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Misc/SizeGroup.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- SizeGroup.chs 13 Mar 2005 19:34:35 -0000 1.5 +++ SizeGroup.chs 16 Mar 2005 01:42:46 -0000 1.6 @@ -27,7 +27,7 @@ -- Grouping widgets so they request the same size -- module Graphics.UI.Gtk.Misc.SizeGroup ( --- * Description +-- * Detail -- -- | 'SizeGroup' provides a mechanism for grouping a number of widgets -- together so they all request the same amount of space. This is typically @@ -95,47 +95,65 @@ -------------------- -- Constructors --- | Create a new SizeGroup. +-- | Create a new 'SizeGroup'. -- -sizeGroupNew :: SizeGroupMode -> IO SizeGroup -sizeGroupNew mode = makeNewGObject mkSizeGroup $ - {#call unsafe size_group_new#} ((fromIntegral.fromEnum) mode) +sizeGroupNew :: + SizeGroupMode -- ^ @mode@ - the mode for the new size group. + -> IO SizeGroup +sizeGroupNew mode = + makeNewGObject mkSizeGroup $ + {# call unsafe size_group_new #} + ((fromIntegral . fromEnum) mode) -------------------- -- Methods --- | Adds a widget to a SizeGroup. In the future, the requisition of the widget --- will be determined as the maximum of its requisition and the requisition of --- the other widgets in the size group. Whether this applies horizontally, --- vertically, or in both directions depends on the mode of the size group. See --- 'sizeGroupSetMode'. +-- | Adds a widget to a 'SizeGroup'. In the future, the requisition of the +-- widget will be determined as the maximum of its requisition and the +-- requisition of the other widgets in the size group. Whether this applies +-- horizontally, vertically, or in both directions depends on the mode of the +-- size group. See 'sizeGroupSetMode'. -- -sizeGroupAddWidget :: (SizeGroupClass obj, WidgetClass widget) => obj - -> widget -> IO () -sizeGroupAddWidget obj widget = - {#call size_group_add_widget#} (toSizeGroup obj) (toWidget widget) +sizeGroupAddWidget :: (SizeGroupClass self, WidgetClass widget) => self + -> widget -- ^ @widget@ - the 'Widget' to add + -> IO () +sizeGroupAddWidget self widget = + {# call size_group_add_widget #} + (toSizeGroup self) + (toWidget widget) --- | Gets the current mode of the size group. +-- | Gets the current mode of the size group. See 'sizeGroupSetMode'. -- -sizeGroupGetMode :: SizeGroupClass obj => obj -> IO SizeGroupMode -sizeGroupGetMode obj = liftM (toEnum.fromIntegral) $ - {#call unsafe size_group_get_mode#} (toSizeGroup obj) +sizeGroupGetMode :: SizeGroupClass self => self + -> IO SizeGroupMode -- ^ returns the current mode of the size group. +sizeGroupGetMode self = + liftM (toEnum . fromIntegral) $ + {# call unsafe size_group_get_mode #} + (toSizeGroup self) --- | Removes the widget from the SizeGroup. +-- | Removes a widget from a 'SizeGroup'. -- -sizeGroupRemoveWidget :: (SizeGroupClass obj, WidgetClass widget) => obj -> widget -> IO () -sizeGroupRemoveWidget obj widget = - {#call size_group_remove_widget#} (toSizeGroup obj) (toWidget widget) +sizeGroupRemoveWidget :: (SizeGroupClass self, WidgetClass widget) => self + -> widget -- ^ @widget@ - the 'Widget' to remove + -> IO () +sizeGroupRemoveWidget self widget = + {# call size_group_remove_widget #} + (toSizeGroup self) + (toWidget widget) -- | Sets the 'SizeGroupMode' of the size group. The mode of the size group -- determines whether the widgets in the size group should all have the same --- horizontal requisition 'sizeGroupModeHorizontal' all have the same vertical --- requisition 'sizeGroupModeVertical', or should all have the same requisition --- in both directions 'sizeGroupModeBoth'. +-- horizontal requisition 'SizeGroupModeHorizontal' all have the same vertical +-- requisition 'SizeGroupModeVertical', or should all have the same requisition +-- in both directions 'SizeGroupModeBoth'. -- -sizeGroupSetMode :: SizeGroupClass obj => obj -> SizeGroupMode -> IO () -sizeGroupSetMode obj mode = - {#call size_group_set_mode#} (toSizeGroup obj) ((fromIntegral.fromEnum) mode) +sizeGroupSetMode :: SizeGroupClass self => self + -> SizeGroupMode -- ^ @mode@ - the mode to set for the size group. + -> IO () +sizeGroupSetMode self mode = + {# call size_group_set_mode #} + (toSizeGroup self) + ((fromIntegral . fromEnum) mode) -------------------- -- Properties |
From: Duncan C. <dun...@us...> - 2005-03-15 20:34:02
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/General In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13902/gtk/Graphics/UI/Gtk/General Modified Files: Structs.hsc General.chs Log Message: Structs.hsc: Define priorityHigh and priorityDefault as the correct C constants. Add priorityHighIdle and priorityDefaultIdle. General.chs: Export the two extra priority values. Add timeoutAddFull binding which is like timeoutAdd but allows you to specift the priority. Redfine timeoutAdd in terms of timeoutAddFull. Add more extensive documentation for both functions. Fix the documentation of idleAdd to reccomend the right priority. Index: General.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/General/General.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- General.chs 27 Feb 2005 19:42:06 -0000 1.4 +++ General.chs 15 Mar 2005 20:33:47 -0000 1.5 @@ -41,9 +41,12 @@ grabGetCurrent, grabRemove, priorityLow, + priorityDefaultIdle, + priorityHighIdle, priorityDefault, priorityHigh, timeoutAdd, + timeoutAddFull, timeoutRemove, idleAdd, idleRemove, @@ -62,7 +65,9 @@ {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.Enums (InputCondition(..)) -import Graphics.UI.Gtk.General.Structs (priorityLow, priorityDefault, priorityHigh) +import Graphics.UI.Gtk.General.Structs (priorityLow, priorityDefaultIdle, + priorityHighIdle, priorityDefault, + priorityHigh) {#context lib="gtk" prefix ="gtk"#} @@ -194,16 +199,40 @@ dPtr <- mkFunPtrDestructor funPtr return (funPtr, dPtr) --- | Register a function that is to be called after --- @interval@ ms have been elapsed. +-- | Sets a function to be called at regular intervals, with the default +-- priority 'priorityDefault'. The function is called repeatedly until it +-- returns @False@, after which point the timeout function will not be called +-- again. The first call to the function will be at the end of the first interval. -- --- * If the function returns @False@ it will be removed. +-- Note that timeout functions may be delayed, due to the processing of other +-- event sources. Thus they should not be relied on for precise timing. After +-- each call to the timeout function, the time of the next timeout is +-- recalculated based on the current time and the given interval (it does not +-- try to 'catch up' time lost in delays). -- timeoutAdd :: IO Bool -> Int -> IO HandlerId -timeoutAdd fun msec = do +timeoutAdd fun msec = timeoutAddFull fun priorityDefault msec + +-- | Sets a function to be called at regular intervals, with the given +-- priority. The function is called repeatedly until it returns @False@, after +-- which point the timeout function will not be called again. The first call +-- to the function will be at the end of the first interval. +-- +-- Note that timeout functions may be delayed, due to the processing of other +-- event sources. Thus they should not be relied on for precise timing. After +-- each call to the timeout function, the time of the next timeout is +-- recalculated based on the current time and the given interval (it does not +-- try to 'catch up' time lost in delays). +-- +timeoutAddFull :: IO Bool -> Int -> Int -> IO HandlerId +timeoutAddFull fun pri msec = do (funPtr, dPtr) <- makeCallback (liftM fromBool fun) - {#call unsafe g_timeout_add_full#} (fromIntegral priorityDefault) - (fromIntegral msec) funPtr nullPtr dPtr + {#call unsafe g_timeout_add_full#} + (fromIntegral pri) + (fromIntegral msec) + funPtr + nullPtr + dPtr -- | Remove a previously added timeout handler by its -- 'TimeoutId'. @@ -215,7 +244,7 @@ -- idle. -- -- * A priority can be specified via an integer. This should usually be --- 'priorityDefault'. +-- 'priorityDefaultIdle'. -- -- * If the function returns @False@ it will be removed. -- Index: Structs.hsc =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/General/Structs.hsc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Structs.hsc 12 Feb 2005 17:19:23 -0000 1.2 +++ Structs.hsc 15 Mar 2005 20:33:46 -0000 1.3 @@ -82,6 +82,8 @@ comboGetList, #endif priorityLow, + priorityDefaultIdle, + priorityHighIdle, priorityDefault, priorityHigh, drawingAreaGetDrawWindow, @@ -612,10 +614,16 @@ -- | For installing idle callbacks: Priorities. -- priorityHigh :: Int -priorityHigh = #const G_PRIORITY_HIGH_IDLE +priorityHigh = #const G_PRIORITY_HIGH priorityDefault :: Int -priorityDefault = #const G_PRIORITY_DEFAULT_IDLE +priorityDefault = #const G_PRIORITY_DEFAULT + +priorityHighIdle :: Int +priorityHighIdle = #const G_PRIORITY_HIGH_IDLE + +priorityDefaultIdle :: Int +priorityDefaultIdle = #const G_PRIORITY_DEFAULT_IDLE priorityLow :: Int priorityLow = #const G_PRIORITY_LOW |
From: Duncan C. <dun...@us...> - 2005-03-15 20:33:58
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13902 Modified Files: ChangeLog Log Message: Structs.hsc: Define priorityHigh and priorityDefault as the correct C constants. Add priorityHighIdle and priorityDefaultIdle. General.chs: Export the two extra priority values. Add timeoutAddFull binding which is like timeoutAdd but allows you to specift the priority. Redfine timeoutAdd in terms of timeoutAddFull. Add more extensive documentation for both functions. Fix the documentation of idleAdd to reccomend the right priority. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.387 retrieving revision 1.388 diff -u -d -r1.387 -r1.388 --- ChangeLog 15 Mar 2005 20:19:52 -0000 1.387 +++ ChangeLog 15 Mar 2005 20:33:44 -0000 1.388 @@ -26,6 +26,16 @@ gtk/Graphics/UI/Gtk/Entry/VScale.chs: documentation changes and code formatting changes. + * gtk/Graphics/UI/Gtk/General/Structs.hsc: Define priorityHigh and + priorityDefault as the correct C constants. Add priorityHighIdle and + priorityDefaultIdle. + + * gtk/Graphics/UI/Gtk/General/General.chs: export the two extra + priority values. Add timeoutAddFull binding which is like timeoutAdd + but allows you to specift the priority. Redfine timeoutAdd in terms of + timeoutAddFull. Add more extensive documentation for both functions. + Fix the documentation of idleAdd to reccomend the right priority. + 2005-03-14 Duncan Coutts <du...@co...> * gtk/Graphics/UI/Gtk/Gdk/Region.chs.pp: segfault bug fix. Clear up |
From: Duncan C. <dun...@us...> - 2005-03-15 20:20:10
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11157 Modified Files: ChangeLog Log Message: Cocumentation changes and code formatting changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.386 retrieving revision 1.387 diff -u -d -r1.386 -r1.387 --- ChangeLog 15 Mar 2005 19:59:07 -0000 1.386 +++ ChangeLog 15 Mar 2005 20:19:52 -0000 1.387 @@ -18,7 +18,8 @@ gtk/Graphics/UI/Gtk/Display/Statusbar.chs: documentation changes and code formatting changes. - * gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp, + * gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp, + gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp, gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp, gtk/Graphics/UI/Gtk/Entry/HScale.chs, gtk/Graphics/UI/Gtk/Entry/SpinButton.chs, |
From: Duncan C. <dun...@us...> - 2005-03-15 20:20:06
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11157/gtk/Graphics/UI/Gtk/Entry Modified Files: Editable.chs.pp Log Message: Cocumentation changes and code formatting changes. Index: Editable.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Entry/Editable.chs.pp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Editable.chs.pp 13 Mar 2005 19:34:33 -0000 1.5 +++ Editable.chs.pp 15 Mar 2005 20:19:56 -0000 1.6 @@ -29,11 +29,10 @@ -- Stability : provisional -- Portability : portable (depends on GHC) -- --- This is an interface for simple single-line text editing widgets. It is --- implemented by 'Entry' and 'SpinButton'. +-- Interface for text-editing widgets -- module Graphics.UI.Gtk.Entry.Editable ( --- * Description +-- * Detail -- -- | The 'Editable' interface is an interface which should be implemented by -- text editing widgets, such as 'Entry'. @@ -99,113 +98,167 @@ -------------------- -- Methods --- | Select a span of text. --- --- * A negative @end@ position will make the selection extend to the --- end of the buffer. +-- | Selects a region of text. The characters that are selected are those +-- characters at positions from @startPos@ up to, but not including @endPos@. +-- If @endPos@ is negative, then the the characters selected will be those +-- characters from @startPos@ to the end of the text. -- --- * Calling this function with @start@=1 and @end@=4 it will --- mark \"ask\" in the string \"Haskell\". (FIXME: verify) +-- Calling this function with @start@=1 and @end@=4 it will mark \"ask\" in +-- the string \"Haskell\". (FIXME: verify) -- -editableSelectRegion :: EditableClass ed => ed -> Int -> Int -> IO () -editableSelectRegion ed start end = - {#call editable_select_region#} (toEditable ed) - (fromIntegral start) (fromIntegral end) +editableSelectRegion :: EditableClass self => self + -> Int -- ^ @start@ - the starting position. + -> Int -- ^ @end@ - the end position. + -> IO () +editableSelectRegion self start end = + {# call editable_select_region #} + (toEditable self) + (fromIntegral start) + (fromIntegral end) --- | Get the span of the current selection. --- --- * The returned tuple is not ordered. The second index represents the --- position of the cursor. The first index is the other end of the --- selection. If both numbers are equal there is in fact no selection. +-- | Gets the current selection bounds, if there is a selection. -- -editableGetSelectionBounds :: EditableClass ed => ed -> IO (Int,Int) -editableGetSelectionBounds ed = alloca $ \startPtr -> alloca $ \endPtr -> do - {#call unsafe editable_get_selection_bounds#} (toEditable ed) startPtr endPtr +editableGetSelectionBounds :: EditableClass self => self + -> IO (Int,Int) -- ^ @(start, end)@ - the starting and end positions. This + -- pair is not ordered. The @end@ index represents the + -- position of the cursor. The @start@ index is the other end + -- of the selection. If both numbers are equal there is in + -- fact no selection. +editableGetSelectionBounds self = + alloca $ \startPtr -> + alloca $ \endPtr -> do + {# call unsafe editable_get_selection_bounds #} + (toEditable self) + startPtr + endPtr start <- liftM fromIntegral $ peek startPtr end <- liftM fromIntegral $ peek endPtr return (start,end) --- | Insert new text at the specified position. --- --- * If the position is invalid the text will be inserted at the end of the --- buffer. The returned value reflects the actual insertion point. +-- | Inserts text at a given position. -- -editableInsertText :: EditableClass ed => ed -> String -> Int -> IO Int -editableInsertText ed str pos = withObject (fromIntegral pos) $ \posPtr -> - withUTFStringLen str $ \(strPtr,len) -> do - {#call editable_insert_text#} (toEditable ed) strPtr (fromIntegral len) - posPtr - liftM fromIntegral $ peek posPtr +editableInsertText :: EditableClass self => self + -> String -- ^ @newText@ - the text to insert. + -> Int -- ^ @position@ - the position at which to insert the text. + -> IO Int -- ^ returns the position after the newly inserted text. +editableInsertText self newText position = + withObject (fromIntegral position) $ \positionPtr -> + withUTFStringLen newText $ \(newTextPtr, newTextLength) -> do + {# call editable_insert_text #} + (toEditable self) + newTextPtr + (fromIntegral newTextLength) + positionPtr + liftM fromIntegral $ peek positionPtr --- | Delete a given range of text. --- --- * If the @end@ position is invalid, it is set to the lenght of the --- buffer. --- --- * @start@ is restricted to 0..@end@. +-- | Deletes a sequence of characters. The characters that are deleted are +-- those characters at positions from @startPos@ up to, but not including +-- @endPos@. If @endPos@ is negative, then the the characters deleted will be +-- those characters from @startPos@ to the end of the text. -- -editableDeleteText :: EditableClass ed => ed -> Int -> Int -> IO () -editableDeleteText ed start end = {#call editable_delete_text#} (toEditable ed) - (fromIntegral start) (fromIntegral end) +editableDeleteText :: EditableClass self => self + -> Int -- ^ @startPos@ - the starting position. + -> Int -- ^ @endPos@ - the end position. + -> IO () +editableDeleteText self startPos endPos = + {# call editable_delete_text #} + (toEditable self) + (fromIntegral startPos) + (fromIntegral endPos) --- | Retrieve a range of characters. --- --- * Set @end@ to a negative value to reach the end of the buffer. +-- | Retrieves a sequence of characters. The characters that are retrieved are +-- those characters at positions from @startPos@ up to, but not including +-- @endPos@. If @endPos@ is negative, then the the characters retrieved will be +-- those characters from @startPos@ to the end of the text. -- -editableGetChars :: EditableClass ed => ed -> Int -> Int -> IO String -editableGetChars ed start end = do - strPtr <- {#call unsafe editable_get_chars#} (toEditable ed) - (fromIntegral start) (fromIntegral end) - str <- peekUTFString strPtr - {#call unsafe g_free#} (castPtr strPtr) - return str +editableGetChars :: EditableClass self => self + -> Int -- ^ @startPos@ - the starting position. + -> Int -- ^ @endPos@ - the end position. + -> IO String -- ^ returns the characters in the indicated region. +editableGetChars self startPos endPos = + {# call unsafe editable_get_chars #} + (toEditable self) + (fromIntegral startPos) + (fromIntegral endPos) + >>= readUTFString --- | Cut the selected characters to the Clipboard. +-- | Causes the characters in the current selection to be copied to the +-- clipboard and then deleted from the widget. -- -editableCutClipboard :: EditableClass ed => ed -> IO () -editableCutClipboard = {#call editable_cut_clipboard#}.toEditable +editableCutClipboard :: EditableClass self => self -> IO () +editableCutClipboard self = + {# call editable_cut_clipboard #} + (toEditable self) --- | Copy the selected characters to the Clipboard. +-- | Causes the characters in the current selection to be copied to the +-- clipboard. -- -editableCopyClipboard :: EditableClass ed => ed -> IO () -editableCopyClipboard = {#call editable_copy_clipboard#}.toEditable +editableCopyClipboard :: EditableClass self => self -> IO () +editableCopyClipboard self = + {# call editable_copy_clipboard #} + (toEditable self) --- | Paste the selected characters to the --- Clipboard. +-- | Causes the contents of the clipboard to be pasted into the given widget +-- at the current cursor position. -- -editablePasteClipboard :: EditableClass ed => ed -> IO () -editablePasteClipboard = {#call editable_paste_clipboard#}.toEditable +editablePasteClipboard :: EditableClass self => self -> IO () +editablePasteClipboard self = + {# call editable_paste_clipboard #} + (toEditable self) --- | Delete the current selection. +-- | Deletes the current contents of the widgets selection and disclaims the +-- selection. -- -editableDeleteSelection :: EditableClass ed => ed -> IO () -editableDeleteSelection = {#call editable_delete_selection#}.toEditable +editableDeleteSelection :: EditableClass self => self -> IO () +editableDeleteSelection self = + {# call editable_delete_selection #} + (toEditable self) --- | Set the cursor to a specific position. +-- | Sets the cursor position. -- -editableSetPosition :: EditableClass ed => ed -> Int -> IO () -editableSetPosition ed pos = - {#call editable_set_position#} (toEditable ed) (fromIntegral pos) +editableSetPosition :: EditableClass self => self + -> Int -- ^ @position@ - the position of the cursor. The cursor is + -- displayed before the character with the given (base 0) index in + -- the widget. The value must be less than or equal to the number of + -- characters in the widget. A value of -1 indicates that the + -- position should be set after the last character in the entry. + -> IO () +editableSetPosition self position = + {# call editable_set_position #} + (toEditable self) + (fromIntegral position) --- | Get the current cursor position. +-- | Retrieves the current cursor position. -- -editableGetPosition :: EditableClass ed => ed -> IO Int -editableGetPosition ed = liftM fromIntegral $ - {#call unsafe editable_get_position#} (toEditable ed) +editableGetPosition :: EditableClass self => self + -> IO Int -- ^ returns the position of the cursor. The cursor is displayed + -- before the character with the given (base 0) index in the widget. + -- The value will be less than or equal to the number of characters + -- in the widget. Note that this position is in characters, not in + -- bytes. +editableGetPosition self = + liftM fromIntegral $ + {# call unsafe editable_get_position #} + (toEditable self) --- | Make the widget insensitive. --- --- * Called with False will make the text uneditable. +-- | Determines if the user can edit the text in the editable widget or not. -- -editableSetEditable :: EditableClass ed => ed -> Bool -> IO () -editableSetEditable ed isEditable = {#call editable_set_editable#} - (toEditable ed) (fromBool isEditable) +editableSetEditable :: EditableClass self => self + -> Bool -- ^ @isEditable@ - @True@ if the user is allowed to edit the text + -- in the widget. + -> IO () +editableSetEditable self isEditable = + {# call editable_set_editable #} + (toEditable self) + (fromBool isEditable) --- | Retrieves whether the text is editable. +-- | Retrieves whether the text is editable. See 'editableSetEditable'. -- -editableGetEditable :: EditableClass ed => ed -> IO Bool -editableGetEditable ed = - liftM toBool $ {#call editable_get_editable#} (toEditable ed) +editableGetEditable :: EditableClass self => self -> IO Bool +editableGetEditable self = + liftM toBool $ + {# call editable_get_editable #} + (toEditable self) -------------------- -- Properties @@ -238,8 +291,9 @@ -- | Emitted when a piece of text is deleted from the 'Editable' widget. -- -onDeleteText, afterDeleteText :: EditableClass ec => ec -> - (Int -> Int -> IO ()) -> IO (ConnectId ec) +onDeleteText, afterDeleteText :: EditableClass self => self + -> (Int -> Int -> IO ()) -- ^ @(\startPos endPos -> ...)@ + -> IO (ConnectId self) onDeleteText = connect_INT_INT__NONE "delete_text" False afterDeleteText = connect_INT_INT__NONE "delete_text" True |
From: Duncan C. <dun...@us...> - 2005-03-15 19:59:50
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5160 Modified Files: ChangeLog Log Message: Documentation changes and code formatting changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.385 retrieving revision 1.386 diff -u -d -r1.385 -r1.386 --- ChangeLog 15 Mar 2005 19:49:40 -0000 1.385 +++ ChangeLog 15 Mar 2005 19:59:07 -0000 1.386 @@ -11,6 +11,20 @@ * gtk/Graphics/UI/Gtk/Abstract/Range.chs: Haddock markup fixes. + * gtk/Graphics/UI/Gtk/Display/AccelLabel.chs, + gtk/Graphics/UI/Gtk/Display/Image.chs.pp, + gtk/Graphics/UI/Gtk/Display/Label.chs, + gtk/Graphics/UI/Gtk/Display/ProgressBar.chs, + gtk/Graphics/UI/Gtk/Display/Statusbar.chs: documentation changes and + code formatting changes. + + * gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp, + gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp, + gtk/Graphics/UI/Gtk/Entry/HScale.chs, + gtk/Graphics/UI/Gtk/Entry/SpinButton.chs, + gtk/Graphics/UI/Gtk/Entry/VScale.chs: documentation changes and code + formatting changes. + 2005-03-14 Duncan Coutts <du...@co...> * gtk/Graphics/UI/Gtk/Gdk/Region.chs.pp: segfault bug fix. Clear up |