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: Peter g. <pg...@co...> - 2008-10-09 12:31:03
|
Wed Oct 8 20:03:00 EDT 2008 Peter Gavin <pg...@gm...> * update tools/c2hs/base/general/Binary.hs to work with GHC 6.10 the instance for Binary Integer needed to be rewritten, because the old version used internal data for the Integer type. The new instance only uses Bits functions, so should be portable. hunk ./tools/c2hs/base/general/Binary.hs 41 +#if __GLASGOW_HASKELL__<610 hunk ./tools/c2hs/base/general/Binary.hs 46 +#endif hunk ./tools/c2hs/base/general/Binary.hs 75 +# if __GLASGOW_HASKELL__<610 hunk ./tools/c2hs/base/general/Binary.hs 77 +# else +import Control.OldException ( throwDyn ) +# endif hunk ./tools/c2hs/base/general/Binary.hs 483 +#if __GLASGOW_HASKELL__<610 hunk ./tools/c2hs/base/general/Binary.hs 559 + +#else + +instance Binary Integer where + put_ h n = do + put h ((fromIntegral $ signum n) :: Int8) + when (n /= 0) $ do + let n' = abs n + nBytes = byteSize n' + put h (fromIntegral nBytes :: Word64) + mapM_ (putByte h) [ fromIntegral ((n' `shiftR` (b * 8)) .&. 0xff) + | b <- [ nBytes-1, nBytes-2 .. 0 ] ] + where byteSize n = + let f b = if (1 `shiftL` (b * 8)) > n + then b + else f (b + 1) + in f 0 + get h = do + sign :: Int8 <- get h + if sign == 0 + then return 0 + else do + nBytes :: Word64 <- get h + n <- accumBytes nBytes 0 + return $ fromIntegral sign * n + where accumBytes nBytes acc | nBytes == 0 = return acc + | otherwise = do + b <- getByte h + accumBytes (nBytes - 1) ((acc `shiftL` 8) .|. fromIntegral b) +#endif + |
From: Peter g. <pg...@co...> - 2008-10-09 12:31:01
|
Wed Oct 8 16:13:56 EDT 2008 Peter Gavin <pg...@gm...> * add HAVE_NEW_CONTROL_EXCEPTION define to configure.ac; modify several files to import OldException when it's defined ghc 6.10 introduces a new exception system, with several functions that are different from the original Control.Exception module. This new Control.Exception module is in base>=4.0. That version moved the old exception interface to the module Control.OldException. When we get around to fixing everything for real, grepping for OldException should list the modules that need changing. move ./gnomevfs/System/Gnome/VFS/Error.hs ./gnomevfs/System/Gnome/VFS/Error.hs.pp move ./gtk/Graphics/UI/Gtk/Gdk/GC.chs ./gtk/Graphics/UI/Gtk/Gdk/GC.chs.pp hunk ./Makefile.am 583 - gtk/Graphics/UI/Gtk/Gdk/GC.chs \ + gtk/Graphics/UI/Gtk/Gdk/GC.chs.pp \ hunk ./Makefile.am 1747 - gnomevfs/System/Gnome/VFS/Error.hs \ + gnomevfs/System/Gnome/VFS/Error.hs.pp \ hunk ./configure.ac 221 +AC_DEFINE(HAVE_NEW_CONTROL_EXCEPTION,[1],[Define if you have the new Control.Exception module (from GHC 6.10)])) hunk ./glib/System/Glib/GError.chs.pp 91 +#if HAVE_NEW_CONTROL_EXCEPTION +import Control.OldException +#else hunk ./glib/System/Glib/GError.chs.pp 95 +#endif + hunk ./glib/System/Glib/StoreValue.hsc 36 -import Control.Exception (throw, Exception(AssertionFailed)) + +#if HAVE_NEW_CONTROL_EXCEPTION +import Control.OldException +#else +import Control.Exception + (throw, Exception(AssertionFailed)) +#endif hunk ./gnomevfs/System/Gnome/VFS/Error.hs.pp 43 +#ifdef HAVE_NEW_CONTROL_EXCEPTION +import qualified Control.OldException as E +#else hunk ./gnomevfs/System/Gnome/VFS/Error.hs.pp 47 +#endif hunk ./gtk/Graphics/UI/Gtk/Gdk/GC.chs.pp 80 +#ifdef HAVE_NEW_CONTROL_EXCEPTION +import Control.OldException (handle) +#else hunk ./gtk/Graphics/UI/Gtk/Gdk/GC.chs.pp 84 +#endif hunk ./gtk/Graphics/UI/Gtk/General/Structs.hsc 97 +#ifdef HAVE_NEW_CONTROL_EXCEPTION +import Control.OldException +#else hunk ./gtk/Graphics/UI/Gtk/General/Structs.hsc 101 +#endif hunk ./gtk/Graphics/UI/Gtk/Pango/GlyphStorage.chs.pp 48 +#ifdef HAVE_NEW_CONTROL_EXCEPTION +import Control.OldException ( Exception(ArrayException), + ArrayException(IndexOutOfBounds) ) +#else hunk ./gtk/Graphics/UI/Gtk/Pango/GlyphStorage.chs.pp 54 +#endif hunk ./gtk/Graphics/UI/Gtk/Pango/Layout.chs.pp 139 +#ifdef HAVE_NEW_CONTROL_EXCEPTION +import Control.OldException ( Exception(ArrayException), + ArrayException(IndexOutOfBounds), + throwIO ) +#else hunk ./gtk/Graphics/UI/Gtk/Pango/Layout.chs.pp 145 - ArrayException(IndexOutOfBounds) ) -import Control.Exception (throwIO) + ArrayException(IndexOutOfBounds), + throwIO ) +#endif |
From: Peter g. <pg...@co...> - 2008-10-09 12:31:00
|
Wed Oct 8 13:07:31 EDT 2008 Peter Gavin <pg...@gm...> * Makefile.am: use -XForeignFunctionInterface instead of -fffi for GHC 6.10 and newer hunk ./Makefile.am 7 +if GHC_VERSION_610 +FFI = -XForeignFunctionInterface +else +FFI = -fffi +endif + hunk ./Makefile.am 226 -tools_c2hs_toplevel_C2HSConfig_hs_HCFLAGS = -fffi '-\#include<c2hs_config.h>' +tools_c2hs_toplevel_C2HSConfig_hs_HCFLAGS = $(FFI) '-\#include<c2hs_config.h>' hunk ./Makefile.am 269 -libHSglib_a_HCFLAGS = -fffi +libHSglib_a_HCFLAGS = $(FFI) hunk ./Makefile.am 403 -libHSgtk_a_HCFLAGS = -fffi +libHSgtk_a_HCFLAGS = $(FFI) hunk ./Makefile.am 787 -libHSglade_a_HCFLAGS = -fffi +libHSglade_a_HCFLAGS = $(FFI) hunk ./Makefile.am 1038 -libHSsourceview_a_HCFLAGS = -fffi +libHSsourceview_a_HCFLAGS = $(FFI) hunk ./Makefile.am 1164 -libHSmozembed_a_HCFLAGS = -fffi +libHSmozembed_a_HCFLAGS = $(FFI) hunk ./Makefile.am 1281 -libHScairo_a_HCFLAGS = -fffi +libHScairo_a_HCFLAGS = $(FFI) hunk ./Makefile.am 1412 -libHSsvgcairo_a_HCFLAGS = -fffi +libHSsvgcairo_a_HCFLAGS = $(FFI) hunk ./Makefile.am 1508 -libHSgtkglext_a_HCFLAGS = -fffi +libHSgtkglext_a_HCFLAGS = $(FFI) hunk ./Makefile.am 1720 -libHSgnomevfs_a_HCFLAGS = -fffi +libHSgnomevfs_a_HCFLAGS = $(FFI) hunk ./Makefile.am 1891 -libHSgstreamer_a_HCFLAGS = -fffi +libHSgstreamer_a_HCFLAGS = $(FFI) |
From: Peter g. <pg...@co...> - 2008-10-09 12:30:59
|
Wed Oct 8 13:07:01 EDT 2008 Peter Gavin <pg...@gm...> * configure.ac: check version of GHC and define makefile conditional GHC_VERSION_610 for GHC >= 6.10 hunk ./configure.ac 116 +GTKHS_PROG_CHECK_VERSION($GHC_VERSION, -ge, 6.10, + GHC_VERSION_610=yes, GHC_VERSION_610=no) +AM_CONDITIONAL(GHC_VERSION_610, test "$GHC_VERSION_610" = "yes") + |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:22
|
Wed Oct 8 13:13:09 EDT 2008 Peter Gavin <pg...@gm...> * use versioned dependencies everywhere (make ghc-6.10 happy) hunk ./Makefile.am 99 -tools_hierarchyGen_TypeGenerator_EXTERNALDEPS = base +tools_hierarchyGen_TypeGenerator_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 114 -tools_hierarchyGenGst_TypeGenerator_EXTERNALDEPS = base +tools_hierarchyGenGst_TypeGenerator_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 134 -tools_callbackGen_HookGenerator_EXTERNALDEPS = base +tools_callbackGen_HookGenerator_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 153 -tools_c2hs_c2hsLocal_EXTERNALDEPS = base haskell98 +tools_c2hs_c2hsLocal_EXTERNALDEPS = base-$(PKG_BASE_VERSION) haskell98-$(PKG_HASKELL98_VERSION) hunk ./Makefile.am 155 -tools_c2hs_c2hsLocal_EXTERNALDEPS += pretty containers array +tools_c2hs_c2hsLocal_EXTERNALDEPS += pretty-$(PKG_PRETTY_VERSION) containers-$(PKG_CONTAINERS_VERSION) array-$(PKG_ARRAY_VERSION) hunk ./Makefile.am 258 -libHSglib_a_EXTERNALDEPS = base +libHSglib_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 389 -libHSgtk_a_EXTERNALDEPS = base mtl-$(PKG_MTL_VERSION) +libHSgtk_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) mtl-$(PKG_MTL_VERSION) hunk ./Makefile.am 776 -libHSglade_a_EXTERNALDEPS = base +libHSglade_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 891 -libHSgconf_a_EXTERNALDEPS = base +libHSgconf_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 1027 -libHSsourceview_a_EXTERNALDEPS = base +libHSsourceview_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 1153 -libHSmozembed_a_EXTERNALDEPS = base +libHSmozembed_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 1267 -libHScairo_a_EXTERNALDEPS = base mtl-$(PKG_MTL_VERSION) +libHScairo_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) mtl-$(PKG_MTL_VERSION) hunk ./Makefile.am 1401 -libHSsvgcairo_a_EXTERNALDEPS = base mtl-$(PKG_MTL_VERSION) +libHSsvgcairo_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) mtl-$(PKG_MTL_VERSION) hunk ./Makefile.am 1497 -libHSgtkglext_a_EXTERNALDEPS = base +libHSgtkglext_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 1617 -libHSsoegtk_a_EXTERNALDEPS = base +libHSsoegtk_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) hunk ./Makefile.am 1701 -libHSgnomevfs_a_EXTERNALDEPS = base haskell98 mtl-$(PKG_MTL_VERSION) +libHSgnomevfs_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) mtl-$(PKG_MTL_VERSION) hunk ./Makefile.am 1876 -libHSgstreamer_a_EXTERNALDEPS = base haskell98 mtl-$(PKG_MTL_VERSION) +libHSgstreamer_a_EXTERNALDEPS = base-$(PKG_BASE_VERSION) mtl-$(PKG_MTL_VERSION) hunk ./acinclude.m4 95 +C="$(${GHCPKG} list --simple-output --global $1)" hunk ./acinclude.m4 97 - C=$(${GHCPKG} list $1 | sed -e '/package.conf:/d') -else - C=$(${GHCPKG} list $1 | sed -e '1d;/package.conf:/,$d') + C="${C} $(${GHCPKG} list --simple-output --user $1)" hunk ./acinclude.m4 101 - $2=$(echo "${C}" | sed -e 's/,/\n/g' -e 's/[[(), ]]//g' | grep -v '^$' | sed -e 's/[[A-Za-z-]]*//' | sort -r -n | head -n1) + $2=$(for pkg in ${C} ; do echo "${pkg}" | sed -e 's/^[[A-Za-z0-9-]]*-\([[0-9.]]*\)$/\1/' ; done | sort -r -n | head -n1) hunk ./cairo/cairo.cabal.in 11 -build-depends: base mtl glib==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ mtl-@PKG_MTL_VERSION@ glib==@PACKAGE_VERSION@ hunk ./cairo/cairo.package.conf.in 18 -depends: base mtl-@PKG_MTL_VERSION@ glib-@PACKAGE_VERSION@ @CAIRO_SPLITBASE_DEPENDS@ +depends: base-@PKG_BASE_VERSION@ mtl-@PKG_MTL_VERSION@ glib-@PACKAGE_VERSION@ @CAIRO_SPLITBASE_DEPENDS@ hunk ./configure.ac 215 +GHC_PKG_CHECK(base,PKG_BASE_VERSION) +GTKHS_PROG_CHECK_VERSION($PKG_BASE_VERSION, -ge, 4.0, +GHC_PKG_CHECK(haskell98,PKG_HASKELL98_VERSION) hunk ./configure.ac 219 +AC_SUBST(PKG_BASE_VERSION) +AC_SUBST(PKG_HASKELL98_VERSION) hunk ./configure.ac 228 + GHC_PKG_CHECK(pretty, [PKG_PRETTY_VERSION]) hunk ./configure.ac 238 +AC_SUBST(PKG_PRETTY_VERSION) hunk ./configure.ac 850 -HADDOCK_PACKAGES="base mtl" +HADDOCK_PACKAGES="base-$PKG_BASE_VERSION mtl-$PKG_MTL_VERSION" hunk ./gconf/gconf.cabal.in 9 -build-depends: base glib==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ glib==@PACKAGE_VERSION@ hunk ./gconf/gconf.package.conf.in 16 -depends: base glib-@PACKAGE_VERSION@ +depends: base-@PKG_BASE_VERSION@ glib-@PACKAGE_VERSION@ hunk ./glade/glade.cabal.in 9 -build-depends: base gtk==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ gtk==@PACKAGE_VERSION@ hunk ./glade/glade.package.conf.in 16 -depends: base gtk-@PACKAGE_VERSION@ +depends: base-@PKG_BASE_VERSION@ gtk-@PACKAGE_VERSION@ hunk ./glib/glib.cabal.in 9 -build-depends: base +build-depends: base-@PKG_BASE_VERSION@ hunk ./glib/glib.package.conf.in 16 -depends: base +depends: base-@PKG_BASE_VERSION@ hunk ./gnomevfs/gnomevfs.package.conf.in 16 -depends: glib-@PACKAGE_VERSION@ mtl @GNOMEVFS_SPLITBASE_DEPENDS@ +depends: glib-@PACKAGE_VERSION@ mtl-@PKG_MTL_VERSION@ @GNOMEVFS_SPLITBASE_DEPENDS@ hunk ./gstreamer/gstreamer.cabal.in 9 -build-depends: glib==@PACKAGE_VERSION@, mtl +build-depends: glib==@PACKAGE_VERSION@ base-@PKG_BASE_VERSION@ mtl-@PKG_MTL_VERSION@ hunk ./gtk/gtk.cabal.in 9 -build-depends: base glib==@PACKAGE_VERSION@ @GTK_CAIRO_DEPEND@ +build-depends: base-@PKG_BASE_VERSION@ glib==@PACKAGE_VERSION@ @GTK_CAIRO_DEPEND@ hunk ./gtk/gtk.package.conf.in 16 -depends: base mtl-@PKG_MTL_VERSION@ glib-@PACKAGE_VERSION@ @GTK_CAIRO_DEPEND@ @GTK_SPLITBASE_DEPENDS@ +depends: base-@PKG_BASE_VERSION@ mtl-@PKG_MTL_VERSION@ glib-@PACKAGE_VERSION@ @GTK_CAIRO_DEPEND@ @GTK_SPLITBASE_DEPENDS@ hunk ./gtkglext/gtkglext.cabal.in 9 -build-depends: base gtk==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ gtk==@PACKAGE_VERSION@ hunk ./gtkglext/gtkglext.package.conf.in 16 -depends: base gtk-@PACKAGE_VERSION@ +depends: base-@PKG_BASE_VERSION@ gtk-@PACKAGE_VERSION@ hunk ./mozembed/mozembed.cabal.in 9 -build-depends: base gtk==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ gtk==@PACKAGE_VERSION@ hunk ./mozembed/mozembed.package.conf.in 16 -depends: base gtk-@PACKAGE_VERSION@ +depends: base-@PKG_BASE_VERSION@ gtk-@PACKAGE_VERSION@ hunk ./soegtk/soegtk.cabal.in 9 -build-depends: base gtk==@PACKAGE_VERSION@, cairo==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ gtk==@PACKAGE_VERSION@, cairo==@PACKAGE_VERSION@ hunk ./soegtk/soegtk.package.conf.in 13 -depends: base mtl-@PKG_MTL_VERSION@ gtk-@PACKAGE_VERSION@ @GTK_CAIRO_DEPEND@ @SOEGTK_SPLITBASE_DEPENDS@ +depends: base-@PKG_BASE_VERSION@ mtl-@PKG_MTL_VERSION@ gtk-@PACKAGE_VERSION@ @GTK_CAIRO_DEPEND@ @SOEGTK_SPLITBASE_DEPENDS@ hunk ./sourceview/sourceview.cabal.in 9 -build-depends: base gtk==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ gtk==@PACKAGE_VERSION@ hunk ./sourceview/sourceview.package.conf.in 19 -depends: base gtk-@PACKAGE_VERSION@ +depends: base-@PKG_BASE_VERSION@ gtk-@PACKAGE_VERSION@ hunk ./svgcairo/svgcairo.cabal.in 11 -build-depends: base mtl glib==@PACKAGE_VERSION@ cairo==@PACKAGE_VERSION@ +build-depends: base-@PKG_BASE_VERSION@ mtl-@PKG_MTL_VERSION@ glib==@PACKAGE_VERSION@ cairo==@PACKAGE_VERSION@ hunk ./svgcairo/svgcairo.package.conf.in 18 -depends: base mtl-@PKG_MTL_VERSION@ glib-@PACKAGE_VERSION@ cairo-@PACKAGE_VERSION@ +depends: base-@PKG_BASE_VERSION@ mtl-@PKG_MTL_VERSION@ glib-@PACKAGE_VERSION@ cairo-@PACKAGE_VERSION@ |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:17
|
Mon Sep 22 20:32:30 EDT 2008 Peter Gavin <pg...@gm...> * Makefile.am, configure.ac: make haddock2 work Haddock 2.3 or better is required (which, at the time being, has yet to be released) hunk ./Makefile.am 1768 -gnomevfs_System_Gnome_VFS_FileInfo_hs_HCFLAGS = '-\#include "hsfileinfo.h"' +gnomevfs_System_Gnome_VFS_FileInfo_hs_HCFLAGS = '-\#include"hsfileinfo.h"' hunk ./Makefile.am 1979 + gstreamer/Media/Streaming/GStreamer/Core/GObjectHierarchyBase.hs \ hunk ./Makefile.am 2208 -htmldoc_HSFILES = $(filter-out $(htmldoc_HSFILES_EXCLUDE), \ - $(foreach PACKAGE,$(PACKAGES),$(libHS$(PACKAGE)_a_HSFILES))) - -htmldoc_DATA = \ +htmldoc_haddock_files = \ hunk ./Makefile.am 2221 + hunk ./Makefile.am 2223 -htmldoc_DATA += +if !HADDOCK2 +htmldoc_haddock_files += hunk ./Makefile.am 2228 +endif + +htmldoc_images = \ + docs/reference/images/stock-icons/stock_about_24.png \ + docs/reference/images/stock-icons/stock_add_24.png \ + docs/reference/images/stock-icons/stock_align_center_24.png \ + docs/reference/images/stock-icons/stock_align_justify_24.png \ + docs/reference/images/stock-icons/stock_align_left_24.png \ + docs/reference/images/stock-icons/stock_align_right_24.png \ + docs/reference/images/stock-icons/stock_apply_20.png \ + docs/reference/images/stock-icons/stock_bottom_24.png \ + docs/reference/images/stock-icons/stock_broken_image_24.png \ + docs/reference/images/stock-icons/stock_cancel_20.png \ + docs/reference/images/stock-icons/stock_cdrom_24.png \ + docs/reference/images/stock-icons/stock_clear_24.png \ + docs/reference/images/stock-icons/stock_close_24.png \ + docs/reference/images/stock-icons/stock_color_picker_25.png \ + docs/reference/images/stock-icons/stock_colorselector_24.png \ + docs/reference/images/stock-icons/stock_connect_24.png \ + docs/reference/images/stock-icons/stock_convert_24.png \ + docs/reference/images/stock-icons/stock_copy_24.png \ + docs/reference/images/stock-icons/stock_cut_24.png \ + docs/reference/images/stock-icons/stock_dialog_authentication_48.png \ + docs/reference/images/stock-icons/stock_dialog_error_48.png \ + docs/reference/images/stock-icons/stock_dialog_info_48.png \ + docs/reference/images/stock-icons/stock_dialog_question_48.png \ + docs/reference/images/stock-icons/stock_dialog_warning_48.png \ + docs/reference/images/stock-icons/stock_directory_24.png \ + docs/reference/images/stock-icons/stock_disconnect_24.png \ + docs/reference/images/stock-icons/stock_dnd_32.png \ + docs/reference/images/stock-icons/stock_dnd_multiple_32.png \ + docs/reference/images/stock-icons/stock_down_arrow_24.png \ + docs/reference/images/stock-icons/stock_edit_24.png \ + docs/reference/images/stock-icons/stock_exec_24.png \ + docs/reference/images/stock-icons/stock_exit_24.png \ + docs/reference/images/stock-icons/stock_file_24.png \ + docs/reference/images/stock-icons/stock_first_24.png \ + docs/reference/images/stock-icons/stock_font_24.png \ + docs/reference/images/stock-icons/stock_fullscreen_24.png \ + docs/reference/images/stock-icons/stock_harddisk_24.png \ + docs/reference/images/stock-icons/stock_help_24.png \ + docs/reference/images/stock-icons/stock_home_24.png \ + docs/reference/images/stock-icons/stock_index_24.png \ + docs/reference/images/stock-icons/stock_info_24.png \ + docs/reference/images/stock-icons/stock_jump_to_24.png \ + docs/reference/images/stock-icons/stock_last_24.png \ + docs/reference/images/stock-icons/stock_leave_fullscreen_24.png \ + docs/reference/images/stock-icons/stock_left_arrow_24.png \ + docs/reference/images/stock-icons/stock_media_forward_24.png \ + docs/reference/images/stock-icons/stock_media_next_24.png \ + docs/reference/images/stock-icons/stock_media_pause_24.png \ + docs/reference/images/stock-icons/stock_media_play_24.png \ + docs/reference/images/stock-icons/stock_media_previous_24.png \ + docs/reference/images/stock-icons/stock_media_record_24.png \ + docs/reference/images/stock-icons/stock_media_rewind_24.png \ + docs/reference/images/stock-icons/stock_media_stop_24.png \ + docs/reference/images/stock-icons/stock_network_24.png \ + docs/reference/images/stock-icons/stock_new_24.png \ + docs/reference/images/stock-icons/stock_no_20.png \ + docs/reference/images/stock-icons/stock_ok_20.png \ + docs/reference/images/stock-icons/stock_open_24.png \ + docs/reference/images/stock-icons/stock_paste_24.png \ + docs/reference/images/stock-icons/stock_preferences_24.png \ + docs/reference/images/stock-icons/stock_print_24.png \ + docs/reference/images/stock-icons/stock_print_preview_24.png \ + docs/reference/images/stock-icons/stock_properties_24.png \ + docs/reference/images/stock-icons/stock_redo_24.png \ + docs/reference/images/stock-icons/stock_refresh_24.png \ + docs/reference/images/stock-icons/stock_remove_24.png \ + docs/reference/images/stock-icons/stock_revert_24.png \ + docs/reference/images/stock-icons/stock_right_arrow_24.png \ + docs/reference/images/stock-icons/stock_save_24.png \ + docs/reference/images/stock-icons/stock_save_as_24.png \ + docs/reference/images/stock-icons/stock_search_24.png \ + docs/reference/images/stock-icons/stock_search_replace_24.png \ + docs/reference/images/stock-icons/stock_sort_ascending_24.png \ + docs/reference/images/stock-icons/stock_sort_descending_24.png \ + docs/reference/images/stock-icons/stock_spellcheck_24.png \ + docs/reference/images/stock-icons/stock_stop_24.png \ + docs/reference/images/stock-icons/stock_text_bold_24.png \ + docs/reference/images/stock-icons/stock_text_indent_24.png \ + docs/reference/images/stock-icons/stock_text_italic_24.png \ + docs/reference/images/stock-icons/stock_text_strikethrough_24.png \ + docs/reference/images/stock-icons/stock_text_underline_24.png \ + docs/reference/images/stock-icons/stock_text_unindent_24.png \ + docs/reference/images/stock-icons/stock_top_24.png \ + docs/reference/images/stock-icons/stock_trash_24.png \ + docs/reference/images/stock-icons/stock_undelete_24.png \ + docs/reference/images/stock-icons/stock_undo_24.png \ + docs/reference/images/stock-icons/stock_up_arrow_24.png \ + docs/reference/images/stock-icons/stock_yes_20.png \ + docs/reference/images/stock-icons/stock_zoom_1_24.png \ + docs/reference/images/stock-icons/stock_zoom_fit_24.png \ + docs/reference/images/stock-icons/stock_zoom_in_24.png \ + docs/reference/images/stock-icons/stock_zoom_out_24.png hunk ./Makefile.am 2324 -$(htmldoc_DATA) : $(htmldoc_HSFILES) +htmldoc_DATA = $(htmldoc_haddock_files) $(htmldoc_images) + +if !HADDOCK2 + +htmldoc_HSFILES = $(filter-out $(htmldoc_HSFILES_EXCLUDE), \ + $(foreach PACKAGE,$(PACKAGES),$(libHS$(PACKAGE)_a_HSFILES))) + +$(htmldoc_haddock_files) : $(htmldoc_HSFILES) hunk ./Makefile.am 2339 +else hunk ./Makefile.am 2341 -doc_CLEANFILES = $(htmldoc_DATA) +htmldoc_HSFILES = $(foreach DEPPKG,$(PACKAGES),$(libHS$(DEPPKG)_a_HSFILES)) + +htmldoc_HSFILES_AM = $(foreach HSFILE, $(htmldoc_HSFILES), $(subst .,_,$(subst /,_,$(HSFILE)))) + +all_externaldeps = $(sort $(foreach DEPPKG,$(PACKAGES),$(libHS$(DEPPKG)_a_EXTERNALDEPS))) + +htmldoc_haddock_interfaces = \ + $(foreach DEPPKG,$(all_externaldeps),$(shell $(GHCPKG) field $(DEPPKG) haddock-interfaces | sed 's,^[^:]*:,,' )) + +$(htmldoc_haddock_files) : $(htmldoc_HSFILES) + mkdir -p docs/reference + echo $(all_externaldeps) + echo $(htmldoc_haddock_interfaces) + $(strip $(HADDOCK) --html --odir=docs/reference \ + --title="Gtk2Hs" \ + --dump-interface=docs/reference/gtk2hs.haddock \ + --prologue=docs/prologue.txt \ + $(addprefix --read-interface=, $(htmldoc_haddock_interfaces)) \ + $(addprefix --optghc=,$(sort $(foreach PACKAGE, $(PACKAGES), $(libHS$(PACKAGE)_a_HCFLAGS) $(libHS$(PACKAGE)_a_CPPFLAGS))) \ + $(sort $(foreach HSFILE, $(htmldoc_HSFILES_AM), $($(HSFILE)_HCFLAGS)))) \ + $(HADDOCK_FLAGS) $^) + +endif + +doc_CLEANFILES = $(htmldoc_haddock_files) hunk ./configure.ac 833 + GTKHS_PROG_CHECK_VERSION($HADDOCK_VERSION, -ge, 2.0, [HADDOCK2="yes";]) hunk ./configure.ac 837 +AM_CONDITIONAL(HADDOCK2, test "$HADDOCK2" = "yes") hunk ./glib/System/Glib/Types.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gnomevfs/System/Gnome/VFS/Constants.hsc 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gnomevfs/System/Gnome/VFS/Marshal.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gnomevfs/System/Gnome/VFS/Types.chs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gnomevfs/System/Gnome/VFS/Types.chs.pp 304 -type DirectoryVisitCallback = String -- ^ the path of the visited file, relative to the base directory - -> FileInfo -- ^ the 'FileInfo' for the visited file - -> Bool -- ^ 'True' if returning 'DirectoryVisitRecurse' will cause a loop - -> IO DirectoryVisitResult -- ^ the next action to be taken +-- [_$_] +-- The parameters, from left to right, are: +-- * the path of the visited file, relative to the base directory, +-- * the 'FileInfo' for the visited file, +-- * 'True' if returning 'DirectoryVisitRecurse' will cause a loop, otherwise 'False'. +-- [_$_] +-- The callback must return the next action to be taken. +type DirectoryVisitCallback = String + -> FileInfo + -> Bool + -> IO DirectoryVisitResult hunk ./gnomevfs/System/Gnome/VFS/Types.chs.pp 343 -type MonitorCallback = MonitorHandle -- ^ the handle to a filesystem monitor - -> TextURI -- ^ the URI being monitored - -> TextURI -- ^ the actual file that was modified - -> MonitorEventType -- ^ the event that occured +-- [_$_] +-- The parameters, from left to right, are: +-- * the handle to a filesystem monitor, +-- * the URI being monitored, +-- * the actual file that was modified, +-- * the event that occured. +type MonitorCallback = MonitorHandle + -> TextURI + -> TextURI + -> MonitorEventType hunk ./gnomevfs/System/Gnome/VFS/Types.chs.pp 398 -type XferProgressCallback = XferProgressInfo -- ^ @info@ - information about the progress of the current transfer - -> IO Bool -- ^ return 'Prelude.False' to abort the transfer, 'Prelude.True' otherwise. +-- +-- The callback must return 'Prelude.False' to abort the transfer, or 'Prelude.True' otherwise. +type XferProgressCallback = XferProgressInfo + -> IO Bool hunk ./gnomevfs/System/Gnome/VFS/Types.chs.pp 406 -type XferErrorCallback = XferProgressInfo -- ^ @info@ - information about the progress of the current transfer - -> IO XferErrorAction -- ^ the action to be performed in response to the error +-- +-- The callback must return the action to be performed in response to the error. +type XferErrorCallback = XferProgressInfo + -> IO XferErrorAction hunk ./gnomevfs/System/Gnome/VFS/Types.chs.pp 414 -type XferOverwriteCallback = XferProgressInfo -- ^ @info@ - information about the progress of the current transfer - -> IO XferOverwriteAction -- ^ the action to be performed when the target file already exists +-- +-- The callback must return the action to be performed when the target file already exists. +type XferOverwriteCallback = XferProgressInfo + -> IO XferOverwriteAction hunk ./gnomevfs/System/Gnome/VFS/Types.chs.pp 422 -type XferDuplicateCallback = XferProgressInfo -- ^ @info@ - information about the progress of the current transfer - -> String -- ^ @duplicateName@ - the name of the target file - -> Int -- ^ @duplicateCount@ - the number of duplicates that exist - -> IO (Maybe String) -- ^ the new filename that should be used, or 'Prelude.Nothing' to abort. +-- +-- The parameters, from left to right, are: +-- * @info@ - information about the progress of the current transfer, +-- * @duplicateName@ - the name of the target file, +-- * @duplicateCount@ - the number of duplicates that exist. +-- +-- The callback must return the new filename that should be used, or 'Prelude.Nothing' to abort. +type XferDuplicateCallback = XferProgressInfo + -> String + -> Int + -> IO (Maybe String) hunk ./gstreamer/Media/Streaming/GStreamer/Audio/Types.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Base/Types.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Controller/Types.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Core/HierarchyBase.hs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Core/MiniHierarchyBase.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Hierarchy.chs.template 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/MiniHierarchy.chs.template 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gstreamer/Media/Streaming/GStreamer/Net/Types.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/Abstract/ContainerChildProperties.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/Gdk/PixbufData.hs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/General/DNDTypes.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/Multiline/Types.chs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/Pango/Attributes.chs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/Pango/Description.chs 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/Pango/GlyphStorage.chs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/Pango/Types.chs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./gtk/Graphics/UI/Gtk/TreeList/TreePath.chs.pp 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./tools/callbackGen/Signal.chs.template 1 +{-# OPTIONS_HADDOCK hide #-} hunk ./tools/hierarchyGen/Hierarchy.chs.template 1 +{-# OPTIONS_HADDOCK hide #-} |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:17
|
Sat Aug 23 22:01:13 EDT 2008 Peter Gavin <pg...@gm...> * gstreamer: M.S.G.Core.Format: document everything; remove formatsContains as it's pretty redundant hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 43 - formatsContains, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 57 -formatGetName :: Format - -> IO String +-- | Get a printable name for the given format. +formatGetName :: Format -- ^ @format@ - a format + -> IO String -- ^ the name of the format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 65 -formatToQuark :: Format - -> IO Quark +-- | Get the unique quark for the given format. +formatToQuark :: Format -- ^ @format@ - a format + -> IO Quark -- ^ the unique quark for the format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 71 -formatRegister :: String - -> String - -> IO Format +-- | Create a new format based on the given nickname, or register a new format with that nickname. +formatRegister :: String -- ^ @nick@ - the nickname for the format + -> String -- ^ @description@ - the description for the format + -> IO Format -- ^ the format with the given nickname hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 81 -formatGetByNick :: String - -> IO Format +-- | Get the format with the given nickname, or 'FormatUndefined' if +-- no format by that nickname was found. +formatGetByNick :: String -- ^ @nick@ - the nickname for the format + -> IO Format -- ^ the format with the given nickname, + -- or 'FormatUndefined' if it was not found hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 90 -formatsContains :: [Format] - -> Format - -> IO Bool -formatsContains formats format = - liftM toBool $ [_$_] - withArray0 0 (map cFromEnum formats) $ \cFormats -> - {# call formats_contains #} cFormats $ cFromEnum format - -formatGetDetails :: Format - -> IO FormatDefinition +-- | Get the given format's definition. +formatGetDetails :: Format -- ^ @format@ - a format + -> IO (Maybe FormatDefinition) -- ^ the definition for the given format, or [_$_] + -- 'Nothing' if the format was not found hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 98 +-- | Get an Iterator over all registered formats. |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:15
|
Sat Aug 23 21:56:33 EDT 2008 Peter Gavin <pg...@gm...> * gstreamer: Format should not be an enumeration. Some values have special meanings, others will use FormatId hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 33 +import Data.Int hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 60 +-- | A format identifier. +newtype FormatId = FormatId #{type GstFormat} + deriving (Eq, Ord, Show) + +-- | An enumeration of standard predefined formats. +data Format = FormatUndefined -- ^ no format + | FormatDefault -- ^ the default format of the pad or element; this can be, e.g., samples for raw audio + | FormatBytes -- ^ bytes + | FormatTime -- ^ time in nanoseconds + | FormatBuffers -- ^ buffers + | FormatPercent -- ^ percentage of stream + | FormatUser FormatId -- ^ a user defined format + deriving (Eq, Ord, Show) +toFormat :: #{type GstFormat} -> Format +toFormat n | n == #{const GST_FORMAT_UNDEFINED} = FormatUndefined + | n == #{const GST_FORMAT_DEFAULT} = FormatDefault + | n == #{const GST_FORMAT_BYTES} = FormatBytes + | n == #{const GST_FORMAT_TIME} = FormatTime + | n == #{const GST_FORMAT_BUFFERS} = FormatBuffers + | n == #{const GST_FORMAT_PERCENT} = FormatPercent + | otherwise = FormatUser (FormatId n) +fromFormat :: Format -> #{type GstFormat} +fromFormat FormatUndefined = #{const GST_FORMAT_UNDEFINED} +fromFormat FormatDefault = #{const GST_FORMAT_DEFAULT} +fromFormat FormatBytes = #{const GST_FORMAT_BYTES} +fromFormat FormatTime = #{const GST_FORMAT_TIME} +fromFormat FormatBuffers = #{const GST_FORMAT_BUFFERS} +fromFormat FormatPercent = #{const GST_FORMAT_PERCENT} +fromFormat (FormatUser (FormatId id)) = id + +-- | The format value for 'FormatPercent' is between 0 and this value. +formatPercentMax :: Int64 +formatPercentMax = #{const GST_FORMAT_PERCENT_MAX} + +-- | The value used to scale down the reported 'FormatPercent' format +-- value to its real value. +formatPercentScale :: Int64 +formatPercentScale = #{const GST_FORMAT_PERCENT_SCALE} + hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 636 - do poke destFormatPtr $ fromIntegral $ fromEnum destFormat + do poke destFormatPtr $ fromIntegral $ fromFormat destFormat hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 638 - (fromIntegral $ fromEnum srcFormat) - (fromIntegral srcVal) - destFormatPtr - destValPtr + (fromIntegral $ fromFormat srcFormat) + (fromIntegral srcVal) + destFormatPtr + destValPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 645 - return $ Just (toEnum $ fromIntegral destFormat, + return $ Just (toFormat $ fromIntegral destFormat, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 657 - do poke formatPtr $ fromIntegral $ fromEnum format + do poke formatPtr $ fromIntegral $ fromFormat format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 662 - return $ Just (toEnum $ fromIntegral format, + return $ Just (toFormat $ fromIntegral format, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 674 - do poke formatPtr $ fromIntegral $ fromEnum format + do poke formatPtr $ fromIntegral $ fromFormat format hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 679 - return $ Just (toEnum $ fromIntegral format, + return $ Just (toFormat $ fromIntegral format, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 729 - (fromIntegral $ fromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 752 - (fromIntegral $ fromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Event.chs.pp 136 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Event.chs.pp 154 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Event.chs.pp 180 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Event.chs.pp 205 - format <- liftM cToEnum $ peek formatPtr + format <- liftM (toFormat . fromIntegral) $ peek formatPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Event.chs.pp 241 - format <- liftM cToEnum $ peek formatPtr + format <- liftM (toFormat . fromIntegral) $ peek formatPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Event.chs.pp 267 - format <- liftM cToEnum $ peek formatPtr + format <- liftM (toFormat . fromIntegral) $ peek formatPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Event.chs.pp 307 - format <- liftM cToEnum $ peek formatPtr + format <- liftM (toFormat . fromIntegral) $ peek formatPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 31 + -- * Types hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 33 + FormatDefinition(..), + FormatId, + [_$_] + -- * Format Operations + formatPercentMax, + formatPercentScale, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 63 - fromIntegral $ fromEnum format) + fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 68 - {# call format_to_quark #} . fromIntegral . fromEnum + {# call format_to_quark #} . fromIntegral . fromFormat hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 74 - liftM (toEnum . fromIntegral) $ + liftM (toFormat . fromIntegral) $ hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 82 - liftM cToEnum $ + liftM (toFormat . fromIntegral) $ hunk ./gstreamer/Media/Streaming/GStreamer/Core/Format.chs 96 - ({# call format_get_details #} $ cFromEnum format) >>= - peek . castPtr + ({# call format_get_details #} $ fromIntegral $ fromFormat format) >>= + maybePeek peek . castPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 163 - (cFromEnum format) >>= + (fromIntegral $ fromFormat format) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 204 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Index.chs 214 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs.pp 263 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs.pp 275 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs.pp 336 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs.pp 421 - format <- liftM cToEnum $ peek formatPtr + format <- liftM (toFormat . fromIntegral) $ peek formatPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs.pp 432 - format <- liftM cToEnum $ peek formatPtr + format <- liftM (toFormat . fromIntegral) $ peek formatPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Message.chs.pp 488 - format <- liftM cToEnum $ peek formatPtr + format <- liftM (toFormat . fromIntegral) $ peek formatPtr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 322 - return $ Just (toEnum $ fromIntegral format, + return $ Just (toFormat $ fromIntegral format, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 336 - return $ Just (toEnum $ fromIntegral format, + return $ Just (toFormat $ fromIntegral format, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 349 - (fromIntegral $ fromEnum srcFormat) + (fromIntegral $ fromFormat srcFormat) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 356 - return $ Just (toEnum $ fromIntegral destFormat, + return $ Just (toFormat $ fromIntegral destFormat, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 370 - return $ Just (toEnum $ fromIntegral format, + return $ Just (toFormat $ fromIntegral format, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 384 - return $ Just (toEnum $ fromIntegral format, + return $ Just (toFormat $ fromIntegral format, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 397 - (fromIntegral $ fromEnum srcFormat) + (fromIntegral $ fromFormat srcFormat) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Pad.chs.pp 404 - return $ Just (toEnum $ fromIntegral destFormat, + return $ Just (toFormat $ fromIntegral destFormat, hunk ./gstreamer/Media/Streaming/GStreamer/Core/Query.chs 113 - {# call query_new_convert #} (cFromEnum srcFormat) + {# call query_new_convert #} (fromIntegral $ fromFormat srcFormat) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Query.chs 115 - (cFromEnum destFormat) >>= + (fromIntegral $ fromFormat destFormat) >>= hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 61 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 78 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 89 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 106 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 126 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 144 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Segment.chs 154 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 48 - Format(..), hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 205 -{# enum GstFormat as Format {underscoreToCase} with prefix = "GST" deriving (Eq, Show) #} - -data FormatDefinition = FormatDefinition { formatValue :: Format - , formatNick :: String - , formatDescription :: String - , formatQuark :: Quark } - deriving (Eq, Show) +-- | A format definition. +data FormatDefinition = FormatDefinition { formatValue :: FormatId -- ^ the unique id of this format + , formatNick :: String -- ^ a short nickname for the format + , formatDescription :: String -- ^ a longer description of the format + , formatQuark :: Quark -- ^ a quark for the nickname + } deriving (Eq, Show) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 215 - do value <- liftM cToEnum $ {# get GstFormatDefinition->value #} ptr + do value <- liftM (FormatId . fromIntegral) $ {# get GstFormatDefinition->value #} ptr hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 406 - return $ IndexAssociation (cToEnum format) (fromIntegral value) + return $ IndexAssociation (toFormat $ fromIntegral format) (fromIntegral value) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 408 - do {# set GstIndexAssociation->format #} ptr $ cFromEnum format + do {# set GstIndexAssociation->format #} ptr $ fromIntegral (fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 741 - (cToEnum format) + (toFormat $ fromIntegral format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 760 - (cFromEnum format) + (fromIntegral $ fromFormat format) hunk ./gstreamer/Media/Streaming/GStreamer/Core/Types.chs.pp 763 - {# set GstSegment->format #} ptr $ cFromEnum format + {# set GstSegment->format #} ptr $ fromIntegral (fromFormat format) |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:13
|
Sat Aug 23 21:56:08 EDT 2008 Peter Gavin <pg...@gm...> * gstreamer: M.S.G.Core.Constants: remove export list hunk ./gstreamer/Media/Streaming/GStreamer/Core/Constants.hsc 31 -module Media.Streaming.GStreamer.Core.Constants ( - ClockTime, - clockTimeNone, - second, - msecond, - usecond, - nsecond, - BufferOffset, - bufferOffsetNone, - ObjectFlags(..), - PadFlags(..), - ElementFlags(..), - StateChange(..), - BusFlags(..), - ClockFlags(..), - IndexFlags(..), - MiniObjectFlags(..), - BufferFlags(..), - EventType(..), - MessageType(..), - CapsFlags(..), - ) where +module Media.Streaming.GStreamer.Core.Constants where |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:11
|
Sat Aug 23 21:55:44 EDT 2008 Peter Gavin <pg...@gm...> * gstreamer: M.S.G.Core.Clock: document attributes hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs.pp 425 +-- | The amount of time, in nanoseconds, between samples. hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs.pp 432 +-- | The size of the window used to calculate rate and offset. hunk ./gstreamer/Media/Streaming/GStreamer/Core/Clock.chs.pp 438 +-- | The threshold to start calculating rate and offset. |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:10
|
Sat Aug 23 21:45:48 EDT 2008 Peter Gavin <pg...@gm...> * gstreamer: document those functions that are ony available after some gstreamer version hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bin.chs.pp 234 +-- +-- Since 0.10.3. hunk ./gstreamer/Media/Streaming/GStreamer/Core/Bus.chs.pp 193 +-- [_$_] +-- Since 0.10.12. hunk ./gstreamer/Media/Streaming/GStreamer/Core/Caps.chs.pp 302 +-- [_$_] +-- Since 0.10.10. hunk ./gstreamer/Media/Streaming/GStreamer/Core/Element.chs.pp 585 +-- [_$_] +-- Since 0.10.11. hunk ./gstreamer/Media/Streaming/GStreamer/Core/ElementFactory.chs.pp 160 +-- [_$_] +-- Since 0.10.14. |
From: Peter g. <pg...@co...> - 2008-10-08 17:22:09
|
Wed Aug 20 19:02:12 EDT 2008 Peter Gavin <pg...@gm...> * Makefile.am: if WIN32 for haddock stuff should be if !WIN32 hunk ./Makefile.am 2223 -if WIN32 +if !WIN32 |
From: Axel S. <si...@co...> - 2008-10-05 10:25:09
|
Sun Oct 5 06:06:34 EDT 2008 A....@ke... * Add TreeRowReference back to the TreeList directory. hunk ./Makefile.am 545 + gtk/Graphics/UI/Gtk/TreeList/TreeRowReference.chs.pp \ addfile ./gtk/Graphics/UI/Gtk/TreeList/TreeRowReference.chs.pp hunk ./gtk/Graphics/UI/Gtk/TreeList/TreeRowReference.chs.pp 1 +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Class TreeRowReference +-- +-- Author : Duncan Coutts +-- +-- Created: 14 April 2005 +-- +-- Copyright (C) 2005 Axel Simon, Duncan Coutts +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) +-- +-- A persistent index into a tree model. +-- +module Graphics.UI.Gtk.TreeList.TreeRowReference ( +-- * Detail +-- +-- | A 'RowReference' is an index into a +-- 'Graphics.UI.Gtk.TreeList.TreeModel.TreeModel' that is persistent even if +-- rows are inserted, deleted or reordered. +-- + +-- * Types + TreeRowReference, + +-- * Constructors + treeRowReferenceNew, + +-- * Methods + treeRowReferenceGetPath, + treeRowReferenceValid, + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.TreeList.TreePath#} + +{# context lib="gtk" prefix="gtk" #} + +-- | Tree Row Reference : like a 'TreePath' it points to a subtree or node, but +-- it is persistent. It identifies the same node (so long as it exists) even +-- when items are added, removed, or reordered. +-- +{#pointer * TreeRowReference foreign newtype#} + +-------------------- +-- Constructors + +-- | Creates a row reference based on a path. This reference will keep pointing +-- to the node pointed to by the given path, so long as it exists. Returns @Nothing@ if there is no node at the given path. +-- +treeRowReferenceNew :: TreeModelClass self => self + -> TreePath + -> IO (Maybe TreeRowReference) +treeRowReferenceNew self path = withTreePath path $ \path -> do + rowRefPtr <- [_$_] + {#call unsafe gtk_tree_row_reference_new#} (toTreeModel self) path + if rowRefPtr==nullPtr then return Nothing else + liftM (Just . TreeRowReference) $ + newForeignPtr rowRefPtr tree_row_reference_free + +-------------------- +-- Methods + +-- | Returns a path that the row reference currently points to. +-- +-- * The returned path may be the empty list if the reference was invalid. +-- +treeRowReferenceGetPath :: TreeRowReference -> IO TreePath +treeRowReferenceGetPath ref = + {# call unsafe tree_row_reference_get_path #} ref + >>= fromTreePath -- path must be freed + +-- | Returns True if the reference refers to a current valid path. +-- +treeRowReferenceValid :: TreeRowReference -> IO Bool +treeRowReferenceValid self = + liftM toBool $ + {# call unsafe tree_row_reference_valid #} + self + +foreign import ccall unsafe ">k_tree_row_reference_free" + tree_row_reference_free :: FinalizerPtr TreeRowReference + |
From: Axel S. <si...@co...> - 2008-10-05 10:22:44
|
Sun Oct 5 06:08:51 EDT 2008 A....@ke... * Make happy happy. hunk ./gtk/Graphics/UI/Gtk/ModelView/CellLayout.chs.pp 214 --- #551202. +-- \#551202. |
From: Axel S. <si...@co...> - 2008-10-05 10:21:50
|
Sun Oct 5 06:07:27 EDT 2008 A....@ke... * Cairo produces a stub file since the addition of the Pixbuf as Cairo functions. hunk ./Makefile.am 665 +if HAVE_GTK_VERSION_2_8 +libHSgtk_a_LIBADD += \ + gtk/Graphics/UI/Gtk/Cairo_stub.o [_$_] +endif + |
From: Axel S. <si...@co...> - 2008-09-20 20:14:03
|
Sat Sep 20 15:28:10 EDT 2008 A....@ke... * Make CellLayout clever about translating iterators to child models. This patch is a hack around a bug in Gtk+ that is at least present in EntryCompletion. Often the CellLayout interface is only half-heartedly implementedin the widgets. For instance the EntryCompletion widget takes a model with the completion and wraps a TreeModelFilter around it which is used to only admit selected entries into the drop down list. Although EntryCompletion implements the CellLayout interface, all the gtk_cell_layout_set_cell_data_func does is to forward any queryies to the contained model that the user has set. What it should do is to translate from the filter model to the user model. In order to work around this bug, this patch adds the functionality to cellLayoutSetAttributeFunc that checks if the model in the call back is the same as the model that was given as an argument. If not, the model in the callback is checked to be a TreeModelFilter or a TreeModelSort and the iterator is then automatically translated. This patch therefore also makes it possible to define how the values of cell renderers should be set even if the view that contains the cell renderers accesses them using a TreeModelFilter or a TreeModelSort. hunk ./gtk/Graphics/UI/Gtk/ModelView/CellLayout.chs.pp 69 +import System.Glib.GType hunk ./gtk/Graphics/UI/Gtk/ModelView/CellLayout.chs.pp 148 --- around 'cellLayoutSetAttributeFunc' which sets the cells of the @cell@ with --- the data retrieved from the model. +-- around 'cellLayoutSetAttributeFunc' in that it sets the cells of the @cell@ +-- with the data retrieved from the model. +-- +-- * Note on using 'Graphics.UI.Gtk.ModelView.TreeModelSort.TreeModelSort' and +-- 'Graphics.UI.Gtk.ModelView.TreeModelFilter.TreeModelFilter': These two models +-- wrap another model, the so-called child model, instead of storing their own +-- data. This raises the problem that the data of cell renderers must be set +-- using the child model, while the 'TreeIter's that the view works with refer to +-- the model that encapsulates the child model. For convenience, this function +-- transparently translates an iterator to the child model before extracting the +-- data using e.g. 'Graphics.UI.Gtk.TreeModel.TreeModelSort.treeModelSortConvertIterToChildIter'. +-- Hence, it is possible to install the encapsulating model in the view and to +-- pass the child model to this function. hunk ./gtk/Graphics/UI/Gtk/ModelView/CellLayout.chs.pp 189 - iter <- peek iterPtr - let (TreeModel modelPtr) = toTreeModel model + iter <- convertIterFromParentToChildModel iterPtr modelPtr' [_$_] + (toTreeModel model) hunk ./gtk/Graphics/UI/Gtk/ModelView/CellLayout.chs.pp 192 - if unsafeForeignPtrToPtr modelPtr /= modelPtr' || - unsafeForeignPtrToPtr cellPtr /= cellPtr' then + if unsafeForeignPtrToPtr cellPtr /= cellPtr' then hunk ./gtk/Graphics/UI/Gtk/ModelView/CellLayout.chs.pp 194 - "CellRenderer from different model.") + "a different CellRenderer.") hunk ./gtk/Graphics/UI/Gtk/ModelView/CellLayout.chs.pp 206 +-- Given a 'TreeModelFilter' or a 'TreeModelSort' and a 'TreeIter', get the +-- child model of these models and convert the iter to an iter of the child +-- model. This is an ugly internal function that is needed for some widgets +-- which pass iterators to the callback function of set_cell_data_func that +-- refer to some internal TreeModelFilter models that they create around the +-- user model. This is a bug but since C programs mostly use the columns +-- rather than the cell_layout way to extract attributes, this bug does not +-- show up in many programs. Reported in the case of EntryCompletion as bug +-- #551202. +-- +convertIterFromParentToChildModel :: + Ptr TreeIter -- ^ the iterator + -> Ptr TreeModel -- ^ the model that we got from the all back + -> TreeModel -- ^ the model that we actually want + -> IO TreeIter +convertIterFromParentToChildModel iterPtr parentModelPtr childModel = + let (TreeModel modelFPtr) = childModel + modelPtr = unsafeForeignPtrToPtr modelFPtr in + if modelPtr==parentModelPtr then peek iterPtr else + if typeInstanceIsA (castPtr parentModelPtr) gTypeTreeModelFilter then + alloca $ \childIterPtr -> do + treeModelFilterConvertIterToChildIter parentModelPtr childIterPtr iterPtr + childPtr <- treeModelFilterGetModel parentModelPtr + if childPtr==modelPtr then peek childIterPtr else + convertIterFromParentToChildModel childIterPtr childPtr childModel + else if typeInstanceIsA (castPtr parentModelPtr) gTypeTreeModelSort then + alloca $ \childIterPtr -> do + treeModelSortConvertIterToChildIter parentModelPtr childIterPtr iterPtr + childPtr <- treeModelSortGetModel parentModelPtr + if childPtr==modelPtr then peek childIterPtr else + convertIterFromParentToChildModel childIterPtr childPtr childModel + else do + iter <- peek iterPtr + error ("CellLayout: don't know how to convert iter "++show iter++ + " from model "++show parentModelPtr++" to model "++ + show modelPtr++". Is it possible that you are setting the "++ + "attributes of a CellRenderer using a different model than "++ + "that which was set in the view?") + +foreign import ccall unsafe "gtk_tree_model_filter_get_model" + treeModelFilterGetModel :: Ptr TreeModel -> IO (Ptr TreeModel) + +foreign import ccall safe "gtk_tree_model_filter_convert_iter_to_child_iter" + treeModelFilterConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter -> + Ptr TreeIter -> IO () [_$_] + +foreign import ccall unsafe "gtk_tree_model_sort_get_model" + treeModelSortGetModel :: Ptr TreeModel -> IO (Ptr TreeModel) + [_$_] +foreign import ccall safe "gtk_tree_model_sort_convert_iter_to_child_iter" + treeModelSortConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter -> + Ptr TreeIter -> IO () [_$_] + |
From: Axel S. <si...@co...> - 2008-09-20 20:13:57
|
Sat Sep 20 15:34:54 EDT 2008 A....@ke... * Rename a few function in CustomStore to make the naming more consistent. Add more comments. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 4 --- Author : Duncan Coutts +-- Author : Duncan Coutts, Axel Simon hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 8 --- Copyright (C) 2005 Duncan Coutts +-- Copyright (C) 2005 Duncan Coutts, Axel Simon hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 19 --- +-- #prune + hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 26 --- Allows a custom data structure to be used with the 'TreeView' +-- Allows a custom data structure to be used with the 'TreeView' and other +-- widgets that follow the model-view-controller paradigm. The two models +-- 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' and +-- 'Graphics.UI.Gtk.ModelView.TreeStore.TreeStore' are based on the +-- 'CustomStore'. Even if no application-specific tree model +-- should be implemented, this module is relevant in that it provides the +-- functions 'customStoreSetColumn' and +-- 'customStoreGetRow' functions. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 37 - CustomTreeModel, + CustomStore, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 42 - customTreeModelNew, + customStoreNew, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 45 - customTreeModelGetPrivate, - customTreeModelGetStamp, - customTreeModelInvalidateIters, + customStoreGetPrivate, + customStoreGetStamp, + customStoreInvalidateIters, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 74 --- | These flags indicate various properties of a 'TreeModel'. +-- | These flags indicate various properties of a +-- 'Graphics.UI.Gtk.ModelView.TreeModel.TreeModel'. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 77 --- * If a model has "TreeModelItersPersist" set, iterators remain valid --- after a "TreeModel" signal was emitted. +-- * If a model has 'TreeModelItersPersist' set, iterators remain valid after +-- a 'Graphics.UI.Gtk.ModelView.TreeModel.TreeModel' signal was emitted. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 80 --- * The "TreeModelListOnly" flag is set if the rows are arranged in a --- simple flat list. This is set in the "ListStore" implementation. +-- * The 'TreeModelListOnly' flag is set if the rows are arranged in a simple +-- flat list. This is set in the +-- 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' implementation. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 88 --- | A CustomTreeModel is backed by a Gtk2HsStore +-- A 'CustomStore' is backed by a Gtk2HsStore hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 91 -newtype CustomTreeModel private row = CustomTreeModel (ForeignPtr (CustomTreeModel private row)) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 92 -instance TreeModelClass (CustomTreeModel private row) -instance GObjectClass (CustomTreeModel private row) where - toGObject (CustomTreeModel tm) = mkGObject (castForeignPtr tm) - unsafeCastGObject = CustomTreeModel . castForeignPtr . unGObject +-- | A 'CustomStore' is an instance of a Gtk+ 'TreeModel' and can thus be used +-- for any widget that stores data in a 'TreeModel'. The user may either +-- create an instance of a 'CustomStore' or use one of the pre-defined +-- models 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' of +-- 'Graphics.UI.Gtk.ModelView.TreeStore.TreeStore'. +newtype CustomStore private row = CustomStore (ForeignPtr (CustomStore private row)) + +instance TreeModelClass (CustomStore private row) +instance GObjectClass (CustomStore private row) where + toGObject (CustomStore tm) = mkGObject (castForeignPtr tm) + unsafeCastGObject = CustomStore . castForeignPtr . unGObject hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 125 - let cMap = customTreeModelColumns impl + let cMap = customStoreColumns impl hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 143 -data CustomTreeModelImplementation model row = CustomTreeModelImplementation { - customTreeModelColumns :: ColumnMap row, -- provide access via columns - customTreeModelIface :: TreeModelIface row, -- functions implementing a tree model - customTreeDragSourceIface :: DragSourceIface model row, -- the drag and drop source interface - customTreeDragDestIface :: DragDestIface model row -- the drag and drop dest interface +data CustomStoreImplementation model row = CustomStoreImplementation { + customStoreColumns :: ColumnMap row, -- provide access via columns + customStoreIface :: TreeModelIface row, -- functions implementing a tree model + customTreeDragSourceIface :: DragSourceIface model row, -- the drag and drop source interface + customTreeDragDestIface :: DragDestIface model row -- the drag and drop dest interface hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 150 +-- | The 'TreeModelIface' structure contains all functions that are required +-- to implement an application-specific 'TreeModel'. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 153 + -- | Return the flags that are valid for this model. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 155 + -- | Convert an path into the tree into a more concise 'TreeIter'. + -- Return @Nothing@ if the path does not exit. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 158 + -- | Convert an iterator to a path. The iterator will always be valid. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 160 + -- | Retrieve a row at the given iterator. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 162 + -- | Advance the given iterator to the next node at the same level. + -- Return @Nothing@ if there is no next node at this level. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 165 + -- | Advance the given iterator to the first child of this iterator. + -- Return @Notihing@ if the node at this iterator has no children. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 168 + -- | Check if the node at the given iterator has children. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 170 + -- | Query the number of children the the node at the given iteratore has. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 172 + -- | Ask for an iterator to the @n@th child. Return @Nothing@ if + -- no such child exists. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 175 + -- | Ask for an iterator to the parent of the node. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 177 + -- | Increase a reference count for this node. A positive reference count + -- indicates that the node is used (that is, most likely it is visible) + -- in at least one widget. Tracking reference counts for nodes is + -- optional but may be useful to infer when a given row can be discarded + -- if it was retrieved from an external source. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 183 + -- | Decrement the reference count of the given node. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 187 +-- | A structure containing functions that enable this widget to be used +-- as a source in drag-and-drop. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 190 + -- | Determine if the row at the given path is draggable. Return + -- @False@ if for some reason this row should not be dragged by + -- the user. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 194 + -- | Fill in the 'SelectionDataM' structure with information on + -- the given node using + -- 'Graphics.UI.Gtk.General.Selection.selectionDataSet'. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 198 + -- | The widget is informed that the row at the given path should + -- be deleted as the result of this drag. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 203 +-- | A structure containing functions that enable this widget to be used +-- as a target in drag-and-drop. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 206 + -- | Tell the drag-and-drop mechanism if the row can be dropped at the + -- given path. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 209 + -- | The data in the 'SelectionDataM' structure should be read using + -- 'Graphics.UI.Gtk.General.Selection.selectionDataGet' and + -- its information be used to insert a new row at the given path. hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 219 -customTreeModelNew :: (TreeModelClass (model row), TypedTreeModelClass model) => +customStoreNew :: (TreeModelClass (model row), TypedTreeModelClass model) => hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 221 - -> ((CustomTreeModel private row) -> model row) + -> ((CustomStore private row) -> model row) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 228 -customTreeModelNew priv con tmIface mDragSource mDragDest = do +customStoreNew priv con tmIface mDragSource mDragDest = do hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 235 - implPtr <- newStablePtr CustomTreeModelImplementation { - customTreeModelColumns = cMap, - customTreeModelIface = tmIface, + implPtr <- newStablePtr CustomStoreImplementation { + customStoreColumns = cMap, + customStoreIface = tmIface, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 241 - liftM con $ makeNewGObject CustomTreeModel $ + liftM con $ makeNewGObject CustomStore $ hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 245 - gtk2hs_store_new :: StablePtr (CustomTreeModelImplementation model row) + gtk2hs_store_new :: StablePtr (CustomStoreImplementation model row) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 247 - -> IO (Ptr (CustomTreeModel private row)) + -> IO (Ptr (CustomStore private row)) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 256 - treeModelIfaceGetRow (customTreeModelIface impl) iter + treeModelIfaceGetRow (customStoreIface impl) iter hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 263 - gtk2hs_store_get_impl :: Ptr (TypedTreeModel row) -> IO (StablePtr (CustomTreeModelImplementation model row)) + gtk2hs_store_get_impl :: Ptr (TypedTreeModel row) -> IO (StablePtr (CustomStoreImplementation model row)) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 265 -customTreeModelGetPrivate :: CustomTreeModel private row -> private -customTreeModelGetPrivate (CustomTreeModel model) = +-- | Return the private data stored in this 'CustomStore'. The private data +-- is meant as a container for the data stored in this model. +customStoreGetPrivate :: CustomStore private row -> private +customStoreGetPrivate (CustomStore model) = hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 274 - gtk2hs_store_get_priv :: Ptr (CustomTreeModel private row) -> IO (StablePtr private) + gtk2hs_store_get_priv :: Ptr (CustomStore private row) -> IO (StablePtr private) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 276 -customTreeModelGetStamp :: CustomTreeModel private row -> IO CInt -customTreeModelGetStamp (CustomTreeModel model) = +-- | Query the current value of the stamp that is used to create +-- 'TreeIter' iterators. The stamp is compared each time a view +-- accesses this store. If the stamp doesn't match, a warning +-- is emitted. The stamp should be updated each time a the data +-- in the model changes. The rationale is that a view should never +-- use a stale 'TreeIter', i.e., one that refers to an old model. +-- +customStoreGetStamp :: CustomStore private row -> IO CInt +customStoreGetStamp (CustomStore model) = hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 288 - gtk2hs_store_get_stamp :: Ptr (CustomTreeModel private row) -> IO CInt + gtk2hs_store_get_stamp :: Ptr (CustomStore private row) -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 290 -customTreeModelInvalidateIters :: CustomTreeModel private row -> IO () -customTreeModelInvalidateIters (CustomTreeModel model) = +-- | Create a new stamp. See 'customStoreGetStamp'. +-- +customStoreInvalidateIters :: CustomStore private row -> IO () +customStoreInvalidateIters (CustomStore model) = hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 297 - gtk2hs_store_increment_stamp :: Ptr (CustomTreeModel private row) -> IO () + gtk2hs_store_increment_stamp :: Ptr (CustomStore private row) -> IO () hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 299 -treeModelIfaceGetNColumns_static :: StablePtr (CustomTreeModelImplementation model row) -> IO CInt +treeModelIfaceGetNColumns_static :: StablePtr (CustomStoreImplementation model row) -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 302 - cmap <- readIORef (customTreeModelColumns store) + cmap <- readIORef (customStoreColumns store) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 306 - treeModelIfaceGetNColumns_static :: StablePtr (CustomTreeModelImplementation model row) -> IO CInt + treeModelIfaceGetNColumns_static :: StablePtr (CustomStoreImplementation model row) -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 316 -treeModelIfaceGetColumnType_static :: StablePtr (CustomTreeModelImplementation model row) -> CInt -> IO GType +treeModelIfaceGetColumnType_static :: StablePtr (CustomStoreImplementation model row) -> CInt -> IO GType hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 319 - cols <- readIORef (customTreeModelColumns store) + cols <- readIORef (customStoreColumns store) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 325 - treeModelIfaceGetColumnType_static :: StablePtr (CustomTreeModelImplementation model row) -> CInt -> IO GType + treeModelIfaceGetColumnType_static :: StablePtr (CustomStoreImplementation model row) -> CInt -> IO GType hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 328 -treeModelIfaceGetFlags_static :: StablePtr (CustomTreeModelImplementation model row) -> IO CInt +treeModelIfaceGetFlags_static :: StablePtr (CustomStoreImplementation model row) -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 330 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 334 - treeModelIfaceGetFlags_static :: StablePtr (CustomTreeModelImplementation model row) -> IO CInt + treeModelIfaceGetFlags_static :: StablePtr (CustomStoreImplementation model row) -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 337 -treeModelIfaceGetIter_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr NativeTreePath -> IO CInt +treeModelIfaceGetIter_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr NativeTreePath -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 339 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 348 - treeModelIfaceGetIter_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr NativeTreePath -> IO CInt + treeModelIfaceGetIter_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr NativeTreePath -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 350 -treeModelIfaceGetPath_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO (Ptr NativeTreePath) +treeModelIfaceGetPath_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO (Ptr NativeTreePath) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 352 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 359 - treeModelIfaceGetPath_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO (Ptr NativeTreePath) + treeModelIfaceGetPath_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO (Ptr NativeTreePath) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 362 -treeModelIfaceGetValue_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> CInt -> Ptr GValue -> IO () +treeModelIfaceGetValue_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> CInt -> Ptr GValue -> IO () hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 366 - row <- treeModelIfaceGetRow (customTreeModelIface store) iter - cols <- readIORef (customTreeModelColumns store) + row <- treeModelIfaceGetRow (customStoreIface store) iter + cols <- readIORef (customStoreColumns store) hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 381 - treeModelIfaceGetValue_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> CInt -> Ptr GValue -> IO () + treeModelIfaceGetValue_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> CInt -> Ptr GValue -> IO () hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 384 -treeModelIfaceIterNext_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO CInt +treeModelIfaceIterNext_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 386 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 395 - treeModelIfaceIterNext_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO CInt + treeModelIfaceIterNext_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 398 -treeModelIfaceIterChildren_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt +treeModelIfaceIterChildren_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 400 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 409 - treeModelIfaceIterChildren_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt + treeModelIfaceIterChildren_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 412 -treeModelIfaceIterHasChild_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO CInt +treeModelIfaceIterHasChild_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 414 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 419 - treeModelIfaceIterHasChild_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO CInt + treeModelIfaceIterHasChild_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 422 -treeModelIfaceIterNChildren_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO CInt +treeModelIfaceIterNChildren_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 424 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 429 - treeModelIfaceIterNChildren_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO CInt + treeModelIfaceIterNChildren_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 432 -treeModelIfaceIterNthChild_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> CInt -> IO CInt +treeModelIfaceIterNthChild_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> CInt -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 434 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 443 - treeModelIfaceIterNthChild_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> CInt -> IO CInt + treeModelIfaceIterNthChild_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> CInt -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 446 -treeModelIfaceIterParent_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt +treeModelIfaceIterParent_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 448 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 457 - treeModelIfaceIterParent_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt + treeModelIfaceIterParent_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> Ptr TreeIter -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 460 -treeModelIfaceRefNode_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO () +treeModelIfaceRefNode_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO () hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 462 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 467 - treeModelIfaceRefNode_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO () + treeModelIfaceRefNode_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO () hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 470 -treeModelIfaceUnrefNode_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO () +treeModelIfaceUnrefNode_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO () hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 472 - store <- liftM customTreeModelIface $ deRefStablePtr storePtr + store <- liftM customStoreIface $ deRefStablePtr storePtr hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 477 - treeModelIfaceUnrefNode_static :: StablePtr (CustomTreeModelImplementation model row) -> Ptr TreeIter -> IO () + treeModelIfaceUnrefNode_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> IO () hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 479 -treeDragSourceRowDraggable_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> IO CInt +treeDragSourceRowDraggable_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 487 - treeDragSourceRowDraggable_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> IO CInt + treeDragSourceRowDraggable_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 489 -treeDragSourceDragDataGet_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt +treeDragSourceDragDataGet_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 497 - treeDragSourceDragDataGet_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt + treeDragSourceDragDataGet_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 499 -treeDragSourceDragDataDelete_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> IO CInt +treeDragSourceDragDataDelete_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 507 - treeDragSourceDragDataDelete_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> IO CInt + treeDragSourceDragDataDelete_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 509 -treeDragDestDragDataReceived_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt +treeDragDestDragDataReceived_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 517 - treeDragDestDragDataReceived_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt + treeDragDestDragDataReceived_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 519 -treeDragDestRowDropPossible_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt +treeDragDestRowDropPossible_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 527 - treeDragDestRowDropPossible_static :: Ptr TreeModel -> StablePtr (CustomTreeModelImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt + treeDragDestRowDropPossible_static :: Ptr TreeModel -> StablePtr (CustomStoreImplementation model row) -> Ptr NativeTreePath -> SelectionData -> IO CInt hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 72 -newtype ListStore a = ListStore (CustomTreeModel (IORef (Seq a)) a) +newtype ListStore a = ListStore (CustomStore (IORef (Seq a)) a) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 95 - customTreeModelNew rows ListStore TreeModelIface { + customStoreNew rows ListStore TreeModelIface { hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 169 - readIORef (customTreeModelGetPrivate model) >>= return . (`Seq.index` index) + readIORef (customStoreGetPrivate model) >>= return . (`Seq.index` index) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 175 - modifyIORef (customTreeModelGetPrivate model) (Seq.update index value) + modifyIORef (customStoreGetPrivate model) (Seq.update index value) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 188 - $ readIORef (customTreeModelGetPrivate model) + $ readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 193 - liftM Seq.length $ readIORef (customTreeModelGetPrivate model) + liftM Seq.length $ readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 199 - seq <- readIORef (customTreeModelGetPrivate model) + seq <- readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 203 - writeIORef (customTreeModelGetPrivate model) (insert index' value seq) - stamp <- customTreeModelGetStamp model + writeIORef (customStoreGetPrivate model) (insert index' value seq) + stamp <- customStoreGetStamp model hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 214 - modifyIORef (customTreeModelGetPrivate model) + modifyIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 216 - stamp <- customTreeModelGetStamp model + stamp <- customStoreGetStamp model hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 228 - index <- atomicModifyIORef (customTreeModelGetPrivate model) + index <- atomicModifyIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 230 - stamp <- customTreeModelGetStamp model + stamp <- customStoreGetStamp model hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 237 - seq <- readIORef (customTreeModelGetPrivate model) + seq <- readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 241 - writeIORef (customTreeModelGetPrivate model) (seq Seq.>< seq') - stamp <- customTreeModelGetStamp model + writeIORef (customStoreGetPrivate model) (seq Seq.>< seq') + stamp <- customStoreGetStamp model hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 251 - seq <- readIORef (customTreeModelGetPrivate model) + seq <- readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 253 - writeIORef (customTreeModelGetPrivate model) (delete index seq) + writeIORef (customStoreGetPrivate model) (delete index seq) hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 274 - writeIORef (customTreeModelGetPrivate model) seq + writeIORef (customStoreGetPrivate model) seq hunk ./gtk/Graphics/UI/Gtk/ModelView/ListStore.hs.pp 278 - in do seq <- readIORef (customTreeModelGetPrivate model) + in do seq <- readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 75 -newtype TreeStore a = TreeStore (CustomTreeModel (IORef (Store a)) a) +newtype TreeStore a = TreeStore (CustomStore (IORef (Store a)) a) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 127 - customTreeModelNew storeRef TreeStore TreeModelIface { + customStoreNew storeRef TreeStore TreeModelIface { hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 465 - customTreeModelInvalidateIters model - (idx, toggle) <- atomicModifyIORef (customTreeModelGetPrivate model) $ + customStoreInvalidateIters model + (idx, toggle) <- atomicModifyIORef (customStoreGetPrivate model) $ hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 475 - Store { depth = depth } <- readIORef (customTreeModelGetPrivate model) + Store { depth = depth } <- readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 477 - stamp <- customTreeModelGetStamp model + stamp <- customStoreGetStamp model hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 547 - customTreeModelInvalidateIters model - (found, toggle) <- atomicModifyIORef (customTreeModelGetPrivate model) $ + customStoreInvalidateIters model + (found, toggle) <- atomicModifyIORef (customStoreGetPrivate model) $ hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 558 - Store { depth = depth } <- readIORef (customTreeModelGetPrivate model) + Store { depth = depth } <- readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 567 - customTreeModelInvalidateIters model - Store { content = cache } <- readIORef (customTreeModelGetPrivate model) + customStoreInvalidateIters model + Store { content = cache } <- readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 570 - writeIORef (customTreeModelGetPrivate model) Store { + writeIORef (customStoreGetPrivate model) Store { hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 620 - customTreeModelInvalidateIters model + customStoreInvalidateIters model hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 622 - readIORef (customTreeModelGetPrivate model) + readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 629 - writeIORef (customTreeModelGetPrivate model) store' + writeIORef (customStoreGetPrivate model) store' hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 631 - stamp <- customTreeModelGetStamp model + stamp <- customStoreGetStamp model hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 668 - readIORef (customTreeModelGetPrivate model) + readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 672 - writeIORef (customTreeModelGetPrivate model) store { content = cache' } + writeIORef (customStoreGetPrivate model) store { content = cache' } hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 684 - readIORef (customTreeModelGetPrivate model) + readIORef (customStoreGetPrivate model) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 688 - writeIORef (customTreeModelGetPrivate model) store { content = cache' } + writeIORef (customStoreGetPrivate model) store { content = cache' } |
From: Axel S. <si...@co...> - 2008-09-15 21:27:54
|
Mon Sep 15 17:24:55 EDT 2008 A....@ke... * Add a few functions to MessageDialog. hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 74 - --todo: messageDialogSetImage, + messageDialogSetImage, hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 83 +#if GTK_CHECK_VERSION(2,10,0) + messageDialogText, + messageDialogUseMarkup, + messageDialogSecondaryText, + messageDialogSecondaryUseMarkup, + messageDialogImage, +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 117 -{#enum MessageType {underscoreToCase} deriving(Eq)#} +{#enum MessageType {underscoreToCase} deriving(Show,Eq)#} hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 124 -{#enum ButtonsType {underscoreToCase} deriving(Eq)#} +{#enum ButtonsType {underscoreToCase} deriving(Show,Eq)#} hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 136 -{#enum DialogFlags {underscoreToCase} deriving (Eq,Bounded)#} +{#enum DialogFlags {underscoreToCase} deriving (Show,Eq,Bounded)#} hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 249 + +#if GTK_CHECK_VERSION(2,10,0) +-- %hash c:6cb7 d:ebdd +-- | Sets the dialog's image to @image@. +-- +-- * Available since Gtk+ version 2.10 +-- +messageDialogSetImage :: (MessageDialogClass self, WidgetClass image) => self + -> image -- ^ @image@ - the image + -> IO () +messageDialogSetImage self image = + {# call gtk_message_dialog_set_image #} + (toMessageDialog self) + (toWidget image) +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 278 +#if GTK_CHECK_VERSION(2,10,0) +-- %hash c:a2fe d:e4a2 +-- | The primary text of the message dialog. If the dialog has a secondary +-- text, this will appear as the title. +-- +-- Default value: @Nothing@ +-- +-- * Available since Gtk+ version 2.10 +-- +messageDialogText :: MessageDialogClass self => Attr self (Maybe String) +messageDialogText = newAttrFromMaybeStringProperty "text" + +-- %hash c:e1dd d:ca3 +-- | Interpret the string 'messageDialogText' as markup. +-- +-- Default value: @False@ +-- +-- * Available since Gtk+ version 2.10 +-- +messageDialogUseMarkup :: MessageDialogClass self => Attr self Bool +messageDialogUseMarkup = newAttrFromBoolProperty "use-markup" + +-- %hash c:9623 d:1fbe +-- | The secondary text of the message dialog. +-- +-- Default value: @Nothing@ +-- +-- * Available since Gtk+ version 2.10 +-- +messageDialogSecondaryText :: MessageDialogClass self => Attr self (Maybe String) +messageDialogSecondaryText = newAttrFromMaybeStringProperty "secondary-text" + +-- %hash c:1ce2 d:ca3 +-- | Default value: @False@ +-- +-- * Available since Gtk+ version 2.10 +-- +messageDialogSecondaryUseMarkup :: MessageDialogClass self => Attr self Bool +messageDialogSecondaryUseMarkup = newAttrFromBoolProperty "secondary-use-markup" + +-- %hash c:da36 d:b7dd +-- | The image for this dialog. +-- +-- * Available since Gtk+ version 2.10 +-- +messageDialogImage :: (MessageDialogClass self, WidgetClass widget) => ReadWriteAttr self Widget widget +messageDialogImage = newAttrFromObjectProperty "image" + {# call pure unsafe gtk_widget_get_type #} +#endif + |
From: Axel S. <si...@co...> - 2008-09-15 21:27:50
|
Mon Sep 15 17:24:39 EDT 2008 A....@ke... * Hijack the copyright of these orphaned modules. hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 4 --- Author : [Insert your full name here] +-- Author : Axel Simon hunk ./gtk/Graphics/UI/Gtk/Windows/MessageDialog.chs.pp 8 --- Copyright (C) 2006 [Insert your full name here] +-- Copyright (C) 2006 Axel Simon |
From: Axel S. <si...@co...> - 2008-09-15 21:27:49
|
Mon Sep 15 17:24:17 EDT 2008 A....@ke... * Export missing flags. hunk ./gtk/Graphics/UI/Gtk/Selectors/FileFilter.chs.pp 60 + FileFilterFlags(..), hunk ./gtk/Graphics/UI/Gtk/Selectors/FileFilter.chs.pp 94 -{# enum FileFilterFlags {underscoreToCase} deriving(Bounded) #} +{# enum FileFilterFlags {underscoreToCase} deriving(Bounded,Show,Eq) #} |
From: Axel S. <si...@co...> - 2008-09-15 21:27:47
|
Mon Sep 15 17:23:41 EDT 2008 A....@ke... * Fix a link in the documentation to refer to object DrawWindow. hunk ./gtk/Graphics/UI/Gtk/Pango/Layout.chs.pp 33 --- * The objects in this model contain a rendered paragraph of text. This --- interface is the easiest way to render text with Cairo or into a --- 'Graphics.UI.Gtk.Gdk.DrawWindow'. +-- * The 'PangoLayout' object defined in this module contain a rendered +-- paragraph of text. This interface is the easiest way to render text into +-- a 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawWindow' using Cairo. |
From: Axel S. <si...@co...> - 2008-09-15 21:27:47
|
Mon Sep 15 17:17:39 EDT 2008 A....@ke... * Add a treeModelValueGet function. This patch makes it possible to retrieve the content of a store using the TreeModel interface, that is, by using predefined columns. The ColumnId type had to be amended for that. I used the opportunity to move its definition to the TreeModel module, where it belongs. As a consequence the two functions in CustomStore whose name started with treeModel have been renamed to customStoreGetRow and customStoreSetColumn since they really only make sense on implementations of CustomStores. The original names are no longer documented but still exported in order not to break exisiting programs. hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 150 -{#import Graphics.UI.Gtk.ModelView.CustomStore#} (ColumnId(..), - makeColumnIdString, - columnIdToNumber, - treeModelSetColumn) +{#import Graphics.UI.Gtk.ModelView.CustomStore#} (customStoreSetColumn) +{#import Graphics.UI.Gtk.ModelView.TreeModel#} (ColumnId(..), + makeColumnIdString, + columnIdToNumber) + hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 217 - treeModelSetColumn model strCol id + customStoreSetColumn model strCol id hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 155 +{#import Graphics.UI.Gtk.ModelView.TreeModel#} [_$_] hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 401 - value <- treeModelGetRow model iter + value <- customStoreGetRow model iter hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 91 -import Graphics.UI.Gtk.ModelView.ComboBox +import Graphics.UI.Gtk.MenuComboToolbar.ComboBox hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 95 +{#import Graphics.UI.Gtk.ModelView.TreeModel#} [_$_] hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 140 - treeModelSetColumn store colId extract + customStoreSetColumn store colId extract hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererCombo.chs.pp 81 -{#import Graphics.UI.Gtk.ModelView.CustomStore#} +{#import Graphics.UI.Gtk.ModelView.TreeModel#} hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 35 - treeModelGetRow, + customStoreGetRow, + customStoreSetColumn, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 40 - - -- * Extracting a specific datum from the row-oriented store for - -- properties that are not drawn by 'CellRenderer's. - ColumnId, - makeColumnIdInt, - makeColumnIdBool, - makeColumnIdString, - makeColumnIdPixbuf, - columnIdToNumber, - invalidColumnId, + -- for backwards compatability, not documented + treeModelGetRow, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 88 --- | Accessing a row for a specific value. Used for 'ColumnMap'. -data ColumnAccess row - = CAInvalid - | CAInt (row -> Int) - | CABool (row -> Bool) - | CAString (row -> String) - | CAPixbuf (row -> Pixbuf) - hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 95 --- | The type of a tree column. -data ColumnId row ty = ColumnId ((row -> ty) -> ColumnAccess row) Int - --- | Create a 'ColumnId' to extract an integer. -makeColumnIdInt :: Int -> ColumnId row Int -makeColumnIdInt = ColumnId CAInt - --- | Create a 'ColumnId' to extract an Boolean. -makeColumnIdBool :: Int -> ColumnId row Bool -makeColumnIdBool = ColumnId CABool - --- | Create a 'ColumnId' to extract an string. -makeColumnIdString :: Int -> ColumnId row String -makeColumnIdString = ColumnId CAString - --- | Create a 'ColumnId' to extract an 'Pixbuf'. -makeColumnIdPixbuf :: Int -> ColumnId row Pixbuf -makeColumnIdPixbuf = ColumnId CAPixbuf - --- | Convert a 'ColumnId' to a bare number. -columnIdToNumber :: ColumnId row ty -> Int -columnIdToNumber (ColumnId _ i) = i - --- | The invalid 'ColumnId'. Widgets use this value if no column id has --- been set. -invalidColumnId :: ColumnId row ty -invalidColumnId = ColumnId (error "invalidColumnId: no access type") (-1) - -instance Eq (ColumnId row ty) where - (ColumnId _ i1) == (ColumnId _ i2) = i1==i2 - -instance Show (ColumnId row ty) where - show (ColumnId _ i) = show i - [_$_] --- | Set or update a column mapping. -treeModelSetColumn :: TypedTreeModelClass model +-- | Set or update a column mapping. This function should be used before +-- the model is installed into a widget since the number of defined +-- columns are only checked once by widgets. +customStoreSetColumn :: TypedTreeModelClass model hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 103 -treeModelSetColumn model (ColumnId setter colId) acc | colId<0 = return () - | otherwise = +customStoreSetColumn model (ColumnId _ setter colId) acc | colId<0 = return () + | otherwise = hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 119 +-- this is a backwards compatability definition +treeModelSetColumn :: TypedTreeModelClass model + => model row -- ^ the store in which to allocate a new column + -> (ColumnId row ty) -- ^ the column that should be set + -> (row -> ty) -- ^ the function that sets the property + -> IO () +treeModelSetColumn = customStoreSetColumn + hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 194 -treeModelGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row -treeModelGetRow model iter = [_$_] +-- | Extract a row of the given model at the given 'TreeIter'. +-- +customStoreGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row +customStoreGetRow model iter = [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 203 +-- this is a backwards compatability definition +treeModelGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row +treeModelGetRow = customStoreGetRow + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 29 --- [_$_] +-- [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 31 --- 'TreeView' widget. In other words, this module exposes the C interface that --- Gtk uses to populate the 'TreeView' widget. While this module is an --- interface from the perspective of Gtk, this module provides a skeleton to --- create an object that implements this interface. Two implementations that --- come with Gtk2Hs are 'ListStore' and 'TreeStore'. +-- 'TreeView' and similar widgets. Specifically, the functions in defined here +-- are used by Gtk's widgets to access the stored data. Thus, rather than +-- calling these functions, an application programmer has to implement them. +-- While the module "Graphics.UI.Gtk.ModelView.CustomStore" provides the +-- necessary functions to implement the 'TreeMode' interface, it is often +-- sufficient to use the wo implementations that come with Gtk2Hs, namely are +-- 'ListStore' and 'TreeStore'. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 48 --- other interfaces making drag and drop and storing data trivial. +-- other interfaces, making drag and drop and storing data trivial. +-- +-- A 'TreeModel' stores records of the same type. Each record is referred to +-- as row, just like in a relational database. Defining how the information of +-- a row is displayed can be done in two ways: If the widget displays data +-- using 'Graphics.UI.Gtk.ModelView.CellRenderer.CellRenderer' or one of its +-- derivatives, it is possible to state how a row is mapped to the attributes +-- of a renderer using the +-- 'Graphics.UI.Gtk.ModelView.CellLayout.cellLayoutSetAttributes' function. +-- Some widgets do not use +-- 'Graphics.UI.Gtk.ModelView.CellRenderer.CellRenderer's to display their +-- data. In this case an extraction function can be defined that maps a row to +-- one of a few basic types (like 'String's or 'Int's). This extraction +-- function is associated with a 'ColumnId' using +-- 'Graphics.UI.Gtk.ModelView.CustomStore.treeModelSetColumn'. The latter can +-- be set in the widget for the property that should be set. The widget then +-- uses the function 'treeModelGetValue' and the 'ColumnId' to extract the +-- value from the model. As the name suggests, using 'ColumnId's creates a +-- view of the data as if each row were divided into a well-defined set of +-- columns, again, like a relational database. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 111 + ColumnId, + +-- * Constructors + makeColumnIdInt, + makeColumnIdBool, + makeColumnIdString, + makeColumnIdPixbuf, + invalidColumnId, + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 121 + columnIdToNumber, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 128 + treeModelGetValue, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 179 - stringToTreePath) - + stringToTreePath, + ColumnId(..), + ColumnAccess(..)) +{#import System.Glib.GValueTypes#} ( valueGetInt, valueGetBool, + valueGetString, valueGetGObject ) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 186 +-------------------- +-- Constructors + + +-- | Create a 'ColumnId' to extract an integer. +makeColumnIdInt :: Int -> ColumnId row Int +makeColumnIdInt = ColumnId valueGetInt CAInt + +-- | Create a 'ColumnId' to extract an Boolean. +makeColumnIdBool :: Int -> ColumnId row Bool +makeColumnIdBool = ColumnId valueGetBool CABool + +-- | Create a 'ColumnId' to extract an string. +makeColumnIdString :: Int -> ColumnId row String +makeColumnIdString = ColumnId valueGetString CAString + +-- | Create a 'ColumnId' to extract an 'Pixbuf'. +makeColumnIdPixbuf :: Int -> ColumnId row Pixbuf +makeColumnIdPixbuf = ColumnId valueGetGObject CAPixbuf + +-- | Convert a 'ColumnId' to a bare number. +columnIdToNumber :: ColumnId row ty -> Int +columnIdToNumber (ColumnId _ _ i) = i + +-- | The invalid 'ColumnId'. Widgets use this value if no column id has +-- been set. +invalidColumnId :: ColumnId row ty +invalidColumnId = ColumnId (error "invalidColumnId: no GValue extractor") + (error "invalidColumnId: no access type") (-1) + +instance Eq (ColumnId row ty) where + (ColumnId _ _ i1) == (ColumnId _ _ i2) = i1==i2 + +instance Show (ColumnId row ty) where + show (ColumnId _ _ i) = show i + [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 301 +-- | Read the value of at a specific column and 'TreeIter'. +-- +treeModelGetValue :: TreeModelClass self => self + -> TreeIter + -> ColumnId row ty -- ^ @column@ - The column to lookup the value at. + -> IO ty +treeModelGetValue self iter (ColumnId getter _ colId) = + allocaGValue $ \gVal -> + with iter $ \iterPtr -> do + {# call tree_model_get_value #} + (toTreeModel self) + iterPtr + (fromIntegral colId) + gVal + getter gVal [_$_] + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 26 --- All functions related to drag and drop are missing. +-- The following functions related to drag and drop: +-- treeViewSetDragDestRow, treeViewGetDragDestRow, treeViewGetDestRowAtPos +-- these seem to be useful only in cases when the user wants to implement +-- drag and drop himself rather than use the widget's implementation. I +-- think this would be a bad idea in the first place. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 145 + treeViewGetSearchColumn, + treeViewSetSearchColumn, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 165 + treeViewUnsetRowsDragSource, + treeViewUnsetRowsDragDest, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 191 -#if GTK_CHECK_VERSION(2,6,0) + treeViewSearchColumn, +#if GTK_CHECK_VERSION(2,4,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 194 +#if GTK_CHECK_VERSION(2,6,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 198 +#endif + treeViewShowExpanders, + treeViewLevelIndentation, + treeViewRubberBanding, + treeViewEnableGridLines, + treeViewEnableTreeLines, + treeViewGridLines, + treeViewSearchEntry, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 208 + columnsChanged, + cursorChanged, + rowCollapsed, + rowExpanded, + testCollapseRow, + testExpandRow, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 233 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 254 +import Graphics.UI.Gtk.ModelView.TreeModel (ColumnId, columnIdToNumber, + makeColumnIdString) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1021 +-- %hash c:ecc5 d:bed6 +-- | Gets the column searched on by the interactive search code. +-- +treeViewGetSearchColumn :: TreeViewClass self => self + -> IO (ColumnId row String) -- ^ returns the column the interactive search code searches in. +treeViewGetSearchColumn self = + liftM (makeColumnIdString . fromIntegral) $ + {# call unsafe tree_view_get_search_column #} + (toTreeView self) + +-- %hash c:d0d0 +-- | Sets @column@ as the column where the interactive search code should +-- search in. +-- +-- If the sort column is set, users can use the \"start-interactive-search\" +-- key binding to bring up search popup. The enable-search property controls +-- whether simply typing text will also start an interactive search. +-- +-- Note that @column@ refers to a column of the model. Furthermore, the +-- search column is not used if a comparison function is set, see +-- 'treeViewSetSearchEqualFunc'. +-- +treeViewSetSearchColumn :: TreeViewClass self => self + -> (ColumnId row String) -- ^ @column@ - the column of the model to search in, or -1 to disable + -- searching + -> IO () +treeViewSetSearchColumn self column = + {# call tree_view_set_search_column #} + (toTreeView self) + (fromIntegral (columnIdToNumber column)) + + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1056 --- and the row of the model match. +-- and the row of the model match. Calling this function will overwrite +-- the 'treeViewSearchColumn' (which isn't used anyway when a comparison +-- function is installed). hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1245 - [_$_] + +-- %hash c:5201 d:f3be +-- | Undoes the effect of 'treeViewEnableModelDragSource'. +-- +treeViewUnsetRowsDragSource :: TreeViewClass self => self -> IO () +treeViewUnsetRowsDragSource self = + {# call gtk_tree_view_unset_rows_drag_source #} + (toTreeView self) + +-- %hash c:e31e d:323d +-- | Undoes the effect of 'treeViewEnableModelDragDest'. +-- +treeViewUnsetRowsDragDest :: TreeViewClass self => self -> IO () +treeViewUnsetRowsDragDest self = + {# call gtk_tree_view_unset_rows_drag_dest #} + (toTreeView self) + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1494 -#if GTK_CHECK_VERSION(2,6,0) --- | Setting the fixed-height-mode property to @True@ speeds up 'TreeView' +-- %hash c:e732 +-- | Model column to search through when searching through code. +-- +-- Allowed values: >= -1 +-- +-- Default value: -1 +-- +treeViewSearchColumn :: TreeViewClass self => Attr self (ColumnId row String) +treeViewSearchColumn = newAttr + treeViewGetSearchColumn + treeViewSetSearchColumn + +#if GTK_CHECK_VERSION(2,4,0) +-- %hash c:c7ff d:24d1 +-- | Setting the 'treeViewFixedHeightMode' property to @True@ speeds up 'TreeView' hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1515 +-- * Available since Gtk+ version 2.4 +-- hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1518 -treeViewFixedHeightMode = newAttr - treeViewGetFixedHeightMode - treeViewSetFixedHeightMode +treeViewFixedHeightMode = newAttrFromBoolProperty "fixed-height-mode" hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1520 --- | Enables of disables the hover selection mode of the tree view. Hover +#if GTK_CHECK_VERSION(2,6,0) +-- %hash c:2026 d:839a +-- | Enables of disables the hover selection mode of @treeView@. Hover hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1526 --- This mode is primarily indended for treeviews in popups, e.g. in +-- This mode is primarily intended for 'TreeView's in popups, e.g. in hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1531 +-- * Available since Gtk+ version 2.6 +-- hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1534 -treeViewHoverSelection = newAttr - treeViewGetHoverSelection - treeViewSetHoverSelection +treeViewHoverSelection = newAttrFromBoolProperty "hover-selection" hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1536 --- | Enables of disables the hover expansion mode of the tree view. Hover +-- %hash c:c694 d:3f15 +-- | Enables of disables the hover expansion mode of @treeView@. Hover hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1540 --- This mode is primarily indended for treeviews in popups, e.g. in +-- This mode is primarily intended for 'TreeView's in popups, e.g. in hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1545 +-- * Available since Gtk+ version 2.6 +-- hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1548 -treeViewHoverExpand = newAttr - treeViewGetHoverExpand - treeViewSetHoverExpand +treeViewHoverExpand = newAttrFromBoolProperty "hover-expand" hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1550 +#endif + +-- %hash c:b409 d:2ed2 +-- | View has expanders. +-- +-- Default value: @True@ +-- +treeViewShowExpanders :: TreeViewClass self => Attr self Bool +treeViewShowExpanders = newAttrFromBoolProperty "show-expanders" + +-- %hash c:f0e5 d:9017 +-- | Extra indentation for each level. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +treeViewLevelIndentation :: TreeViewClass self => Attr self Int +treeViewLevelIndentation = newAttrFromIntProperty "level-indentation" + +-- %hash c:a647 d:9e53 +-- | Whether to enable selection of multiple items by dragging the mouse +-- pointer. +-- +-- Default value: @False@ +-- +treeViewRubberBanding :: TreeViewClass self => Attr self Bool +treeViewRubberBanding = newAttrFromBoolProperty "rubber-banding" + +-- %hash c:e926 d:86a8 +-- | Whether grid lines should be drawn in the tree view. +-- +-- Default value: 'TreeViewGridLinesNone' +-- +treeViewEnableGridLines :: TreeViewClass self => Attr self TreeViewGridLines +treeViewEnableGridLines = newAttrFromEnumProperty "enable-grid-lines" + {# call pure unsafe gtk_tree_view_grid_lines_get_type #} + +-- %hash c:a7eb d:4c53 +-- | Whether tree lines should be drawn in the tree view. +-- +-- Default value: @False@ +-- +treeViewEnableTreeLines :: TreeViewClass self => Attr self Bool +treeViewEnableTreeLines = newAttrFromBoolProperty "enable-tree-lines" + +-- %hash c:688c d:cbcd +-- | \'gridLines\' property. See 'treeViewGetGridLines' and +-- 'treeViewSetGridLines' +-- +treeViewGridLines :: TreeViewClass self => Attr self TreeViewGridLines +treeViewGridLines = newAttr + treeViewGetGridLines + treeViewSetGridLines + +-- %hash c:9cbe d:2962 +-- | \'searchEntry\' property. See 'treeViewGetSearchEntry' and +-- 'treeViewSetSearchEntry' +-- +treeViewSearchEntry :: (TreeViewClass self, EntryClass entry) => ReadWriteAttr self (Maybe Entry) (Maybe entry) +treeViewSearchEntry = newAttr + treeViewGetSearchEntry + treeViewSetSearchEntry hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1617 +-- %hash c:9fc5 d:3e66 +-- | The given row is about to be expanded (show its children nodes). Use this +-- signal if you need to control the expandability of individual rows. +-- +testExpandRow :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO Bool) +testExpandRow = Signal (connect_BOXED_BOXED__BOOL "test-expand-row" peek readNTP) + +-- %hash c:20de d:96a3 +-- | The given row is about to be collapsed (hide its children nodes). Use +-- this signal if you need to control the collapsibility of individual rows. +-- +testCollapseRow :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO Bool) +testCollapseRow = Signal (connect_BOXED_BOXED__BOOL "test-collapse-row" peek readNTP) + +-- %hash c:16dc d:b113 +-- | The given row has been expanded (child nodes are shown). +-- +rowExpanded :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO ()) +rowExpanded = Signal (connect_BOXED_BOXED__NONE "row-expanded" peek readNTP) + +-- %hash c:9ee6 d:325e +-- | The given row has been collapsed (child nodes are hidden). +-- +rowCollapsed :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO ()) +rowCollapsed = Signal (connect_BOXED_BOXED__NONE "row-collapsed" peek readNTP) + +-- %hash c:4350 d:4f94 +-- | The number of columns of the treeview has changed. +-- +columnsChanged :: TreeViewClass self => Signal self (IO ()) +columnsChanged = Signal (connect_NONE__NONE "columns-changed") + +-- %hash c:6487 d:5b57 +-- | The position of the cursor (focused cell) has changed. +-- +cursorChanged :: TreeViewClass self => Signal self (IO ()) +cursorChanged = Signal (connect_NONE__NONE "cursor-changed") + +-------------------- +-- Deprecated Signals + +#ifndef DISABLE_DEPRECATED + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1757 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 53 - stringToTreePath [_$_] + stringToTreePath, + [_$_] + -- Columns + ColumnAccess(..), + ColumnId(..), [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 63 -{#import Graphics.UI.Gtk.Types#} (TreeModel, TreeModelSort, TreeModelFilter) +import System.Glib.GValue (GValue) +{#import Graphics.UI.Gtk.Types#} (TreeModel, TreeModelSort, TreeModelFilter, + Pixbuf) hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 233 + +-- | Accessing a row for a specific value. Used for 'ColumnMap'. +data ColumnAccess row + = CAInvalid + | CAInt (row -> Int) + | CABool (row -> Bool) + | CAString (row -> String) + | CAPixbuf (row -> Pixbuf) + +-- | The type of a tree column. +data ColumnId row ty [_$_] + = ColumnId (GValue -> IO ty) ((row -> ty) -> ColumnAccess row) Int + |
From: Axel S. <si...@co...> - 2008-09-15 21:27:45
|
Mon Sep 15 17:17:08 EDT 2008 A....@ke... * Add a few Show and Eq instances to Cairo. hunk ./cairo/Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs 28 +{#fun surface_get_content as surfaceGetContent { withSurface* `Surface' } -> `Content' cToEnum#} hunk ./cairo/Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs 34 - hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 100 -{#enum status_t as Status {underscoreToCase} deriving(Eq)#} +{#enum status_t as Status {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 104 -{#enum operator_t as Operator {underscoreToCase}#} +{#enum operator_t as Operator {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 119 -{#enum antialias_t as Antialias {underscoreToCase}#} +{#enum antialias_t as Antialias {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 141 -{#enum fill_rule_t as FillRule {underscoreToCase}#} +{#enum fill_rule_t as FillRule {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 153 -{#enum line_cap_t as LineCap {underscoreToCase}#} +{#enum line_cap_t as LineCap {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 157 -{#enum line_join_t as LineJoin {underscoreToCase}#} +{#enum line_join_t as LineJoin {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 233 -{#enum font_slant_t as FontSlant {underscoreToCase}#} +{#enum font_slant_t as FontSlant {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 236 -{#enum font_weight_t as FontWeight {underscoreToCase}#} +{#enum font_weight_t as FontWeight {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 257 -{#enum subpixel_order_t as SubpixelOrder {underscoreToCase}#} +{#enum subpixel_order_t as SubpixelOrder {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 297 -{#enum hint_metrics_t as HintMetrics {underscoreToCase}#} +{#enum hint_metrics_t as HintMetrics {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 334 -{#enum content_t as Content {underscoreToCase}#} +{#enum content_t as Content {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 340 - deriving (Enum) + deriving (Enum,Show,Eq) hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 343 -{#enum extend_t as Extend {underscoreToCase}#} +{#enum extend_t as Extend {underscoreToCase} deriving(Eq,Show)#} hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 346 -{#enum filter_t as Filter {underscoreToCase}#} +{#enum filter_t as Filter {underscoreToCase} deriving(Eq,Show)#} hunk ./gtk/Graphics/UI/Gtk/Cairo.chs.pp 49 + -- * Using 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf' functions together with Cairo + cairoImageSurfaceFromPixbuf, + pixbufFromImageSurface, hunk ./gtk/Graphics/UI/Gtk/Cairo.chs.pp 75 -import System.Glib.GObject (constructNewGObject, makeNewGObject) +import System.Glib.GObject (constructNewGObject, makeNewGObject, + objectRef, objectUnref) hunk ./gtk/Graphics/UI/Gtk/Cairo.chs.pp 80 +{#import Graphics.UI.Gtk.Gdk.Pixbuf#} ( pixbufGetHasAlpha, pixbufGetNChannels, + pixbufGetColorSpace, pixbufGetWidth, pixbufGetHeight, pixbufGetRowstride, + Colorspace(..) ) hunk ./gtk/Graphics/UI/Gtk/Cairo.chs.pp 99 +-- | Treat a 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf' as an image +-- 'Graphics..Rendering.Cairo.Surface'. +-- +-- * The image data is shared between the two objects. Note that everytime you +-- use 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf' functions on the image, it is +-- necessary to tell Cairo that the image data has changed using +-- 'Graphics..Rendering.Cairo.surfaceMarkDirty' since it might cache certain areas of +-- an image. +-- +cairoImageSurfaceFromPixbuf :: Pixbuf -> IO Surface +cairoImageSurfaceFromPixbuf pb = do + alpha <- pixbufGetHasAlpha pb + chan <- pixbufGetNChannels pb + cs <- pixbufGetColorSpace pb + width <- pixbufGetWidth pb + height <- pixbufGetHeight pb + stride <- pixbufGetRowstride pb + cairoFormat <- case (alpha, chan, cs) of + (True, 4, ColorspaceRgb) -> return FormatARGB32 + (False, 3, ColorspaceRgb) -> return FormatRGB24 + (_, 1, _) -> return FormatA8 -- pixbuf doesn't actually do that + _ -> error "cairoImageSurfaceFromPixbuf: cannot create cairo context form given format" + dPtr <- {#call unsafe pixbuf_get_pixels#} pb + sfPtr <- {#call cairo_image_surface_create_for_data#} dPtr + (fromIntegral (fromEnum cairoFormat)) (fromIntegral width) + (fromIntegral height) (fromIntegral stride) + sf <- mkSurface sfPtr + let pbPtr = unsafeForeignPtrToPtr (unPixbuf pb) + objectRef pbPtr + {#call cairo_surface_set_user_data#} sf (castPtr pbPtr) + (castPtr pbPtr) objectUnref + manageSurface sf + return sf + [_$_] +-- | Treat an image 'Graphics.Rendering.Cairo.Surface' as a +-- 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf'. +-- +-- * The image data is shared between the two objects. Note that everytime you +-- use 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf' functions on the image, it is +-- necessary to tell Cairo that the image data has changed using +-- 'Graphics.Rendering.Cairo.surfaceMarkDirty' since it might cache certain +-- areas of an image. This function throws an error if the +-- 'Graphics.Rendering.Cairo.Surface' has any other format than +-- 'Graphics.Rendering.Cairo.FormatARGB32' or +-- 'Graphics.Rendering.Cairo.FormatRGB32' since +-- 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf' can currently only handle these two +-- formats. +-- +pixbufFromImageSurface :: Surface -> IO Pixbuf +pixbufFromImageSurface sf = do + con <- Cairo.Internal.surfaceGetContent sf + hasAlpha <- case con of + Cairo.Internal.ContentColor -> return False + Cairo.Internal.ContentColorAlpha -> return True + _ -> error ("pixbufFromImageSurface: Pixbufs do not support Cairo format "++show con) [_$_] + width <- Cairo.Internal.imageSurfaceGetWidth sf + height <- Cairo.Internal.imageSurfaceGetHeight sf + stride <- Cairo.Internal.imageSurfaceGetStride sf + dPtr <- Cairo.Internal.imageSurfaceGetData sf + let (Cairo.Surface sfFPtr) = sf + let sfPtr = unsafeForeignPtrToPtr sfFPtr + Cairo.Internal.surfaceReference sf + fPtrRef <- newIORef nullFunPtr + fPtr <- mkPixbufDestroyNotify $ \_ _ -> do + Cairo.Internal.surfaceDestroy sf + fPtr <- readIORef fPtrRef + freeHaskellFunPtr fPtr + writeIORef fPtrRef fPtr + makeNewGObject mkPixbuf $ + {#call unsafe gdk_pixbuf_new_from_data#} dPtr 0 (fromBool hasAlpha) + 8 (fromIntegral width) (fromIntegral height) (fromIntegral stride) + fPtr nullPtr + +{#pointer GdkPixbufDestroyNotify as PixbufDestroyNotify#} + +foreign import ccall "wrapper" mkPixbufDestroyNotify :: + (Ptr () -> Ptr Surface -> IO ()) -> IO PixbufDestroyNotify + |
From: Axel S. <si...@co...> - 2008-09-15 21:27:44
|
Mon Sep 15 17:13:57 EDT 2008 A....@ke... * Add forgotten stub files for Entry and ComboBox hunk ./Makefile.am 639 + gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox_stub.o \ hunk ./Makefile.am 647 - gtk/Graphics/UI/Gtk/ModelView/ComboBox_stub.o \ hunk ./Makefile.am 652 - gtk/Graphics/UI/Gtk/ModelView/EntryCompletion_stub.o \ |
From: Axel S. <si...@co...> - 2008-09-15 21:27:43
|
Sat Sep 13 16:52:04 EDT 2008 A....@ke... * Remove the prefix New. Add automatic search. hunk ./demo/treeList/ListDemo.hs 4 -import Graphics.UI.Gtk.ModelView as New hunk ./demo/treeList/ListDemo.hs 5 +import Data.List ( isPrefixOf ) +import Data.Char ( toLower ) hunk ./demo/treeList/ListDemo.hs 17 - model <- New.listStoreNew + model <- listStoreNew hunk ./demo/treeList/ListDemo.hs 21 - view <- New.treeViewNewWithModel model - - New.treeViewSetHeadersVisible view True + view <- treeViewNewWithModel model + [_$_] + treeViewSetHeadersVisible view True hunk ./demo/treeList/ListDemo.hs 26 - col1 <- New.treeViewColumnNew - col2 <- New.treeViewColumnNew - col3 <- New.treeViewColumnNew + col1 <- treeViewColumnNew + col2 <- treeViewColumnNew + col3 <- treeViewColumnNew hunk ./demo/treeList/ListDemo.hs 30 - New.treeViewColumnSetTitle col1 "String column" - New.treeViewColumnSetTitle col2 "Int column" - New.treeViewColumnSetTitle col3 "Bool column" + treeViewColumnSetTitle col1 "String column" + treeViewColumnSetTitle col2 "Int column" + treeViewColumnSetTitle col3 "Bool column" hunk ./demo/treeList/ListDemo.hs 34 - renderer1 <- New.cellRendererTextNew - renderer2 <- New.cellRendererTextNew - renderer3 <- New.cellRendererToggleNew + renderer1 <- cellRendererTextNew + renderer2 <- cellRendererTextNew + renderer3 <- cellRendererToggleNew hunk ./demo/treeList/ListDemo.hs 38 - New.cellLayoutPackStart col1 renderer1 True - New.cellLayoutPackStart col2 renderer2 True - New.cellLayoutPackStart col3 renderer3 True + cellLayoutPackStart col1 renderer1 True + cellLayoutPackStart col2 renderer2 True + cellLayoutPackStart col3 renderer3 True hunk ./demo/treeList/ListDemo.hs 42 - New.cellLayoutSetAttributes col1 renderer1 model $ \row -> [ New.cellText := name row ] - New.cellLayoutSetAttributes col2 renderer2 model $ \row -> [ New.cellText := show (number row) ] - New.cellLayoutSetAttributes col3 renderer3 model $ \row -> [ New.cellToggleActive := marked row ] + cellLayoutSetAttributes col1 renderer1 model $ \row -> [ cellText := name row ] + cellLayoutSetAttributes col2 renderer2 model $ \row -> [ cellText := show (number row) ] + cellLayoutSetAttributes col3 renderer3 model $ \row -> [ cellToggleActive := marked row ] hunk ./demo/treeList/ListDemo.hs 46 - New.treeViewAppendColumn view col1 - New.treeViewAppendColumn view col2 - New.treeViewAppendColumn view col3 + treeViewAppendColumn view col1 + treeViewAppendColumn view col2 + treeViewAppendColumn view col3 hunk ./demo/treeList/ListDemo.hs 51 - on renderer3 New.toggled $ \pathStr -> do - let (i:_) = New.stringToTreePath pathStr - val <- New.listStoreGetValue model i - New.listStoreSetValue model i val { marked = not (marked val) } + on renderer3 cellToggled $ \pathStr -> do + let (i:_) = stringToTreePath pathStr + val <- listStoreGetValue model i + listStoreSetValue model i val { marked = not (marked val) } + hunk ./demo/treeList/ListDemo.hs 57 + -- enable interactive search + treeViewSetEnableSearch view True + treeViewSetSearchEqualFunc view $ Just $ \str iter -> do + (i:_) <- treeModelGetPath model iter + row <- listStoreGetValue model i + return (map toLower str `isPrefixOf` map toLower (name row)) + [_$_] |