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: Andy S. <And...@co...> - 2010-09-10 11:50:12
|
diffing dir... Fri Sep 10 07:10:39 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Recent.RecentFilter Ignore-this: fe95de3c28b866dfd8ac65505a3c9ed5 { hunk ./TODO 14 -gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs hunk ./gtk/Graphics/UI/Gtk.chs 209 + module Graphics.UI.Gtk.Recent.RecentFilter, hunk ./gtk/Graphics/UI/Gtk.chs 429 +import Graphics.UI.Gtk.Recent.RecentFilter addfile ./gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs hunk ./gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget RecentFilter +-- +-- Author : Andy Stewart +-- +-- Created: 27 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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 filter for selecting a subset of recently used files +-- +-- * Module available since Gtk+ version 2.10 +-- +module Graphics.UI.Gtk.Recent.RecentFilter ( + +-- * Detail +-- +-- | A 'RecentFilter' can be used to restrict the files being shown in a +-- 'RecentChooser'. Files can be filtered based on their name (with +-- 'recentFilterAddPattern'), on their mime type (with +-- 'fileFilterAddMimeType'), on the application that has registered them (with +-- 'recentFilterAddApplication'), or by a custom filter function (with +-- 'recentFilterAddCustom'). +-- +-- Filtering by mime type handles aliasing and subclassing of mime types; +-- e.g. a filter for text\/plain also matches a file with mime type +-- application\/rtf, since application\/rtf is a subclass of text\/plain. Note +-- that 'RecentFilter' allows wildcards for the subtype of a mime type, so you +-- can e.g. filter for image\/. +-- +-- Normally, filters are used by adding them to a 'RecentChooser', see +-- 'recentChooserAddFilter', but it is also possible to manually use a filter +-- on a file with 'recentFilterFilter'. +-- +-- Recently used files are supported since Gtk+ 2.10. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----RecentFilter +-- @ + +#if GTK_CHECK_VERSION(2,10,0) +-- * Types + RecentFilter, + RecentFilterClass, + castToRecentFilter, + toRecentFilter, + +-- * Enums + RecentFilterFlags(..), + +-- * Constructors + recentFilterNew, + +-- * Methods + recentFilterGetName, + recentFilterSetName, + recentFilterAddMimeType, + recentFilterAddPattern, + recentFilterAddPixbufFormats, + recentFilterAddApplication, + recentFilterAddGroup, + recentFilterAddAge, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.UTFString +import System.Glib.Flags (Flags, toFlags, fromFlags) +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,10,0) +--------------------- +-- Enums +-- | These flags indicate what parts of a 'RecentFilterInfo' struct are filled or need to be filled. +{#enum RecentFilterFlags {underscoreToCase} deriving (Bounded,Eq,Show)#} + +-------------------- +-- Constructors + +-- | Creates a new 'RecentFilter' with no rules added to it. Such filter does +-- not accept any recently used resources, so is not particularly useful until +-- you add rules with 'recentFilterAddPattern', 'recentFilterAddMimeType', +-- 'recentFilterAddApplication', 'recentFilterAddAge'. To create a filter that +-- accepts any recently used resource, use: +-- +-- > filter <- recentFilterNew +-- > recentFilterAddPattern filter "*" +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterNew :: IO RecentFilter +recentFilterNew = + makeNewObject mkRecentFilter $ + {# call gtk_recent_filter_new #} + +-------------------- +-- Methods +-- | Gets the human-readable name for the filter. See 'recentFilterSetName'. +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterGetName :: RecentFilterClass self => self + -> IO String -- ^ returns the name of the filter +recentFilterGetName self = + {# call gtk_recent_filter_get_name #} + (toRecentFilter self) + >>= peekUTFString + +-- | Sets the human-readable name of the filter; this is the string that will be displayed in the +-- recently used resources selector user interface if there is a selectable list of filters. +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterSetName :: RecentFilterClass self => self + -> String -- ^ @name@ - then human readable name of @filter@ + -> IO () +recentFilterSetName self name = + withUTFString name $ \namePtr -> + {# call gtk_recent_filter_set_name #} + (toRecentFilter self) + namePtr + +-- | Adds a rule that allows resources based on their registered MIME type. +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterAddMimeType :: RecentFilterClass self => self + -> String -- ^ @mimeType@ - a MIME type + -> IO () +recentFilterAddMimeType self mimeType = + withUTFString mimeType $ \mimeTypePtr -> + {# call gtk_recent_filter_add_mime_type #} + (toRecentFilter self) + mimeTypePtr + +-- | Adds a rule that allows resources based on a pattern matching their +-- display name. +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterAddPattern :: RecentFilterClass self => self + -> String -- ^ @pattern@ - a file pattern + -> IO () +recentFilterAddPattern self pattern = + withUTFString pattern $ \patternPtr -> + {# call gtk_recent_filter_add_pattern #} + (toRecentFilter self) + patternPtr + +-- | Adds a rule allowing image files in the formats supported by 'Pixbuf'. +-- +recentFilterAddPixbufFormats :: RecentFilterClass self => self -> IO () +recentFilterAddPixbufFormats self = + {# call gtk_recent_filter_add_pixbuf_formats #} + (toRecentFilter self) + +-- | Adds a rule that allows resources based on the name of the application +-- that has registered them. +-- +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterAddApplication :: RecentFilterClass self => self + -> String -- ^ @application@ - an application name + -> IO () +recentFilterAddApplication self application = + withUTFString application $ \applicationPtr -> + {# call gtk_recent_filter_add_application #} + (toRecentFilter self) + applicationPtr + +-- | Adds a rule that allows resources based on the name of the group to which +-- they belong +-- +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterAddGroup :: RecentFilterClass self => self + -> String -- ^ @group@ - a group name + -> IO () +recentFilterAddGroup self group = + withUTFString group $ \groupPtr -> + {# call gtk_recent_filter_add_group #} + (toRecentFilter self) + groupPtr + +-- | Adds a rule that allows resources based on their age - that is, the +-- number of days elapsed since they were last modified. +-- +-- * Available since Gtk+ version 2.10 +-- +recentFilterAddAge :: RecentFilterClass self => self + -> Int -- ^ @days@ - number of days + -> IO () +recentFilterAddAge self days = + {# call gtk_recent_filter_add_age #} + (toRecentFilter self) + (fromIntegral days) +#endif hunk ./gtk/gtk.cabal 291 + Graphics.UI.Gtk.Recent.RecentFilter hunk ./gtk/hierarchy.list 58 + GtkRecentFilter if gtk-2.10 } |
From: Andy S. <And...@co...> - 2010-09-10 10:23:13
|
diffing dir... Fri Sep 10 06:21:40 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Recent.RecentChooserWidget Ignore-this: 357ea34c1443e83f4fef21e035685262 { hunk ./TODO 14 -gtk/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs hunk ./gtk/Graphics/UI/Gtk.chs 208 + module Graphics.UI.Gtk.Recent.RecentChooserWidget, hunk ./gtk/Graphics/UI/Gtk.chs 427 +import Graphics.UI.Gtk.Recent.RecentChooserWidget addfile ./gtk/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget RecentChooserWidget +-- +-- Author : Andy Stewart +-- +-- Created: 27 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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) +-- +-- Displays recently used files +-- +-- * Module available since Gtk+ version 2.10 +-- +module Graphics.UI.Gtk.Recent.RecentChooserWidget ( + +-- * Detail +-- +-- | 'RecentChooserWidget' is a widget suitable for selecting recently used +-- files. It is the main building block of a 'RecentChooserDialog'. Most +-- applications will only need to use the latter; you can use +-- 'RecentChooserWidget' as part of a larger window if you have special needs. +-- +-- Note that 'RecentChooserWidget' does not have any methods of its own. +-- Instead, you should use the functions that work on a 'RecentChooser'. +-- +-- Recently used files are supported since Gtk+ 2.10. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Box' +-- | +----'VBox' +-- | +----RecentChooserWidget +-- @ + +#if GTK_CHECK_VERSION(2,10,0) +-- * Types + RecentChooserWidget, + RecentChooserWidgetClass, + castToRecentChooserWidget, + toRecentChooserWidget, + +-- * Constructors + recentChooserWidgetNew, + recentChooserWidgetNewForManager, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +{#import Graphics.UI.Gtk.Types#} +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,10,0) + +-------------------- +-- Constructors + +-- | Creates a new 'RecentChooserWidget' object. This is an embeddable widget +-- used to access the recently used resources list. +-- +recentChooserWidgetNew :: IO RecentChooserWidget +recentChooserWidgetNew = + makeNewObject mkRecentChooserWidget $ + liftM (castPtr :: Ptr Widget -> Ptr RecentChooserWidget) $ + {# call gtk_recent_chooser_widget_new #} + +-- | Creates a new 'RecentChooserWidget' with a specified recent manager. +-- +-- This is useful if you have implemented your own recent manager, or if you +-- have a customized instance of a 'RecentManager' object. +-- +recentChooserWidgetNewForManager :: RecentManagerClass manager [_$_] + => manager -- ^ @manager@ - a 'RecentManager' + -> IO RecentChooserWidget -- ^ returns a new 'RecentChooserWidget' [_$_] +recentChooserWidgetNewForManager manager = + makeNewObject mkRecentChooserWidget $ + liftM (castPtr :: Ptr Widget -> Ptr RecentChooserWidget) $ + {# call gtk_recent_chooser_widget_new_for_manager #} + (toRecentManager manager) +#endif hunk ./gtk/gtk.cabal 290 + Graphics.UI.Gtk.Recent.RecentChooserWidget hunk ./gtk/hierarchy.list 124 + GtkRecentChooserWidget if gtk-2.10 } |
From: Andy S. <And...@co...> - 2010-09-10 10:16:09
|
diffing dir... Fri Sep 10 06:13:16 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Recent.RecentChooserMenu Ignore-this: 51ac97c7913fbce8351e4dbc84760d2d { hunk ./TODO 6 -gtk/Graphics/UI/Gtk/MenuComboToolbar/Item.chs -gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolShell.chs - hunk ./TODO 14 -gtk/Graphics/UI/Gtk/Recent/RecentChooserDialog.chs -gtk/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs hunk ./gtk/Graphics/UI/Gtk.chs 206 + -- * Recent + module Graphics.UI.Gtk.Recent.RecentChooserMenu, hunk ./gtk/Graphics/UI/Gtk.chs 424 +-- recent +import Graphics.UI.Gtk.Recent.RecentChooserMenu adddir ./gtk/Graphics/UI/Gtk/Recent addfile ./gtk/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget RecentChooserMenu +-- +-- Author : Andy Stewart +-- +-- Created: 27 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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) +-- +-- Displays recently used files in a menu +-- +-- * Module available since Gtk+ version 2.10 +-- +module Graphics.UI.Gtk.Recent.RecentChooserMenu ( + +-- * Detail +-- +-- | 'RecentChooserMenu' is a widget suitable for displaying recently used +-- files inside a menu. It can be used to set a sub-menu of a 'MenuItem' using +-- 'menuItemSetSubmenu', or as the menu of a 'MenuToolButton'. +-- +-- Note that 'RecentChooserMenu' does not have any methods of its own. +-- Instead, you should use the functions that work on a 'RecentChooser'. +-- +-- Note also that 'RecentChooserMenu' does not support multiple filters, as +-- it has no way to let the user choose between them as the +-- 'RecentChooserWidget' and 'RecentChooserDialog' widgets do. Thus using +-- 'recentChooserAddFilter' on a 'RecentChooserMenu' widget will yield the same +-- effects as using 'recentChooserSetFilter', replacing any currently set +-- filter with the supplied filter; 'recentChooserRemoveFilter' will remove any +-- currently set 'RecentFilter' object and will unset the current filter; +-- 'recentChooserListFilters' will return a list containing a single +-- 'RecentFilter' object. +-- +-- Recently used files are supported since Gtk+ 2.10. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'MenuShell' +-- | +----'Menu' +-- | +----RecentChooserMenu +-- @ + +#if GTK_CHECK_VERSION(2,10,0) +-- * Types + RecentChooserMenu, + RecentChooserMenuClass, + castToRecentChooserMenu, + toRecentChooserMenu, + +-- * Constructors + recentChooserMenuNew, + recentChooserMenuNewForManager, + +-- * Attributes + recentChooserMenuShowNumbers, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,10,0) + +-------------------- +-- Constructors + +-- | Creates a new 'RecentChooserMenu' widget. +-- +-- This kind of widget shows the list of recently used resources as a menu, +-- each item as a menu item. Each item inside the menu might have an icon, +-- representing its MIME type, and a number, for mnemonic access. +-- +-- This widget implements the 'RecentChooser' interface. +-- +-- This widget creates its own 'RecentManager' object. See the +-- 'recentChooserMenuNewForManager' function to know how to create a +-- 'RecentChooserMenu' widget bound to another 'RecentManager' object. +-- +-- +-- * Available since Gtk+ version 2.10 +-- +recentChooserMenuNew :: IO RecentChooserMenu +recentChooserMenuNew = + makeNewObject mkRecentChooserMenu $ + liftM (castPtr :: Ptr Widget -> Ptr RecentChooserMenu) $ + {# call gtk_recent_chooser_menu_new #} + +-- | Creates a new 'RecentChooserMenu' widget using @manager@ as the +-- underlying recently used resources manager. +-- +-- This is useful if you have implemented your own recent manager, or if you +-- have a customized instance of a 'RecentManager' object or if you wish to +-- share a common 'RecentManager' object among multiple 'RecentChooser' +-- widgets. +-- +-- +-- * Available since Gtk+ version 2.10 +-- +recentChooserMenuNewForManager :: RecentManagerClass manager [_$_] + => manager -- ^ @manager@ - a 'RecentManager' + -> IO RecentChooserMenu -- ^ returns a new 'RecentChooserMenu', bound to manager. [_$_] +recentChooserMenuNewForManager manager = + makeNewObject mkRecentChooserMenu $ + liftM (castPtr :: Ptr Widget -> Ptr RecentChooserMenu) $ + {# call gtk_recent_chooser_menu_new_for_manager #} + (toRecentManager manager) + +-------------------- +-- Attributes + +-- | Whether the first ten items in the menu should be prepended by a number acting as a unique mnemonic. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.10 +-- +recentChooserMenuShowNumbers :: RecentChooserMenuClass self => Attr self Bool +recentChooserMenuShowNumbers = newAttrFromBoolProperty "show-numbers" +#endif hunk ./gtk/gtk.cabal 289 + Graphics.UI.Gtk.Recent.RecentChooserMenu hunk ./gtk/hierarchy.list 25 + GtkRecentManager if gtk-2.10 hunk ./gtk/hierarchy.list 143 + GtkRecentChooserMenu if gtk-2.10 } |
From: Andy S. <And...@co...> - 2010-09-09 03:43:52
|
diffing dir... Wed Sep 8 23:12:51 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Windows.OffscreenWindow Ignore-this: 56ae547669c40c9b9c70012d3a19d375 { hunk ./TODO 42 -gtk_offscreen_window_get_pixbuf, function in GtkOffscreenWindow -gtk_offscreen_window_get_pixmap, function in GtkOffscreenWindow -gtk_offscreen_window_new, function in GtkOffscreenWindow - [_$_] hunk ./gtk/Graphics/UI/Gtk.chs 71 + module Graphics.UI.Gtk.Windows.OffscreenWindow, hunk ./gtk/Graphics/UI/Gtk.chs 283 +import Graphics.UI.Gtk.Windows.OffscreenWindow addfile ./gtk/Graphics/UI/Gtk/Windows/OffscreenWindow.chs hunk ./gtk/Graphics/UI/Gtk/Windows/OffscreenWindow.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget OffscreenWindow +-- +-- Author : Andy Stewart +-- +-- Created: 25 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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 toplevel container widget used to manage offscreen rendering of child widgets. [_$_] +-- +-- * Module available since Gtk+ version 2.20 +-- +module Graphics.UI.Gtk.Windows.OffscreenWindow ( +-- * Detail +-- | 'OffscreenWindow' is strictly intended to be used for obtaining snapshots of widgets that are not +-- part of a normal widget hierarchy. It differs from 'widgetGetSnapshot' in that the widget you +-- want to get a snapshot of need not be displayed on the user's screen as a part of a widget +-- hierarchy. However, since 'OffscreenWindow' is a toplevel widget you cannot obtain snapshots of a +-- full window with it since you cannot pack a toplevel widget in another toplevel. +-- [_$_] +-- The idea is to take a widget and manually set the state of it, add it to a 'OffscreenWindow' and +-- then retrieve the snapshot as a 'Pixmap' or 'Pixbuf'. +-- [_$_] +-- 'OffscreenWindow' derives from 'Window' only as an implementation detail. Applications should not +-- use any API specific to 'Window' to operate on this object. It should be treated as a 'Bin' that +-- has no parent widget. +-- [_$_] +-- When contained offscreen widgets are redrawn, 'OffscreenWindow' will emit a 'damageEvent' signal. + [_$_] +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----Window +-- | +----'OffscreenWindow' +-- @ + +#if GTK_CHECK_VERSION(2,20,0) +-- * Types + OffscreenWindow, + OffscreenWindowClass, + castToOffscreenWindow, gTypeOffscreenWindow, + toOffscreenWindow, + +-- * Constructors + offscreenWindowNew, + +-- * Methods + offscreenWindowGetPixmap, + offscreenWindowGetPixbuf, +#endif +) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,20,0) +-- | Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing +-- them on the screen. For widgets that are on the screen and part of a normal widget hierarchy, +-- 'widgetGetSnapshot' can be used instead. +-- +-- * Available since Gtk+ version 2.20 +-- +offscreenWindowNew :: IO OffscreenWindow +offscreenWindowNew = + makeNewObject mkOffscreenWindow $ [_$_] + liftM (castPtr :: Ptr Widget -> Ptr OffscreenWindow) $ + {#call gtk_offscreen_window_new #} + +-- | Retrieves a snapshot of the contained widget in the form of a 'Pixmap'. If you need to keep this +-- around over window resizes then you should add a reference to it. +-- +-- * Available since Gtk+ version 2.20 +-- +offscreenWindowGetPixmap :: OffscreenWindowClass self [_$_] + => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget. [_$_] + -> IO (Maybe Pixmap) -- ^ returns A 'Pixmap' pointer to the offscreen pixmap, or 'Nothing'. [_$_] +offscreenWindowGetPixmap offscreen = + maybeNull (makeNewGObject mkPixmap) $ + {#call gtk_offscreen_window_get_pixmap #} + (toOffscreenWindow offscreen) + +-- | Retrieves a snapshot of the contained widget in the form of a 'Pixbuf'. This is a new pixbuf with a +-- reference count of 1, and the application should unreference it once it is no longer needed. +-- +-- * Available since Gtk+ version 2.20 +-- +offscreenWindowGetPixbuf :: OffscreenWindowClass self [_$_] + => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget. [_$_] + -> IO (Maybe Pixbuf) -- ^ returns A 'Pixbuf' pointer to the offscreen pixbuf, or 'Nothing'. [_$_] +offscreenWindowGetPixbuf offscreen = + maybeNull (makeNewGObject mkPixbuf) $ + {#call gtk_offscreen_window_get_pixbuf #} + (toOffscreenWindow offscreen) + +#endif hunk ./gtk/gtk.cabal 313 + Graphics.UI.Gtk.Windows.OffscreenWindow hunk ./gtk/hierarchy.list 93 + GtkOffscreenWindow if gtk-2.20 } |
From: Andy S. <And...@co...> - 2010-09-09 03:09:01
|
diffing dir... Wed Sep 8 22:59:01 EDT 2010 Andy Stewart <laz...@gm...> * Add new function : widgetGetSnapshot Ignore-this: 99823ae2a84294bb2026f8f4a9eb0b88 { hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 148 +#if GTK_CHECK_VERSION(2,14,0) + widgetGetSnapshot, +#endif hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 1234 +#if GTK_CHECK_VERSION(2,14,0) +-- | Create a 'Pixmap' of the contents of the widget and its children. +-- [_$_] +-- Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on +-- the widget being snapshot and likely differs from those of a target widget displaying the +-- pixmap. The function 'pixbufGetFromDrawable' can be used to convert the pixmap to a visual +-- independant representation. +-- [_$_] +-- The snapshot area used by this function is the widget's allocation plus any extra space occupied by +-- additional windows belonging to this widget (such as the arrows of a spin button). Thus, the +-- resulting snapshot pixmap is possibly larger than the allocation. +-- [_$_] +-- The resulting pixmap is shrunken to match the specified @clipRect@. The +-- (x,y) coordinates of @clipRect@ are interpreted widget relative. If width or height of @clipRect@ are +-- 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective +-- amount. For instance a @clipRect@ { +5, +5, -10, -10 } will chop off 5 pixels at each side of the +-- snapshot pixmap. @clipRect@ will contain the exact widget-relative snapshot coordinates +-- upon return. A @clipRect@ of { -1, -1, 0, 0 } can be used to preserve the auto-grown snapshot area +-- and use @clipRect@ as a pure output parameter. +-- [_$_] +-- The returned pixmap can be 'Nothing', if the resulting @clipArea@ was empty. +widgetGetSnapshot :: WidgetClass self => self + -> Rectangle + -> IO (Maybe Pixmap) -- ^ returns 'Pixmap' snapshot of the widget [_$_] +widgetGetSnapshot widget clipRect = [_$_] + maybeNull (constructNewGObject mkPixmap) $ + with clipRect $ \ clipRectPtr -> [_$_] + {#call gtk_widget_get_snapshot #} + (toWidget widget) + (castPtr clipRectPtr) +#endif + } |
From: Andy S. <And...@co...> - 2010-09-08 23:47:17
|
diffing dir... Wed Sep 8 19:44:19 EDT 2010 Andy Stewart <laz...@gm...> * Add new module ModelView.CellRendererSpinner Ignore-this: 11fb97b90745af23ace6f6f5fc3b7b56 { hunk ./TODO 42 -GtkCellEditable:editing-canceled, object property in GtkCellEditable -GtkCellRendererSpinner:pulse, object property in GtkCellRendererSpinner -GtkCellRendererSpinner:size, object property in GtkCellRendererSpinner -gtk_cell_renderer_spinner_new, function in GtkCellRendererSpinner - [_$_] hunk ./gtk/Graphics/UI/Gtk.chs 114 + module Graphics.UI.Gtk.ModelView.CellRendererSpinner, hunk ./gtk/Graphics/UI/Gtk.chs 329 +import Graphics.UI.Gtk.ModelView.CellRendererSpinner addfile ./gtk/Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget CellRendererSpinner +-- +-- Author : Andy Stewart +-- +-- Created: 25 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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) +-- +-- Renders a spinning animation in a cell [_$_] +-- +-- * Module available since Gtk+ version 2.20 +-- +module Graphics.UI.Gtk.ModelView.CellRendererSpinner ( +-- * Detail +-- | 'CellRendererSpinner' renders a spinning animation in a cell, very similar to 'Spinner'. It can +-- often be used as an alternative to a 'CellRendererProgress' for displaying indefinite activity, +-- instead of actual progress. +-- [_$_] +-- To start the animation in a cell, set the "active" property to 'True' and increment the "pulse" +-- property at regular intervals. The usual way to set the cell renderer properties for each cell is +-- to bind them to columns in your tree model using e.g. 'treeViewColumnAddAttribute'. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'CellRenderer' +-- | +----'CellRendererSpinner' +-- @ + [_$_] +#if GTK_CHECK_VERSION(2,20,0) +-- * Types [_$_] + CellRendererSpinner, + CellRendererSpinnerClass, + castToCellRendererSpinner, + toCellRendererSpinner, + +-- * Constructors + cellRendererSpinnerNew, + +-- * Attributes + cellRendererSpinnerActive, + cellRendererSpinnerPulse, + cellRendererSpinnerSize, +#endif +) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +import Graphics.UI.Gtk.General.Structs (IconSize(..)) +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,20,0) +-- | Returns a new cell renderer which will show a spinner to indicate activity. +-- +-- * Available since Gtk+ version 2.20 +-- +cellRendererSpinnerNew :: IO CellRendererSpinner +cellRendererSpinnerNew = + makeNewObject mkCellRendererSpinner $ liftM castPtr $ + {#call gtk_cell_renderer_spinner_new #} + +-- | Whether the spinner is active (ie. shown) in the cell. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.20 +-- +cellRendererSpinnerActive :: CellRendererSpinnerClass self => Attr self Bool +cellRendererSpinnerActive = + newAttrFromBoolProperty "active" + +-- | Pulse of the spinner. Increment this value to draw the next frame of the spinner animation. Usually, +-- you would update this value in a timeout. +-- [_$_] +-- The 'Spinner' widget draws one full cycle of the animation per second by default. You can learn +-- about the number of frames used by the theme by looking at the 'numSteps' style property and the +-- duration of the cycle by looking at 'cycleDuration'. +-- [_$_] +-- Default value: 0 +-- +-- * Available since Gtk+ version 2.20 +-- +cellRendererSpinnerPulse :: CellRendererSpinnerClass self => Attr self Int +cellRendererSpinnerPulse = + newAttrFromIntProperty "pulse" + +-- | The 'IconSize' value that specifies the size of the rendered spinner. +-- [_$_] +-- Default value: 'IconSizeMenu' +-- +-- * Available since Gtk+ version 2.20 +-- +cellRendererSpinnerSize :: CellRendererSpinnerClass self => Attr self IconSize +cellRendererSpinnerSize = + newAttrFromEnumProperty "size" + {# call pure unsafe gtk_icon_size_get_type #} +#endif hunk ./gtk/gtk.cabal 258 + Graphics.UI.Gtk.ModelView.CellRendererSpinner hunk ./gtk/hierarchy.list 189 + GtkCellRendererSpinner if gtk-2.20 } |
From: Andy S. <And...@co...> - 2010-09-08 15:46:38
|
diffing dir... Wed Sep 8 11:44:49 EDT 2010 Andy Stewart <laz...@gm...> * Add new module MenuComboToolbar.ToolPalette Ignore-this: d63fdfefdd514cc6695a7455b095a5b4 { hunk ./TODO 55 -GtkToolPalette::set-scroll-adjustments, object signal in GtkToolPalette -GtkToolPalette:exclusive, object property in GtkToolPalette -GtkToolPalette:expand, object property in GtkToolPalette -GtkToolPalette:icon-size, object property in GtkToolPalette -GtkToolPalette:icon-size-set, object property in GtkToolPalette -GtkToolPalette:toolbar-style, object property in GtkToolPalette hunk ./TODO 61 -gtk_tool_palette_get_exclusive, function in GtkToolPalette -gtk_tool_palette_get_expand, function in GtkToolPalette -gtk_tool_palette_get_group_position, function in GtkToolPalette -gtk_tool_palette_get_hadjustment, function in GtkToolPalette -gtk_tool_palette_get_icon_size, function in GtkToolPalette -gtk_tool_palette_get_style, function in GtkToolPalette -gtk_tool_palette_get_vadjustment, function in GtkToolPalette -gtk_tool_palette_new, function in GtkToolPalette -gtk_tool_palette_set_drag_source, function in GtkToolPalette -gtk_tool_palette_set_exclusive, function in GtkToolPalette -gtk_tool_palette_set_expand, function in GtkToolPalette -gtk_tool_palette_set_group_position, function in GtkToolPalette -gtk_tool_palette_set_icon_size, function in GtkToolPalette -gtk_tool_palette_set_style, function in GtkToolPalette -gtk_tool_palette_unset_icon_size, function in GtkToolPalette -gtk_tool_palette_unset_style, function in GtkToolPalette hunk ./gtk/Graphics/UI/Gtk.chs 151 + module Graphics.UI.Gtk.MenuComboToolbar.ToolPalette, hunk ./gtk/Graphics/UI/Gtk.chs 366 +import Graphics.UI.Gtk.MenuComboToolbar.ToolPalette addfile ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget ToolPalette +-- +-- Author : Andy Stewart +-- +-- Created: 08 Sep 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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 tool palette with categories [_$_] +-- +-- * Module available since Gtk+ version 2.20 +-- +module Graphics.UI.Gtk.MenuComboToolbar.ToolPalette ( + +-- * Detail +-- | A 'ToolPalette' allows you to add 'ToolItems' to a palette-like container with different +-- categories and drag and drop support. +-- [_$_] +-- A 'ToolPalette' is created with a call to 'toolPaletteNew'. +-- [_$_] +-- 'ToolItems' cannot be added directly to a 'ToolPalette' - instead they are added to a +-- 'ToolItemGroup' which can than be added to a 'ToolPalette'. To add a 'ToolItemGroup' to a +-- 'ToolPalette', use 'containerAdd'. +-- +-- The easiest way to use drag and drop with 'ToolPalette' is to call 'toolPaletteAddDragDest' +-- with the desired drag source palette and the desired drag target widget. Then +-- 'toolPaletteGetDragItem' can be used to get the dragged item in the 'dragDataReceived' +-- signal handler of the drag target. + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'ToolPalette' +-- @ + +#if GTK_CHECK_VERSION(2,20,0) +-- * Types [_$_] + ToolPalette, + ToolPaletteClass, + castToToolPalette, + toToolPalette, + +-- * Enums + ToolPaletteDragTargets (..), + +-- * Constructors + toolPaletteNew, + +-- * Methods + toolPaletteUnsetIconSize, + toolPaletteUnsetStyle, + toolPaletteGetHAdjustment, + toolPaletteGetVAdjustment, + +-- * Attributes + toolPaletteSetGroupPosition, + toolPaletteGetGroupPosition, + toolPaletteIconSize, + toolPaletteIconSizeSet, + toolPaletteToolbarStyle, + +-- * Child Attributes + toolPaletteChildExclusive, + toolPaletteChildExpand, + [_$_] +-- * Signals [_$_] + toolPaletteSetScrollAdjustments, +#endif +) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +import System.Glib.GList +import System.Glib.UTFString +import Graphics.UI.Gtk.General.Structs (IconSize (..)) +import Graphics.UI.Gtk.General.Enums (ToolbarStyle (..)) +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.Signals#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,20,0) + +-- | Flags used to specify the supported drag targets. +{# enum ToolPaletteDragTargets {underscoreToCase} deriving (Eq) #} + +-- | Creates a new tool palette. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteNew :: IO ToolPalette +toolPaletteNew = + makeNewObject mkToolPalette $ + liftM (castPtr :: Ptr Widget -> Ptr ToolPalette) $ + {#call gtk_tool_palette_new #} + +-- | Unsets the tool palette icon size set with 'toolPaletteSetIconSize', so that user +-- preferences will be used to determine the icon size. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteUnsetIconSize :: ToolPaletteClass self => self -> IO () +toolPaletteUnsetIconSize palette = + {#call gtk_tool_palette_unset_icon_size #} + (toToolPalette palette) + +-- | Unsets a toolbar style set with 'toolPaletteSetStyle', so that user preferences will be used +-- to determine the toolbar style. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteUnsetStyle :: ToolPaletteClass self => self -> IO () +toolPaletteUnsetStyle palette = + {#call gtk_tool_palette_unset_style #} + (toToolPalette palette) + +-- | Gets the horizontal adjustment of the tool palette. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteGetHAdjustment :: ToolPaletteClass self => self + -> IO Adjustment +toolPaletteGetHAdjustment palette = + makeNewObject mkAdjustment $ + {# call gtk_tool_palette_get_hadjustment #} + (toToolPalette palette) + +-- | Gets the vertical adjustment of the tool palette. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteGetVAdjustment :: ToolPaletteClass self => self + -> IO Adjustment +toolPaletteGetVAdjustment palette = + makeNewObject mkAdjustment $ + {# call gtk_tool_palette_get_vadjustment #} + (toToolPalette palette) + +-- | Gets the position of group in palette as index. See 'toolPaletteSetGroupPosition'. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) [_$_] + => palette + -> group + -> IO Int -- ^ returns the index of group or -1 if group is not a child of palette [_$_] +toolPaletteGetGroupPosition palette group = + liftM fromIntegral $ + {#call gtk_tool_palette_get_group_position #} + (toToolPalette palette) + (toToolItemGroup group) + +-- | Sets the position of the group as an index of the tool palette. If position is 0 the group will +-- become the first child, if position is -1 it will become the last child. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) [_$_] + => palette + -> group + -> Int + -> IO () +toolPaletteSetGroupPosition palette group position = + {#call gtk_tool_palette_set_group_position #} + (toToolPalette palette) + (toToolItemGroup group) + (fromIntegral position) + +-- | The size of the icons in a tool palette is normally determined by the 'toolbarIconSize' +-- setting. When this property is set, it overrides the setting. +-- [_$_] +-- This should only be used for special-purpose tool palettes, normal application tool palettes should +-- respect the user preferences for the size of icons. +-- [_$_] +-- Default value: 'IconSizeSmallToolbar' +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteIconSize :: ToolPaletteClass self => Attr self IconSize +toolPaletteIconSize = + newAttrFromEnumProperty "icon-size" + {# call pure unsafe gtk_icon_size_get_type #} + +-- | Is 'True' if the 'iconSize' property has been set. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteIconSizeSet :: ToolPaletteClass self => Attr self Bool +toolPaletteIconSizeSet = + newAttrFromBoolProperty "icon-size-set" + +-- | The style of items in the tool palette. +-- [_$_] +-- Default value: 'ToolbarIcons' +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteToolbarStyle :: ToolPaletteClass self => Attr self ToolbarStyle +toolPaletteToolbarStyle = + newAttrFromEnumProperty "toolbar-style" + {# call pure unsafe gtk_toolbar_style_get_type #} + +-- | Whether the item group should be the only one that is expanded at a given time. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteChildExclusive :: ToolPaletteClass self => Attr self Bool +toolPaletteChildExclusive = + newAttrFromBoolProperty "exclusive" + +-- | Whether the item group should receive extra space when the palette grows. at a given time. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteChildExpand :: ToolPaletteClass self => Attr self Bool +toolPaletteChildExpand = + newAttrFromBoolProperty "expand" + +-- | Set the scroll adjustments for the viewport. Usually scrolled containers like 'ScrolledWindow' will +-- emit this signal to connect two instances of 'Scrollbar' to the scroll directions of the +-- 'Toolpalette'. +-- +-- * Available since Gtk+ version 2.20 [_$_] +-- +toolPaletteSetScrollAdjustments :: ToolPaletteClass self => Signal self (Adjustment -> Adjustment -> IO ()) +toolPaletteSetScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments") +#endif hunk ./gtk/gtk.cabal 241 + Graphics.UI.Gtk.MenuComboToolbar.ToolPalette hunk ./gtk/hierarchy.list 66 + GtkToolPalette if gtk-2.20 } |
From: Andy S. <And...@co...> - 2010-09-08 15:14:44
|
diffing dir... Wed Sep 8 10:15:35 EDT 2010 Andy Stewart <laz...@gm...> * Fix typo Ignore-this: 903a16684f719305844863aab450ce58 { hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs 35 + +-- * Class Hierarchy +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'ToolItemGroup' +-- @ hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs 89 +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs 103 - makeNewGObject mkToolItemGroup $ + makeNewObject mkToolItemGroup $ hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs 117 - makeNewGObject mkToolItem $ + makeNewObject mkToolItem $ hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs 156 - makeNewGObject mkToolItem $ + makeNewObject mkToolItem $ } |
From: Andy S. <And...@co...> - 2010-09-08 13:54:34
|
diffing dir... Wed Sep 8 09:52:46 EDT 2010 Andy Stewart <laz...@gm...> * Update new ToolItem functions in Gtk+-2.20 Ignore-this: 86649baf6e89034ab23bcabb86ac864e { hunk ./TODO 61 -gtk_tool_item_get_ellipsize_mode, function in GtkToolItem -gtk_tool_item_get_text_alignment, function in GtkToolItem -gtk_tool_item_get_text_orientation, function in GtkToolItem -gtk_tool_item_get_text_size_group, function in GtkToolItem hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs 89 +#if GTK_CHECK_VERSION(2,20,0) + toolItemGetEllipsizeMode, + toolItemGetTextAlignment, + toolItemGetTextOrientation, + toolItemGetTextSizeGroup, +#endif + hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs 112 +import Graphics.Rendering.Pango.Enums (EllipsizeMode (..)) +import Graphics.UI.Gtk.Misc.SizeGroup hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs 353 +#if GTK_CHECK_VERSION(2,20,0) +-- | Returns the ellipsize mode used for @toolItem@. Custom subclasses of 'ToolItem' should call this +-- function to find out how text should be ellipsized. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGetEllipsizeMode :: ToolItemClass item => item + -> IO EllipsizeMode -- ^ returns a PangoEllipsizeMode indicating how text in @toolItem@ should be ellipsized. +toolItemGetEllipsizeMode item = [_$_] + liftM (toEnum . fromIntegral) $ + {#call gtk_tool_item_get_ellipsize_mode #} + (toToolItem item) + +-- | Returns the text alignment used for @toolItem@. Custom subclasses of 'ToolItem' should call this +-- function to find out how text should be aligned. +toolItemGetTextAlignment :: ToolItemClass item => item [_$_] + -> IO Double -- ^ returns a gfloat indicating the horizontal text alignment used for @toolItem@ +toolItemGetTextAlignment item = + liftM realToFrac $ + {#call gtk_tool_item_get_text_alignment #} + (toToolItem item) + +-- | Returns the text orientation used for @toolItem@. Custom subclasses of 'ToolItem' should call this +-- function to find out how text should be orientated. +toolItemGetTextOrientation :: ToolItemClass item => item + -> IO Orientation -- ^ returns a 'Orientation' indicating the orientation used for @toolItem@ [_$_] +toolItemGetTextOrientation item = + liftM (toEnum . fromIntegral) $ + {#call gtk_tool_item_get_text_orientation #} + (toToolItem item) + +-- | Returns the size group used for labels in @toolItem@. Custom subclasses of 'ToolItem' should call +-- this function and use the size group for labels. +toolItemGetTextSizeGroup :: ToolItemClass item => item + -> IO SizeGroup +toolItemGetTextSizeGroup item = + makeNewGObject mkSizeGroup $ + {#call gtk_tool_item_get_text_size_group #} + (toToolItem item) +#endif + } |
From: Andy S. <And...@co...> - 2010-09-08 13:38:45
|
diffing dir... Wed Sep 8 09:36:54 EDT 2010 Andy Stewart <laz...@gm...> * Add new module MenuComboToolbar.ToolItemGroup Ignore-this: 3327e2c214de03278a4b198d1599d051 { hunk ./TODO 65 -gtk_tool_item_group_get_collapsed, function in GtkToolItemGroup -gtk_tool_item_group_get_drop_item, function in GtkToolItemGroup -gtk_tool_item_group_get_ellipsize, function in GtkToolItemGroup -gtk_tool_item_group_get_header_relief, function in GtkToolItemGroup -gtk_tool_item_group_get_item_position, function in GtkToolItemGroup -gtk_tool_item_group_get_label, function in GtkToolItemGroup -gtk_tool_item_group_get_label_widget, function in GtkToolItemGroup -gtk_tool_item_group_get_nth_item, function in GtkToolItemGroup -gtk_tool_item_group_get_n_items, function in GtkToolItemGroup -gtk_tool_item_group_insert, function in GtkToolItemGroup -gtk_tool_item_group_new, function in GtkToolItemGroup -gtk_tool_item_group_set_collapsed, function in GtkToolItemGroup -gtk_tool_item_group_set_ellipsize, function in GtkToolItemGroup -gtk_tool_item_group_set_header_relief, function in GtkToolItemGroup -gtk_tool_item_group_set_item_position, function in GtkToolItemGroup -gtk_tool_item_group_set_label, function in GtkToolItemGroup -gtk_tool_item_group_set_label_widget, function in GtkToolItemGroup hunk ./gtk/Graphics/UI/Gtk.chs 150 + module Graphics.UI.Gtk.MenuComboToolbar.ToolItemGroup, hunk ./gtk/Graphics/UI/Gtk.chs 364 +import Graphics.UI.Gtk.MenuComboToolbar.ToolItemGroup addfile ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget ToolItemGroup +-- +-- Author : Andy Stewart +-- +-- Created: 08 Sep 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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 sub container used in a tool palette +-- +-- * Module available since Gtk+ version 2.20 +-- +module Graphics.UI.Gtk.MenuComboToolbar.ToolItemGroup ( + +-- * Detail +-- | A 'ToolItemGroup' is used together with 'ToolPalette' to add 'ToolItems' to a palette like +-- container with different categories and drag and drop support. + [_$_] +#if GTK_CHECK_VERSION(2,20,0) +-- * Types [_$_] + ToolItemGroup, + ToolItemGroupClass, + castToToolItemGroup, + toToolItemGroup, + +-- * Constructors + toolItemGroupNew, [_$_] + +-- * Methods + toolItemGroupGetDropItem, + toolItemGroupGetItemPosition, + toolItemGroupGetNItems, + toolItemGroupGetNthItem, + toolItemGroupInsert, + toolItemGroupSetItemPosition, + [_$_] +-- * Attributes + toolItemGroupCollapsed, + toolItemGroupEllipsize, + toolItemGroupHeaderRelief, + toolItemGroupLabel, + toolItemGroupLabelWidget, + +-- * Child Attributes + toolItemGroupChildExpand, + toolItemGroupChildFill, + toolItemGroupChildHomogeneous, + toolItemGroupChildNewRow, + toolItemGroupChildPosition, +#endif +) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +import System.Glib.GList +import System.Glib.UTFString +import Graphics.Rendering.Pango.Enums (EllipsizeMode (..)) +import Graphics.UI.Gtk.General.Enums (ReliefStyle(..)) +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.Signals#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,20,0) +-- | Creates a new tool item group with label label. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupNew :: String -- ^ @label@ the label of the new group [_$_] + -> IO ToolItemGroup -- ^ returns a new 'ToolItemGroup'. [_$_] +toolItemGroupNew label = + makeNewGObject mkToolItemGroup $ + liftM (castPtr :: Ptr Widget -> Ptr ToolItemGroup) $ + withUTFString label $ \ labelPtr -> [_$_] + {#call gtk_tool_item_group_new #} + labelPtr + +-- | Gets the tool item at position (x, y). +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupGetDropItem :: ToolItemGroupClass self => self + -> (Int, Int) + -> IO ToolItem +toolItemGroupGetDropItem group (x, y) = [_$_] + makeNewGObject mkToolItem $ + {#call gtk_tool_item_group_get_drop_item #} + (toToolItemGroup group) + (fromIntegral x) + (fromIntegral y) + +-- | Gets the position of item in group as index. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupGetItemPosition :: (ToolItemGroupClass group, ToolItemClass item) + => group -- ^ @group@ a 'ToolItemGroup' [_$_] + -> item -- ^ @item@ a 'ToolItem' [_$_] + -> IO Int -- ^ returns the index of item in group or -1 if item is no child of group [_$_] +toolItemGroupGetItemPosition group item = + liftM fromIntegral $ + {#call gtk_tool_item_group_get_item_position #} + (toToolItemGroup group) + (toToolItem item) + +-- | Gets the number of tool items in group. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupGetNItems :: ToolItemGroupClass group => group + -> IO Int -- ^ returns the number of tool items in group [_$_] +toolItemGroupGetNItems group = + liftM fromIntegral $ + {#call gtk_tool_item_group_get_n_items #} + (toToolItemGroup group) + +-- | Gets the tool item at index in group. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupGetNthItem :: ToolItemGroupClass group => group + -> Int -- ^ @index@ the index [_$_] + -> IO ToolItem -- ^ returns the 'ToolItem' at index [_$_] +toolItemGroupGetNthItem group index = + makeNewGObject mkToolItem $ + {#call gtk_tool_item_group_get_nth_item #} + (toToolItemGroup group) + (fromIntegral index) + +-- | Inserts item at position in the list of children of group. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupInsert :: (ToolItemGroupClass group, ToolItemClass item) [_$_] + => group -- ^ @group@ a 'ToolItemGroup' + -> item -- ^ @item@ the 'ToolItem' to insert into group + -> Int -- ^ @position@ the position of item in group, starting with 0. [_$_] + -- The position -1 means end of list. + -> IO () +toolItemGroupInsert group item position = + {#call gtk_tool_item_group_insert #} + (toToolItemGroup group) + (toToolItem item) + (fromIntegral position) + +-- | Sets the position of item in the list of children of group. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupSetItemPosition :: (ToolItemGroupClass group, ToolItemClass item) + => group -- ^ @group@ a 'ToolItemGroup' + -> item -- ^ @item@ the 'ToolItem' to move to a new position, should be a child of group. + -> Int -- ^ @position@ the new position of item in group, starting with 0. The position -1 means end of list. + -> IO () +toolItemGroupSetItemPosition group item position = [_$_] + {#call gtk_tool_item_group_set_item_position #} + (toToolItemGroup group) + (toToolItem item) + (fromIntegral position) + +-- | Wether the group has been collapsed and items are hidden. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupCollapsed :: ToolItemGroupClass group => Attr group Bool +toolItemGroupCollapsed = + newAttrFromBoolProperty "collapsed" + +-- | Ellipsize for item group headers. +-- [_$_] +-- Default value: EllipsizeNone +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupEllipsize :: ToolItemGroupClass group => Attr group EllipsizeMode +toolItemGroupEllipsize = + newAttrFromEnumProperty "ellipsize" + {# call pure unsafe pango_ellipsize_mode_get_type #} + +-- | Relief of the group header button. +-- [_$_] +-- Default value: 'ReliefNormal' +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupHeaderRelief :: ToolItemGroupClass group => Attr group ReliefStyle +toolItemGroupHeaderRelief = + newAttrFromEnumProperty "header-relief" + {# call pure unsafe gtk_relief_style_get_type #} + +-- | The human-readable title of this item group. +-- [_$_] +-- Default value: \"\" +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupLabel :: ToolItemGroupClass group => Attr group String +toolItemGroupLabel = + newAttrFromStringProperty "label" + +-- | A widget to display in place of the usual label. +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupLabelWidget :: ToolItemGroupClass group => Attr group Widget +toolItemGroupLabelWidget = + newAttrFromObjectProperty "label-widget" + {# call pure unsafe gtk_widget_get_type #} + +-- | Whether the item should receive extra space when the group grows. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupChildExpand :: ToolItemGroupClass group => Attr group Bool +toolItemGroupChildExpand = + newAttrFromBoolProperty "expand" + +-- | Whether the item should fill the available space. +-- [_$_] +-- Default value: 'True' +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupChildFill :: ToolItemGroupClass group => Attr group Bool +toolItemGroupChildFill = + newAttrFromBoolProperty "fill" + +-- | Whether the item should be the same size as other homogeneous items. +-- [_$_] +-- Default value: 'True' +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupChildHomogeneous :: ToolItemGroupClass group => Attr group Bool +toolItemGroupChildHomogeneous = + newAttrFromBoolProperty "homogeneous" + +-- | Whether the item should start a new row. +-- [_$_] +-- Default value: 'False' +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupChildNewRow :: ToolItemGroupClass group => Attr group Bool +toolItemGroupChildNewRow = + newAttrFromBoolProperty "new-row" + +-- | Position of the item within this group. +-- [_$_] +-- Allowed values: >= 0 +-- [_$_] +-- Default value: 0 +-- +-- * Available since Gtk+ version 2.20 +-- +toolItemGroupChildPosition :: ToolItemGroupClass group => Attr group Int +toolItemGroupChildPosition = + newAttrFromIntProperty "position" +#endif + hunk ./gtk/gtk.cabal 240 + Graphics.UI.Gtk.MenuComboToolbar.ToolItemGroup hunk ./gtk/hierarchy.list 66 + GtkToolItemGroup if gtk-2.20 } |
From: Andy S. <And...@co...> - 2010-09-08 12:31:48
|
diffing dir... Wed Sep 8 08:28:55 EDT 2010 Andy Stewart <laz...@gm...> * Add TODO Ignore-this: 35a3942eb5a6ef8e1c9cf57de3a5ddff { addfile ./TODO hunk ./TODO 1 +Missing modules in GTK+-2.18: + +gtk/Graphics/UI/Gtk/General/AccelGroup.chs +gtk/Graphics/UI/Gtk/General/AccelMap.chs + +gtk/Graphics/UI/Gtk/MenuComboToolbar/Item.chs +gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolShell.chs + +gtk/Graphics/UI/Gtk/Printing/PageSetup.chs +gtk/Graphics/UI/Gtk/Printing/PaperSize.chs +gtk/Graphics/UI/Gtk/Printing/PrintContext.chs +gtk/Graphics/UI/Gtk/Printing/PrintOperation.chs +gtk/Graphics/UI/Gtk/Printing/PrintOperationPreview.chs +gtk/Graphics/UI/Gtk/Printing/PrintSettings.chs + +gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs +gtk/Graphics/UI/Gtk/Recent/RecentChooserDialog.chs +gtk/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs +gtk/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs +gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs +gtk/Graphics/UI/Gtk/Recent/RecentInfo.chs +gtk/Graphics/UI/Gtk/Recent/RecentManager.chs + +gtk/Graphics/UI/Gtk/ActionMenuToolbar/Action.chs +gtk/Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs +gtk/Graphics/UI/Gtk/ActionMenuToolbar/Activatable.chs +gtk/Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs +gtk/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs +gtk/Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs +gtk/Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs + +gtk/Graphics/UI/Gtk/Gdk/AppLaunchContext.chs +gtk/Graphics/UI/Gtk/Gdk/Colormap.chs +gtk/Graphics/UI/Gtk/Gdk/Device.chs +gtk/Graphics/UI/Gtk/Gdk/DisplayManager.chs +gtk/Graphics/UI/Gtk/Gdk/Keymap.chs +gtk/Graphics/UI/Gtk/Gdk/PixbufLoader.chs +gtk/Graphics/UI/Gtk/Gdk/Visual.chs + +Missing functions in GTK+-2.20: + +GtkCellEditable:editing-canceled, object property in GtkCellEditable +GtkCellRendererSpinner:pulse, object property in GtkCellRendererSpinner +GtkCellRendererSpinner:size, object property in GtkCellRendererSpinner +gtk_cell_renderer_spinner_new, function in GtkCellRendererSpinner + [_$_] +gtk_offscreen_window_get_pixbuf, function in GtkOffscreenWindow +gtk_offscreen_window_get_pixmap, function in GtkOffscreenWindow +gtk_offscreen_window_new, function in GtkOffscreenWindow + [_$_] +gtk_paint_spinner, function in GtkStyle +gtk_printer_get_hard_margins, function in GtkPrinter +gtk_print_context_get_hard_margins, function in GtkPrintContext + [_$_] +GtkToolPalette::set-scroll-adjustments, object signal in GtkToolPalette +GtkToolPalette:exclusive, object property in GtkToolPalette +GtkToolPalette:expand, object property in GtkToolPalette +GtkToolPalette:icon-size, object property in GtkToolPalette +GtkToolPalette:icon-size-set, object property in GtkToolPalette +GtkToolPalette:toolbar-style, object property in GtkToolPalette +gtk_tool_item_get_ellipsize_mode, function in GtkToolItem +gtk_tool_item_get_text_alignment, function in GtkToolItem +gtk_tool_item_get_text_orientation, function in GtkToolItem +gtk_tool_item_get_text_size_group, function in GtkToolItem +gtk_tool_item_group_get_collapsed, function in GtkToolItemGroup +gtk_tool_item_group_get_drop_item, function in GtkToolItemGroup +gtk_tool_item_group_get_ellipsize, function in GtkToolItemGroup +gtk_tool_item_group_get_header_relief, function in GtkToolItemGroup +gtk_tool_item_group_get_item_position, function in GtkToolItemGroup +gtk_tool_item_group_get_label, function in GtkToolItemGroup +gtk_tool_item_group_get_label_widget, function in GtkToolItemGroup +gtk_tool_item_group_get_nth_item, function in GtkToolItemGroup +gtk_tool_item_group_get_n_items, function in GtkToolItemGroup +gtk_tool_item_group_insert, function in GtkToolItemGroup +gtk_tool_item_group_new, function in GtkToolItemGroup +gtk_tool_item_group_set_collapsed, function in GtkToolItemGroup +gtk_tool_item_group_set_ellipsize, function in GtkToolItemGroup +gtk_tool_item_group_set_header_relief, function in GtkToolItemGroup +gtk_tool_item_group_set_item_position, function in GtkToolItemGroup +gtk_tool_item_group_set_label, function in GtkToolItemGroup +gtk_tool_item_group_set_label_widget, function in GtkToolItemGroup +gtk_tool_palette_add_drag_dest, function in GtkToolPalette +gtk_tool_palette_get_drag_item, function in GtkToolPalette +gtk_tool_palette_get_drag_target_group, function in GtkToolPalette +gtk_tool_palette_get_drag_target_item, function in GtkToolPalette +gtk_tool_palette_get_drop_group, function in GtkToolPalette +gtk_tool_palette_get_drop_item, function in GtkToolPalette +gtk_tool_palette_get_exclusive, function in GtkToolPalette +gtk_tool_palette_get_expand, function in GtkToolPalette +gtk_tool_palette_get_group_position, function in GtkToolPalette +gtk_tool_palette_get_hadjustment, function in GtkToolPalette +gtk_tool_palette_get_icon_size, function in GtkToolPalette +gtk_tool_palette_get_style, function in GtkToolPalette +gtk_tool_palette_get_vadjustment, function in GtkToolPalette +gtk_tool_palette_new, function in GtkToolPalette +gtk_tool_palette_set_drag_source, function in GtkToolPalette +gtk_tool_palette_set_exclusive, function in GtkToolPalette +gtk_tool_palette_set_expand, function in GtkToolPalette +gtk_tool_palette_set_group_position, function in GtkToolPalette +gtk_tool_palette_set_icon_size, function in GtkToolPalette +gtk_tool_palette_set_style, function in GtkToolPalette +gtk_tool_palette_unset_icon_size, function in GtkToolPalette +gtk_tool_palette_unset_style, function in GtkToolPalette } |
From: Andy S. <And...@co...> - 2010-09-08 12:31:47
|
diffing dir... Wed Sep 8 08:27:24 EDT 2010 Andy Stewart <laz...@gm...> * Change TODO to OLD_TODO Ignore-this: d1b082c7a3fcaa1f63a79756571fa98f move ./TODO ./OLD_TODO |
From: Andy S. <And...@co...> - 2010-09-08 07:57:20
|
diffing dir... Wed Sep 8 03:50:46 EDT 2010 Andy Stewart <laz...@gm...> * Adjust gio functions : use withCString instead withUTFString for filepath argument. Ignore-this: be601fe7c3df11eef1ce491b05df95a8 All gio functions with 'FilePath' argument must use withCString, except some functions need UTF-8 string explicitly. Otherwise, a non-UTF8 filepath will crash those functions. { hunk ./gio/System/GIO/File/AppInfo.chs 120 - withUTFString commandline $ \ commandlinePtr -> [_$_] - maybeWith withUTFString applicationName $ \ applicationNamePtr -> [_$_] + withCString commandline $ \ commandlinePtr -> [_$_] + maybeWith withCString applicationName $ \ applicationNamePtr -> [_$_] hunk ./gio/System/GIO/File/File.chs 271 - withUTFString path $ \cPath -> {# call file_new_for_path #} cPath + withCString path $ \cPath -> {# call file_new_for_path #} cPath hunk ./gio/System/GIO/File/File.chs 287 - withUTFString arg $ \cArg -> {# call file_new_for_commandline_arg #} cArg [_$_] + withCString arg $ \cArg -> {# call file_new_for_commandline_arg #} cArg [_$_] hunk ./gio/System/GIO/File/File.chs 295 - withUTFString parseName $ \cParseName -> {# call file_parse_name #} cParseName [_$_] + withCString parseName $ \cParseName -> {# call file_parse_name #} cParseName [_$_] hunk ./gio/System/GIO/File/File.chs 383 - withUTFString name $ \cName -> + withCString name $ \cName -> hunk ./gio/System/GIO/File/File.chs 425 - withUTFString relativePath $ \cRelativePath -> + withCString relativePath $ \cRelativePath -> hunk ./gio/System/GIO/File/File.chs 604 - maybeWith withUTFString etag $ \cEtag -> + maybeWith withCString etag $ \cEtag -> hunk ./gio/System/GIO/File/File.chs 694 - withUTFString etag $ \cEtag -> do + withCString etag $ \cEtag -> do hunk ./gio/System/GIO/File/File.chs 744 - withUTFString attributes $ \cAttributes -> + withCString attributes $ \cAttributes -> hunk ./gio/System/GIO/File/File.chs 768 - withUTFString attributes $ \cAttributes -> do + withCString attributes $ \cAttributes -> do hunk ./gio/System/GIO/File/File.chs 861 - withUTFString attributes $ \cAttributes -> + withCString attributes $ \cAttributes -> hunk ./gio/System/GIO/File/File.chs 883 - withUTFString attributes $ \cAttributes -> do + withCString attributes $ \cAttributes -> do hunk ./gio/System/GIO/File/File.chs 991 - withUTFString attributes $ \cAttributes -> + withCString attributes $ \cAttributes -> hunk ./gio/System/GIO/File/File.chs 1015 - withUTFString attributes $ \cAttributes -> do + withCString attributes $ \cAttributes -> do hunk ./gio/System/GIO/File/File.chs 1334 - withUTFString symlinkValue $ \cSymlinkValue -> do + withCString symlinkValue $ \cSymlinkValue -> do hunk ./gio/System/GIO/File/File.chs 1469 - withUTFString attribute $ \ attributePtr -> [_$_] - withUTFString value $ \ valuePtr -> do + withCString attribute $ \ attributePtr -> [_$_] + withCString value $ \ valuePtr -> do hunk ./gio/System/GIO/File/File.chs 1519 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/File.chs 1543 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/File.chs 1567 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/File.chs 1591 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 173 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 183 - withUTFString namespace $ \ namespacePtr -> [_$_] + withCString namespace $ \ namespacePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 192 - withUTFString nameSpace $ \ nameSpacePtr -> [_$_] + withCString nameSpace $ \ nameSpacePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 202 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 210 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 219 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 229 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 237 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 247 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 257 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 267 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 276 - withUTFString attribute $ \ attributePtr -> do + withCString attribute $ \ attributePtr -> do hunk ./gio/System/GIO/File/FileInfo.chs 285 - withUTFString attribute $ \ attributePtr -> do + withCString attribute $ \ attributePtr -> do hunk ./gio/System/GIO/File/FileInfo.chs 294 - withUTFString attribute $ \ attributePtr -> do + withCString attribute $ \ attributePtr -> do hunk ./gio/System/GIO/File/FileInfo.chs 303 - withUTFString attribute $ \ attributePtr -> do + withCString attribute $ \ attributePtr -> do hunk ./gio/System/GIO/File/FileInfo.chs 311 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 327 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 340 - withUTFString attribute $ \ attributePtr -> [_$_] - withUTFString attrValue $ \ attrValuePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] + withCString attrValue $ \ attrValuePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 351 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 372 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 381 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 390 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 399 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 408 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/File/FileInfo.chs 417 - withUTFString attribute $ \ attributePtr -> [_$_] + withCString attribute $ \ attributePtr -> [_$_] hunk ./gio/System/GIO/Icons/Icon.chs 106 - withUTFString str $ \ strPtr -> [_$_] + withCString str $ \ strPtr -> [_$_] hunk ./gio/System/GIO/Icons/ThemedIcon.chs 64 - withUTFString iconName $ \ iconNamePtr -> [_$_] + withCString iconName $ \ iconNamePtr -> [_$_] hunk ./gio/System/GIO/Icons/ThemedIcon.chs 84 - withUTFString iconname $ \ iconnamePtr -> [_$_] + withCString iconname $ \ iconnamePtr -> [_$_] hunk ./gio/System/GIO/Icons/ThemedIcon.chs 93 - withUTFString iconname $ \ iconnamePtr -> [_$_] + withCString iconname $ \ iconnamePtr -> [_$_] hunk ./gio/System/GIO/Volumes/Drive.chs 366 - withUTFString kind $ \ kindPtr -> [_$_] + withCString kind $ \ kindPtr -> [_$_] hunk ./gio/System/GIO/Volumes/Volume.chs 268 - withUTFString kind $ \ kindPtr -> [_$_] + withCString kind $ \ kindPtr -> [_$_] hunk ./gio/System/GIO/Volumes/VolumeMonitor.chs 120 - withUTFString uuid $ \ uuidPtr -> [_$_] + withCString uuid $ \ uuidPtr -> [_$_] hunk ./gio/System/GIO/Volumes/VolumeMonitor.chs 129 - withUTFString uuid $ \ uuidPtr -> [_$_] + withCString uuid $ \ uuidPtr -> [_$_] } |
From: Andy S. <And...@co...> - 2010-09-07 15:15:46
|
diffing dir... Tue Sep 7 11:10:17 EDT 2010 Andy Stewart <laz...@gm...> * Adjust signal 'accelEdited' with KeyVal and KeyCode Ignore-this: b264bf4591880113ec3c6008f5d3a215 { hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 178 -import Graphics.UI.Gtk.Gdk.Keys (KeyVal, keyName) +import Graphics.UI.Gtk.Gdk.Keys (KeyVal, KeyCode, keyName) hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 469 -eventHardwareKeycode :: EventM EKey Word16 +eventHardwareKeycode :: EventM EKey KeyCode hunk ./gtk/Graphics/UI/Gtk/Gdk/Keys.chs 32 + KeyCode, hunk ./gtk/Graphics/UI/Gtk/Gdk/Keys.chs 53 +type KeyCode = Word16 hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererAccel.chs 83 +import Graphics.UI.Gtk.Gdk.Keys (KeyVal, KeyCode) hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererAccel.chs 157 --- (\pathString accelKey accelMods hardwareKeycode -> ...) --- --- @pathString@ the path identifying the row of the edited cell [_$_] --- --- @accelKey@ the new accelerator keyval --- --- @accelMods@ the new acclerator modifier mask [_$_] --- --- @hardwareKeycode@ the keycode of the new accelerator [_$_] --- --- You can find those types in module Graphics.UI.Gtk.Gdk.Keys and Graphics.UI.Gtk.Gdk.EventM --- hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererAccel.chs 159 -accelEdited :: CellRendererAccelClass self => Signal self (String -> Int -> Modifier -> Int -> IO ()) -accelEdited = Signal (connect_STRING_INT_ENUM_INT__NONE "accel_edited") +accelEdited :: CellRendererAccelClass self => Signal self (String -> KeyVal -> Modifier -> KeyCode -> IO ()) +accelEdited = Signal (\after obj user -> connect_STRING_INT_ENUM_INT__NONE "accel_edited" after obj + (\ path keyval modifier keycode -> [_$_] + user path (fromIntegral keyval) modifier (fromIntegral keycode))) } |
From: Andy S. <And...@co...> - 2010-09-07 13:16:27
|
diffing dir... Tue Sep 7 09:08:03 EDT 2010 Andy Stewart <laz...@gm...> * Fix docs of signal accelEdited Ignore-this: 33599f40ac83d373faa7052d37e6e2e hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererAccel.chs 156 +-- (\pathString accelKey accelMods hardwareKeycode -> ...) +-- +-- @pathString@ the path identifying the row of the edited cell [_$_] +-- +-- @accelKey@ the new accelerator keyval +-- +-- @accelMods@ the new acclerator modifier mask [_$_] +-- +-- @hardwareKeycode@ the keycode of the new accelerator [_$_] +-- +-- You can find those types in module Graphics.UI.Gtk.Gdk.Keys and Graphics.UI.Gtk.Gdk.EventM +-- |
From: Andy S. <And...@co...> - 2010-09-07 11:27:50
|
diffing dir... Tue Sep 7 07:08:49 EDT 2010 Andy Stewart <laz...@gm...> * Add new module ModelView.CellRendererSpin Ignore-this: 9fd61d62b3a9099dc3f4860e9f27087b { hunk ./gtk/Graphics/UI/Gtk.chs 119 + module Graphics.UI.Gtk.ModelView.CellRendererSpin, hunk ./gtk/Graphics/UI/Gtk.chs 331 +import Graphics.UI.Gtk.ModelView.CellRendererSpin addfile ./gtk/Graphics/UI/Gtk/ModelView/CellRendererSpin.chs hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererSpin.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget CellRendererSpin +-- +-- Author : Andy Stewart +-- +-- Created: 25 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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) +-- +-- Renders a spin button in a cell +-- +-- * Module available since Gtk+ version 2.10 +-- +module Graphics.UI.Gtk.ModelView.CellRendererSpin ( + +-- * Detail +-- +-- | 'CellRendererSpin' renders text in a cell like 'CellRendererText' from +-- which it is derived. But while 'CellRendererText' offers a simple entry to +-- edit the text, 'CellRendererSpin' offers a 'SpinButton' widget. Of course, +-- that means that the text has to be parseable as a floating point number. +-- +-- The range of the spinbutton is taken from the adjustment property of the +-- cell renderer, which can be set explicitly or mapped to a column in the tree +-- model, like all properties of cell renders. 'CellRendererSpin' also has +-- properties for the climb rate and the number of digits to display. Other +-- 'SpinButton' properties can be set in a handler for the start-editing +-- signal. +-- +-- The 'CellRendererSpin' cell renderer was added in Gtk+ 2.10. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'CellRenderer' +-- | +----'CellRendererText' +-- | +----CellRendererSpin +-- @ + +#if GTK_CHECK_VERSION(2,10,0) +-- * Types + CellRendererSpin, + CellRendererSpinClass, + castToCellRendererSpin, + toCellRendererSpin, + +-- * Constructors + cellRendererSpinNew, + +-- * Attributes + cellRendererSpinAdjustment, + cellRendererSpinClimbRate, + cellRendererSpinDigits, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,10,0) +-------------------- +-- Constructors + +-- | Creates a new 'CellRendererSpin'. +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererSpinNew :: IO CellRendererSpin +cellRendererSpinNew = + makeNewObject mkCellRendererSpin $ liftM castPtr + {# call gtk_cell_renderer_spin_new #} + +-------------------- +-- Attributes + +-- | The adjustment that holds the value of the spinbutton. [_$_] +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererSpinAdjustment :: CellRendererSpinClass self => Attr self Adjustment +cellRendererSpinAdjustment = newAttrFromObjectProperty "adjustment" + {# call pure unsafe gtk_adjustment_get_type #} + +-- | The acceleration rate when you hold down a button. +-- [_$_] +-- Allowed values: >= 0 +-- [_$_] +-- Default value: 0 +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererSpinClimbRate :: CellRendererSpinClass self => Attr self Double +cellRendererSpinClimbRate = newAttrFromDoubleProperty "climb-rate" + +-- | The number of decimal places to display. +-- [_$_] +-- Allowed values: <= 20 +-- [_$_] +-- Default value: 0 +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererSpinDigits :: CellRendererSpinClass self => Attr self Int +cellRendererSpinDigits = newAttrFromUIntProperty "digits" +#endif hunk ./gtk/gtk.cabal 261 + Graphics.UI.Gtk.ModelView.CellRendererSpin hunk ./gtk/hierarchy.list 190 + GtkCellRendererSpin if gtk-2.10 } |
From: Andy S. <And...@co...> - 2010-09-07 11:05:25
|
diffing dir... Tue Sep 7 06:58:30 EDT 2010 Andy Stewart <laz...@gm...> * Add new module ModelView.CellRendererAccel Ignore-this: ce17e043407179936e4d279aa1101d0 { hunk ./gtk/Graphics/UI/Gtk.chs 118 + module Graphics.UI.Gtk.ModelView.CellRendererAccel, hunk ./gtk/Graphics/UI/Gtk.chs 329 +import Graphics.UI.Gtk.ModelView.CellRendererAccel addfile ./gtk/Graphics/UI/Gtk/ModelView/CellRendererAccel.chs hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererAccel.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget CellRendererAccel +-- +-- Author : Andy Stewart +-- +-- Created: 25 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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) +-- +-- Renders a keyboard accelerator in a cell +-- +-- * Module available since Gtk+ version 2.10 +-- +module Graphics.UI.Gtk.ModelView.CellRendererAccel ( + +-- * Detail +-- +-- | 'CellRendererAccel' displays a keyboard accelerator (i.e. a key +-- combination like \<Control>-a). If the cell renderer is editable, the +-- accelerator can be changed by simply typing the new combination. +-- +-- The 'CellRendererAccel' cell renderer was added in Gtk+ 2.10. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'CellRenderer' +-- | +----'CellRendererText' +-- | +----CellRendererAccel +-- @ + +#if GTK_CHECK_VERSION(2,10,0) +-- * Types + CellRendererAccel, + CellRendererAccelClass, + castToCellRendererAccel, + toCellRendererAccel, + +-- * Enums + CellRendererAccelMode(..), + +-- * Constructors + cellRendererAccelNew, + +-- * Attributes + cellRendererAccelAccelKey, + cellRendererAccelAccelMods, + cellRendererAccelKeycode, + cellRendererAccelAccelMode, + +-- * Signals + accelEdited, + accelCleared, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Gdk.Enums (Modifier) +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Signals#} +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,10,0) +-------------------- +-- Enums +{#enum CellRendererAccelMode {underscoreToCase} deriving (Bounded,Eq,Show)#} + +-------------------- +-- Constructors + +-- | Creates a new 'CellRendererAccel'. +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererAccelNew :: IO CellRendererAccel +cellRendererAccelNew = + makeNewObject mkCellRendererAccel $ liftM castPtr $ + {# call gtk_cell_renderer_accel_new #} + +-------------------- +-- Attributes + +-- | The keyval of the accelerator. +-- [_$_] +-- Allowed values: <= GMaxint +-- [_$_] +-- Default value: 0 +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererAccelAccelKey :: CellRendererAccelClass self => Attr self Int +cellRendererAccelAccelKey = newAttrFromUIntProperty "accel-key" + +-- | The modifier mask of the accelerator. +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererAccelAccelMods :: CellRendererAccelClass self => Attr self [Modifier] +cellRendererAccelAccelMods = newAttrFromFlagsProperty "accel-mods" + {# call pure unsafe gdk_modifier_type_get_type #} + +-- | The hardware keycode of the accelerator. Note that the hardware keycode is only relevant if the key +-- does not have a keyval. Normally, the keyboard configuration should assign keyvals to all keys. +-- [_$_] +-- Allowed values: <= GMaxint +-- [_$_] +-- Default value: 0 +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererAccelKeycode :: CellRendererAccelClass self => Attr self Int +cellRendererAccelKeycode = newAttrFromUIntProperty "keycode" + +-- | Determines if the edited accelerators are GTK+ accelerators. If they are, consumed modifiers are +-- suppressed, only accelerators accepted by GTK+ are allowed, and the accelerators are rendered in the +-- same way as they are in menus. +-- [_$_] +-- Default value: 'CellRendererAccelModeGtk' +-- +-- * Available since Gtk+ version 2.10 +-- +cellRendererAccelAccelMode :: CellRendererAccelClass self => Attr self CellRendererAccelMode +cellRendererAccelAccelMode = newAttrFromEnumProperty "accel-mode" + {# call pure unsafe gtk_cell_renderer_accel_mode_get_type #} + +-------------------- +-- Signals + +-- | Gets emitted when the user has selected a new accelerator. +-- +-- * Available since Gtk+ version 2.10 +-- +accelEdited :: CellRendererAccelClass self => Signal self (String -> Int -> Modifier -> Int -> IO ()) +accelEdited = Signal (connect_STRING_INT_ENUM_INT__NONE "accel_edited") + +-- | Gets emitted when the user has removed the accelerator. +-- +-- * Available since Gtk+ version 2.10 +-- +accelCleared :: CellRendererAccelClass self => Signal self (String -> IO ()) +accelCleared = Signal (connect_STRING__NONE "accel_cleared") +#endif hunk ./gtk/gtk.cabal 260 + Graphics.UI.Gtk.ModelView.CellRendererAccel hunk ./gtk/hierarchy.list 189 + GtkCellRendererAccel if gtk-2.10 hunk ./gtk/marshal.list 160 +# For CellRendererAccel +NONE:STRING,INT,ENUM,INT + } |
From: Andy S. <And...@co...> - 2010-09-07 10:48:32
|
diffing dir... Tue Sep 7 06:46:23 EDT 2010 Andy Stewart <laz...@gm...> * Fix docs Ignore-this: 7befb669d5b0134ce873f4edc6fd180 hunk ./gtk/Graphics/UI/Gtk/Buttons/LinkButton.chs 134 --- registered for the \"clicked\" signal. +-- registered for the 'buttonClicked' signal. |
From: Andy S. <And...@co...> - 2010-09-07 10:31:51
|
diffing dir... Tue Sep 7 06:28:03 EDT 2010 Andy Stewart <laz...@gm...> * Add new module ModelView.CellEditable Ignore-this: 4ed05b5ec19b4e20dd63d5f257f85569 { hunk ./gtk/Graphics/UI/Gtk.chs 111 + module Graphics.UI.Gtk.ModelView.CellEditable, hunk ./gtk/Graphics/UI/Gtk.chs 321 +import Graphics.UI.Gtk.ModelView.CellEditable addfile ./gtk/Graphics/UI/Gtk/ModelView/CellEditable.chs hunk ./gtk/Graphics/UI/Gtk/ModelView/CellEditable.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Interface CellEditable +-- +-- Author : Andy Stewart +-- +-- Created: 26 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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) +-- +-- Interface for widgets which can are used for editing cells +-- +module Graphics.UI.Gtk.ModelView.CellEditable ( + +-- * Detail +-- +-- | The 'CellEditable' interface must be implemented for widgets to be usable +-- when editing the contents of a 'TreeView' cell. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GInterface' +-- | +----CellEditable +-- @ + +-- * Types + CellEditable, + CellEditableClass, + castToCellEditable, + toCellEditable, + +-- * Methods + cellEditableStartEditing, + cellEditableEmitEditingDone, + cellEditableEmitRemoveWidget, + +-- * Attributes +#if GTK_CHECK_VERSION(2,20,0) + cellEditableEditingCanceled, +#endif [_$_] + +-- * Signals + cellEditableEditingDone, + cellEditableRemoveWidget, + ) where + +import Control.Monad (liftM) +import Control.Monad.Reader.Class (ask) +import Control.Monad.Trans (liftIO) + +import System.Glib.FFI +import System.Glib.Attributes +import System.Glib.Properties +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.Signals#} +import Graphics.UI.Gtk.Gdk.EventM (EventM, EKey, EAny) +import Graphics.UI.Gtk.Gdk.Events (Event, EventKey, marshalEvent) + +{# context lib="gtk" prefix="gtk" #} + +-------------------- +-- Methods + +-- | Begins editing on a @cellEditable@. @event@ is the 'Event' that began the editing process. [_$_] +-- +cellEditableStartEditing :: CellEditableClass self => self -> EventM EAny () +cellEditableStartEditing self = do + eventPtr <- ask + liftIO $ {# call gtk_cell_editable_start_editing #} + (toCellEditable self) + (castPtr eventPtr) + +-- | Emits the 'cellEditableEditingDone' signal. +-- +cellEditableEmitEditingDone :: CellEditableClass self => self -> IO () +cellEditableEmitEditingDone self = + {# call gtk_cell_editable_editing_done #} + (toCellEditable self) + +-- | Emits the 'cellEditableRemoveWidget' signal. +-- +cellEditableEmitRemoveWidget :: CellEditableClass self => self -> IO () +cellEditableEmitRemoveWidget self = + {# call gtk_cell_editable_remove_widget #} + (toCellEditable self) + +-------------------- +-- Attributes +#if GTK_CHECK_VERSION(2,20,0) +-- | Indicates whether editing on the cell has been canceled. +-- [_$_] +-- Default value: 'False' +-- [_$_] +-- * Available since Gtk+ version 2.20 +-- +cellEditableEditingCanceled :: CellEditableClass self => Attr self Bool +cellEditableEditingCanceled = + newAttrFromBoolProperty "editing-canceled" +#endif + +-------------------- +-- Signals + +-- | This signal is a sign for the cell renderer to update its value from the +-- @cellEditable@. +-- +-- Implementations of 'CellEditable' are responsible for emitting this +-- signal when they are done editing, e.g. 'Entry' is emitting it when the user +-- presses Enter. +-- +-- 'cellEditableEmitEditingDone' is a convenience method for emitting +-- ::editing-done. +-- +cellEditableEditingDone :: CellEditableClass self => Signal self (IO ()) +cellEditableEditingDone = Signal (connect_NONE__NONE "editing_done") + +-- | This signal is meant to indicate that the cell is finished editing, and +-- the widget may now be destroyed. +-- +-- Implementations of 'CellEditable' are responsible for emitting this +-- signal when they are done editing. It must be emitted after the +-- 'cellEditableEditingDone' signal, to give the cell +-- renderer a chance to update the cell's value before the widget is removed. +-- +-- 'cellEditableEmitRemoveWidget' is a convenience method for emitting +-- ::remove-widget. +-- +cellEditableRemoveWidget :: CellEditableClass self => Signal self (IO ()) +cellEditableRemoveWidget = Signal (connect_NONE__NONE "remove_widget") hunk ./gtk/gtk.cabal 253 + Graphics.UI.Gtk.ModelView.CellEditable hunk ./gtk/hierarchy.list 228 + GtkCellEditable } |
From: Andy S. <And...@co...> - 2010-09-07 09:38:44
|
diffing dir... Tue Sep 7 05:34:36 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Misc.IMContextSimple Ignore-this: 22cb7cce67bc66d639b4cd6e301060ba { hunk ./gtk/Graphics/UI/Gtk.chs 211 + module Graphics.UI.Gtk.Misc.IMContextSimple, hunk ./gtk/Graphics/UI/Gtk.chs 420 +import Graphics.UI.Gtk.Misc.IMContextSimple addfile ./gtk/Graphics/UI/Gtk/Misc/IMContextSimple.chs hunk ./gtk/Graphics/UI/Gtk/Misc/IMContextSimple.chs 1 +{-# LANGUAGE CPP, ScopedTypeVariables #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget IMContextSimple +-- +-- Author : Andy Stewart +-- +-- Created: 24 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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) +-- +-- An input method context supporting table-based input methods +-- +module Graphics.UI.Gtk.Misc.IMContextSimple ( + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'IMContext' +-- | +----IMContextSimple +-- @ + +-- * Types + IMContextSimple, + IMContextSimpleClass, + castToIMContextSimple, + toIMContextSimple, + +-- * Constructors + imContextSimpleNew, + +-- * Methods + imContextSimpleAddTable, + ) where + +import Control.Monad (liftM) +import Data.Map (Map) + +import System.Glib.FFI +import System.Glib.UTFString +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +import qualified Data.Map as M + +-------------------- +-- Constructors + +-- | Creates a new 'IMContextSimple'. +-- +imContextSimpleNew :: IO IMContextSimple +imContextSimpleNew = + constructNewGObject mkIMContextSimple $ + liftM castPtr {# call gtk_im_context_simple_new #} + +-------------------- +-- Methods + +-- | Adds an additional table to search to the input context. Each row of the table consists of +-- @maxSeqLen@ key symbols followed by two 'Int' interpreted as the high and low words of a gunicode +-- value. Tables are searched starting from the last added. +-- [_$_] +-- The table must be sorted in dictionary order on the numeric value of the key symbol fields. (Values +-- beyond the length of the sequence should be zero.) +-- +imContextSimpleAddTable :: IMContextSimpleClass self => self + -> Map String String -- ^ @data@ - the table + -> Int -- ^ @maxSeqLen@ - Maximum length of a sequence in the table + -- (cannot be greater than 'MaxComposeLen') + -> Int -- ^ @nSeqs@ - number of sequences in the table + -> IO () +imContextSimpleAddTable self table maxSeqLen nSeqs = do + tableList <- mapM (\(x,y) -> do + nx <- newUTFString x + ny <- newUTFString y + return (nx, ny)) (M.toList table) + withArray (concatMap (\(x,y) -> [x, y]) tableList) $ \(tablePtr :: Ptr CString) -> [_$_] + {# call gtk_im_context_simple_add_table #} + (toIMContextSimple self) + (castPtr tablePtr) + (fromIntegral maxSeqLen) + (fromIntegral nSeqs) hunk ./gtk/gtk.cabal 247 + Graphics.UI.Gtk.Misc.IMContextSimple hunk ./gtk/hierarchy.list 178 + GtkIMContextSimple } |
From: Andy S. <And...@co...> - 2010-09-07 09:24:16
|
diffing dir... Tue Sep 7 05:21:27 EDT 2010 Andy Stewart <laz...@gm...> * Get rid of the nChars parameter and fix docs. Ignore-this: ed1a6023fc428fa7573d288f68e35ad7 { hunk ./gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs 131 --- | Inserts @nChars@ characters of @chars@ into the contents of the buffer, +-- | Inserts @chars@ into the contents of the buffer, hunk ./gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs 139 - -> Int -- ^ @nChars@ the number of characters need insert hunk ./gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs 140 -entryBufferInsertText self position chars nChars = +entryBufferInsertText self position chars = hunk ./gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs 142 - withUTFString chars $ \charsPtr -> + withUTFStringLen chars $ \ (charsPtr, len) -> hunk ./gtk/Graphics/UI/Gtk/Entry/EntryBuffer.chs 147 - (fromIntegral nChars) + (fromIntegral len) } |
From: Andy S. <And...@co...> - 2010-09-07 09:22:37
|
diffing dir... Tue Sep 7 04:48:41 EDT 2010 Andy Stewart <laz...@gm...> * Add type information in hierarchy.list Ignore-this: c33a8d821ac6f7613346e35963941e44 hunk ./gtk/hierarchy.list 72 + GtkScaleButton if gtk-2.12 + GtkVolumeButton if gtk-2.12 + GtkLinkButton if gtk-2.10 |
From: Andy S. <And...@co...> - 2010-09-07 09:22:30
|
diffing dir... Tue Sep 7 04:48:26 EDT 2010 Andy Stewart <laz...@gm...> * Add module in gtk.cabal Ignore-this: 114fefcd7552a02d0920f22a0669d6f3 hunk ./gtk/gtk.cabal 162 + Graphics.UI.Gtk.Buttons.LinkButton + Graphics.UI.Gtk.Buttons.ScaleButton + Graphics.UI.Gtk.Buttons.VolumeButton |
From: Andy S. <And...@co...> - 2010-09-07 09:22:26
|
diffing dir... Tue Sep 7 04:48:13 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Buttons.VolumeButton Ignore-this: ae9d437d70b9bf4387a2742a02507fe0 { addfile ./gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs hunk ./gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget VolumeButton +-- +-- Author : Andy Stewart +-- +-- Created: 22 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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 button which pops up a volume control +-- +-- * Module available since Gtk+ version 2.12 +-- +module Graphics.UI.Gtk.Buttons.VolumeButton ( + +-- * Detail +-- +-- | 'VolumeButton' is a subclass of 'ScaleButton' that has been tailored for +-- use as a volume control widget with suitable icons, tooltips and accessible +-- labels. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----'Button' +-- | +----'ScaleButton' +-- | +----VolumeButton +-- @ + +#if GTK_CHECK_VERSION(2,12,0) +-- * Types + VolumeButton, + VolumeButtonClass, + castToVolumeButton, + toVolumeButton, + +-- * Constructors + volumeButtonNew, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,12,0) +-------------------- +-- Constructors + +-- | Creates a 'VolumeButton', with a range between 0.0 and 1.0, with a +-- stepping of 0.02. Volume values can be obtained and modified using the +-- functions from 'ScaleButton'. +-- +volumeButtonNew :: IO VolumeButton +volumeButtonNew = + makeNewObject mkVolumeButton $ + liftM (castPtr :: Ptr Widget -> Ptr VolumeButton) $ + {# call gtk_volume_button_new #} +#endif } |
From: Andy S. <And...@co...> - 2010-09-07 09:22:24
|
diffing dir... Tue Sep 7 04:48:00 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Buttons.ScaleButton Ignore-this: 55cb65649039a708b1346c7af3459cc8 { addfile ./gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs hunk ./gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget ScaleButton +-- +-- Author : Andy Stewart +-- +-- Created: 22 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- 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 button which pops up a scale +-- +-- * Module available since Gtk+ version 2.12 +-- +module Graphics.UI.Gtk.Buttons.ScaleButton ( + +-- * Detail +-- +-- | 'ScaleButton' provides a button which pops up a scale widget. This kind +-- of widget is commonly used for volume controls in multimedia applications, +-- and Gtk+ provides a 'VolumeButton' subclass that is tailored for this use +-- case. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----'Button' +-- | +----ScaleButton +-- | +----'VolumeButton' +-- @ + +#if GTK_CHECK_VERSION(2,12,0) +-- * Types + ScaleButton, + ScaleButtonClass, + castToScaleButton, + toScaleButton, + +-- * Constructors + scaleButtonNew, + +-- * Methods + scaleButtonSetIcons, +#if GTK_CHECK_VERSION(2,14,0) + scaleButtonGetPopup, + scaleButtonGetPlusButton, + scaleButtonGetMinusButton, +#endif + +-- * Attributes + scaleButtonValue, + scaleButtonSize, + scaleButtonAdjustment, + scaleButtonIcons, + +-- * Signals + scaleButtonPopdown, + scaleButtonPopup, + scaleButtonValueChanged, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.UTFString +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +import Graphics.UI.Gtk.General.Structs (IconSize(..)) +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.Signals#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,12,0) +-------------------- +-- Interfaces + +-- instance OrientableClass ScaleButton + +-------------------- +-- Constructors + +-- | Creates a 'ScaleButton', with a range between @min@ and @max@, with a +-- stepping of @step@. +-- +scaleButtonNew :: + IconSize -- ^ @size@ - a stock icon size + -> Double -- ^ @min@ - the minimum value of the scale (usually 0) + -> Double -- ^ @max@ - the maximum value of the scale (usually 100) + -> Double -- ^ @step@ - the stepping of value when a scroll-wheel event, or + -- up\/down arrow event occurs (usually 2) + -> [String] -- ^ @icons@ + -> IO ScaleButton +scaleButtonNew size min max step icons = + makeNewObject mkScaleButton $ + liftM (castPtr :: Ptr Widget -> Ptr ScaleButton) $ + withUTFStringArray0 icons $ \iconsPtr -> + {# call gtk_scale_button_new #} + ((fromIntegral . fromEnum) size) + (realToFrac min) + (realToFrac max) + (realToFrac step) + iconsPtr + +-------------------- +-- Methods + +-- | Sets the icons to be used by the scale button. For details, see the "icons" property. +scaleButtonSetIcons :: ScaleButtonClass self => self + -> [String] -- ^ @icons@ + -> IO () +scaleButtonSetIcons self icons = + withUTFStringArray0 icons $ \iconsPtr -> + {# call gtk_scale_button_set_icons #} + (toScaleButton self) + iconsPtr + +#if GTK_CHECK_VERSION(2,14,0) +-- | Retrieves the popup of the 'ScaleButton'. +-- +-- * Available since Gtk+ version 2.14 +-- +scaleButtonGetPopup :: ScaleButtonClass self => self + -> IO Widget -- ^ returns the popup of the 'ScaleButton' +scaleButtonGetPopup self = + makeNewObject mkWidget $ + {# call gtk_scale_button_get_popup #} + (toScaleButton self) + +-- | Retrieves the plus button of the 'ScaleButton'. +-- +-- * Available since Gtk+ version 2.14 +-- +scaleButtonGetPlusButton :: ScaleButtonClass self => self + -> IO Widget -- ^ returns the plus button of the 'ScaleButton'. +scaleButtonGetPlusButton self = + makeNewObject mkWidget $ + {# call gtk_scale_button_get_plus_button #} + (toScaleButton self) + +-- | Retrieves the minus button of the 'ScaleButton'. +-- +-- * Available since Gtk+ version 2.14 +-- +scaleButtonGetMinusButton :: ScaleButtonClass self => self + -> IO Widget -- ^ returns the minus button of the 'ScaleButton'. +scaleButtonGetMinusButton self = + makeNewObject mkWidget $ + {# call gtk_scale_button_get_minus_button #} + (toScaleButton self) +#endif + +-------------------- +-- Attributes + +-- | The value of the scale. +-- [_$_] +-- Default value: 0 +scaleButtonValue :: ScaleButtonClass self => Attr self Double +scaleButtonValue = newAttrFromDoubleProperty "value" + +-- | The icon size. +-- [_$_] +-- Default value: ''IconSizeSmallToolbar'' +scaleButtonSize :: ScaleButtonClass self => Attr self IconSize +scaleButtonSize = newAttrFromEnumProperty "size" + {# call pure unsafe gtk_icon_size_get_type #} + +-- | The 'Adjustment' that contains the current value of this scale button object. +scaleButtonAdjustment :: ScaleButtonClass self => Attr self Adjustment +scaleButtonAdjustment = newAttrFromObjectProperty "adjustment" + {# call pure unsafe gtk_adjustment_get_type #} + +-- | The names of the icons to be used by the scale button. The first item in the array will be used in +-- the button when the current value is the lowest value, the second item for the highest value. All +-- the subsequent icons will be used for all the other values, spread evenly over the range of values. +-- [_$_] +-- If there's only one icon name in the icons array, it will be used for all the values. If only two +-- icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and +-- the second one for the top 50%. +-- [_$_] +-- It is recommended to use at least 3 icons so that the 'ScaleButton' reflects the current value of +-- the scale better for the users. +-- [_$_] +-- Since 2.12 +scaleButtonIcons :: ScaleButtonClass self => ReadWriteAttr self [String] (Maybe [String]) +scaleButtonIcons = + newAttr (objectGetPropertyBoxedOpaque (peekUTFStringArray0 . castPtr) gtype "search-path") + (objectSetPropertyBoxedOpaque (\dirs f -> maybeWith withUTFStringArray0 dirs (f . castPtr)) gtype "search-path") + where gtype = {#call pure g_strv_get_type#} + + +-------------------- +-- Signals + +-- | The ::value-changed signal is emitted when the value field has changed. +-- +scaleButtonValueChanged :: ScaleButtonClass self => Signal self (Double -> IO ()) +scaleButtonValueChanged = Signal (connect_DOUBLE__NONE "value_changed") + +-- | The 'popup' signal is a keybinding signal which gets emitted to popup the scale widget. +-- [_$_] +-- The default bindings for this signal are Space, Enter and Return. +scaleButtonPopup :: ScaleButtonClass self => Signal self (IO ()) +scaleButtonPopup = Signal (connect_NONE__NONE "popup") + +-- | The 'popdown' signal is a keybinding signal which gets emitted to popdown the scale widget. +-- [_$_] +-- The default binding for this signal is Escape. +scaleButtonPopdown :: ScaleButtonClass self => Signal self (IO ()) +scaleButtonPopdown = Signal (connect_NONE__NONE "popdown") +#endif } |