packages feed

gtk3 0.12.5.7 → 0.15.10

raw patch · 243 files changed

Files

Graphics/UI/Gtk.chs view
@@ -24,10 +24,10 @@ -- -- The following modules are not bound: --   DialogMessage : has only one variadic function which cannot be bound.---		     The same functionality can be simulated with Dialog.---   Item :	     The only child of this abstract class is MenuItem. The---		     three signals Item defines are therefore bound in ---		     MenuItem.+--                   The same functionality can be simulated with Dialog.+--   Item :          The only child of this abstract class is MenuItem. The+--                   three signals Item defines are therefore bound in+--                   MenuItem. -- -- TODO --@@ -66,6 +66,9 @@ #endif --  module Graphics.UI.Gtk.Gdk.GC,   module Graphics.UI.Gtk.Gdk.EventM,+#if GTK_CHECK_VERSION(3,16,0)+  module Graphics.UI.Gtk.Gdk.GLContext,+#endif   module Graphics.UI.Gtk.Gdk.Pixbuf, #if GTK_MAJOR_VERSION < 3   module Graphics.UI.Gtk.Gdk.Pixmap,@@ -90,6 +93,9 @@   module Graphics.UI.Gtk.Display.AccelLabel,   module Graphics.UI.Gtk.Display.Image,   module Graphics.UI.Gtk.Display.Label,+#if GTK_CHECK_VERSION(3,6,0)+  module Graphics.UI.Gtk.Display.LevelBar,+#endif   module Graphics.UI.Gtk.Display.ProgressBar,   module Graphics.UI.Gtk.Display.Spinner,   module Graphics.UI.Gtk.Display.Statusbar,@@ -218,6 +224,7 @@   module Graphics.UI.Gtk.Layout.Layout,   module Graphics.UI.Gtk.Layout.Notebook, #if GTK_MAJOR_VERSION >= 3+  module Graphics.UI.Gtk.Layout.Grid,   module Graphics.UI.Gtk.Layout.Overlay, #endif   module Graphics.UI.Gtk.Layout.Expander,@@ -225,6 +232,10 @@   module Graphics.UI.Gtk.Layout.VBox,   module Graphics.UI.Gtk.Layout.VButtonBox,   module Graphics.UI.Gtk.Layout.VPaned,+#if GTK_CHECK_VERSION(3,10,0)+  module Graphics.UI.Gtk.Layout.Stack,+  module Graphics.UI.Gtk.Layout.StackSwitcher,+#endif   -- * Ornaments   module Graphics.UI.Gtk.Ornaments.Frame,   module Graphics.UI.Gtk.Ornaments.HSeparator,@@ -252,6 +263,9 @@   module Graphics.UI.Gtk.Misc.Arrow,   module Graphics.UI.Gtk.Misc.Calendar,   module Graphics.UI.Gtk.Misc.DrawingArea,+#if GTK_CHECK_VERSION(3,16,0)+  module Graphics.UI.Gtk.Misc.GLArea,+#endif   module Graphics.UI.Gtk.Misc.EventBox,   module Graphics.UI.Gtk.Misc.HandleBox,   module Graphics.UI.Gtk.Misc.IMMulticontext,@@ -262,6 +276,9 @@   module Graphics.UI.Gtk.Misc.Tooltips, #endif   module Graphics.UI.Gtk.Misc.Viewport,+#if GTK_MAJOR_VERSION >= 3+  module Graphics.UI.Gtk.Misc.Switch,+#endif   -- * Abstract base classes   module Graphics.UI.Gtk.Abstract.Box,   module Graphics.UI.Gtk.Abstract.ButtonBox,@@ -276,9 +293,11 @@   module Graphics.UI.Gtk.Abstract.Scrollbar,   module Graphics.UI.Gtk.Abstract.Separator,   module Graphics.UI.Gtk.Abstract.Widget,+#if (defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))) || defined(GDK_WINDOWING_X11)   -- * Cross-process embedding   module Graphics.UI.Gtk.Embedding.Plug,   module Graphics.UI.Gtk.Embedding.Socket,+#endif   -- * Non-widgets   module System.Glib.Signals,   module System.Glib.Attributes,@@ -314,10 +333,13 @@ #endif import Graphics.UI.Gtk.Gdk.DrawWindow #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.Gdk.Region		hiding (makeNewRegion)+import Graphics.UI.Gtk.Gdk.Region               hiding (makeNewRegion) #endif --import Graphics.UI.Gtk.Gdk.GC import Graphics.UI.Gtk.Gdk.EventM+#if GTK_CHECK_VERSION(3,16,0)+import Graphics.UI.Gtk.Gdk.GLContext+#endif import Graphics.UI.Gtk.Gdk.Pixbuf #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.Gdk.Pixmap@@ -342,6 +364,9 @@ import Graphics.UI.Gtk.Display.AccelLabel import Graphics.UI.Gtk.Display.Image import Graphics.UI.Gtk.Display.Label+#if GTK_CHECK_VERSION(3,6,0)+import Graphics.UI.Gtk.Display.LevelBar+#endif import Graphics.UI.Gtk.Display.ProgressBar import Graphics.UI.Gtk.Display.Spinner import Graphics.UI.Gtk.Display.Statusbar@@ -478,8 +503,13 @@ import Graphics.UI.Gtk.Layout.Layout import Graphics.UI.Gtk.Layout.Notebook #if GTK_MAJOR_VERSION >= 3+import Graphics.UI.Gtk.Layout.Grid import Graphics.UI.Gtk.Layout.Overlay #endif+#if GTK_CHECK_VERSION(3,10,0)+import Graphics.UI.Gtk.Layout.Stack+import Graphics.UI.Gtk.Layout.StackSwitcher+#endif import Graphics.UI.Gtk.Layout.Expander import Graphics.UI.Gtk.Layout.Table -- ornaments@@ -509,6 +539,9 @@ import Graphics.UI.Gtk.Misc.Arrow import Graphics.UI.Gtk.Misc.Calendar import Graphics.UI.Gtk.Misc.DrawingArea+#if GTK_CHECK_VERSION(3,16,0)+import Graphics.UI.Gtk.Misc.GLArea+#endif import Graphics.UI.Gtk.Misc.EventBox import Graphics.UI.Gtk.Misc.HandleBox import Graphics.UI.Gtk.Misc.IMMulticontext@@ -519,6 +552,9 @@ import Graphics.UI.Gtk.Misc.Tooltips #endif import Graphics.UI.Gtk.Misc.Viewport+#if GTK_MAJOR_VERSION >= 3+import Graphics.UI.Gtk.Misc.Switch+#endif --import Accessible -- abstract base classes import Graphics.UI.Gtk.Abstract.Box@@ -547,16 +583,18 @@ import Graphics.UI.Gtk.Abstract.Separator import Graphics.UI.Gtk.Abstract.Widget -- cross-process embedding+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) || defined(GDK_WINDOWING_X11) import Graphics.UI.Gtk.Embedding.Plug import Graphics.UI.Gtk.Embedding.Socket+#endif  -- non widgets import System.Glib.Signals {- do eport 'on' and 'after'-		(ConnectId, disconnect,-					 signalDisconnect,-					 signalBlock,-					 signalUnblock)+                (ConnectId, disconnect,+                                         signalDisconnect,+                                         signalBlock,+                                         signalUnblock) -} import System.Glib.Attributes import System.Glib.GObject (@@ -571,7 +609,7 @@   isA   ) import Graphics.UI.Gtk.Builder-  + -- pango modules import Graphics.Rendering.Pango.Context import Graphics.Rendering.Pango.Markup
Graphics/UI/Gtk/Abstract/Bin.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Bin ( -- * Detail--- +-- -- | The 'Bin' widget is a container with just one child. It is not very -- useful itself, but it is useful for deriving subclasses, since it provides -- common code needed for handling a single child widget.
Graphics/UI/Gtk/Abstract/Box.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Box ( -- * Detail--- +-- -- | 'Box' is an abstract widget which encapsulates functionality for a -- particular kind of container, one that organizes a variable number of -- widgets into a rectangular area. 'Box' currently has two derived classes,@@ -54,7 +54,7 @@ -- parameter that denotes how to fill up unused space. -- -- While the right amount of padding around each widget is a matter of--- appearance, the 'Packing' paramter specifies the way the widgets in+-- appearance, the 'Packing' parameter specifies the way the widgets in -- the container behave when the window is resized and thereby affect -- the usability. Hence, once you have created a window, you should resize -- it and see if the widgets behave as expected. The 'Packing' parameter of@@ -116,10 +116,24 @@   boxReorderChild,   boxQueryChildPacking,   boxSetChildPacking,+#if GTK_CHECK_VERSION(3,10,0)+  boxGetBaselinePosition,+  boxSetBaselinePosition,+#endif+#if GTK_CHECK_VERSION(3,12,0)+  boxGetCenterWidget,+  boxSetCenterWidget,+#endif  -- * Attributes   boxSpacing,   boxHomogeneous,+#if GTK_CHECK_VERSION(3,10,0)+  boxBaselinePosition,+#endif+#if GTK_CHECK_VERSION(3,12,0)+  boxCenterWidget,+#endif  -- * Child Attributes   boxChildPacking,@@ -128,15 +142,22 @@   boxChildPosition,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(PackType(..), Packing(..),+import Graphics.UI.Gtk.General.Enums    (PackType(..), Packing(..),                                         toPacking, fromPacking) import Graphics.UI.Gtk.Abstract.ContainerChildProperties +#if GTK_CHECK_VERSION(3,10,0)+import Graphics.UI.Gtk.General.Enums    (BaselinePosition)+#endif+#if GTK_CHECK_VERSION(3,12,0)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)+#endif+ {# context lib="gtk" prefix="gtk" #}  --------------------@@ -167,14 +188,14 @@     (fromIntegral padding)   where (expand, fill) = fromPacking packing --- | Adds the @child@ widget to the box, packed with reference to the end of +-- | Adds the @child@ widget to the box, packed with reference to the end of -- the box. The -- @child@ is packed after (away from end of) any other child packed with -- reference to the end of the box. ----- Note that +-- Note that -- for 'boxPackEnd' the 'PackNatural' option will move a child to the right in--- an 'HBox' or to the bottom in an 'VBox' if there is more space availble.+-- an 'HBox' or to the bottom in an 'VBox' if there is more space available. -- boxPackEnd :: (BoxClass self, WidgetClass child) => self  -> child -- ^ @child@ - the 'Widget' to be added to the box.@@ -278,7 +299,7 @@  -- | Returns information about how @child@ is packed into the box. ----- Returns information on the behaviour if free space is available +-- Returns information on the behaviour if free space is available -- (in 'Packing'), the additional padding for this widget and if the widget -- was inserted at the start or end of the container ('PackType'). --@@ -321,6 +342,51 @@     ((fromIntegral . fromEnum) packType)   where (expand, fill) = fromPacking packing +#if GTK_CHECK_VERSION(3,10,0)+-- | Gets the value set by `boxSetBaselinePosition`+boxGetBaselinePosition :: BoxClass self => self+ -> IO BaselinePosition+boxGetBaselinePosition self =+  liftM (toEnum . fromIntegral) $+  {# call unsafe box_get_baseline_position #}+    (toBox self)++-- | Sets the baseline position of a box. This affects only+-- horizontal boxes with at least one baseline aligned child.+-- If there is more vertical space available than requested,+-- and the baseline is not allocated by the parent then+-- `position` is used to allocate the baseline wrt the extra+-- space available.+boxSetBaselinePosition :: BoxClass self => self+ -> BaselinePosition+ -> IO ()+boxSetBaselinePosition self position =+  {# call unsafe box_set_baseline_position #}+    (toBox self)+    (fromIntegral $ fromEnum position)+#endif++#if GTK_CHECK_VERSION(3,12,0)+-- | Retrieves the center widget of the box.+boxGetCenterWidget :: BoxClass self => self+ -> IO Widget+boxGetCenterWidget self =+  makeNewObject mkWidget $+  {# call unsafe box_get_center_widget #}+    (toBox self)++-- | Sets a center widget; that is a child widget that will be+-- centered with respect to the full width of the box, even if+-- the children at either side take up different amounts of space.+boxSetCenterWidget :: (BoxClass self, WidgetClass widget) => self+ -> widget+ -> IO ()+boxSetCenterWidget self position =+  {# call unsafe box_set_center_widget #}+    (toBox self)+    (toWidget position)+#endif+ -- | Retrieves the standard spacing between widgets. -- boxGetSpacing :: BoxClass self => self@@ -352,6 +418,24 @@ boxHomogeneous = newAttr   boxGetHomogeneous   boxSetHomogeneous++#if GTK_CHECK_VERSION(3,10,0)+-- | The position of the baseline aligned widgets if extra space is available.+boxBaselinePosition :: BoxClass self => Attr self BaselinePosition+boxBaselinePosition = newAttr+  boxGetBaselinePosition+  boxSetBaselinePosition+#endif++#if GTK_CHECK_VERSION(3,12,0)+-- | A child widget that will be centered with respect to the+-- full width of the box, even if the children at either side+-- take up different amounts of space.+boxCenterWidget :: (BoxClass self, WidgetClass widget) => ReadWriteAttr self Widget widget+boxCenterWidget = newAttr+  boxGetCenterWidget+  boxSetCenterWidget+#endif  -------------------- -- Child Attributes
Graphics/UI/Gtk/Abstract/ButtonBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.ButtonBox ( -- * Detail--- +-- -- | The primary purpose of this class is to keep track of the various -- properties of 'HButtonBox' and 'VButtonBox' widgets. --@@ -77,12 +77,19 @@ #if GTK_CHECK_VERSION(2,4,0)   buttonBoxGetChildSecondary, #endif+#if GTK_CHECK_VERSION(3,2,0)+  buttonBoxSetChildNonHomogeneous,+  buttonBoxGetChildNonHomogeneous,+#endif  -- * Attributes   buttonBoxLayoutStyle,  -- * Child Attributes   buttonBoxChildSecondary,+#if GTK_CHECK_VERSION(3,2,0)+  buttonBoxChildNonHomogeneous,+#endif   ) where  import Control.Monad (liftM)@@ -122,6 +129,31 @@     (toWidget child) #endif +#if GTK_CHECK_VERSION(3,2,0)+-- | Sets whether the child is exempted from homogeous sizing.+--+buttonBoxSetChildNonHomogeneous :: (ButtonBoxClass self, WidgetClass child) => self+ -> child -- ^ @child@ - a child of the button box widget+ -> Bool  -- ^ @nonHomogeneous@+ -> IO ()+buttonBoxSetChildNonHomogeneous self child nonHomogeneous =+  {# call gtk_button_box_set_child_non_homogeneous #}+    (toButtonBox self)+    (toWidget child)+    (fromBool nonHomogeneous)++-- | Returns whether the child is exempted from homogeneous sizing.+--+buttonBoxGetChildNonHomogeneous :: (ButtonBoxClass self, WidgetClass child) => self+ -> child   -- ^ @child@ - a child of the button box widget+ -> IO Bool+buttonBoxGetChildNonHomogeneous self child =+  liftM toBool $+  {# call gtk_button_box_get_child_non_homogeneous #}+    (toButtonBox self)+    (toWidget child)+#endif+ -- | Changes the way buttons are arranged in their container. -- buttonBoxSetLayout :: ButtonBoxClass self => self@@ -178,3 +210,12 @@ -- buttonBoxChildSecondary :: (ButtonBoxClass self, WidgetClass child) => child -> Attr self Bool buttonBoxChildSecondary = newAttrFromContainerChildBoolProperty "secondary"++#if GTK_CHECK_VERSION(3,2,0)+-- | If @True@, the child will not be subject to homogeneous sizing.+--+-- Default value: @False@+--+buttonBoxChildNonHomogeneous :: (ButtonBoxClass self, WidgetClass child) => child -> Attr self Bool+buttonBoxChildNonHomogeneous = newAttrFromContainerChildBoolProperty "non-homogeneous"+#endif
Graphics/UI/Gtk/Abstract/Container.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Container ( -- * Detail--- +-- -- | A Gtk+ user interface is constructed by nesting widgets inside widgets. -- Container widgets are the inner nodes in the resulting tree of widgets: they -- contain other widgets. So, for example, you might have a 'Window' containing@@ -55,7 +55,7 @@ -- out in two phases, size requisition and size allocation.  -- ** Size Requisition--- +-- -- | The size requisition of a widget is it's desired width and height. This -- is represented by a 'Requisition'. --@@ -72,7 +72,7 @@ -- will get a requisition back from its child.  -- ** Size Allocation--- +-- -- | When the top-level widget has determined how much space its child would -- like to have, the second phase of the size negotiation, size allocation, -- begins. Depending on its configuration (see 'windowSetResizable'), the@@ -94,7 +94,7 @@ -- request is only a request, and widgets must be able to cope with any size.  -- ** Child attributes--- +-- -- | 'Container' introduces child attributes - these are object attributes -- that are not specific to either the container or the contained widget, but -- rather to their relation. Typical examples of child attributes are the@@ -111,9 +111,9 @@ -- Whereas child attributes take the child object as a parameter: -- -- > set container [ attr child := value ]--- --- And similarily for getting a child attribute's value: --+-- And similarly for getting a child attribute's value:+-- -- > value <- get container (attr child) -- @@ -195,16 +195,16 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import System.Glib.GList		(fromGList, withGList)-import Graphics.UI.Gtk.General.Enums	(ResizeMode(..))+import System.Glib.GList                (fromGList, withGList)+import Graphics.UI.Gtk.General.Enums    (ResizeMode(..))  {# context lib="gtk" prefix="gtk" #} @@ -415,7 +415,7 @@ -- because toplevel windows can't leave space outside, they leave the space -- inside. The border is added on all sides of the container. To add space to -- only one side, one approach is to create a 'Alignment' widget, call--- 'widgetSetUsize' to give it a size, and place it on the side of the+-- 'widgetSetSizeRequest' to give it a size, and place it on the side of the -- container as a spacer. -- containerSetBorderWidth :: ContainerClass self => self
Graphics/UI/Gtk/Abstract/ContainerChildProperties.chs view
@@ -42,13 +42,14 @@ import Control.Monad (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Flags {#import Graphics.UI.Gtk.Types#} import System.Glib.GType import qualified System.Glib.GTypeConstants as GType import System.Glib.GValueTypes-{#import System.Glib.GValue#}		(GValue(GValue), allocaGValue, valueInit)-import System.Glib.Attributes		(Attr, newAttr)+{#import System.Glib.GValue#}           (GValue(GValue), allocaGValue, valueInit)+import System.Glib.Attributes           (Attr, newAttr)  {# context lib="gtk" prefix="gtk" #} @@ -147,8 +148,8 @@   (containerChildSetPropertyInternal gtype valueSetFlags propName child)  newAttrFromContainerChildStringProperty ::- (ContainerClass container, WidgetClass child)- => String -> child -> Attr container String+ (ContainerClass container, WidgetClass child, GlibString string)+ => String -> child -> Attr container string newAttrFromContainerChildStringProperty propName child = newAttr   (containerChildGetPropertyInternal GType.string valueGetString propName child)   (containerChildSetPropertyInternal GType.string valueSetString propName child)
Graphics/UI/Gtk/Abstract/IMContext.chs view
@@ -65,14 +65,14 @@   imContextDeleteSurrounding',   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import Control.Monad.Reader.Class (ask) import Control.Monad.Trans (liftIO) import Data.Maybe (fromMaybe)  import System.Glib.FFI import System.Glib.UTFString (readUTFString, withUTFString, genUTFOfs,-                              ofsToUTF, ofsFromUTF)+                              ofsToUTF, ofsFromUTF, GlibString) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.Gdk.EventM (EventM, EKey)@@ -103,8 +103,8 @@ -- attributes to apply to the string. This string should be displayed inserted -- at the insertion point. ---imContextGetPreeditString :: IMContextClass self => self- -> IO (String, [[PangoAttribute]], Int)+imContextGetPreeditString :: (IMContextClass self, GlibString string) => self+ -> IO (string, [[PangoAttribute]], Int)                     -- ^ @(str, attrs, cursorPos)@ Retrieved string,                     -- attributes to apply to the string, position of cursor. imContextGetPreeditString self =@@ -195,8 +195,8 @@ -- 'imContextRetrieveSurrounding' signal, and will likely have no effect if -- called at other times. ---imContextSetSurrounding :: IMContextClass self => self- -> String -- ^ @text@ - text surrounding the insertion point, as UTF-8. the+imContextSetSurrounding :: (IMContextClass self, GlibString string) => self+ -> string -- ^ @text@ - text surrounding the insertion point, as UTF-8. the            -- preedit string should not be included within @text@.  -> Int    -- ^ @cursorIndex@ - the index of the insertion cursor within            -- @text@.@@ -221,8 +221,8 @@ -- is no obligation for a widget to respond to the 'imContextRetrieveSurrounding' -- signal, so input methods must be prepared to function without context. ---imContextGetSurrounding :: IMContextClass self => self- -> IO (Maybe (String, Int)) -- ^ @Maybe (text,cursorIndex)@ Text holding+imContextGetSurrounding :: (IMContextClass self, GlibString string) => self+ -> IO (Maybe (string, Int)) -- ^ @Maybe (text,cursorIndex)@ Text holding                              -- context around the insertion point and the                              -- index of the insertion cursor within @text@.                              -- 'Nothing' if  no surrounding text was@@ -295,8 +295,8 @@ -- key press or the final result of preediting. Parameters: -- -- @str@ - the completed character(s) entered by the user-imContextCommit :: IMContextClass self => Signal self (String -> IO ())-imContextCommit = Signal (connect_STRING__NONE "commit")+imContextCommit :: (IMContextClass self, GlibString string) => Signal self (string -> IO ())+imContextCommit = Signal (connect_GLIBSTRING__NONE "commit")  -- | This signal is emitted when the input method requires the context -- surrounding the cursor. The callback should set the input method
Graphics/UI/Gtk/Abstract/Misc.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Misc ( -- * Detail--- +-- -- | The 'Misc' widget is an abstract widget which is not useful itself, but -- is used to derive subclasses which have alignment and padding attributes. --
Graphics/UI/Gtk/Abstract/Object.chs view
@@ -25,13 +25,13 @@ -- -- The base class of the Gtk+ type hierarchy. ----- * Each widget is a represented as a purely abstract data type. It can only +-- * Each widget is a represented as a purely abstract data type. It can only --   be accessed through and the special access functions that are defined --   in each widget file. -- module Graphics.UI.Gtk.Abstract.Object ( -- * Detail--- +-- -- | 'Object' is the base class for all widgets, and for a few non-widget -- objects such as 'Adjustment'. 'Object' predates 'GObject'; non-widgets that -- derive from 'Object' rather than 'GObject' do so for backward compatibility@@ -77,12 +77,6 @@  import System.Glib.FFI import System.Glib.Attributes (ReadWriteAttr)-import System.Glib.GObject	(objectUnref)-#if GLIB_CHECK_VERSION(2,10,0)-import System.Glib.GObject	(objectRefSink)-#else-import System.Glib.GObject      (objectRef)-#endif {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Data.IORef@@ -95,7 +89,7 @@ -- turn the initial floating state to sunk -- -- * The floating\/sunk concept of a GTK object is not very useful to us.---   The following procedure circumvents the whole subject and ensures +--   The following procedure circumvents the whole subject and ensures --   proper cleanup: --     on creation:      objectRef, objectSink --     on finalization:  objectUnref@@ -109,12 +103,12 @@ -- This is a convenience function to generate a new widget. It adds the -- finalizer with the method described under objectSink. ----- * The constr argument is the contructor of the specific object.+-- * The constr argument is the constructor of the specific object. -- #if GTK_MAJOR_VERSION < 3-makeNewObject :: ObjectClass obj => +makeNewObject :: ObjectClass obj => #else-makeNewObject :: GObjectClass obj => +makeNewObject :: GObjectClass obj => #endif   (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj makeNewObject (constr, objectUnref) generator = do@@ -159,7 +153,7 @@ #else objectWeakunref :: GObjectClass o => o -> GWeakNotify -> IO () #endif-objectWeakunref obj fun = +objectWeakunref obj fun =   {#call unsafe g_object_weak_unref#} (toGObject obj) fun nullPtr  
Graphics/UI/Gtk/Abstract/Paned.chs view
@@ -27,11 +27,11 @@ -- module Graphics.UI.Gtk.Abstract.Paned ( -- * Detail--- +-- -- | 'Paned' is the base class for widgets with two panes, arranged either -- horizontally ('HPaned') or vertically ('VPaned'). Child widgets are added to -- the panes of the widget with 'panedPack1' and 'panedPack2'. The division--- beween the two children is set by default from the size requests of the+-- between the two children is set by default from the size requests of the -- children, but it can be adjusted by the user. -- -- A paned widget draws a separator between the two child widgets and a@@ -118,15 +118,17 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}+#ifndef DISABLE_DEPRECATED {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Enums	(ScrollType)+import Graphics.UI.Gtk.General.Enums    (ScrollType)+#endif import Graphics.UI.Gtk.Abstract.ContainerChildProperties  {# context lib="gtk" prefix="gtk" #}@@ -312,7 +314,7 @@ -- Deprecated Signals  #ifndef DISABLE_DEPRECATED--- | +-- | -- onCycleChildFocus, afterCycleChildFocus :: PanedClass self => self  -> (Bool -> IO Bool)@@ -320,7 +322,7 @@ onCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" False afterCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" True --- | +-- | -- onToggleHandleFocus, afterToggleHandleFocus :: PanedClass self => self  -> IO Bool@@ -328,7 +330,7 @@ onToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" False afterToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" True --- | +-- | -- onMoveHandle, afterMoveHandle :: PanedClass self => self  -> (ScrollType -> IO Bool)@@ -336,7 +338,7 @@ onMoveHandle = connect_ENUM__BOOL "move_handle" False afterMoveHandle = connect_ENUM__BOOL "move_handle" True --- | +-- | -- onCycleHandleFocus, afterCycleHandleFocus :: PanedClass self => self  -> (Bool -> IO Bool)@@ -344,7 +346,7 @@ onCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" False afterCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" True --- | +-- | -- onAcceptPosition, afterAcceptPosition :: PanedClass self => self  -> IO Bool@@ -352,7 +354,7 @@ onAcceptPosition = connect_NONE__BOOL "accept_position" False afterAcceptPosition = connect_NONE__BOOL "accept_position" True --- | +-- | -- onCancelPosition, afterCancelPosition :: PanedClass self => self  -> IO Bool
Graphics/UI/Gtk/Abstract/Range.chs view
@@ -116,19 +116,19 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Enums	(ScrollType(..))+import Graphics.UI.Gtk.General.Enums    (ScrollType(..)) #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.General.Enums	(UpdateType(..))+import Graphics.UI.Gtk.General.Enums    (UpdateType(..)) #endif-import Graphics.UI.Gtk.General.Structs	(Rectangle(..))+import Graphics.UI.Gtk.General.Structs  (Rectangle(..))  {# context lib="gtk" prefix="gtk" #} @@ -267,7 +267,7 @@ -- -- * 'SensitivityAuto': the arrow is made insensitive if the thumb is at the end ----- * 'SensitivityOn': the arrow is alwasy sensitive+-- * 'SensitivityOn': the arrow is always sensitive -- -- * 'SensitivityOff': the arrow is always insensitive --@@ -331,18 +331,18 @@ #endif #if GTK_CHECK_VERSION(2,20,0) -- | This function is useful mainly for 'Range' subclasses.--- +-- -- See 'rangeSetMinSliderSize'. rangeGetMinSliderSize :: RangeClass self => self-                      -> IO Int  -- ^ returns The minimum size of the range's slider. +                      -> IO Int  -- ^ returns The minimum size of the range's slider. rangeGetMinSliderSize range =   liftM fromIntegral $   {#call gtk_range_get_min_slider_size #}     (toRange range) --- | This function returns the area that contains the range's trough and its steppers, in 'DrawWindow'+-- | This function returns the area that contains the range's through and its steppers, in 'DrawWindow' -- coordinates.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeGetRangeRect :: RangeClass self => self                   -> IO Rectangle@@ -354,12 +354,12 @@   peek rPtr  -- | This function returns sliders range along the long dimension, in 'DrawWindow' coordinates.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeGetSliderRange :: RangeClass self => self                     -> IO (Maybe (Int, Int)) rangeGetSliderRange range =-    alloca $ \ startPtr -> +    alloca $ \ startPtr ->     alloca $ \ endPtr -> do       {#call gtk_range_get_slider_range #}         (toRange range)@@ -373,17 +373,17 @@          else return Nothing  -- | This function is useful mainly for 'Range' subclasses.--- +-- -- See 'rangeSetSliderSizeFixed'. rangeGetSliderSizeFixed :: RangeClass self => self-                        -> IO Bool  -- ^ returns whether the range's slider has a fixed size. -rangeGetSliderSizeFixed self =   +                        -> IO Bool  -- ^ returns whether the range's slider has a fixed size.+rangeGetSliderSizeFixed self =   liftM toBool $   {#call gtk_range_get_slider_size_fixed #}     (toRange self)  -- | Sets the minimum size of the range's slider.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeSetMinSliderSize :: RangeClass self => self                       -> Bool@@ -395,10 +395,10 @@  -- | Sets whether the range's slider has a fixed size, or a size that depends on it's adjustment's page -- size.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeSetSliderSizeFixed :: RangeClass self => self-                        -> Bool -- ^ @sizeFixed@ 'True' to make the slider size constant +                        -> Bool -- ^ @sizeFixed@ 'True' to make the slider size constant                         -> IO () rangeSetSliderSizeFixed self sizeFixed =   {#call gtk_range_set_slider_size_fixed #}@@ -413,7 +413,7 @@ -- | How the range should be updated on the screen. -- -- Default value: 'UpdateContinuous'--- +-- -- Removed in Gtk3. rangeUpdatePolicy :: RangeClass self => Attr self UpdateType rangeUpdatePolicy = newAttr@@ -468,7 +468,7 @@   rangeSetValue  #if GTK_CHECK_VERSION(2,20,0)--- | Wheter range's slikder has a fixed size, or a size that depends on it's adjustment's page size.+-- | Whether range's slikder has a fixed size, or a size that depends on it's adjustment's page size. rangeSliderSizeFixed :: RangeClass self => Attr self Bool rangeSliderSizeFixed = newAttr   rangeGetSliderSizeFixed@@ -530,9 +530,9 @@ --   the event itself and return 'True' to prevent further --   processing. Or, by returning 'False', it can pass the event to --   other handlers until the default GTK+ handler is reached.---   +-- --   * Since Gtk 2.6---   +-- onRangeChangeValue, afterRangeChangeValue :: RangeClass self => self  -> (ScrollType -> Double -> IO Bool)  -> IO (ConnectId self)
Graphics/UI/Gtk/Abstract/Scale.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Scale ( -- * Detail--- +-- -- | A 'Scale' is a slider control used to select a numeric value. To use it, -- you'll probably want to investigate the methods on its base class, 'Range', -- in addition to the methods for 'Scale' itself. To set the value of a scale,@@ -74,12 +74,12 @@   scaleValuePos,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(PositionType(..))+import Graphics.UI.Gtk.General.Enums    (PositionType(..))  {# context lib="gtk" prefix="gtk" #} 
Graphics/UI/Gtk/Abstract/Scrollbar.hs view
@@ -27,8 +27,8 @@ -- module Graphics.UI.Gtk.Abstract.Scrollbar ( -- * Detail--- --- | The 'Scrollbar' widget is an abstract base class for +--+-- | The 'Scrollbar' widget is an abstract base class for --   'Graphics.UI.Gtk.Scrolling.HScrollbar' and --   'Graphics.UI.Gtk.Scrolling.VScrollbar'. It is not very useful in itself. --
Graphics/UI/Gtk/Abstract/Separator.hs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Separator ( -- * Detail--- +-- -- | The 'Separator' widget is an abstract class, used only for deriving the -- subclasses 'Graphics.UI.Gtk.Ornaments.HSeparator' and -- 'Graphics.UI.Gtk.Ornaments.VSeparator'.
Graphics/UI/Gtk/Abstract/Widget.chs view
@@ -43,3407 +43,4476 @@ -- the look of applications without the need to write a theme engine in C. -- -- Widgets receive events, that is, signals that indicate some low-level--- user iteraction. The signal handlers for all these events have to--- return @True@ if the signal has been dealt with and @False@ if other--- signal handlers should be run.---- * Class Hierarchy------ |--- @--- |  'GObject'--- |   +----'Object'--- |         +----Widget--- |               +----/too many to list/--- @---- * Types-  Widget,-  WidgetClass,-  castToWidget, gTypeWidget,-  toWidget,-  EventMask(..),-#if GTK_MAJOR_VERSION < 3-  ExtensionMode(..),-#endif-  GType,-  KeyVal,-#if GTK_MAJOR_VERSION < 3-  Region,-  Bitmap,-#endif-  Requisition(..),-  Rectangle(..),-  Color,-  IconSize(..),-  StateType(..),-  TextDirection(..),-  AccelFlags(..),-  DirectionType(..),-  StockId,-  WidgetHelpType(..),---- * Methods-  widgetShow,-  widgetShowNow,-  widgetHide,-  widgetShowAll,-#if GTK_MAJOR_VERSION < 3-  widgetHideAll,-#endif-  widgetDestroy,-  widgetQueueDraw,-  widgetQueueResize,-#if GTK_CHECK_VERSION(2,4,0)-  widgetQueueResizeNoRedraw,-#endif-  widgetSizeRequest,-  widgetGetChildRequisition,-  widgetSizeAllocate,-  widgetAddAccelerator,-  widgetRemoveAccelerator,-  widgetSetAccelPath,-#if GTK_CHECK_VERSION(2,4,0)-  widgetCanActivateAccel,-#endif-  widgetActivate,-  widgetIntersect,-  widgetHasIntersection,-  widgetGetIsFocus,-  widgetGrabFocus,-  widgetGrabDefault,-  widgetSetName,-  widgetGetName,-  widgetSetSensitive,-  widgetSetSensitivity,-  widgetGetParentWindow,-#if GTK_MAJOR_VERSION < 3-  widgetGetDrawWindow,-#endif-  widgetGetWindow,-  widgetDelEvents,-  widgetAddEvents,-  widgetGetEvents,-  widgetSetEvents,-#if GTK_MAJOR_VERSION < 3-  widgetSetExtensionEvents,-  widgetGetExtensionEvents,-#endif-  widgetGetToplevel,-  widgetGetAncestor,-#if GTK_MAJOR_VERSION < 3-  widgetGetColormap,-  widgetSetColormap,-#endif-  widgetGetPointer,-  widgetIsAncestor,-  widgetTranslateCoordinates,-  widgetSetStyle,-  widgetGetStyle,-#if GTK_MAJOR_VERSION < 3-  widgetPushColormap,-  widgetPopColormap,-  widgetSetDefaultColormap,-  widgetGetDefaultColormap,-#endif-  widgetGetDefaultStyle,-  widgetSetDirection,-  widgetGetDirection,-  widgetSetDefaultDirection,-  widgetGetDefaultDirection,-#if GTK_MAJOR_VERSION < 3-  widgetShapeCombineMask,-#if GTK_CHECK_VERSION(2,10,0)-  widgetInputShapeCombineMask,-#endif-#endif-#if GTK_CHECK_VERSION(2,12,0)-  widgetGetTooltipWindow,-  widgetSetTooltipWindow,-  widgetTriggerTooltipQuery,-#endif-#if GTK_MAJOR_VERSION < 3-#if GTK_CHECK_VERSION(2,14,0)-  widgetGetSnapshot,-#endif-#endif-  widgetPath,-  widgetClassPath,-  widgetGetCompositeName,-  widgetModifyStyle,-  widgetGetModifierStyle,-  widgetModifyFg,-  widgetModifyBg,-  widgetModifyText,-  widgetModifyBase,-  widgetModifyFont,-  widgetRestoreFg,-  widgetRestoreBg,-  widgetRestoreText,-  widgetRestoreBase,-  widgetCreatePangoContext,-  widgetGetPangoContext,-  widgetCreateLayout,-  widgetRenderIcon,-  widgetQueueDrawArea,-#if GTK_MAJOR_VERSION < 3-  widgetResetShapes,-#endif-  widgetSetAppPaintable,-  widgetSetDoubleBuffered,-  widgetSetRedrawOnAllocate,-  widgetSetCompositeName,-#if GTK_MAJOR_VERSION < 3-  widgetSetScrollAdjustments,-  widgetRegionIntersect,-#endif-  widgetGetAccessible,-  widgetChildFocus,-  widgetGetChildVisible,-  widgetGetParent,-  widgetGetSettings,-#if GTK_CHECK_VERSION(2,2,0)-  widgetGetClipboard,-  widgetGetDisplay,-  widgetGetRootWindow,-  widgetGetScreen,-  widgetHasScreen,-#endif-  widgetGetSizeRequest,-  widgetSetChildVisible,-  widgetSetSizeRequest,-#if GTK_CHECK_VERSION(2,4,0)-  widgetSetNoShowAll,-  widgetGetNoShowAll,-  widgetListMnemonicLabels,-  widgetAddMnemonicLabel,-  widgetRemoveMnemonicLabel,-#if GTK_CHECK_VERSION(2,10,0)-#if GTK_MAJOR_VERSION < 3-  widgetGetAction,-#endif-  widgetIsComposited,-#endif-#endif-  widgetReparent,-#if GTK_CHECK_VERSION(2,18,0)-  widgetGetCanFocus,-  widgetSetCanFocus,-  widgetGetAllocation,-#endif-#if GTK_CHECK_VERSION(3,0,0)-  widgetGetAllocatedWidth,-  widgetGetAllocatedHeight,-#endif-  widgetGetState,-  widgetSetState,-#if GTK_MAJOR_VERSION < 3-  widgetGetSavedState,-  widgetGetSize,-#endif-  widgetEvent,---- * Attributes-  widgetName,-  widgetParent,-  widgetWidthRequest,-  widgetHeightRequest,-  widgetMarginLeft,-  widgetMarginRight,-  widgetMarginTop,-  widgetMarginBottom,-  widgetVisible,-  widgetOpacity,-  widgetSensitive,-  widgetAppPaintable,-  widgetCanFocus,-  widgetHasFocus,-  widgetIsFocus,-  widgetCanDefault,-  widgetHasDefault,-  widgetReceivesDefault,-  widgetCompositeChild,-  widgetStyle,-  widgetState,-  widgetEvents,-#if GTK_MAJOR_VERSION < 3-  widgetExtensionEvents,-#endif-  widgetNoShowAll,-  widgetChildVisible,-#if GTK_MAJOR_VERSION < 3-  widgetColormap,-#endif-  widgetCompositeName,-  widgetDirection,-  widgetTooltipMarkup,-  widgetTooltipText,-  widgetHasTooltip,-#if GTK_CHECK_VERSION(2,20,0)-  widgetHasRcStyle,-  widgetGetRealized,-  widgetGetMapped,-#endif-#if GTK_MAJOR_VERSION >= 3-  widgetGetStyleContext,-#endif---- * Signals-  realize,-  unrealize,-  mapSignal,-  unmapSignal,-  sizeRequest,-  sizeAllocate,-  showSignal,-  hideSignal,-  focus,-  stateChanged,-  parentSet,-  hierarchyChanged,-  styleSet,-  directionChanged,-  grabNotify,-  popupMenuSignal,-  showHelp,-  accelClosuresChanged,-  screenChanged,-  queryTooltip,-#if GTK_CHECK_VERSION(3,0,0)-  draw,-#endif---- * Events-  buttonPressEvent,-  buttonReleaseEvent,-  configureEvent,-  deleteEvent,-  destroyEvent,-  enterNotifyEvent,-  exposeEvent,-  focusInEvent,-  focusOutEvent,-#if GTK_CHECK_VERSION(2,8,0)-  grabBrokenEvent,-#endif-  keyPressEvent,-  keyReleaseEvent,-  leaveNotifyEvent,-  mapEvent,-  motionNotifyEvent,-  noExposeEvent,-  proximityInEvent,-  proximityOutEvent,-  scrollEvent,-  unmapEvent,-  visibilityNotifyEvent,-  windowStateEvent,---- * Deprecated-#ifndef DISABLE_DEPRECATED-  onButtonPress,-  afterButtonPress,-  onButtonRelease,-  afterButtonRelease,-  onClient,-  afterClient,-  onConfigure,-  afterConfigure,-  onDelete,-  afterDelete,-  onDestroyEvent,		-- you probably want onDestroy-  afterDestroyEvent,-  onDirectionChanged,-  afterDirectionChanged,-  onEnterNotify,-  afterEnterNotify,-  onLeaveNotify,-  afterLeaveNotify,-  onExpose,-  afterExpose,-  onExposeRect,-  afterExposeRect,-  onFocus,-  afterFocus,-  onFocusIn,-  afterFocusIn,-  onFocusOut,-  afterFocusOut,-  onGrabFocus,-  afterGrabFocus,-  onDestroy,-  afterDestroy,-  onHide,-  afterHide,-  onHierarchyChanged,-  afterHierarchyChanged,-  onKeyPress,-  afterKeyPress,-  onKeyRelease,-  afterKeyRelease,-  onMnemonicActivate,-  afterMnemonicActivate,-  onMotionNotify,-  afterMotionNotify,-  onParentSet,-  afterParentSet,-  onPopupMenu,-  afterPopupMenu,-  onProximityIn,-  afterProximityIn,-  onProximityOut,-  afterProximityOut,-  onRealize,-  afterRealize,-  onScroll,-  afterScroll,-  onShow,-  afterShow,-  onSizeAllocate,-  afterSizeAllocate,-  onSizeRequest,-  afterSizeRequest,-  onStateChanged,-  afterStateChanged,-  onUnmap,-  afterUnmap,-  onUnrealize,-  afterUnrealize,-  onVisibilityNotify,-  afterVisibilityNotify,-  onWindowState,-  afterWindowState-#endif-  ) where--import Control.Monad	(liftM, unless)-import Data.Maybe	(fromMaybe)-import Control.Monad.Reader (ask)-import Control.Monad.Trans (liftIO)-import Data.Bits ((.&.), complement)-import System.Glib.FFI-import System.Glib.Flags		(fromFlags, toFlags)-import System.Glib.UTFString-import System.Glib.Attributes-import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)-import System.Glib.GType      (GType)-import System.Glib.GList      (GList, fromGList)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)-import Graphics.Rendering.Pango.Markup-import Graphics.UI.Gtk.General.DNDTypes (Atom (Atom), SelectionTag)-{#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.Gdk.Enums	(EventMask(..)-#if GTK_MAJOR_VERSION < 3-    , ExtensionMode(..)-#endif-    )-import Graphics.UI.Gtk.Gdk.Keys         (KeyVal)-#if GTK_MAJOR_VERSION < 3-{#import Graphics.UI.Gtk.Gdk.Region#}	(Region(..), makeNewRegion)-{#import Graphics.UI.Gtk.Gdk.Pixmap#} (Bitmap)-#endif-import Graphics.UI.Gtk.General.Structs	(Allocation, Rectangle(..)-					,Requisition(..), Color, IconSize(..)-                                        ,Point-#if !GTK_CHECK_VERSION(2,18,0)-                                        ,widgetGetState-#endif-#if GTK_MAJOR_VERSION < 3-                                        ,widgetGetSavedState-					,widgetGetDrawWindow, widgetGetSize-#endif-					)-import Graphics.UI.Gtk.Gdk.Events	(Event(..), marshalEvent,-  marshExposeRect,-  EventButton,-  EventScroll,-  EventMotion,-  EventExpose,-  EventKey,-  EventConfigure,-  EventCrossing,-  EventFocus,-  EventProperty,-  EventProximity,-  EventVisibility,-  EventWindowState,-  EventGrabBroken)-import Graphics.UI.Gtk.Gdk.EventM	(EventM,-  EventM,-  EAny,-  EKey,-  EButton,-  EScroll,-  EMotion,-  EExpose,-  EVisibility,-  ECrossing,-  EFocus,-  EConfigure,-  EProperty,-  EProximity,-  EWindowState,-#if GTK_CHECK_VERSION(2,6,0)-  EOwnerChange,-#endif-#if GTK_CHECK_VERSION(2,8,0)-  EGrabBroken,-#endif-  )-import Graphics.UI.Gtk.General.Enums	(StateType(..), TextDirection(..),-					 AccelFlags(..), DirectionType(..), Modifier)-{#import Graphics.Rendering.Pango.Types#} -{#import Graphics.Rendering.Pango.BasicTypes#}	(FontDescription(FontDescription),-					 PangoLayout(PangoLayout), makeNewPangoString )-import Graphics.UI.Gtk.General.StockItems (StockId)-import Data.IORef ( newIORef )-import Control.Monad.Reader ( runReaderT )-#if GTK_CHECK_VERSION(3,0,0)-import Graphics.Rendering.Cairo.Types (Cairo(..))-import Graphics.Rendering.Cairo.Internal (Render(..))-#endif--{# context lib="gtk" prefix="gtk" #}-------------------------- Methods---- | Flags a widget to be displayed. Any widget that isn't shown will not--- appear on the screen. If you want to show all the widgets in a container,--- it's easier to call 'widgetShowAll' on the container, instead of--- individually showing the widgets.------ Remember that you have to show the containers containing a widget, in--- addition to the widget itself, before it will appear onscreen.------ When a toplevel container is shown, it is immediately realized and--- mapped; other shown widgets are realized and mapped when their toplevel--- container is realized and mapped.----widgetShow :: WidgetClass self => self -> IO ()-widgetShow self =-  {# call widget_show #}-    (toWidget self)---- | Shows a widget. If the widget is an unmapped toplevel widget (i.e. a--- 'Window' that has not yet been shown), enter the main loop and wait for the--- window to actually be mapped. Be careful; because the main loop is running,--- anything can happen during this function.----widgetShowNow :: WidgetClass self => self -> IO ()-widgetShowNow self =-  {# call widget_show_now #}-    (toWidget self)---- | Reverses the effects of 'widgetShow', causing the widget to be hidden--- (invisible to the user).----widgetHide :: WidgetClass self => self -> IO ()-widgetHide self =-  {# call widget_hide #}-    (toWidget self)---- | Recursively shows a widget, and any child widgets (if the widget is a--- container).----widgetShowAll :: WidgetClass self => self -> IO ()-widgetShowAll self =-  {# call widget_show_all #}-    (toWidget self)--#if GTK_MAJOR_VERSION < 3--- | Recursively hides a widget and any child widgets.------ Removed in Gtk3.-widgetHideAll :: WidgetClass self => self -> IO ()-widgetHideAll self =-  {# call widget_hide_all #}-    (toWidget self)-#endif---- | Destroys a widget. Equivalent to---   'Graphics.UI.Gtk.Abstract.Object.objectDestroy'.------ When a widget is destroyed it will be removed from the screen and--- unrealized. When a widget is destroyed, it will break any references it--- holds to other objects.If the widget is inside a container, the widget will--- be removed from the container. The widget will be garbage collected--- (finalized) time after your last reference to the widget dissapears.------ In most cases, only toplevel widgets (windows) require explicit--- destruction, because when you destroy a toplevel its children will be--- destroyed as well.----widgetDestroy :: WidgetClass self => self -> IO ()-widgetDestroy self =-  {# call widget_destroy #}-    (toWidget self)---- * Functions to be used with 'Graphics.UI.Gtk.Misc.DrawingArea' or---   container implementations.---- | Send a redraw request to a widget. Equivalent to calling--- 'widgetQueueDrawArea' for the entire area of a widget.----widgetQueueDraw :: WidgetClass self => self -> IO ()-widgetQueueDraw self =-  {# call widget_queue_draw #}-    (toWidget self)---- | This function is only for use in widget implementations. Flags a widget--- to have its size renegotiated; should be called when a widget for some--- reason has a new size request. For example, when you change the text in a--- 'Graphics.UI.Gtk.Display.Label.Label',--- 'Graphics.UI.Gtk.Display.Label.Label' queues a resize to ensure there's--- enough space for the new text.----widgetQueueResize :: WidgetClass self => self -> IO ()-widgetQueueResize self =-  {# call widget_queue_resize #}-    (toWidget self)--#if GTK_CHECK_VERSION(2,4,0)--- | This function works like 'widgetQueueResize', except that the widget is--- not invalidated.------ * Available since Gtk+ version 2.4----widgetQueueResizeNoRedraw :: WidgetClass self => self -> IO ()-widgetQueueResizeNoRedraw self =-  {# call widget_queue_resize_no_redraw #}-    (toWidget self)-#endif---- | This function is typically used when implementing a--- 'Graphics.UI.Gtk.Abstract.Container.Container' subclass. Obtains the preferred size--- of a widget. The container uses this information to arrange its child--- widgets and decide what size allocations to give them with--- 'widgetSizeAllocate'.------ You can also call this function from an application, with some caveats.--- Most notably, getting a size request requires the widget to be associated--- with a screen, because font information may be needed. Multihead-aware--- applications should keep this in mind.------ Also remember that the size request is not necessarily the size a widget--- will actually be allocated.----widgetSizeRequest :: WidgetClass self => self -> IO Requisition-widgetSizeRequest self = alloca $ \reqPtr -> do-  {#call widget_size_request #} (toWidget self) (castPtr reqPtr)-  peek reqPtr---- | This function is only for use in widget implementations. Obtains the--- chached requisition information in the widget, unless someone has forced a--- particular geometry on the widget (e.g. with 'widgetSetUsize'), in which--- case it returns that geometry instead of the widget's requisition.------ This function differs from 'widgetSizeRequest' in that it retrieves the--- last size request value stored in the widget, while 'widgetSizeRequest'--- actually emits the 'sizeRequest' signal on the widget to compute the size--- request (which updates the widget's requisition information).------ Since this function does not emit the 'sizeRequest' signal, it can only be--- used when you know that the widget's requisition is up-to-date, that is,--- 'widgetSizeRequest' has been called since the last time a resize was--- queued. In general, only container implementations have this information;--- applications should use 'widgetSizeRequest'.----widgetGetChildRequisition :: WidgetClass self => self -> IO Requisition-widgetGetChildRequisition self = alloca $ \reqPtr -> do-  {#call widget_get_child_requisition #} (toWidget self) (castPtr reqPtr)-  peek reqPtr---- | This function is only used by--- 'Graphics.UI.Gtk.Abstract.Container.Container' subclasses, to assign a--- size and position to their child widgets.----widgetSizeAllocate :: WidgetClass self => self-  -> Allocation -- ^ The @x@ and @y@ values of the rectangle determine the-                --   the position of the widget's area relative to its parent-                --   allocation.-  -> IO ()-widgetSizeAllocate self rect = with rect $ \rectPtr ->-  {#call widget_size_allocate#} (toWidget self) (castPtr rectPtr)---- %hash c:1e14 d:53c5--- | Installs an accelerator for this @widget@ in @accelGroup@ that causes--- @accelSignal@ to be emitted if the accelerator is activated. The--- @accelGroup@ needs to be added to the widget's toplevel via--- 'windowAddAccelGroup', and the signal must be of type @G_RUN_ACTION@.--- Accelerators added through this function are not user changeable during--- runtime. If you want to support accelerators that can be changed by the--- user, use 'accelMapAddEntry' and 'widgetSetAccelPath' or--- 'menuItemSetAccelPath' instead.----widgetAddAccelerator :: WidgetClass self => self- -> String         -- ^ @accelSignal@ - widget signal to emit on accelerator-                   -- activation- -> AccelGroup     -- ^ @accelGroup@ - accel group for this widget, added to-                   -- its toplevel- -> KeyVal            -- ^ @accelKey@ - the key of the accelerator- -> [Modifier]     -- ^ @accelMods@ - modifier key combination of the-                   -- accelerator- -> [AccelFlags]   -- ^ @accelFlags@ - flag accelerators, e.g. 'AccelVisible'- -> IO ()-widgetAddAccelerator self accelSignal accelGroup accelKey accelMods accelFlags =-  withUTFString accelSignal $ \accelSignalPtr ->-  {# call gtk_widget_add_accelerator #}-    (toWidget self)-    accelSignalPtr-    accelGroup-    (fromIntegral accelKey)-    ((fromIntegral . fromFlags) accelMods)-    ((fromIntegral . fromFlags) accelFlags)---- %hash c:3442 d:dfe8--- | Removes an accelerator from @widget@, previously installed with--- 'widgetAddAccelerator'.----widgetRemoveAccelerator :: WidgetClass self => self- -> AccelGroup     -- ^ @accelGroup@ - accel group for this widget- -> KeyVal            -- ^ @accelKey@ - the key of the accelerator- -> [Modifier]     -- ^ @accelMods@ - modifier key combination of the-                   -- accelerator- -> IO Bool        -- ^ returns whether an accelerator was installed and could-                   -- be removed-widgetRemoveAccelerator self accelGroup accelKey accelMods =-  liftM toBool $-  {# call gtk_widget_remove_accelerator #}-    (toWidget self)-    accelGroup-    (fromIntegral accelKey)-    ((fromIntegral . fromFlags) accelMods)---- %hash c:f8d4 d:bd7f--- | Given an accelerator group, @accelGroup@, and an accelerator path,--- @accelPath@, sets up an accelerator in @accelGroup@ so whenever the key--- binding that is defined for @accelPath@ is pressed, @widget@ will be--- activated. This removes any accelerators (for any accelerator group)--- installed by previous calls to 'widgetSetAccelPath'. Associating--- accelerators with paths allows them to be modified by the user and the--- modifications to be saved for future use. (See 'accelMapSave'.)------ This function is a low level function that would most likely be used by a--- menu creation system like 'ItemFactory'. If you use 'ItemFactory', setting--- up accelerator paths will be done automatically.------ Even when you you aren't using 'ItemFactory', if you only want to set up--- accelerators on menu items 'menuItemSetAccelPath' provides a somewhat more--- convenient interface.----widgetSetAccelPath :: WidgetClass self => self- -> String     -- ^ @accelPath@ - path used to look up the accelerator- -> AccelGroup -- ^ @accelGroup@ - a 'AccelGroup'.- -> IO ()-widgetSetAccelPath self accelPath accelGroup =-  withUTFString accelPath $ \accelPathPtr ->-  {# call gtk_widget_set_accel_path #}-    (toWidget self)-    accelPathPtr-    accelGroup--#if GTK_CHECK_VERSION(2,4,0)--- %hash c:157e d:82ae--- | Determines whether an accelerator that activates the signal identified by--- @signalId@ can currently be activated. This is done by emitting the--- 'canActivateAccel' signal on the widget the signal is attached to; if the--- signal isn't overridden by a handler or in a derived widget, then the--- default check is that the widget must be sensitive, and the widget and all--- its ancestors mapped.------ * Available since Gtk+ version 2.4----widgetCanActivateAccel :: WidgetClass self =>- (ConnectId self) -- ^ @signalId@ - the ID of a signal installed on @widget@- -> IO Bool -- ^ returns @True@ if the accelerator can be activated.-widgetCanActivateAccel (ConnectId signalId self) =-  liftM toBool $-  {# call gtk_widget_can_activate_accel #}-    (toWidget self)-    (fromIntegral signalId)-#endif---- | For widgets that can be \"activated\" (buttons, menu items, etc.) this--- function activates them. Activation is what happens when you press Enter on--- a widget during key navigation. If @widget@ isn't activatable, the function--- returns @False@.----widgetActivate :: WidgetClass self => self- -> IO Bool -- ^ returns @True@ if the widget was activatable-widgetActivate self =-  liftM toBool $-  {# call widget_activate #}-    (toWidget self)---- | Computes the intersection of a widget's area and @area@, returning the--- intersection, and returns @Nothing@ if there was no intersection.----widgetIntersect :: WidgetClass self => self- -> Rectangle -- ^ @area@ - a rectangle- -> IO (Maybe Rectangle) -- ^ returns the intersection or @Nothing@-widgetIntersect self area =-  with area $ \areaPtr ->-  alloca $ \intersectionPtr -> do-  hasIntersection <- {# call unsafe widget_intersect #}-    (toWidget self)-    (castPtr areaPtr)-    (castPtr intersectionPtr)-  if (toBool hasIntersection)-    then liftM Just $ peek intersectionPtr-    else return Nothing---- | Check if the widget intersects with a given area.----widgetHasIntersection :: WidgetClass self => self- -> Rectangle -- ^ @area@ - a rectangle- -> IO Bool   -- ^ returns @True@ if there was an intersection-widgetHasIntersection self area = -  liftM toBool $-  with area $ \areaPtr ->-  {# call unsafe widget_intersect #}-    (toWidget self)-    (castPtr areaPtr)-    (castPtr nullPtr)---- %hash d:1cab--- | Determines if the widget is the focus widget within its toplevel. (This--- does not mean that the 'widgetHasFocus' attribute is necessarily set;--- 'widgetHasFocus' will only be set if the toplevel widget additionally has--- the global input focus.)----widgetGetIsFocus :: WidgetClass self => self- -> IO Bool -- ^ returns @True@ if the widget is the focus widget.-widgetGetIsFocus self =-  liftM toBool $-  {# call unsafe widget_is_focus #}-    (toWidget self)---- %hash d:e1e--- | Causes @widget@ to have the keyboard focus for the 'Window' it's inside.--- @widget@ must be a focusable widget, such as a--- 'Graphics.UI.Gtk.Entry.Entry'; something like--- 'Graphics.UI.Gtk.Ornaments.Frame' won't work. (More precisely, it must have--- the 'widgetCanFocus' flag set.)----widgetGrabFocus :: WidgetClass self => self -> IO ()-widgetGrabFocus self =-  {# call widget_grab_focus #}-    (toWidget self)---- %hash c:e5e9 d:412a--- | Causes @widget@ to become the default widget. @widget@ must have the--- 'canDefault' flag set. The default widget is--- activated when the user presses Enter in a window. Default widgets must be--- activatable, that is, 'widgetActivate' should affect them.----widgetGrabDefault :: WidgetClass self => self -> IO ()-widgetGrabDefault self =-  {# call gtk_widget_grab_default #}-    (toWidget self)---- %hash c:4f62 d:d05a--- | Widgets can be named, which allows you to refer to them from a gtkrc--- file. You can apply a style to widgets with a particular name in the gtkrc--- file. See the documentation for gtkrc files.------ Note that widget names are separated by periods in paths (see--- 'widgetPath'), so names with embedded periods may cause confusion.----widgetSetName :: WidgetClass self => self- -> String -- ^ @name@ - name for the widget- -> IO ()-widgetSetName self name =-  withUTFString name $ \namePtr ->-  {# call widget_set_name #}-    (toWidget self)-    namePtr---- | Retrieves the name of a widget. See 'widgetSetName' for the significance--- of widget names.----widgetGetName :: WidgetClass self => self -> IO String-widgetGetName self =-  {# call unsafe widget_get_name #}-    (toWidget self)-  >>= peekUTFString---- %hash c:25b1 d:f898--- | Sets the sensitivity of a widget. A widget is sensitive if the user can--- interact with it. Insensitive widgets are \"grayed out\" and the user can't--- interact with them. Insensitive widgets are known as \"inactive\",--- \"disabled\", or \"ghosted\" in some other toolkits.----widgetSetSensitive :: WidgetClass self => self- -> Bool -- ^ @sensitive@ - @True@ to make the widget sensitive- -> IO ()-widgetSetSensitive self sensitive =-  {# call gtk_widget_set_sensitive #}-    (toWidget self)-    (fromBool sensitive)-                                                        --- bad spelling backwards compatability definition-widgetSetSensitivity :: WidgetClass self => self -> Bool -> IO ()-widgetSetSensitivity = widgetSetSensitive---- | Gets the widget's parent window.----widgetGetParentWindow :: WidgetClass self => self -> IO DrawWindow-widgetGetParentWindow self =-  makeNewGObject mkDrawWindow $-  {# call gtk_widget_get_parent_window #}-    (toWidget self)---- | Disable event signals.------ * Remove events from the 'EventMask' of this widget. The event mask---   determines which events a widget will receive. Events are signals---   that return an 'Event' data type. On connecting to a such a signal,---   the event mask is automatically adjusted so that he signal is emitted.---   This function is useful to disable the reception of the signal. It---   should be called whenever all signals receiving an 'Event'---   have been disconnected.----widgetDelEvents :: WidgetClass self => self -> [EventMask] -> IO ()-widgetDelEvents self events = do-  mask <- {#call unsafe widget_get_events#} (toWidget self)-  let mask' = mask .&. (complement (fromIntegral $ fromFlags events))-  {#call unsafe widget_set_events#} (toWidget self) mask'---- | Enable event signals.------ * See 'widgetDelEvents'.----widgetAddEvents :: WidgetClass self => self -> [EventMask] -> IO ()-widgetAddEvents self [] = return ()- -- special [] case to work around a GTK+ bug, see:- -- http://bugzilla.gnome.org/show_bug.cgi?id=316702-widgetAddEvents self events =-  {# call unsafe widget_add_events #}-    (toWidget self)-    (fromIntegral $ fromFlags events)---- | Get enabled event signals.------ * See 'widgetDelEvents'.----widgetGetEvents :: WidgetClass self => self -> IO [EventMask]-widgetGetEvents self =-  liftM (toFlags . fromIntegral) $-  {# call unsafe widget_get_events #}-    (toWidget self)---- %hash c:468a d:49a0--- | Sets the event mask (see 'EventMask') for a widget. The event mask--- determines which events a widget will receive. Keep in mind that different--- widgets have different default event masks, and by changing the event mask--- you may disrupt a widget's functionality, so be careful. This function must--- be called while a widget is unrealized. Consider 'widgetAddEvents' for--- widgets that are already realized, or if you want to preserve the existing--- event mask. This function can't be used with 'NoWindow' widgets; to get--- events on those widgets, place them inside a--- 'Graphics.UI.Gtk.Misc.EventBox' and receive events on the event box.----widgetSetEvents :: WidgetClass self => self- -> [EventMask] -- ^ @events@ - event mask- -> IO ()-widgetSetEvents self events =-  {# call unsafe widget_set_events #}-    (toWidget self)-    (fromIntegral $ fromFlags events)--#if GTK_MAJOR_VERSION < 3--- %hash c:4f2c d:781--- | Sets the extension events mask to @mode@. See 'ExtensionMode' and--- 'inputSetExtensionEvents'.----widgetSetExtensionEvents :: WidgetClass self => self- -> [ExtensionMode]- -> IO ()-widgetSetExtensionEvents self mode =-  {# call widget_set_extension_events #}-    (toWidget self)-    ((fromIntegral . fromFlags) mode)---- %hash c:c824 d:e611--- | Retrieves the extension events the widget will receive; see--- 'widgetSetExtensionEvents'.----widgetGetExtensionEvents :: WidgetClass self => self- -> IO [ExtensionMode]-widgetGetExtensionEvents self =-  liftM (toFlags . fromIntegral) $-  {# call widget_get_extension_events #}-    (toWidget self)-#endif---- %hash c:270b d:8877--- | This function returns the topmost widget in the container hierarchy--- @widget@ is a part of. If @widget@ has no parent widgets, it will be--- returned as the topmost widget.----widgetGetToplevel :: WidgetClass self => -    self      -- ^ @widget@ - the widget in question- -> IO Widget -- ^ returns the topmost ancestor of @widget@, or @widget@-              -- itself if there's no ancestor.-widgetGetToplevel self =-  makeNewObject mkWidget $-  {# call unsafe widget_get_toplevel #}-    (toWidget self)---- %hash c:17bc d:f8f9--- | Gets the first ancestor of @widget@ with type @widgetType@. For example,--- @widgetGetAncestor widget gTypeBox@ gets the first 'Box' that's--- an ancestor of @widget@.  See note about checking for a toplevel--- 'Window' in the docs for 'widgetGetToplevel'.------ Note that unlike 'widgetIsAncestor', 'widgetGetAncestor' considers--- @widget@ to be an ancestor of itself.----widgetGetAncestor :: WidgetClass self => self- -> GType -- ^ @widgetType@ - ancestor type- -> IO (Maybe Widget) -- ^ returns the ancestor widget, or @Nothing@ if not found-widgetGetAncestor self widgetType = do-  ptr <- {# call gtk_widget_get_ancestor #}-    (toWidget self)-    widgetType-  if ptr==nullPtr then return Nothing else-    liftM Just $ makeNewObject mkWidget (return ptr)--#if GTK_MAJOR_VERSION < 3--- %hash c:bd95 d:eb94--- | Gets the colormap that will be used to render @widget@.----widgetGetColormap :: WidgetClass self => self- -> IO Colormap -- ^ returns the colormap used by @widget@-widgetGetColormap self =-  makeNewGObject mkColormap $-  {# call gtk_widget_get_colormap #}-    (toWidget self)---- %hash c:cba1 d:ffeb--- | Sets the colormap for the widget to the given value. Widget must not have--- been previously realized. This probably should only be used from an 'init'--- function (i.e. from the constructor for the widget).----widgetSetColormap :: WidgetClass self => self- -> Colormap -- ^ @colormap@ - a colormap- -> IO ()-widgetSetColormap self colormap =-  {# call gtk_widget_set_colormap #}-    (toWidget self)-    colormap-#endif---- %hash c:3522 d:5637--- | Obtains the location of the mouse pointer in widget coordinates. Widget--- coordinates are a bit odd; for historical reasons, they are defined as--- 'widgetGetParentWindow' coordinates for widgets that are not 'NoWindow' widgets,--- and are relative to the widget's allocation's (x,y) for--- widgets that are 'NoWindow' widgets.----widgetGetPointer :: WidgetClass self => self- -> IO (Int, Int) -- ^ @(x, y)@ - X Y coordinate-widgetGetPointer self =-  alloca $ \xPtr ->-  alloca $ \yPtr ->-  {# call gtk_widget_get_pointer #}-    (toWidget self)-    xPtr-    yPtr-  >>-  peek xPtr >>= \x ->-  peek yPtr >>= \y ->-  return (fromIntegral x, fromIntegral y)---- %hash c:499d--- | Determines whether @widget@ is somewhere inside @ancestor@, possibly with--- intermediate containers.----widgetIsAncestor :: (WidgetClass self, WidgetClass ancestor) =>-    self     -- ^ @widget@ - the widget in question- -> ancestor -- ^ @ancestor@ - another 'Widget'- -> IO Bool  -- ^ returns @True@ if @ancestor@ contains @widget@ as a child,-             -- grandchild, great grandchild, etc.-widgetIsAncestor self ancestor =-  liftM toBool $-  {# call unsafe widget_is_ancestor #}-    (toWidget self)-    (toWidget ancestor)---- %hash c:8661--- | Translate coordinates relative to @srcWidget@'s allocation to coordinates--- relative to @destWidget@'s allocations. In order to perform this operation,--- both widgets must be realized, and must share a common toplevel.----widgetTranslateCoordinates :: (WidgetClass self, WidgetClass destWidget) =>-    self                -- ^ @srcWidget@ - a 'Widget'- -> destWidget          -- ^ @destWidget@ - a 'Widget'- -> Int                 -- ^ @srcX@ - X position relative to @srcWidget@- -> Int                 -- ^ @srcY@ - Y position relative to @srcWidget@- -> IO (Maybe (Int, Int)) -- ^ @Just (destX, destY)@ - X and Y position-                        -- relative to @destWidget@. Returns @Nothing@ if-                        -- either widget was not realized, or there was no-                        -- common ancestor.-widgetTranslateCoordinates self destWidget srcX srcY =-  alloca $ \destXPtr ->-  alloca $ \destYPtr -> do-  worked <- {# call gtk_widget_translate_coordinates #}-    (toWidget self)-    (toWidget destWidget)-    (fromIntegral srcX)-    (fromIntegral srcY)-    destXPtr-    destYPtr-  if (toBool worked)-    then do destX <- peek destXPtr-            destY <- peek destYPtr-            return (Just (fromIntegral destX, fromIntegral destY))-    else return Nothing---- %hash c:596c d:b7e5--- | Sets the 'Style' for a widget. You probably don't want--- to use this function; it interacts badly with themes, because themes work by--- replacing the 'Style'. Instead, use 'widgetModifyStyle'.----widgetSetStyle :: WidgetClass self => self- -> Maybe Style -- ^ @style@ - a 'Style', or @Nothing@ to remove the effect of a previous-           -- 'widgetSetStyle' and go back to the default style- -> IO ()-widgetSetStyle self style =-  {# call gtk_widget_set_style #}-    (toWidget self)-    (fromMaybe (Style nullForeignPtr) style)---- | Retrieve the 'Style' associated with the widget.----widgetGetStyle :: WidgetClass widget => widget -> IO Style-widgetGetStyle widget = do-  {# call gtk_widget_ensure_style #} (toWidget widget)-  makeNewGObject mkStyle $ {# call gtk_widget_get_style #} (toWidget widget)--#if GTK_MAJOR_VERSION < 3--- %hash c:d5ed d:dc10--- | Pushes @cmap@ onto a global stack of colormaps; the topmost colormap on--- the stack will be used to create all widgets. Remove @cmap@ with--- 'widgetPopColormap'. There's little reason to use this function.----widgetPushColormap ::-    Colormap -- ^ @cmap@ - a 'Colormap'- -> IO ()-widgetPushColormap cmap =-  {# call gtk_widget_push_colormap #}-    cmap---- %hash c:7300 d:2920--- | Removes a colormap pushed with 'widgetPushColormap'.----widgetPopColormap :: IO ()-widgetPopColormap =-  {# call gtk_widget_pop_colormap #}---- %hash c:1f73 d:590e--- | Sets the default colormap to use when creating widgets.--- 'widgetPushColormap' is a better function to use if you only want to affect--- a few widgets, rather than all widgets.----widgetSetDefaultColormap ::-    Colormap -- ^ @colormap@ - a 'Colormap'- -> IO ()-widgetSetDefaultColormap colormap =-  {# call gtk_widget_set_default_colormap #}-    colormap-#endif---- %hash c:e71b d:72c2--- | Returns the default style used by all widgets initially.----widgetGetDefaultStyle ::-    IO Style -- ^ returns the default style. This 'Style' object is owned by-             -- Gtk and should not be modified.-widgetGetDefaultStyle =-  makeNewGObject mkStyle $-  {# call gtk_widget_get_default_style #}--#if GTK_MAJOR_VERSION < 3--- %hash c:d731 d:52bf--- | Obtains the default colormap used to create widgets.----widgetGetDefaultColormap ::-    IO Colormap -- ^ returns default widget colormap-widgetGetDefaultColormap =-  makeNewGObject mkColormap $-  {# call gtk_widget_get_default_colormap #}-#endif---- | Sets the reading direction on a particular widget. This direction--- controls the primary direction for widgets containing text, and also the--- direction in which the children of a container are packed. The ability to--- set the direction is present in order so that correct localization into--- languages with right-to-left reading directions can be done. Generally,--- applications will let the default reading direction present, except for--- containers where the containers are arranged in an order that is explicitely--- visual rather than logical (such as buttons for text justification).------ If the direction is set to 'TextDirNone', then the value set by--- 'widgetSetDefaultDirection' will be used.----widgetSetDirection :: WidgetClass self => self -> TextDirection -> IO ()-widgetSetDirection self dir =-  {# call widget_set_direction #}-    (toWidget self)-    ((fromIntegral . fromEnum) dir)---- | Gets the reading direction for a particular widget. See--- 'widgetSetDirection'.----widgetGetDirection :: WidgetClass self => self -> IO TextDirection-widgetGetDirection self =-  liftM (toEnum . fromIntegral) $-  {# call widget_get_direction #}-    (toWidget self)---- %hash c:ff9a--- | Sets the default reading direction for widgets where the direction has--- not been explicitly set by 'widgetSetDirection'.----widgetSetDefaultDirection :: -    TextDirection -- ^ @dir@ - the new default direction. This cannot be-                  -- 'TextDirNone'.- -> IO ()-widgetSetDefaultDirection dir =-  {# call gtk_widget_set_default_direction #}-    ((fromIntegral . fromEnum) dir)---- | Obtains the current default reading direction. See--- 'widgetSetDefaultDirection'.----widgetGetDefaultDirection :: IO TextDirection-widgetGetDefaultDirection =-  liftM (toEnum . fromIntegral) $-  {# call gtk_widget_get_default_direction #}--#if GTK_MAJOR_VERSION < 3--- %hash c:c7ba d:3a9c--- | Sets a shape for this widget's 'DrawWindow'. This allows for transparent--- windows etc., see 'windowShapeCombineMask' for more information.----widgetShapeCombineMask :: WidgetClass self => self- -> Maybe Bitmap -- ^ @shapeMask@ - shape to be added, or @Nothint@ to remove an-            -- existing shape.- -> Int    -- ^ @offsetX@ - X position of shape mask with respect to @window@.- -> Int    -- ^ @offsetY@ - Y position of shape mask with respect to @window@.- -> IO ()-widgetShapeCombineMask self shapeMask offsetX offsetY =-  case (fromMaybe (Pixmap nullForeignPtr) shapeMask) of-    Pixmap fPtr -> withForeignPtr fPtr $ \bitmapPtr ->-      {# call gtk_widget_shape_combine_mask #}-        (toWidget self)-        (castPtr bitmapPtr)-        (fromIntegral offsetX)-        (fromIntegral offsetY)-#endif--#if GTK_MAJOR_VERSION < 3-#if GTK_CHECK_VERSION(2,10,0)--- %hash c:3c29 d:68e2--- | Sets an input shape for this widget's GDK window. This allows for windows--- which react to mouse click in a nonrectangular region, see--- 'windowInputShapeCombineMask' for more information.------ * Available since Gtk+ version 2.10----widgetInputShapeCombineMask :: WidgetClass self => self- -> Maybe Bitmap -- ^ @shapeMask@ - shape to be added, or @Nothint@ to remove an-            -- existing shape.- -> Int    -- ^ @offsetX@ - X position of shape mask with respect to @window@.- -> Int    -- ^ @offsetY@ - Y position of shape mask with respect to @window@.- -> IO ()-widgetInputShapeCombineMask self shapeMask offsetX offsetY =-  case (fromMaybe (Pixmap nullForeignPtr) shapeMask) of-    Pixmap fPtr -> withForeignPtr fPtr $ \bitmapPtr ->-      {# call gtk_widget_input_shape_combine_mask #}-        (toWidget self)-        (castPtr bitmapPtr)-        (fromIntegral offsetX)-        (fromIntegral offsetY)-#endif-#endif--#if GTK_CHECK_VERSION(2,12,0)--- | Returns the 'Window' of the current tooltip. This can be the 'Window' created by default, or the--- custom tooltip window set using 'widgetSetTooltipWindow'.--- --- * Available since Gtk+ version 2.12----widgetGetTooltipWindow :: WidgetClass self => self- -> IO Window -- ^ returns The 'Window' of the current tooltip-widgetGetTooltipWindow self =-  makeNewObject mkWindow $-  {# call gtk_widget_get_tooltip_window #}-    (toWidget self)---- | Replaces the default, usually yellow, window used for displaying tooltips with @customWindow@. GTK+--- will take care of showing and hiding @customWindow@ at the right moment, to behave likewise as the--- default tooltip window. If @customWindow@ is 'Nothing', the default tooltip window will be used.--- --- If the custom window should have the default theming it needs to have the name 'gtk-tooltip', see--- 'widgetSetName'.------ * Available since Gtk+ version 2.12--- -widgetSetTooltipWindow :: (WidgetClass self, WindowClass customWindow) => self- -> Maybe customWindow -- ^ @customWindow@ a 'Window', or 'Nothing'. allow-none. - -> IO ()-widgetSetTooltipWindow self customWindow =-  {# call gtk_widget_set_tooltip_window #}-    (toWidget self)-    (maybe (Window nullForeignPtr) toWindow customWindow)---- | Triggers a tooltip query on the display where the toplevel of @widget@ is--- located. See 'tooltipTriggerTooltipQuery' for more information.------ * Available since Gtk+ version 2.12----widgetTriggerTooltipQuery :: WidgetClass self => self -> IO ()-widgetTriggerTooltipQuery self =-  {# call gtk_widget_trigger_tooltip_query #}-    (toWidget self)-#endif--#if GTK_CHECK_VERSION(2,14,0)--- | Returns the widget's window if it is realized, Nothing otherwise------ * Available since Gtk+ version 2.14----widgetGetWindow :: WidgetClass self => self -> IO (Maybe DrawWindow)-widgetGetWindow self =-  maybeNull (makeNewGObject mkDrawWindow) $-  {# call gtk_widget_get_window #}-    (toWidget self)-#endif--#if GTK_MAJOR_VERSION < 3-#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 (wrapNewGObject mkPixmap) $-  with clipRect $ \ clipRectPtr -> -  {#call gtk_widget_get_snapshot #}-     (toWidget widget)-     (castPtr clipRectPtr)-#endif-#endif---- %hash c:7e36 d:616f--- | Obtains the full path to @widget@. The path is simply the name of a--- widget and all its parents in the container hierarchy, separated by periods.--- The name of a widget comes from 'widgetGetName'. Paths are used to apply--- styles to a widget in gtkrc configuration files. Widget names are the type--- of the widget by default (e.g. \"GtkButton\") or can be set to an--- application-specific value with 'widgetSetName'. By setting the name of a--- widget, you allow users or theme authors to apply styles to that specific--- widget in their gtkrc file. Also returns the path in reverse--- order, i.e. starting with the widget's name instead of starting with the--- name of the widget's outermost ancestor.----widgetPath :: WidgetClass self => self- -> IO (Int, String, String) -- ^ @(pathLength, path, pathReversed)@ - length-                             -- of the path, path string and reverse path-                             -- string-widgetPath self =-  alloca $ \pathLengthPtr ->-  alloca $ \pathPtr ->-  alloca $ \pathReversedPtr ->-  {# call gtk_widget_path #}-    (toWidget self)-    pathLengthPtr-    pathPtr-    pathReversedPtr-  >>-  peek pathLengthPtr >>= \pathLength ->-  peek pathPtr >>= readUTFString >>= \path ->-  peek pathReversedPtr >>= readUTFString >>= \pathReversed ->-  return (fromIntegral pathLength, path, pathReversed)---- %hash c:d4a6--- | Same as 'widgetPath', but always uses the name of a widget's type, never--- uses a custom name set with 'widgetSetName'.----widgetClassPath :: WidgetClass self => self- -> IO (Int, String, String) -- ^ @(pathLength, path, pathReversed)@ - length-                             -- of the path, path string and reverse path-                             -- string-widgetClassPath self =-  alloca $ \pathLengthPtr ->-  alloca $ \pathPtr ->-  alloca $ \pathReversedPtr ->-  {# call gtk_widget_class_path #}-    (toWidget self)-    pathLengthPtr-    pathPtr-    pathReversedPtr-  >>-  peek pathLengthPtr >>= \pathLength ->-  peek pathPtr >>= readUTFString >>= \path ->-  peek pathReversedPtr >>= readUTFString >>= \pathReversed ->-  return (fromIntegral pathLength, path, pathReversed)---- %hash c:769e--- | Obtains the composite name of a widget.----widgetGetCompositeName :: WidgetClass self => self- -> IO (Maybe String) -- ^ returns the composite name of @widget@, or-                      -- @Nothing@ if @widget@ is not a composite child.-widgetGetCompositeName self =-  {# call gtk_widget_get_composite_name #}-    (toWidget self)-  >>= maybePeek peekUTFString---- | Modifies style values on the widget. Modifications made using this--- technique take precedence over style values set via an RC file, however,--- they will be overriden if a style is explicitely set on the widget using--- 'widgetSetStyle'. The 'RcStyle' structure is designed so each field can--- either be set or unset, so it is possible, using this function, to modify--- some style values and leave the others unchanged.------ Note that modifications made with this function are not cumulative with--- previous calls to 'widgetModifyStyle' or with such functions as--- 'widgetModifyFg'. If you wish to retain previous values, you must first call--- 'widgetGetModifierStyle', make your modifications to the returned style,--- then call 'widgetModifyStyle' with that style. On the other hand, if you--- first call 'widgetModifyStyle', subsequent calls to such functions--- 'widgetModifyFg' will have a cumulative effect with the initial--- modifications.----widgetModifyStyle :: (WidgetClass self, RcStyleClass style) => self- -> style -- ^ @style@ - the 'RcStyle' holding the style modifications- -> IO ()-widgetModifyStyle self style =-  {# call gtk_widget_modify_style #}-    (toWidget self)-    (toRcStyle style)---- | Returns the current modifier style for the widget. (As set by--- 'widgetModifyStyle'.) If no style has previously set, a new 'RcStyle' will--- be created with all values unset, and set as the modifier style for the--- widget. If you make changes to this rc style, you must call--- 'widgetModifyStyle', passing in the returned rc style, to make sure that--- your changes take effect.------ Caution: passing the style back to 'widgetModifyStyle' will normally end--- up destroying it, because 'widgetModifyStyle' copies the passed-in style and--- sets the copy as the new modifier style, thus dropping any reference to the--- old modifier style. Add a reference to the modifier style if you want to--- keep it alive.----widgetGetModifierStyle :: WidgetClass self => self -> IO RcStyle-widgetGetModifierStyle self =-  makeNewGObject mkRcStyle $-  {# call gtk_widget_get_modifier_style #}-    (toWidget self)---- %hash c:5550--- | Sets the foreground color for a widget in a particular state. All other--- style values are left untouched. See also 'widgetModifyStyle'.----widgetModifyFg :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to set the foreground color.- -> Color     -- ^ @color@ - the color to assign (does not need to be-              -- allocated)- -> IO ()-widgetModifyFg self state color =-  with color $ \colorPtr ->-  {# call gtk_widget_modify_fg #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    (castPtr colorPtr)---- | Restores the foreground color for a widget in a particular state. This--- undoes the effects of previous calls to `widgetModifyFg'.----widgetRestoreFg :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to restore the foreground color.- -> IO ()-widgetRestoreFg self state =-  {# call gtk_widget_modify_fg #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    nullPtr---- %hash c:2c5--- | Sets the background color for a widget in a particular state. All other--- style values are left untouched. See also 'widgetModifyStyle'.------ Note that \"no window\" widgets (which have the 'NoWindow' flag set) draw--- on their parent container's window and thus may not draw any background--- themselves. This is the case for e.g. 'Label'. To modify the background of--- such widgets, you have to set the background color on their parent; if you--- want to set the background of a rectangular area around a label, try placing--- the label in a 'EventBox' widget and setting the background color on that.----widgetModifyBg :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to set the background color.- -> Color     -- ^ @color@ - the color to assign (does not need to be-              -- allocated).- -> IO ()-widgetModifyBg self state color =-  with color $ \colorPtr ->-  {# call gtk_widget_modify_bg #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    (castPtr colorPtr)---- | Restores the background color for a widget in a particular state. This--- undoes the effects of previous calls to `widgetModifyBg'.----widgetRestoreBg :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to restore the background color.- -> IO ()-widgetRestoreBg self state =-  {# call gtk_widget_modify_bg #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    nullPtr---- %hash c:d2ba--- | Sets the text color for a widget in a particular state. All other style--- values are left untouched. The text color is the foreground color used along--- with the base color (see 'widgetModifyBase') for widgets such as 'Entry' and--- 'TextView'. See also 'widgetModifyStyle'.----widgetModifyText :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to set the text color.- -> Color     -- ^ @color@ - the color to assign (does not need to be-              -- allocated).- -> IO ()-widgetModifyText self state color =-  with color $ \colorPtr ->-  {# call gtk_widget_modify_text #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    (castPtr colorPtr)---- | Restores the text color for a widget in a particular state. This--- undoes the effects of previous calls to `widgetModifyText'.----widgetRestoreText :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to restore the text color.- -> IO ()-widgetRestoreText self state =-  {# call gtk_widget_modify_text #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    nullPtr---- %hash c:ac08--- | Sets the base color for a widget in a particular state. All other style--- values are left untouched. The base color is the background color used along--- with the text color (see 'widgetModifyText') for widgets such as 'Entry' and--- 'TextView'. See also 'widgetModifyStyle'.------ Note that \"no window\" widgets (which have the 'NoWindow' flag set) draw--- on their parent container's window and thus may not draw any background--- themselves. This is the case for e.g. 'Label'. To modify the background of--- such widgets, you have to set the base color on their parent; if you want to--- set the background of a rectangular area around a label, try placing the--- label in a 'EventBox' widget and setting the base color on that.----widgetModifyBase :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to set the base color.- -> Color     -- ^ @color@ - the color to assign (does not need to be-              -- allocated).- -> IO ()-widgetModifyBase self state color =-  with color $ \colorPtr ->-  {# call gtk_widget_modify_base #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    (castPtr colorPtr)---- | Restores the base color for a widget in a particular state. This undoes--- the effects of previous calls to widgetModifyBase.----widgetRestoreBase :: WidgetClass self => self- -> StateType -- ^ @state@ - the state for which to restore the base color.- -> IO ()-widgetRestoreBase self state =-  {# call gtk_widget_modify_base #}-    (toWidget self)-    ((fromIntegral . fromEnum) state)-    nullPtr----- %hash c:38d7--- | Sets the font to use for a widget. All other style values are left--- untouched. See also 'widgetModifyStyle'.----widgetModifyFont :: WidgetClass self => self- -> Maybe FontDescription -- ^ @fontDesc@ - the font description to use, or-                          -- @Nothing@ to undo the effect of previous calls to-                          -- 'widgetModifyFont'.- -> IO ()-widgetModifyFont self fontDesc =-  {# call gtk_widget_modify_font #}-    (toWidget self)-    (fromMaybe (FontDescription nullForeignPtr) fontDesc)---- | Creates a new 'PangoContext' with the appropriate colormap, font description,--- and base direction for drawing text for this widget. See also--- 'widgetGetPangoContext'.----widgetCreatePangoContext :: WidgetClass self => self- -> IO PangoContext -- ^ returns the new 'PangoContext'-widgetCreatePangoContext self =-  wrapNewGObject mkPangoContext $-  {# call gtk_widget_create_pango_context #}-    (toWidget self)---- | Gets a 'PangoContext' with the appropriate font description and base--- direction for this widget. Unlike the context returned by--- 'widgetCreatePangoContext', this context is owned by the widget (it can be--- used until the screen for the widget changes or the widget is removed from--- its toplevel), and will be updated to match any changes to the widget's--- attributes.------ If you create and keep a 'PangoLayout' using this context, you must deal--- with changes to the context by calling--- 'layoutContextChanged' on the layout--- in response to the 'onStyleChanged' and 'onDirectionChanged' signals for the--- widget.----widgetGetPangoContext :: WidgetClass self => self- -> IO PangoContext -- ^ returns the 'PangoContext' for the widget.-widgetGetPangoContext self =-  makeNewGObject mkPangoContext $-  {# call gtk_widget_get_pango_context #}-    (toWidget self)---- | Prepare text for display.------ The 'PangoLayout' represents the rendered text. It can be shown on screen--- by calling 'drawLayout'.------ The returned 'PangoLayout' shares the same font information ('PangoContext') as this--- widget. If this information changes, the 'PangoLayout' should change. The--- following code ensures that the displayed text always reflects the widget's--- settings:------ > l <- widgetCreateLayout w "My Text."--- > let update = do--- >                layoutContextChanged l--- > 		    -- update the Drawables which show this layout--- > w `onDirectionChanged` update--- > w `onStyleChanged` update----widgetCreateLayout :: WidgetClass self => self- -> String    -- ^ @text@ - text to set on the layout- -> IO PangoLayout-widgetCreateLayout self text = do-  pl <- wrapNewGObject mkPangoLayoutRaw $-    withUTFString text $ \textPtr ->-    {# call unsafe widget_create_pango_layout #}-      (toWidget self)-      textPtr-  ps <- makeNewPangoString text-  psRef <- newIORef ps-  return (PangoLayout psRef pl)---- %hash c:cee d:1d29--- | A convenience function that uses the theme engine and RC file settings--- for @widget@ to look up the stock icon and render it to a--- 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf'.--- The icon should be one of the stock id constants such as--- 'Graphics.UI.Gtk.General.StockItems.stockOpen'. @size@ should be a--- size such as 'Graphics.UI.Gtk.General.IconFactory.IconSizeMenu'.--- @detail@ should be a string that identifies the--- widget or code doing the rendering, so that theme engines can special-case--- rendering for that widget or code.------ The pixels in the returned 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf' are--- shared with the rest of the--- application and should not be modified.----widgetRenderIcon :: WidgetClass self => self- -> String            -- ^ @stockId@ - a stock ID- -> IconSize          -- ^ @size@ - a stock size- -> String            -- ^ @detail@ - render detail to pass to theme engine- -> IO (Maybe Pixbuf) -- ^ returns a new pixbuf, or @Nothing@ if the stock ID-                      -- wasn't known-widgetRenderIcon self stockId size detail =-  maybeNull (wrapNewGObject mkPixbuf) $-  withUTFString detail $ \detailPtr ->-  withUTFString stockId $ \stockIdPtr ->-  {# call gtk_widget_render_icon #}-    (toWidget self)-    stockIdPtr-    ((fromIntegral . fromEnum) size)-    detailPtr---- %hash c:62f d:1863--- | Invalidates the rectangular area of @widget@ defined by @x@, @y@, @width@--- and @height@ by calling--- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowInvalidateRect' on the widget's--- 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawWindow' and all its child windows. Once--- the main loop becomes idle (after the current batch of events has been--- processed, roughly), the window will receive expose events for the union of--- all regions that have been invalidated.------ Normally you would only use this function in widget implementations. In--- particular, you might use it, or--- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowInvalidateRect' directly, to--- schedule a redraw of a 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawingArea' or some--- portion thereof.------ Frequently you can just call--- 'Graphics.UI.Gtk.Gdk.DrawWindow.windowInvalidateRect' or--- 'Graphics.UI.Gtk.Gdk.DrawWindow.windowInvalidateRegion' instead of this--- function. Those functions will invalidate only a single window, instead of--- the widget and all its children.------ The advantage of adding to the invalidated region compared to simply--- drawing immediately is efficiency; using an invalid region ensures that you--- only have to redraw one time.----widgetQueueDrawArea :: WidgetClass self => self- -> Int   -- ^ @x@ - x coordinate of upper-left corner of rectangle to redraw- -> Int   -- ^ @y@ - y coordinate of upper-left corner of rectangle to redraw- -> Int   -- ^ @width@ - width of region to draw- -> Int   -- ^ @height@ - height of region to draw- -> IO ()-widgetQueueDrawArea self x y width height =-  {# call gtk_widget_queue_draw_area #}-    (toWidget self)-    (fromIntegral x)-    (fromIntegral y)-    (fromIntegral width)-    (fromIntegral height)--#if GTK_MAJOR_VERSION < 3--- %hash c:5ffb d:3e1a--- | Recursively resets the shape on this widget and its descendants.----widgetResetShapes :: WidgetClass self => self -> IO ()-widgetResetShapes self =-  {# call gtk_widget_reset_shapes #}-    (toWidget self)-#endif---- | Sets whether the application intends to draw on the widget in response---   to an 'onExpose' signal.------ * This is a hint to the widget and does not affect the behavior of the---   GTK+ core; many widgets ignore this flag entirely. For widgets that do---   pay attention to the flag, such as 'EventBox' and 'Window', the effect---   is to suppress default themed drawing of the widget's background.---   (Children of the widget will still be drawn.) The application is then---   entirely responsible for drawing the widget background.----widgetSetAppPaintable :: WidgetClass self => self- -> Bool  -- ^ @appPaintable@ - @True@ if the application will paint on the-          -- widget- -> IO ()-widgetSetAppPaintable self appPaintable =-  {# call widget_set_app_paintable #}-    (toWidget self)-    (fromBool appPaintable)---- %hash c:89b2 d:e14d--- | Widgets are double buffered by default; you can use this function to turn--- off the buffering. \"Double buffered\" simply means that--- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowBeginPaintRegion' and--- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowEndPaint' are called automatically--- around expose events sent to the widget.--- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowBeginPaintRegion' diverts all--- drawing to a widget's window to an offscreen buffer, and--- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowEndPaint'--- draws the buffer to the screen. The result is that users see the window--- update in one smooth step, and don't see individual graphics primitives--- being rendered.------ In very simple terms, double buffered widgets don't flicker, so you would--- only use this function to turn off double buffering if you had special needs--- and really knew what you were doing.------ Note: if you turn off double-buffering, you have to handle expose events,--- since even the clearing to the background color or pixmap will not happen--- automatically (as it is done in--- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowBeginPaint').----widgetSetDoubleBuffered :: WidgetClass self => self- -> Bool  -- ^ @doubleBuffered@ - @True@ to double-buffer a widget- -> IO ()-widgetSetDoubleBuffered self doubleBuffered =-  {# call gtk_widget_set_double_buffered #}-    (toWidget self)-    (fromBool doubleBuffered)---- %hash c:d61 d:ac24--- | Sets whether the entire widget is queued for drawing when its size--- allocation changes. By default, this setting is @True@ and the entire widget--- is redrawn on every size change. If your widget leaves the upper left--- unchanged when made bigger, turning this setting on will improve--- performance.------ Note that for \"no window\" widgets setting this flag to @False@ turns off--- all allocation on resizing: the widget will not even redraw if its position--- changes; this is to allow containers that don't draw anything to avoid--- excess invalidations. If you set this flag on a \"no window\" widget that--- /does/ draw its window, you are responsible for invalidating both--- the old and new allocation of the widget when the widget is moved and--- responsible for invalidating regions newly when the widget increases size.----widgetSetRedrawOnAllocate :: WidgetClass self => self- -> Bool  -- ^ @redrawOnAllocate@ - if @True@, the entire widget will be-          -- redrawn when it is allocated to a new size. Otherwise, only the-          -- new portion of the widget will be redrawn.- -> IO ()-widgetSetRedrawOnAllocate self redrawOnAllocate =-  {# call gtk_widget_set_redraw_on_allocate #}-    (toWidget self)-    (fromBool redrawOnAllocate)---- | Sets a widgets composite name. A child widget of a container is---   composite if it serves as an internal widget and, thus, is not---   added by the user.----widgetSetCompositeName :: WidgetClass self => self- -> String -- ^ @name@ - the name to set.- -> IO ()-widgetSetCompositeName self name =-  withUTFString name $ \namePtr ->-  {# call gtk_widget_set_composite_name #}-    (toWidget self)-    namePtr--#if GTK_MAJOR_VERSION < 3--- %hash c:5c58 d:6895--- | For widgets that support scrolling, sets the scroll adjustments and--- returns @True@. For widgets that don't support scrolling, does nothing and--- returns @False@. Widgets that don't support scrolling can be scrolled by--- placing them in a 'Viewport', which does support scrolling.------ Removed in Gtk3. -widgetSetScrollAdjustments :: WidgetClass self => self- -> Maybe Adjustment -- ^ @hadjustment@ - an adjustment for horizontal scrolling, or-               -- @Nothing@- -> Maybe Adjustment -- ^ @vadjustment@ - an adjustment for vertical scrolling, or-               -- @Nothing@- -> IO Bool    -- ^ returns @True@ if the widget supports scrolling-widgetSetScrollAdjustments self hadjustment vadjustment =-  liftM toBool $-  {# call gtk_widget_set_scroll_adjustments #}-    (toWidget self)-    (fromMaybe (Adjustment nullForeignPtr) hadjustment)-    (fromMaybe (Adjustment nullForeignPtr) vadjustment)-#endif---#if GTK_MAJOR_VERSION < 3--- | Computes the intersection of a widget's area and @region@, returning--- the intersection. The result may be empty, use--- 'Graphics.UI.Gtk.Gdk.Region.regionEmpty' to check.----widgetRegionIntersect :: WidgetClass self => self- -> Region    -- ^ @region@ - a 'Region' in the same coordinate system as the-              -- widget's allocation. That is, relative to the widget's-              -- 'DrawWindow' for 'NoWindow' widgets; relative to the parent-              -- 'DrawWindow' of the widget's 'DrawWindow' for widgets with-              -- their own 'DrawWindow'.- -> IO Region -- ^ returns A region holding the intersection of the widget and-              --  @region@. The coordinates of the return value are relative to-              -- the widget's 'DrawWindow', if it has one, otherwise-              -- it is relative to the parent's 'DrawWindow'.-widgetRegionIntersect self region = do-  intersectionPtr <- {# call gtk_widget_region_intersect #}-    (toWidget self)-    region-  makeNewRegion intersectionPtr-#endif---- %hash c:3c94 d:cdb6--- | Returns the accessible object that describes the widget to an assistive--- technology.------ If no accessibility library is loaded (i.e. no ATK implementation library--- is loaded via GTK_MODULES or via another application library, such as--- libgnome), then this 'Object' instance may be a no-op. Likewise, if no--- class-specific 'Object' implementation is available for the widget instance--- in question, it will inherit an 'Object' implementation from the first--- ancestor class for which such an implementation is defined.------ The documentation of the ATK library contains more information about--- accessible objects and their uses.------ Returns a GObject in Gtk3.-widgetGetAccessible :: WidgetClass self => self-#if GTK_MAJOR_VERSION < 3- -> IO Object -- ^ returns the 'Object' associated with @widget@-#else- -> IO GObject -- ^ returns the 'GObject' associated with @widget@-#endif-widgetGetAccessible self =-#if GTK_MAJOR_VERSION < 3-  makeNewGObject mkObject $-#else-  makeNewGObject mkGObject $-#endif-  liftM castPtr $-  {# call gtk_widget_get_accessible #}-    (toWidget self)---- %hash c:713d d:c4fc--- | This function is used by custom widget implementations; if you\'re--- writing an app, you\'d use 'widgetGrabFocus' to move the focus to a--- particular widget, and 'containerSetFocusChain' to change the focus tab--- order. So you may want to investigate those functions instead.------ The \"focus\" default handler for a widget should return @True@ if moving--- in @direction@ left the focus on a focusable location inside that widget,--- and @False@ if moving in @direction@ moved the focus outside the widget. If--- returning @True@, widgets normally call 'widgetGrabFocus' to place the focus--- accordingly; if returning @False@, they don't modify the current focus--- location.----widgetChildFocus :: WidgetClass self => self- -> DirectionType -- ^ @direction@ - direction of focus movement- -> IO Bool       -- ^ returns @True@ if focus ended up inside @widget@-widgetChildFocus self direction =-  liftM toBool $-  {# call gtk_widget_child_focus #}-    (toWidget self)-    ((fromIntegral . fromEnum) direction)---- %hash c:de20 d:5300--- | Gets the value set with 'widgetSetChildVisible'. If you feel a need to--- use this function, your code probably needs reorganization.------ This function is only useful for container implementations and never--- should be called by an application.----widgetGetChildVisible :: WidgetClass self => self- -> IO Bool -- ^ returns @True@ if the widget is mapped with the parent.-widgetGetChildVisible self =-  liftM toBool $-  {# call gtk_widget_get_child_visible #}-    (toWidget self)---- %hash c:9320 d:367--- | Returns the parent container of @widget@.------ * Returns the parent container of @widget@ if it has one.----widgetGetParent :: WidgetClass self => self- -> IO (Maybe Widget) -widgetGetParent self = do-  parentPtr <- {# call gtk_widget_get_parent #} (toWidget self)-  if parentPtr==nullPtr then return Nothing else-    liftM Just $ makeNewObject mkWidget (return parentPtr)---- %hash c:85e3 d:a962--- | Gets the settings object holding the settings (global property settings,--- RC file information, etc) used for this widget.------ Note that this function can only be called when the 'Widget' is attached--- to a toplevel, since the settings object is specific to a particular--- 'Screen'.----widgetGetSettings :: WidgetClass self => self- -> IO Settings -- ^ returns the relevant 'Settings' object-widgetGetSettings self =-  makeNewGObject mkSettings $-  {# call gtk_widget_get_settings #}-    (toWidget self)--#if GTK_CHECK_VERSION(2,2,0)---- | Returns the clipboard object for the given selection to--- be used with widget. widget must have a 'Display'--- associated with it, so must be attached to a toplevel--- window.-widgetGetClipboard :: WidgetClass self => self-                   -> SelectionTag  -- ^ @selection@ a 'Atom' which identifies the clipboard-                                       -- to use. 'selectionClipboard' gives the-                                       -- default clipboard. Another common value-                                       -- is 'selectionPrimary', which gives-                                       -- the primary X selection. -                   -> IO Clipboard -- ^ returns the appropriate clipboard object. If no-                                   -- clipboard already exists, a new one will-                                   -- be created. -widgetGetClipboard self (Atom tagPtr) = -  makeNewGObject mkClipboard $-  {#call gtk_widget_get_clipboard #} -    (toWidget self)-    tagPtr---- %hash c:45ed d:52ef--- | Get the 'Display' for the toplevel window associated with this widget.--- This function can only be called after the widget has been added to a widget--- hierarchy with a 'Window' at the top.------ In general, you should only create display specific resources when a--- widget has been realized, and you should free those resources when the--- widget is unrealized.------ * Available since Gtk+ version 2.2----widgetGetDisplay :: WidgetClass self => self- -> IO Display -- ^ returns the 'Display' for the toplevel for this widget.-widgetGetDisplay self =-  makeNewGObject mkDisplay $-  {# call gtk_widget_get_display #}-    (toWidget self)---- %hash c:8e4e d:252b--- | Get the root window where this widget is located. This function can only--- be called after the widget has been added to a widget heirarchy with--- 'Window' at the top.------ The root window is useful for such purposes as creating a popup--- 'DrawWindow' associated with the window. In general, you should only create--- display specific resources when a widget has been realized, and you should--- free those resources when the widget is unrealized.------ * Available since Gtk+ version 2.2----widgetGetRootWindow :: WidgetClass self => self- -> IO DrawWindow -- ^ returns the 'DrawWindow' root window for the toplevel-                  -- for this widget.-widgetGetRootWindow self =-  makeNewGObject mkDrawWindow $-  {# call gtk_widget_get_root_window #}-    (toWidget self)---- %hash c:b929 d:67f0--- | Get the 'Screen' from the toplevel window associated with this widget.--- This function can only be called after the widget has been added to a widget--- hierarchy with a 'Window' at the top.------ In general, you should only create screen specific resources when a--- widget has been realized, and you should free those resources when the--- widget is unrealized.------ * Available since Gtk+ version 2.2----widgetGetScreen :: WidgetClass self => self- -> IO Screen -- ^ returns the 'Screen' for the toplevel for this widget.-widgetGetScreen self =-  makeNewGObject mkScreen $-  {# call gtk_widget_get_screen #}-    (toWidget self)---- %hash c:4fab d:aae2--- | Checks whether there is a 'Screen' is associated with this widget. All--- toplevel widgets have an associated screen, and all widgets added into a--- heirarchy with a toplevel window at the top.------ * Available since Gtk+ version 2.2----widgetHasScreen :: WidgetClass self => self- -> IO Bool -- ^ returns @True@ if there is a 'Screen' associcated with the-            -- widget.-widgetHasScreen self =-  liftM toBool $-  {# call gtk_widget_has_screen #}-    (toWidget self)-#endif---- %hash c:dabc d:8275--- | Gets the size request that was explicitly set for the widget using--- 'widgetSetSizeRequest'. A value of -1 for @width@ or @height@--- indicates that that dimension has not been set explicitly and the natural--- requisition of the widget will be used intead. See 'widgetSetSizeRequest'.--- To get the size a widget will actually use, call 'widgetSizeRequest' instead--- of this function.----widgetGetSizeRequest :: WidgetClass self => self- -> IO (Int, Int) -- ^ @(width, height)@-widgetGetSizeRequest self =-  alloca $ \widthPtr ->-  alloca $ \heightPtr -> do-  {# call gtk_widget_get_size_request #}-    (toWidget self)-    widthPtr-    heightPtr-  width <- peek widthPtr-  height <- peek heightPtr-  return (fromIntegral width, fromIntegral height)---- %hash c:546d d:3c7f--- | Sets whether @widget@ should be mapped along with its when its parent is--- mapped and @widget@ has been shown with 'widgetShow'.------ The child visibility can be set for widget before it is added to a--- container with 'widgetSetParent', to avoid mapping children unnecessary--- before immediately unmapping them. However it will be reset to its default--- state of @True@ when the widget is removed from a container.------ Note that changing the child visibility of a widget does not queue a--- resize on the widget. Most of the time, the size of a widget is computed--- from all visible children, whether or not they are mapped. If this is not--- the case, the container can queue a resize itself.------ This function is only useful for container implementations and never--- should be called by an application.----widgetSetChildVisible :: WidgetClass self => self- -> Bool -- ^ @isVisible@ - if @True@, @widget@ should be mapped along with-         -- its parent.- -> IO ()-widgetSetChildVisible self isVisible =-  {# call gtk_widget_set_child_visible #}-    (toWidget self)-    (fromBool isVisible)---- | Sets the minimum size of a widget; that is, the widget's size request--- will be @width@ by @height@. You can use this function to force a widget to--- be either larger or smaller than it normally would be.------ In most cases, 'Graphics.UI.Gtk.Windows.Window.windowSetDefaultSize'--- is a better choice for toplevel--- windows than this function; setting the default size will still allow users--- to shrink the window. Setting the size request will force them to leave the--- window at least as large as the size request. When dealing with window--- sizes, 'Graphics.UI.Gtk.Windows.Window.windowSetGeometryHints' can be a--- useful function as well.------ Note the inherent danger of setting any fixed size - themes, translations--- into other languages, different fonts, and user action can all change the--- appropriate size for a given widget. So, it's basically impossible to--- hardcode a size that will always be correct.------ The size request of a widget is the smallest size a widget can accept--- while still functioning well and drawing itself correctly. However in some--- strange cases a widget may be allocated less than its requested size, and in--- many cases a widget may be allocated more space than it requested.------ If the size request in a given direction is -1 (unset), then the--- \"natural\" size request of the widget will be used instead.------ Widgets can't actually be allocated a size less than 1 by 1, but you can--- pass 0,0 to this function to mean \"as small as possible.\"----widgetSetSizeRequest :: WidgetClass self => self- -> Int   -- ^ @width@ - width @widget@ should request, or -1 to unset- -> Int   -- ^ @height@ - height @widget@ should request, or -1 to unset- -> IO ()-widgetSetSizeRequest self width height =-  {# call widget_set_size_request #}-    (toWidget self)-    (fromIntegral width)-    (fromIntegral height)--#if GTK_CHECK_VERSION(2,4,0)--- %hash c:83c3 d:e6f1--- | Sets the 'noShowAll' property, which determines whether calls to--- 'widgetShowAll' and 'widgetHideAll' will affect this widget.------ This is mostly for use in constructing widget hierarchies with externally--- controlled visibility, see 'UIManager'.------ * Available since Gtk+ version 2.4----widgetSetNoShowAll :: WidgetClass self => self- -> Bool -- ^ @noShowAll@ - the new value for the 'noShowAll' property- -> IO ()-widgetSetNoShowAll self noShowAll =-  {# call gtk_widget_set_no_show_all #}-    (toWidget self)-    (fromBool noShowAll)---- %hash c:218d d:e07e--- | Returns the current value of the 'noShowAll' property, which--- determines whether calls to 'widgetShowAll' and 'widgetHideAll' will affect--- this widget.------ * Available since Gtk+ version 2.4----widgetGetNoShowAll :: WidgetClass self => self- -> IO Bool -- ^ returns the current value of the \"no_show_all\" property.-widgetGetNoShowAll self =-  liftM toBool $-  {# call gtk_widget_get_no_show_all #}-    (toWidget self)---- %hash c:205b d:c518--- | Returns a list of the widgets, normally labels, for which--- this widget is a the target of a mnemonic (see for example,--- 'labelSetMnemonicWidget').------ * Available since Gtk+ version 2.4----widgetListMnemonicLabels :: WidgetClass self => self- -> IO [Widget] -- ^ returns the list of mnemonic labels-widgetListMnemonicLabels self =-  {# call gtk_widget_list_mnemonic_labels #}-    (toWidget self)-  >>= fromGList-  >>= mapM (makeNewGObject mkWidget . return)---- %hash c:eb76 d:28a2--- | Adds a widget to the list of mnemonic labels for this widget. (See--- 'widgetListMnemonicLabels'). Note the list of mnemonic labels for the widget--- is cleared when the widget is destroyed, so the caller must make sure to--- update its internal state at this point as well, by using a connection to--- the 'destroy' signal or a weak notifier.------ * Available since Gtk+ version 2.4----widgetAddMnemonicLabel :: (WidgetClass self, WidgetClass label) => self- -> label -- ^ @label@ - a 'Widget' that acts as a mnemonic label for-          -- @widget@.- -> IO ()-widgetAddMnemonicLabel self label =-  {# call gtk_widget_add_mnemonic_label #}-    (toWidget self)-    (toWidget label)---- %hash c:7831 d:d10b--- | Removes a widget from the list of mnemonic labels for this widget. (See--- 'widgetListMnemonicLabels'). The widget must have previously been added to--- the list with 'widgetAddMnemonicLabel'.------ * Available since Gtk+ version 2.4----widgetRemoveMnemonicLabel :: (WidgetClass self, WidgetClass label) => self- -> label -- ^ @label@ - a 'Widget' that was previously set as a mnemnic label-          -- for @widget@ with 'widgetAddMnemonicLabel'.- -> IO ()-widgetRemoveMnemonicLabel self label =-  {# call gtk_widget_remove_mnemonic_label #}-    (toWidget self)-    (toWidget label)--#if GTK_CHECK_VERSION(2,10,0)-#if GTK_MAJOR_VERSION < 3--- %hash c:5c70 d:cbf9--- | Returns the 'Action' that @widget@ is a proxy for. See also--- 'actionGetProxies'.------ * Available since Gtk+ version 2.10------ Removed in Gtk3.-widgetGetAction :: WidgetClass self => self- -> IO (Maybe Action)-   -- ^ returns the action that a widget is a proxy for, or-   -- @Nothing@, if it is not attached to an action.-widgetGetAction self = do-  ptr <- {# call gtk_widget_get_action #} (toWidget self)-  if ptr==nullPtr then return Nothing else liftM Just $-    makeNewGObject mkAction (return ptr)-#endif---- %hash c:7ea0 d:2560--- | Whether @widget@ can rely on having its alpha channel drawn correctly. On--- X11 this function returns whether a compositing manager is running for--- @widget@'s screen------ * Available since Gtk+ version 2.10----widgetIsComposited :: WidgetClass self => self- -> IO Bool -- ^ returns @True@ if the widget can rely on its alpha channel-            -- being drawn correctly.-widgetIsComposited self =-  liftM toBool $-  {# call gtk_widget_is_composited #}-    (toWidget self)-#endif-#endif---- | Moves a widget from one 'Container' to another.----widgetReparent :: (WidgetClass self, WidgetClass newParent) => self- -> newParent -- ^ @newParent@ - a 'Container' to move the widget into- -> IO ()-widgetReparent self newParent =-  {# call widget_reparent #}-    (toWidget self)-    (toWidget newParent)--#if GTK_CHECK_VERSION(2,18,0)--- | Set if this widget can receive keyboard input.------ * To use the 'keyPress' event, the widget must be allowed---   to get the input focus. Once it has the input focus all keyboard---   input is directed to this widget.----widgetSetCanFocus :: WidgetClass self => self -> Bool -> IO ()-widgetSetCanFocus = objectSetPropertyBool "can_focus"---- | Check if this widget can receive keyboard input.----widgetGetCanFocus :: WidgetClass self => self -> IO Bool-widgetGetCanFocus = objectGetPropertyBool "can_focus"---- | Retrieves the widget's allocation.------ * Available since Gtk+ version 2.18----widgetGetAllocation :: WidgetClass self => self -> IO Allocation-widgetGetAllocation widget =-  alloca $ \ allocationPtr -> do -     {#call widget_get_allocation#} (toWidget widget) (castPtr allocationPtr)-     peek allocationPtr-#endif--#if GTK_CHECK_VERSION(3,0,0)--- | Returns the width that has currently been allocated to widget. This function is intended--- | to be used when implementing handlers for the "draw" function.-widgetGetAllocatedWidth :: WidgetClass self => self -> IO Int-widgetGetAllocatedWidth widget =-     liftM fromIntegral $ {#call widget_get_allocated_width#} (toWidget widget)---- | Returns the height that has currently been allocated to widget. This function is intended--- | to be used when implementing handlers for the "draw" function.-widgetGetAllocatedHeight :: WidgetClass self => self -> IO Int-widgetGetAllocatedHeight widget =-     liftM fromIntegral $ {#call widget_get_allocated_height#} (toWidget widget)-#endif--#if GTK_CHECK_VERSION(2,18,0)--- | Retrieve the current state of the widget.------ * The state refers to different modes of user interaction, see---   'StateType' for more information.----widgetGetState :: WidgetClass self => self -> IO StateType-widgetGetState widget =-  liftM (toEnum . fromIntegral) $-  {#call widget_get_state#}-    (toWidget widget)-#endif---- | This function is for use in widget implementations. Sets the state of a--- widget (insensitive, prelighted, etc.) Usually you should set the state--- using wrapper functions such as 'widgetSetSensitive'.----widgetSetState :: WidgetClass self => self -> StateType -> IO ()-widgetSetState widget state =-  {#call widget_set_state#}-    (toWidget widget)-    ((fromIntegral . fromEnum) state)---- | Rarely-used function. This function is used to emit the event signals on a widget (those signals--- should never be emitted without using this function to do so). If you want to synthesize an event--- though, don't use this function; instead, use 'mainDoEvent' so the event will behave as if it--- were in the event queue. Don't synthesize expose events; instead, use 'windowInvalidateRect'--- to invalidate a region of the window.-widgetEvent :: WidgetClass self => self -> EventM t Bool-widgetEvent widget = do-  ptr <- ask-  liftIO $ liftM toBool $ {#call widget_event #} (toWidget widget) (castPtr ptr)------------------------- Attributes---- %hash c:6f7f d:9384--- | The name of the widget.------ Default value: @Nothing@----widgetName :: WidgetClass self => Attr self (Maybe String)-widgetName = newAttrFromMaybeStringProperty "name"--widgetMarginLeft :: WidgetClass self => Attr self Int-widgetMarginLeft = newAttrFromIntProperty "margin-left"--widgetMarginRight :: WidgetClass self => Attr self Int-widgetMarginRight = newAttrFromIntProperty "margin-right"--widgetMarginTop :: WidgetClass self => Attr self Int-widgetMarginTop = newAttrFromIntProperty "margin-top"--widgetMarginBottom :: WidgetClass self => Attr self Int-widgetMarginBottom = newAttrFromIntProperty "margin-bottom"---- %hash c:1533 d:3213--- | The parent widget of this widget. Must be a Container widget.----widgetParent :: (WidgetClass self, ContainerClass container) => ReadWriteAttr self (Maybe Container) (Maybe container)-widgetParent = newAttrFromMaybeObjectProperty "parent" gTypeContainer---- %hash c:2b4c d:3c31--- | Override for width request of the widget, or -1 if natural request should--- be used.------ Allowed values: >= -1------ Default value: -1----widgetWidthRequest :: WidgetClass self => Attr self Int-widgetWidthRequest = newAttrFromIntProperty "width-request"---- %hash c:fa97 d:172a--- | Override for height request of the widget, or -1 if natural request--- should be used.------ Allowed values: >= -1------ Default value: -1----widgetHeightRequest :: WidgetClass self => Attr self Int-widgetHeightRequest = newAttrFromIntProperty "height-request"---- %hash c:70d0 d:e8e2--- | Whether the widget is visible.------ Default value: @False@----widgetVisible :: WidgetClass self => Attr self Bool-widgetVisible = newAttrFromBoolProperty "visible"---- | The opacity of the widget------ Default value: @1.0@----widgetOpacity :: WidgetClass self => Attr self Double-widgetOpacity = newAttrFromDoubleProperty "opacity"---- %hash c:4dd4 d:594e--- | Whether the widget responds to input.------ Default value: @True@----widgetSensitive :: WidgetClass self => Attr self Bool-widgetSensitive = newAttrFromBoolProperty "sensitive"---- %hash c:7506 d:1dde--- | Whether the application will paint directly on the widget.------ Default value: @False@----widgetAppPaintable :: WidgetClass self => Attr self Bool-widgetAppPaintable = newAttrFromBoolProperty "app-paintable"---- %hash c:6289 d:72ab--- | Whether the widget can accept the input focus.------ Default value: @False@----widgetCanFocus :: WidgetClass self => Attr self Bool-widgetCanFocus = newAttrFromBoolProperty "can-focus"---- %hash c:8e7 d:2645--- | Whether the widget has the input focus.------ Default value: @False@----widgetHasFocus :: WidgetClass self => Attr self Bool-widgetHasFocus = newAttrFromBoolProperty "has-focus"---- %hash c:7547 d:1d78--- | Whether the widget is the focus widget within the toplevel.------ Default value: @False@----widgetIsFocus :: WidgetClass self => Attr self Bool-widgetIsFocus = newAttrFromBoolProperty "is-focus"---- %hash c:f2d8 d:1cbb--- | Whether the widget can be the default widget.------ Default value: @False@----widgetCanDefault :: WidgetClass self => Attr self Bool-widgetCanDefault = newAttrFromBoolProperty "can-default"---- %hash c:836 d:4cbe--- | Whether the widget is the default widget.------ Default value: @False@----widgetHasDefault :: WidgetClass self => Attr self Bool-widgetHasDefault = newAttrFromBoolProperty "has-default"---- %hash c:f964 d:b62f--- | If @True@, the widget will receive the default action when it is focused.------ Default value: @False@----widgetReceivesDefault :: WidgetClass self => Attr self Bool-widgetReceivesDefault = newAttrFromBoolProperty "receives-default"---- %hash c:2ca6 d:cad8--- | Whether the widget is part of a composite widget.------ Default value: @False@----widgetCompositeChild :: WidgetClass self => ReadAttr self Bool-widgetCompositeChild = readAttrFromBoolProperty "composite-child"---- %hash c:4f01 d:bd3--- | The style of the widget, which contains information about how it will--- look (colors etc).----widgetStyle :: WidgetClass self => Attr self Style-widgetStyle = newAttrFromObjectProperty "style" gTypeStyle---- | The current visual user interaction state of the widget (insensitive,--- prelighted, selected etc). See 'StateType' for more information.----widgetState :: WidgetClass self => Attr self StateType-widgetState = newAttr-  widgetGetState-  widgetSetState---- %hash c:e2a4 d:9296--- | The event mask that decides what kind of GdkEvents this widget gets.------ Default value: 'StructureMask'----widgetEvents :: WidgetClass self => Attr self [EventMask]-widgetEvents = newAttrFromFlagsProperty "events"-                 {# call pure unsafe gdk_event_mask_get_type #}--#if GTK_MAJOR_VERSION < 3--- %hash c:ba80--- | The mask that decides what kind of extension events this widget gets.------ Default value: 'ExtensionEventsNone'------ Removed in Gtk3.-widgetExtensionEvents :: WidgetClass self => Attr self [ExtensionMode]-widgetExtensionEvents = newAttr-  widgetGetExtensionEvents-  widgetSetExtensionEvents-#endif---- %hash c:1605 d:48ea--- | Whether 'widgetShowAll' should not affect this widget.------ Default value: @False@----widgetNoShowAll :: WidgetClass self => Attr self Bool-widgetNoShowAll = newAttrFromBoolProperty "no-show-all"---- %hash c:cd8d d:59b2--- | \'childVisible\' property. See 'widgetGetChildVisible' and--- 'widgetSetChildVisible'----widgetChildVisible :: WidgetClass self => Attr self Bool-widgetChildVisible = newAttr-  widgetGetChildVisible-  widgetSetChildVisible--#if GTK_MAJOR_VERSION < 3--- %hash c:a20a d:646f--- | \'colormap\' property. See 'widgetGetColormap' and 'widgetSetColormap'------ Removed in Gtk3.-widgetColormap :: WidgetClass self => Attr self Colormap-widgetColormap = newAttr-  widgetGetColormap-  widgetSetColormap-#endif---- %hash c:a7fd d:55b8--- | \'compositeName\' property. See 'widgetGetCompositeName' and--- 'widgetSetCompositeName'----widgetCompositeName :: WidgetClass self => ReadWriteAttr self (Maybe String) String-widgetCompositeName = newAttr-  widgetGetCompositeName-  widgetSetCompositeName---- %hash c:6c03 d:ce3b--- | \'direction\' property. See 'widgetGetDirection' and 'widgetSetDirection'----widgetDirection :: WidgetClass self => Attr self TextDirection-widgetDirection = newAttr-  widgetGetDirection-  widgetSetDirection---- | Sets the text of tooltip to be the given string, which is marked up with the Pango text markup--- language. Also see 'tooltipSetMarkup'.--- --- This is a convenience property which will take care of getting the tooltip shown if the given string--- is not \"\": 'hasTooltip' will automatically be set to 'True' and there will be taken care of--- 'queryTooltip' in the default signal handler.--- --- Default value: \"\"--- --- * Available since Gtk+ version 2.12----widgetTooltipMarkup :: WidgetClass self => Attr self (Maybe Markup)-widgetTooltipMarkup = newAttrFromMaybeStringProperty "tooltip-markup"---- | Sets the text of tooltip to be the given string.--- --- Also see 'tooltipSetText'.--- --- This is a convenience property which will take care of getting the tooltip shown if the given string--- is not \"\": 'hasTooltip' will automatically be set to 'True' and there will be taken care of--- 'queryTooltip' in the default signal handler.--- --- Default value: \"\"--- --- * Available since Gtk+ version 2.12----widgetTooltipText :: WidgetClass self => Attr self (Maybe String)-widgetTooltipText = newAttrFromMaybeStringProperty "tooltip-text"---- | Enables or disables the emission of 'queryTooltip' on widget. A value of 'True' indicates that widget--- can have a tooltip, in this case the widget will be queried using 'queryTooltip' to determine--- whether it will provide a tooltip or not.--- --- Note that setting this property to 'True' for the first time will change the event masks of the--- 'Windows' of this widget to include leave-notify and motion-notify events. This cannot and will not--- be undone when the property is set to 'False' again.--- --- Default value: 'False'--- --- * Available since Gtk+ version 2.12----widgetHasTooltip :: WidgetClass self => Attr self Bool-widgetHasTooltip = newAttrFromBoolProperty "has-tooltip"--#if GTK_CHECK_VERSION(2,20,0)--- | Determines if the widget style has been looked up through the rc mechanism.-widgetHasRcStyle :: WidgetClass self => self -                 -> IO Bool -- ^ returns 'True' if the widget has been looked up through the rc mechanism, 'False' otherwise.-widgetHasRcStyle self =                 -  liftM toBool $-  {#call gtk_widget_has_rc_style #}-    (toWidget self)---- | Determines whether widget is realized.-widgetGetRealized :: WidgetClass self => self-                  -> IO Bool  -- ^ returns 'True' if widget is realized, 'False' otherwise -widgetGetRealized self =-  liftM toBool $-  {#call gtk_widget_get_realized #}-    (toWidget self)-  --- | Whether the widget is mapped.-widgetGetMapped :: WidgetClass self => self-                -> IO Bool  -- ^ returns 'True' if the widget is mapped, 'False' otherwise. -widgetGetMapped self =-  liftM toBool $-  {#call gtk_widget_get_mapped #}-    (toWidget self)--#endif--#if GTK_MAJOR_VERSION >= 3--- | Returns the style context associated to @widget@.-widgetGetStyleContext :: WidgetClass widget-                      => widget          -- ^ @widget@ : a @Widget@-                      -> IO StyleContext -- ^ a @StyleContext@-widgetGetStyleContext widget =-  makeNewGObject mkStyleContext $-  {# call gtk_widget_get_style_context #}-  (toWidget widget)-#endif------------------------- Signals----- %hash c:4cf5 d:af3f--- | The widget appears on screen.----mapSignal :: WidgetClass self => Signal self (IO ())-mapSignal = Signal (connect_NONE__NONE "map")---- %hash c:e33e d:af3f--- | The widget disappears from the screen.----unmapSignal :: WidgetClass self => Signal self (IO ())-unmapSignal = Signal (connect_NONE__NONE "unmap")---- %hash c:1f7f d:af3f--- | The widget should allocate any resources needed, in particular, the---   widget's 'DrawWindow' is created. If you connect to this signal and---   you rely on some of these resources to be present, you have to use---   'System.Glib.Signals.after'.----realize :: WidgetClass self => Signal self (IO ())-realize = Signal (connect_NONE__NONE "realize")---- %hash c:7948 d:af3f--- | The widget should deallocate any resources. This signal is emitted before--- the widget is destroyed.----unrealize :: WidgetClass self => Signal self (IO ())-unrealize = Signal (connect_NONE__NONE "unrealize")---- %hash c:9f6f d:af3f--- | Query the widget for the size it likes to--- have.------ * A parent container emits this signal to its child to query the needed---   height and width of the child. There is not guarantee that the widget---   will actually get this area.----sizeRequest :: WidgetClass self => Signal self (IO Requisition)-sizeRequest = Signal (\after w fun ->-  connect_PTR__NONE "size-request" after w-    (\rqPtr -> fun >>= \req -> unless (rqPtr==nullPtr) $ poke rqPtr req))---- %hash c:8ec5 d:af3f--- | Inform widget about the size it has.------ * After querying a widget for the size it wants to have (through emitting---   the @\"sizeRequest\"@ signal) a container will emit this signal to---   inform the widget about the real size it should occupy.----sizeAllocate :: WidgetClass self => Signal self (Allocation -> IO ())-sizeAllocate = Signal (connect_BOXED__NONE "size-allocate" peek)---- %hash c:ae3e d:af3f--- | The widget is shown.----showSignal :: WidgetClass self => Signal self (IO ())-showSignal = Signal (connect_NONE__NONE "show")---- %hash c:f589 d:af3f--- | The widget is hidden.----hideSignal :: WidgetClass self => Signal self (IO ())-hideSignal = Signal (connect_NONE__NONE "hide")---- %hash c:a285 d:af3f--- | The widget gains focus via the given user action.----focus :: WidgetClass self => Signal self (DirectionType -> IO Bool)-focus = Signal (connect_ENUM__BOOL "focus")---- %hash c:78ae d:af3f--- | The state of the widget (input focus, insensitive, etc.) has changed.----stateChanged :: WidgetClass self => Signal self (StateType -> IO ())-stateChanged = Signal (connect_ENUM__NONE "state-changed")---- %hash c:bef2 d:1d66--- | The 'parentSet' signal is emitted when a new parent has been set on a--- widget. The parameter is the new parent.----parentSet :: WidgetClass self => Signal self (Maybe Widget -> IO ())-parentSet = Signal (connect_MOBJECT__NONE "parent-set")---- %hash c:7e2b d:4049--- | Emitted when there is a change in the hierarchy to which a widget belong.--- More precisely, a widget is anchored when its toplevel ancestor is a--- 'Window'. This signal is emitted when a widget changes from un-anchored to--- anchored or vice-versa.----hierarchyChanged :: WidgetClass self => Signal self (Maybe Widget -> IO ())-hierarchyChanged = Signal (connect_MOBJECT__NONE "hierarchy-changed")---- %hash c:5894 d:ba10--- | The 'styleSet' signal is emitted when a new style has been set on a--- widget. Note that style-modifying functions like 'widgetModifyBase' also--- cause this signal to be emitted.----styleSet :: WidgetClass self => Signal self (Style -> IO ())-styleSet = Signal (connect_OBJECT__NONE "style-set")---- %hash c:6bb1 d:af3f--- | The default direction of text writing has changed.----directionChanged :: WidgetClass self => Signal self (TextDirection -> IO ())-directionChanged = Signal (connect_ENUM__NONE "direction-changed")---- %hash c:c28c d:d116--- | The 'grabNotify' signal is emitted when a widget becomes shadowed by a--- Gtk+ grab (not a pointer or keyboard grab) on another widget, or when it--- becomes unshadowed due to a grab being removed.------ A widget is shadowed by a 'grabAdd' when the topmost grab widget in the--- grab stack of its window group is not its ancestor.----grabNotify :: WidgetClass self => Signal self (Bool -> IO ())-grabNotify = Signal (connect_BOOL__NONE "grab-notify")---- %hash c:e06c d:a681--- | This signal gets emitted whenever a widget should pop up a--- context-sensitive menu. This usually happens through the standard key--- binding mechanism; by pressing a certain key while a widget is focused, the--- user can cause the widget to pop up a menu. For example, the 'Entry' widget--- creates a menu with clipboard commands.----popupMenuSignal :: WidgetClass self => Signal self (IO Bool)-popupMenuSignal = Signal (connect_NONE__BOOL "popup-menu")---- | Specify what kind of help the user wants.-{#enum GtkWidgetHelpType as WidgetHelpType {underscoreToCase} deriving (Eq,Show) #}---- %hash c:b18e d:af3f--- | Tell the widget to show an explanatory help text. Should return @True@---   if help has been shown.----showHelp :: WidgetClass self => Signal self (WidgetHelpType -> IO Bool)-showHelp = Signal (connect_ENUM__BOOL "show-help")---- %hash c:6a8f d:af3f--- | The set of keyboard accelerators has changed.----accelClosuresChanged :: WidgetClass self => Signal self (IO ())-accelClosuresChanged = Signal (connect_NONE__NONE "accel-closures-changed")---- %hash c:5ca d:af3f--- | The widget moved to a new screen.----screenChanged :: WidgetClass self => Signal self (Screen -> IO ())-screenChanged = Signal (connect_OBJECT__NONE "screen-changed")---- | Emitted when 'hasTooltip' is 'True' and the 'gtkTooltipTimeout' has expired with the cursor--- hovering "above" widget; or emitted when widget got focus in keyboard mode.--- --- Using the given coordinates, the signal handler should determine whether a tooltip should be shown--- for widget. If this is the case 'True' should be returned, 'False' otherwise. --- Note if widget got focus in keyboard mode, 'Point' is 'Nothing'.--- --- The signal handler is free to manipulate tooltip with the therefore destined function calls.------ * Available since Gtk+ version 2.12----queryTooltip :: WidgetClass self => Signal self (Widget -> Maybe Point -> Tooltip -> IO Bool)-queryTooltip =-  Signal (\after model user -> -           connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL "query-tooltip" -             after model (\widget x y keyb tooltip -> -                              user widget (if keyb then Nothing else Just (x, y)) tooltip))--#if GTK_CHECK_VERSION(3,0,0)-draw :: WidgetClass self => Signal self (Render ())-draw =-  Signal (\after model (Render user) ->-           connect_PTR__NONE "draw" after model (\ptr -> runReaderT user (Cairo ptr)))-#endif---- * Events------ An event is a signal that indicates that some low-level interaction like a--- button or key press, mouse movement, etc. has occurred. In particular,--- events relate to operations on 'DrawWindow's which are a concept of the--- underlying OS rather than the logical widget concept. Some widgets have no--- window and use their parent to receive these events. Widgets normally--- synthesize more sophistiacted signals from events. For instance, the--- 'focusIn' and a 'focusOut' signal indicate that the widget gains or looses--- the input focus. From these events a 'focus' signal is synthesized that--- indicates what maneuver lead to the input focus change (i.e. a tab or--- shift-tab key press).------ For applications it is often sufficient to connect to the high-level--- signals rather than the low-level events. Only in cases where a custom--- widget is built based on the 'DarwingArea' skeleton, the functionality of--- such an application-specific widget needs to be implemented using events.------ Every event is passed an 'Event' structure that contains the data of the--- event. The return value should be @True@ if the handler has dealt with the--- event and @False@ if the event should be propagated further. For instance,--- if a key press event that isn't meaningful in the widget, the handler can--- return @False@ such that the key is handled by the other widgets (the main--- menu, for instance).-------- Because there are so many similar signals (those that take an Event and--- return a Bool) we will abstract out the skeleton. As some of these events--- are emitted at a high rate often a bit has to be set to enable emission.---eventM :: WidgetClass w => SignalName -> [EventMask] ->-  ConnectAfter -> w -> (EventM t Bool) -> IO (ConnectId w)-eventM name eMask after obj fun = do-  id <- connect_PTR__BOOL name after obj (runReaderT fun)-  widgetAddEvents obj eMask-  return id---- %hash c:6cc d:af3f--- | A mouse button has been depressed while the mouse pointer was within the--- widget area. Sets the widget's 'ButtonPressMask' flag.----buttonPressEvent :: WidgetClass self => Signal self (EventM EButton Bool)-buttonPressEvent = Signal (eventM "button_press_event" [ButtonPressMask])---- %hash c:62e8 d:af3f--- | A mouse button has been released. Sets the widget's 'ButtonReleaseMask'--- flag.----buttonReleaseEvent :: WidgetClass self => Signal self (EventM EButton Bool)-buttonReleaseEvent = Signal (eventM "button_release_event" [ButtonReleaseMask])---- %hash c:23e5 d:af3f--- | The scroll wheel of the mouse has been used.  Sets the widget's--- 'ScrollMask' flag.----scrollEvent :: WidgetClass self => Signal self (EventM EScroll Bool)-scrollEvent = Signal (eventM "scroll_event" [ScrollMask])---- %hash c:ee92 d:af3f--- | The mouse pointer has moved. Since receiving all mouse movements is---   expensive, it is necessary to specify exactly what mouse motions are---   required by calling 'widgetAddEvents' on this widget with one or more of---   the following flags:------   * 'PointerMotionMask': Track all movements.------   * 'ButtonMotionMask': Only track movements if a button is depressed.------   * 'Button1MotionMask': Only track movements if the left button is depressed.------   * 'Button2MotionMask': Only track movements if the middle button is depressed.------   * 'Button3MotionMask': Only track movements if the right button is depressed.---   'PointerMotionHintMask' is a special flag which can be used in---   combination with any of the above and is used to reduce the number of---   'motionNotifyEvent's received. Normally a 'motionNotifyEvent' event is---   received each time the mouse moves. However, if the application spends a---   lot of time processing the event (updating the display, for example), it---   can lag behind the position of the mouse. When using---   'PointerMotionHintMask', fewer 'motionNotifyEvent's will be sent, some of---   which are marked as a hint. To receive more motion events after a motion---   hint event, the application needs to asks for more, by calling---   'Graphics.UI.Gtk.Gdk.EventM.eventRequestMotions'. This effectively limits---   the rate at which new motion events are received. (Note that you don't---   need to check if the hint is set as---   'Graphics.UI.Gtk.Gdk.EventM.eventRequestMotions' does so automatically.)----motionNotifyEvent :: WidgetClass self => Signal self (EventM EMotion Bool)-motionNotifyEvent = Signal (eventM "motion_notify_event" [])---- %hash c:8783 d:3e27--- | The 'deleteEvent' signal is emitted if a user requests that a toplevel--- window is closed. The default handler for this signal destroys the window.--- Calling 'widgetHide' and returning @True@ on reception of this signal will--- cause the window to be hidden instead, so that it can later be shown again--- without reconstructing it.----deleteEvent :: WidgetClass self => Signal self (EventM EAny Bool)-deleteEvent = Signal (eventM "delete_event" [])---- %hash c:c408 d:5514--- | The 'destroyEvent' signal is emitted when a 'DrawWindow' is destroyed.--- You rarely get this signal, because most widgets disconnect themselves from--- their window before they destroy it, so no widget owns the window at--- destroy time. However, you might want to connect to the 'objectDestroy'--- signal of 'Object'.----destroyEvent :: WidgetClass self => Signal self (EventM EAny Bool)-destroyEvent = Signal (eventM "destroy_event" [])---- %hash c:c79e d:af3f---- | Instructs the widget to redraw.------ * The 'DrawWindow' that needs to be redrawn is available via---   'eventWindow'.------ * The part that needs to be redrawn is available via 'eventArea' and---   'eventRegion'. The options are, in order of efficiency: (a) redraw the---   entire window, (b) ask for the 'eventArea' and redraw that rectangle, (c)---   ask for the 'eventRegion' and redraw each of those rectangles.------   Only the exposed region will be updated; see also---   'drawWindowBeginPaintRegion'.--exposeEvent :: WidgetClass self => Signal self (EventM EExpose Bool)-exposeEvent = Signal (eventM "expose_event" [])---- %hash c:5ccd d:af3f--- | A key has been depressed. Sets the widget's 'KeyPressMask' flag.----keyPressEvent :: WidgetClass self => Signal self (EventM EKey Bool)-keyPressEvent = Signal (eventM "key_press_event" [KeyPressMask])---- %hash c:bd29 d:af3f--- | A key has been released. Sets the widget's 'KeyReleaseMask' flag.----keyReleaseEvent :: WidgetClass self => Signal self (EventM EKey Bool)-keyReleaseEvent = Signal (eventM "key_release_event" [KeyReleaseMask])---- %hash c:602e d:af3f--- | The mouse pointer has entered the widget. Sets the widget's--- 'EnterNotifyMask' flag.----enterNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)-enterNotifyEvent = Signal (eventM "enter_notify_event" [EnterNotifyMask])---- %hash c:3bfb d:af3f--- | The mouse pointer has left the widget. Sets the widget's--- 'LeaveNotifyMask' flag.----leaveNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)-leaveNotifyEvent = Signal (eventM "leave_notify_event" [LeaveNotifyMask])---- %hash c:2b64 d:af3f--- | The size of the window has changed.----configureEvent :: WidgetClass self => Signal self (EventM EConfigure Bool)-configureEvent = Signal (eventM "configure_event" [])---- %hash c:427e d:af3f--- | The widget gets the input focus.  Sets the widget's 'FocusChangeMask' flag.----focusInEvent :: WidgetClass self => Signal self (EventM EFocus Bool)-focusInEvent = Signal (eventM "focus_in_event" [FocusChangeMask])---- %hash c:5281 d:af3f--- | The widget lost the input focus. Sets the widget's 'FocusChangeMask' flag.----focusOutEvent :: WidgetClass self => Signal self (EventM EFocus Bool)-focusOutEvent = Signal (eventM "focus_out_event" [FocusChangeMask])---- %hash c:63c4 d:af3f--- | The window is put onto the screen.----mapEvent :: WidgetClass self => Signal self (EventM EAny Bool)-mapEvent = Signal (eventM "map_event" [])---- %hash c:342d d:af3f--- | The window is taken off the screen.----unmapEvent :: WidgetClass self => Signal self (EventM EAny Bool)-unmapEvent = Signal (eventM "unmap_event" [])---- %hash c:a1dd d:af3f--- | A 'DrawWindow' may be associated with a set of properties that are--- identified by a 'PropertyTag'. This event is triggered if a property is--- changed or deleted. Sets the widget's 'PropertyChangeMask' flag.----propertyNotifyEvent :: WidgetClass self => Signal self (EventM EProperty Bool)-propertyNotifyEvent = Signal (eventM "property_notify_event" [PropertyChangeMask])-{- not sure if these are useful--- %hash c:58cc d:af3f--- | ----selectionClearEvent :: WidgetClass self => Signal self ({-GdkEventSelection*-} Bool)-selectionClearEvent = Signal (connect_{-GdkEventSelection*-}__BOOL "selection_clear_event")---- %hash c:4f92 d:af3f--- |----selectionRequestEvent :: WidgetClass self => Signal self ({-GdkEventSelection*-} Bool)-selectionRequestEvent = Signal (connect_{-GdkEventSelection*-}__BOOL "selection_request_event")---- %hash c:b842 d:af3f--- |----selectionNotifyEvent :: WidgetClass self => Signal self ({-GdkEventSelection*-} Bool)-selectionNotifyEvent = Signal (connect_{-GdkEventSelection*-}__BOOL "selection_notify_event")--}---- %hash c:b027 d:af3f--- | The pen of a graphics tablet was put down. Sets the widget's--- 'ProximityInMask' flag.----proximityInEvent :: WidgetClass self => Signal self (EventM EProximity Bool)-proximityInEvent = Signal (eventM "proximity_in_event" [ProximityInMask])---- %hash c:faca d:af3f--- | The pen of a graphics tablet was lifted off the tablet. Sets the widget's--- 'ProximityOutMask' flag.----proximityOutEvent :: WidgetClass self => Signal self (EventM EProximity Bool)-proximityOutEvent = Signal (eventM "proximity_out_event" [ProximityOutMask])---- %hash c:db2c d:af3f--- | Emitted when the window visibility status has changed. Sets the widget's--- 'VisibilityNotifyMask' flag.----visibilityNotifyEvent :: WidgetClass self => Signal self (EventM EVisibility Bool)-visibilityNotifyEvent = Signal (eventM "visibility_notify_event" [VisibilityNotifyMask])-{---- %hash c:3f5 d:af3f--- |----clientEvent :: WidgetClass self => Signal self ({-GdkEventClient*-} Bool)-clientEvent = Signal (connect_{-GdkEventClient*-}__BOOL "client_event")--}---- %hash c:643c d:af3f--- | Generated when the area of a 'Drawable' being copied using, e.g.--- 'Graphics.UI.Gtk.Gdk.Drawable.drawDrawable', is completely available.----noExposeEvent :: WidgetClass self => Signal self (EventM EAny Bool)-noExposeEvent = Signal (eventM "no_expose_event" [])---- %hash c:63b6 d:af3f--- | Emitted when the state of the window changes, i.e. when it is minimized,--- moved to the top, etc.----windowStateEvent :: WidgetClass self => Signal self (EventM EWindowState Bool)-windowStateEvent = Signal (eventM "window_state_event" [])--#if GTK_CHECK_VERSION(2,8,0)--- %hash c:502a d:e47a--- | Emitted when a pointer or keyboard grab on a window belonging to @widget@--- gets broken.------ On X11, this happens when the grab window becomes unviewable (i.e. it or--- one of its ancestors is unmapped), or if the same application grabs the--- pointer or keyboard again.------ * Available since Gtk+ version 2.8----grabBrokenEvent :: WidgetClass self => Signal self (EventM EGrabBroken Bool)-grabBrokenEvent = Signal (eventM "grab_broken_event" [])-#endif-             ------------------------ Deprecated Signals and Events--#ifndef DISABLE_DEPRECATED--event :: WidgetClass w => SignalName -> [EventMask] ->-  ConnectAfter -> w -> (Event -> IO Bool) -> IO (ConnectId w)-event name eMask after obj fun = do-  id <- connect_BOXED__BOOL name marshalEvent after obj fun-  widgetAddEvents obj eMask-  return id---- | A Button was pressed.------ * This widget is part of a button which was just pressed. The event passed---   to the user function is a 'Graphics.UI.Gtk.Gdk.Events.Button' event.----onButtonPress, afterButtonPress :: WidgetClass w => w -> (Event -> IO Bool) ->-                                   IO (ConnectId w)-onButtonPress = event "button_press_event" [ButtonPressMask] False-afterButtonPress = event "button_press_event" [ButtonPressMask] True---- | A Button was released.----onButtonRelease, afterButtonRelease :: WidgetClass w => w ->-                                       (Event -> IO Bool) -> IO (ConnectId w)-onButtonRelease = event "button_release_event" [ButtonReleaseMask] False-afterButtonRelease = event "button_release_event" [ButtonReleaseMask] True---- | ----onClient, afterClient :: WidgetClass w => w -> (Event -> IO Bool) ->-                         IO (ConnectId w)-onClient = event "client_event" [] False-afterClient = event "client_event" [] True---- | The widget's status has changed.----onConfigure, afterConfigure :: WidgetClass w => w -> (Event -> IO Bool) ->-                               IO (ConnectId w)-onConfigure = event "configure_event" []  False-afterConfigure = event "configure_event" []  True---- | This signal is emitted when the close icon on the--- surrounding window is pressed. The default action is to emit the--- @\"destroy\"@ signal.----onDelete, afterDelete :: WidgetClass w => w -> (Event -> IO Bool) ->-                         IO (ConnectId w)-onDelete = event "delete_event" [] False-afterDelete = event "delete_event" [] True---- | The widget will be destroyed.------ * The widget received a destroy event from the window manager.----onDestroyEvent, afterDestroyEvent :: WidgetClass w => -				     w -> (Event -> IO Bool) ->-				     IO (ConnectId w)-onDestroyEvent = event "destroy_event" [] False-afterDestroyEvent = event "destroy_event" [] True---- | The default text direction was changed.----onDirectionChanged, afterDirectionChanged :: WidgetClass w => w ->-                                             (Event -> IO Bool) ->-                                             IO (ConnectId w)-onDirectionChanged = event "direction_changed" [] False-afterDirectionChanged = event "direction_changed" [] True---- | Mouse cursor entered widget.------ * Contains a 'Crossing' event.----onEnterNotify, afterEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) ->-                                   IO (ConnectId w)-onEnterNotify = event "enter_notify_event" [EnterNotifyMask] False-afterEnterNotify = event "enter_notify_event" [EnterNotifyMask] True---- | Mouse cursor leaves widget.------ * Contains a 'Crossing' event.----onLeaveNotify, afterLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) ->-                                   IO (ConnectId w)-onLeaveNotify = event "leave_notify_event" [LeaveNotifyMask] False-afterLeaveNotify = event "leave_notify_event" [LeaveNotifyMask] True---- | Instructs the widget to redraw.------ * This event is useful for the 'DrawingArea'. On receiving this signal---   the content of the passed Rectangle or Region needs to be redrawn.---   The return value should be 'True' if the region was completely redrawn---   and 'False' if other handlers in the chain should be invoked.---   If a client will redraw the whole area and is not interested in the---   extra information in 'Expose', it is more efficient---   to use 'onExposeRect'.------ * Widgets that are very expensive to re-render, such as an image editor,---   may prefer to use the 'onExpose' call back which delivers a---   'Region' in addition to a 'Rectangle'. A 'Region' consists of several---   rectangles that need redrawing. The simpler 'onExposeRect' event encodes---   the area to be redrawn as a bounding rectangle which might be easier---   to deal with in a particular application.----onExpose, afterExpose :: WidgetClass w => w -> (Event -> IO Bool) ->-                         IO (ConnectId w)-onExpose = event "expose_event" [] False-afterExpose = event "expose_event" [] True---- | Expose event delivering a 'Rectangle'.----onExposeRect, afterExposeRect ::-    WidgetClass w => w -> (Rectangle -> IO ()) -> IO (ConnectId w)-onExposeRect w act = connect_BOXED__BOOL "expose_event"-  marshExposeRect False w (\r -> act r >> return True)-afterExposeRect w act = connect_BOXED__BOOL "expose_event" -  marshExposeRect True w (\r -> act r >> return True)---- | This signal is called if the widget receives the input focus.----onFocus, afterFocus :: WidgetClass w => w -> (DirectionType -> IO Bool) ->-                       IO (ConnectId w)-onFocus = connect_ENUM__BOOL "focus" False-afterFocus = connect_ENUM__BOOL "focus" True---- | Widget gains input focus.----onFocusIn, afterFocusIn :: WidgetClass w => w -> (Event -> IO Bool) ->-                           IO (ConnectId w)-onFocusIn = event "focus_in_event" [FocusChangeMask] False-afterFocusIn = event "focus_in_event" [FocusChangeMask] True---- | Widget looses input focus.----onFocusOut, afterFocusOut :: WidgetClass w => w -> (Event -> IO Bool) ->-                             IO (ConnectId w)-onFocusOut = event "focus_out_event" [FocusChangeMask] False-afterFocusOut = event "focus_out_event" [FocusChangeMask] True---- | The widget is about to receive all events.------ * It is possible to redirect all input events to one widget to force the---   user to use only this widget. Such a situation is initiated by---   'addGrab'.----onGrabFocus, afterGrabFocus :: WidgetClass w => w -> IO () ->-                               IO (ConnectId w)-onGrabFocus = connect_NONE__NONE  "grab_focus" False-afterGrabFocus = connect_NONE__NONE "grab_focus" True---- | The widget will be destroyed.------ * This is the last signal this widget will receive.----onDestroy, afterDestroy :: WidgetClass w => w -> (IO ()) ->-                           IO (ConnectId w)-onDestroy = connect_NONE__NONE "destroy" False-afterDestroy = connect_NONE__NONE "destroy" True---- | The widget was asked to hide itself.------ * This signal is emitted each time 'widgetHide' is called. Use---   'onUnmap' when your application needs to be informed---   when the widget is actually removed from screen.----onHide, afterHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)-onHide = connect_NONE__NONE "hide" False-afterHide = connect_NONE__NONE "hide" True---- | The toplevel window changed.------ * When a subtree of widgets is removed or added from a tree with a toplevel---   window this signal is emitted. It is emitted on each widget in the---   detached or attached subtree.----onHierarchyChanged, afterHierarchyChanged :: WidgetClass w => w -> IO () ->-                                             IO (ConnectId w)-onHierarchyChanged = connect_NONE__NONE "hierarchy_changed" False-afterHierarchyChanged = connect_NONE__NONE "hierarchy_changed" True---- | A key was pressed.----onKeyPress, afterKeyPress :: WidgetClass w => w -> (Event -> IO Bool) ->-                             IO (ConnectId w)-onKeyPress = event "key_press_event" [KeyPressMask] False-afterKeyPress = event "key_press_event" [KeyPressMask] True---- | A key was released.----onKeyRelease, afterKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) ->-                                 IO (ConnectId w)-onKeyRelease = event "key_release_event" [KeyReleaseMask] False-afterKeyRelease = event "key_release_event" [KeyReleaseMask] True---- | ----onMnemonicActivate, afterMnemonicActivate :: WidgetClass w => w ->-                                             (Bool -> IO Bool) ->-                                             IO (ConnectId w)-onMnemonicActivate = connect_BOOL__BOOL "mnemonic_activate" False-afterMnemonicActivate = connect_BOOL__BOOL "mnemonic_activate" True---- | Track mouse movements.------ * If @hint@ is False, a callback for every movement of the mouse is---   generated. To avoid a backlog of mouse messages, it is usually sufficient---   to sent @hint@ to True, generating only one event. The---   application now has to state that it is ready for the next message by---   calling 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowGetPointer'.----onMotionNotify, afterMotionNotify :: WidgetClass w => w -> Bool ->-                                     (Event -> IO Bool) -> -                                     IO (ConnectId w)-onMotionNotify w hint = event "motion_notify_event" -  (if hint then [PointerMotionMask, PointerMotionHintMask]-           else [PointerMotionMask]) False w-afterMotionNotify w hint = event "motion_notify_event" -  (if hint then [PointerMotionMask, PointerMotionHintMask]-           else [PointerMotionMask]) True w---- | ----onParentSet, afterParentSet :: (WidgetClass w, WidgetClass old) => w ->-                               (old -> IO ()) -> IO (ConnectId w)-onParentSet = connect_OBJECT__NONE "parent_set"  False-afterParentSet = connect_OBJECT__NONE "parent_set"  True---- | ----onPopupMenu, afterPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)-onPopupMenu = connect_NONE__NONE "popup_menu" False-afterPopupMenu = connect_NONE__NONE "popup_menu" True---- | The input device became active.------ * This event indicates that a pen of a graphics tablet or similar device is---   now touching the tablet.----onProximityIn, afterProximityIn :: WidgetClass w => w -> (Event -> IO Bool) ->-                                   IO (ConnectId w)-onProximityIn = event "proximity_in_event" [ProximityInMask] False-afterProximityIn = event "proximity_in_event" [ProximityInMask] True---- | The input device became inactive.------ * The pen was removed from the graphics tablet's surface.----onProximityOut, afterProximityOut :: WidgetClass w => w ->-                                     (Event -> IO Bool) -> IO (ConnectId w)-onProximityOut = event "proximity_out_event" [ProximityOutMask] False-afterProximityOut = event "proximity_out_event" [ProximityOutMask] True---- | This widget's drawing area is about to be--- destroyed.----onRealize, afterRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)-onRealize = connect_NONE__NONE "realize" False-afterRealize = connect_NONE__NONE "realize" True---- | The mouse wheel has turned.------ * The 'Event' is always 'Scroll'.----onScroll, afterScroll :: WidgetClass w => w -> (Event -> IO Bool) ->-                         IO (ConnectId w)-onScroll = event "scroll_event" [ScrollMask] False-afterScroll = event "scroll_event" [ScrollMask] True---- | The widget was asked to show itself.------ * This signal is emitted each time 'widgetShow' is called. Use---   'onMap' when your application needs to be informed when---   the widget is actually shown.----onShow, afterShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)-onShow = connect_NONE__NONE "show" False-afterShow = connect_NONE__NONE "show" True---- | Inform widget about the size it has.------ * After querying a widget for the size it wants to have (through emitting---   the @\"sizeRequest\"@ signal) a container will emit this signal to---   inform the widget about the real size it should occupy.----onSizeAllocate, afterSizeAllocate :: WidgetClass w => w ->-                                     (Allocation -> IO ()) -> IO (ConnectId w)-onSizeAllocate = connect_BOXED__NONE "size_allocate" peek False-afterSizeAllocate = connect_BOXED__NONE "size_allocate" peek True---- | Query the widget for the size it likes to--- have.------ * A parent container emits this signal to its child to query the needed---   height and width of the child. There is not guarantee that the widget---   will actually get this area.----onSizeRequest, afterSizeRequest :: WidgetClass w => w -> (IO Requisition) ->-                                   IO (ConnectId w)-onSizeRequest w fun = connect_PTR__NONE "size_request" False w (\rqPtr -> do-  req <- fun-  unless (rqPtr==nullPtr) $ poke rqPtr req)-afterSizeRequest w fun = connect_PTR__NONE "size_request" True w (\rqPtr -> do-  req <- fun-  unless (rqPtr==nullPtr) $ poke rqPtr req) ---- | ----onStateChanged, afterStateChanged :: WidgetClass w => w ->-                                     (StateType -> IO ()) -> IO (ConnectId w)-onStateChanged = connect_ENUM__NONE "state_changed" False-afterStateChanged = connect_ENUM__NONE "state_changed" True---- | The widget was removed from screen.----onUnmap, afterUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)-onUnmap = connect_NONE__NONE "unmap" False-afterUnmap = connect_NONE__NONE "unmap" True---- | This widget's drawing area is about to be--- destroyed.----onUnrealize, afterUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)-onUnrealize = connect_NONE__NONE "unrealize" False-afterUnrealize = connect_NONE__NONE "unrealize" True---- | ----onVisibilityNotify, afterVisibilityNotify :: WidgetClass w => w ->-                                             (Event -> IO Bool) ->-                                             IO (ConnectId w)-onVisibilityNotify = -  event "visibility_notify_event" [VisibilityNotifyMask] False-afterVisibilityNotify = -  event "visibility_notify_event" [VisibilityNotifyMask] True---- | +-- user interaction. The signal handlers for all these events have to+-- return @True@ if the signal has been dealt with and @False@ if other+-- signal handlers should be run.++-- * Class Hierarchy+--+-- |+-- @+-- |  'GObject'+-- |   +----'Object'+-- |         +----Widget+-- |               +----/too many to list/+-- @++-- * Types+  Widget,+  WidgetClass,+  castToWidget, gTypeWidget,+  toWidget,+  EventMask(..),+#if GTK_MAJOR_VERSION < 3+  ExtensionMode(..),+#endif+  GType,+  KeyVal,+#if GTK_MAJOR_VERSION < 3+  Region,+  Bitmap,+#endif+  Requisition(..),+  Rectangle(..),+  Color,+  IconSize(..),+  StateType(..),+  TextDirection(..),+  AccelFlags(..),+  DirectionType(..),+  StockId,+  WidgetHelpType(..),+  Allocation,++-- * Methods+  widgetShow,+  widgetShowNow,+  widgetHide,+  widgetShowAll,+#if GTK_MAJOR_VERSION < 3+  widgetHideAll,+#endif+  widgetDestroy,+#if GTK_CHECK_VERSION(3,0,0)+  widgetDraw,+#endif+  widgetQueueDraw,+  widgetQueueResize,+#if GTK_CHECK_VERSION(2,4,0)+  widgetQueueResizeNoRedraw,+#endif+#if GTK_CHECK_VERSION(3,8,0)+  widgetGetFrameClock,+#endif+#if GTK_CHECK_VERSION(3,10,0)+  widgetGetScaleFactor,+#endif+  widgetSizeRequest,+  widgetGetChildRequisition,+  widgetSizeAllocate,+#if GTK_CHECK_VERSION(3,10,0)+  widgetSizeAllocateWithBaseline,+#endif+  widgetAddAccelerator,+  widgetRemoveAccelerator,+  widgetSetAccelPath,+#if GTK_CHECK_VERSION(2,4,0)+  widgetCanActivateAccel,+#endif+  widgetActivate,+  widgetIntersect,+  widgetHasIntersection,+  widgetGetIsFocus,+  widgetGrabFocus,+  widgetGrabDefault,+  widgetSetName,+  widgetGetName,+  widgetSetSensitive,+  widgetSetSensitivity,+  widgetGetParentWindow,+#if GTK_MAJOR_VERSION < 3+  widgetGetDrawWindow,+#endif+  widgetDelEvents,+  widgetAddEvents,+  widgetGetEvents,+  widgetSetEvents,+#if GTK_MAJOR_VERSION < 3+  widgetSetExtensionEvents,+  widgetGetExtensionEvents,+#endif+  widgetGetToplevel,+  widgetGetAncestor,+#if GTK_MAJOR_VERSION < 3+  widgetGetColormap,+  widgetSetColormap,+#endif+  widgetGetPointer,+  widgetIsAncestor,+  widgetTranslateCoordinates,+  widgetSetStyle,+  widgetGetStyle,+#if GTK_MAJOR_VERSION < 3+  widgetPushColormap,+  widgetPopColormap,+  widgetSetDefaultColormap,+  widgetGetDefaultColormap,+#endif+  widgetGetDefaultStyle,+  widgetSetDirection,+  widgetGetDirection,+  widgetSetDefaultDirection,+  widgetGetDefaultDirection,+#if GTK_MAJOR_VERSION < 3+  widgetShapeCombineMask,+#if GTK_CHECK_VERSION(2,10,0)+  widgetInputShapeCombineMask,+#endif+#endif+#if GTK_CHECK_VERSION(3,0,0)+  widgetShapeCombineRegion,+  widgetInputShapeCombineRegion,+#endif+#if GTK_MAJOR_VERSION < 3+#if GTK_CHECK_VERSION(2,14,0)+  widgetGetSnapshot,+#endif+#endif+  widgetPath,+  widgetClassPath,+  widgetGetCompositeName,+#if GTK_CHECK_VERSION(3,0,0)+  widgetOverrideBackgroundColor,+  widgetOverrideColor,+  widgetOverrideFont,+  widgetOverrideSymbolicColor,+  widgetOverrideCursor,+#endif+  widgetModifyStyle,+  widgetGetModifierStyle,+  widgetModifyFg,+  widgetModifyBg,+  widgetModifyText,+  widgetModifyBase,+  widgetModifyFont,+  widgetRestoreFg,+  widgetRestoreBg,+  widgetRestoreText,+  widgetRestoreBase,+  widgetCreatePangoContext,+  widgetGetPangoContext,+  widgetCreateLayout,+  widgetRenderIcon,+  widgetQueueDrawArea,+#if GTK_CHECK_VERSION(3,0,0)+  widgetQueueDrawRegion,+#endif+#if GTK_MAJOR_VERSION < 3+  widgetResetShapes,+#endif+  widgetSetAppPaintable,+  widgetSetDoubleBuffered,+  widgetSetRedrawOnAllocate,+  widgetSetCompositeName,+  widgetMnemonicActivate,+#if GTK_MAJOR_VERSION < 3+  widgetSetScrollAdjustments,+  widgetRegionIntersect,+#endif+  widgetGetAccessible,+  widgetChildFocus,+  widgetGetChildVisible,+  widgetGetParent,+  widgetGetSettings,+#if GTK_CHECK_VERSION(2,2,0)+  widgetGetClipboard,+  widgetGetDisplay,+  widgetGetRootWindow,+  widgetGetScreen,+  widgetHasScreen,+#endif+  widgetGetSizeRequest,+#if GTK_CHECK_VERSION(3,0,0)+  widgetGetPreferredSize,+#endif+  widgetSetChildVisible,+  widgetSetSizeRequest,+#if GTK_CHECK_VERSION(2,4,0)+  widgetSetNoShowAll,+  widgetGetNoShowAll,+  widgetListMnemonicLabels,+  widgetAddMnemonicLabel,+  widgetRemoveMnemonicLabel,+#if GTK_CHECK_VERSION(2,10,0)+#if GTK_MAJOR_VERSION < 3+  widgetGetAction,+#endif+  widgetIsComposited,+#endif+#endif+#if GTK_CHECK_VERSION(2,12,0)+  widgetErrorBell,+  widgetKeynavFailed,+  widgetGetTooltipMarkup,+  widgetSetTooltipMarkup,+  widgetGetTooltipText,+  widgetSetTooltipText,+  widgetGetTooltipWindow,+  widgetSetTooltipWindow,+  widgetGetHasTooltip,+  widgetSetHasTooltip,+  widgetTriggerTooltipQuery,+#endif+#if GTK_CHECK_VERSION(2,14,0)+  widgetGetWindow,+#endif+#if GTK_CHECK_VERSION(3,8,0)+  widgetRegisterWindow,+  widgetUnregisterWindow,+#endif+#if GTK_CHECK_VERSION(3,0,0)+  cairoShouldDrawWindow,+  cairoTransformToWindow,+#endif+  widgetReparent,+#if GTK_CHECK_VERSION(2,18,0)+  widgetGetCanFocus,+  widgetSetCanFocus,+  widgetGetAllocation,+#endif+#if GTK_CHECK_VERSION(3,0,0)+  widgetGetAllocatedWidth,+  widgetGetAllocatedHeight,+#endif+#if GTK_CHECK_VERSION(3,10,0)+  widgetGetAllocatedBaseline,+#endif+#if GTK_CHECK_VERSION(3,14,0)+  widgetGetClip,+  widgetSetClip,+#endif+#if GTK_CHECK_VERSION(2,18,0)+  widgetGetAppPaintable,+  widgetGetCanDefault,+  widgetSetCanDefault,+  widgetGetHasWindow,+  widgetSetHasWindow,+  widgetGetSensitive,+  widgetIsSensitive,+  widgetGetState,+  widgetGetVisible,+#endif+#if GTK_CHECK_VERSION(3,8,0)+  widgetIsVisible,+#endif+#if GTK_CHECK_VERSION(3,0,0)+  widgetSetStateFlags,+  widgetUnsetStateFlags,+  widgetGetStateFlags,+#endif+#if GTK_CHECK_VERSION(2,18,0)+  widgetGetHasDefault,+  widgetGetHasFocus,+#endif+#if GTK_CHECK_VERSION(3,2,0)+  widgetHasVisibleFocus,+#endif+#if GTK_CHECK_VERSION(2,18,0)+  widgetHasGrab,+  widgetIsDrawable,+  widgetIsToplevel,+  widgetSetWindow,+  widgetSetReceivesDefault,+  widgetGetReceivesDefault,+#endif+#if GTK_CHECK_VERSION(3,0,0)+  widgetDeviceIsShadowed,+#endif+#if GTK_CHECK_VERSION(3,4,0)+  widgetGetModifierMask,+#endif+#if GTK_CHECK_VERSION(3,0,0)+  widgetSetSupportMultidevice,+  widgetGetSupportMultidevice,+#endif+  widgetSetState,+#if GTK_MAJOR_VERSION < 3+  widgetGetSavedState,+  widgetGetSize,+#endif+  widgetEvent,+#if GTK_CHECK_VERSION(3,0,0)+  widgetGetHAlign,+  widgetSetHAlign,+  widgetGetVAlign,+#if GTK_CHECK_VERSION(3,10,0)+  widgetGetVAlignWithBaseline,+#endif+  widgetSetVAlign,+#endif++-- * Attributes+  widgetName,+  widgetParent,+  widgetWidthRequest,+  widgetHeightRequest,+  widgetMarginLeft,+  widgetMarginRight,+#if GTK_CHECK_VERSION(3,12,0)+  widgetMarginStart,+  widgetMarginEnd,+#endif+  widgetMarginTop,+  widgetMarginBottom,+  widgetVisible,+  widgetOpacity,+  widgetSensitive,+  widgetAppPaintable,+  widgetCanFocus,+  widgetHasFocus,+  widgetIsFocus,+  widgetCanDefault,+  widgetHasDefault,+  widgetReceivesDefault,+  widgetCompositeChild,+  widgetStyle,+  widgetState,+  widgetEvents,+#if GTK_MAJOR_VERSION < 3+  widgetExtensionEvents,+#endif+  widgetExpand,+  widgetHExpand,+  widgetHExpandSet,+  widgetVExpand,+  widgetVExpandSet,+  widgetNoShowAll,+  widgetChildVisible,+#if GTK_MAJOR_VERSION < 3+  widgetColormap,+#endif+  widgetCompositeName,+  widgetDirection,+  widgetTooltipMarkup,+  widgetTooltipText,+  widgetHasTooltip,+#if GTK_CHECK_VERSION(2,20,0)+  widgetHasRcStyle,+  widgetGetRealized,+  widgetGetMapped,+  widgetSetRealized,+  widgetSetMapped,+#endif+#if GTK_CHECK_VERSION(3,0,0)+  widgetGetStyleContext,+#endif++-- * Signals+  realize,+  unrealize,+  mapSignal,+  unmapSignal,+  sizeRequest,+  sizeAllocate,+  showSignal,+  hideSignal,+  focus,+  stateChanged,+#if GTK_CHECK_VERSION(3,0,0)+  stateFlagsChanged,+#endif+  parentSet,+  hierarchyChanged,+  styleSet,+  directionChanged,+  grabNotify,+  popupMenuSignal,+  showHelp,+  accelClosuresChanged,+  screenChanged,+  queryTooltip,+#if GTK_CHECK_VERSION(3,0,0)+  draw,+#endif++-- * Events+  buttonPressEvent,+  buttonReleaseEvent,+  configureEvent,+  deleteEvent,+  destroyEvent,+  enterNotifyEvent,+  exposeEvent,+  focusInEvent,+  focusOutEvent,+#if GTK_CHECK_VERSION(2,8,0)+  grabBrokenEvent,+#endif+  keyPressEvent,+  keyReleaseEvent,+  leaveNotifyEvent,+  mapEvent,+  motionNotifyEvent,+  noExposeEvent,+  proximityInEvent,+  proximityOutEvent,+  scrollEvent,+  unmapEvent,+  visibilityNotifyEvent,+  windowStateEvent,++-- * Deprecated+#ifndef DISABLE_DEPRECATED+  onButtonPress,+  afterButtonPress,+  onButtonRelease,+  afterButtonRelease,+  onClient,+  afterClient,+  onConfigure,+  afterConfigure,+  onDelete,+  afterDelete,+  onDestroyEvent,               -- you probably want onDestroy+  afterDestroyEvent,+  onDirectionChanged,+  afterDirectionChanged,+  onEnterNotify,+  afterEnterNotify,+  onLeaveNotify,+  afterLeaveNotify,+  onExpose,+  afterExpose,+  onExposeRect,+  afterExposeRect,+  onFocus,+  afterFocus,+  onFocusIn,+  afterFocusIn,+  onFocusOut,+  afterFocusOut,+  onGrabFocus,+  afterGrabFocus,+  onDestroy,+  afterDestroy,+  onHide,+  afterHide,+  onHierarchyChanged,+  afterHierarchyChanged,+  onKeyPress,+  afterKeyPress,+  onKeyRelease,+  afterKeyRelease,+  onMnemonicActivate,+  afterMnemonicActivate,+  onMotionNotify,+  afterMotionNotify,+  onParentSet,+  afterParentSet,+  onPopupMenu,+  afterPopupMenu,+  onProximityIn,+  afterProximityIn,+  onProximityOut,+  afterProximityOut,+  onRealize,+  afterRealize,+  onScroll,+  afterScroll,+  onShow,+  afterShow,+  onSizeAllocate,+  afterSizeAllocate,+  onSizeRequest,+  afterSizeRequest,+  onStateChanged,+  afterStateChanged,+  onUnmap,+  afterUnmap,+  onUnrealize,+  afterUnrealize,+  onVisibilityNotify,+  afterVisibilityNotify,+  onWindowState,+  afterWindowState+#endif+  ) where++import Control.Monad    (liftM, unless)+import Data.Maybe       (fromMaybe)+import Control.Monad.Reader (ask)+import Control.Monad.Trans (liftIO)+import System.Glib.FFI+import System.Glib.Flags (fromFlags, toFlags)+#if GTK_CHECK_VERSION(3,0,0)+import System.Glib.GError (failOnGError)+import System.Glib.Flags (Flags)+#endif+import System.Glib.UTFString+import System.Glib.Attributes+import System.Glib.Properties+import System.Glib.GType      (GType)+import System.Glib.GList      (fromGList)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)+import Graphics.UI.Gtk.General.DNDTypes (Atom (Atom), SelectionTag)+{#import Graphics.UI.Gtk.Types#}+{#import Graphics.UI.Gtk.Signals#}+import Graphics.UI.Gtk.Gdk.Enums        (EventMask(..)+#if GTK_MAJOR_VERSION < 3+    , ExtensionMode(..)+#endif+    )+import Graphics.UI.Gtk.Gdk.Keys         (KeyVal)+#if GTK_MAJOR_VERSION < 3+{#import Graphics.UI.Gtk.Gdk.Region#}   (Region(..), makeNewRegion)+{#import Graphics.UI.Gtk.Gdk.Pixmap#} (Bitmap)+#endif+import Graphics.UI.Gtk.General.Structs  (Allocation, Rectangle(..)+                                        ,Requisition(..), Color, IconSize(..)+                                        ,Point+#if !GTK_CHECK_VERSION(2,18,0)+                                        ,widgetGetState+#endif+#if GTK_MAJOR_VERSION < 3+                                        ,widgetGetSavedState+                                        ,widgetGetDrawWindow, widgetGetSize+#endif+                                        )+#ifndef DISABLE_DEPRECATED+import Graphics.UI.Gtk.Gdk.Events       (Event(..), marshalEvent, marshExposeRect)+#endif+import Graphics.UI.Gtk.Gdk.EventM       (EventM,+  EventM,+  EAny,+  EKey,+  EButton,+  EScroll,+  EMotion,+  EExpose,+  EVisibility,+  ECrossing,+  EFocus,+  EConfigure,+  EProperty,+  EProximity,+  EWindowState,+#if GTK_CHECK_VERSION(2,8,0)+  EGrabBroken,+#endif+  )+import Graphics.UI.Gtk.General.Enums    (StateType(..), TextDirection(..),+                                         AccelFlags(..), DirectionType(..), Modifier+#if GTK_CHECK_VERSION(3,0,0)+                                        ,StateFlags(..), Align(..)+#endif+#if GTK_CHECK_VERSION(3,4,0)+                                        ,ModifierIntent(..)+#endif+                                        )+{#import Graphics.Rendering.Pango.Types#}+{#import Graphics.Rendering.Pango.BasicTypes#}  (FontDescription(FontDescription),+                                         PangoLayout(PangoLayout), makeNewPangoString )+import Graphics.UI.Gtk.General.StockItems (StockId)+import Data.IORef ( newIORef )+import Control.Monad.Reader ( runReaderT )+#if GTK_CHECK_VERSION(3,0,0)+import Graphics.Rendering.Cairo.Types (Cairo(..), unCairo, Region(..), withRegion)+import Graphics.Rendering.Cairo.Internal (Render(..))+#endif++{# context lib="gtk" prefix="gtk" #}++--------------------+-- Methods++-- | Flags a widget to be displayed. Any widget that isn't shown will not+-- appear on the screen. If you want to show all the widgets in a container,+-- it's easier to call 'widgetShowAll' on the container, instead of+-- individually showing the widgets.+--+-- Remember that you have to show the containers containing a widget, in+-- addition to the widget itself, before it will appear onscreen.+--+-- When a toplevel container is shown, it is immediately realized and+-- mapped; other shown widgets are realized and mapped when their toplevel+-- container is realized and mapped.+--+widgetShow :: WidgetClass self => self -> IO ()+widgetShow self =+  {# call widget_show #}+    (toWidget self)++-- | Shows a widget. If the widget is an unmapped toplevel widget (i.e. a+-- 'Window' that has not yet been shown), enter the main loop and wait for the+-- window to actually be mapped. Be careful; because the main loop is running,+-- anything can happen during this function.+--+widgetShowNow :: WidgetClass self => self -> IO ()+widgetShowNow self =+  {# call widget_show_now #}+    (toWidget self)++-- | Reverses the effects of 'widgetShow', causing the widget to be hidden+-- (invisible to the user).+--+widgetHide :: WidgetClass self => self -> IO ()+widgetHide self =+  {# call widget_hide #}+    (toWidget self)++-- | Recursively shows a widget, and any child widgets (if the widget is a+-- container).+--+widgetShowAll :: WidgetClass self => self -> IO ()+widgetShowAll self =+  {# call widget_show_all #}+    (toWidget self)++#if GTK_MAJOR_VERSION < 3+-- | Recursively hides a widget and any child widgets.+--+-- Removed in Gtk3.+widgetHideAll :: WidgetClass self => self -> IO ()+widgetHideAll self =+  {# call widget_hide_all #}+    (toWidget self)+#endif++-- | Destroys a widget. Equivalent to+--   'Graphics.UI.Gtk.Abstract.Object.objectDestroy'.+--+-- When a widget is destroyed it will be removed from the screen and+-- unrealized. When a widget is destroyed, it will break any references it+-- holds to other objects.If the widget is inside a container, the widget will+-- be removed from the container. The widget will be garbage collected+-- (finalized) time after your last reference to the widget disappears.+--+-- In most cases, only toplevel widgets (windows) require explicit+-- destruction, because when you destroy a toplevel its children will be+-- destroyed as well.+--+widgetDestroy :: WidgetClass self => self -> IO ()+widgetDestroy self =+  {# call widget_destroy #}+    (toWidget self)++#if GTK_CHECK_VERSION(3,0,0)+-- | Draws widget to @cr@. The top left corner of the widget will be drawn+-- to the currently set origin point of @cr@.+--+-- You should pass a cairo context as cr argument that is in an original+-- state. Otherwise the resulting drawing is undefined. For example changing+-- the operator using 'Graphics.Rendering.Cairo.setOperator' or the line+-- width using 'Graphics.Rendering.Cairo.setLineWidth' might have unwanted+-- side effects. You may however change the context’s transform matrix - like+-- with 'Graphics.Rendering.Cairo.scale', 'Graphics.Rendering.Cairo.translate'+-- or 'Graphics.Rendering.Cairo.setMatrix' and clip region with+-- 'Graphics.Rendering.Cairo.clip' prior to calling this function. Also, it+-- is fine to modify the context with 'Graphics.Rendering.Cairo.save' and+-- 'Graphics.Rendering.Cairo.pushGroup' prior to calling this function.+--+-- Note that special-purpose widgets may contain special code for rendering+-- to the screen and might appear differently on screen and when rendered+-- using 'widgetDraw'.+--+widgetDraw :: WidgetClass self+ => self  -- ^ the widget to draw. It must be drawable (see 'widgetIsDrawable')+          -- and a size must have been allocated.+ -> Cairo -- ^ a cairo context to draw to+ -> IO ()+widgetDraw self cr =+  {# call widget_draw #}+    (toWidget self)+    (castPtr $ unCairo cr)+#endif++-- * Functions to be used with 'Graphics.UI.Gtk.Misc.DrawingArea' or+--   container implementations.++-- | Send a redraw request to a widget. Equivalent to calling+-- 'widgetQueueDrawArea' for the entire area of a widget.+--+widgetQueueDraw :: WidgetClass self => self -> IO ()+widgetQueueDraw self =+  {# call widget_queue_draw #}+    (toWidget self)++-- | This function is only for use in widget implementations. Flags a widget+-- to have its size renegotiated; should be called when a widget for some+-- reason has a new size request. For example, when you change the text in a+-- 'Graphics.UI.Gtk.Display.Label.Label',+-- 'Graphics.UI.Gtk.Display.Label.Label' queues a resize to ensure there's+-- enough space for the new text.+--+widgetQueueResize :: WidgetClass self => self -> IO ()+widgetQueueResize self =+  {# call widget_queue_resize #}+    (toWidget self)++#if GTK_CHECK_VERSION(2,4,0)+-- | This function works like 'widgetQueueResize', except that the widget is+-- not invalidated.+--+-- * Available since Gtk+ version 2.4+--+widgetQueueResizeNoRedraw :: WidgetClass self => self -> IO ()+widgetQueueResizeNoRedraw self =+  {# call widget_queue_resize_no_redraw #}+    (toWidget self)+#endif++#if GTK_CHECK_VERSION(3,8,0)+-- | Obtains the frame clock for a widget. The frame clock is a global “ticker”+-- that can be used to drive animations and repaints. The most common reason to+-- get the frame clock is to call 'frameClockGetFrameTime', in order to get a+-- time to use for animating. For example you might record the start of the+-- animation with an initial value from 'frameClockGetFrameTime', and then+-- update the animation by calling 'frameClockGetFrameTime' again during each+-- repaint.+--+-- 'frameClockRequestPhase' will result in a new frame on the clock, but won’t+-- necessarily repaint any widgets. To repaint a widget, you have to use+-- 'widgetQueueDraw' which invalidates the widget (thus scheduling it to+-- receive a draw on the next frame). 'widgetQueueDraw' will also end up+-- requesting a frame on the appropriate frame clock.+--+-- A widget’s frame clock will not change while the widget is mapped.+-- Reparenting a widget (which implies a temporary unmap) can change the+-- widget’s frame clock.+--+-- Unrealized widgets do not have a frame clock.+--+widgetGetFrameClock :: WidgetClass self => self -> IO FrameClock+widgetGetFrameClock self =+  makeNewGObject mkFrameClock $+  {# call widget_get_frame_clock #}+    (toWidget self)+#endif++#if GTK_CHECK_VERSION(3,10,0)+-- | Retrieves the internal scale factor that maps from window coordinates to+-- the actual device pixels. On traditional systems this is 1, on high density+-- outputs, it can be a higher value (typically 2).+--+-- See 'drawWindowGetScaleFactor'.+--+widgetGetScaleFactor :: WidgetClass self => self -> IO Int+widgetGetScaleFactor self =+  liftM fromIntegral $+  {# call widget_get_scale_factor #}+    (toWidget self)+#endif++-- | This function is typically used when implementing a+-- 'Graphics.UI.Gtk.Abstract.Container.Container' subclass. Obtains the preferred size+-- of a widget. The container uses this information to arrange its child+-- widgets and decide what size allocations to give them with+-- 'widgetSizeAllocate'.+--+-- You can also call this function from an application, with some caveats.+-- Most notably, getting a size request requires the widget to be associated+-- with a screen, because font information may be needed. Multihead-aware+-- applications should keep this in mind.+--+-- Also remember that the size request is not necessarily the size a widget+-- will actually be allocated.+--+widgetSizeRequest :: WidgetClass self => self -> IO Requisition+widgetSizeRequest self = alloca $ \reqPtr -> do+  {#call widget_size_request #} (toWidget self) (castPtr reqPtr)+  peek reqPtr++-- | This function is only for use in widget implementations. Obtains the+-- cached requisition information in the widget, unless someone has forced a+-- particular geometry on the widget (e.g. with 'widgetSetSizeRequest'), in which+-- case it returns that geometry instead of the widget's requisition.+--+-- This function differs from 'widgetSizeRequest' in that it retrieves the+-- last size request value stored in the widget, while 'widgetSizeRequest'+-- actually emits the 'sizeRequest' signal on the widget to compute the size+-- request (which updates the widget's requisition information).+--+-- Since this function does not emit the 'sizeRequest' signal, it can only be+-- used when you know that the widget's requisition is up-to-date, that is,+-- 'widgetSizeRequest' has been called since the last time a resize was+-- queued. In general, only container implementations have this information;+-- applications should use 'widgetSizeRequest'.+--+widgetGetChildRequisition :: WidgetClass self => self -> IO Requisition+widgetGetChildRequisition self = alloca $ \reqPtr -> do+  {#call widget_get_child_requisition #} (toWidget self) (castPtr reqPtr)+  peek reqPtr++-- | This function is only used by+-- 'Graphics.UI.Gtk.Abstract.Container.Container' subclasses, to assign a+-- size and position to their child widgets.+--+widgetSizeAllocate :: WidgetClass self => self+  -> Allocation -- ^ The @x@ and @y@ values of the rectangle determine the+                --   the position of the widget's area relative to its parent+                --   allocation.+  -> IO ()+widgetSizeAllocate self rect = with rect $ \rectPtr ->+  {#call widget_size_allocate#} (toWidget self) (castPtr rectPtr)++#if GTK_CHECK_VERSION(3,10,0)+-- | This function is only used by+-- 'Graphics.UI.Gtk.Abstract.Container.Container' subclasses, to assign a+-- size, position and (optionally) baseline to their child widgets.+--+-- In this function, the allocation and baseline may be adjusted. It will+-- be forced to a 1x1 minimum size, and the adjust_size_allocation virtual+-- and adjust_baseline_allocation methods on the child will be used to adjust+-- the allocation and baseline. Standard adjustments include removing the+-- widget's margins, and applying the widget’s 'widgetHAlign' and+-- 'widgetVAlign' properties.+--+-- If the child widget does not have a valign of AlignBaseline the baseline+-- argument is ignored and -1 is used instead.+--+widgetSizeAllocateWithBaseline :: WidgetClass self => self+  -> Allocation -- ^ The @x@ and @y@ values of the rectangle determine the+                --   the position of the widget's area relative to its parent+                --   allocation.+  -> Int        -- ^ The baseline of the child, or -1+  -> IO ()+widgetSizeAllocateWithBaseline self rect baseline = with rect $ \rectPtr ->+  {#call widget_size_allocate_with_baseline#} (toWidget self) (castPtr rectPtr) (fromIntegral baseline)+#endif++-- %hash c:1e14 d:53c5+-- | Installs an accelerator for this @widget@ in @accelGroup@ that causes+-- @accelSignal@ to be emitted if the accelerator is activated. The+-- @accelGroup@ needs to be added to the widget's toplevel via+-- 'windowAddAccelGroup', and the signal must be of type @G_RUN_ACTION@.+-- Accelerators added through this function are not user changeable during+-- runtime. If you want to support accelerators that can be changed by the+-- user, use 'accelMapAddEntry' and 'widgetSetAccelPath' or+-- 'menuItemSetAccelPath' instead.+--+widgetAddAccelerator :: (WidgetClass self, GlibString string) => self+ -> string         -- ^ @accelSignal@ - widget signal to emit on accelerator+                   -- activation+ -> AccelGroup     -- ^ @accelGroup@ - accel group for this widget, added to+                   -- its toplevel+ -> KeyVal            -- ^ @accelKey@ - the key of the accelerator+ -> [Modifier]     -- ^ @accelMods@ - modifier key combination of the+                   -- accelerator+ -> [AccelFlags]   -- ^ @accelFlags@ - flag accelerators, e.g. 'AccelVisible'+ -> IO ()+widgetAddAccelerator self accelSignal accelGroup accelKey accelMods accelFlags =+  withUTFString accelSignal $ \accelSignalPtr ->+  {# call gtk_widget_add_accelerator #}+    (toWidget self)+    accelSignalPtr+    accelGroup+    (fromIntegral accelKey)+    ((fromIntegral . fromFlags) accelMods)+    ((fromIntegral . fromFlags) accelFlags)++-- %hash c:3442 d:dfe8+-- | Removes an accelerator from @widget@, previously installed with+-- 'widgetAddAccelerator'.+--+widgetRemoveAccelerator :: WidgetClass self => self+ -> AccelGroup     -- ^ @accelGroup@ - accel group for this widget+ -> KeyVal            -- ^ @accelKey@ - the key of the accelerator+ -> [Modifier]     -- ^ @accelMods@ - modifier key combination of the+                   -- accelerator+ -> IO Bool        -- ^ returns whether an accelerator was installed and could+                   -- be removed+widgetRemoveAccelerator self accelGroup accelKey accelMods =+  liftM toBool $+  {# call gtk_widget_remove_accelerator #}+    (toWidget self)+    accelGroup+    (fromIntegral accelKey)+    ((fromIntegral . fromFlags) accelMods)++-- %hash c:f8d4 d:bd7f+-- | Given an accelerator group, @accelGroup@, and an accelerator path,+-- @accelPath@, sets up an accelerator in @accelGroup@ so whenever the key+-- binding that is defined for @accelPath@ is pressed, @widget@ will be+-- activated. This removes any accelerators (for any accelerator group)+-- installed by previous calls to 'widgetSetAccelPath'. Associating+-- accelerators with paths allows them to be modified by the user and the+-- modifications to be saved for future use. (See 'accelMapSave'.)+--+-- This function is a low level function that would most likely be used by a+-- menu creation system like 'ItemFactory'. If you use 'ItemFactory', setting+-- up accelerator paths will be done automatically.+--+-- Even when you you aren't using 'ItemFactory', if you only want to set up+-- accelerators on menu items 'menuItemSetAccelPath' provides a somewhat more+-- convenient interface.+--+widgetSetAccelPath :: (WidgetClass self, GlibString string) => self+ -> string     -- ^ @accelPath@ - path used to look up the accelerator+ -> AccelGroup -- ^ @accelGroup@ - a 'AccelGroup'.+ -> IO ()+widgetSetAccelPath self accelPath accelGroup =+  withUTFString accelPath $ \accelPathPtr ->+  {# call gtk_widget_set_accel_path #}+    (toWidget self)+    accelPathPtr+    accelGroup++#if GTK_CHECK_VERSION(2,4,0)+-- %hash c:157e d:82ae+-- | Determines whether an accelerator that activates the signal identified by+-- @signalId@ can currently be activated. This is done by emitting the+-- 'canActivateAccel' signal on the widget the signal is attached to; if the+-- signal isn't overridden by a handler or in a derived widget, then the+-- default check is that the widget must be sensitive, and the widget and all+-- its ancestors mapped.+--+-- * Available since Gtk+ version 2.4+--+widgetCanActivateAccel :: WidgetClass self =>+ (ConnectId self) -- ^ @signalId@ - the ID of a signal installed on @widget@+ -> IO Bool -- ^ returns @True@ if the accelerator can be activated.+widgetCanActivateAccel (ConnectId signalId self) =+  liftM toBool $+  {# call gtk_widget_can_activate_accel #}+    (toWidget self)+    (fromIntegral signalId)+#endif++-- | For widgets that can be \"activated\" (buttons, menu items, etc.) this+-- function activates them. Activation is what happens when you press Enter on+-- a widget during key navigation. If @widget@ isn't activatable, the function+-- returns @False@.+--+widgetActivate :: WidgetClass self => self+ -> IO Bool -- ^ returns @True@ if the widget was activatable+widgetActivate self =+  liftM toBool $+  {# call widget_activate #}+    (toWidget self)++-- | Computes the intersection of a widget's area and @area@, returning the+-- intersection, and returns @Nothing@ if there was no intersection.+--+widgetIntersect :: WidgetClass self => self+ -> Rectangle -- ^ @area@ - a rectangle+ -> IO (Maybe Rectangle) -- ^ returns the intersection or @Nothing@+widgetIntersect self area =+  with area $ \areaPtr ->+  alloca $ \intersectionPtr -> do+  hasIntersection <- {# call unsafe widget_intersect #}+    (toWidget self)+    (castPtr areaPtr)+    (castPtr intersectionPtr)+  if (toBool hasIntersection)+    then liftM Just $ peek intersectionPtr+    else return Nothing++-- | Check if the widget intersects with a given area.+--+widgetHasIntersection :: WidgetClass self => self+ -> Rectangle -- ^ @area@ - a rectangle+ -> IO Bool   -- ^ returns @True@ if there was an intersection+widgetHasIntersection self area =+  liftM toBool $+  with area $ \areaPtr ->+  {# call unsafe widget_intersect #}+    (toWidget self)+    (castPtr areaPtr)+    (castPtr nullPtr)++-- %hash d:1cab+-- | Determines if the widget is the focus widget within its toplevel. (This+-- does not mean that the 'widgetHasFocus' attribute is necessarily set;+-- 'widgetHasFocus' will only be set if the toplevel widget additionally has+-- the global input focus.)+--+widgetGetIsFocus :: WidgetClass self => self+ -> IO Bool -- ^ returns @True@ if the widget is the focus widget.+widgetGetIsFocus self =+  liftM toBool $+  {# call unsafe widget_is_focus #}+    (toWidget self)++-- %hash d:e1e+-- | Causes @widget@ to have the keyboard focus for the 'Window' it's inside.+-- @widget@ must be a focusable widget, such as a+-- 'Graphics.UI.Gtk.Entry.Entry'; something like+-- 'Graphics.UI.Gtk.Ornaments.Frame' won't work. (More precisely, it must have+-- the 'widgetCanFocus' flag set.)+--+widgetGrabFocus :: WidgetClass self => self -> IO ()+widgetGrabFocus self =+  {# call widget_grab_focus #}+    (toWidget self)++-- %hash c:e5e9 d:412a+-- | Causes @widget@ to become the default widget. @widget@ must have the+-- 'canDefault' flag set. The default widget is+-- activated when the user presses Enter in a window. Default widgets must be+-- activatable, that is, 'widgetActivate' should affect them.+--+widgetGrabDefault :: WidgetClass self => self -> IO ()+widgetGrabDefault self =+  {# call gtk_widget_grab_default #}+    (toWidget self)++-- %hash c:4f62 d:d05a+-- | Widgets can be named, which allows you to refer to them from a gtkrc+-- file. You can apply a style to widgets with a particular name in the gtkrc+-- file. See the documentation for gtkrc files.+--+-- Note that widget names are separated by periods in paths (see+-- 'widgetPath'), so names with embedded periods may cause confusion.+--+widgetSetName :: (WidgetClass self, GlibString string) => self+ -> string -- ^ @name@ - name for the widget+ -> IO ()+widgetSetName self name =+  withUTFString name $ \namePtr ->+  {# call widget_set_name #}+    (toWidget self)+    namePtr++-- | Retrieves the name of a widget. See 'widgetSetName' for the significance+-- of widget names.+--+widgetGetName :: (WidgetClass self, GlibString string) => self -> IO string+widgetGetName self =+  {# call unsafe widget_get_name #}+    (toWidget self)+  >>= peekUTFString++-- %hash c:25b1 d:f898+-- | Sets the sensitivity of a widget. A widget is sensitive if the user can+-- interact with it. Insensitive widgets are \"grayed out\" and the user can't+-- interact with them. Insensitive widgets are known as \"inactive\",+-- \"disabled\", or \"ghosted\" in some other toolkits.+--+widgetSetSensitive :: WidgetClass self => self+ -> Bool -- ^ @sensitive@ - @True@ to make the widget sensitive+ -> IO ()+widgetSetSensitive self sensitive =+  {# call gtk_widget_set_sensitive #}+    (toWidget self)+    (fromBool sensitive)++-- bad spelling backwards compatibility definition+widgetSetSensitivity :: WidgetClass self => self -> Bool -> IO ()+widgetSetSensitivity = widgetSetSensitive++-- | Gets the widget's parent window.+--+widgetGetParentWindow :: WidgetClass self => self -> IO DrawWindow+widgetGetParentWindow self =+  makeNewGObject mkDrawWindow $+  {# call gtk_widget_get_parent_window #}+    (toWidget self)++-- | Disable event signals.+--+-- * Remove events from the 'EventMask' of this widget. The event mask+--   determines which events a widget will receive. Events are signals+--   that return an 'Event' data type. On connecting to a such a signal,+--   the event mask is automatically adjusted so that he signal is emitted.+--   This function is useful to disable the reception of the signal. It+--   should be called whenever all signals receiving an 'Event'+--   have been disconnected.+--+widgetDelEvents :: WidgetClass self => self -> [EventMask] -> IO ()+widgetDelEvents self events = do+  mask <- {#call unsafe widget_get_events#} (toWidget self)+  let mask' = mask .&. (complement (fromIntegral $ fromFlags events))+  {#call unsafe widget_set_events#} (toWidget self) mask'++-- | Enable event signals.+--+-- * See 'widgetDelEvents'.+--+widgetAddEvents :: WidgetClass self => self -> [EventMask] -> IO ()+widgetAddEvents self [] = return ()+ -- special [] case to work around a GTK+ bug, see:+ -- http://bugzilla.gnome.org/show_bug.cgi?id=316702+widgetAddEvents self events =+  {# call unsafe widget_add_events #}+    (toWidget self)+    (fromIntegral $ fromFlags events)++-- | Get enabled event signals.+--+-- * See 'widgetDelEvents'.+--+widgetGetEvents :: WidgetClass self => self -> IO [EventMask]+widgetGetEvents self =+  liftM (toFlags . fromIntegral) $+  {# call unsafe widget_get_events #}+    (toWidget self)++-- %hash c:468a d:49a0+-- | Sets the event mask (see 'EventMask') for a widget. The event mask+-- determines which events a widget will receive. Keep in mind that different+-- widgets have different default event masks, and by changing the event mask+-- you may disrupt a widget's functionality, so be careful. This function must+-- be called while a widget is unrealized. Consider 'widgetAddEvents' for+-- widgets that are already realized, or if you want to preserve the existing+-- event mask. This function can't be used with 'NoWindow' widgets; to get+-- events on those widgets, place them inside a+-- 'Graphics.UI.Gtk.Misc.EventBox' and receive events on the event box.+--+widgetSetEvents :: WidgetClass self => self+ -> [EventMask] -- ^ @events@ - event mask+ -> IO ()+widgetSetEvents self events =+  {# call unsafe widget_set_events #}+    (toWidget self)+    (fromIntegral $ fromFlags events)++#if GTK_MAJOR_VERSION < 3+-- %hash c:4f2c d:781+-- | Sets the extension events mask to @mode@. See 'ExtensionMode' and+-- 'inputSetExtensionEvents'.+--+widgetSetExtensionEvents :: WidgetClass self => self+ -> [ExtensionMode]+ -> IO ()+widgetSetExtensionEvents self mode =+  {# call widget_set_extension_events #}+    (toWidget self)+    ((fromIntegral . fromFlags) mode)++-- %hash c:c824 d:e611+-- | Retrieves the extension events the widget will receive; see+-- 'widgetSetExtensionEvents'.+--+widgetGetExtensionEvents :: WidgetClass self => self+ -> IO [ExtensionMode]+widgetGetExtensionEvents self =+  liftM (toFlags . fromIntegral) $+  {# call widget_get_extension_events #}+    (toWidget self)+#endif++-- %hash c:270b d:8877+-- | This function returns the topmost widget in the container hierarchy+-- @widget@ is a part of. If @widget@ has no parent widgets, it will be+-- returned as the topmost widget.+--+widgetGetToplevel :: WidgetClass self =>+    self      -- ^ @widget@ - the widget in question+ -> IO Widget -- ^ returns the topmost ancestor of @widget@, or @widget@+              -- itself if there's no ancestor.+widgetGetToplevel self =+  makeNewObject mkWidget $+  {# call unsafe widget_get_toplevel #}+    (toWidget self)++-- %hash c:17bc d:f8f9+-- | Gets the first ancestor of @widget@ with type @widgetType@. For example,+-- @widgetGetAncestor widget gTypeBox@ gets the first 'Box' that's+-- an ancestor of @widget@.  See note about checking for a toplevel+-- 'Window' in the docs for 'widgetGetToplevel'.+--+-- Note that unlike 'widgetIsAncestor', 'widgetGetAncestor' considers+-- @widget@ to be an ancestor of itself.+--+widgetGetAncestor :: WidgetClass self => self+ -> GType -- ^ @widgetType@ - ancestor type+ -> IO (Maybe Widget) -- ^ returns the ancestor widget, or @Nothing@ if not found+widgetGetAncestor self widgetType = do+  ptr <- {# call gtk_widget_get_ancestor #}+    (toWidget self)+    widgetType+  if ptr==nullPtr then return Nothing else+    liftM Just $ makeNewObject mkWidget (return ptr)++#if GTK_MAJOR_VERSION < 3+-- %hash c:bd95 d:eb94+-- | Gets the colormap that will be used to render @widget@.+--+widgetGetColormap :: WidgetClass self => self+ -> IO Colormap -- ^ returns the colormap used by @widget@+widgetGetColormap self =+  makeNewGObject mkColormap $+  {# call gtk_widget_get_colormap #}+    (toWidget self)++-- %hash c:cba1 d:ffeb+-- | Sets the colormap for the widget to the given value. Widget must not have+-- been previously realized. This probably should only be used from an 'init'+-- function (i.e. from the constructor for the widget).+--+widgetSetColormap :: WidgetClass self => self+ -> Colormap -- ^ @colormap@ - a colormap+ -> IO ()+widgetSetColormap self colormap =+  {# call gtk_widget_set_colormap #}+    (toWidget self)+    colormap+#endif++-- %hash c:3522 d:5637+-- | Obtains the location of the mouse pointer in widget coordinates. Widget+-- coordinates are a bit odd; for historical reasons, they are defined as+-- 'widgetGetParentWindow' coordinates for widgets that are not 'NoWindow' widgets,+-- and are relative to the widget's allocation's (x,y) for+-- widgets that are 'NoWindow' widgets.+--+widgetGetPointer :: WidgetClass self => self+ -> IO (Int, Int) -- ^ @(x, y)@ - X Y coordinate+widgetGetPointer self =+  alloca $ \xPtr ->+  alloca $ \yPtr ->+  {# call gtk_widget_get_pointer #}+    (toWidget self)+    xPtr+    yPtr+  >>+  peek xPtr >>= \x ->+  peek yPtr >>= \y ->+  return (fromIntegral x, fromIntegral y)++-- %hash c:499d+-- | Determines whether @widget@ is somewhere inside @ancestor@, possibly with+-- intermediate containers.+--+widgetIsAncestor :: (WidgetClass self, WidgetClass ancestor) =>+    self     -- ^ @widget@ - the widget in question+ -> ancestor -- ^ @ancestor@ - another 'Widget'+ -> IO Bool  -- ^ returns @True@ if @ancestor@ contains @widget@ as a child,+             -- grandchild, great grandchild, etc.+widgetIsAncestor self ancestor =+  liftM toBool $+  {# call unsafe widget_is_ancestor #}+    (toWidget self)+    (toWidget ancestor)++-- %hash c:8661+-- | Translate coordinates relative to @srcWidget@'s allocation to coordinates+-- relative to @destWidget@'s allocations. In order to perform this operation,+-- both widgets must be realized, and must share a common toplevel.+--+widgetTranslateCoordinates :: (WidgetClass self, WidgetClass destWidget) =>+    self                -- ^ @srcWidget@ - a 'Widget'+ -> destWidget          -- ^ @destWidget@ - a 'Widget'+ -> Int                 -- ^ @srcX@ - X position relative to @srcWidget@+ -> Int                 -- ^ @srcY@ - Y position relative to @srcWidget@+ -> IO (Maybe (Int, Int)) -- ^ @Just (destX, destY)@ - X and Y position+                        -- relative to @destWidget@. Returns @Nothing@ if+                        -- either widget was not realized, or there was no+                        -- common ancestor.+widgetTranslateCoordinates self destWidget srcX srcY =+  alloca $ \destXPtr ->+  alloca $ \destYPtr -> do+  worked <- {# call gtk_widget_translate_coordinates #}+    (toWidget self)+    (toWidget destWidget)+    (fromIntegral srcX)+    (fromIntegral srcY)+    destXPtr+    destYPtr+  if (toBool worked)+    then do destX <- peek destXPtr+            destY <- peek destYPtr+            return (Just (fromIntegral destX, fromIntegral destY))+    else return Nothing++-- %hash c:596c d:b7e5+-- | Sets the 'Style' for a widget. You probably don't want+-- to use this function; it interacts badly with themes, because themes work by+-- replacing the 'Style'. Instead, use 'widgetModifyStyle'.+--+widgetSetStyle :: WidgetClass self => self+ -> Maybe Style -- ^ @style@ - a 'Style', or @Nothing@ to remove the effect of a previous+           -- 'widgetSetStyle' and go back to the default style+ -> IO ()+widgetSetStyle self style =+  {# call gtk_widget_set_style #}+    (toWidget self)+    (fromMaybe (Style nullForeignPtr) style)++-- | Retrieve the 'Style' associated with the widget.+--+widgetGetStyle :: WidgetClass widget => widget -> IO Style+widgetGetStyle widget = do+  {# call gtk_widget_ensure_style #} (toWidget widget)+  makeNewGObject mkStyle $ {# call gtk_widget_get_style #} (toWidget widget)++#if GTK_MAJOR_VERSION < 3+-- %hash c:d5ed d:dc10+-- | Pushes @cmap@ onto a global stack of colormaps; the topmost colormap on+-- the stack will be used to create all widgets. Remove @cmap@ with+-- 'widgetPopColormap'. There's little reason to use this function.+--+widgetPushColormap ::+    Colormap -- ^ @cmap@ - a 'Colormap'+ -> IO ()+widgetPushColormap cmap =+  {# call gtk_widget_push_colormap #}+    cmap++-- %hash c:7300 d:2920+-- | Removes a colormap pushed with 'widgetPushColormap'.+--+widgetPopColormap :: IO ()+widgetPopColormap =+  {# call gtk_widget_pop_colormap #}++-- %hash c:1f73 d:590e+-- | Sets the default colormap to use when creating widgets.+-- 'widgetPushColormap' is a better function to use if you only want to affect+-- a few widgets, rather than all widgets.+--+widgetSetDefaultColormap ::+    Colormap -- ^ @colormap@ - a 'Colormap'+ -> IO ()+widgetSetDefaultColormap colormap =+  {# call gtk_widget_set_default_colormap #}+    colormap+#endif++-- %hash c:e71b d:72c2+-- | Returns the default style used by all widgets initially.+--+widgetGetDefaultStyle ::+    IO Style -- ^ returns the default style. This 'Style' object is owned by+             -- Gtk and should not be modified.+widgetGetDefaultStyle =+  makeNewGObject mkStyle $+  {# call gtk_widget_get_default_style #}++#if GTK_MAJOR_VERSION < 3+-- %hash c:d731 d:52bf+-- | Obtains the default colormap used to create widgets.+--+widgetGetDefaultColormap ::+    IO Colormap -- ^ returns default widget colormap+widgetGetDefaultColormap =+  makeNewGObject mkColormap $+  {# call gtk_widget_get_default_colormap #}+#endif++-- | Sets the reading direction on a particular widget. This direction+-- controls the primary direction for widgets containing text, and also the+-- direction in which the children of a container are packed. The ability to+-- set the direction is present in order so that correct localization into+-- languages with right-to-left reading directions can be done. Generally,+-- applications will let the default reading direction present, except for+-- containers where the containers are arranged in an order that is explicitly+-- visual rather than logical (such as buttons for text justification).+--+-- If the direction is set to 'TextDirNone', then the value set by+-- 'widgetSetDefaultDirection' will be used.+--+widgetSetDirection :: WidgetClass self => self -> TextDirection -> IO ()+widgetSetDirection self dir =+  {# call widget_set_direction #}+    (toWidget self)+    ((fromIntegral . fromEnum) dir)++-- | Gets the reading direction for a particular widget. See+-- 'widgetSetDirection'.+--+widgetGetDirection :: WidgetClass self => self -> IO TextDirection+widgetGetDirection self =+  liftM (toEnum . fromIntegral) $+  {# call widget_get_direction #}+    (toWidget self)++-- %hash c:ff9a+-- | Sets the default reading direction for widgets where the direction has+-- not been explicitly set by 'widgetSetDirection'.+--+widgetSetDefaultDirection ::+    TextDirection -- ^ @dir@ - the new default direction. This cannot be+                  -- 'TextDirNone'.+ -> IO ()+widgetSetDefaultDirection dir =+  {# call gtk_widget_set_default_direction #}+    ((fromIntegral . fromEnum) dir)++-- | Obtains the current default reading direction. See+-- 'widgetSetDefaultDirection'.+--+widgetGetDefaultDirection :: IO TextDirection+widgetGetDefaultDirection =+  liftM (toEnum . fromIntegral) $+  {# call gtk_widget_get_default_direction #}++#if GTK_MAJOR_VERSION < 3+-- %hash c:c7ba d:3a9c+-- | Sets a shape for this widget's 'DrawWindow'. This allows for transparent+-- windows etc., see 'windowShapeCombineMask' for more information.+--+widgetShapeCombineMask :: WidgetClass self => self+ -> Maybe Bitmap -- ^ @shapeMask@ - shape to be added, or @Nothint@ to remove an+            -- existing shape.+ -> Int    -- ^ @offsetX@ - X position of shape mask with respect to @window@.+ -> Int    -- ^ @offsetY@ - Y position of shape mask with respect to @window@.+ -> IO ()+widgetShapeCombineMask self shapeMask offsetX offsetY =+  case (fromMaybe (Pixmap nullForeignPtr) shapeMask) of+    Pixmap fPtr -> withForeignPtr fPtr $ \bitmapPtr ->+      {# call gtk_widget_shape_combine_mask #}+        (toWidget self)+        (castPtr bitmapPtr)+        (fromIntegral offsetX)+        (fromIntegral offsetY)+#endif++#if GTK_MAJOR_VERSION < 3+#if GTK_CHECK_VERSION(2,10,0)+-- %hash c:3c29 d:68e2+-- | Sets an input shape for this widget's GDK window. This allows for windows+-- which react to mouse click in a nonrectangular region, see+-- 'windowInputShapeCombineMask' for more information.+--+-- * Available since Gtk+ version 2.10+--+widgetInputShapeCombineMask :: WidgetClass self => self+ -> Maybe Bitmap -- ^ @shapeMask@ - shape to be added, or @Nothint@ to remove an+            -- existing shape.+ -> Int    -- ^ @offsetX@ - X position of shape mask with respect to @window@.+ -> Int    -- ^ @offsetY@ - Y position of shape mask with respect to @window@.+ -> IO ()+widgetInputShapeCombineMask self shapeMask offsetX offsetY =+  case (fromMaybe (Pixmap nullForeignPtr) shapeMask) of+    Pixmap fPtr -> withForeignPtr fPtr $ \bitmapPtr ->+      {# call gtk_widget_input_shape_combine_mask #}+        (toWidget self)+        (castPtr bitmapPtr)+        (fromIntegral offsetX)+        (fromIntegral offsetY)+#endif+#endif++#if GTK_CHECK_VERSION(3,0,0)+-- | Sets a shape for this widget’s GDK window. This allows for transparent+-- windows etc., see 'drawWindowShapeCombineRegion' for more information.+widgetShapeCombineRegion :: WidgetClass self => self+ -> Maybe Region+ -> IO ()+widgetShapeCombineRegion self region =+  withRegion (fromMaybe (Region nullForeignPtr) region) $ \ptrRegion ->+  {# call gtk_widget_shape_combine_region #}+    (toWidget self)+    (castPtr ptrRegion)++-- | Sets an input shape for this widget’s GDK window. This allows for windows+-- which react to mouse click in a nonrectangular region,+-- see 'drawWindowInputShapeCombineRegion' for more information.+widgetInputShapeCombineRegion :: WidgetClass self => self+ -> Maybe Region+ -> IO ()+widgetInputShapeCombineRegion self region =+  withRegion (fromMaybe (Region nullForeignPtr) region) $ \ptrRegion ->+  {# call gtk_widget_input_shape_combine_region #}+    (toWidget self)+    (castPtr ptrRegion)+#endif++#if GTK_MAJOR_VERSION < 3+#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+-- independent 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 (wrapNewGObject mkPixmap) $+  with clipRect $ \ clipRectPtr ->+  {#call gtk_widget_get_snapshot #}+     (toWidget widget)+     (castPtr clipRectPtr)+#endif+#endif++-- %hash c:7e36 d:616f+-- | Obtains the full path to @widget@. The path is simply the name of a+-- widget and all its parents in the container hierarchy, separated by periods.+-- The name of a widget comes from 'widgetGetName'. Paths are used to apply+-- styles to a widget in gtkrc configuration files. Widget names are the type+-- of the widget by default (e.g. \"GtkButton\") or can be set to an+-- application-specific value with 'widgetSetName'. By setting the name of a+-- widget, you allow users or theme authors to apply styles to that specific+-- widget in their gtkrc file. Also returns the path in reverse+-- order, i.e. starting with the widget's name instead of starting with the+-- name of the widget's outermost ancestor.+--+widgetPath :: (WidgetClass self, GlibString string) => self+ -> IO (Int, string, string) -- ^ @(pathLength, path, pathReversed)@ - length+                             -- of the path, path string and reverse path+                             -- string+widgetPath self =+  alloca $ \pathLengthPtr ->+  alloca $ \pathPtr ->+  alloca $ \pathReversedPtr ->+  {# call gtk_widget_path #}+    (toWidget self)+    pathLengthPtr+    pathPtr+    pathReversedPtr+  >>+  peek pathLengthPtr >>= \pathLength ->+  peek pathPtr >>= readUTFString >>= \path ->+  peek pathReversedPtr >>= readUTFString >>= \pathReversed ->+  return (fromIntegral pathLength, path, pathReversed)++-- %hash c:d4a6+-- | Same as 'widgetPath', but always uses the name of a widget's type, never+-- uses a custom name set with 'widgetSetName'.+--+widgetClassPath :: (WidgetClass self, GlibString string) => self+ -> IO (Int, string, string) -- ^ @(pathLength, path, pathReversed)@ - length+                             -- of the path, path string and reverse path+                             -- string+widgetClassPath self =+  alloca $ \pathLengthPtr ->+  alloca $ \pathPtr ->+  alloca $ \pathReversedPtr ->+  {# call gtk_widget_class_path #}+    (toWidget self)+    pathLengthPtr+    pathPtr+    pathReversedPtr+  >>+  peek pathLengthPtr >>= \pathLength ->+  peek pathPtr >>= readUTFString >>= \path ->+  peek pathReversedPtr >>= readUTFString >>= \pathReversed ->+  return (fromIntegral pathLength, path, pathReversed)++-- %hash c:769e+-- | Obtains the composite name of a widget.+--+widgetGetCompositeName :: (WidgetClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns the composite name of @widget@, or+                      -- @Nothing@ if @widget@ is not a composite child.+widgetGetCompositeName self =+  {# call gtk_widget_get_composite_name #}+    (toWidget self)+  >>= maybePeek peekUTFString++#if GTK_CHECK_VERSION(3,0,0)+-- | Sets the background color to use for a widget.+--+-- All other style values are left untouched. See 'widgetOverrideColor'.+widgetOverrideBackgroundColor :: WidgetClass self => self+ -> StateType   -- ^ @state@ - the state for which to set the background color.+ -> Maybe Color -- ^ @color@ - the color to assign, or Nothing to undo the+                -- effect of previous calls to 'widgetOverrideBackgroundColor'+ -> IO ()+widgetOverrideBackgroundColor self state color =+  maybeWith with color $ \colorPtr ->+  {# call widget_override_background_color #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    (castPtr colorPtr)++-- | Sets the color to use for a widget.+--+-- All other style values are left untouched.+--+-- This function does not act recursively. Setting the color of a container+-- does not affect its children. Note that some widgets that you may not think+-- of as containers, for instance 'Button's, are actually containers.+--+-- This API is mostly meant as a quick way for applications to change a+-- widget appearance. If you are developing a widgets library and intend this+-- change to be themeable, it is better done by setting meaningful CSS classes+-- and regions in your widget/container implementation through+-- 'styleContextAddClass' and 'styleContextAddRegion'.+--+-- This way, your widget library can install a 'CssProvider' with the+-- GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority in order to provide a default+-- styling for those widgets that need so, and this theming may fully overridden+-- by the user’s theme.+--+-- Note that for complex widgets this may bring in undesired results (such as+-- uniform background color everywhere), in these cases it is better to fully+-- style such widgets through a CssProvider with the+-- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION priority.+widgetOverrideColor :: WidgetClass self => self+ -> StateType   -- ^ @state@ - the state for which to set the color.+ -> Maybe Color -- ^ @color@ - the color to assign, or @Nothing@ to undo the+                -- effect of previous calls to 'widgetOverrideColor'+ -> IO ()+widgetOverrideColor self state color =+  maybeWith with color $ \colorPtr ->+  {# call widget_override_color #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    (castPtr colorPtr)++-- | Sets the font to use for a widget. All other style values are left untouched.+-- See 'widgetOverrideColor'.+widgetOverrideFont :: WidgetClass self => self+ -> Maybe FontDescription -- ^ @fontDesc@ - the font description to use, or+                          -- @Nothing@ to undo the effect of previous calls to+                          -- 'widgetOverrideFont'.+ -> IO ()+widgetOverrideFont self fontDesc =+  {# call widget_override_font #}+    (toWidget self)+    (fromMaybe (FontDescription nullForeignPtr) fontDesc)++-- | Sets the symbolic color to use for a widget.+--+-- All other style values are left untouched. See 'widgetOverrideColor'.+widgetOverrideSymbolicColor :: (WidgetClass self, GlibString string) => self+ -> string      -- ^ @name@ - the name of the symbolic color to modify.+ -> Maybe Color -- ^ @color@ - the color to assign, or @Nothing@ to undo the+                -- effect of previous calls to 'widgetOverrideSymbolicColor'+ -> IO ()+widgetOverrideSymbolicColor self name color =+  withUTFString name $ \namePtr ->+  maybeWith with color $ \colorPtr ->+  {# call widget_override_symbolic_color #}+    (toWidget self)+    namePtr+    (castPtr colorPtr)++-- | Sets the cursor color to use in a widget, overriding the cursor-color+-- and secondary-cursor-color style properties. All other style values are+-- left untouched. See also 'widgetModifyStyle'.+--+-- Note that the alpha values will be ignored.+widgetOverrideCursor :: WidgetClass self => self+ -> Maybe Color -- ^ @cursor@ - the color to use for primary cursor, or @Nothing@+                -- to undo the effect of previous calls to of 'widgetOverrideCursor'.+ -> Maybe Color -- ^ @secondaryCursor@ - the color to use for secondary cursor, or @Nothing@+                -- to undo the effect of previous calls to of 'widgetOverrideCursor'.+ -> IO ()+widgetOverrideCursor self cursor secondaryCursor =+  maybeWith with cursor $ \cursorPtr ->+  maybeWith with secondaryCursor $ \secondaryCursorPtr ->+  {# call widget_override_cursor #}+    (toWidget self)+    (castPtr cursorPtr)+    (castPtr secondaryCursorPtr)+#endif++-- | Modifies style values on the widget. Modifications made using this+-- technique take precedence over style values set via an RC file, however,+-- they will be overridden if a style is explicitly set on the widget using+-- 'widgetSetStyle'. The 'RcStyle' structure is designed so each field can+-- either be set or unset, so it is possible, using this function, to modify+-- some style values and leave the others unchanged.+--+-- Note that modifications made with this function are not cumulative with+-- previous calls to 'widgetModifyStyle' or with such functions as+-- 'widgetModifyFg'. If you wish to retain previous values, you must first call+-- 'widgetGetModifierStyle', make your modifications to the returned style,+-- then call 'widgetModifyStyle' with that style. On the other hand, if you+-- first call 'widgetModifyStyle', subsequent calls to such functions+-- 'widgetModifyFg' will have a cumulative effect with the initial+-- modifications.+--+widgetModifyStyle :: (WidgetClass self, RcStyleClass style) => self+ -> style -- ^ @style@ - the 'RcStyle' holding the style modifications+ -> IO ()+widgetModifyStyle self style =+  {# call gtk_widget_modify_style #}+    (toWidget self)+    (toRcStyle style)++-- | Returns the current modifier style for the widget. (As set by+-- 'widgetModifyStyle'.) If no style has previously set, a new 'RcStyle' will+-- be created with all values unset, and set as the modifier style for the+-- widget. If you make changes to this rc style, you must call+-- 'widgetModifyStyle', passing in the returned rc style, to make sure that+-- your changes take effect.+--+-- Caution: passing the style back to 'widgetModifyStyle' will normally end+-- up destroying it, because 'widgetModifyStyle' copies the passed-in style and+-- sets the copy as the new modifier style, thus dropping any reference to the+-- old modifier styl e. Add a reference to the modifier style if you want to+-- keep it alive.+--+widgetGetModifierStyle :: WidgetClass self => self -> IO RcStyle+widgetGetModifierStyle self =+  makeNewGObject mkRcStyle $+  {# call gtk_widget_get_modifier_style #}+    (toWidget self)++-- %hash c:5550+-- | Sets the foreground color for a widget in a particular state. All other+-- style values are left untouched. See also 'widgetModifyStyle'.+--+widgetModifyFg :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to set the foreground color.+ -> Color     -- ^ @color@ - the color to assign (does not need to be+              -- allocated)+ -> IO ()+widgetModifyFg self state color =+  with color $ \colorPtr ->+  {# call gtk_widget_modify_fg #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    (castPtr colorPtr)++-- | Restores the foreground color for a widget in a particular state. This+-- undoes the effects of previous calls to `widgetModifyFg'.+--+widgetRestoreFg :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to restore the foreground color.+ -> IO ()+widgetRestoreFg self state =+  {# call gtk_widget_modify_fg #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    nullPtr++-- %hash c:2c5+-- | Sets the background color for a widget in a particular state. All other+-- style values are left untouched. See also 'widgetModifyStyle'.+--+-- Note that \"no window\" widgets (which have the 'NoWindow' flag set) draw+-- on their parent container's window and thus may not draw any background+-- themselves. This is the case for e.g. 'Label'. To modify the background of+-- such widgets, you have to set the background color on their parent; if you+-- want to set the background of a rectangular area around a label, try placing+-- the label in a 'EventBox' widget and setting the background color on that.+--+widgetModifyBg :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to set the background color.+ -> Color     -- ^ @color@ - the color to assign (does not need to be+              -- allocated).+ -> IO ()+widgetModifyBg self state color =+  with color $ \colorPtr ->+  {# call gtk_widget_modify_bg #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    (castPtr colorPtr)++-- | Restores the background color for a widget in a particular state. This+-- undoes the effects of previous calls to `widgetModifyBg'.+--+widgetRestoreBg :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to restore the background color.+ -> IO ()+widgetRestoreBg self state =+  {# call gtk_widget_modify_bg #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    nullPtr++-- %hash c:d2ba+-- | Sets the text color for a widget in a particular state. All other style+-- values are left untouched. The text color is the foreground color used along+-- with the base color (see 'widgetModifyBase') for widgets such as 'Entry' and+-- 'TextView'. See also 'widgetModifyStyle'.+--+widgetModifyText :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to set the text color.+ -> Color     -- ^ @color@ - the color to assign (does not need to be+              -- allocated).+ -> IO ()+widgetModifyText self state color =+  with color $ \colorPtr ->+  {# call gtk_widget_modify_text #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    (castPtr colorPtr)++-- | Restores the text color for a widget in a particular state. This+-- undoes the effects of previous calls to `widgetModifyText'.+--+widgetRestoreText :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to restore the text color.+ -> IO ()+widgetRestoreText self state =+  {# call gtk_widget_modify_text #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    nullPtr++-- %hash c:ac08+-- | Sets the base color for a widget in a particular state. All other style+-- values are left untouched. The base color is the background color used along+-- with the text color (see 'widgetModifyText') for widgets such as 'Entry' and+-- 'TextView'. See also 'widgetModifyStyle'.+--+-- Note that \"no window\" widgets (which have the 'NoWindow' flag set) draw+-- on their parent container's window and thus may not draw any background+-- themselves. This is the case for e.g. 'Label'. To modify the background of+-- such widgets, you have to set the base color on their parent; if you want to+-- set the background of a rectangular area around a label, try placing the+-- label in a 'EventBox' widget and setting the base color on that.+--+widgetModifyBase :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to set the base color.+ -> Color     -- ^ @color@ - the color to assign (does not need to be+              -- allocated).+ -> IO ()+widgetModifyBase self state color =+  with color $ \colorPtr ->+  {# call gtk_widget_modify_base #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    (castPtr colorPtr)++-- | Restores the base color for a widget in a particular state. This undoes+-- the effects of previous calls to widgetModifyBase.+--+widgetRestoreBase :: WidgetClass self => self+ -> StateType -- ^ @state@ - the state for which to restore the base color.+ -> IO ()+widgetRestoreBase self state =+  {# call gtk_widget_modify_base #}+    (toWidget self)+    ((fromIntegral . fromEnum) state)+    nullPtr+++-- %hash c:38d7+-- | Sets the font to use for a widget. All other style values are left+-- untouched. See also 'widgetModifyStyle'.+--+widgetModifyFont :: WidgetClass self => self+ -> Maybe FontDescription -- ^ @fontDesc@ - the font description to use, or+                          -- @Nothing@ to undo the effect of previous calls to+                          -- 'widgetModifyFont'.+ -> IO ()+widgetModifyFont self fontDesc =+  {# call gtk_widget_modify_font #}+    (toWidget self)+    (fromMaybe (FontDescription nullForeignPtr) fontDesc)++-- | Creates a new 'PangoContext' with the appropriate colormap, font description,+-- and base direction for drawing text for this widget. See also+-- 'widgetGetPangoContext'.+--+widgetCreatePangoContext :: WidgetClass self => self+ -> IO PangoContext -- ^ returns the new 'PangoContext'+widgetCreatePangoContext self =+  wrapNewGObject mkPangoContext $+  {# call gtk_widget_create_pango_context #}+    (toWidget self)++-- | Gets a 'PangoContext' with the appropriate font description and base+-- direction for this widget. Unlike the context returned by+-- 'widgetCreatePangoContext', this context is owned by the widget (it can be+-- used until the screen for the widget changes or the widget is removed from+-- its toplevel), and will be updated to match any changes to the widget's+-- attributes.+--+-- If you create and keep a 'PangoLayout' using this context, you must deal+-- with changes to the context by calling+-- 'layoutContextChanged' on the layout+-- in response to the 'onStyleChanged' and 'onDirectionChanged' signals for the+-- widget.+--+widgetGetPangoContext :: WidgetClass self => self+ -> IO PangoContext -- ^ returns the 'PangoContext' for the widget.+widgetGetPangoContext self =+  makeNewGObject mkPangoContext $+  {# call gtk_widget_get_pango_context #}+    (toWidget self)++-- | Prepare text for display.+--+-- The 'PangoLayout' represents the rendered text. It can be shown on screen+-- by calling 'drawLayout'.+--+-- The returned 'PangoLayout' shares the same font information ('PangoContext') as this+-- widget. If this information changes, the 'PangoLayout' should change. The+-- following code ensures that the displayed text always reflects the widget's+-- settings:+--+-- > l <- widgetCreateLayout w "My Text."+-- > let update = do+-- >                layoutContextChanged l+-- >                -- update the Drawables which show this layout+-- > w `onDirectionChanged` update+-- > w `onStyleChanged` update+--+widgetCreateLayout :: (WidgetClass self, GlibString string) => self+ -> string    -- ^ @text@ - text to set on the layout+ -> IO PangoLayout+widgetCreateLayout self text = do+  pl <- wrapNewGObject mkPangoLayoutRaw $+    withUTFString text $ \textPtr ->+    {# call unsafe widget_create_pango_layout #}+      (toWidget self)+      textPtr+  ps <- makeNewPangoString text+  psRef <- newIORef ps+  return (PangoLayout psRef pl)++-- %hash c:cee d:1d29+-- | A convenience function that uses the theme engine and RC file settings+-- for @widget@ to look up the stock icon and render it to a+-- 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf'.+-- The icon should be one of the stock id constants such as+-- 'Graphics.UI.Gtk.General.StockItems.stockOpen'. @size@ should be a+-- size such as 'Graphics.UI.Gtk.General.IconFactory.IconSizeMenu'.+-- @detail@ should be a string that identifies the+-- widget or code doing the rendering, so that theme engines can special-case+-- rendering for that widget or code.+--+-- The pixels in the returned 'Graphics.UI.Gtk.Gdk.Pixbuf.Pixbuf' are+-- shared with the rest of the+-- application and should not be modified.+--+widgetRenderIcon :: (WidgetClass self, GlibString string) => self+ -> string            -- ^ @stockId@ - a stock ID+ -> IconSize          -- ^ @size@ - a stock size+ -> string            -- ^ @detail@ - render detail to pass to theme engine+ -> IO (Maybe Pixbuf) -- ^ returns a new pixbuf, or @Nothing@ if the stock ID+                      -- wasn't known+widgetRenderIcon self stockId size detail =+  maybeNull (wrapNewGObject mkPixbuf) $+  withUTFString detail $ \detailPtr ->+  withUTFString stockId $ \stockIdPtr ->+  {# call gtk_widget_render_icon #}+    (toWidget self)+    stockIdPtr+    ((fromIntegral . fromEnum) size)+    detailPtr++-- %hash c:62f d:1863+-- | Invalidates the rectangular area of @widget@ defined by @x@, @y@, @width@+-- and @height@ by calling+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowInvalidateRect' on the widget's+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawWindow' and all its child windows. Once+-- the main loop becomes idle (after the current batch of events has been+-- processed, roughly), the window will receive expose events for the union of+-- all regions that have been invalidated.+--+-- Normally you would only use this function in widget implementations. In+-- particular, you might use it, or+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowInvalidateRect' directly, to+-- schedule a redraw of a 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawingArea' or some+-- portion thereof.+--+-- Frequently you can just call+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.windowInvalidateRect' or+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.windowInvalidateRegion' instead of this+-- function. Those functions will invalidate only a single window, instead of+-- the widget and all its children.+--+-- The advantage of adding to the invalidated region compared to simply+-- drawing immediately is efficiency; using an invalid region ensures that you+-- only have to redraw one time.+--+widgetQueueDrawArea :: WidgetClass self => self+ -> Int   -- ^ @x@ - x coordinate of upper-left corner of rectangle to redraw+ -> Int   -- ^ @y@ - y coordinate of upper-left corner of rectangle to redraw+ -> Int   -- ^ @width@ - width of region to draw+ -> Int   -- ^ @height@ - height of region to draw+ -> IO ()+widgetQueueDrawArea self x y width height =+  {# call gtk_widget_queue_draw_area #}+    (toWidget self)+    (fromIntegral x)+    (fromIntegral y)+    (fromIntegral width)+    (fromIntegral height)++#if GTK_CHECK_VERSION(3,0,0)+-- | Invalidates the area of widget defined by @region@ by calling+-- 'drawWindowInvalidateRegion' on the widget’s window and all its child+-- windows. Once the main loop becomes idle (after the current batch of+-- events has been processed, roughly), the window will receive expose events+-- for the union of all regions that have been invalidated.+--+-- Normally you would only use this function in widget implementations. You+-- might also use it to schedule a redraw of a DrawingArea or some portion+-- thereof.+widgetQueueDrawRegion :: WidgetClass self => self+ -> Region+ -> IO ()+widgetQueueDrawRegion self region =+  withRegion region $ \regionPtr ->+  {# call gtk_widget_queue_draw_region #}+    (toWidget self)+    (castPtr regionPtr)+#endif++#if GTK_MAJOR_VERSION < 3+-- %hash c:5ffb d:3e1a+-- | Recursively resets the shape on this widget and its descendants.+--+widgetResetShapes :: WidgetClass self => self -> IO ()+widgetResetShapes self =+  {# call gtk_widget_reset_shapes #}+    (toWidget self)+#endif++-- | Sets whether the application intends to draw on the widget in response+--   to an 'onExpose' signal.+--+-- * This is a hint to the widget and does not affect the behavior of the+--   GTK+ core; many widgets ignore this flag entirely. For widgets that do+--   pay attention to the flag, such as 'EventBox' and 'Window', the effect+--   is to suppress default themed drawing of the widget's background.+--   (Children of the widget will still be drawn.) The application is then+--   entirely responsible for drawing the widget background.+--+widgetSetAppPaintable :: WidgetClass self => self+ -> Bool  -- ^ @appPaintable@ - @True@ if the application will paint on the+          -- widget+ -> IO ()+widgetSetAppPaintable self appPaintable =+  {# call widget_set_app_paintable #}+    (toWidget self)+    (fromBool appPaintable)++-- %hash c:89b2 d:e14d+-- | Widgets are double buffered by default; you can use this function to turn+-- off the buffering. \"Double buffered\" simply means that+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowBeginPaintRegion' and+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowEndPaint' are called automatically+-- around expose events sent to the widget.+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowBeginPaintRegion' diverts all+-- drawing to a widget's window to an offscreen buffer, and+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowEndPaint'+-- draws the buffer to the screen. The result is that users see the window+-- update in one smooth step, and don't see individual graphics primitives+-- being rendered.+--+-- In very simple terms, double buffered widgets don't flicker, so you would+-- only use this function to turn off double buffering if you had special needs+-- and really knew what you were doing.+--+-- Note: if you turn off double-buffering, you have to handle expose events,+-- since even the clearing to the background color or pixmap will not happen+-- automatically (as it is done in+-- 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowBeginPaint').+--+widgetSetDoubleBuffered :: WidgetClass self => self+ -> Bool  -- ^ @doubleBuffered@ - @True@ to double-buffer a widget+ -> IO ()+widgetSetDoubleBuffered self doubleBuffered =+  {# call gtk_widget_set_double_buffered #}+    (toWidget self)+    (fromBool doubleBuffered)++-- %hash c:d61 d:ac24+-- | Sets whether the entire widget is queued for drawing when its size+-- allocation changes. By default, this setting is @True@ and the entire widget+-- is redrawn on every size change. If your widget leaves the upper left+-- unchanged when made bigger, turning this setting on will improve+-- performance.+--+-- Note that for \"no window\" widgets setting this flag to @False@ turns off+-- all allocation on resizing: the widget will not even redraw if its position+-- changes; this is to allow containers that don't draw anything to avoid+-- excess invalidations. If you set this flag on a \"no window\" widget that+-- /does/ draw its window, you are responsible for invalidating both+-- the old and new allocation of the widget when the widget is moved and+-- responsible for invalidating regions newly when the widget increases size.+--+widgetSetRedrawOnAllocate :: WidgetClass self => self+ -> Bool  -- ^ @redrawOnAllocate@ - if @True@, the entire widget will be+          -- redrawn when it is allocated to a new size. Otherwise, only the+          -- new portion of the widget will be redrawn.+ -> IO ()+widgetSetRedrawOnAllocate self redrawOnAllocate =+  {# call gtk_widget_set_redraw_on_allocate #}+    (toWidget self)+    (fromBool redrawOnAllocate)++-- | Sets a widgets composite name. A child widget of a container is+--   composite if it serves as an internal widget and, thus, is not+--   added by the user.+--+widgetSetCompositeName :: (WidgetClass self, GlibString string) => self+ -> string -- ^ @name@ - the name to set.+ -> IO ()+widgetSetCompositeName self name =+  withUTFString name $ \namePtr ->+  {# call gtk_widget_set_composite_name #}+    (toWidget self)+    namePtr++-- | Emits the “mnemonic-activate” signal.+--+-- The default handler for this signal activates the widget if groupCycling+-- is @False@, and just grabs the focus if @groupCycling@ is @True@.+widgetMnemonicActivate :: WidgetClass self => self+ -> Bool+ -> IO Bool+widgetMnemonicActivate self groupCycling =+  liftM toBool $+  {# call widget_mnemonic_activate #}+    (toWidget self)+    (fromBool groupCycling)++#if GTK_MAJOR_VERSION < 3+-- %hash c:5c58 d:6895+-- | For widgets that support scrolling, sets the scroll adjustments and+-- returns @True@. For widgets that don't support scrolling, does nothing and+-- returns @False@. Widgets that don't support scrolling can be scrolled by+-- placing them in a 'Viewport', which does support scrolling.+--+-- Removed in Gtk3.+widgetSetScrollAdjustments :: WidgetClass self => self+ -> Maybe Adjustment -- ^ @hadjustment@ - an adjustment for horizontal scrolling, or+               -- @Nothing@+ -> Maybe Adjustment -- ^ @vadjustment@ - an adjustment for vertical scrolling, or+               -- @Nothing@+ -> IO Bool    -- ^ returns @True@ if the widget supports scrolling+widgetSetScrollAdjustments self hadjustment vadjustment =+  liftM toBool $+  {# call gtk_widget_set_scroll_adjustments #}+    (toWidget self)+    (fromMaybe (Adjustment nullForeignPtr) hadjustment)+    (fromMaybe (Adjustment nullForeignPtr) vadjustment)+#endif+++#if GTK_MAJOR_VERSION < 3+-- | Computes the intersection of a widget's area and @region@, returning+-- the intersection. The result may be empty, use+-- 'Graphics.UI.Gtk.Gdk.Region.regionEmpty' to check.+--+widgetRegionIntersect :: WidgetClass self => self+ -> Region    -- ^ @region@ - a 'Region' in the same coordinate system as the+              -- widget's allocation. That is, relative to the widget's+              -- 'DrawWindow' for 'NoWindow' widgets; relative to the parent+              -- 'DrawWindow' of the widget's 'DrawWindow' for widgets with+              -- their own 'DrawWindow'.+ -> IO Region -- ^ returns A region holding the intersection of the widget and+              --  @region@. The coordinates of the return value are relative to+              -- the widget's 'DrawWindow', if it has one, otherwise+              -- it is relative to the parent's 'DrawWindow'.+widgetRegionIntersect self region = do+  intersectionPtr <- {# call gtk_widget_region_intersect #}+    (toWidget self)+    region+  makeNewRegion intersectionPtr+#endif++-- %hash c:3c94 d:cdb6+-- | Returns the accessible object that describes the widget to an assistive+-- technology.+--+-- If no accessibility library is loaded (i.e. no ATK implementation library+-- is loaded via GTK_MODULES or via another application library, such as+-- libgnome), then this 'Object' instance may be a no-op. Likewise, if no+-- class-specific 'Object' implementation is available for the widget instance+-- in question, it will inherit an 'Object' implementation from the first+-- ancestor class for which such an implementation is defined.+--+-- The documentation of the ATK library contains more information about+-- accessible objects and their uses.+--+-- Returns a GObject in Gtk3.+widgetGetAccessible :: WidgetClass self => self+#if GTK_MAJOR_VERSION < 3+ -> IO Object -- ^ returns the 'Object' associated with @widget@+#else+ -> IO GObject -- ^ returns the 'GObject' associated with @widget@+#endif+widgetGetAccessible self =+#if GTK_MAJOR_VERSION < 3+  makeNewGObject mkObject $+#else+  makeNewGObject mkGObject $+#endif+  liftM castPtr $+  {# call gtk_widget_get_accessible #}+    (toWidget self)++-- %hash c:713d d:c4fc+-- | This function is used by custom widget implementations; if you\'re+-- writing an app, you\'d use 'widgetGrabFocus' to move the focus to a+-- particular widget, and 'containerSetFocusChain' to change the focus tab+-- order. So you may want to investigate those functions instead.+--+-- The \"focus\" default handler for a widget should return @True@ if moving+-- in @direction@ left the focus on a focusable location inside that widget,+-- and @False@ if moving in @direction@ moved the focus outside the widget. If+-- returning @True@, widgets normally call 'widgetGrabFocus' to place the focus+-- accordingly; if returning @False@, they don't modify the current focus+-- location.+--+widgetChildFocus :: WidgetClass self => self+ -> DirectionType -- ^ @direction@ - direction of focus movement+ -> IO Bool       -- ^ returns @True@ if focus ended up inside @widget@+widgetChildFocus self direction =+  liftM toBool $+  {# call gtk_widget_child_focus #}+    (toWidget self)+    ((fromIntegral . fromEnum) direction)++-- %hash c:de20 d:5300+-- | Gets the value set with 'widgetSetChildVisible'. If you feel a need to+-- use this function, your code probably needs reorganization.+--+-- This function is only useful for container implementations and never+-- should be called by an application.+--+widgetGetChildVisible :: WidgetClass self => self+ -> IO Bool -- ^ returns @True@ if the widget is mapped with the parent.+widgetGetChildVisible self =+  liftM toBool $+  {# call gtk_widget_get_child_visible #}+    (toWidget self)++-- %hash c:9320 d:367+-- | Returns the parent container of @widget@.+--+-- * Returns the parent container of @widget@ if it has one.+--+widgetGetParent :: WidgetClass self => self+ -> IO (Maybe Widget)+widgetGetParent self = do+  parentPtr <- {# call gtk_widget_get_parent #} (toWidget self)+  if parentPtr==nullPtr then return Nothing else+    liftM Just $ makeNewObject mkWidget (return parentPtr)++-- %hash c:85e3 d:a962+-- | Gets the settings object holding the settings (global property settings,+-- RC file information, etc) used for this widget.+--+-- Note that this function can only be called when the 'Widget' is attached+-- to a toplevel, since the settings object is specific to a particular+-- 'Screen'.+--+widgetGetSettings :: WidgetClass self => self+ -> IO Settings -- ^ returns the relevant 'Settings' object+widgetGetSettings self =+  makeNewGObject mkSettings $+  {# call gtk_widget_get_settings #}+    (toWidget self)++#if GTK_CHECK_VERSION(2,2,0)++-- | Returns the clipboard object for the given selection to+-- be used with widget. widget must have a 'Display'+-- associated with it, so must be attached to a toplevel+-- window.+widgetGetClipboard :: WidgetClass self => self+                   -> SelectionTag  -- ^ @selection@ a 'Atom' which identifies the clipboard+                                       -- to use. 'selectionClipboard' gives the+                                       -- default clipboard. Another common value+                                       -- is 'selectionPrimary', which gives+                                       -- the primary X selection.+                   -> IO Clipboard -- ^ returns the appropriate clipboard object. If no+                                   -- clipboard already exists, a new one will+                                   -- be created.+widgetGetClipboard self (Atom tagPtr) =+  makeNewGObject mkClipboard $+  {#call gtk_widget_get_clipboard #}+    (toWidget self)+    tagPtr++-- %hash c:45ed d:52ef+-- | Get the 'Display' for the toplevel window associated with this widget.+-- This function can only be called after the widget has been added to a widget+-- hierarchy with a 'Window' at the top.+--+-- In general, you should only create display specific resources when a+-- widget has been realized, and you should free those resources when the+-- widget is unrealized.+--+-- * Available since Gtk+ version 2.2+--+widgetGetDisplay :: WidgetClass self => self+ -> IO Display -- ^ returns the 'Display' for the toplevel for this widget.+widgetGetDisplay self =+  makeNewGObject mkDisplay $+  {# call gtk_widget_get_display #}+    (toWidget self)++-- %hash c:8e4e d:252b+-- | Get the root window where this widget is located. This function can only+-- be called after the widget has been added to a widget hierarchy with+-- 'Window' at the top.+--+-- The root window is useful for such purposes as creating a popup+-- 'DrawWindow' associated with the window. In general, you should only create+-- display specific resources when a widget has been realized, and you should+-- free those resources when the widget is unrealized.+--+-- * Available since Gtk+ version 2.2+--+widgetGetRootWindow :: WidgetClass self => self+ -> IO DrawWindow -- ^ returns the 'DrawWindow' root window for the toplevel+                  -- for this widget.+widgetGetRootWindow self =+  makeNewGObject mkDrawWindow $+  {# call gtk_widget_get_root_window #}+    (toWidget self)++-- %hash c:b929 d:67f0+-- | Get the 'Screen' from the toplevel window associated with this widget.+-- This function can only be called after the widget has been added to a widget+-- hierarchy with a 'Window' at the top.+--+-- In general, you should only create screen specific resources when a+-- widget has been realized, and you should free those resources when the+-- widget is unrealized.+--+-- * Available since Gtk+ version 2.2+--+widgetGetScreen :: WidgetClass self => self+ -> IO Screen -- ^ returns the 'Screen' for the toplevel for this widget.+widgetGetScreen self =+  makeNewGObject mkScreen $+  {# call gtk_widget_get_screen #}+    (toWidget self)++-- %hash c:4fab d:aae2+-- | Checks whether there is a 'Screen' is associated with this widget. All+-- toplevel widgets have an associated screen, and all widgets added into a+-- hierarchy with a toplevel window at the top.+--+-- * Available since Gtk+ version 2.2+--+widgetHasScreen :: WidgetClass self => self+ -> IO Bool -- ^ returns @True@ if there is a 'Screen' associated with the+            -- widget.+widgetHasScreen self =+  liftM toBool $+  {# call gtk_widget_has_screen #}+    (toWidget self)+#endif++-- %hash c:dabc d:8275+-- | Gets the size request that was explicitly set for the widget using+-- 'widgetSetSizeRequest'. A value of -1 for @width@ or @height@+-- indicates that that dimension has not been set explicitly and the natural+-- requisition of the widget will be used instead. See 'widgetSetSizeRequest'.+-- To get the size a widget will actually use, call 'widgetSizeRequest' instead+-- of this function.+--+widgetGetSizeRequest :: WidgetClass self => self+ -> IO (Int, Int) -- ^ @(width, height)@+widgetGetSizeRequest self =+  alloca $ \widthPtr ->+  alloca $ \heightPtr -> do+  {# call gtk_widget_get_size_request #}+    (toWidget self)+    widthPtr+    heightPtr+  width <- peek widthPtr+  height <- peek heightPtr+  return (fromIntegral width, fromIntegral height)++#if GTK_CHECK_VERSION(3,0,0)+-- | Retrieves the minimum and natural size of a widget, taking into account the+-- widget’s preference for height-for-width management.+--+-- This is used to retrieve a suitable size by container widgets which do not+-- impose any restrictions on the child placement. It can be used to deduce+-- toplevel window and menu sizes as well as child widgets in free-form containers+-- such as GtkLayout.+--+-- Handle with care. Note that the natural height of a height-for-width widget+-- will generally be a smaller size than the minimum height, since the required+-- height for the natural width is generally smaller than the required height for+-- the minimum width.+--+-- Use gtk_widget_get_preferred_height_and_baseline_for_width() if you want+-- to support baseline alignment.+--+-- * Available since Gtk+ version 3.0+--++widgetGetPreferredSize :: WidgetClass self => self+ -> IO (Requisition, Requisition) -- ^ @(minimumSize, naturalSize)@+widgetGetPreferredSize self =+  alloca $ \minReqPtr ->+  alloca $ \natReqPtr -> do+  {#call gtk_widget_get_preferred_size #} (toWidget self) (castPtr minReqPtr) (castPtr natReqPtr)+  min <- peek minReqPtr+  nat <- peek natReqPtr+  return (min, nat)+#endif++-- %hash c:546d d:3c7f+-- | Sets whether @widget@ should be mapped along with its when its parent is+-- mapped and @widget@ has been shown with 'widgetShow'.+--+-- The child visibility can be set for widget before it is added to a+-- container with 'widgetSetParent', to avoid mapping children unnecessary+-- before immediately unmapping them. However it will be reset to its default+-- state of @True@ when the widget is removed from a container.+--+-- Note that changing the child visibility of a widget does not queue a+-- resize on the widget. Most of the time, the size of a widget is computed+-- from all visible children, whether or not they are mapped. If this is not+-- the case, the container can queue a resize itself.+--+-- This function is only useful for container implementations and never+-- should be called by an application.+--+widgetSetChildVisible :: WidgetClass self => self+ -> Bool -- ^ @isVisible@ - if @True@, @widget@ should be mapped along with+         -- its parent.+ -> IO ()+widgetSetChildVisible self isVisible =+  {# call gtk_widget_set_child_visible #}+    (toWidget self)+    (fromBool isVisible)++-- | Sets the minimum size of a widget; that is, the widget's size request+-- will be @width@ by @height@. You can use this function to force a widget to+-- be either larger or smaller than it normally would be.+--+-- In most cases, 'Graphics.UI.Gtk.Windows.Window.windowSetDefaultSize'+-- is a better choice for toplevel+-- windows than this function; setting the default size will still allow users+-- to shrink the window. Setting the size request will force them to leave the+-- window at least as large as the size request. When dealing with window+-- sizes, 'Graphics.UI.Gtk.Windows.Window.windowSetGeometryHints' can be a+-- useful function as well.+--+-- Note the inherent danger of setting any fixed size - themes, translations+-- into other languages, different fonts, and user action can all change the+-- appropriate size for a given widget. So, it's basically impossible to+-- hardcode a size that will always be correct.+--+-- The size request of a widget is the smallest size a widget can accept+-- while still functioning well and drawing itself correctly. However in some+-- strange cases a widget may be allocated less than its requested size, and in+-- many cases a widget may be allocated more space than it requested.+--+-- If the size request in a given direction is -1 (unset), then the+-- \"natural\" size request of the widget will be used instead.+--+-- Widgets can't actually be allocated a size less than 1 by 1, but you can+-- pass 0,0 to this function to mean \"as small as possible.\"+--+widgetSetSizeRequest :: WidgetClass self => self+ -> Int   -- ^ @width@ - width @widget@ should request, or -1 to unset+ -> Int   -- ^ @height@ - height @widget@ should request, or -1 to unset+ -> IO ()+widgetSetSizeRequest self width height =+  {# call widget_set_size_request #}+    (toWidget self)+    (fromIntegral width)+    (fromIntegral height)++#if GTK_CHECK_VERSION(2,4,0)+-- %hash c:83c3 d:e6f1+-- | Sets the 'noShowAll' property, which determines whether calls to+-- 'widgetShowAll' and 'widgetHideAll' will affect this widget.+--+-- This is mostly for use in constructing widget hierarchies with externally+-- controlled visibility, see 'UIManager'.+--+-- * Available since Gtk+ version 2.4+--+widgetSetNoShowAll :: WidgetClass self => self+ -> Bool -- ^ @noShowAll@ - the new value for the 'noShowAll' property+ -> IO ()+widgetSetNoShowAll self noShowAll =+  {# call gtk_widget_set_no_show_all #}+    (toWidget self)+    (fromBool noShowAll)++-- %hash c:218d d:e07e+-- | Returns the current value of the 'noShowAll' property, which+-- determines whether calls to 'widgetShowAll' and 'widgetHideAll' will affect+-- this widget.+--+-- * Available since Gtk+ version 2.4+--+widgetGetNoShowAll :: WidgetClass self => self+ -> IO Bool -- ^ returns the current value of the \"no_show_all\" property.+widgetGetNoShowAll self =+  liftM toBool $+  {# call gtk_widget_get_no_show_all #}+    (toWidget self)++-- %hash c:205b d:c518+-- | Returns a list of the widgets, normally labels, for which+-- this widget is a the target of a mnemonic (see for example,+-- 'labelSetMnemonicWidget').+--+-- * Available since Gtk+ version 2.4+--+widgetListMnemonicLabels :: WidgetClass self => self+ -> IO [Widget] -- ^ returns the list of mnemonic labels+widgetListMnemonicLabels self =+  {# call gtk_widget_list_mnemonic_labels #}+    (toWidget self)+  >>= fromGList+  >>= mapM (makeNewGObject mkWidget . return)++-- %hash c:eb76 d:28a2+-- | Adds a widget to the list of mnemonic labels for this widget. (See+-- 'widgetListMnemonicLabels'). Note the list of mnemonic labels for the widget+-- is cleared when the widget is destroyed, so the caller must make sure to+-- update its internal state at this point as well, by using a connection to+-- the 'destroy' signal or a weak notifier.+--+-- * Available since Gtk+ version 2.4+--+widgetAddMnemonicLabel :: (WidgetClass self, WidgetClass label) => self+ -> label -- ^ @label@ - a 'Widget' that acts as a mnemonic label for+          -- @widget@.+ -> IO ()+widgetAddMnemonicLabel self label =+  {# call gtk_widget_add_mnemonic_label #}+    (toWidget self)+    (toWidget label)++-- %hash c:7831 d:d10b+-- | Removes a widget from the list of mnemonic labels for this widget. (See+-- 'widgetListMnemonicLabels'). The widget must have previously been added to+-- the list with 'widgetAddMnemonicLabel'.+--+-- * Available since Gtk+ version 2.4+--+widgetRemoveMnemonicLabel :: (WidgetClass self, WidgetClass label) => self+ -> label -- ^ @label@ - a 'Widget' that was previously set as a mnemnic label+          -- for @widget@ with 'widgetAddMnemonicLabel'.+ -> IO ()+widgetRemoveMnemonicLabel self label =+  {# call gtk_widget_remove_mnemonic_label #}+    (toWidget self)+    (toWidget label)++#if GTK_CHECK_VERSION(2,10,0)+#if GTK_MAJOR_VERSION < 3+-- %hash c:5c70 d:cbf9+-- | Returns the 'Action' that @widget@ is a proxy for. See also+-- 'actionGetProxies'.+--+-- * Available since Gtk+ version 2.10+--+-- Removed in Gtk3.+widgetGetAction :: WidgetClass self => self+ -> IO (Maybe Action)+   -- ^ returns the action that a widget is a proxy for, or+   -- @Nothing@, if it is not attached to an action.+widgetGetAction self = do+  ptr <- {# call gtk_widget_get_action #} (toWidget self)+  if ptr==nullPtr then return Nothing else liftM Just $+    makeNewGObject mkAction (return ptr)+#endif++-- %hash c:7ea0 d:2560+-- | Whether @widget@ can rely on having its alpha channel drawn correctly. On+-- X11 this function returns whether a compositing manager is running for+-- @widget@'s screen+--+-- * Available since Gtk+ version 2.10+--+widgetIsComposited :: WidgetClass self => self+ -> IO Bool -- ^ returns @True@ if the widget can rely on its alpha channel+            -- being drawn correctly.+widgetIsComposited self =+  liftM toBool $+  {# call gtk_widget_is_composited #}+    (toWidget self)+#endif+#endif++#if GTK_CHECK_VERSION(2,12,0)+-- | Notifies the user about an input-related error on this widget.+-- If the "gtk-error-bell" setting is @True@, it calls 'drawWindowBeep',+-- otherwise it does nothing.+--+-- Note that the effect of 'drawWindow_beep' can be configured in many+-- ways, depending on the windowing backend and the desktop environment+-- or window manager that is used.+widgetErrorBell :: WidgetClass self => self+ -> IO ()+widgetErrorBell self =+  {# call widget_error_bell #}+    (toWidget self)++-- | This function should be called whenever keyboard navigation within+-- a single widget hits a boundary. The function emits the "keynav-failed"+-- signal on the widget and its return value should be interpreted in a+-- way similar to the return value of 'widgetChildFocus':+--+-- When @True@ is returned, stay in the widget, the failed keyboard+-- navigation is Ok and/or there is nowhere we can/should move the+-- focus to.+--+-- When @False@ is returned, the caller should continue with keyboard+-- navigation outside the widget, e.g. by calling 'widgetChildFocus' on+-- the widget’s toplevel.+--+-- The default ::keynav-failed handler returns @True@ for 'DirTabForward'+-- and 'DirTabBackward'. For the other values of 'DirectionType' it+-- returns @False@.+--+-- Whenever the default handler returns @True@, it also calls+-- 'widgetErrorBell' to notify the user of the failed keyboard+-- navigation.+--+-- A use case for providing an own implementation of ::keynav-failed+-- (either by connecting to it or by overriding it) would be a row of+-- 'Entry' widgets where the user should be able to navigate the entire+-- row with the cursor keys, as e.g. known from user interfaces that+-- require entering license keys.+widgetKeynavFailed :: WidgetClass self => self+ -> DirectionType -- ^ @direction@ - direction of focus movement+ -> IO Bool       -- ^ returns @True@ if stopping keyboard navigation is+                  -- fine, @False@ if the emitting widget should try to handle+                  -- the keyboard navigation attempt in its parent container(s).+widgetKeynavFailed self direction =+  liftM toBool $+  {# call widget_keynav_failed #}+    (toWidget self)+    ((fromIntegral . fromEnum) direction)++-- | Gets the contents of the tooltip for widget.+widgetGetTooltipMarkup :: (WidgetClass self, GlibString markup) => self+ -> IO (Maybe markup) -- Returns the tooltip text, or Nothing.+widgetGetTooltipMarkup self =+  {# call widget_get_tooltip_markup #}+    (toWidget self)+  >>= maybePeek peekUTFString++-- | Sets @markup@ as the contents of the tooltip, which is marked up with the+-- Pango text markup language.+--+-- This function will take care of setting "has-tooltip" to True and of the+-- default handler for the "query-tooltip" signal.+--+-- See also the "tooltip-markup" property and 'tooltipSetMarkup'.+widgetSetTooltipMarkup :: (WidgetClass self, GlibString markup) => self+  -> Maybe markup -- ^ the contents of the tooltip for widget, or @Nothing@.+  -> IO ()+widgetSetTooltipMarkup self markup =+  maybeWith withUTFString markup $ \ markupPtr ->+  {# call widget_set_tooltip_markup #}+    (toWidget self)+    markupPtr++-- | Gets the contents of the tooltip for widget.+widgetGetTooltipText :: (WidgetClass self, GlibString text) => self+ -> IO (Maybe text) -- Returns the tooltip text, or Nothing.+widgetGetTooltipText self =+  {# call widget_get_tooltip_text #}+    (toWidget self)+  >>= maybePeek peekUTFString++-- | Sets @text@ as the contents of the tooltip. This function will take care+-- of setting "has-tooltip" to @True@ and of the default handler for the+-- "query-tooltip" signal.+--+-- See also the "tooltip-text" property and 'tooltipSetText'.+widgetSetTooltipText :: (WidgetClass widget, GlibString text) => widget+  -> Maybe text -- ^ the contents of the tooltip for widget, or @Nothing@.+  -> IO ()+widgetSetTooltipText widget text =+  maybeWith withUTFString text $ \ textPtr ->+  {# call widget_set_tooltip_text #}+    (toWidget widget)+    textPtr++-- | Returns the 'Window' of the current tooltip. This can be the 'Window' created by default, or the+-- custom tooltip window set using 'widgetSetTooltipWindow'.+--+-- * Available since Gtk+ version 2.12+--+widgetGetTooltipWindow :: WidgetClass self => self+ -> IO Window -- ^ returns The 'Window' of the current tooltip+widgetGetTooltipWindow self =+  makeNewObject mkWindow $+  {# call gtk_widget_get_tooltip_window #}+    (toWidget self)++-- | Replaces the default, usually yellow, window used for displaying tooltips with @customWindow@. GTK++-- will take care of showing and hiding @customWindow@ at the right moment, to behave likewise as the+-- default tooltip window. If @customWindow@ is 'Nothing', the default tooltip window will be used.+--+-- If the custom window should have the default theming it needs to have the name 'gtk-tooltip', see+-- 'widgetSetName'.+--+-- * Available since Gtk+ version 2.12+--+widgetSetTooltipWindow :: (WidgetClass self, WindowClass customWindow) => self+ -> Maybe customWindow -- ^ @customWindow@ a 'Window', or 'Nothing'. allow-none.+ -> IO ()+widgetSetTooltipWindow self customWindow =+  {# call gtk_widget_set_tooltip_window #}+    (toWidget self)+    (maybe (Window nullForeignPtr) toWindow customWindow)++-- | Returns the current value of the has-tooltip property.+-- See 'widgetHasTooltip' for more information.+widgetGetHasTooltip :: WidgetClass widget => widget+ -> IO Bool -- ^ current value of 'widgetHasTooltip' on @widget@.+widgetGetHasTooltip widget =+  liftM toBool $+  {# call widget_get_has_tooltip #}+    (toWidget widget)++-- | Sets the has-tooltip property on @widget@ to @hasTooltip@.+-- See 'widgetHasTooltip' for more information.+widgetSetHasTooltip :: WidgetClass widget => widget+ -> Bool  -- ^ @hasTooltip@ whether or not @widget@ has a tooltip.+ -> IO ()+widgetSetHasTooltip widget hasTooltip =+  {# call widget_set_has_tooltip #}+    (toWidget widget)+    (fromBool hasTooltip)++-- | Triggers a tooltip query on the display where the toplevel of @widget@ is+-- located. See 'tooltipTriggerTooltipQuery' for more information.+--+-- * Available since Gtk+ version 2.12+--+widgetTriggerTooltipQuery :: WidgetClass self => self -> IO ()+widgetTriggerTooltipQuery self =+  {# call gtk_widget_trigger_tooltip_query #}+    (toWidget self)+#endif++#if GTK_CHECK_VERSION(2,14,0)+-- | Returns the widget's window if it is realized, Nothing otherwise+--+-- * Available since Gtk+ version 2.14+--+widgetGetWindow :: WidgetClass self => self -> IO (Maybe DrawWindow)+widgetGetWindow self =+  maybeNull (makeNewGObject mkDrawWindow) $+  {# call gtk_widget_get_window #}+    (toWidget self)+#endif++#if GTK_CHECK_VERSION(3,8,0)+-- | Registers a 'DrawWindow' with the widget and sets it up so that the+-- widget receives events for it. Call 'widgetUnregisterWindow' when+-- destroying the window.+widgetRegisterWindow :: (WidgetClass widget, DrawWindowClass window) => widget+ -> window+ -> IO ()+widgetRegisterWindow widget window =+  {# call widget_register_window #}+    (toWidget widget)+    (toDrawWindow window)++-- | Unregisters a 'DrawWindow' from the widget that was previously set up+-- with 'widgetRegisterWindow'. You need to call this when the window is no+-- longer used by the widget, such as when you destroy it.+widgetUnregisterWindow :: (WidgetClass widget, DrawWindowClass window) => widget+ -> window+ -> IO ()+widgetUnregisterWindow widget window =+  {# call widget_unregister_window #}+    (toWidget widget)+    (toDrawWindow window)+#endif++#if GTK_CHECK_VERSION(3,0,0)+-- | This function is supposed to be called in "draw" implementations for+-- widgets that support multiple windows. @cr@ must be untransformed from+-- invoking of the draw function. This function will return @True@ if the+-- contents of the given @window@ are supposed to be drawn and @False@+-- otherwise. Note that when the drawing was not initiated by the windowing+-- system this function will return @True@ for all windows, so you need to+-- draw the bottommost window first. Also, do not use “else if” statements to+-- check which window should be drawn.+cairoShouldDrawWindow :: DrawWindowClass window+ => Cairo   -- ^ @cr@ a cairo context+ -> window  -- ^ @window@ the window to check. @window@ may not be an input-only window.+ -> IO Bool+cairoShouldDrawWindow cr window =+  liftM toBool $+  {# call cairo_should_draw_window #}+    (castPtr $ unCairo cr)+    (toDrawWindow window)++-- | Transforms the given cairo context @cr@ that from @widget@-relative+-- coordinates to @window@-relative coordinates. If the @widget@’s window is+-- not an ancestor of @window@, no modification will be applied.+--+-- This is the inverse to the transformation GTK applies when preparing an+-- expose event to be emitted with the “draw” signal. It is intended to help+-- porting multiwindow widgets from GTK+ 2 to the rendering architecture of+-- GTK+ 3.+cairoTransformToWindow :: (WidgetClass widget, DrawWindowClass window)+ => Cairo  -- ^ @cr@ the cairo context to transform+ -> widget -- ^ @widget@ the widget the context is currently centered for+ -> window -- ^ @window@ the window to transform the context to+ -> IO ()+cairoTransformToWindow cr widget window =+  {# call gtk_cairo_transform_to_window #}+    (castPtr $ unCairo cr)+    (toWidget widget)+    (toDrawWindow window)+#endif++-- | Moves a widget from one 'Container' to another.+--+widgetReparent :: (WidgetClass self, WidgetClass newParent) => self+ -> newParent -- ^ @newParent@ - a 'Container' to move the widget into+ -> IO ()+widgetReparent self newParent =+  {# call widget_reparent #}+    (toWidget self)+    (toWidget newParent)++#if GTK_CHECK_VERSION(2,18,0)+-- | Set if this widget can receive keyboard input.+--+-- * To use the 'keyPress' event, the widget must be allowed+--   to get the input focus. Once it has the input focus all keyboard+--   input is directed to this widget.+--+widgetSetCanFocus :: WidgetClass self => self -> Bool -> IO ()+widgetSetCanFocus = objectSetPropertyBool "can_focus"++-- | Check if this widget can receive keyboard input.+--+widgetGetCanFocus :: WidgetClass self => self -> IO Bool+widgetGetCanFocus = objectGetPropertyBool "can_focus"++-- | Retrieves the widget's allocation.+--+-- * Available since Gtk+ version 2.18+--+widgetGetAllocation :: WidgetClass self => self -> IO Allocation+widgetGetAllocation widget =+  alloca $ \ allocationPtr -> do+     {#call widget_get_allocation#} (toWidget widget) (castPtr allocationPtr)+     peek allocationPtr+#endif++#if GTK_CHECK_VERSION(3,0,0)+-- | Returns the width that has currently been allocated to widget. This function is intended+-- | to be used when implementing handlers for the "draw" function.+widgetGetAllocatedWidth :: WidgetClass self => self -> IO Int+widgetGetAllocatedWidth widget =+     liftM fromIntegral $ {#call widget_get_allocated_width#} (toWidget widget)++-- | Returns the height that has currently been allocated to widget. This function is intended+-- | to be used when implementing handlers for the "draw" function.+widgetGetAllocatedHeight :: WidgetClass self => self -> IO Int+widgetGetAllocatedHeight widget =+     liftM fromIntegral $ {#call widget_get_allocated_height#} (toWidget widget)+#endif++#if GTK_CHECK_VERSION(3,10,0)+-- | Returns the baseline that has currently been allocated to widget . This function is intended+-- to be used when implementing handlers for the “draw” function, and when allocating child+-- widgets in “size_allocate”.+widgetGetAllocatedBaseline :: WidgetClass self => self -> IO Int+widgetGetAllocatedBaseline widget =+     liftM fromIntegral $ {#call widget_get_allocated_baseline#} (toWidget widget)+#endif++#if GTK_CHECK_VERSION(3,14,0)+-- | Retrieves the widget’s clip area.+--+-- The clip area is the area in which all of widget's drawing will happen. Other+-- toolkits call it the bounding box.+--+-- Historically, in GTK+ the clip area has been equal to the allocation retrieved+-- via widgetGetAllocation.+widgetGetClip :: WidgetClass self => self -> IO Allocation+widgetGetClip widget =+  alloca $ \ allocationPtr -> do+     {#call widget_get_clip#} (toWidget widget) (castPtr allocationPtr)+     peek allocationPtr++-- | Sets the widget’s clip. This must not be used directly, but from within a widget’s 'sizeAllocate' method.+--+-- The clip set should be the area that widget draws on. If widget is a GtkContainer, the area+-- must contain all children's clips.+--+-- If this function is not called by widget during a 'sizeAllocate' handler, it is assumed to be+-- equal to the allocation. However, if the function is not called, certain features that might extend+-- a widget's allocation will not be available:+--+-- * The “draw” signal will be clipped to the widget's allocation to avoid overdraw.+--+-- * Calling gtk_render_background() will not draw outset shadows.+--+-- It is therefore suggested that you always call widgetSetClip during a 'sizeAllocate' handler.+widgetSetClip :: WidgetClass self => self+  -> Allocation+  -> IO ()+widgetSetClip self clip = with clip $ \clipPtr ->+  {#call widget_set_clip#} (toWidget self) (castPtr clipPtr)+#endif++#if GTK_CHECK_VERSION(2,18,0)+-- | Determines whether the application intends to draw on the widget in an+-- "draw" handler.+-- See 'widgetSetAppPaintable'.+widgetGetAppPaintable :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if the @widget@ is app paintable.+widgetGetAppPaintable widget =+  liftM toBool $+  {#call widget_get_app_paintable #}+    (toWidget widget)++-- | Determines whether @widget@ can be a default widget.+-- See 'widgetSetCanDefault'.+widgetGetCanDefault :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ can be a default widget, @False@ otherwise.+widgetGetCanDefault widget =+  liftM toBool $+  {#call gtk_widget_get_can_default #}+    (toWidget widget)++-- | Specifies whether @widget@ can be a default widget.+-- See 'widgetGrabDefault' for details about the meaning of "default".+widgetSetCanDefault :: WidgetClass widget => widget+ -> Bool  -- ^ @canDefault@ whether or not @widget@ can be a default widget.+ -> IO ()+widgetSetCanDefault widget canDefault =+  {# call widget_set_can_default #}+    (toWidget widget)+    (fromBool canDefault)++-- | Determines whether @widget@ has a 'DrawWindow' of its own. See 'widgetSetHasWindow'.+widgetGetHasWindow :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ has a window, @False@ otherwise.+widgetGetHasWindow widget =+  liftM toBool $+  {#call widget_get_has_window #}+    (toWidget widget)++-- | Specifies whether @widget@ has a 'DrawWindow' of its own. Note that all+-- realized widgets have a non-NULL "window" pointer ('widgetGetWindow' never+-- returns a NULL window when a widget is realized), but for many of them it's+-- actually the 'DrawWindow' of one of its parent widgets. Widgets that do not+-- create a window for themselves in "realize" must announce this by calling+-- this function with @hasWindow@ = @False@.+--+-- This function should only be called by widget implementations, and they+-- should call it in their @init()@ function.+widgetSetHasWindow :: WidgetClass widget => widget+ -> Bool  -- ^ @hasWindow@ whether or not @widget@ has a window.+ -> IO ()+widgetSetHasWindow widget hasWindow =+  {# call widget_set_has_window #}+    (toWidget widget)+    (fromBool hasWindow)++-- | Returns the @widget@’s sensitivity (in the sense of returning the value+-- that has been set using 'widgetSetSensitive').+--+-- The effective sensitivity of a widget is however determined by both its own+-- and its parent widget’s sensitivity. See 'widgetIsSensitive'.+widgetGetSensitive :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if the widget is sensitive.+widgetGetSensitive widget =+  liftM toBool $+  {#call widget_get_sensitive #}+    (toWidget widget)++-- | Returns the widget’s effective sensitivity, which means it is sensitive+-- itself and also its parent widget is sensitive.+widgetIsSensitive :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if the widget is effectively sensitive.+widgetIsSensitive widget =+  liftM toBool $+  {#call widget_is_sensitive #}+    (toWidget widget)++-- | Retrieve the current state of the widget.+--+-- * The state refers to different modes of user interaction, see+--   'StateType' for more information.+--+widgetGetState :: WidgetClass self => self -> IO StateType+widgetGetState widget =+  liftM (toEnum . fromIntegral) $+  {#call widget_get_state#}+    (toWidget widget)++-- | Determines whether the widget is visible. If you want to take into+--  account whether the widget’s parent is also marked as visible, use+-- 'widgetIsVisible' instead.+--+-- This function does not check if the widget is obscured in any way.+-- See 'widgetSetVisible'.+widgetGetVisible :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if the widget is visible.+widgetGetVisible widget =+  liftM toBool $+  {#call widget_get_visible #}+    (toWidget widget)+#endif++#if GTK_CHECK_VERSION(3,8,0)+-- | Determines whether the widget and all its parents are marked as visible.+--+-- This function does not check if the widget is obscured in any way.+--+-- See also 'widgetGetVisible' and 'widgetSetVisible'+widgetIsVisible :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if the widget and all its parents are visible.+widgetIsVisible widget =+  liftM toBool $+  {#call widget_is_visible #}+    (toWidget widget)+#endif++#if GTK_CHECK_VERSION(3,0,0)+-- | This function is for use in widget implementations. Turns on flag values+-- in the current widget state (insensitive, prelighted, etc.).+--+-- This function accepts the values 'StateFlagDirLtr' and 'StateFlagDirRtl'+-- but ignores them. If you want to set the widget's direction, use+-- 'widgetSetDirection'.+--+-- It is worth mentioning that any other state than StateFlagInsensitive',+-- will be propagated down to all non-internal children if @widget@ is a+-- 'Container', while 'StateFlagInsensitive' itself will be propagated down+-- to all 'Container' children by different means than turning on the state+-- flag down the hierarchy, both 'widgetGetStateFlags' and+-- 'widgetIsSensitive' will make use of these.+widgetSetStateFlags :: WidgetClass widget => widget+ -> [StateFlags] -- ^ @flags@ State flags to turn on+ -> Bool         -- ^ @clear@ Whether to clear state before turning on @flags@+ -> IO ()+widgetSetStateFlags widget flags clear =+  {# call widget_set_state_flags #}+    (toWidget widget)+    (fromIntegral $ fromFlags flags)+    (fromBool clear)++-- | This function is for use in widget implementations. Turns off flag+-- values for the current widget state (insensitive, prelighted, etc.).+-- See 'widgetSetStateFlags'.+widgetUnsetStateFlags :: WidgetClass widget => widget+ -> [StateFlags] -- ^ @flags@ State flags to turn off+ -> IO ()+widgetUnsetStateFlags widget flags =+  {# call widget_unset_state_flags #}+    (toWidget widget)+    (fromIntegral $ fromFlags flags)++-- | Returns the widget state as a flag set. It is worth mentioning that the+-- effective StateFlagInsensitive state will be returned, that is, also based+-- on parent insensitivity, even if @widget@ itself is sensitive.+widgetGetStateFlags :: WidgetClass widget => widget+ -> IO [StateFlags] -- ^ Returns the state flags for @widget@+widgetGetStateFlags widget =+  liftM (toFlags . fromIntegral) $+  {# call widget_get_state_flags #}+    (toWidget widget)+#endif++#if GTK_CHECK_VERSION(2,18,0)+-- | Determines whether @widget@ is the current default widget within its+-- toplevel. See 'widgetSetCanDefault'.+widgetGetHasDefault :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ is the current default widget within its toplevel, @False@ otherwise.+widgetGetHasDefault widget =+  liftM toBool $+  {#call widget_has_default #}+    (toWidget widget)++-- | Determines if the @widget@ has the global input focus.+-- See 'widgetIsFocus' for the difference between having the global input+-- focus, and only having the focus within a toplevel.+widgetGetHasFocus :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ has the global input focus.+widgetGetHasFocus widget =+  liftM toBool $+  {#call widget_has_focus #}+    (toWidget widget)+#endif++#if GTK_CHECK_VERSION(3,2,0)+-- | Determines if the widget should show a visible indication that it has the+-- global input focus. This is a convenience function for use in ::draw+-- handlers that takes into account whether focus indication should currently+-- be shown in the toplevel window of @widget@. See 'windowGetFocusVisible'+-- for more information about focus indication.+--+-- To find out if the widget has the global input focus, use 'widgetHasFocus'.+widgetHasVisibleFocus :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if the widget should display a “focus rectangle”+widgetHasVisibleFocus widget =+  liftM toBool $+  {# call widget_has_visible_focus #}+    (toWidget widget)+#endif++#if GTK_CHECK_VERSION(2,18,0)+-- | Determines whether the widget is currently grabbing events, so it is the+-- only widget receiving input events (keyboard and mouse).+--+-- See also 'grabAdd'.+widgetHasGrab :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if the widget is in the grab_widgets stack+widgetHasGrab widget =+  liftM toBool $+  {# call widget_has_grab #}+    (toWidget widget)++-- | Determines whether @widget@ can be drawn to. A widget can be drawn to if+-- it is mapped and visible.+widgetIsDrawable :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ is drawable, @False@ otherwise+widgetIsDrawable widget =+  liftM toBool $+  {# call widget_is_drawable #}+    (toWidget widget)++-- | Determines whether @widget@ is a toplevel widget.+--+-- Currently only 'Window' and 'Invisible' (and out-of-process 'Plugs') are+-- toplevel widgets. Toplevel widgets have no parent widget.+widgetIsToplevel :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ is a toplevel, @False@ otherwise+widgetIsToplevel widget =+  liftM toBool $+  {# call widget_is_toplevel #}+    (toWidget widget)++-- | Sets a widget’s window. This function should only be used in a widget’s+-- “realize” implementation. The window passed is usually either new window+-- created with 'drawWindowNew', or the window of its parent widget as+-- returned by 'widgetGetParentWindow'.+--+-- Widgets must indicate whether they will create their own 'DrawWindow' by+-- calling 'widgetSetHasWindow'. This is usually done in the widget’s init()+-- function.+--+-- Note that this function does not add any reference to window.+widgetSetWindow :: (WidgetClass widget, DrawWindowClass window) => widget+ -> window+ -> IO ()+widgetSetWindow widget window =+  {# call widget_set_window #}+    (toWidget widget)+    (toDrawWindow window)++-- | Specifies whether @widget@ will be treated as the default widget within+-- its toplevel when it has the focus, even if another widget is the default.+--+-- See 'widgetGrabDefault' for details about the meaning of “default”.+widgetSetReceivesDefault :: WidgetClass widget => widget+ -> Bool -- ^ @receivesDefault@ whether or not widget can be a default widget.+ -> IO ()+widgetSetReceivesDefault widget receivesDefault =+  {# call widget_set_receives_default #}+    (toWidget widget)+    (fromBool receivesDefault)++-- | Determines whether @widget@ is always treated as the default widget+-- within its toplevel when it has the focus, even if another widget is the+-- default.+--+-- See 'widgetSetReceivesDefault'.+widgetGetReceivesDefault :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ acts as the default widget when focussed, @False@ otherwise+widgetGetReceivesDefault widget =+  liftM toBool $+  {# call widget_get_receives_default #}+    (toWidget widget)+#endif++#if GTK_CHECK_VERSION(3,0,0)+-- | Returns @True@ if device has been shadowed by a GTK+ device grab on+-- another widget, so it would stop sending events to widget. This may be+-- used in the “grab-notify” signal to check for specific devices.+-- See 'deviceGrabAdd'.+widgetDeviceIsShadowed :: (WidgetClass widget, DeviceClass device) => widget+ -> device+ -> IO Bool -- ^ Returns @True@ if there is an ongoing grab on device by another 'Widget' than widget.+widgetDeviceIsShadowed widget device =+  liftM toBool $+  {# call widget_device_is_shadowed #}+    (toWidget widget)+    (toDevice device)+#endif++#if GTK_CHECK_VERSION(3,4,0)+-- | Returns the modifier mask the @widget@’s windowing system backend uses+-- for a particular purpose.+--+-- See 'keymapGetModifierMask'.+widgetGetModifierMask :: WidgetClass widget => widget+ -> ModifierIntent -- ^ @intent@ the use case for the modifier mask+ -> IO [Modifier]  -- ^ Returns the modifier mask used for @intent@.+widgetGetModifierMask widget intent =+  liftM (toFlags . fromIntegral) $+  {# call widget_get_modifier_mask #}+    (toWidget widget)+    ((fromIntegral . fromEnum) intent)+#endif++#if GTK_CHECK_VERSION(3,0,0)+-- | Enables or disables multiple pointer awareness. If this setting is+-- @True@, widget will start receiving multiple, per device enter/leave+-- events. Note that if custom 'DrawWindows' are created in “realize”,+-- 'windowSetSupportMultidevice' will have to be called manually on them.+widgetSetSupportMultidevice :: WidgetClass widget => widget+ -> Bool -- ^ @supportMultidevice@ @True@ to support input from multiple devices.+ -> IO ()+widgetSetSupportMultidevice widget supportMultidevice =+  {# call widget_set_support_multidevice #}+    (toWidget widget)+    (fromBool supportMultidevice)++-- | Returns @True@ if @widget@ is multiple pointer aware.+-- See 'widgetSetSupportMultidevice' for more information.+widgetGetSupportMultidevice :: WidgetClass widget => widget+ -> IO Bool -- ^ Returns @True@ if @widget@ is multidevice aware.+widgetGetSupportMultidevice widget =+  liftM toBool $+  {# call widget_get_support_multidevice #}+    (toWidget widget)+#endif++-- | This function is for use in widget implementations. Sets the state of a+-- widget (insensitive, prelighted, etc.) Usually you should set the state+-- using wrapper functions such as 'widgetSetSensitive'.+--+widgetSetState :: WidgetClass self => self -> StateType -> IO ()+widgetSetState widget state =+  {#call widget_set_state#}+    (toWidget widget)+    ((fromIntegral . fromEnum) state)++-- | Rarely-used function. This function is used to emit the event signals on a widget (those signals+-- should never be emitted without using this function to do so). If you want to synthesize an event+-- though, don't use this function; instead, use 'mainDoEvent' so the event will behave as if it+-- were in the event queue. Don't synthesize expose events; instead, use 'windowInvalidateRect'+-- to invalidate a region of the window.+widgetEvent :: WidgetClass self => self -> EventM t Bool+widgetEvent widget = do+  ptr <- ask+  liftIO $ liftM toBool $ {#call widget_event #} (toWidget widget) (castPtr ptr)++--------------------+-- Attributes++-- %hash c:6f7f d:9384+-- | The name of the widget.+--+-- Default value: @Nothing@+--+widgetName :: (WidgetClass self, GlibString string) => Attr self (Maybe string)+widgetName = newAttrFromMaybeStringProperty "name"++widgetMarginLeft :: WidgetClass self => Attr self Int+widgetMarginLeft = newAttrFromIntProperty "margin-left"++widgetMarginRight :: WidgetClass self => Attr self Int+widgetMarginRight = newAttrFromIntProperty "margin-right"++#if GTK_CHECK_VERSION(3,12,0)+widgetMarginStart :: WidgetClass self => Attr self Int+widgetMarginStart = newAttrFromIntProperty "margin-start"++widgetMarginEnd :: WidgetClass self => Attr self Int+widgetMarginEnd = newAttrFromIntProperty "margin-end"+#endif++widgetMarginTop :: WidgetClass self => Attr self Int+widgetMarginTop = newAttrFromIntProperty "margin-top"++widgetMarginBottom :: WidgetClass self => Attr self Int+widgetMarginBottom = newAttrFromIntProperty "margin-bottom"++-- %hash c:1533 d:3213+-- | The parent widget of this widget. Must be a Container widget.+--+widgetParent :: (WidgetClass self, ContainerClass container) => ReadWriteAttr self (Maybe Container) (Maybe container)+widgetParent = newAttrFromMaybeObjectProperty "parent" gTypeContainer++-- %hash c:2b4c d:3c31+-- | Override for width request of the widget, or -1 if natural request should+-- be used.+--+-- Allowed values: >= -1+--+-- Default value: -1+--+widgetWidthRequest :: WidgetClass self => Attr self Int+widgetWidthRequest = newAttrFromIntProperty "width-request"++-- %hash c:fa97 d:172a+-- | Override for height request of the widget, or -1 if natural request+-- should be used.+--+-- Allowed values: >= -1+--+-- Default value: -1+--+widgetHeightRequest :: WidgetClass self => Attr self Int+widgetHeightRequest = newAttrFromIntProperty "height-request"++-- %hash c:70d0 d:e8e2+-- | Whether the widget is visible.+--+-- Default value: @False@+--+widgetVisible :: WidgetClass self => Attr self Bool+widgetVisible = newAttrFromBoolProperty "visible"++-- | The opacity of the widget+--+-- Default value: @1.0@+--+widgetOpacity :: WidgetClass self => Attr self Double+widgetOpacity = newAttrFromDoubleProperty "opacity"++-- %hash c:4dd4 d:594e+-- | Whether the widget responds to input.+--+-- Default value: @True@+--+widgetSensitive :: WidgetClass self => Attr self Bool+widgetSensitive = newAttrFromBoolProperty "sensitive"++-- %hash c:7506 d:1dde+-- | Whether the application will paint directly on the widget.+--+-- Default value: @False@+--+widgetAppPaintable :: WidgetClass self => Attr self Bool+widgetAppPaintable = newAttrFromBoolProperty "app-paintable"++-- %hash c:6289 d:72ab+-- | Whether the widget can accept the input focus.+--+-- Default value: @False@+--+widgetCanFocus :: WidgetClass self => Attr self Bool+widgetCanFocus = newAttrFromBoolProperty "can-focus"++-- %hash c:8e7 d:2645+-- | Whether the widget has the input focus.+--+-- Default value: @False@+--+widgetHasFocus :: WidgetClass self => Attr self Bool+widgetHasFocus = newAttrFromBoolProperty "has-focus"++-- %hash c:7547 d:1d78+-- | Whether the widget is the focus widget within the toplevel.+--+-- Default value: @False@+--+widgetIsFocus :: WidgetClass self => Attr self Bool+widgetIsFocus = newAttrFromBoolProperty "is-focus"++-- %hash c:f2d8 d:1cbb+-- | Whether the widget can be the default widget.+--+-- Default value: @False@+--+widgetCanDefault :: WidgetClass self => Attr self Bool+widgetCanDefault = newAttrFromBoolProperty "can-default"++-- %hash c:836 d:4cbe+-- | Whether the widget is the default widget.+--+-- Default value: @False@+--+widgetHasDefault :: WidgetClass self => Attr self Bool+widgetHasDefault = newAttrFromBoolProperty "has-default"++-- %hash c:f964 d:b62f+-- | If @True@, the widget will receive the default action when it is focused.+--+-- Default value: @False@+--+widgetReceivesDefault :: WidgetClass self => Attr self Bool+widgetReceivesDefault = newAttrFromBoolProperty "receives-default"++-- %hash c:2ca6 d:cad8+-- | Whether the widget is part of a composite widget.+--+-- Default value: @False@+--+widgetCompositeChild :: WidgetClass self => ReadAttr self Bool+widgetCompositeChild = readAttrFromBoolProperty "composite-child"++-- %hash c:4f01 d:bd3+-- | The style of the widget, which contains information about how it will+-- look (colors etc).+--+widgetStyle :: WidgetClass self => Attr self Style+widgetStyle = newAttrFromObjectProperty "style" gTypeStyle++-- | The current visual user interaction state of the widget (insensitive,+-- prelighted, selected etc). See 'StateType' for more information.+--+widgetState :: WidgetClass self => Attr self StateType+widgetState = newAttr+  widgetGetState+  widgetSetState++-- %hash c:e2a4 d:9296+-- | The event mask that decides what kind of GdkEvents this widget gets.+--+-- Default value: 'StructureMask'+--+widgetEvents :: WidgetClass self => Attr self [EventMask]+widgetEvents = newAttrFromFlagsProperty "events"+                 {# call pure unsafe gdk_event_mask_get_type #}++#if GTK_MAJOR_VERSION < 3+-- %hash c:ba80+-- | The mask that decides what kind of extension events this widget gets.+--+-- Default value: 'ExtensionEventsNone'+--+-- Removed in Gtk3.+widgetExtensionEvents :: WidgetClass self => Attr self [ExtensionMode]+widgetExtensionEvents = newAttr+  widgetGetExtensionEvents+  widgetSetExtensionEvents+#endif++-- | Whether to expand in both directions. Setting this sets both 'widgetHExpand' and 'widgetVExpand'+--+-- Default value: @False@+--+widgetExpand :: WidgetClass self => Attr self Bool+widgetExpand = newAttrFromBoolProperty "expand"++-- | Whether to expand horizontally. See 'widgetSetHExpand'+--+-- Default value: @False@+--+widgetHExpand :: WidgetClass self => Attr self Bool+widgetHExpand = newAttrFromBoolProperty "hexpand"++-- | Whether to use the “hexpand” property. See 'widgetGetHExpandSet'.+--+-- Default value: @False@+--+widgetHExpandSet :: WidgetClass self => Attr self Bool+widgetHExpandSet = newAttrFromBoolProperty "hexpand-set"++-- | Whether to expand vertically. See 'widgetSetVExpand'.+--+-- Default value: @False@+--+widgetVExpand :: WidgetClass self => Attr self Bool+widgetVExpand = newAttrFromBoolProperty "vexpand"++-- | Whether to use the “vexpand” property. See 'widgetGetVExpandSet'.+--+-- Default value: @False@+--+widgetVExpandSet :: WidgetClass self => Attr self Bool+widgetVExpandSet = newAttrFromBoolProperty "vexpand-set"++-- %hash c:1605 d:48ea+-- | Whether 'widgetShowAll' should not affect this widget.+--+-- Default value: @False@+--+widgetNoShowAll :: WidgetClass self => Attr self Bool+widgetNoShowAll = newAttrFromBoolProperty "no-show-all"++-- %hash c:cd8d d:59b2+-- | \'childVisible\' property. See 'widgetGetChildVisible' and+-- 'widgetSetChildVisible'+--+widgetChildVisible :: WidgetClass self => Attr self Bool+widgetChildVisible = newAttr+  widgetGetChildVisible+  widgetSetChildVisible++#if GTK_MAJOR_VERSION < 3+-- %hash c:a20a d:646f+-- | \'colormap\' property. See 'widgetGetColormap' and 'widgetSetColormap'+--+-- Removed in Gtk3.+widgetColormap :: WidgetClass self => Attr self Colormap+widgetColormap = newAttr+  widgetGetColormap+  widgetSetColormap+#endif++-- %hash c:a7fd d:55b8+-- | \'compositeName\' property. See 'widgetGetCompositeName' and+-- 'widgetSetCompositeName'+--+widgetCompositeName :: (WidgetClass self, GlibString string) => ReadWriteAttr self (Maybe string) string+widgetCompositeName = newAttr+  widgetGetCompositeName+  widgetSetCompositeName++-- %hash c:6c03 d:ce3b+-- | \'direction\' property. See 'widgetGetDirection' and 'widgetSetDirection'+--+widgetDirection :: WidgetClass self => Attr self TextDirection+widgetDirection = newAttr+  widgetGetDirection+  widgetSetDirection++-- | Sets the text of tooltip to be the given string, which is marked up with the Pango text markup+-- language. Also see 'tooltipSetMarkup'.+--+-- This is a convenience property which will take care of getting the tooltip shown if the given string+-- is not \"\": 'hasTooltip' will automatically be set to 'True' and there will be taken care of+-- 'queryTooltip' in the default signal handler.+--+-- Default value: \"\"+--+-- * Available since Gtk+ version 2.12+--+widgetTooltipMarkup :: (WidgetClass self, GlibString markup) => Attr self (Maybe markup)+widgetTooltipMarkup = newAttrFromMaybeStringProperty "tooltip-markup"++-- | Sets the text of tooltip to be the given string.+--+-- Also see 'tooltipSetText'.+--+-- This is a convenience property which will take care of getting the tooltip shown if the given string+-- is not \"\": 'hasTooltip' will automatically be set to 'True' and there will be taken care of+-- 'queryTooltip' in the default signal handler.+--+-- Default value: \"\"+--+-- * Available since Gtk+ version 2.12+--+widgetTooltipText :: (WidgetClass self, GlibString string) => Attr self (Maybe string)+widgetTooltipText = newAttrFromMaybeStringProperty "tooltip-text"++-- | Enables or disables the emission of 'queryTooltip' on widget. A value of 'True' indicates that widget+-- can have a tooltip, in this case the widget will be queried using 'queryTooltip' to determine+-- whether it will provide a tooltip or not.+--+-- Note that setting this property to 'True' for the first time will change the event masks of the+-- 'Windows' of this widget to include leave-notify and motion-notify events. This cannot and will not+-- be undone when the property is set to 'False' again.+--+-- Default value: 'False'+--+-- * Available since Gtk+ version 2.12+--+widgetHasTooltip :: WidgetClass self => Attr self Bool+widgetHasTooltip = newAttrFromBoolProperty "has-tooltip"++#if GTK_CHECK_VERSION(2,20,0)+-- | Determines if the widget style has been looked up through the rc mechanism.+widgetHasRcStyle :: WidgetClass self => self+                 -> IO Bool -- ^ returns 'True' if the widget has been looked up through the rc mechanism, 'False' otherwise.+widgetHasRcStyle self =+  liftM toBool $+  {#call gtk_widget_has_rc_style #}+    (toWidget self)++-- | Determines whether widget is realized.+widgetGetRealized :: WidgetClass self => self+                  -> IO Bool  -- ^ returns 'True' if widget is realized, 'False' otherwise+widgetGetRealized self =+  liftM toBool $+  {#call gtk_widget_get_realized #}+    (toWidget self)++-- | Whether the widget is mapped.+widgetGetMapped :: WidgetClass self => self+                -> IO Bool  -- ^ returns 'True' if the widget is mapped, 'False' otherwise.+widgetGetMapped self =+  liftM toBool $+  {#call gtk_widget_get_mapped #}+    (toWidget self)++-- | Marks the @widget@ as being realized. This function must only be called+-- after all 'DrawWindows' for the widget have been created and registered.+--+-- This function should only ever be called in a derived widget's “realize”+-- or “unrealize” implementation.+widgetSetRealized :: WidgetClass widget => widget+ -> Bool -- ^ @realized@ @True@ to mark the widget realized.+ -> IO ()+widgetSetRealized widget realized =+  {# call widget_set_realized #}+    (toWidget widget)+    (fromBool realized)++-- | Marks the @widget@ as being realized.+--+-- This function should only ever be called in a derived widget's “map” or+-- “unmap” implementation.+widgetSetMapped :: WidgetClass widget => widget+ -> Bool -- ^ @mapped@ @True@ to mark the widget as mapped.+ -> IO ()+widgetSetMapped widget mapped =+  {# call widget_set_mapped #}+    (toWidget widget)+    (fromBool mapped)+#endif++#if GTK_CHECK_VERSION(3,0,0)+-- | Returns the style context associated to @widget@.+widgetGetStyleContext :: WidgetClass widget+                      => widget          -- ^ @widget@ : a @Widget@+                      -> IO StyleContext -- ^ a @StyleContext@+widgetGetStyleContext widget =+  makeNewGObject mkStyleContext $+  {# call gtk_widget_get_style_context #}+  (toWidget widget)++-- | Gets the value of the `widgetHAlign` property.+--+-- For backwards compatibility reasons this method will never return AlignBaseline,+-- but instead it will convert it to AlignFill. Baselines are not supported for+-- horizontal alignment.+--+widgetGetHAlign :: WidgetClass self => self -> IO Align+widgetGetHAlign self =+  liftM (toEnum . fromIntegral) $+  {# call gtk_widget_get_halign #}+    (toWidget self)++-- | Sets the horizontal alignment of widget. See the 'widgetHAlign' property.+--+widgetSetHAlign :: WidgetClass self => self -> Align -> IO ()+widgetSetHAlign self align =+  {# call gtk_widget_set_halign #}+    (toWidget self)+    (fromIntegral $ fromEnum align)++-- | Gets the value of the 'widgetVAlign' property.+--+-- For backwards compatibility reasons this method will never return AlignBaseline,+-- but instead it will convert it to AlignFill. If your widget want to support+-- baseline aligned children it must use 'widgetGetVAlignWithBaseline', or+-- 'widgetVAlign', which will also report the true value.+widgetGetVAlign :: WidgetClass self => self -> IO Align+widgetGetVAlign self =+  liftM (toEnum . fromIntegral) $+  {# call gtk_widget_get_valign #}+    (toWidget self)++#if GTK_CHECK_VERSION(3,10,0)+-- | Gets the value of the 'widgetVAlign' property, including AlignBaseline.+widgetGetVAlignWithBaseline :: WidgetClass self => self -> IO Align+widgetGetVAlignWithBaseline self =+  liftM (toEnum . fromIntegral) $+  {# call gtk_widget_get_valign_with_baseline #}+    (toWidget self)+#endif++-- | Sets the vertical alignment of widget . See the 'widgetVAlign' property.+widgetSetVAlign :: WidgetClass self => self -> Align -> IO ()+widgetSetVAlign self align =+  {# call gtk_widget_set_valign #}+    (toWidget self)+    (fromIntegral $ fromEnum align)+#endif++--------------------+-- Signals+++-- %hash c:4cf5 d:af3f+-- | The widget appears on screen.+--+mapSignal :: WidgetClass self => Signal self (IO ())+mapSignal = Signal (connect_NONE__NONE "map")++-- %hash c:e33e d:af3f+-- | The widget disappears from the screen.+--+unmapSignal :: WidgetClass self => Signal self (IO ())+unmapSignal = Signal (connect_NONE__NONE "unmap")++-- %hash c:1f7f d:af3f+-- | The widget should allocate any resources needed, in particular, the+--   widget's 'DrawWindow' is created. If you connect to this signal and+--   you rely on some of these resources to be present, you have to use+--   'System.Glib.Signals.after'.+--+realize :: WidgetClass self => Signal self (IO ())+realize = Signal (connect_NONE__NONE "realize")++-- %hash c:7948 d:af3f+-- | The widget should deallocate any resources. This signal is emitted before+-- the widget is destroyed.+--+unrealize :: WidgetClass self => Signal self (IO ())+unrealize = Signal (connect_NONE__NONE "unrealize")++-- %hash c:9f6f d:af3f+-- | Query the widget for the size it likes to+-- have.+--+-- * A parent container emits this signal to its child to query the needed+--   height and width of the child. There is not guarantee that the widget+--   will actually get this area.+--+sizeRequest :: WidgetClass self => Signal self (IO Requisition)+sizeRequest = Signal (\after w fun ->+  connect_PTR__NONE "size-request" after w+    (\rqPtr -> fun >>= \req -> unless (rqPtr==nullPtr) $ poke rqPtr req))++-- %hash c:8ec5 d:af3f+-- | Inform widget about the size it has.+--+-- * After querying a widget for the size it wants to have (through emitting+--   the @\"sizeRequest\"@ signal) a container will emit this signal to+--   inform the widget about the real size it should occupy.+--+sizeAllocate :: WidgetClass self => Signal self (Allocation -> IO ())+sizeAllocate = Signal (connect_BOXED__NONE "size-allocate" peek)++-- %hash c:ae3e d:af3f+-- | The widget is shown.+--+showSignal :: WidgetClass self => Signal self (IO ())+showSignal = Signal (connect_NONE__NONE "show")++-- %hash c:f589 d:af3f+-- | The widget is hidden.+--+hideSignal :: WidgetClass self => Signal self (IO ())+hideSignal = Signal (connect_NONE__NONE "hide")++-- %hash c:a285 d:af3f+-- | The widget gains focus via the given user action.+--+focus :: WidgetClass self => Signal self (DirectionType -> IO Bool)+focus = Signal (connect_ENUM__BOOL "focus")++-- %hash c:78ae d:af3f+-- | The state of the widget (input focus, insensitive, etc.) has changed.+--+stateChanged :: WidgetClass self => Signal self (StateType -> IO ())+stateChanged = Signal (connect_ENUM__NONE "state-changed")++#if GTK_CHECK_VERSION(3,0,0)+connect_FLAGS__NONE ::+  (Flags a, GObjectClass obj) => SignalName ->+  ConnectAfter -> obj ->+  ([a] -> IO ()) ->+  IO (ConnectId obj)+connect_FLAGS__NONE signal after obj user =+  connectGeneric signal after obj action+  where action :: Ptr GObject -> Int -> IO ()+        action _ flags1 =+          failOnGError $+          user (toFlags flags1)++-- | The state of the widget (input focus, insensitive, etc.) has changed.+--+stateFlagsChanged :: WidgetClass self => Signal self ([StateFlags] -> IO ())+stateFlagsChanged = Signal (connect_FLAGS__NONE "state-flags-changed")+#endif++-- %hash c:bef2 d:1d66+-- | The 'parentSet' signal is emitted when a new parent has been set on a+-- widget. The parameter is the new parent.+--+parentSet :: WidgetClass self => Signal self (Maybe Widget -> IO ())+parentSet = Signal (connect_MOBJECT__NONE "parent-set")++-- %hash c:7e2b d:4049+-- | Emitted when there is a change in the hierarchy to which a widget belong.+-- More precisely, a widget is anchored when its toplevel ancestor is a+-- 'Window'. This signal is emitted when a widget changes from un-anchored to+-- anchored or vice-versa.+--+hierarchyChanged :: WidgetClass self => Signal self (Maybe Widget -> IO ())+hierarchyChanged = Signal (connect_MOBJECT__NONE "hierarchy-changed")++-- %hash c:5894 d:ba10+-- | The 'styleSet' signal is emitted when a new style has been set on a+-- widget. Note that style-modifying functions like 'widgetModifyBase' also+-- cause this signal to be emitted.+--+styleSet :: WidgetClass self => Signal self (Style -> IO ())+styleSet = Signal (connect_OBJECT__NONE "style-set")++-- %hash c:6bb1 d:af3f+-- | The default direction of text writing has changed.+--+directionChanged :: WidgetClass self => Signal self (TextDirection -> IO ())+directionChanged = Signal (connect_ENUM__NONE "direction-changed")++-- %hash c:c28c d:d116+-- | The 'grabNotify' signal is emitted when a widget becomes shadowed by a+-- Gtk+ grab (not a pointer or keyboard grab) on another widget, or when it+-- becomes unshadowed due to a grab being removed.+--+-- A widget is shadowed by a 'grabAdd' when the topmost grab widget in the+-- grab stack of its window group is not its ancestor.+--+grabNotify :: WidgetClass self => Signal self (Bool -> IO ())+grabNotify = Signal (connect_BOOL__NONE "grab-notify")++-- %hash c:e06c d:a681+-- | This signal gets emitted whenever a widget should pop up a+-- context-sensitive menu. This usually happens through the standard key+-- binding mechanism; by pressing a certain key while a widget is focused, the+-- user can cause the widget to pop up a menu. For example, the 'Entry' widget+-- creates a menu with clipboard commands.+--+popupMenuSignal :: WidgetClass self => Signal self (IO Bool)+popupMenuSignal = Signal (connect_NONE__BOOL "popup-menu")++-- | Specify what kind of help the user wants.+{#enum GtkWidgetHelpType as WidgetHelpType {underscoreToCase} deriving (Eq,Show) #}++-- %hash c:b18e d:af3f+-- | Tell the widget to show an explanatory help text. Should return @True@+--   if help has been shown.+--+showHelp :: WidgetClass self => Signal self (WidgetHelpType -> IO Bool)+showHelp = Signal (connect_ENUM__BOOL "show-help")++-- %hash c:6a8f d:af3f+-- | The set of keyboard accelerators has changed.+--+accelClosuresChanged :: WidgetClass self => Signal self (IO ())+accelClosuresChanged = Signal (connect_NONE__NONE "accel-closures-changed")++-- %hash c:5ca d:af3f+-- | The widget moved to a new screen.+--+screenChanged :: WidgetClass self => Signal self (Screen -> IO ())+screenChanged = Signal (connect_OBJECT__NONE "screen-changed")++-- | Emitted when 'hasTooltip' is 'True' and the 'gtkTooltipTimeout' has expired with the cursor+-- hovering "above" widget; or emitted when widget got focus in keyboard mode.+--+-- Using the given coordinates, the signal handler should determine whether a tooltip should be shown+-- for widget. If this is the case 'True' should be returned, 'False' otherwise.+-- Note if widget got focus in keyboard mode, 'Point' is 'Nothing'.+--+-- The signal handler is free to manipulate tooltip with the therefore destined function calls.+--+-- * Available since Gtk+ version 2.12+--+queryTooltip :: WidgetClass self => Signal self (Widget -> Maybe Point -> Tooltip -> IO Bool)+queryTooltip =+  Signal (\after model user ->+           connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL "query-tooltip"+             after model (\widget x y keyb tooltip ->+                              user widget (if keyb then Nothing else Just (x, y)) tooltip))++#if GTK_CHECK_VERSION(3,0,0)+draw :: WidgetClass self => Signal self (Render ())+draw =+  Signal (\after model (Render user) ->+           connect_PTR__NONE "draw" after model (\ptr -> runReaderT user (Cairo ptr)))+#endif++-- * Events+--+-- An event is a signal that indicates that some low-level interaction like a+-- button or key press, mouse movement, etc. has occurred. In particular,+-- events relate to operations on 'DrawWindow's which are a concept of the+-- underlying OS rather than the logical widget concept. Some widgets have no+-- window and use their parent to receive these events. Widgets normally+-- synthesize more sophistiacted signals from events. For instance, the+-- 'focusIn' and a 'focusOut' signal indicate that the widget gains or looses+-- the input focus. From these events a 'focus' signal is synthesized that+-- indicates what maneuver lead to the input focus change (i.e. a tab or+-- shift-tab key press).+--+-- For applications it is often sufficient to connect to the high-level+-- signals rather than the low-level events. Only in cases where a custom+-- widget is built based on the 'DarwingArea' skeleton, the functionality of+-- such an application-specific widget needs to be implemented using events.+--+-- Every event is passed an 'Event' structure that contains the data of the+-- event. The return value should be @True@ if the handler has dealt with the+-- event and @False@ if the event should be propagated further. For instance,+-- if a key press event that isn't meaningful in the widget, the handler can+-- return @False@ such that the key is handled by the other widgets (the main+-- menu, for instance).+--+++-- Because there are so many similar signals (those that take an Event and+-- return a Bool) we will abstract out the skeleton. As some of these events+-- are emitted at a high rate often a bit has to be set to enable emission.+++eventM :: WidgetClass w => SignalName -> [EventMask] ->+  ConnectAfter -> w -> (EventM t Bool) -> IO (ConnectId w)+eventM name eMask after obj fun = do+  id <- connect_PTR__BOOL name after obj (runReaderT fun)+  widgetAddEvents obj eMask+  return id++-- %hash c:6cc d:af3f+-- | A mouse button has been depressed while the mouse pointer was within the+-- widget area. Sets the widget's 'ButtonPressMask' flag.+--+buttonPressEvent :: WidgetClass self => Signal self (EventM EButton Bool)+buttonPressEvent = Signal (eventM "button_press_event" [ButtonPressMask])++-- %hash c:62e8 d:af3f+-- | A mouse button has been released. Sets the widget's 'ButtonReleaseMask'+-- flag.+--+buttonReleaseEvent :: WidgetClass self => Signal self (EventM EButton Bool)+buttonReleaseEvent = Signal (eventM "button_release_event" [ButtonReleaseMask])++-- %hash c:23e5 d:af3f+-- | The scroll wheel of the mouse has been used.  Sets the widget's+-- 'ScrollMask' flag.+--+scrollEvent :: WidgetClass self => Signal self (EventM EScroll Bool)+scrollEvent = Signal (eventM "scroll_event" [ScrollMask])++-- %hash c:ee92 d:af3f+-- | The mouse pointer has moved. Since receiving all mouse movements is+--   expensive, it is necessary to specify exactly what mouse motions are+--   required by calling 'widgetAddEvents' on this widget with one or more of+--   the following flags:+--+--   * 'PointerMotionMask': Track all movements.+--+--   * 'ButtonMotionMask': Only track movements if a button is depressed.+--+--   * 'Button1MotionMask': Only track movements if the left button is depressed.+--+--   * 'Button2MotionMask': Only track movements if the middle button is depressed.+--+--   * 'Button3MotionMask': Only track movements if the right button is depressed.+--   'PointerMotionHintMask' is a special flag which can be used in+--   combination with any of the above and is used to reduce the number of+--   'motionNotifyEvent's received. Normally a 'motionNotifyEvent' event is+--   received each time the mouse moves. However, if the application spends a+--   lot of time processing the event (updating the display, for example), it+--   can lag behind the position of the mouse. When using+--   'PointerMotionHintMask', fewer 'motionNotifyEvent's will be sent, some of+--   which are marked as a hint. To receive more motion events after a motion+--   hint event, the application needs to asks for more, by calling+--   'Graphics.UI.Gtk.Gdk.EventM.eventRequestMotions'. This effectively limits+--   the rate at which new motion events are received. (Note that you don't+--   need to check if the hint is set as+--   'Graphics.UI.Gtk.Gdk.EventM.eventRequestMotions' does so automatically.)+--+motionNotifyEvent :: WidgetClass self => Signal self (EventM EMotion Bool)+motionNotifyEvent = Signal (eventM "motion_notify_event" [])++-- %hash c:8783 d:3e27+-- | The 'deleteEvent' signal is emitted if a user requests that a toplevel+-- window is closed. The default handler for this signal destroys the window.+-- Calling 'widgetHide' and returning @True@ on reception of this signal will+-- cause the window to be hidden instead, so that it can later be shown again+-- without reconstructing it.+--+deleteEvent :: WidgetClass self => Signal self (EventM EAny Bool)+deleteEvent = Signal (eventM "delete_event" [])++-- %hash c:c408 d:5514+-- | The 'destroyEvent' signal is emitted when a 'DrawWindow' is destroyed.+-- You rarely get this signal, because most widgets disconnect themselves from+-- their window before they destroy it, so no widget owns the window at+-- destroy time. However, you might want to connect to the 'objectDestroy'+-- signal of 'Object'.+--+destroyEvent :: WidgetClass self => Signal self (EventM EAny Bool)+destroyEvent = Signal (eventM "destroy_event" [])++-- %hash c:c79e d:af3f++-- | Instructs the widget to redraw.+--+-- * The 'DrawWindow' that needs to be redrawn is available via+--   'eventWindow'.+--+-- * The part that needs to be redrawn is available via 'eventArea' and+--   'eventRegion'. The options are, in order of efficiency: (a) redraw the+--   entire window, (b) ask for the 'eventArea' and redraw that rectangle, (c)+--   ask for the 'eventRegion' and redraw each of those rectangles.+--+--   Only the exposed region will be updated; see also+--   'drawWindowBeginPaintRegion'.++exposeEvent :: WidgetClass self => Signal self (EventM EExpose Bool)+exposeEvent = Signal (eventM "expose_event" [])++-- %hash c:5ccd d:af3f+-- | A key has been depressed. Sets the widget's 'KeyPressMask' flag.+--+keyPressEvent :: WidgetClass self => Signal self (EventM EKey Bool)+keyPressEvent = Signal (eventM "key_press_event" [KeyPressMask])++-- %hash c:bd29 d:af3f+-- | A key has been released. Sets the widget's 'KeyReleaseMask' flag.+--+keyReleaseEvent :: WidgetClass self => Signal self (EventM EKey Bool)+keyReleaseEvent = Signal (eventM "key_release_event" [KeyReleaseMask])++-- %hash c:602e d:af3f+-- | The mouse pointer has entered the widget. Sets the widget's+-- 'EnterNotifyMask' flag.+--+enterNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)+enterNotifyEvent = Signal (eventM "enter_notify_event" [EnterNotifyMask])++-- %hash c:3bfb d:af3f+-- | The mouse pointer has left the widget. Sets the widget's+-- 'LeaveNotifyMask' flag.+--+leaveNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)+leaveNotifyEvent = Signal (eventM "leave_notify_event" [LeaveNotifyMask])++-- %hash c:2b64 d:af3f+-- | The size of the window has changed.+--+configureEvent :: WidgetClass self => Signal self (EventM EConfigure Bool)+configureEvent = Signal (eventM "configure_event" [])++-- %hash c:427e d:af3f+-- | The widget gets the input focus.  Sets the widget's 'FocusChangeMask' flag.+--+focusInEvent :: WidgetClass self => Signal self (EventM EFocus Bool)+focusInEvent = Signal (eventM "focus_in_event" [FocusChangeMask])++-- %hash c:5281 d:af3f+-- | The widget lost the input focus. Sets the widget's 'FocusChangeMask' flag.+--+focusOutEvent :: WidgetClass self => Signal self (EventM EFocus Bool)+focusOutEvent = Signal (eventM "focus_out_event" [FocusChangeMask])++-- %hash c:63c4 d:af3f+-- | The window is put onto the screen.+--+mapEvent :: WidgetClass self => Signal self (EventM EAny Bool)+mapEvent = Signal (eventM "map_event" [])++-- %hash c:342d d:af3f+-- | The window is taken off the screen.+--+unmapEvent :: WidgetClass self => Signal self (EventM EAny Bool)+unmapEvent = Signal (eventM "unmap_event" [])++-- %hash c:a1dd d:af3f+-- | A 'DrawWindow' may be associated with a set of properties that are+-- identified by a 'PropertyTag'. This event is triggered if a property is+-- changed or deleted. Sets the widget's 'PropertyChangeMask' flag.+--+_propertyNotifyEvent :: WidgetClass self => Signal self (EventM EProperty Bool)+_propertyNotifyEvent = Signal (eventM "property_notify_event" [PropertyChangeMask])++{- not sure if these are useful+-- %hash c:58cc d:af3f+-- |+--+selectionClearEvent :: WidgetClass self => Signal self ({-GdkEventSelection*-} Bool)+selectionClearEvent = Signal (connect_{-GdkEventSelection*-}__BOOL "selection_clear_event")++-- %hash c:4f92 d:af3f+-- |+--+selectionRequestEvent :: WidgetClass self => Signal self ({-GdkEventSelection*-} Bool)+selectionRequestEvent = Signal (connect_{-GdkEventSelection*-}__BOOL "selection_request_event")++-- %hash c:b842 d:af3f+-- |+--+selectionNotifyEvent :: WidgetClass self => Signal self ({-GdkEventSelection*-} Bool)+selectionNotifyEvent = Signal (connect_{-GdkEventSelection*-}__BOOL "selection_notify_event")+-}++-- %hash c:b027 d:af3f+-- | The pen of a graphics tablet was put down. Sets the widget's+-- 'ProximityInMask' flag.+--+proximityInEvent :: WidgetClass self => Signal self (EventM EProximity Bool)+proximityInEvent = Signal (eventM "proximity_in_event" [ProximityInMask])++-- %hash c:faca d:af3f+-- | The pen of a graphics tablet was lifted off the tablet. Sets the widget's+-- 'ProximityOutMask' flag.+--+proximityOutEvent :: WidgetClass self => Signal self (EventM EProximity Bool)+proximityOutEvent = Signal (eventM "proximity_out_event" [ProximityOutMask])++-- %hash c:db2c d:af3f+-- | Emitted when the window visibility status has changed. Sets the widget's+-- 'VisibilityNotifyMask' flag.+--+visibilityNotifyEvent :: WidgetClass self => Signal self (EventM EVisibility Bool)+visibilityNotifyEvent = Signal (eventM "visibility_notify_event" [VisibilityNotifyMask])+{-+-- %hash c:3f5 d:af3f+-- |+--+clientEvent :: WidgetClass self => Signal self ({-GdkEventClient*-} Bool)+clientEvent = Signal (connect_{-GdkEventClient*-}__BOOL "client_event")+-}++-- %hash c:643c d:af3f+-- | Generated when the area of a 'Drawable' being copied using, e.g.+-- 'Graphics.UI.Gtk.Gdk.Drawable.drawDrawable', is completely available.+--+noExposeEvent :: WidgetClass self => Signal self (EventM EAny Bool)+noExposeEvent = Signal (eventM "no_expose_event" [])++-- %hash c:63b6 d:af3f+-- | Emitted when the state of the window changes, i.e. when it is minimized,+-- moved to the top, etc.+--+windowStateEvent :: WidgetClass self => Signal self (EventM EWindowState Bool)+windowStateEvent = Signal (eventM "window_state_event" [])++#if GTK_CHECK_VERSION(2,8,0)+-- %hash c:502a d:e47a+-- | Emitted when a pointer or keyboard grab on a window belonging to @widget@+-- gets broken.+--+-- On X11, this happens when the grab window becomes unviewable (i.e. it or+-- one of its ancestors is unmapped), or if the same application grabs the+-- pointer or keyboard again.+--+-- * Available since Gtk+ version 2.8+--+grabBrokenEvent :: WidgetClass self => Signal self (EventM EGrabBroken Bool)+grabBrokenEvent = Signal (eventM "grab_broken_event" [])+#endif++--------------------+-- Deprecated Signals and Events++#ifndef DISABLE_DEPRECATED++event :: WidgetClass w => SignalName -> [EventMask] ->+  ConnectAfter -> w -> (Event -> IO Bool) -> IO (ConnectId w)+event name eMask after obj fun = do+  id <- connect_BOXED__BOOL name marshalEvent after obj fun+  widgetAddEvents obj eMask+  return id++-- | A Button was pressed.+--+-- * This widget is part of a button which was just pressed. The event passed+--   to the user function is a 'Graphics.UI.Gtk.Gdk.Events.Button' event.+--+onButtonPress, afterButtonPress :: WidgetClass w => w -> (Event -> IO Bool) ->+                                   IO (ConnectId w)+onButtonPress = event "button_press_event" [ButtonPressMask] False+afterButtonPress = event "button_press_event" [ButtonPressMask] True++-- | A Button was released.+--+onButtonRelease, afterButtonRelease :: WidgetClass w => w ->+                                       (Event -> IO Bool) -> IO (ConnectId w)+onButtonRelease = event "button_release_event" [ButtonReleaseMask] False+afterButtonRelease = event "button_release_event" [ButtonReleaseMask] True++-- |+--+onClient, afterClient :: WidgetClass w => w -> (Event -> IO Bool) ->+                         IO (ConnectId w)+onClient = event "client_event" [] False+afterClient = event "client_event" [] True++-- | The widget's status has changed.+--+onConfigure, afterConfigure :: WidgetClass w => w -> (Event -> IO Bool) ->+                               IO (ConnectId w)+onConfigure = event "configure_event" []  False+afterConfigure = event "configure_event" []  True++-- | This signal is emitted when the close icon on the+-- surrounding window is pressed. The default action is to emit the+-- @\"destroy\"@ signal.+--+onDelete, afterDelete :: WidgetClass w => w -> (Event -> IO Bool) ->+                         IO (ConnectId w)+onDelete = event "delete_event" [] False+afterDelete = event "delete_event" [] True++-- | The widget will be destroyed.+--+-- * The widget received a destroy event from the window manager.+--+onDestroyEvent, afterDestroyEvent :: WidgetClass w =>+                                     w -> (Event -> IO Bool) ->+                                     IO (ConnectId w)+onDestroyEvent = event "destroy_event" [] False+afterDestroyEvent = event "destroy_event" [] True++-- | The default text direction was changed.+--+onDirectionChanged, afterDirectionChanged :: WidgetClass w => w ->+                                             (Event -> IO Bool) ->+                                             IO (ConnectId w)+onDirectionChanged = event "direction_changed" [] False+afterDirectionChanged = event "direction_changed" [] True++-- | Mouse cursor entered widget.+--+-- * Contains a 'Crossing' event.+--+onEnterNotify, afterEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) ->+                                   IO (ConnectId w)+onEnterNotify = event "enter_notify_event" [EnterNotifyMask] False+afterEnterNotify = event "enter_notify_event" [EnterNotifyMask] True++-- | Mouse cursor leaves widget.+--+-- * Contains a 'Crossing' event.+--+onLeaveNotify, afterLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) ->+                                   IO (ConnectId w)+onLeaveNotify = event "leave_notify_event" [LeaveNotifyMask] False+afterLeaveNotify = event "leave_notify_event" [LeaveNotifyMask] True++-- | Instructs the widget to redraw.+--+-- * This event is useful for the 'DrawingArea'. On receiving this signal+--   the content of the passed Rectangle or Region needs to be redrawn.+--   The return value should be 'True' if the region was completely redrawn+--   and 'False' if other handlers in the chain should be invoked.+--   If a client will redraw the whole area and is not interested in the+--   extra information in 'Expose', it is more efficient+--   to use 'onExposeRect'.+--+-- * Widgets that are very expensive to re-render, such as an image editor,+--   may prefer to use the 'onExpose' call back which delivers a+--   'Region' in addition to a 'Rectangle'. A 'Region' consists of several+--   rectangles that need redrawing. The simpler 'onExposeRect' event encodes+--   the area to be redrawn as a bounding rectangle which might be easier+--   to deal with in a particular application.+--+onExpose, afterExpose :: WidgetClass w => w -> (Event -> IO Bool) ->+                         IO (ConnectId w)+onExpose = event "expose_event" [] False+afterExpose = event "expose_event" [] True++-- | Expose event delivering a 'Rectangle'.+--+onExposeRect, afterExposeRect ::+    WidgetClass w => w -> (Rectangle -> IO ()) -> IO (ConnectId w)+onExposeRect w act = connect_BOXED__BOOL "expose_event"+  marshExposeRect False w (\r -> act r >> return True)+afterExposeRect w act = connect_BOXED__BOOL "expose_event"+  marshExposeRect True w (\r -> act r >> return True)++-- | This signal is called if the widget receives the input focus.+--+onFocus, afterFocus :: WidgetClass w => w -> (DirectionType -> IO Bool) ->+                       IO (ConnectId w)+onFocus = connect_ENUM__BOOL "focus" False+afterFocus = connect_ENUM__BOOL "focus" True++-- | Widget gains input focus.+--+onFocusIn, afterFocusIn :: WidgetClass w => w -> (Event -> IO Bool) ->+                           IO (ConnectId w)+onFocusIn = event "focus_in_event" [FocusChangeMask] False+afterFocusIn = event "focus_in_event" [FocusChangeMask] True++-- | Widget looses input focus.+--+onFocusOut, afterFocusOut :: WidgetClass w => w -> (Event -> IO Bool) ->+                             IO (ConnectId w)+onFocusOut = event "focus_out_event" [FocusChangeMask] False+afterFocusOut = event "focus_out_event" [FocusChangeMask] True++-- | The widget is about to receive all events.+--+-- * It is possible to redirect all input events to one widget to force the+--   user to use only this widget. Such a situation is initiated by+--   'addGrab'.+--+onGrabFocus, afterGrabFocus :: WidgetClass w => w -> IO () ->+                               IO (ConnectId w)+onGrabFocus = connect_NONE__NONE  "grab_focus" False+afterGrabFocus = connect_NONE__NONE "grab_focus" True++-- | The widget will be destroyed.+--+-- * This is the last signal this widget will receive.+--+onDestroy, afterDestroy :: WidgetClass w => w -> (IO ()) ->+                           IO (ConnectId w)+onDestroy = connect_NONE__NONE "destroy" False+afterDestroy = connect_NONE__NONE "destroy" True++-- | The widget was asked to hide itself.+--+-- * This signal is emitted each time 'widgetHide' is called. Use+--   'onUnmap' when your application needs to be informed+--   when the widget is actually removed from screen.+--+onHide, afterHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)+onHide = connect_NONE__NONE "hide" False+afterHide = connect_NONE__NONE "hide" True++-- | The toplevel window changed.+--+-- * When a subtree of widgets is removed or added from a tree with a toplevel+--   window this signal is emitted. It is emitted on each widget in the+--   detached or attached subtree.+--+onHierarchyChanged, afterHierarchyChanged :: WidgetClass w => w -> IO () ->+                                             IO (ConnectId w)+onHierarchyChanged = connect_NONE__NONE "hierarchy_changed" False+afterHierarchyChanged = connect_NONE__NONE "hierarchy_changed" True++-- | A key was pressed.+--+onKeyPress, afterKeyPress :: WidgetClass w => w -> (Event -> IO Bool) ->+                             IO (ConnectId w)+onKeyPress = event "key_press_event" [KeyPressMask] False+afterKeyPress = event "key_press_event" [KeyPressMask] True++-- | A key was released.+--+onKeyRelease, afterKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) ->+                                 IO (ConnectId w)+onKeyRelease = event "key_release_event" [KeyReleaseMask] False+afterKeyRelease = event "key_release_event" [KeyReleaseMask] True++-- |+--+onMnemonicActivate, afterMnemonicActivate :: WidgetClass w => w ->+                                             (Bool -> IO Bool) ->+                                             IO (ConnectId w)+onMnemonicActivate = connect_BOOL__BOOL "mnemonic_activate" False+afterMnemonicActivate = connect_BOOL__BOOL "mnemonic_activate" True++-- | Track mouse movements.+--+-- * If @hint@ is False, a callback for every movement of the mouse is+--   generated. To avoid a backlog of mouse messages, it is usually sufficient+--   to sent @hint@ to True, generating only one event. The+--   application now has to state that it is ready for the next message by+--   calling 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowGetPointer'.+--+onMotionNotify, afterMotionNotify :: WidgetClass w => w -> Bool ->+                                     (Event -> IO Bool) ->+                                     IO (ConnectId w)+onMotionNotify w hint = event "motion_notify_event"+  (if hint then [PointerMotionMask, PointerMotionHintMask]+           else [PointerMotionMask]) False w+afterMotionNotify w hint = event "motion_notify_event"+  (if hint then [PointerMotionMask, PointerMotionHintMask]+           else [PointerMotionMask]) True w++-- |+--+onParentSet, afterParentSet :: (WidgetClass w, WidgetClass old) => w ->+                               (old -> IO ()) -> IO (ConnectId w)+onParentSet = connect_OBJECT__NONE "parent_set"  False+afterParentSet = connect_OBJECT__NONE "parent_set"  True++-- |+--+onPopupMenu, afterPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)+onPopupMenu = connect_NONE__NONE "popup_menu" False+afterPopupMenu = connect_NONE__NONE "popup_menu" True++-- | The input device became active.+--+-- * This event indicates that a pen of a graphics tablet or similar device is+--   now touching the tablet.+--+onProximityIn, afterProximityIn :: WidgetClass w => w -> (Event -> IO Bool) ->+                                   IO (ConnectId w)+onProximityIn = event "proximity_in_event" [ProximityInMask] False+afterProximityIn = event "proximity_in_event" [ProximityInMask] True++-- | The input device became inactive.+--+-- * The pen was removed from the graphics tablet's surface.+--+onProximityOut, afterProximityOut :: WidgetClass w => w ->+                                     (Event -> IO Bool) -> IO (ConnectId w)+onProximityOut = event "proximity_out_event" [ProximityOutMask] False+afterProximityOut = event "proximity_out_event" [ProximityOutMask] True++-- | This widget's drawing area is about to be+-- destroyed.+--+onRealize, afterRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)+onRealize = connect_NONE__NONE "realize" False+afterRealize = connect_NONE__NONE "realize" True++-- | The mouse wheel has turned.+--+-- * The 'Event' is always 'Scroll'.+--+onScroll, afterScroll :: WidgetClass w => w -> (Event -> IO Bool) ->+                         IO (ConnectId w)+onScroll = event "scroll_event" [ScrollMask] False+afterScroll = event "scroll_event" [ScrollMask] True++-- | The widget was asked to show itself.+--+-- * This signal is emitted each time 'widgetShow' is called. Use+--   'onMap' when your application needs to be informed when+--   the widget is actually shown.+--+onShow, afterShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)+onShow = connect_NONE__NONE "show" False+afterShow = connect_NONE__NONE "show" True++-- | Inform widget about the size it has.+--+-- * After querying a widget for the size it wants to have (through emitting+--   the @\"sizeRequest\"@ signal) a container will emit this signal to+--   inform the widget about the real size it should occupy.+--+onSizeAllocate, afterSizeAllocate :: WidgetClass w => w ->+                                     (Allocation -> IO ()) -> IO (ConnectId w)+onSizeAllocate = connect_BOXED__NONE "size_allocate" peek False+afterSizeAllocate = connect_BOXED__NONE "size_allocate" peek True++-- | Query the widget for the size it likes to+-- have.+--+-- * A parent container emits this signal to its child to query the needed+--   height and width of the child. There is not guarantee that the widget+--   will actually get this area.+--+onSizeRequest, afterSizeRequest :: WidgetClass w => w -> (IO Requisition) ->+                                   IO (ConnectId w)+onSizeRequest w fun = connect_PTR__NONE "size_request" False w (\rqPtr -> do+  req <- fun+  unless (rqPtr==nullPtr) $ poke rqPtr req)+afterSizeRequest w fun = connect_PTR__NONE "size_request" True w (\rqPtr -> do+  req <- fun+  unless (rqPtr==nullPtr) $ poke rqPtr req)++-- |+--+onStateChanged, afterStateChanged :: WidgetClass w => w ->+                                     (StateType -> IO ()) -> IO (ConnectId w)+onStateChanged = connect_ENUM__NONE "state_changed" False+afterStateChanged = connect_ENUM__NONE "state_changed" True++-- | The widget was removed from screen.+--+onUnmap, afterUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)+onUnmap = connect_NONE__NONE "unmap" False+afterUnmap = connect_NONE__NONE "unmap" True++-- | This widget's drawing area is about to be+-- destroyed.+--+onUnrealize, afterUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)+onUnrealize = connect_NONE__NONE "unrealize" False+afterUnrealize = connect_NONE__NONE "unrealize" True++-- |+--+onVisibilityNotify, afterVisibilityNotify :: WidgetClass w => w ->+                                             (Event -> IO Bool) ->+                                             IO (ConnectId w)+onVisibilityNotify =+  event "visibility_notify_event" [VisibilityNotifyMask] False+afterVisibilityNotify =+  event "visibility_notify_event" [VisibilityNotifyMask] True++-- | -- onWindowState, afterWindowState :: WidgetClass w => w -> (Event -> IO Bool) ->                                    IO (ConnectId w)
Graphics/UI/Gtk/ActionMenuToolbar/Action.chs view
@@ -30,7 +30,7 @@ -- module Graphics.UI.Gtk.ActionMenuToolbar.Action ( -- * Detail--- +-- -- | Actions represent operations that the user can be perform, along with -- some information how it should be presented in the interface. Each action -- provides methods to create icons, menu items and toolbar items representing@@ -146,15 +146,14 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems@@ -171,11 +170,11 @@ -- See "Graphics.UI.Gtk.ActionMenuToolbar.UIManager#XML-UI" for information on -- allowed action names. ---actionNew :: -    String        -- ^ @name@ - A unique name for the action- -> String        -- ^ @label@ - the label displayed in menu items and on+actionNew :: GlibString string+ => string        -- ^ @name@ - A unique name for the action+ -> string        -- ^ @label@ - the label displayed in menu items and on                   -- buttons- -> Maybe String  -- ^ @tooltip@ - a tooltip for the action+ -> Maybe string  -- ^ @tooltip@ - a tooltip for the action  -> Maybe StockId -- ^ @stockId@ - the stock icon to display in widgets                   -- representing the action  -> IO Action@@ -196,7 +195,7 @@  -- | Returns the name of the action. ---actionGetName :: ActionClass self => self -> IO String+actionGetName :: (ActionClass self, GlibString string) => self -> IO string actionGetName self =   {# call gtk_action_get_name #}     (toAction self)@@ -301,7 +300,7 @@   makeNewObject mkWidget $   {# call gtk_action_create_tool_item #}     (toAction self)-    + #if GTK_MAJOR_VERSION < 3 -- | Connects a widget to an action object as a proxy. Synchronises various -- properties of the action with the widget (such as label text, icon, tooltip,@@ -366,8 +365,8 @@ -- -- * Available since Gtk+ version 2.6 ---actionGetAccelPath :: ActionClass self => self- -> IO (Maybe String) -- ^ returns the accel path for this action, or+actionGetAccelPath :: (ActionClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns the accel path for this action, or                       -- @Nothing@ if none is set. actionGetAccelPath self =   {# call gtk_action_get_accel_path #}@@ -379,8 +378,8 @@ -- the action will have this accel path, so that their accelerators are -- consistent. ---actionSetAccelPath :: ActionClass self => self- -> String -- ^ @accelPath@ - the accelerator path+actionSetAccelPath :: (ActionClass self, GlibString string) => self+ -> string -- ^ @accelPath@ - the accelerator path  -> IO () actionSetAccelPath self accelPath =   withUTFString accelPath $ \accelPathPtr ->@@ -404,35 +403,35 @@ -- -- Default value: \"\" ---actionName :: ActionClass self => Attr self String+actionName :: GlibString string => ActionClass self => Attr self string actionName = newAttrFromStringProperty "name"  -- | The label used for menu items and buttons that activate this action. -- -- Default value: \"\" ---actionLabel :: ActionClass self => Attr self String+actionLabel :: GlibString string => ActionClass self => Attr self string actionLabel = newAttrFromStringProperty "label"  -- | A shorter label that may be used on toolbar buttons. -- -- Default value: \"\" ---actionShortLabel :: ActionClass self => Attr self String+actionShortLabel :: GlibString string => ActionClass self => Attr self string actionShortLabel = newAttrFromStringProperty "short-label"  -- | A tooltip for this action. -- -- Default value: @Nothing@ ---actionTooltip :: ActionClass self => Attr self (Maybe String)+actionTooltip :: GlibString string => ActionClass self => Attr self (Maybe string) actionTooltip = newAttrFromMaybeStringProperty "tooltip"  -- | The stock icon displayed in widgets representing this action. -- -- Default value: @Nothing@ ---actionStockId :: ActionClass self => Attr self (Maybe String)+actionStockId :: GlibString string => ActionClass self => Attr self (Maybe string) actionStockId = newAttrFromMaybeStringProperty "stock_id"  -- | Whether the toolbar item is visible when the toolbar is in a horizontal@@ -506,7 +505,7 @@ -- -- * Available since Gtk+ version 2.6 ---actionAccelPath :: ActionClass self => ReadWriteAttr self (Maybe String) String+actionAccelPath :: GlibString string => ActionClass self => ReadWriteAttr self (Maybe string) string actionAccelPath = newAttr   actionGetAccelPath   actionSetAccelPath@@ -515,11 +514,11 @@ #if GTK_CHECK_VERSION(2,20,0) -- | If 'True', the action's menu item proxies will ignore the 'menuImages' setting and always show -- their image, if available.--- +-- -- Use this property if the menu item would be useless or hard to use without their image.--- +-- -- Default value: 'False'--- +-- -- Since 2.20 actionAlwaysShowImage :: ActionClass self => Attr self Bool actionAlwaysShowImage = newAttrFromBoolProperty "always-show-image"
Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.ActionMenuToolbar.ActionGroup ( -- * Detail--- +-- -- | Actions are organised into groups. An action group is essentially a map -- from names to 'Action' objects. --@@ -65,7 +65,7 @@   ActionEntry(..),   ToggleActionEntry(..),   RadioActionEntry(..),-      + -- * Constructors   actionGroupNew, @@ -106,15 +106,13 @@ #endif   ) where -import Control.Monad	(liftM, foldM, when)+import Control.Monad    (liftM, foldM, when)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject,-					 makeNewGObject, destroyFunPtr) {#import Graphics.UI.Gtk.Types#} import System.Glib.Signals (on) @@ -131,8 +129,8 @@ -- | Creates a new 'ActionGroup' object. The name of the action group is used -- when associating keybindings with the actions. ---actionGroupNew :: -    String         -- ^ @name@ - the name of the action group.+actionGroupNew :: GlibString string+ => string         -- ^ @name@ - the name of the action group.  -> IO ActionGroup actionGroupNew name =   wrapNewGObject mkActionGroup $@@ -145,8 +143,8 @@  -- | Gets the name of the action group. ---actionGroupGetName :: ActionGroup- -> IO String   -- ^ returns the name of the action group.+actionGroupGetName :: GlibString string => ActionGroup+ -> IO string   -- ^ returns the name of the action group. actionGroupGetName self =   {# call gtk_action_group_get_name #}     self@@ -190,8 +188,8 @@  -- | Looks up an action in the action group by name. ---actionGroupGetAction :: ActionGroup- -> String            -- ^ @actionName@ - the name of the action+actionGroupGetAction :: GlibString string => ActionGroup+ -> string            -- ^ @actionName@ - the name of the action  -> IO (Maybe Action) -- ^ returns the action, or @Nothing@ if no action by                       -- that name exists actionGroupGetAction self actionName =@@ -230,9 +228,9 @@ -- -- Accel paths are set to @\<Actions>\/group-name\/action-name@. ---actionGroupAddActionWithAccel :: ActionClass action => ActionGroup+actionGroupAddActionWithAccel :: (ActionClass action, GlibString string) => ActionGroup  -> action       -- ^ @action@ - the action to add- -> Maybe String -- ^ @accelerator@ - the accelerator for the action, in the+ -> Maybe string -- ^ @accelerator@ - the accelerator for the action, in the                  -- format understood by 'acceleratorParse', or \"\" for no                  -- accelerator, or @Nothing@ to use the stock accelerator  -> IO ()@@ -251,18 +249,18 @@     self     (toAction action) --- Note: for these next few funtions we cannot use the C version because the--- callback doesn't allow for propper memory management. So like pygtk we--- implement them natively since they are only convenience functions afterall.+-- Note: for these next few functions we cannot use the C version because the+-- callback doesn't allow for proper memory management. So like pygtk we+-- implement them natively since they are only convenience functions after all.   -- | A description of an action. data ActionEntry = ActionEntry {-       actionEntryName        :: String,-       actionEntryLabel       :: String,-       actionEntryStockId     :: Maybe String,-       actionEntryAccelerator :: Maybe String,-       actionEntryTooltip     :: Maybe String,+       actionEntryName        :: DefaultGlibString,+       actionEntryLabel       :: DefaultGlibString,+       actionEntryStockId     :: Maybe DefaultGlibString,+       actionEntryAccelerator :: Maybe DefaultGlibString,+       actionEntryTooltip     :: Maybe DefaultGlibString,        actionEntryCallback    :: IO ()      } @@ -284,11 +282,11 @@  -- | A description of an action for an entry that can be toggled. data ToggleActionEntry = ToggleActionEntry {-       toggleActionName        :: String,-       toggleActionLabel       :: String,-       toggleActionStockId     :: Maybe String,-       toggleActionAccelerator :: Maybe String,-       toggleActionTooltip     :: Maybe String,+       toggleActionName        :: DefaultGlibString,+       toggleActionLabel       :: DefaultGlibString,+       toggleActionStockId     :: Maybe DefaultGlibString,+       toggleActionAccelerator :: Maybe DefaultGlibString,+       toggleActionTooltip     :: Maybe DefaultGlibString,        toggleActionCallback    :: IO (),        toggleActionIsActive    :: Bool      }@@ -312,11 +310,11 @@  -- | A description of an action for an entry that provides a multiple choice. data RadioActionEntry = RadioActionEntry {-       radioActionName        :: String,-       radioActionLabel       :: String,-       radioActionStockId     :: Maybe String,-       radioActionAccelerator :: Maybe String,-       radioActionTooltip     :: Maybe String,+       radioActionName        :: DefaultGlibString,+       radioActionLabel       :: DefaultGlibString,+       radioActionStockId     :: Maybe DefaultGlibString,+       radioActionAccelerator :: Maybe DefaultGlibString,+       radioActionTooltip     :: Maybe DefaultGlibString,        radioActionValue       :: Int      } @@ -333,18 +331,18 @@                        -- initially, or -1 if no action should be activated  -> (RadioAction -> IO ()) -- ^ @onChange@ - the callback for the changed signal  -> IO ()-actionGroupAddRadioActions self entries value onChange = do+actionGroupAddRadioActions self entries initialValue onChange = do   group <- foldM-    (\group (n, RadioActionEntry name label stockId+    (\group (RadioActionEntry name label stockId                accelerator tooltip value) -> do     action <- radioActionNew name label tooltip stockId value     case group of       Nothing -> return ()       Just group -> radioActionSetGroup action group-    when (n == value) (toggleActionSetActive action True)+    when (initialValue == value) (toggleActionSetActive action True)     actionGroupAddActionWithAccel self action accelerator     return (Just action))-    Nothing (zip [0..] entries)+    Nothing entries   case group of       Nothing -> return ()       Just group -> do@@ -357,8 +355,8 @@ -- If you\'re using \'gettext\', it is enough to set the translation domain -- with 'actionGroupSetTranslationDomain'. ---actionGroupSetTranslateFunc :: ActionGroup- -> (String -> IO String) -- ^ @(\label -> ...)@ - a translation function+actionGroupSetTranslateFunc :: GlibString string => ActionGroup+ -> (string -> IO string) -- ^ @(\label -> ...)@ - a translation function  -> IO () actionGroupSetTranslateFunc self func = do   funcPtr <- mkTranslateFunc $ \strPtr _ -> do@@ -382,8 +380,8 @@ -- If you\'re not using \'gettext\' for localization, see -- 'actionGroupSetTranslateFunc'. ---actionGroupSetTranslationDomain :: ActionGroup- -> String      -- ^ @domain@ - the translation domain to use for \'dgettext\'+actionGroupSetTranslationDomain :: GlibString string => ActionGroup+ -> string      -- ^ @domain@ - the translation domain to use for \'dgettext\'                 -- calls  -> IO () actionGroupSetTranslationDomain self domain =@@ -397,9 +395,9 @@ -- -- * Available since Gtk+ version 2.6 ---actionGroupTranslateString :: ActionGroup- -> String      -- ^ @string@ - a string- -> IO String   -- ^ returns the translation of @string@+actionGroupTranslateString :: GlibString string => ActionGroup+ -> string      -- ^ @string@ - a string+ -> IO string   -- ^ returns the translation of @string@ actionGroupTranslateString self string =   withUTFString string $ \stringPtr ->   {# call gtk_action_group_translate_string #}@@ -415,7 +413,7 @@ -- -- Default value: \"\" ---actionGroupName :: Attr ActionGroup String+actionGroupName :: GlibString string => Attr ActionGroup string actionGroupName = newAttrFromStringProperty "name"  -- | Whether the action group is enabled.
Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs view
@@ -19,7 +19,7 @@ --  Lesser General Public License for more details. -- -- TODO---   I don't know what the elemnt type of the group GSList is for+--   I don't know what the element type of the group GSList is for --   radioActionSetGroup / radioActionGetGroup -- --   Also, the signals clash with those from other modules@@ -35,7 +35,7 @@ -- module Graphics.UI.Gtk.ActionMenuToolbar.RadioAction ( -- * Detail--- +-- -- | A 'RadioAction' is similar to 'RadioMenuItem'. A number of radio actions -- can be linked together so that only one may be active at any one time. @@ -72,7 +72,7 @@  -- * Signals   radioActionChanged,-  + #ifndef DISABLE_DEPRECATED -- * Deprecated   onRadioActionChanged,@@ -81,14 +81,13 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems@@ -103,11 +102,11 @@ -- and set the accelerator for the action, call -- 'Graphics.UI.Gtk.ActionMenuToolbar.ActionGroup.actionGroupAddActionWithAccel'. ---radioActionNew :: -    String         -- ^ @name@ - A unique name for the action- -> String         -- ^ @label@ - The label displayed in menu items and on+radioActionNew :: GlibString string+ => string         -- ^ @name@ - A unique name for the action+ -> string         -- ^ @label@ - The label displayed in menu items and on                    -- buttons- -> Maybe String   -- ^ @tooltip@ - A tooltip for this action+ -> Maybe string   -- ^ @tooltip@ - A tooltip for this action  -> Maybe StockId  -- ^ @stockId@ - The stock icon to display in widgets                    -- representing this action  -> Int            -- ^ @value@ - The value which 'radioActionGetCurrentValue'
Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs view
@@ -64,14 +64,12 @@ #endif   ) where -import Control.Monad	(liftM)-import Data.Maybe (fromMaybe)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties import System.Glib.UTFString-import System.Glib.GObject		(wrapNewGObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -84,15 +82,15 @@ -- and set the accelerator for the action, call -- 'actionGroupAddActionWithAccel'. ---recentActionNew ::-    String -- ^ @name@ - a unique name for the action- -> Maybe String -- ^ @label@ - the label displayed in menu items and on buttons, or 'Nothing'- -> Maybe String -- ^ @tooltip@ - a tooltip for the action, or 'Nothing' - -> Maybe String -- ^ @stockId@ - the stock icon to display in widgets representing+recentActionNew :: GlibString string+ => string -- ^ @name@ - a unique name for the action+ -> Maybe string -- ^ @label@ - the label displayed in menu items and on buttons, or 'Nothing'+ -> Maybe string -- ^ @tooltip@ - a tooltip for the action, or 'Nothing'+ -> Maybe string -- ^ @stockId@ - the stock icon to display in widgets representing            -- the action, or 'Nothing'  -> IO RecentAction recentActionNew name label tooltip stockId =-  wrapNewGObject mkRecentAction $ +  wrapNewGObject mkRecentAction $   liftM castPtr $   withUTFString name $ \namePtr ->   maybeWith withUTFString label $ \labelPtr ->@@ -108,12 +106,12 @@ -- and set the accelerator for the action, call -- 'actionGroupAddActionWithAccel'. ---recentActionNewForManager :: RecentManagerClass manager =>-    String  -- ^ @name@ - a unique name for the action- -> Maybe String  -- ^ @label@ - the label displayed in menu items and on buttons,+recentActionNewForManager :: (RecentManagerClass manager, GlibString string) =>+    string  -- ^ @name@ - a unique name for the action+ -> Maybe string  -- ^ @label@ - the label displayed in menu items and on buttons,             -- or 'Nothing'- -> Maybe String  -- ^ @tooltip@ - a tooltip for the action, or 'Nothing'- -> Maybe String  -- ^ @stockId@ - the stock icon to display in widgets representing+ -> Maybe string  -- ^ @tooltip@ - a tooltip for the action, or 'Nothing'+ -> Maybe string  -- ^ @stockId@ - the stock icon to display in widgets representing             -- the action, or 'Nothing'  -> Maybe manager -- ^ @manager@ - a 'RecentManager', or 'Nothing' for the             -- default 'RecentManager'
Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.ActionMenuToolbar.ToggleAction ( -- * Detail--- +-- -- | A 'ToggleAction' corresponds roughly to a 'CheckMenuItem'. It has an -- \"active\" state specifying whether the action has been checked or not. @@ -77,13 +77,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems@@ -98,11 +97,11 @@ -- and set the accelerator for the action, call -- 'Graphics.UI.Gtk.ActionMenuToolbar.ActionGroup.actionGroupAddActionWithAccel'. ---toggleActionNew :: -    String          -- ^ @name@ - A unique name for the action- -> String          -- ^ @label@ - The label displayed in menu items and on+toggleActionNew :: GlibString string+ => string          -- ^ @name@ - A unique name for the action+ -> string          -- ^ @label@ - The label displayed in menu items and on                     -- buttons- -> Maybe String    -- ^ @tooltip@ - A tooltip for the action+ -> Maybe string    -- ^ @tooltip@ - A tooltip for the action  -> Maybe StockId   -- ^ @stockId@ - The stock icon to display in widgets                     -- representing the action  -> IO ToggleAction
Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs view
@@ -33,13 +33,13 @@ -- module Graphics.UI.Gtk.ActionMenuToolbar.UIManager ( -- * Detail--- +-- -- | A 'UIManager' constructs a user interface (menus and toolbars) from one -- or more UI definitions, which reference actions from one or more action -- groups.  -- ** UI Definitions--- +-- -- | #XML-UI# The UI definitions are specified in an XML format which can be roughly -- described by the following DTD. --@@ -53,11 +53,11 @@ -- > <!ELEMENT toolitem     EMPTY > -- > <!ELEMENT separator    EMPTY > -- > <!ELEMENT accelerator  EMPTY >--- > <!ATTLIST menubar      name                  #IMPLIED +-- > <!ATTLIST menubar      name                  #IMPLIED -- >                        action                #IMPLIED >--- > <!ATTLIST toolbar      name                  #IMPLIED +-- > <!ATTLIST toolbar      name                  #IMPLIED -- >                        action                #IMPLIED >--- > <!ATTLIST popup        name                  #IMPLIED +-- > <!ATTLIST popup        name                  #IMPLIED -- >                        action                #IMPLIED > -- > <!ATTLIST placeholder  name                  #IMPLIED -- >                        action                #IMPLIED@@ -144,26 +144,26 @@ -- \"top\", the widget is prepended, otherwise it is appended.  -- ** UI Merging--- +-- -- | The most remarkable feature of 'UIManager' is that it can overlay a set -- of menuitems and toolitems over another one, and demerge them later. -- -- Merging is done based on the names of the XML elements. Each element is--- identified by a path which consists of the names of its anchestors,+-- identified by a path which consists of the names of its ancestors, -- separated by slashes. For example, the menuitem named \"Left\" in the -- example above has the path @\/ui\/menubar\/JustifyMenu\/Left@ and the -- toolitem with the same name has path -- @\/ui\/toolbar1\/JustifyToolItems\/Left@.  -- ** Accelerators--- +-- -- | Every action has an accelerator path. Accelerators are installed together -- with menuitem proxies, but they can also be explicitly added with -- \<accelerator> elements in the UI definition. This makes it possible to have -- accelerators for actions even if they have no visible proxies.  -- ** Smart Separators--- +-- -- | The separators created by 'UIManager' are \"smart\", i.e. they do not -- show up in the UI unless they end up between two visible menu or tool items. -- Separators which are located at the very beginning or end of the menu or@@ -177,7 +177,7 @@ -- following an expanding separator are effectively right-aligned.  -- ** Empty Menus--- +-- -- | Submenus pose similar problems to separators inconnection with merging. -- It is impossible to know in advance whether they will end up empty after -- merging. 'UIManager' offers two ways to treat empty submenus:@@ -188,7 +188,7 @@ -- -- The behaviour is chosen based on the \"hide_if_empty\" property of the -- action to which the submenu is associated.--- +--  -- * Class Hierarchy -- |@@ -253,17 +253,16 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Flags		(Flags, fromFlags)+import System.Glib.Flags                (Flags, fromFlags) import System.Glib.UTFString import System.Glib.GList import System.Glib.GError import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -375,8 +374,8 @@ -- Note that the widget found by following a path that ends in a \<menu> -- element is the menuitem to which the menu is attached, not the menu itself. ---uiManagerGetWidget :: UIManager- -> String            -- ^ @path@ - a path+uiManagerGetWidget :: GlibString string => UIManager+ -> string            -- ^ @path@ - a path  -> IO (Maybe Widget) -- ^ returns the widget found by following the path, or                       -- @Nothing@ if no widget was found. uiManagerGetWidget self path =@@ -405,8 +404,8 @@ -- | Looks up an action by following a path. See 'uiManagerGetWidget' for more -- information about paths. ---uiManagerGetAction :: UIManager- -> String            -- ^ @path@ - a path+uiManagerGetAction :: GlibString string => UIManager+ -> string            -- ^ @path@ - a path  -> IO (Maybe Action) -- ^ returns the action whose proxy widget is found by                       -- following the path, or @Nothing@ if no widget was                       -- found.@@ -422,8 +421,8 @@ -- -- If a parse error occurres, an exception is thrown. ---uiManagerAddUiFromString :: UIManager- -> String    -- ^ @buffer@ - the string to parse+uiManagerAddUiFromString :: GlibString string => UIManager+ -> string    -- ^ @buffer@ - the string to parse  -> IO MergeId -- ^ returns The merge id for the merged UI. The merge id can be                -- used to unmerge the UI with 'uiManagerRemoveUi'. uiManagerAddUiFromString self buffer =@@ -441,8 +440,8 @@ -- -- If a parse or IO error occurres, an exception is thrown. ---uiManagerAddUiFromFile :: UIManager- -> String    -- ^ @filename@ - the name of the file to parse+uiManagerAddUiFromFile :: GlibString string => UIManager+ -> string    -- ^ @filename@ - the name of the file to parse  -> IO MergeId -- ^ returns The merge id for the merged UI. The merge id can be               -- used to unmerge the UI with 'uiManagerRemoveUi'. uiManagerAddUiFromFile self filename =@@ -468,12 +467,12 @@ -- If @path@ points to a menuitem or toolitem, the new element will be -- inserted before or after this item, depending on @top@. ---uiManagerAddUi :: UIManager+uiManagerAddUi :: GlibString string => UIManager  -> MergeId             -- ^ @mergeId@ - the merge id for the merged UI, see                         -- 'uiManagerNewMergeId'- -> String              -- ^ @path@ - a path- -> String              -- ^ @name@ - the name for the added UI element- -> Maybe String        -- ^ @action@ - the name of the action to be proxied,+ -> string              -- ^ @path@ - a path+ -> string              -- ^ @name@ - the name for the added UI element+ -> Maybe string        -- ^ @action@ - the name of the action to be proxied,                         -- or @Nothing@ to add a separator  -> [UIManagerItemType] -- ^ @type@ - the type of UI element to add.  -> Bool                -- ^ @top@ - if @True@, the UI element is added before@@ -506,8 +505,8 @@  -- | Creates a UI definition of the merged UI. ---uiManagerGetUi :: UIManager- -> IO String -- ^ returns string containing an XML representation of the+uiManagerGetUi :: GlibString string => UIManager+ -> IO string -- ^ returns string containing an XML representation of the               -- merged UI. uiManagerGetUi self =   {# call gtk_ui_manager_get_ui #}@@ -520,7 +519,7 @@ -- an idle function. A typical example where this function is useful is to -- enforce that the menubar and toolbar have been added to the main window -- before showing it:--- +-- -- > do -- >   containerAdd window vbox -- >   onAddWidget merge (addWidget vbox)@@ -554,7 +553,7 @@ -- -- Default value: @\"\<ui\>\\n\<\/ui\>\\n\"@ ---uiManagerUi :: ReadAttr UIManager String+uiManagerUi :: GlibString string => ReadAttr UIManager string uiManagerUi = readAttrFromStringProperty "ui"  --------------------
Graphics/UI/Gtk/Builder.chs view
@@ -48,7 +48,7 @@ -- A 'Builder' holds a reference to all objects that it has constructed and -- drops these references when it is finalized. This finalization can cause -- the destruction of non-widget objects or widgets which are not contained--- in a toplevel window. For toplevel windows constructed by a builder, it +-- in a toplevel window. For toplevel windows constructed by a builder, it -- is the responsibility of the user to perform 'widgetDestroy' to get rid -- of them and all the widgets they contain. --@@ -100,7 +100,6 @@ import System.Glib.GError import System.Glib.GList import System.Glib.UTFString-import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -123,10 +122,10 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'BuilderError'. ---builderAddFromFile :: Builder -> FilePath -> IO ()+builderAddFromFile :: GlibFilePath fp => Builder -> fp -> IO () builderAddFromFile builder path =   propagateGError $ \errPtrPtr ->-  withUTFString path $ \pathPtr ->+  withUTFFilePath path $ \pathPtr ->   {# call unsafe builder_add_from_file #}     builder pathPtr errPtrPtr     >> return ()@@ -138,7 +137,7 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'BuilderError'. ---builderAddFromString :: Builder -> String -> IO ()+builderAddFromString :: GlibString string => Builder -> string -> IO () builderAddFromString builder str =   propagateGError $ \errPtrPtr ->   withUTFStringLen str $ \(strPtr, strLen) ->@@ -155,14 +154,14 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'BuilderError'. ---builderAddObjectsFromFile ::-    Builder- -> FilePath- -> [String] -- ^ Object IDs+builderAddObjectsFromFile :: (GlibString string, GlibFilePath fp)+ => Builder+ -> fp+ -> [string] -- ^ Object IDs  -> IO () builderAddObjectsFromFile builder path ids =   propagateGError $ \errPtrPtr ->-  withUTFString path $ \pathPtr ->+  withUTFFilePath path $ \pathPtr ->   withUTFStringArray0 ids $ \idsPtr ->   {# call unsafe builder_add_objects_from_file #}     builder pathPtr idsPtr errPtrPtr@@ -176,10 +175,10 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'BuilderError'. ---builderAddObjectsFromString ::-    Builder- -> String- -> [String] -- ^ Object IDs+builderAddObjectsFromString :: GlibString string+ => Builder+ -> string+ -> [string] -- ^ Object IDs  -> IO () builderAddObjectsFromString builder str ids =   propagateGError $ \errPtrPtr ->@@ -195,8 +194,8 @@  -- | Gets the object with the given name. Note that this computation does -- not increment the reference count of the returned object.-builderGetObjectRaw :: Builder- -> String           -- The ID of the object in the UI file, eg \"button1\".+builderGetObjectRaw :: GlibString string => Builder+ -> string           -- The ID of the object in the UI file, eg \"button1\".  -> IO (Maybe GObject) builderGetObjectRaw builder name =   withUTFString name $ \namePtr ->@@ -211,11 +210,11 @@ -- If the object with the given ID is not of the requested type, an -- exception will be thrown. ---builderGetObject :: GObjectClass cls =>+builderGetObject :: (GObjectClass cls, GlibString string) =>     Builder  -> (GObject -> cls) -- ^ A dynamic cast function which returns an object                      -- of the expected type, eg 'castToButton'- -> String           -- The ID of the object in the UI file, eg \"button1\".+ -> string           -- The ID of the object in the UI file, eg \"button1\".  -> IO cls builderGetObject builder cast name = do   raw <- builderGetObjectRaw builder name@@ -235,14 +234,14 @@     >>= mapM (makeNewGObject mkGObject . return)  -- | Sets the translation domain of the 'Builder'.-builderSetTranslationDomain :: Builder -> Maybe String -> IO ()+builderSetTranslationDomain :: GlibString string => Builder -> Maybe string -> IO () builderSetTranslationDomain builder domain =   maybeWith withUTFString domain $ \domainPtr ->   {# call unsafe builder_set_translation_domain #}     builder domainPtr  -- | Gets the translation domain of the 'Builder'.-builderGetTranslationDomain :: Builder -> IO (Maybe String)+builderGetTranslationDomain :: GlibString string => Builder -> IO (Maybe string) builderGetTranslationDomain builder =   {# call unsafe builder_get_translation_domain #}     builder
Graphics/UI/Gtk/Buttons/Button.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Widget Button --@@ -27,7 +28,7 @@ -- module Graphics.UI.Gtk.Buttons.Button ( -- * Detail--- +-- -- | The 'Button' widget is generally used to attach a function to that is -- called when the button is pressed. The various signals and how to use them -- are outlined below.@@ -136,16 +137,16 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Enums	(ReliefStyle(..), PositionType(..))+import Graphics.UI.Gtk.General.Enums    (ReliefStyle(..), PositionType(..)) import Graphics.UI.Gtk.General.StockItems  {# context lib="gtk" prefix="gtk" #}@@ -164,8 +165,8 @@  -- | Creates a 'Button' widget with a 'Label' child containing the given text. ---buttonNewWithLabel :: -    String    -- ^ @label@ - The text you want the 'Label' to hold.+buttonNewWithLabel :: GlibString string+ => string    -- ^ @label@ - The text you want the 'Label' to hold.  -> IO Button buttonNewWithLabel label =   makeNewObject mkButton $@@ -180,8 +181,8 @@ -- underlined character represents a keyboard accelerator called a mnemonic. -- Pressing Alt and that key activates the button. ---buttonNewWithMnemonic :: -    String    -- ^ @label@ - The text of the button, with an underscore in+buttonNewWithMnemonic :: GlibString string+ => string    -- ^ @label@ - The text of the button, with an underscore in               -- front of the mnemonic character  -> IO Button buttonNewWithMnemonic label =@@ -196,14 +197,14 @@ -- If @stockId@ is unknown, then it will be treated as a mnemonic label (as -- for 'buttonNewWithMnemonic'). ---buttonNewFromStock :: +buttonNewFromStock ::     StockId   -- ^ @stockId@ - the name of the stock item  -> IO Button buttonNewFromStock stockId =   makeNewObject mkButton $   liftM (castPtr :: Ptr Widget -> Ptr Button) $   withUTFString stockId $ \stockIdPtr ->-  throwIfNull "buttonNewFromStock: Invalid stock identifier." $ +  throwIfNull "buttonNewFromStock: Invalid stock identifier." $   {# call unsafe button_new_from_stock #}     stockIdPtr @@ -268,42 +269,12 @@   {# call unsafe button_get_relief #}     (toButton self) -#if GTK_CHECK_VERSION(2,4,0)--- %hash c:d8cb d:1e7d--- | If the child of the button is a 'Misc' or 'Alignment', this property can--- be used to control it's horizontal alignment. 0.0 is left aligned, 1.0 is--- right aligned.------ Allowed values: [0,1]------ Default value: 0.5------ * Available since Gtk+ version 2.4----buttonXAlign :: ButtonClass self => Attr self Float-buttonXAlign = newAttrFromFloatProperty "xalign"---- %hash c:ce4e d:4fec--- | If the child of the button is a 'Misc' or 'Alignment', this property can--- be used to control it's vertical alignment. 0.0 is top aligned, 1.0 is--- bottom aligned.------ Allowed values: [0,1]------ Default value: 0.5------ * Available since Gtk+ version 2.4----buttonYAlign :: ButtonClass self => Attr self Float-buttonYAlign = newAttrFromFloatProperty "yalign"-#endif- -- | Sets the text of the label of the button. This text is also used -- to select the stock item if 'buttonSetUseStock' is used. -- -- This will also clear any previously set labels. ---buttonSetLabel :: ButtonClass self => self -> String -> IO ()+buttonSetLabel :: (ButtonClass self, GlibString string) => self -> string -> IO () buttonSetLabel self label =   withUTFString label $ \labelPtr ->   {# call button_set_label #}@@ -316,7 +287,7 @@ -- This will be the case if you create an empty button with 'buttonNew' to use -- as a container. ---buttonGetLabel :: ButtonClass self => self -> IO String+buttonGetLabel :: (ButtonClass self, GlibString string) => self -> IO string buttonGetLabel self = do   strPtr <- {# call unsafe button_get_label #}     (toButton self)@@ -442,7 +413,7 @@ #endif  #if GTK_CHECK_VERSION(2,6,0)--- | Gets the widget that is currenty set as the image of the button. This may+-- | Gets the widget that is currently set as the image of the button. This may -- have been explicitly set by 'buttonSetImage' or constructed by -- 'buttonNewFromStock'. --@@ -497,11 +468,11 @@ #endif  #if GTK_CHECK_VERSION(2,22,0)--- | Returns the button's event window if it is realized, 'Nothing' otherwise.  +-- | Returns the button's event window if it is realized, 'Nothing' otherwise. -- -- * Available since Gtk+ version 2.22 ---buttonGetEventWindow :: ButtonClass self => self +buttonGetEventWindow :: ButtonClass self => self                        -> IO (Maybe DrawWindow) -- ^ returns button's event window or 'Nothing' buttonGetEventWindow self =   maybeNull (makeNewGObject mkDrawWindow) $@@ -517,7 +488,7 @@ -- -- Default value: @\"\"@ ---buttonLabel :: ButtonClass self => Attr self String+buttonLabel :: (ButtonClass self, GlibString string) => Attr self string buttonLabel = newAttr   buttonGetLabel   buttonSetLabel
Graphics/UI/Gtk/Buttons/CheckButton.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Buttons.CheckButton ( -- * Detail--- +-- -- | A 'CheckButton' places a discrete 'ToggleButton' next to a widget, -- (usually a 'Label'). See the section on 'ToggleButton' widgets for more -- information about toggle\/check buttons.@@ -60,11 +60,11 @@   checkButtonNewWithMnemonic,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -82,8 +82,8 @@  -- | Creates a new 'CheckButton' with a 'Label' to the right of it. ---checkButtonNewWithLabel :: -    String         -- ^ @label@ - the text for the check button.+checkButtonNewWithLabel :: GlibString string+ => string         -- ^ @label@ - the text for the check button.  -> IO CheckButton checkButtonNewWithLabel label =   makeNewObject mkCheckButton $@@ -96,8 +96,8 @@ -- using 'Graphics.UI.Gtk.Display.Label.labelNewWithMnemonic', so underscores -- in @label@ indicate the mnemonic for the check button. ---checkButtonNewWithMnemonic :: -    String         -- ^ @label@ - The text of the button, with an underscore+checkButtonNewWithMnemonic :: GlibString string+ => string         -- ^ @label@ - The text of the button, with an underscore                    -- in front of the mnemonic character  -> IO CheckButton checkButtonNewWithMnemonic label =
Graphics/UI/Gtk/Buttons/LinkButton.chs view
@@ -84,15 +84,14 @@ #endif   ) where -import Control.Monad	(liftM, unless)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#}  {# context lib="gtk" prefix="gtk" #} @@ -103,8 +102,8 @@  -- | Creates a new 'LinkButton' with the URI as its text. ---linkButtonNew ::-    String -- ^ @uri@ - a valid URI+linkButtonNew :: GlibString string+ => string -- ^ @uri@ - a valid URI  -> IO LinkButton linkButtonNew uri =   makeNewObject mkLinkButton $@@ -115,9 +114,9 @@  -- | Creates a new 'LinkButton' containing a label. ---linkButtonNewWithLabel ::-    String -- ^ @uri@ - a valid URI- -> String -- ^ @label@ - the text of the button+linkButtonNewWithLabel :: GlibString string+ => string -- ^ @uri@ - a valid URI+ -> string -- ^ @label@ - the text of the button  -> IO LinkButton linkButtonNewWithLabel uri label =   makeNewObject mkLinkButton $@@ -145,7 +144,7 @@       func str   {# call link_button_set_uri_hook #} pfPtr (castFunPtrToPtr pfPtr) destroyFunPtr   freeHaskellFunPtr pfPtr-  + {#pointer LinkButtonUriFunc#}  foreign import ccall "wrapper" mkLinkButtonUriFunc ::@@ -157,19 +156,19 @@ -- Attributes  -- | The URI bound to this button.--- +-- -- Default value: \"\"--- +-- -- * Available since Gtk+ version 2.10 ---linkButtonURI :: LinkButtonClass self => Attr self String+linkButtonURI :: (LinkButtonClass self, GlibString string) => Attr self string linkButtonURI = newAttrFromStringProperty "uri"  #if GTK_CHECK_VERSION(2,14,0) -- | The 'visited' state of this button. A visited link is drawn in a different color.--- +-- -- Default value: 'False'--- +-- -- * Available since Gtk+ version 2.14 -- linkButtonVisited :: LinkButtonClass self => Attr self Bool
Graphics/UI/Gtk/Buttons/RadioButton.chs view
@@ -33,7 +33,7 @@ -- module Graphics.UI.Gtk.Buttons.RadioButton ( -- * Detail--- +-- -- | A single radio button performs the same basic function as a -- 'CheckButton', as its position in the object hierarchy reflects. It is only -- when multiple radio buttons are grouped together that they become a@@ -58,27 +58,27 @@ -- -- * How to create a group of two radio buttons. ----- > +-- > -- > createRadioButtons :: IO () -- > createRadioButtons = do -- >   window <- windowNew -- >   box <- vBoxNew True 2--- >   +-- > -- >   -- Create a radio button with a Entry widget -- >   radio1 <- radioButtonNew -- >   entry <- entryNew -- >   containerAdd radio1 entry--- >   +-- > -- >   -- Create a radio button with a label -- >   radio2 <- radioButtonNewWithLabelFromWidget -- >               radio1 "I'm the second radio button."--- >   +-- > -- >   -- Pack them into a box, then show all the widgets -- >   boxPackStart box radio1 PackGrow 2 -- >   boxPackStart box radio2 PackGrow 2 -- >   containerAdd window box -- >   widgetShowAll window--- > +-- > -- -- When an unselected button in the group is clicked the clicked button -- receives the \"toggled\" signal, as does the previously selected button.@@ -114,7 +114,7 @@   radioButtonNewWithLabelFromWidget,   radioButtonNewWithMnemonicFromWidget, -  -- * Compatibilty aliases+  -- * Compatibility aliases   radioButtonNewJoinGroup,   radioButtonNewJoinGroupWithLabel,   radioButtonNewJoinGroupWithMnemonic,@@ -140,13 +140,13 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.GList import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -167,7 +167,7 @@  -- | Creates a new 'RadioButton' with a text label. ---radioButtonNewWithLabel :: String -> IO RadioButton+radioButtonNewWithLabel :: GlibString string => string -> IO RadioButton radioButtonNewWithLabel label =   makeNewObject mkRadioButton $   liftM (castPtr :: Ptr Widget -> Ptr RadioButton) $@@ -181,8 +181,8 @@ -- so underscores in @label@ indicate the mnemonic -- for the button. ---radioButtonNewWithMnemonic :: -    String         -- ^ @label@ - the text of the button, with an underscore+radioButtonNewWithMnemonic :: GlibString string+ => string         -- ^ @label@ - the text of the button, with an underscore                    -- in front of the mnemonic character  -> IO RadioButton radioButtonNewWithMnemonic label =@@ -197,7 +197,7 @@ -- which @groupMember@ belongs. As with 'radioButtonNew', a widget should be -- packed into the radio button. ---radioButtonNewFromWidget :: +radioButtonNewFromWidget ::     RadioButton    -- ^ @groupMember@ - a member of an existing radio button                    -- group, to which the new radio button will be added.  -> IO RadioButton@@ -210,10 +210,10 @@ -- | Creates a new 'RadioButton' with a text label, adding it to the same group -- as the group to which @groupMember@ belongs. ---radioButtonNewWithLabelFromWidget :: -    RadioButton    -- ^ @groupMember@ - a member of an existing radio button+radioButtonNewWithLabelFromWidget :: GlibString string+ => RadioButton    -- ^ @groupMember@ - a member of an existing radio button                    -- group, to which the new radio button will be added.- -> String         -- ^ @label@ - a text string to display next to the radio+ -> string         -- ^ @label@ - a text string to display next to the radio                    -- button.  -> IO RadioButton radioButtonNewWithLabelFromWidget group label =@@ -229,10 +229,10 @@ -- 'Graphics.UI.Gtk.Display.Label.labelNewWithMnemonic', -- so underscores in @label@ indicate the mnemonic for the button. ---radioButtonNewWithMnemonicFromWidget :: -    RadioButton    -- ^ @groupMember@ - a member of an existing radio button+radioButtonNewWithMnemonicFromWidget :: GlibString string+ => RadioButton    -- ^ @groupMember@ - a member of an existing radio button                    -- group, to which the new radio button will be added.- -> String         -- ^ @label@ - the text of the button, with an underscore+ -> string         -- ^ @label@ - the text of the button, with an underscore                    -- in front of the mnemonic character  -> IO RadioButton radioButtonNewWithMnemonicFromWidget group label =@@ -244,7 +244,7 @@     labelPtr  -- | Alias for 'radioButtonNewFromWidget'.-radioButtonNewJoinGroup :: +radioButtonNewJoinGroup ::     RadioButton    -- ^ @groupMember@ - a member of an existing radio button                    -- group, to which the new radio button will be added.  -> IO RadioButton@@ -252,20 +252,20 @@ {-# DEPRECATED radioButtonNewJoinGroup "use radioButtonNewFromWidget instead" #-}  -- | Alias for 'radioButtonNewWithLabelFromWidget'.-radioButtonNewJoinGroupWithLabel :: -    RadioButton    -- ^ @groupMember@ - a member of an existing radio button+radioButtonNewJoinGroupWithLabel :: GlibString string+ => RadioButton    -- ^ @groupMember@ - a member of an existing radio button                    -- group, to which the new radio button will be added.- -> String         -- ^ @label@ - a text string to display next to the radio+ -> string         -- ^ @label@ - a text string to display next to the radio                    -- button.  -> IO RadioButton radioButtonNewJoinGroupWithLabel = radioButtonNewWithLabelFromWidget {-# DEPRECATED radioButtonNewJoinGroupWithLabel "use radioButtonNewWithLabelFromWidget instead" #-}  -- | Alias for 'radioButtonNewWithMnemonicFromWidget'.-radioButtonNewJoinGroupWithMnemonic :: -    RadioButton    -- ^ @groupMember@ - a member of an existing radio button+radioButtonNewJoinGroupWithMnemonic :: GlibString string+ => RadioButton    -- ^ @groupMember@ - a member of an existing radio button                    -- group, to which the new radio button will be added.- -> String         -- ^ @label@ - the text of the button, with an underscore+ -> string         -- ^ @label@ - the text of the button, with an underscore                    -- in front of the mnemonic character  -> IO RadioButton radioButtonNewJoinGroupWithMnemonic = radioButtonNewWithMnemonicFromWidget@@ -318,7 +318,7 @@ -- | Emitted when the group of radio buttons that a radio button belongs to -- changes. This is emitted when a radio button switches from being alone to -- being part of a group of 2 or more buttons, or vice-versa, and when a--- buttton is moved from one group of 2 or more buttons to a different one, but+-- button is moved from one group of 2 or more buttons to a different one, but -- not when the composition of the group that a button belongs to changes. -- -- * Available since Gtk+ version 2.4@@ -336,7 +336,7 @@ -- | Emitted when the group of radio buttons that a radio button belongs to -- changes. This is emitted when a radio button switches from being alone to -- being part of a group of 2 or more buttons, or vice-versa, and when a--- buttton is moved from one group of 2 or more buttons to a different one, but+-- button is moved from one group of 2 or more buttons to a different one, but -- not when the composition of the group that a button belongs to changes. -- onGroupChanged, afterGroupChanged :: RadioButtonClass self => self
Graphics/UI/Gtk/Buttons/ScaleButton.chs view
@@ -81,14 +81,14 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject)+import Graphics.UI.Gtk.General.Structs  (IconSize(..)) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -106,13 +106,13 @@ -- | Creates a 'ScaleButton', with a range between @min@ and @max@, with a -- stepping of @step@. ---scaleButtonNew ::-    IconSize -- ^ @size@ - a stock icon size+scaleButtonNew :: GlibString string+ => 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@+ -> [string] -- ^ @icons@  -> IO ScaleButton scaleButtonNew size min max step icons =   makeNewObject mkScaleButton $@@ -129,8 +129,8 @@ -- Methods  -- | Sets the icons to be used by the scale button. For details, see the "icons" property.-scaleButtonSetIcons :: ScaleButtonClass self => self- -> [String] -- ^ @icons@+scaleButtonSetIcons :: (ScaleButtonClass self, GlibString string) => self+ -> [string] -- ^ @icons@  -> IO () scaleButtonSetIcons self icons =   withUTFStringArray0 icons $ \iconsPtr ->@@ -177,13 +177,13 @@ -- 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"@@ -197,16 +197,16 @@ -- | 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 :: (ScaleButtonClass self, GlibString string) => ReadWriteAttr self [string] (Maybe [string]) scaleButtonIcons =   newAttr (objectGetPropertyBoxedOpaque (peekUTFStringArray0 . castPtr) gtype "search-path")           (objectSetPropertyBoxedOpaque (\dirs f -> maybeWith withUTFStringArray0 dirs (f . castPtr)) gtype "search-path")@@ -222,13 +222,13 @@ 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")
Graphics/UI/Gtk/Buttons/ToggleButton.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Buttons.ToggleButton ( -- * Detail--- +-- -- | A 'ToggleButton' is a 'Button' which will remain \'pressed-in\' when -- clicked. Clicking again will cause the toggle button to return to its normal -- state.@@ -92,13 +92,13 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -118,8 +118,8 @@  -- | Creates a new toggle button with a text label. ---toggleButtonNewWithLabel :: -    String          -- ^ @label@ - a string containing the message to be+toggleButtonNewWithLabel :: GlibString string+ => string          -- ^ @label@ - a string containing the message to be                     -- placed in the toggle button.  -> IO ToggleButton toggleButtonNewWithLabel label =@@ -134,8 +134,8 @@ -- so underscores in @label@ indicate the -- mnemonic for the button. ---toggleButtonNewWithMnemonic :: -    String          -- ^ @label@ - the text of the button, with an underscore+toggleButtonNewWithMnemonic :: GlibString string+ => string          -- ^ @label@ - the text of the button, with an underscore                     -- in front of the mnemonic character  -> IO ToggleButton toggleButtonNewWithMnemonic label =
Graphics/UI/Gtk/Buttons/VolumeButton.chs view
@@ -61,10 +61,10 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Cairo.chs view
@@ -25,9 +25,9 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) ----- --- Gtk specific functions to for redering with Cairo. --+-- Gtk specific functions to for rendering with Cairo.+-- -- Cairo is a graphics library that supports vector graphics and image -- compositing that can be used with Gdk. -- The Cairo API is an addition to Gdk\/Gtk (rather than a replacement).@@ -52,12 +52,14 @@   -- * Functions for the 'Render' monad. #if GTK_MAJOR_VERSION < 3   renderWithDrawable,-  region, #else+  getClipRectangle,   renderWithDrawWindow, #endif+  region,   setSourceColor,   setSourcePixbuf,+  rectangle,   updateContext,   createLayout,   updateLayout,@@ -86,11 +88,11 @@ {#import Graphics.Rendering.Cairo.Types#} as Cairo #endif import qualified Graphics.Rendering.Cairo.Internal as Cairo.Internal-import qualified Graphics.Rendering.Cairo as Cairo import Graphics.Rendering.Cairo.Internal (Render(Render)) import Control.Monad.Reader import Graphics.UI.Gtk.General.Structs (Rectangle(..)) #endif+import Control.Monad (unless, liftM)  {# context lib="gdk" prefix="gdk" #} @@ -128,6 +130,20 @@                           unless (status == Cairo.StatusSuccess) $                             fail =<< Cairo.Internal.statusToString status)           (\context -> runReaderT (Cairo.Internal.runRender m) context)++-- | Compute a bounding box in user coordinates covering the area inside+-- the current clip. It rounds the bounding box to integer coordinates.+-- Returns 'Nothing' indicating if a clip area doesn't exist.+getClipRectangle :: Render (Maybe Rectangle)+getClipRectangle = Render $ do+  cr <- ask+  liftIO $ alloca $ \rectPtr -> do+    ok <- {# call unsafe gdk_cairo_get_clip_rectangle #}+      cr+      (castPtr rectPtr)+    if ok /= 0+      then fmap Just (peek rectPtr)+      else return Nothing #endif  -- | Sets the given pixbuf as the source pattern for the Cairo context. The@@ -156,16 +172,12 @@       cr       (castPtr rectPtr) -#if GTK_MAJOR_VERSION < 3 -- | Adds the given region to the current path of the 'Render' context.------ Removed in Gtk3. region :: Region -> Render () region region = Render $ do   cr <- ask   liftIO $ {# call unsafe gdk_cairo_region #}     cr     region-#endif  #endif
Graphics/UI/Gtk/Display/AccelLabel.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Display.AccelLabel ( -- * Detail--- +-- -- | The 'AccelLabel' widget is a subclass of 'Label' that also displays an -- accelerator key on the right of the label text, e.g. \'Ctl+S\'. It is -- commonly used in menus to show the keyboard short-cuts for commands.@@ -42,7 +42,7 @@ -- 'accelLabelSetAccelWidget' is called with the 'MenuItem' as the second -- argument. The 'AccelLabel' will now display \'Ctl+S\' after its label. ----- Note that creating a 'MenuItem' with +-- Note that creating a 'MenuItem' with -- 'Graphics.UI.Gtk.MenuComboToolbar.MenuItem.menuItemNewWithLabel' (or one of -- the similar functions for 'CheckMenuItem' and 'RadioMenuItem') automatically -- adds a 'AccelLabel' to the 'MenuItem' and calls 'accelLabelSetAccelWidget'@@ -83,12 +83,12 @@   accelLabelAccelWidget,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -98,8 +98,8 @@  -- | Creates a new 'AccelLabel'. ---accelLabelNew :: -    String        -- ^ @string@ - the label string.+accelLabelNew :: GlibString string+ => string        -- ^ @string@ - the label string.  -> IO AccelLabel accelLabelNew string =   makeNewObject mkAccelLabel $
Graphics/UI/Gtk/Display/Image.chs view
@@ -27,7 +27,7 @@ --   only functions are bound that allow loading images from disc or by stock --   names. ----- Another function for extracting the 'Pixbuf' is added for +-- Another function for extracting the 'Pixbuf' is added for --   'CellRenderer'. -- -- |@@ -39,7 +39,7 @@ -- module Graphics.UI.Gtk.Display.Image ( -- * Detail--- +-- -- | The 'Image' widget displays an image. Various kinds of object can be -- displayed as an image; most typically, you would load a 'Pixbuf' (\"pixel -- buffer\") from a file, and then display that. There's a convenience function@@ -92,7 +92,7 @@   castToImage, gTypeImage,   toImage,   ImageType(..),-  + -- * Constructors   imageNewFromFile,   imageNewFromPixbuf,@@ -141,17 +141,16 @@   imageStorageType,   ) where -import Control.Monad	(liftM)+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 System.Glib.GObject		(makeNewGObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.StockItems-import Graphics.UI.Gtk.General.Structs	(IconSize(..))+import Graphics.UI.Gtk.General.Structs  (IconSize(..))  {# context lib="gtk" prefix="gtk" #} @@ -185,11 +184,11 @@ -- The storage type ('imageGetStorageType') of the returned image is not -- defined, it will be whatever is appropriate for displaying the file. ---imageNewFromFile :: FilePath -> IO Image+imageNewFromFile :: GlibFilePath fp => fp -> IO Image imageNewFromFile filename =   makeNewObject mkImage $   liftM (castPtr :: Ptr Widget -> Ptr Image) $-  withUTFString filename $ \filenamePtr ->+  withUTFFilePath filename $ \filenamePtr -> #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3   {# call unsafe gtk_image_new_from_file_utf8 #} #else@@ -247,8 +246,8 @@ -- -- * Available since Gtk+ version 2.6 ---imageNewFromIconName ::-    String   -- ^ @iconName@ - an icon name+imageNewFromIconName :: GlibString string+ => string   -- ^ @iconName@ - an icon name  -> IconSize -- ^ @size@ - a stock icon size  -> IO Image imageNewFromIconName iconName size =@@ -290,9 +289,9 @@  -- | See 'imageNewFromFile' for details. ---imageSetFromFile :: Image -> FilePath -> IO ()+imageSetFromFile :: GlibFilePath fp => Image -> fp -> IO () imageSetFromFile self filename =-  withUTFString filename $ \filenamePtr ->+  withUTFFilePath filename $ \filenamePtr -> #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3   {# call gtk_image_set_from_file_utf8 #} #else@@ -319,8 +318,8 @@ -- -- * Available since Gtk+ version 2.6 ---imageSetFromIconName :: Image- -> String   -- ^ @iconName@ - an icon name+imageSetFromIconName :: GlibString string => Image+ -> string   -- ^ @iconName@ - an icon name  -> IconSize -- ^ @size@ - an icon size  -> IO () imageSetFromIconName self iconName size =@@ -404,14 +403,14 @@ -- -- Default value: \"\" ---imageFile :: Attr Image String+imageFile :: GlibString string => Attr Image string imageFile = newAttrFromStringProperty "file"  -- | Stock ID for a stock image to display. -- -- Default value: \"\" ---imageStock :: Attr Image String+imageStock :: GlibString string => Attr Image string imageStock = newAttrFromStringProperty "stock"  -- | Symbolic size to use for stock icon, icon set or named icon.@@ -443,7 +442,7 @@ -- -- Default value: \"\" ---imageIconName :: Attr Image String+imageIconName :: GlibString string => Attr Image string imageIconName = newAttrFromStringProperty "icon-name" #endif 
Graphics/UI/Gtk/Display/InfoBar.chs view
@@ -42,7 +42,7 @@ -- at the bottom, 'InfoBar' has a vertical action area at the side. -- -- The API of 'InfoBar' is very similar to 'Dialog', allowing you to add--- buttons to the action area with 'infoBarAddButton'. +-- buttons to the action area with 'infoBarAddButton'. -- The sensitivity of action widgets can be controlled -- with 'infoBarSetResponseSensitive'. To add widgets to the main content area -- of a 'InfoBar', use 'infoBarGetContentArea' and add your widgets to the@@ -94,13 +94,13 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object#}      (makeNewObject) {#import Graphics.UI.Gtk.Windows.MessageDialog#} (MessageType) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}@@ -153,8 +153,8 @@ -- -- * Available since Gtk+ version 2.18 ---infoBarAddButton :: InfoBarClass self => self- -> String    -- ^ @buttonText@ - text of button, or stock ID+infoBarAddButton :: (InfoBarClass self, GlibString string) => self+ -> string    -- ^ @buttonText@ - text of button, or stock ID  -> Int       -- ^ @responseId@ - response ID for the button  -> IO Button -- ^ returns the button widget that was added infoBarAddButton self buttonText responseId =@@ -234,13 +234,13 @@ -- Attributes  -- | The type of the message.--- --- The type is used to determine the colors to use in the info bar. --- +--+-- The type is used to determine the colors to use in the info bar.+-- -- If the type is 'MessageOther', no info bar is painted but the colors are still set.--- +-- -- Default value: 'MessageInfo'--- +-- -- * Available since Gtk+ version 2.18 -- infoBarMessageType :: InfoBarClass self => Attr self MessageType@@ -252,13 +252,13 @@  -- | The 'close' signal is a keybinding signal which gets emitted when the user uses a keybinding to -- dismiss the info bar.--- +-- -- The default binding for this signal is the Escape key.--- +-- -- Since 2.18 infoBarClose :: InfoBarClass self => Signal self (IO ()) infoBarClose = Signal (connect_NONE__NONE "close")-      +  -- | Emitted when an action widget is clicked or the application programmer -- calls 'dialogResponse'. The @responseId@ depends on which action widget was
Graphics/UI/Gtk/Display/Label.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE ScopedTypeVariables #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Widget Label --@@ -28,13 +29,13 @@ -- module Graphics.UI.Gtk.Display.Label ( -- * Detail--- +-- -- | The 'Label' widget displays a small amount of text. As the name implies, -- most labels are used to label another widget such as a 'Button', a -- 'MenuItem', or a 'OptionMenu'.  -- ** Mnemonics--- +-- -- | Labels may contain mnemonics. Mnemonics are underlined characters in the -- label, used for keyboard navigation. Mnemonics are created by providing a -- string with an underscore before the mnemonic character, such as@@ -49,7 +50,7 @@ -- label already inside: To create a mnemonic for a widget alongside the label, -- such as a 'Entry', you have to point the label at the entry with -- 'labelSetMnemonicWidget':--- +-- -- >   -- Pressing Alt+H will activate this button -- >   button <- buttonNew -- >   label <- labelNewWithMnemonic "_Hello"@@ -64,7 +65,7 @@ -- >   labelSetMnemonicWidget label entry  -- ** Markup (styled text)--- +-- -- | To make it easy to format text in a label (changing colors, fonts, etc.), -- label text can be provided in a simple markup format. Here's how to create a -- label with a small font: (See complete documentation of available tags in@@ -80,14 +81,14 @@ -- want to escape it with 'Graphics.Rendering.Pango.Layout.escapeMarkup'.  -- ** Selectable labels--- +-- -- | Labels can be made selectable with 'labelSetSelectable'. Selectable -- labels allow the user to copy the label contents to the clipboard. Only -- labels that contain useful-to-copy information - such as error messages - -- should be made selectable.  -- ** Text layout--- +-- -- | A label can contain any number of paragraphs, but will have performance -- problems if it contains more than a small number. Paragraphs are separated -- by newlines or other paragraph separators understood by Pango.@@ -97,7 +98,7 @@ -- 'labelSetJustify' sets how the lines in a label align with one another. -- If you want to set how the label as a whole aligns in its available space, -- see 'Graphics.UI.Gtk.Abstract.Misc.miscSetAlignment'.--- +--  -- * Class Hierarchy -- |@@ -189,30 +190,35 @@ #endif   labelLineWrap,   labelText,++-- * Signals+  labelActiveCurrentLink,+  labelActiveLink,+  labelCopyClipboard,+  labelMoveCursor,+  labelPopulatePopup   ) where  import Control.Monad    (liftM)+import Data.Text        (Text)+import qualified Data.Text as T (pack)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject              (makeNewGObject) {#import Graphics.Rendering.Pango.Layout#} import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.Rendering.Pango.Attributes ( withAttrList, fromAttrList) import Graphics.UI.Gtk.Gdk.Keys         (KeyVal)-import Graphics.UI.Gtk.General.Enums    (Justification(..))-import Graphics.Rendering.Pango.Markup+import Graphics.UI.Gtk.General.Enums    (Justification(..), MovementStep (..)) {#import Graphics.Rendering.Pango.BasicTypes#}  (PangoLayout(PangoLayout),                                          makeNewPangoString, PangoString(..) ) import Graphics.Rendering.Pango.Types (mkPangoLayoutRaw, PangoLayoutRaw) import Graphics.Rendering.Pango.Enums   (PangoAttribute)-#if GTK_CHECK_VERSION(2,6,0)-import Graphics.Rendering.Pango.Enums   (EllipsizeMode(..))-#endif import Data.IORef ( newIORef )+{#import Graphics.UI.Gtk.Signals#}  {# context lib="gtk" prefix="gtk" #} @@ -222,7 +228,7 @@ -- | Creates a new label with the given text inside it. You can pass @Nothing@ -- to get an empty label widget. ---labelNew :: Maybe String -> IO Label+labelNew :: GlibString string => Maybe string -> IO Label labelNew str =   makeNewObject mkLabel $   liftM (castPtr :: Ptr Widget -> Ptr Label) $@@ -244,8 +250,8 @@ -- if the label is inside a button or menu item, the button or menu item will -- automatically become the mnemonic widget and be activated by the mnemonic. ---labelNewWithMnemonic :: -    String   -- ^ @str@ - The text of the label, with an underscore in front+labelNewWithMnemonic :: GlibString string+ => string   -- ^ @str@ - The text of the label, with an underscore in front              -- of the mnemonic character  -> IO Label labelNewWithMnemonic str =@@ -263,7 +269,7 @@ -- -- This will also clear any previously set mnemonic accelerators. ---labelSetText :: LabelClass self => self -> String -> IO ()+labelSetText :: (LabelClass self, GlibString string) => self -> string -> IO () labelSetText self str =   withUTFString str $ \strPtr ->   {# call label_set_text #}@@ -274,7 +280,7 @@ -- embedded underlines and\/or Pango markup depending on the markup and -- underline properties. ---labelSetLabel :: LabelClass self => self -> String -> IO ()+labelSetLabel :: (LabelClass self, GlibString string) => self -> string -> IO () labelSetLabel self str =   withUTFString str $ \strPtr ->   {# call label_set_label #}@@ -290,23 +296,23 @@ -- with manually set attributes, if you must; know that the attributes will be -- applied to the label after the markup string is parsed. ---labelSetAttributes :: LabelClass self => self +labelSetAttributes :: LabelClass self => self  -> [PangoAttribute]   -- ^ @attr@ 'PangoAttribute'  -> IO () labelSetAttributes self attrs = do-  txt <- labelGetText self+  (txt :: Text) <- labelGetText self   ps <- makeNewPangoString txt   withAttrList ps attrs $ \alPtr ->     {#call unsafe label_set_attributes #} (toLabel self) alPtr --- | Gets the attribute list that was set on the label using 'labelSetAttributes', if any. --- This function does not reflect attributes that come from the labels markup (see 'labelSetMarkup'). +-- | Gets the attribute list that was set on the label using 'labelSetAttributes', if any.+-- This function does not reflect attributes that come from the labels markup (see 'labelSetMarkup'). -- If you want to get the effective attributes for the label, use 'layoutGetAttributes' ('labelGetLayout' (label)). -- labelGetAttributes :: LabelClass self => self- -> IO [PangoAttribute]          -- ^ return the attribute list, or Emtpy if none was set. + -> IO [PangoAttribute]          -- ^ return the attribute list, or Empty if none was set. labelGetAttributes self = do-  txt <- labelGetText self+  (txt :: Text) <- labelGetText self   (PangoString correct _ _ ) <- makeNewPangoString txt   attrListPtr <- {# call unsafe label_get_attributes #} (toLabel self)   attr <- fromAttrList correct attrListPtr@@ -317,8 +323,8 @@ -- setting the label's text and attribute list based on the parse results. If -- the @str@ is external data, you may need to escape it. ---labelSetMarkup :: LabelClass self => self- -> Markup -- ^ @str@ - a markup string (see Pango markup format)+labelSetMarkup :: (LabelClass self, GlibString markup) => self+ -> markup -- ^ @str@ - a markup string (see Pango markup format)  -> IO () labelSetMarkup self str =   withUTFString str $ \strPtr ->@@ -335,8 +341,8 @@ -- The mnemonic key can be used to activate another widget, chosen -- automatically, or explicitly using 'labelSetMnemonicWidget'. ---labelSetMarkupWithMnemonic :: LabelClass self => self- -> Markup -- ^ @str@ - a markup string (see Pango markup format)+labelSetMarkupWithMnemonic :: (LabelClass self, GlibString markup) => self+ -> markup -- ^ @str@ - a markup string (see Pango markup format)  -> IO () labelSetMarkupWithMnemonic self str =   withUTFString str $ \strPtr ->@@ -349,7 +355,7 @@ -- labelSetPattern :: LabelClass l => l -> [Int] -> IO () labelSetPattern self list =-  withUTFString str $+  withUTFString (T.pack str) $   {# call label_set_pattern #}     (toLabel self)   where@@ -381,9 +387,9 @@ -- labelGetLayout :: LabelClass self => self -> IO PangoLayout labelGetLayout self = do-  plr <- makeNewGObject mkPangoLayoutRaw $ +  plr <- makeNewGObject mkPangoLayoutRaw $     {# call unsafe label_get_layout #} (toLabel self)-  txt <- labelGetText self+  (txt :: Text) <- labelGetText self   ps <- makeNewPangoString txt   psRef <- newIORef ps   return (PangoLayout psRef plr)@@ -411,13 +417,13 @@   {# call unsafe label_get_line_wrap #}     (toLabel self) --- | If line wrapping is on (see 'labelSetLineWrap') this controls how the line wrapping is done. +-- | If line wrapping is on (see 'labelSetLineWrap') this controls how the line wrapping is done. -- The default is 'WrapWholeWords' which means wrap on word boundaries. -- -- * Available since Gtk+ version 2.10 -- labelSetLineWrapMode :: LabelClass self => self- -> LayoutWrapMode  -- ^ @wrapMode@ - the line wrapping mode + -> LayoutWrapMode  -- ^ @wrapMode@ - the line wrapping mode  -> IO () labelSetLineWrapMode self wrapMode =   {# call label_set_line_wrap_mode #}@@ -430,7 +436,7 @@ -- labelGetLineWrapMode :: LabelClass self => self  -> IO LayoutWrapMode  -- ^ return the line wrapping mode-labelGetLineWrapMode self = liftM (toEnum . fromIntegral) $  +labelGetLineWrapMode self = liftM (toEnum . fromIntegral) $   {# call label_get_line_wrap_mode #}     (toLabel self) @@ -515,7 +521,7 @@ -- does not include any embedded underlines indicating mnemonics or Pango -- markup. (See 'labelGetLabel') ---labelGetText :: LabelClass self => self -> IO String+labelGetText :: (LabelClass self, GlibString string) => self -> IO string labelGetText self =   {# call unsafe label_get_text #}     (toLabel self)@@ -524,7 +530,7 @@ -- | Gets the text from a label widget including any embedded underlines -- indicating mnemonics and Pango markup. (See 'labelGetText'). ---labelGetLabel :: LabelClass self => self -> IO String+labelGetLabel :: (LabelClass self, GlibString string) => self -> IO string labelGetLabel self =   {# call unsafe label_get_label #}     (toLabel self)@@ -617,7 +623,7 @@ -- used to activate another widget, chosen automatically, or explicitly using -- 'labelSetMnemonicWidget'. ---labelSetTextWithMnemonic :: LabelClass self => self -> String -> IO ()+labelSetTextWithMnemonic :: (LabelClass self, GlibString string) => self -> string -> IO () labelSetTextWithMnemonic self str =   withUTFString str $ \strPtr ->   {# call label_set_text_with_mnemonic #}@@ -753,7 +759,7 @@  -- | The text of the label. ---labelLabel :: LabelClass self => Attr self String+labelLabel :: (LabelClass self, GlibString string) => Attr self string labelLabel = newAttr   labelGetLabel   labelSetLabel@@ -779,7 +785,7 @@  -- | The alignment of the lines in the text of the label relative to each -- other. This does NOT affect the alignment of the label within its--- allocation. +-- allocation. -- -- Default value: 'JustifyLeft' --@@ -795,7 +801,7 @@ labelWrap :: LabelClass self => Attr self Bool labelWrap = newAttrFromBoolProperty "wrap" --- | If line wrapping is on (see the 'labelWrap' property) this controls how the line wrapping is done. +-- | If line wrapping is on (see the 'labelWrap' property) this controls how the line wrapping is done. -- The default is 'WrapWholeWords', which means wrap on word boundaries. -- -- Default value: 'WrapWholeWords'@@ -833,7 +839,7 @@ -- -- Default value: "\\" ---labelPattern :: LabelClass self => WriteAttr self String+labelPattern :: (LabelClass self, GlibString string) => WriteAttr self string labelPattern = writeAttrFromStringProperty "pattern"  -- | The current position of the insertion cursor in chars.@@ -946,7 +952,48 @@  -- | \'text\' property. See 'labelGetText' and 'labelSetText' ---labelText :: LabelClass self => Attr self String+labelText :: (LabelClass self, GlibString string) => Attr self string labelText = newAttr   labelGetText   labelSetText++--------------------+-- Signals++-- | The 'labelActiveCurrentLink' signal a keybinding signal which gets emitted when the user activates+-- a link in the label.+labelActiveCurrentLink :: LabelClass self => Signal self (IO ())+labelActiveCurrentLink = Signal (connect_NONE__NONE "activate-current-link")++-- | The 'labelActiveLink' signal is emitted when a URI is activated. Default is to use showURI.+labelActiveLink :: (LabelClass self, GlibString string) => Signal self (string -> IO ())+labelActiveLink = Signal (connect_GLIBSTRING__NONE "activate-link")++-- | The 'labelCopyClipboard' signal is a keybinding signal which gets emitted to copy the selection to the+-- clipboard.+labelCopyClipboard :: LabelClass self => Signal self (IO ())+labelCopyClipboard = Signal (connect_NONE__NONE "copy-clipboard")++-- | The 'labelMoveCursor' signal is a keybinding signal which gets emitted when the user initiates a cursor+-- movement. If the cursor is not visible in label, this signal causes the viewport to be moved+-- instead.+--+-- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to+-- control the cursor programmatically.+--+-- The default bindings for this signal come in two variants, the variant with the Shift modifier+-- extends the selection, the variant without the Shift modifier does not. There are too many key+-- combinations to list them all here.+--+--   * Arrow keys move by individual characters\/lines+--   * Ctrl-arrow key combinations move by words\/paragraphs+--   * Home\/End keys move to the ends of the buffer+labelMoveCursor :: LabelClass self => Signal self (MovementStep -> Int -> Bool -> IO ())+labelMoveCursor = Signal (connect_ENUM_INT_BOOL__NONE "move-cursor")++-- | The 'labelPopulatePopup' signal gets emitted before showing the context menu of the label.+--+-- If you need to add items to the context menu, connect to this signal and append your menuitems to+-- the menu.+labelPopulatePopup :: LabelClass self=> Signal self (Menu -> IO ())+labelPopulatePopup = Signal (connect_OBJECT__NONE "populate-popup")
+ Graphics/UI/Gtk/Display/LevelBar.chs view
@@ -0,0 +1,196 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) Widget LevelBar+--+--  Author : Vincent Hanquez+--+--  Copyright (C) 2014 Vincent Hanquez+--  Copyright (C) 1999-2005 Axel Simon+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- A widget which indicates progress visually+--+module Graphics.UI.Gtk.Display.LevelBar (+-- * Detail+--+-- | The 'LevelBar' is typically used to display level indicator++-- * Class Hierarchy+-- |+-- @+-- |  'GObject'+-- |   +----'Object'+-- |         +----'Widget'+-- |               +----LevelBar+-- @++-- * Types+#if GTK_CHECK_VERSION(3,6,0)+  LevelBar,+  LevelBarClass,+  castToLevelBar, gTypeLevelBar,+  toLevelBar,++-- * Constructors+  levelBarNew,++-- * Methods+  levelBarSetMode,+  levelBarGetMode,+  levelBarAddOffsetValue,+  levelBarRemoveOffsetValue,+  levelBarGetOffsetValue,++-- * Attributes+#if GTK_CHECK_VERSION(3,8,0)+  levelBarInverted,+#endif+  levelBarMaxValue,+  levelBarMinValue,+  levelBarValue,+  levelBarMode+#endif+  ) where++#if GTK_CHECK_VERSION(3,6,0)+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.Types#}+import Graphics.UI.Gtk.General.Enums (LevelBarMode(..))++{# context lib="gtk" prefix="gtk" #}++--------------------+-- Constructors++-- | Creates a new 'LevelBar'.+--+levelBarNew :: IO LevelBar+levelBarNew =+  makeNewObject mkLevelBar $+  liftM (castPtr :: Ptr Widget -> Ptr LevelBar) $+  {# call unsafe level_bar_new #}++--------------------+-- Methods++-- | Sets the value of the "mode" property.+--+levelBarSetMode :: LevelBarClass self => self -> LevelBarMode -> IO ()+levelBarSetMode self mode =+  {#call level_bar_set_mode #} (toLevelBar self) ((fromIntegral . fromEnum) mode)++-- | Returns the value of the "mode" property.+levelBarGetMode :: LevelBarClass self => self -> IO LevelBarMode+levelBarGetMode self =+  liftM (toEnum . fromIntegral) $+  {#call level_bar_get_mode #}+    (toLevelBar self)++-- | Add a new offset marker at the position specified by @value+--+levelBarAddOffsetValue :: (LevelBarClass self, GlibString string) => self+ -> string -- ^ @name@ - Offset name+ -> Double -- ^ @value@ - Offset position+ -> IO ()+levelBarAddOffsetValue self name value =+  withUTFString name $ \namePtr ->+  {# call unsafe level_bar_add_offset_value #}+    (toLevelBar self)+    namePtr+    (realToFrac value)++-- | Add a new offset marker at the position specified by @value+--+levelBarRemoveOffsetValue :: (LevelBarClass self, GlibString string) => self+ -> string+ -> IO ()+levelBarRemoveOffsetValue self name =+  withUTFString name $ \namePtr ->+  {# call unsafe level_bar_remove_offset_value #}+    (toLevelBar self)+    namePtr++-- | Returns the current fraction of the task that's been completed.+--+levelBarGetOffsetValue :: (LevelBarClass self, GlibString string) => self+ -> string+ -> IO Double -- ^ returns the value of the offset+levelBarGetOffsetValue self name =+  alloca $ \dPtr ->+  withUTFString name $ \namePtr -> do+    {# call unsafe level_bar_get_offset_value #}+      (toLevelBar self) namePtr dPtr+    liftM realToFrac $ peek dPtr++--------------------+-- Attributes++#if GTK_CHECK_VERSION(3,8,0)+-- | Level bars normally grow from top to bottom or left to right. Inverted level bars grow in the opposite direction.+--+-- Default value: FALSE+--+-- Since 3.8+levelBarInverted :: LevelBarClass self => Attr self Bool+levelBarInverted = newAttrFromBoolProperty "inverted"+#endif++-- | The "value" property determines the currently filled value of the level bar.+--+-- Allowed values: >= 0+--+-- Default value: 0+--+levelBarValue :: LevelBarClass self => Attr self Double+levelBarValue = newAttrFromDoubleProperty "value"++-- | The "min-value" property determines the minimum value of the interval that can be displayed by the bar.+--+-- Allowed values: >= 0+--+-- Default value: 0+--+levelBarMinValue :: LevelBarClass self => Attr self Double+levelBarMinValue = newAttrFromDoubleProperty "min-value"++-- | The "max-value" property determaxes the maximum value of the interval that can be displayed by the bar.+--+-- Allowed values: >= 0+--+-- Default value: 1+levelBarMaxValue :: LevelBarClass self => Attr self Double+levelBarMaxValue = newAttrFromDoubleProperty "max-value"++-- | The "bar-mode" property determines the way LevelBar interprets the+-- value properties to draw the level fill area. Specifically, when the value is+-- LevelBarModeContinuous, LevelBar will draw a single block+-- representing the current value in that area; when the value is+-- LevelBarModeDiscrete, the widget will draw a succession of separate+-- blocks filling the draw area, with the number of blocks being equal to the+-- units separating the integral roundings of "min-value" and "max-value".+--+-- Default value: LevelBarModeContinuous+levelBarMode :: LevelBarClass self => Attr self LevelBarMode+levelBarMode = newAttr levelBarGetMode levelBarSetMode++#endif
Graphics/UI/Gtk/Display/ProgressBar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Display.ProgressBar ( -- * Detail--- +-- -- | The 'ProgressBar' is typically used to display the progress of a long -- running operation. It provides a visual clue that processing is underway. -- The 'ProgressBar' can be used in two different modes: percentage mode and@@ -43,7 +43,7 @@ -- When an application has no accurate way of knowing the amount of work to -- do, it can use the 'ProgressBar' in activity mode, which shows activity by a -- block moving back and forth within the progress area. In this mode, the--- application is required to call 'progressBarPulse' perodically to update the+-- application is required to call 'progressBarPulse' periodically to update the -- progress bar. -- -- There is quite a bit of flexibility provided to control the appearance of@@ -100,19 +100,19 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.General.Enums	(ProgressBarOrientation(..))+import Graphics.UI.Gtk.General.Enums    (ProgressBarOrientation(..)) #endif #if GTK_CHECK_VERSION(2,6,0)-import Graphics.Rendering.Pango.Enums	(EllipsizeMode(..))+import Graphics.Rendering.Pango.Enums   (EllipsizeMode(..)) #endif  {# context lib="gtk" prefix="gtk" #}@@ -144,7 +144,7 @@  -- | Causes the given @text@ to appear superimposed on the progress bar. ---progressBarSetText :: ProgressBarClass self => self -> String -> IO ()+progressBarSetText :: (ProgressBarClass self, GlibString string) => self -> string -> IO () progressBarSetText self text =   withUTFString text $ \textPtr ->   {# call unsafe progress_bar_set_text #}@@ -194,8 +194,8 @@ -- | Retrieves the text displayed superimposed on the progress bar, if any, -- otherwise @Nothing@. ---progressBarGetText :: ProgressBarClass self => self- -> IO (Maybe String) -- ^ returns text, or @Nothing@+progressBarGetText :: (ProgressBarClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns text, or @Nothing@ progressBarGetText self =   {# call unsafe progress_bar_get_text #}     (toProgressBar self)@@ -294,7 +294,7 @@ -- -- Default value: \"%P %%\" ---progressBarText :: ProgressBarClass self => ReadWriteAttr self (Maybe String) String+progressBarText :: (ProgressBarClass self, GlibString string) => ReadWriteAttr self (Maybe string) string progressBarText = newAttr   progressBarGetText   progressBarSetText
Graphics/UI/Gtk/Display/Spinner.chs view
@@ -28,15 +28,17 @@ module Graphics.UI.Gtk.Display.Spinner ( #if GTK_CHECK_VERSION(2,20,0) -- * Detail--- +-- -- | A 'Spinner' widget displays an icon-size spinning animation. It is often used as an alternative to -- a 'ProgressBar' for displaying indefinite activity, instead of actual progress.--- +-- -- To start the animation, use 'spinnerStart'.  -- * Types    Spinner,    SpinnerClass,+   castToSpinner, gTypeSpinner,+   toSpinner,  -- * Constructors    spinnerNew,@@ -44,21 +46,19 @@ -- * Methods    spinnerStart,    spinnerStop,-   --- * Attributes   ++-- * Attributes    spinnerActive, #endif ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#}  {# context lib="gtk" prefix="gtk" #} @@ -68,7 +68,7 @@  -- | Returns a new spinner widget. Not yet started. spinnerNew :: IO Spinner-spinnerNew = +spinnerNew =   makeNewObject mkSpinner $   liftM (castPtr :: Ptr Widget -> Ptr Spinner) $   {# call unsafe spinner_new #}@@ -92,7 +92,7 @@ -- Attributes  -- | Whether the spinner is active.--- +-- -- Default value: 'False' spinnerActive :: SpinnerClass spinner => Attr spinner Bool spinnerActive = newAttrFromBoolProperty "active"
Graphics/UI/Gtk/Display/StatusIcon.chs view
@@ -159,13 +159,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject,makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.Enums#} import Graphics.UI.Gtk.General.Structs@@ -209,8 +208,8 @@ -- The image will be scaled down to fit in the available space in the -- notification area, if necessary. ---statusIconNewFromFile ::-    String -- ^ @filename@ - a filename+statusIconNewFromFile :: GlibString string+ => string -- ^ @filename@ - a filename  -> IO StatusIcon statusIconNewFromFile filename =   wrapNewGObject mkStatusIcon $@@ -237,8 +236,8 @@ -- | Creates a status icon displaying an icon from the current icon theme. If -- the current icon theme is changed, the icon will be updated appropriately. ---statusIconNewFromIconName ::-    String -- ^ @iconName@ - an icon name+statusIconNewFromIconName :: GlibString string+ => string -- ^ @iconName@ - an icon name  -> IO StatusIcon statusIconNewFromIconName iconName =   wrapNewGObject mkStatusIcon $@@ -265,8 +264,8 @@ -- | Makes @statusIcon@ display the file @filename@. See -- 'statusIconNewFromFile' for details. ---statusIconSetFromFile :: StatusIconClass self => self- -> String -- ^ @filename@ - a filename+statusIconSetFromFile :: (StatusIconClass self, GlibString string) => self+ -> string -- ^ @filename@ - a filename  -> IO () statusIconSetFromFile self filename =   withUTFString filename $ \filenamePtr ->@@ -291,8 +290,8 @@ -- | Makes @statusIcon@ display the icon named @iconName@ from the current -- icon theme. See 'statusIconNewFromIconName' for details. ---statusIconSetFromIconName :: StatusIconClass self => self- -> String -- ^ @iconName@ - an icon name+statusIconSetFromIconName :: (StatusIconClass self, GlibString string) => self+ -> string -- ^ @iconName@ - an icon name  -> IO () statusIconSetFromIconName self iconName =   withUTFString iconName $ \iconNamePtr ->@@ -350,8 +349,8 @@ -- 'statusIconGetStorageType'). The returned string is owned by the -- 'StatusIcon' and should not be freed or modified. ---statusIconGetIconName :: StatusIconClass self => self- -> IO (Maybe String) -- ^ returns name of the displayed icon, or @Nothing@+statusIconGetIconName :: (StatusIconClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns name of the displayed icon, or @Nothing@                       -- if the image is empty. statusIconGetIconName self =   {# call gtk_status_icon_get_icon_name #}@@ -376,8 +375,8 @@ -- | Sets the tooltip of the status icon. -- -- Removed in Gtk3.-statusIconSetTooltip :: StatusIconClass self => self- -> String -- ^ @tooltipText@ - the tooltip text+statusIconSetTooltip :: (StatusIconClass self, GlibString string) => self+ -> string -- ^ @tooltipText@ - the tooltip text  -> IO () statusIconSetTooltip self tooltipText =   withUTFString tooltipText $ \tooltipTextPtr ->@@ -529,8 +528,8 @@ -- --   See also the "tooltip-text" property and 'tooltipSetText'. ---statusIconSetTooltipText :: StatusIconClass self => self- -> Maybe String+statusIconSetTooltipText :: (StatusIconClass self, GlibString string) => self+ -> Maybe string  -> IO () statusIconSetTooltipText self text =   maybeWith withUTFString text $ \textPtr ->@@ -540,8 +539,8 @@  -- | Gets the contents of the tooltip for status icon. ---statusIconGetTooltipText :: StatusIconClass self => self- -> IO (Maybe String)+statusIconGetTooltipText :: (StatusIconClass self, GlibString string) => self+ -> IO (Maybe string) statusIconGetTooltipText self =   {# call gtk_status_icon_get_tooltip_text #}     (toStatusIcon self)@@ -555,8 +554,8 @@ -- --   See also the 'tooltipMarkup' property and 'tooltipSetMarkup'. ---statusIconSetTooltipMarkup :: StatusIconClass self => self- -> Maybe String+statusIconSetTooltipMarkup :: (StatusIconClass self, GlibString string) => self+ -> Maybe string  -> IO () statusIconSetTooltipMarkup self markup =   maybeWith withUTFString markup $ \markupPtr ->@@ -566,8 +565,8 @@  -- | Gets the contents of the tooltip for status icon. ---statusIconGetTooltipMarkup :: StatusIconClass self => self- -> IO (Maybe String)+statusIconGetTooltipMarkup :: (StatusIconClass self, GlibString string) => self+ -> IO (Maybe string) statusIconGetTooltipMarkup self =   {# call gtk_status_icon_get_tooltip_markup #}     (toStatusIcon self)@@ -599,8 +598,8 @@ --   string describing the tray icon. It may be used by tools like screen readers to --   render the tray icon. ---statusIconSetTitle :: StatusIconClass self => self- -> Maybe String+statusIconSetTitle :: (StatusIconClass self, GlibString string) => self+ -> Maybe string  -> IO () statusIconSetTitle self title =   maybeWith withUTFString title $ \titlePtr ->@@ -610,8 +609,8 @@  -- | Gets the title of this tray icon. See 'statusIconSetTitle'. ---statusIconGetTitle :: StatusIconClass self => self- -> IO (Maybe String)+statusIconGetTitle :: (StatusIconClass self, GlibString string) => self+ -> IO (Maybe string) statusIconGetTitle self =   {# call gtk_status_icon_get_title #}     (toStatusIcon self)@@ -621,7 +620,7 @@ #if GTK_CHECK_VERSION(2,20,0) -- | Sets the name of this tray icon. This should be a string identifying this icon. It is may be used -- for sorting the icons in the tray and will not be shown to the user.-statusIconSetName :: StatusIconClass self => self -> String -> IO ()+statusIconSetName :: (StatusIconClass self, GlibString string) => self -> string -> IO () statusIconSetName self name =   withUTFString name $ \ namePtr ->   {#call gtk_status_icon_set_name #}@@ -644,7 +643,7 @@ -- -- Default value: @Nothing@ ---statusIconFile :: StatusIconClass self => WriteAttr self (Maybe String)+statusIconFile :: (StatusIconClass self, GlibString string) => WriteAttr self (Maybe string) statusIconFile = writeAttrFromMaybeStringProperty "file"  -- %hash c:3fc3 d:7ec1@@ -652,7 +651,7 @@ -- -- Default value: @Nothing@ ---statusIconStock :: StatusIconClass self => Attr self (Maybe String)+statusIconStock :: (StatusIconClass self, GlibString string) => Attr self (Maybe string) statusIconStock = newAttrFromMaybeStringProperty "stock"  -- %hash c:3502 d:9b7a@@ -660,7 +659,7 @@ -- -- Default value: @Nothing@ ---statusIconIconName :: StatusIconClass self => Attr self (Maybe String)+statusIconIconName :: (StatusIconClass self, GlibString string) => Attr self (Maybe string) statusIconIconName = newAttrFromMaybeStringProperty "icon-name"  -- %hash c:570e d:983f@@ -722,7 +721,7 @@ --   they allow on status icons, e.g. Windows only shows the first 64 characters. -- --   Default value: 'Nothing'-statusIconTooltipText :: StatusIconClass self => Attr self (Maybe String)+statusIconTooltipText :: (StatusIconClass self, GlibString string) => Attr self (Maybe string) statusIconTooltipText = newAttrFromMaybeStringProperty "tooltip-text"  -- | Sets the text of tooltip to be the given string, which is marked up with the@@ -736,7 +735,7 @@ --   On some platforms, embedded markup will be ignored. -- --   Default value: 'Nothing'-statusIconTooltipMarkup :: StatusIconClass self => Attr self (Maybe String)+statusIconTooltipMarkup :: (StatusIconClass self, GlibString string) => Attr self (Maybe string) statusIconTooltipMarkup = newAttrFromMaybeStringProperty "tooltip-markup"  -- | Enables or disables the emission of "query-tooltip" on status_icon. A value@@ -763,7 +762,7 @@ --   like screen readers to render the tray icon. -- --   Default value: 'Nothing'-statusIconTitle :: StatusIconClass self => Attr self (Maybe String)+statusIconTitle :: (StatusIconClass self, GlibString string) => Attr self (Maybe string) statusIconTitle = newAttrFromMaybeStringProperty "title" #endif 
Graphics/UI/Gtk/Display/Statusbar.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Display.Statusbar ( -- * Detail--- +-- -- | A 'Statusbar' is usually placed along the bottom of an application's main -- 'Window'. It may provide a regular commentary of the application's status -- (as is usually the case in a web browser, for example), or may be used to@@ -112,12 +112,14 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString+#if GTK_MAJOR_VERSION < 3 import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+#endif+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -142,8 +144,8 @@ -- | Returns a new context identifier, given a description of the actual -- context. This id can be used to later remove entries form the Statusbar. ---statusbarGetContextId :: StatusbarClass self => self- -> String       -- ^ @contextDescription@ - textual description of what context the+statusbarGetContextId :: (StatusbarClass self, GlibString string) => self+ -> string       -- ^ @contextDescription@ - textual description of what context the                  -- new message is being used in.  -> IO ContextId -- ^ returns an id that can be used to later remove entries                  -- ^ from the Statusbar.@@ -158,10 +160,10 @@ -- | Pushes a new message onto the Statusbar's stack. It will -- be displayed as long as it is on top of the stack. ---statusbarPush :: StatusbarClass self => self+statusbarPush :: (StatusbarClass self, GlibString string) => self  -> ContextId    -- ^ @contextId@ - the message's context id, as returned by                  -- 'statusbarGetContextId'.- -> String       -- ^ @text@ - the message to add to the statusbar.+ -> string       -- ^ @text@ - the message to add to the statusbar.  -> IO MessageId -- ^ returns the message's new message id for use with                  -- 'statusbarRemove'. statusbarPush self contextId text =@@ -231,13 +233,13 @@ -- -- * Available since Gtk+ version 2.22 ---statusbarRemoveAll :: StatusbarClass self => self -                   -> Int -- ^ @contextId@ a context identifier +statusbarRemoveAll :: StatusbarClass self => self+                   -> ContextId -- ^ @contextId@ a context identifier                    -> IO ()-statusbarRemoveAll self contextId = +statusbarRemoveAll self contextId =   {#call gtk_statusbar_remove_all #}     (toStatusbar self)-    (fromIntegral contextId)+    contextId #endif  --------------------@@ -261,14 +263,14 @@ -- %hash c:4eb7 d:d0ef -- | Is emitted whenever a new message gets pushed onto a statusbar's stack. ---textPushed :: StatusbarClass self => Signal self (ContextId -> String -> IO ())-textPushed = Signal (\a self user -> connect_WORD_STRING__NONE "text-pushed" a self (\w s -> user (fromIntegral w) s))+textPushed :: (StatusbarClass self, GlibString string) => Signal self (ContextId -> string -> IO ())+textPushed = Signal (\a self user -> connect_WORD_GLIBSTRING__NONE "text-pushed" a self (\w s -> user (fromIntegral w) s))  -- %hash c:2614 d:c1d2 -- | Is emitted whenever a new message is popped off a statusbar's stack. ---textPopped :: StatusbarClass self => Signal self (ContextId -> String -> IO ())-textPopped = Signal (\a self user -> connect_WORD_STRING__NONE "text-popped" a self (\w s -> user (fromIntegral w) s))+textPopped :: (StatusbarClass self, GlibString string) => Signal self (ContextId -> string -> IO ())+textPopped = Signal (\a self user -> connect_WORD_GLIBSTRING__NONE "text-popped" a self (\w s -> user (fromIntegral w) s))  -------------------- -- Deprecated Signals@@ -276,18 +278,18 @@ #ifndef DISABLE_DEPRECATED -- | Called if a message is removed. ---onTextPopped, afterTextPopped :: StatusbarClass self => self- -> (ContextId -> String -> IO ())+onTextPopped, afterTextPopped :: (StatusbarClass self, GlibString string) => self+ -> (ContextId -> string -> IO ())  -> IO (ConnectId self)-onTextPopped self user = connect_WORD_STRING__NONE "text-popped" False self (user . fromIntegral)-afterTextPopped self user = connect_WORD_STRING__NONE "text-popped" True self (user . fromIntegral)+onTextPopped self user = connect_WORD_GLIBSTRING__NONE "text-popped" False self (user . fromIntegral)+afterTextPopped self user = connect_WORD_GLIBSTRING__NONE "text-popped" True self (user . fromIntegral)  -- | Called if a message is pushed on top of the -- stack. ---onTextPushed, afterTextPushed :: StatusbarClass self => self- -> (ContextId -> String -> IO ())+onTextPushed, afterTextPushed :: (StatusbarClass self, GlibString string) => self+ -> (ContextId -> string -> IO ())  -> IO (ConnectId self)-onTextPushed self user = connect_WORD_STRING__NONE "text-pushed" False self (user . fromIntegral)-afterTextPushed self user = connect_WORD_STRING__NONE "text-pushed" True self (user . fromIntegral)+onTextPushed self user = connect_WORD_GLIBSTRING__NONE "text-pushed" False self (user . fromIntegral)+afterTextPushed self user = connect_WORD_GLIBSTRING__NONE "text-pushed" True self (user . fromIntegral) #endif
Graphics/UI/Gtk/Embedding/Plug.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Embedding.Plug ( -- * Detail--- +-- -- | Together with 'Socket', 'Plug' provides the ability to embed widgets from -- one process into another process in a fashion that is transparent to the -- user. One process creates a 'Socket' widget and, passes the ID of that@@ -48,7 +48,7 @@ -- |                                 +----Plug -- @ -#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))+#if (defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))) || defined(GDK_WINDOWING_X11) -- * Types   Plug,   PlugClass,@@ -78,14 +78,17 @@ #endif   ) where -import Control.Monad	(liftM)-import Data.Maybe	(fromMaybe)+#if (defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))) || defined(GDK_WINDOWING_X11) +import Control.Monad    (liftM)+import Data.Maybe       (fromMaybe)+ import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}+{#import Graphics.UI.Gtk.Embedding.Types#} {#import Graphics.UI.Gtk.Signals#} #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.Embedding.Embedding@@ -94,8 +97,6 @@  {# context lib="gtk" prefix="gtk" #} -#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))- -------------------- -- Constructors @@ -104,11 +105,11 @@ -- plugged into a 'Socket' by 'Graphics.UI.Gtk.Embedding.Socket.socketAddId'. -- -- If a NativeWindowId is supplied the foreign application window will--- immediatly appear in this 'Plug' once it is shown. If @Nothing@ is passed+-- immediately appear in this 'Plug' once it is shown. If @Nothing@ is passed -- then a 'NativeWindowId' can be extracted from this 'Plug' using 'plugGetId' -- and be passed to the application which is to be embedded. ---plugNew :: +plugNew ::   Maybe NativeWindowId -- ^ @socketId@ - the window ID of the socket, or                        -- @Nothing@.  -> IO Plug@@ -180,7 +181,7 @@ -- | @True@ if the plug is embedded in a socket. -- -- Default value: @False@--- +-- -- * Available since Gtk+ version 2.12 -- plugAttrEmbedded :: PlugClass self => ReadAttr self Bool@@ -189,7 +190,7 @@ -- | The window of the socket the plug is embedded in. -- -- * Available since Gtk+ version 2.14--- +-- plugAttrSocketWindow :: PlugClass self => ReadAttr self (Maybe DrawWindow) plugAttrSocketWindow = readAttrFromMaybeObjectProperty "socket-window" #if GTK_MAJOR_VERSION < 3
Graphics/UI/Gtk/Embedding/Socket.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Embedding.Socket ( -- * Detail--- +-- -- | Together with 'Plug', 'Socket' provides the ability to embed widgets from -- one process into another process in a fashion that is transparent to the -- user. One process creates a 'Socket' widget and, passes the that widget's@@ -41,11 +41,11 @@ -- added to its parent. -- -- * Obtaining the window ID of a socket.--- +-- -- > socket <- socketNew -- > widgetShow socket -- > containerAdd parent socket--- > +-- > -- > -- The following call is only necessary if one of -- > -- the ancestors of the socket is not yet visible. -- > --@@ -82,7 +82,7 @@ -- |                     +----Socket -- @ -#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))+#if (defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))) || defined(GDK_WINDOWING_X11) -- * Types   Socket,   SocketClass,@@ -115,14 +115,17 @@ #endif   ) where -import Control.Monad	(liftM)+#if (defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))) || defined(GDK_WINDOWING_X11)++import Control.Monad    (liftM) import Data.Maybe (isJust)  import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.Types#}+{#import Graphics.UI.Gtk.Embedding.Types#} {#import Graphics.UI.Gtk.Signals#} #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.Embedding.Embedding@@ -130,8 +133,6 @@ import Graphics.UI.Gtk.General.Structs  {# context lib="gtk" prefix="gtk" #}--#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))  -------------------- -- Constructors
+ Graphics/UI/Gtk/Embedding/Types.chs view
@@ -0,0 +1,129 @@+{-# LANGUAGE CPP #-}+{-# OPTIONS_HADDOCK hide #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+-- -*-haskell-*-+-- -------------------- automatically generated file - do not edit ----------+--  Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell+--+--  Author : Hamish Mackenzie+--+--  Copyright (C) 2001-2005 Axel Simon+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- #hide++-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+module Graphics.UI.Gtk.Embedding.Types (++#if (defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))) || defined(GDK_WINDOWING_X11)+  Socket(Socket), SocketClass,+  toSocket, +  mkSocket, unSocket,+  castToSocket, gTypeSocket,+  Plug(Plug), PlugClass,+  toPlug, +  mkPlug, unPlug,+  castToPlug, gTypePlug,+#endif+  ) where++#if (defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))) || defined(GDK_WINDOWING_X11)+import Foreign.ForeignPtr (ForeignPtr, castForeignPtr)+-- TODO work around cpphs https://ghc.haskell.org/trac/ghc/ticket/13553+#if __GLASGOW_HASKELL__ >= 707 || __GLASGOW_HASKELL__ == 0+import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)+#else+import Foreign.ForeignPtr (unsafeForeignPtrToPtr)+#endif+import Foreign.C.Types    (CULong(..), CUInt(..), CULLong(..))+import System.Glib.GType  (GType, typeInstanceIsA)+{#import System.Glib.GObject#}+import Graphics.UI.Gtk.General.Threading+{#import Graphics.UI.Gtk.Types#}++{# context lib="gtk" prefix="gtk" #}++-- The usage of foreignPtrToPtr should be safe as the evaluation will only be+-- forced if the object is used afterwards+--+castTo :: (GObjectClass obj, GObjectClass obj') => GType -> String+                                                -> (obj -> obj')+castTo gtype objTypeName obj =+  case toGObject obj of+    gobj@(GObject objFPtr)+      | typeInstanceIsA ((unsafeForeignPtrToPtr.castForeignPtr) objFPtr) gtype+                  -> unsafeCastGObject gobj+      | otherwise -> error $ "Cannot cast object to " ++ objTypeName+++-- ****************************************************************** Socket++{#pointer *GtkSocket as Socket foreign newtype #} deriving (Eq,Ord)++mkSocket = (Socket, objectUnrefFromMainloop)+unSocket (Socket o) = o++class ContainerClass o => SocketClass o+toSocket :: SocketClass o => o -> Socket+toSocket = unsafeCastGObject . toGObject++instance SocketClass Socket+instance ContainerClass Socket+instance WidgetClass Socket+#if GTK_MAJOR_VERSION < 3+instance ObjectClass Socket+#endif+instance GObjectClass Socket where+  toGObject = GObject . castForeignPtr . unSocket+  unsafeCastGObject = Socket . castForeignPtr . unGObject++castToSocket :: GObjectClass obj => obj -> Socket+castToSocket = castTo gTypeSocket "Socket"++gTypeSocket :: GType+gTypeSocket =+  {# call fun unsafe gtk_socket_get_type #}++-- ****************************************************************** Plug++{#pointer *GtkPlug as Plug foreign newtype #} deriving (Eq,Ord)++mkPlug = (Plug, objectUnrefFromMainloop)+unPlug (Plug o) = o++class WindowClass o => PlugClass o+toPlug :: PlugClass o => o -> Plug+toPlug = unsafeCastGObject . toGObject++instance PlugClass Plug+instance WindowClass Plug+instance BinClass Plug+instance ContainerClass Plug+instance WidgetClass Plug+#if GTK_MAJOR_VERSION < 3+instance ObjectClass Plug+#endif+instance GObjectClass Plug where+  toGObject = GObject . castForeignPtr . unPlug+  unsafeCastGObject = Plug . castForeignPtr . unGObject++castToPlug :: GObjectClass obj => obj -> Plug+castToPlug = castTo gTypePlug "Plug"++gTypePlug :: GType+gTypePlug =+  {# call fun unsafe plug_get_type #}+#endif
Graphics/UI/Gtk/Entry/Editable.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Entry.Editable ( -- * Detail--- +-- -- | The 'Editable' interface is an interface which should be implemented by -- text editing widgets, such as 'Entry'. -- It contains functions for generically manipulating an editable@@ -138,11 +138,11 @@  -- | Inserts text at a given position. ---editableInsertText :: EditableClass self => self- -> String -- ^ @newText@ - the text to insert.+editableInsertText :: (EditableClass self, GlibString string) => self+ -> string -- ^ @newText@ - the text to insert.  -> Int    -- ^ @position@ - the position at which to insert the text.  -> IO Int -- ^ returns the position after the newly inserted text.-editableInsertText self newText position = +editableInsertText self newText position =   with (fromIntegral position) $ \positionPtr ->   withUTFStringLen newText $ \(newTextPtr, newTextLength) -> do   {# call editable_insert_text #}@@ -173,10 +173,10 @@ -- @endPos@. If @endPos@ is negative, then the the characters retrieved will be -- those characters from @startPos@ to the end of the text. ---editableGetChars :: EditableClass self => self+editableGetChars :: (EditableClass self, GlibString string) => self  -> Int       -- ^ @startPos@ - the starting position.  -> Int       -- ^ @endPos@ - the end position.- -> IO String -- ^ returns the characters in the indicated region.+ -> IO string -- ^ returns the characters in the indicated region. editableGetChars self startPos endPos =   {# call unsafe editable_get_chars #}     (toEditable self)@@ -287,10 +287,10 @@ -- | The 'editableChanged' signal is emitted at the end of a single -- user-visible operation on the contents of the 'Editable'. ----- * For inctance, a paste operation that replaces the contents of the+-- * For instance, a paste operation that replaces the contents of the --   selection will cause only one signal emission (even though it is --   implemented by first deleting the selection, then inserting the new---   content, and may cause multiple 'inserText' signals to be+--   content, and may cause multiple 'insertText' signals to be --   emitted). -- editableChanged :: EditableClass ec => Signal ec (IO ())@@ -300,7 +300,7 @@ -- -- * See 'insertText' for information on how to use this signal. ---deleteText :: EditableClass self +deleteText :: EditableClass self              => Signal self (Int -> Int -> IO ()) -- ^ @(\startPos endPos -> ...)@ deleteText = Signal (connect_INT_INT__NONE "delete-text") @@ -339,7 +339,7 @@ --   Note that binding 'insertText' using 'after' is not very useful, except to --   track editing actions. ---insertText :: EditableClass self => Signal self (String -> Int -> IO Int)+insertText :: (EditableClass self, GlibString string) => Signal self (string -> Int -> IO Int) insertText = Signal $ \after obj handler ->   connect_PTR_INT_PTR__NONE "insert-text" after obj   (\strPtr strLen posPtr -> do@@ -349,7 +349,7 @@     pos' <- handler str (fromIntegral pos)     poke (posPtr :: Ptr {#type gint#}) (fromIntegral pos')   )- + -- | Stop the current signal that inserts text. stopInsertText :: EditableClass self => ConnectId self -> IO () stopInsertText (ConnectId _ obj) =@@ -370,8 +370,8 @@ onDeleteText = connect_INT_INT__NONE "delete_text" False afterDeleteText = connect_INT_INT__NONE "delete_text" True -onInsertText, afterInsertText :: EditableClass self => self- -> (String -> Int -> IO Int)+onInsertText, afterInsertText :: (EditableClass self, GlibString string) => self+ -> (string -> Int -> IO Int)  -> IO (ConnectId self) onInsertText obj handler =   connect_PTR_INT_PTR__NONE "insert_text" False obj
Graphics/UI/Gtk/Entry/Entry.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Entry.Entry ( -- * Detail--- +-- -- | The 'Entry' widget is a single line text entry widget. A fairly large set -- of key bindings are supported by default. If the entered text is longer than -- the allocation of the widget, the widget will scroll so that the cursor@@ -77,6 +77,10 @@   entrySetHasFrame,   entryGetWidthChars,   entrySetWidthChars,+#if GTK_CHECK_VERSION(3,2,0)+  entrySetPlaceholderText,+  entryGetPlaceholderText,+#endif #if GTK_CHECK_VERSION(2,4,0)   entrySetAlignment,   entryGetAlignment,@@ -110,6 +114,9 @@   entryWidthChars,   entryScrollOffset,   entryText,+#if GTK_CHECK_VERSION(3,2,0)+  entryPlaceholderText,+#endif #if GTK_CHECK_VERSION(2,4,0)   entryXalign,   entryAlignment,@@ -131,6 +138,7 @@   entryMoveCursor,   entryPopulatePopup,   entryToggleOverwirte,+  entryToggleOverwrite, #if GTK_CHECK_VERSION(2,20,0)   entryPreeditChanged, #endif@@ -154,22 +162,21 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import Control.Monad.Reader (runReaderT)-import Data.Char	(ord, chr)+import Data.Char        (ord, chr)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(makeNewGObject)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) import Graphics.UI.Gtk.General.Enums (DeleteType (..), MovementStep (..) #if GTK_CHECK_VERSION(2,16,0)   , EntryIconPosition (..) #endif   )-import Graphics.UI.Gtk.Gdk.EventM	(EventM, EButton, EKey)+import Graphics.UI.Gtk.Gdk.EventM       (EventM, EButton, EKey) import Control.Monad.Reader             ( ask ) import Control.Monad.Trans              ( liftIO ) #if GTK_CHECK_VERSION (2,18,0)@@ -234,7 +241,7 @@ -- | Sets the text in the widget to the given value, replacing the current -- contents. ---entrySetText :: EntryClass self => self -> String -> IO ()+entrySetText :: (EntryClass self, GlibString string) => self -> string -> IO () entrySetText self text =   withUTFString text $ \textPtr ->   {# call entry_set_text #}@@ -244,7 +251,7 @@ -- | Retrieves the contents of the entry widget. -- See also 'Graphics.UI.Gtk.Display.Entry.Editable.editableGetChars'. ---entryGetText :: EntryClass self => self -> IO String+entryGetText :: (EntryClass self, GlibString string) => self -> IO string entryGetText self =   {# call entry_get_text #}     (toEntry self)@@ -257,7 +264,7 @@ -- newly-written code. -- -- Removed in Gtk3.-entryAppendText :: EntryClass self => self -> String -> IO ()+entryAppendText :: (EntryClass self, GlibString string) => self -> string -> IO () entryAppendText self text =   withUTFString text $ \textPtr ->   {# call entry_append_text #}@@ -270,7 +277,7 @@ -- newly-written code. -- -- Removed in Gtk3.-entryPrependText :: EntryClass self => self -> String -> IO ()+entryPrependText :: (EntryClass self, GlibString string) => self -> string -> IO () entryPrependText self text =   withUTFString text $ \textPtr ->   {# call entry_prepend_text #}@@ -430,6 +437,38 @@     (toEntry self)     (fromIntegral nChars) +#if GTK_CHECK_VERSION(3,2,0)+-- | Sets text to be displayed in entry when it is empty and unfocused.+-- This can be used to give a visual hint of the expected contents of the `Entry`.+--+-- Note that since the placeholder text gets removed when the entry received+-- focus, using this feature is a bit problematic if the entry is given the+-- initial focus in a window. Sometimes this can be worked around by delaying+-- the initial focus setting until the first key event arrives.+--+-- * Available since Gtk version 3.2+--+entrySetPlaceholderText :: (EntryClass self, GlibString text) => self+ -> Maybe text -- ^ @text@ a string to be displayed when entry is empty an unfocused, or `Nothing`+ -> IO ()+entrySetPlaceholderText self text =+  maybeWith withUTFString text $ \ textPtr ->+  {# call entry_set_placeholder_text #}+    (toEntry self)+    textPtr++-- | Retrieves the text that will be displayed when entry is empty and unfocused.+--+-- * Available since Gtk version 3.2+--+entryGetPlaceholderText :: (EntryClass self, GlibString text) => self+ -> IO (Maybe text) -- ^ returns placeholder text+entryGetPlaceholderText self =+  {# call unsafe entry_get_placeholder_text #}+    (toEntry self)+  >>= maybePeek peekUTFString+#endif+ #if GTK_CHECK_VERSION(2,4,0) -- | Sets the alignment for the contents of the entry. This controls the -- horizontal positioning of the contents when the displayed text is shorter@@ -487,26 +526,26 @@ -- | Returns the 'Window' which contains the entry's icon at @iconPos@. This function is useful when -- drawing something to the entry in an 'eventExpose' callback because it enables the callback to -- distinguish between the text window and entry's icon windows.--- +-- -- See also 'entryGetTextWindow'. -- Removed in Gtk3. entryGetIconWindow :: EntryClass self => self-                   -> EntryIconPosition  -- ^ @iconPos@ Icon position                        -                   -> IO DrawWindow -- ^ returns  the entry's icon window at @iconPos@. +                   -> EntryIconPosition  -- ^ @iconPos@ Icon position+                   -> IO DrawWindow -- ^ returns  the entry's icon window at @iconPos@. entryGetIconWindow entry iconPos =     makeNewGObject mkDrawWindow $     {#call gtk_entry_get_icon_window #}        (toEntry entry)        ((fromIntegral . fromEnum) iconPos)-       + -- | Returns the 'Window' which contains the text. This function is useful when drawing something to the -- entry in an 'eventExpose' callback because it enables the callback to distinguish between the text -- window and entry's icon windows.--- +-- -- See also 'entryGetIconWindow'. -- Removed in Gtk3. entryGetTextWindow :: EntryClass self => self-                   -> IO DrawWindow  -- ^ returns the entry's text window. +                   -> IO DrawWindow  -- ^ returns the entry's text window. entryGetTextWindow entry =     makeNewGObject mkDrawWindow $     {#call gtk_entry_get_text_window #}@@ -518,7 +557,7 @@ -- | Allow the 'Entry' input method to internally handle key press and release events. If this function -- returns 'True', then no further processing should be done for this key event. See -- 'imContextFilterKeypress'.--- +-- -- Note that you are expected to call this function from your handler when overriding key event -- handling. This is needed in the case when you need to insert your own key handling between the input -- method and the default key event handling of the 'Entry'. See 'textViewResetImContext' for@@ -535,7 +574,7 @@       (castPtr ptr)  -- | Reset the input method context of the entry if needed.--- +-- -- This can be necessary in the case where modifying the buffer would confuse on-going input method -- behavior. --@@ -648,11 +687,22 @@ -- -- Default value: \"\" ---entryText :: EntryClass self => Attr self String+entryText :: (EntryClass self, GlibString string) => Attr self string entryText = newAttr   entryGetText   entrySetText +#if GTK_CHECK_VERSION(3,2,0)+-- | The text that will be displayed in the `Entry` when it is empty and unfocused.+--+-- Default value: Nothing+--+entryPlaceholderText :: (EntryClass self, GlibString text) => Attr self (Maybe text)+entryPlaceholderText = newAttr+  entryGetPlaceholderText+  entrySetPlaceholderText+#endif+ #if GTK_CHECK_VERSION(2,4,0) -- | The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL -- layouts.@@ -695,7 +745,7 @@ -- Signals  -- | A keybinding signal which gets emitted when the user activates the entry.--- +-- -- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to -- control activation programmatically. entryActivated :: EntryClass ec => Signal ec (IO ())@@ -706,31 +756,31 @@ entryActivate = entryActivated  -- | The 'entryBackspace' signal is a keybinding signal which gets emitted when the user asks for it.--- +-- -- The default bindings for this signal are Backspace and Shift-Backspace. entryBackspace :: EntryClass ec => Signal ec (IO ()) entryBackspace = Signal (connect_NONE__NONE "backspace")  -- | The 'entryCopyClipboard' signal is a keybinding signal which gets emitted to copy the selection to the -- clipboard.--- +-- -- The default bindings for this signal are Ctrl-c and Ctrl-Insert. entryCopyClipboard :: EntryClass ec => Signal ec (IO ()) entryCopyClipboard = Signal (connect_NONE__NONE "copy-clipboard")  -- | The 'entryCutClipboard' signal is a keybinding signal which gets emitted to cut the selection to the -- clipboard.--- +-- -- The default bindings for this signal are Ctrl-x and Shift-Delete. entryCutClipboard :: EntryClass ec => Signal ec (IO ()) entryCutClipboard = Signal (connect_NONE__NONE "cut-clipboard")  -- | The 'entryDeleteFromCursor' signal is a keybinding signal which gets emitted when the user initiates a -- text deletion.--- +-- -- If the type is 'DeleteChars', GTK+ deletes the selection if there is one, otherwise it deletes -- the requested number of characters.--- +-- -- The default bindings for this signal are Delete for deleting a character and Ctrl-Delete for -- deleting a word. entryDeleteFromCursor :: EntryClass ec => Signal ec (DeleteType -> Int -> IO ())@@ -738,35 +788,35 @@  -- | The 'entryInsertAtCursor' signal is a keybinding signal which gets emitted when the user initiates the -- insertion of a fixed string at the cursor.-entryInsertAtCursor :: EntryClass ec => Signal ec (String -> IO ())-entryInsertAtCursor = Signal (connect_STRING__NONE "insert-at-cursor")+entryInsertAtCursor :: (EntryClass ec, GlibString string) => Signal ec (string -> IO ())+entryInsertAtCursor = Signal (connect_GLIBSTRING__NONE "insert-at-cursor")  -- | The 'entryMoveCursor' signal is a keybinding signal which gets emitted when the user initiates a cursor -- movement. If the cursor is not visible in entry, this signal causes the viewport to be moved -- instead.--- +-- -- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to -- control the cursor programmatically.--- +-- -- The default bindings for this signal come in two variants, the variant with the Shift modifier--- extends the selection, the variant without the Shift modifer does not. There are too many key+-- extends the selection, the variant without the Shift modifier does not. There are too many key -- combinations to list them all here.--- ---   * Arrow keys move by individual characters\/lines ---   * Ctrl-arrow key combinations move by words\/paragraphs +--+--   * Arrow keys move by individual characters\/lines+--   * Ctrl-arrow key combinations move by words\/paragraphs --   * Home\/End keys move to the ends of the buffer entryMoveCursor :: EntryClass ec => Signal ec (MovementStep -> Int -> Bool -> IO ()) entryMoveCursor = Signal (connect_ENUM_INT_BOOL__NONE "move-cursor")  -- | The 'entryPasteClipboard' signal is a keybinding signal which gets emitted to paste the contents of the -- clipboard into the text view.--- +-- -- The default bindings for this signal are Ctrl-v and Shift-Insert. entryPasteClipboard :: EntryClass ec => Signal ec (IO ()) entryPasteClipboard = Signal (connect_NONE__NONE "paste-clipboard")  -- | The 'entryPopulatePopup' signal gets emitted before showing the context menu of the entry.--- +-- -- If you need to add items to the context menu, connect to this signal and append your menuitems to -- the menu. entryPopulatePopup :: EntryClass ec => Signal ec (Menu -> IO ())@@ -775,8 +825,8 @@ #if GTK_CHECK_VERSION(2,20,0) -- | If an input method is used, the typed text will not immediately be committed to the buffer. So if -- you are interested in the text, connect to this signal.-entryPreeditChanged :: EntryClass ec => Signal ec (String -> IO ())-entryPreeditChanged = Signal (connect_STRING__NONE "preedit-changed")+entryPreeditChanged :: (EntryClass ec, GlibString string) => Signal ec (string -> IO ())+entryPreeditChanged = Signal (connect_GLIBSTRING__NONE "preedit-changed") #endif  #if GTK_CHECK_VERSION(2,16,0)@@ -796,12 +846,16 @@   connect_ENUM_PTR__NONE "icon-press" after obj (runReaderT . f) #endif +{-# DEPRECATED entryToggleOverwirte "Use entryToggleOverwrite" #-}+entryToggleOverwirte :: EntryClass ec => Signal ec (IO ())+entryToggleOverwirte = entryToggleOverwrite+ -- | The 'entryToggleOverwrite' signal is a keybinding signal which gets emitted to toggle the overwrite mode -- of the entry.---  -- The default bindings for this signal is Insert.-entryToggleOverwirte :: EntryClass ec => Signal ec (IO ())-entryToggleOverwirte = Signal (connect_NONE__NONE "toggle-overwrite")+--+entryToggleOverwrite :: EntryClass ec => Signal ec (IO ())+entryToggleOverwrite = Signal (connect_NONE__NONE "toggle-overwrite")  #ifndef DISABLE_DEPRECATED -- | Emitted when the user presses return within@@ -812,14 +866,6 @@ onEntryActivate = connect_NONE__NONE "activate" False afterEntryActivate = connect_NONE__NONE "activate" True --- | Emitted when the settings of the--- 'Entry' widget changes.----onEntryChanged, afterEntryChanged :: EntryClass ec => ec -> IO () ->-                                     IO (ConnectId ec)-onEntryChanged = connect_NONE__NONE "changed" False-afterEntryChanged = connect_NONE__NONE "changed" True- -- | Emitted when the current selection has been -- copied to the clipboard. --@@ -843,14 +889,6 @@                                          IO (ConnectId ec) onPasteClipboard = connect_NONE__NONE "paste_clipboard" False afterPasteClipboard = connect_NONE__NONE "paste_clipboard" True---- | Emitted when a piece of text is deleted from--- the 'Entry'.----onDeleteText, afterDeleteText :: EntryClass ec => ec ->-                                 (Int -> Int -> IO ()) -> IO (ConnectId ec)-onDeleteText = connect_INT_INT__NONE "delete_text" False-afterDeleteText = connect_INT_INT__NONE "delete_text" True  -- | Emitted when the user changes from -- overwriting to inserting.
Graphics/UI/Gtk/Entry/EntryBuffer.chs view
@@ -79,7 +79,7 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import Data.Maybe       (fromJust)  import System.Glib.FFI@@ -101,15 +101,15 @@ -- -- * Available since Gtk+ version 2.18 ---entryBufferNew ::-    Maybe String                -- ^ @initialChars@ - initial buffer text or 'Nothing'+entryBufferNew :: GlibString string+ => Maybe string                -- ^ @initialChars@ - initial buffer text or 'Nothing'  -> IO EntryBuffer entryBufferNew initialChars =   wrapNewGObject mkEntryBuffer $   maybeWith withUTFString initialChars $ \initialCharsPtr -> do     let chars = if initialCharsPtr == nullPtr                    then (-1)-                   else length $ fromJust initialChars+                   else stringLength $ fromJust initialChars     {# call gtk_entry_buffer_new #}       initialCharsPtr       (fromIntegral chars)@@ -124,7 +124,7 @@ entryBufferGetBytes :: EntryBufferClass self => self  -> IO Int -- ^ returns The byte length of the buffer. entryBufferGetBytes self =-  liftM fromIntegral $ +  liftM fromIntegral $   {# call gtk_entry_buffer_get_bytes #}     (toEntryBuffer self) @@ -133,9 +133,9 @@ -- -- * Available since Gtk+ version 2.18 ---entryBufferInsertText :: EntryBufferClass self => self+entryBufferInsertText :: (EntryBufferClass self, GlibString string) => self  -> Int    -- ^ @position@ - the position at which to insert text.- -> String -- ^ @chars@ - the text to insert into the buffer.+ -> string -- ^ @chars@ - the text to insert into the buffer.  -> IO Int -- ^ returns The number of characters actually inserted. entryBufferInsertText self position chars =   liftM fromIntegral $@@ -181,9 +181,9 @@ -- -- * Available since Gtk+ version 2.18 ---entryBufferEmitInsertedText :: EntryBufferClass self => self+entryBufferEmitInsertedText :: (EntryBufferClass self, GlibString string) => self  -> Int    -- ^ @position@ - position at which text was inserted- -> String -- ^ @chars@ - text that was inserted+ -> string -- ^ @chars@ - text that was inserted  -> Int    -- ^ @nChars@ - number of characters inserted  -> IO () entryBufferEmitInsertedText self position chars nChars =@@ -198,18 +198,18 @@ -- Attributes  -- | The contents of the buffer.--- +-- -- Default value: \"\" -- -- * Available since Gtk+ version 2.18 ---entryBufferText :: EntryBufferClass self => Attr self String+entryBufferText :: (EntryBufferClass self, GlibString string) => Attr self string entryBufferText = newAttrFromStringProperty "text"  -- | The length of the text in buffer.--- +-- -- Allowed values: <= 65535--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.18@@ -218,9 +218,9 @@ entryBufferLength = readAttrFromIntProperty "length"  -- | The maximum length of the text in the buffer.--- +-- -- Allowed values: [0,65535]--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.18@@ -235,8 +235,8 @@ -- -- * Available since Gtk+ version 2.18 ---entryBufferInsertedText :: EntryBufferClass self => Signal self (Int -> String -> Int -> IO ())-entryBufferInsertedText = Signal (connect_INT_STRING_INT__NONE "inserted_text")+entryBufferInsertedText :: (EntryBufferClass self, GlibString string) => Signal self (Int -> string -> Int -> IO ())+entryBufferInsertedText = Signal (connect_INT_GLIBSTRING_INT__NONE "inserted_text")  -- | --
Graphics/UI/Gtk/Entry/EntryCompletion.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Entry.EntryCompletion ( -- * Detail--- +-- -- | 'EntryCompletion' is an auxiliary object to be used in conjunction with -- 'Entry' to provide the completion functionality. It implements the -- 'CellLayout' interface, to allow the user to add extra cells to the@@ -136,13 +136,11 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import System.Glib.GObject		(wrapNewGObject,-					 makeNewGObject, destroyFunPtr) import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}@@ -205,13 +203,13 @@ -- | Convenience function for setting up the most used case of this code: a -- completion list with just strings. This function will set up @completion@ to -- have a list displaying all (and just) strings in the completion list, and to--- get those strings from @model@. This functions creates and adds a +-- get those strings from @model@. This functions creates and adds a -- 'CellRendererText' which retrieves its content from the given model. ---entryCompletionSetTextModel :: (TreeModelClass (model String),-                                TypedTreeModelClass model)+entryCompletionSetTextModel :: (TreeModelClass (model string),+                                TypedTreeModelClass model, GlibString string)  => EntryCompletion -- ^ @completion@- -> model String    -- ^ the model containing 'String's+ -> model string    -- ^ the model containing 'string's  -> IO () entryCompletionSetTextModel self model = do   let strCol = makeColumnIdString 0@@ -230,7 +228,8 @@ --   or as a single precomposed character. If this is not appropriate you --   can extract the original text from the entry. ---entryCompletionSetMatchFunc :: EntryCompletion -> (String -> TreeIter -> IO Bool) -> IO ()+entryCompletionSetMatchFunc :: GlibString string+ => EntryCompletion -> (string -> TreeIter -> IO Bool) -> IO () entryCompletionSetMatchFunc ec handler = do   hPtr <- mkHandler_GtkEntryCompletionMatchFunc     (\_ keyPtr iterPtr _ -> do key <- peekUTFString keyPtr@@ -251,7 +250,7 @@   IO {#type gboolean#}  foreign import ccall "wrapper" mkHandler_GtkEntryCompletionMatchFunc ::-  GtkEntryCompletionMatchFunc -> +  GtkEntryCompletionMatchFunc ->   IO (FunPtr GtkEntryCompletionMatchFunc)  -- | Requires the length of the search key for @completion@ to be at least@@ -290,9 +289,9 @@ -- with text @text@. If you want the action item to have markup, use -- 'entryCompletionInsertActionMarkup'. ---entryCompletionInsertActionText :: EntryCompletion+entryCompletionInsertActionText :: GlibString string => EntryCompletion  -> Int             -- ^ @index@ - The index of the item to insert.- -> String          -- ^ @text@ - Text of the item to insert.+ -> string          -- ^ @text@ - Text of the item to insert.  -> IO () entryCompletionInsertActionText self index text =   withUTFString text $ \textPtr ->@@ -304,9 +303,9 @@ -- | Inserts an action in @completion@'s action item list at position @index@ -- with markup @markup@. ---entryCompletionInsertActionMarkup :: EntryCompletion+entryCompletionInsertActionMarkup :: GlibString string => EntryCompletion  -> Int             -- ^ @index@ - The index of the item to insert.- -> String          -- ^ @markup@ - Markup of the item to insert.+ -> string          -- ^ @markup@ - Markup of the item to insert.  -> IO () entryCompletionInsertActionMarkup self index markup =   withUTFString markup $ \markupPtr ->@@ -333,8 +332,8 @@ -- This functions creates and adds a 'CellRendererText' for the selected -- column. ---entryCompletionSetTextColumn :: EntryCompletion- -> ColumnId row String -- ^ @column@ - The column in the model of @completion@ to+entryCompletionSetTextColumn :: GlibString string => EntryCompletion+ -> ColumnId row string -- ^ @column@ - The column in the model of @completion@ to                         -- get strings from.  -> IO () entryCompletionSetTextColumn self column =@@ -356,8 +355,8 @@ -- -- * Available since Gtk+ version 2.6 ---entryCompletionGetTextColumn :: EntryCompletion- -> IO (ColumnId row String)  -- ^ returns the column containing the strings+entryCompletionGetTextColumn :: GlibString string => EntryCompletion+ -> IO (ColumnId row string)  -- ^ returns the column containing the strings entryCompletionGetTextColumn self =   liftM (makeColumnIdString . fromIntegral) $   {# call gtk_entry_completion_get_text_column #}@@ -495,7 +494,7 @@ -- -- Default value: 'Graphics.UI.Gtk.ModelView.CustomStore.invalidColumnId' ---entryCompletionTextColumn :: Attr EntryCompletion (ColumnId row String)+entryCompletionTextColumn :: GlibString string => Attr EntryCompletion (ColumnId row string) entryCompletionTextColumn = newAttr   entryCompletionGetTextColumn   entryCompletionSetTextColumn@@ -559,8 +558,8 @@ -- -- * Available since Gtk+ version 2.6 ---insertPrefix :: EntryCompletionClass self => Signal self (String -> IO Bool)-insertPrefix = Signal (connect_STRING__BOOL "insert-prefix")+insertPrefix :: (EntryCompletionClass self, GlibString string) => Signal self (string -> IO Bool)+insertPrefix = Signal (connect_GLIBSTRING__BOOL "insert-prefix") #endif  -- %hash c:d50e d:ad7e@@ -587,11 +586,11 @@ -- part of the @prefix@ into the entry - e.g. the entry used in the -- 'FileChooser' inserts only the part of the prefix up to the next \'\/\'. ---onInsertPrefix, afterInsertPrefix :: EntryCompletionClass self => self- -> (String -> IO Bool)+onInsertPrefix, afterInsertPrefix :: (EntryCompletionClass self, GlibString string) => self+ -> (string -> IO Bool)  -> IO (ConnectId self)-onInsertPrefix = connect_STRING__BOOL "insert_prefix" False-afterInsertPrefix = connect_STRING__BOOL "insert_prefix" True+onInsertPrefix = connect_GLIBSTRING__BOOL "insert_prefix" False+afterInsertPrefix = connect_GLIBSTRING__BOOL "insert_prefix" True #endif  -- | Gets emitted when an action is activated.
Graphics/UI/Gtk/Entry/HScale.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Entry.HScale ( -- * Detail--- +-- -- | The 'HScale' widget is used to allow the user to select a value using a -- horizontal slider. To create one, use 'hScaleNewWithRange'. --@@ -56,10 +56,10 @@   hScaleNewWithRange,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -69,7 +69,7 @@  -- | Creates a new 'HScale'. ---hScaleNew :: +hScaleNew ::     Adjustment -- ^ @adjustment@ - the 'Adjustment' which sets the range of                -- the scale.  -> IO HScale@@ -88,7 +88,7 @@ -- is a power of ten. If the resulting precision is not suitable for your -- needs, use 'Graphics.UI.Gtk.Abstract.Scale.scaleSetDigits' to correct it. ---hScaleNewWithRange :: +hScaleNewWithRange ::     Double    -- ^ @min@ - minimum value  -> Double    -- ^ @max@ - maximum value  -> Double    -- ^ @step@ - step increment (tick size) used with keyboard
Graphics/UI/Gtk/Entry/SpinButton.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Entry.SpinButton ( -- * Detail--- +-- -- | A 'SpinButton' is an ideal way to allow the user to set the value of some -- attribute. Rather than having to directly type a number into a 'Entry', -- 'SpinButton' allows the user to click on one of two arrows to increment or@@ -102,16 +102,16 @@   afterValueSpinned   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Structs	(inputError)-import Graphics.UI.Gtk.General.Enums	(SpinButtonUpdatePolicy(..), SpinType(..))+import Graphics.UI.Gtk.General.Structs  (inputError)+import Graphics.UI.Gtk.General.Enums    (SpinButtonUpdatePolicy(..), SpinType(..))  {# context lib="gtk" prefix="gtk" #} @@ -125,7 +125,7 @@  -- | Creates a new 'SpinButton'. ---spinButtonNew :: +spinButtonNew ::     Adjustment    -- ^ @adjustment@ - the 'Adjustment' object that this spin                   -- button should use.  -> Double        -- ^ @climbRate@ - specifies how much the spin button@@ -149,7 +149,7 @@ -- is a power of ten. If the resulting precision is not suitable for your -- needs, use 'spinButtonSetDigits' to correct it. ---spinButtonNewWithRange :: +spinButtonNewWithRange ::     Double        -- ^ @min@ - Minimum allowable value  -> Double        -- ^ @max@ - Maximum allowable value  -> Double        -- ^ @step@ - Increment added or subtracted by spinning the
Graphics/UI/Gtk/Entry/VScale.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Entry.VScale ( -- * Detail--- +-- -- | The 'VScale' widget is used to allow the user to select a value using a -- vertical slider. To create one, use 'vScaleNewWithRange'. --@@ -56,10 +56,10 @@   vScaleNewWithRange,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -69,7 +69,7 @@  -- | Creates a new 'VScale'. ---vScaleNew :: +vScaleNew ::     Adjustment -- ^ @adjustment@ - the 'Adjustment' which sets the range of                -- the scale.  -> IO VScale@@ -88,7 +88,7 @@ -- is a power of ten. If the resulting precision is not suitable for your -- needs, use 'Graphics.UI.Gtk.Abstract.Scale.scaleSetDigits' to correct it. ---vScaleNewWithRange :: +vScaleNewWithRange ::     Double    -- ^ @min@ - minimum value  -> Double    -- ^ @max@ - maximum value  -> Double    -- ^ @step@ - step increment (tick size) used with keyboard
Graphics/UI/Gtk/Gdk/AppLaunchContext.chs view
@@ -29,7 +29,7 @@ -- * Types   AppLaunchContext,   AppLaunchContextClass,-  castToAppLaunchContext, +  castToAppLaunchContext,   gTypeAppLaunchContext,   toAppLaunchContext, @@ -48,11 +48,8 @@ #endif   ) where -import Control.Monad	(liftM)- import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GObject		(wrapNewGObject) import Graphics.UI.Gtk.Gdk.EventM (TimeStamp) {#import Graphics.UI.Gtk.Types#} #ifdef HAVE_GIO@@ -67,7 +64,7 @@  -- | Creates a new 'AppLaunchContext'. appLaunchContextNew :: IO AppLaunchContext-appLaunchContextNew = +appLaunchContextNew =   wrapNewGObject mkAppLaunchContext $   {# call gdk_app_launch_context_new #} @@ -77,7 +74,7 @@ -- | Sets the workspace on which applications will be launched when using this context when running under -- a window manager that supports multiple workspaces, as described in the Extended Window Manager -- Hints.--- +-- -- When the workspace is not specified or desktop is set to -1, it is up to the window manager to pick -- one, typically it will be the current workspace. appLaunchContextSetDesktop :: AppLaunchContext -> Int -> IO ()@@ -96,7 +93,7 @@  #ifdef HAVE_GIO -- | Sets the icon for applications that are launched with this context.--- +-- -- Window Managers can use this information when displaying startup notification. appLaunchContextSetIcon :: IconClass icon => AppLaunchContext -> icon -> IO () appLaunchContextSetIcon self icon =@@ -108,11 +105,11 @@ -- | Sets the icon for applications that are launched with this context. The @iconName@ will be -- interpreted in the same way as the Icon field in desktop files. See also -- 'appLaunchContextSetIcon'.--- +-- -- If both icon and @iconName@ are set, the @iconName@ takes priority. If neither icon or @iconName@ is -- set, the icon is taken from either the file that is passed to launched application or from the -- GAppInfo for the launched application itself.-appLaunchContextSetIconName :: AppLaunchContext -> String -> IO ()+appLaunchContextSetIconName :: GlibString string => AppLaunchContext -> string -> IO () appLaunchContextSetIconName self iconName =   withUTFString iconName $ \iconNamePtr ->   {# call gdk_app_launch_context_set_icon_name #}@@ -121,7 +118,7 @@  -- | Sets the screen on which applications will be launched when using this context. See also -- 'appLaunchContextSetDisplay'.--- +-- -- If both screen and display are set, the screen takes priority. If neither screen or display are set, -- the default screen and display are used. appLaunchContextSetScreen :: AppLaunchContext -> Screen -> IO ()@@ -132,7 +129,7 @@  -- | Sets the timestamp of context. The timestamp should ideally be taken from the event that triggered -- the launch.--- +-- -- Window managers can use this information to avoid moving the focus to the newly launched application -- when the user is busy typing in another window. This is also known as 'focus stealing prevention'. appLaunchContextSetTimestamp :: AppLaunchContext -> TimeStamp -> IO ()
Graphics/UI/Gtk/Gdk/Cursor.chs view
@@ -8,7 +8,7 @@ --  Created: 18 November 2007 -- --  Copyright (C) 2007 Bit Connor---  Copyright (C) 2009 Andy Stewart +--  Copyright (C) 2009 Andy Stewart -- --  This library is free software; you can redistribute it and/or --  modify it under the terms of the GNU Lesser General Public@@ -34,9 +34,9 @@ -- * Enums   CursorType(..), --- * Constructors  +-- * Constructors   cursorNew,-  + -- * Methods #if GTK_MAJOR_VERSION < 3   cursorNewFromPixmap,@@ -52,13 +52,9 @@  import System.Glib.FFI import System.Glib.UTFString-import Foreign.ForeignPtr (ForeignPtr, castForeignPtr)-#if __GLASGOW_HASKELL__ >= 707-import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)-#else-import Foreign.ForeignPtr (unsafeForeignPtrToPtr)+#if GTK_MAJOR_VERSION < 3+import Graphics.UI.Gtk.General.Structs (Color) #endif-import Graphics.UI.Gtk.General.Structs  {#import Graphics.UI.Gtk.Types#} hiding (Arrow) @@ -85,11 +81,11 @@  -------------------- -- Constructors--- | Creates a new cursor from the set of builtin cursors for the default display. +-- | Creates a new cursor from the set of builtin cursors for the default display. -- See 'cursorNewForDisplay'. -- To make the cursor invisible, use 'BlankCursor'.-cursorNew :: -    CursorType  -- ^ @cursorType@ cursor to create +cursorNew ::+    CursorType  -- ^ @cursorType@ cursor to create  -> IO Cursor    -- ^ return a new 'Cursor' cursorNew cursorType = do   cursorPtr <- {#call cursor_new#} $fromIntegral (fromEnum cursorType)@@ -122,53 +118,53 @@ #endif  -- | Creates a new cursor from a pixbuf.--- Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. --- The functions 'displaySupportsCursorAlpha' and 'displaySupportsCursorColor' can be used to determine whether RGBA cursors are supported; +-- Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed.+-- The functions 'displaySupportsCursorAlpha' and 'displaySupportsCursorColor' can be used to determine whether RGBA cursors are supported; -- 'displayGetDefaultCursorSize' and 'displayGetMaximalCursorSize' give information about cursor sizes.--- --- On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension.--- -cursorNewFromPixbuf :: -    Display  -- ^ @display@ the 'Display' for which the cursor will be created   - -> Pixbuf   -- ^ @pixbuf@ the 'Pixbuf' containing the cursor image             - -> Int   -- ^ @x@ the horizontal offset of the 'hotspot' of the cursor. - -> Int   -- ^ @y@ the vertical offset of the 'hotspot' of the cursor.   - -> IO Cursor -- ^ return a new 'Cursor'.                                      +--+-- On the X backend, support for RGBA cursors requires a sufficiently new version of the X Render extension.+--+cursorNewFromPixbuf ::+    Display  -- ^ @display@ the 'Display' for which the cursor will be created+ -> Pixbuf   -- ^ @pixbuf@ the 'Pixbuf' containing the cursor image+ -> Int   -- ^ @x@ the horizontal offset of the 'hotspot' of the cursor.+ -> Int   -- ^ @y@ the vertical offset of the 'hotspot' of the cursor.+ -> IO Cursor -- ^ return a new 'Cursor'. cursorNewFromPixbuf display pixbuf x y = do   cursorPtr <- {#call cursor_new_from_pixbuf#} display pixbuf (fromIntegral x) (fromIntegral y)   makeNewCursor cursorPtr  -- | Creates a new cursor by looking up name in the current cursor theme.-cursorNewFromName :: -    Display  -- ^ @display@ the 'Display' for which the cursor will be created                - -> String  -- ^ @name@ the name of the cursor                                             - -> IO (Maybe Cursor)   -- ^ return a new 'Cursor', or @Nothing@ if there is no cursor with the given name -cursorNewFromName display name = +cursorNewFromName :: GlibString string+ => Display  -- ^ @display@ the 'Display' for which the cursor will be created+ -> string  -- ^ @name@ the name of the cursor+ -> IO (Maybe Cursor)   -- ^ return a new 'Cursor', or @Nothing@ if there is no cursor with the given name+cursorNewFromName display name =     withUTFString name $ \namePtr -> do       cursorPtr <- {#call cursor_new_from_name#} display namePtr       if cursorPtr == nullPtr then return Nothing else liftM Just $ makeNewCursor cursorPtr --- | Creates a new cursor from the set of builtin cursors. -cursorNewForDisplay :: -    Display  -- ^ @display@ the 'Display' for which the cursor will be created - -> CursorType  -- ^ @cursorType@ cursor to create                                    +-- | Creates a new cursor from the set of builtin cursors.+cursorNewForDisplay ::+    Display  -- ^ @display@ the 'Display' for which the cursor will be created+ -> CursorType  -- ^ @cursorType@ cursor to create  -> IO Cursor  -- ^ return a new 'Cursor'-cursorNewForDisplay display cursorType = do  +cursorNewForDisplay display cursorType = do   cursorPtr <- {#call cursor_new_for_display#} display $fromIntegral (fromEnum cursorType)   makeNewCursor cursorPtr- + -- | Returns the display on which the GdkCursor is defined.-cursorGetDisplay ::   +cursorGetDisplay ::     Cursor  -- ^ @cursor@ 'Cursor'- -> IO Display   -- ^ return the 'Display' associated to cursor + -> IO Display   -- ^ return the 'Display' associated to cursor cursorGetDisplay cursor =     makeNewGObject mkDisplay $ {#call cursor_get_display#} cursor-    --- | Returns a 'Pixbuf' with the image used to display the cursor.    --- Note that depending on the capabilities of the windowing system and on the cursor, GDK may not be able to obtain the image data. ++-- | Returns a 'Pixbuf' with the image used to display the cursor.+-- Note that depending on the capabilities of the windowing system and on the cursor, GDK may not be able to obtain the image data. -- In this case, @Nothing@ is returned.-cursorGetImage :: +cursorGetImage ::     Cursor  -- ^ @cursor@ 'Cursor'  -> IO (Maybe Pixbuf)   -- ^ a 'Pixbuf' representing cursor, or @Nothing@-cursorGetImage cursor = +cursorGetImage cursor =     maybeNull (makeNewGObject mkPixbuf) $ {#call cursor_get_image#} cursor
Graphics/UI/Gtk/Gdk/Display.chs view
@@ -41,7 +41,7 @@ -- 'Display' objects are the GDK representation of the X Display which can -- be described as /a workstation consisting of a keyboard a pointing device -- (such as a mouse) and one or more screens/. It is used to open and keep--- track of various 'Screen' objects currently instanciated by the application.+-- track of various 'Screen' objects currently instantiated by the application. -- It is also used to grab and release the keyboard and the mouse pointer.  -- * Class Hierarchy@@ -112,7 +112,7 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString@@ -121,7 +121,6 @@ {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Signals import Graphics.UI.Gtk.Gdk.EventM-import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..)) import Graphics.UI.Gtk.General.DNDTypes (SelectionTag, TargetTag, Atom(..))  {# context lib="gdk" prefix="gdk" #}@@ -132,8 +131,8 @@  -- | Opens a display. ---displayOpen ::-    String     -- ^ @displayName@ - the name of the display to open+displayOpen :: GlibString string+ => string     -- ^ @displayName@ - the name of the display to open  -> IO (Maybe Display)                -- ^ returns a 'Display', or @Nothing@ if the display                -- could not be opened.@@ -156,8 +155,8 @@  -- | Gets the name of the display. ---displayGetName :: Display- -> IO String -- ^ returns a string representing the display name+displayGetName :: GlibString string => Display+ -> IO string -- ^ returns a string representing the display name displayGetName self =   {# call gdk_display_get_name #}     self@@ -195,7 +194,7 @@ -- | Release any pointer grab. -- displayPointerUngrab :: Display- -> TimeStamp -- ^ @time@ - a timestap (e.g. 'currentTime').+ -> TimeStamp -- ^ @time@ - a timestamp (e.g. 'currentTime').  -> IO () displayPointerUngrab self time =   {# call gdk_display_pointer_ungrab #}@@ -205,7 +204,7 @@ -- | Release any keyboard grab -- displayKeyboardUngrab :: Display- -> TimeStamp -- ^ @time@ - a timestap (e.g 'currentTime').+ -> TimeStamp -- ^ @time@ - a timestamp (e.g 'currentTime').  -> IO () displayKeyboardUngrab self time =   {# call gdk_display_keyboard_ungrab #}@@ -246,7 +245,7 @@ -- | Flushes any requests queued for the windowing system; this happens -- automatically when the main loop blocks waiting for new events, but if your -- application is drawing without returning control to the main loop, you may--- need to call this function explicitely. A common case where this function+-- need to call this function explicitly. A common case where this function -- needs to be called is when an application is executing drawing commands from -- a thread other than the thread where the main loop is running. --@@ -410,7 +409,7 @@  #if GTK_CHECK_VERSION(2,4,0) -- | Returns @True@ if multicolored cursors are supported on @display@.--- Otherwise, cursors have only a forground and a background color.+-- Otherwise, cursors have only a foreground and a background color. -- -- * Available since Gdk version 2.4 --@@ -505,14 +504,14 @@     self     selection --- | Returns whether the speicifed display supports clipboard persistance;+-- | Returns whether the speicifed display supports clipboard persistence; -- i.e. if it's possible to store the clipboard data after an application has -- quit. On X11 this checks if a clipboard daemon is running. -- -- * Available since Gdk version 2.6 -- displaySupportsClipboardPersistence :: Display- -> IO Bool -- ^ returns @True@ if the display supports clipboard persistance.+ -> IO Bool -- ^ returns @True@ if the display supports clipboard persistence. displaySupportsClipboardPersistence self =   liftM toBool $   {# call gdk_display_supports_clipboard_persistence #}
Graphics/UI/Gtk/Gdk/DisplayManager.chs view
@@ -62,13 +62,10 @@ #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.GObject		(constructNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -89,7 +86,7 @@ -- | List all currently open displays. -- displayManagerListDisplays :: DisplayManagerClass self => self- -> IO [Display] -- ^ returns a newly allocated list of 'Display' objects. + -> IO [Display] -- ^ returns a newly allocated list of 'Display' objects. displayManagerListDisplays self =   {# call gdk_display_manager_list_displays #}     (toDisplayManager self)
Graphics/UI/Gtk/Gdk/DrawWindow.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Gdk.DrawWindow ( -- A 'DrawWindow' is used to implement high-level objects such as 'Widget' and--- 'Window' on the Gtk+ level. +-- 'Window' on the Gtk+ level. -- -- Most widgets draws its content into a 'DrawWindow', in particular -- 'DrawingArea' is nothing but a widget that contains a 'DrawWindow'.@@ -61,6 +61,7 @@ #endif   drawWindowRaise,   drawWindowLower,+  drawWindowRegisterDnd,   drawWindowBeginPaintRect, #if GTK_MAJOR_VERSION < 3   drawWindowBeginPaintRegion,@@ -87,7 +88,7 @@   drawWindowGetPointerPos,   drawWindowGetOrigin,   drawWindowSetCursor,-#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ)   drawWindowForeignNew, #endif   drawWindowGetDefaultRootWindow,@@ -102,26 +103,19 @@  import System.Glib.FFI import System.Glib.Flags                (toFlags)-import System.Glib.GObject              (wrapNewGObject,makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Gdk.Enums#} #if GTK_MAJOR_VERSION < 3 {#import Graphics.UI.Gtk.Gdk.Region#} #endif {#import Graphics.UI.Gtk.Gdk.Cursor#}-import Graphics.UI.Gtk.Gdk.EventM	(Modifier,-#if GTK_MAJOR_VERSION < 3-    eventRegion,-#endif-    ) import Graphics.UI.Gtk.General.Structs-import Graphics.UI.Gtk.Abstract.Widget	(widgetSetDoubleBuffered)  {# context lib="gdk" prefix="gdk" #}  -- | Gets the bitwise OR of the currently active drawWindow state flags, from -- the 'WindowState' enumeration.--- +-- drawWindowGetState :: DrawWindowClass self => self  -> IO [WindowState] -- ^ returns @DrawWindow@ flags drawWindowGetState self =@@ -139,7 +133,7 @@ -- if the edges of the window's parent do not extend beyond the edges of the -- drawWindow. In other cases, a multi-step process is used to scroll the window -- which may produce temporary visual artifacts and unnecessary invalidations.)--- +-- drawWindowScroll :: DrawWindowClass self => self  -> Int   -- ^ @dx@ - Amount to scroll in the X direction  -> Int   -- ^ @dy@ - Amount to scroll in the Y direction@@ -152,7 +146,7 @@  #if GTK_MAJOR_VERSION < 3 -- | Clears an entire @DrawWindow@ to the background color or background pixmap.--- +-- -- Removed in Gtk3. drawWindowClear :: DrawWindowClass self => self -> IO () drawWindowClear self =@@ -160,8 +154,8 @@      (toDrawWindow self)  -- | Clears an area of @DrawWindow@ to the background color or background pixmap.--- --- Removed in Gtk3. +--+-- Removed in Gtk3. drawWindowClearArea :: DrawWindowClass self => self  -> Int   -- ^ @x@ - x coordinate of rectangle to clear  -> Int   -- ^ @y@ - y coordinate of rectangle to clear@@ -178,7 +172,7 @@  -- | Like 'drawWindowClearArea', but also generates an expose event for the -- cleared area.--- +-- -- Removed in Gtk3. drawWindowClearAreaExpose :: DrawWindowClass self => self  -> Int   -- ^ @x@ - x coordinate of rectangle to clear@@ -202,7 +196,7 @@ -- If @DrawWindow@ is a toplevel, the window manager may choose to deny the -- request to move the drawWindow in the Z-order, 'drawWindowRaise' only requests the -- restack, does not guarantee it.--- +-- drawWindowRaise :: DrawWindowClass self => self -> IO () drawWindowRaise self =   {# call gdk_window_raise #}@@ -227,7 +221,7 @@      (toDrawWindow self)  -- | Registers a drawWindow as a potential drop destination.--- +-- drawWindowRegisterDnd :: DrawWindowClass self => self -> IO () drawWindowRegisterDnd self =   {# call gdk_window_register_dnd #}@@ -237,7 +231,7 @@ -- rectangular region for you. -- -- * See 'drawWindowBeginPaintRegion' for details.--- +-- drawWindowBeginPaintRect :: DrawWindowClass self => self  -> Rectangle -- ^ @rectangle@ - rectangle you intend to draw to  -> IO ()@@ -281,7 +275,7 @@ -- drawing operations affect only the topmost backing store in the stack. One -- matching call to 'drawWindowEndPaint' is required for each call to -- 'drawWindowBeginPaintRegion'.--- +-- -- Removed in Gtk3. drawWindowBeginPaintRegion :: DrawWindowClass self => self  -> Region -- ^ @region@ - region you intend to draw to@@ -299,7 +293,7 @@ -- next-most-recent backing store or no backing store at all as the active -- paint region. See 'drawWindowBeginPaintRegion' for full details. It is an error -- to call this function without a matching 'drawWindowBeginPaintRegion' first.--- +-- drawWindowEndPaint :: DrawWindowClass self => self -> IO () drawWindowEndPaint self =   {# call gdk_window_end_paint #}@@ -307,7 +301,7 @@  -- | A convenience wrapper around 'drawWindowInvalidateRegion' which invalidates a -- rectangular region. See 'drawWindowInvalidateRegion' for details.--- +-- drawWindowInvalidateRect :: DrawWindowClass self => self  -> Rectangle -- ^ @rect@ - rectangle to invalidate  -> Bool              -- ^ @invalidateChildren@ - whether to also invalidate@@ -330,7 +324,7 @@ -- The @invalidateChildren@ parameter controls whether the region of each -- child drawWindow that intersects @region@ will also be invalidated. If @False@, -- then the update area for child drawWindows will remain unaffected.--- +-- drawWindowInvalidateRegion :: DrawWindowClass self => self  -> Region -- ^ @region@ - a "Region"  -> Bool           -- ^ @invalidateChildren@ - @True@ to also invalidate child@@ -350,7 +344,7 @@ -- function. That is, after calling this function, @DrawWindow@ will no longer have -- an invalid\/dirty region; the update area is removed from @DrawWindow@ and -- handed to you. If this window has no update area, 'drawWindowGetUpdateArea' returns 'Nothing'.--- +-- -- Removed in Gtk3. drawWindowGetUpdateArea :: DrawWindowClass self => self  -> IO (Maybe Region) -- ^ returns the update area for @DrawWindow@@@ -360,19 +354,19 @@ #endif  -- | Temporarily freezes a drawWindow such that it won\'t receive expose events.---  * The drawWindow will begin receiving expose events again when +--  * The drawWindow will begin receiving expose events again when --  'drawWindowThawUpdates' -- is called. If 'drawWindowFreezeUpdates' has been called more than once, -- 'drawWindowThawUpdates' must be called an equal number of times to begin -- processing exposes.--- +-- drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO () drawWindowFreezeUpdates self =   {# call gdk_window_freeze_updates #}      (toDrawWindow self)  -- | Thaws a drawWindow frozen with 'drawWindowFreezeUpdates'.--- +-- drawWindowThawUpdates :: DrawWindowClass self => self -> IO () drawWindowThawUpdates self =   {# call gdk_window_thaw_updates #}@@ -388,7 +382,7 @@ -- and synchronously (vs. the usual case, where Gtk delivers them in an idle -- handler). Occasionally this is useful to produce nicer scrolling behavior, -- for example.--- +-- drawWindowProcessUpdates :: DrawWindowClass self => self  -> Bool  -- ^ @updateChildren@ - whether to also process updates for child           -- drawWindows@@ -406,7 +400,7 @@ -- hint. ICCCM-compliant drawWindow manager usually respect it. -- -- * Available since Gdk version 2.4--- +-- drawWindowSetAcceptFocus :: DrawWindowClass self => self  -> Bool  -- ^ @acceptFocus@ - @True@ if the drawWindow should receive input focus  -> IO ()@@ -428,7 +422,7 @@ -- -- * On the X11 platform, this uses an X server extension which is widely --   available on most common platforms, but not available on very old---   X servers, and occasionally the implementation will be buggy. +--   X servers, and occasionally the implementation will be buggy. --   On servers without the shape extension, this function will do nothing. --   On the Win32 platform the functionality is always present. --@@ -472,7 +466,7 @@ -- shape extension, this function will do nothing. -- -- This function works on both toplevel and child drawWindows.--- +-- drawWindowShapeCombineRegion :: DrawWindowClass self => self  -> Maybe Region -- ^ @shapeRegion@ - region of drawWindow to be non-transparent  -> Int            -- ^ @offsetX@ - X position of @shapeRegion@ in @DrawWindow@@@ -498,7 +492,7 @@ -- children of @DrawWindow@, ignoring the shape mask of @DrawWindow@ itself. Contrast -- with 'drawWindowMergeChildShapes' which includes the shape mask of @DrawWindow@ in -- the masks to be merged.--- +-- drawWindowSetChildShapes :: DrawWindowClass self => self -> IO () drawWindowSetChildShapes self =   {# call gdk_window_set_child_shapes #}@@ -510,7 +504,7 @@ -- -- This function is distinct from 'drawWindowSetChildShapes' because it includes -- @DrawWindow@'s shape mask in the set of shapes to be merged.--- +-- drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO () drawWindowMergeChildShapes self =   {# call gdk_window_merge_child_shapes #}@@ -521,7 +515,7 @@ -- -- * The position is -- given in coordinates relative to the given window.--- +-- -- * The return value is @Just (same, x, y, mod)@ where @same@ is @True@ --   if the passed in window is the window over which the mouse currently --   resides.@@ -548,12 +542,12 @@ -- -- * The position is -- given in coordinates relative to the given window.--- +-- -- * The return value is @(Just win, x, y, mod)@ where @win@ is the --   window over which the mouse currently resides and @mod@ denotes --   the keyboard modifiers currently being depressed. ----- * The return value is @Nothing@ for the window if the mouse cursor is +-- * The return value is @Nothing@ for the window if the mouse cursor is --   not over a known window. -- drawWindowGetPointerPos :: DrawWindowClass self => self@@ -601,8 +595,8 @@     self     (fromMaybe (Cursor nullForeignPtr) cursor) -#if GTK_MAJOR_VERSION < 3--- | Get the handle to an exising window of the windowing system. The+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ)+-- | Get the handle to an existing window of the windowing system. The -- passed-in handle is a reference to a native window, that is, an Xlib XID -- for X windows and a HWND for Win32. --@@ -613,8 +607,8 @@ #endif  -- | Obtains the root window (parent all other windows are inside) for the default display and screen.-drawWindowGetDefaultRootWindow :: -  IO DrawWindow -- ^ returns the default root window +drawWindowGetDefaultRootWindow ::+  IO DrawWindow -- ^ returns the default root window drawWindowGetDefaultRootWindow =   makeNewGObject mkDrawWindow $   {#call gdk_get_default_root_window #}
Graphics/UI/Gtk/Gdk/Enums.chs view
@@ -4,7 +4,7 @@ -- --  Author : Manuel M. T. Chakravarty, Axel Simon -----  Created: 13 Januar 1999+--  Created: 13 January 1999 -- --  Copyright (C) 1999-2005 Manuel M. T. Chakravarty, Axel Simon --@@ -31,6 +31,9 @@   DragAction(..),   EventMask(..),   Modifier(..),+#if GTK_CHECK_VERSION(3,4,0)+  ModifierIntent(..),+#endif   NotifyType(..),   ScrollDirection(..),   VisibilityState(..),@@ -55,7 +58,7 @@ #endif   ) where -import System.Glib.Flags	(Flags)+import System.Glib.Flags        (Flags)  {#context lib="gdk" prefix ="gdk"#} @@ -112,7 +115,7 @@ -- | Keyboard modifiers that are depressed when the user presses --   a key or a mouse button. ----- * This data type is used to build lists of modifers that were active+-- * This data type is used to build lists of modifiers that were active --   during an event. -- -- * The "Apple" key on Macintoshs is mapped to 'Alt2' and the 'Meta'@@ -166,6 +169,10 @@  instance Flags Modifier +#if GTK_CHECK_VERSION(3,4,0)+{#enum ModifierIntent {underscoreToCase} deriving(Eq,Show) #}+#endif+ #if GTK_MAJOR_VERSION < 3 -- | specify which input extension a widget desires --@@ -240,8 +247,8 @@ -- | visibility of a window -- {#enum VisibilityState {underscoreToCase,-			VISIBILITY_PARTIAL as VisibilityPartialObscured}-			 deriving(Eq,Show) #}+                        VISIBILITY_PARTIAL as VisibilityPartialObscured}+                         deriving(Eq,Show) #}  -- | The state a @DrawWindow@ is in. --
Graphics/UI/Gtk/Gdk/EventM.hsc view
@@ -1,4 +1,8 @@ {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE EmptyDataDecls #-}+#if MIN_VERSION_base(4,8,0)+{-# LANGUAGE FlexibleContexts #-}+#endif -- -*-haskell-*-  #include <gtk/gtk.h>@@ -86,7 +90,7 @@ --   print a message. Note that the return --   value of this statement must be @()@ since 'tryEvent' always --   assumes that the---   function handeled the event if no exception is thrown. A handler+--   function handled the event if no exception is thrown. A handler --   wrapped by 'tryEvent' can also indicate that it cannot handle the --   given event by calling 'stopEvent'. --@@ -94,6 +98,13 @@ --   you can (and usually have to) use @liftIO@ to execute @IO@ functions. -- +-- * Classes++  HasCoordinates,+  HasRootCoordinates,+  HasModifier,+  HasTime,+ -- * Event monad and type tags   EventM,   EAny,@@ -169,8 +180,8 @@   eventGrabWindow, #endif --- * Auxilliary Definitions-  Modifier(..),		-- a mask of control keys+-- * Auxiliary Definitions+  Modifier(..),         -- a mask of control keys   TimeStamp,   currentTime,   tryEvent,@@ -179,25 +190,24 @@  import Prelude hiding (catch) import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Flags import System.Glib.GObject ( makeNewGObject )-import Graphics.UI.Gtk.Gdk.Keys		(KeyVal, KeyCode, keyName)+import Graphics.UI.Gtk.Gdk.Keys         (KeyVal, KeyCode, keyName) #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.Gdk.Region       (Region, makeNewRegion) #endif-import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..), VisibilityState(..),+import Graphics.UI.Gtk.Gdk.Enums        (Modifier(..), VisibilityState(..),   CrossingMode(..), NotifyType(..), WindowState(..), ScrollDirection(..), #if GTK_CHECK_VERSION(2,6,0)   OwnerChange(..) #endif   )-import Graphics.UI.Gtk.General.Enums	(MouseButton(..), Click(..))-import Graphics.UI.Gtk.General.Structs	(Rectangle(..))+import Graphics.UI.Gtk.General.Enums    (MouseButton(..), Click(..))+import Graphics.UI.Gtk.General.Structs  (Rectangle(..)) import Graphics.UI.Gtk.General.DNDTypes (Atom(..), SelectionTag) import Graphics.UI.Gtk.Types ( DrawWindow, mkDrawWindow ) -import Data.Bits ((.|.), (.&.), testBit, shiftL, shiftR)-import Data.Maybe (catMaybes) import Data.List (isPrefixOf) import Control.Monad.Reader ( ReaderT, ask, runReaderT ) import Control.Monad.Trans ( liftIO )@@ -211,60 +221,60 @@ import Control.Exception (catch, throw,                           Exception(PatternMatchFail,IOException) ) #endif-  + -- | A monad providing access to data in an event. ---type EventM t a = ReaderT (Ptr t) IO a +type EventM t = ReaderT (Ptr t) IO  -- | A tag for events that do not carry any event-specific information.-data EAny = EAny+data EAny  -- | A tag for /key/ events.-data EKey = EKey+data EKey  -- | A tag for /Button/ events.-data EButton = EButton+data EButton  -- | A tag for /Scroll/ events.-data EScroll = EScroll+data EScroll  -- | A tag for /Motion/ events.-data EMotion = EMotion+data EMotion  -- | A tag for /Expose/ events.-data EExpose = EExpose+data EExpose  -- | A tag for /Visibility/ events.-data EVisibility = EVisibility+data EVisibility  -- | A tag for /Crossing/ events.-data ECrossing = ECrossing+data ECrossing  -- | A tag for /Focus/ events.-data EFocus = EFocus      +data EFocus  -- | A tag for /Configure/ events.-data EConfigure = EConfigure- +data EConfigure+ -- | A tag for /Property/ events.-data EProperty = EProperty-           +data EProperty+ -- | A tag for /Proximity/ events.-data EProximity = EProximity+data EProximity  -- | A tag for /WindowState/ event.-data EWindowState = EWindowState+data EWindowState  #if GTK_CHECK_VERSION(2,6,0) -- | A tag for /OwnerChange/ events.-data EOwnerChange = EOwnerChange+data EOwnerChange #endif   #if GTK_CHECK_VERSION(2,8,0) -- | A tag for /GrabBroken/ events.-data EGrabBroken = EGrabBroken+data EGrabBroken #endif  -- | Retrieve the 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawWindow' that this@@ -394,23 +404,23 @@     (ty :: #{gtk2hs_type GdkEventType}) <- peek (castPtr ptr)     if ty `elem` [ #{const GDK_KEY_PRESS},                    #{const GDK_KEY_RELEASE}] then do-        (modif ::#gtk2hs_type guint)	<- #{peek GdkEventKey, state} ptr+        (modif ::#gtk2hs_type guint)    <- #{peek GdkEventKey, state} ptr         return (toFlags (fromIntegral (modif .&. mask)))       else if ty `elem` [ #{const GDK_BUTTON_PRESS},                    #{const GDK_2BUTTON_PRESS},                    #{const GDK_3BUTTON_PRESS},                    #{const GDK_BUTTON_RELEASE}] then do-        (modif ::#gtk2hs_type guint)	<- #{peek GdkEventButton, state} ptr+        (modif ::#gtk2hs_type guint)    <- #{peek GdkEventButton, state} ptr         return (toFlags (fromIntegral (modif .&. mask)))       else if ty `elem` [ #{const GDK_SCROLL} ] then do-        (modif ::#gtk2hs_type guint)	<- #{peek GdkEventScroll, state} ptr+        (modif ::#gtk2hs_type guint)    <- #{peek GdkEventScroll, state} ptr         return (toFlags (fromIntegral (modif .&. mask)))       else if ty `elem` [ #{const GDK_MOTION_NOTIFY} ] then do-        (modif ::#gtk2hs_type guint)	<- #{peek GdkEventMotion, state} ptr+        (modif ::#gtk2hs_type guint)    <- #{peek GdkEventMotion, state} ptr         return (toFlags (fromIntegral (modif .&. mask)))       else if ty `elem` [ #{const GDK_ENTER_NOTIFY},                           #{const GDK_LEAVE_NOTIFY}] then do-        (modif ::#gtk2hs_type guint)	<- #{peek GdkEventCrossing, state} ptr+        (modif ::#gtk2hs_type guint)    <- #{peek GdkEventCrossing, state} ptr         return (toFlags (fromIntegral (modif .&. mask)))       else error ("eventModifiers: none for event type "++show ty) @@ -478,26 +488,26 @@  -- | The key value. See 'Graphics.UI.Gtk.Gdk.Keys.KeyVal'. eventKeyVal :: EventM EKey KeyVal-eventKeyVal = ask >>= \ptr -> liftIO $ liftM fromIntegral -  (#{peek GdkEventKey, keyval} ptr :: IO #{gtk2hs_type guint})  +eventKeyVal = ask >>= \ptr -> liftIO $ liftM fromIntegral+  (#{peek GdkEventKey, keyval} ptr :: IO #{gtk2hs_type guint})  -- | The key value as a string. See 'Graphics.UI.Gtk.Gdk.Keys.KeyVal'.-eventKeyName :: EventM EKey String+eventKeyName :: EventM EKey DefaultGlibString eventKeyName = liftM keyName $ eventKeyVal  -- | The hardware key code. eventHardwareKeycode :: EventM EKey KeyCode-eventHardwareKeycode = ask >>= \ptr -> liftIO $ liftM fromIntegral +eventHardwareKeycode = ask >>= \ptr -> liftIO $ liftM fromIntegral   (#{peek GdkEventKey, hardware_keycode} ptr :: IO #{gtk2hs_type guint16})  -- | The keyboard group. eventKeyboardGroup :: EventM EKey Word8-eventKeyboardGroup = ask >>= \ptr -> liftIO $ liftM fromIntegral +eventKeyboardGroup = ask >>= \ptr -> liftIO $ liftM fromIntegral   (#{peek GdkEventKey, group} ptr :: IO #{gtk2hs_type guint8})  -- | Query the mouse buttons. eventButton :: EventM EButton MouseButton-eventButton = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral) +eventButton = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral)   (#{peek GdkEventButton, button} ptr :: IO #{gtk2hs_type guint})  --- | Query the mouse click.@@ -515,13 +525,13 @@  -- | Query the direction of scrolling. eventScrollDirection :: EventM EScroll ScrollDirection-eventScrollDirection = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral) +eventScrollDirection = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral)   (#{peek GdkEventScroll, direction} ptr :: IO #{gtk2hs_type GdkScrollDirection})  -- | Check if the motion event is only a hint rather than the full mouse --   movement information. eventIsHint :: EventM EMotion Bool-eventIsHint = ask >>= \ptr -> liftIO $ liftM toBool +eventIsHint = ask >>= \ptr -> liftIO $ liftM toBool   (#{peek GdkEventMotion, is_hint} ptr :: IO #{gtk2hs_type gint16})  #if GTK_CHECK_VERSION(2,12,0)@@ -559,7 +569,7 @@ -- Removed in Gtk3. eventRegion :: EventM EExpose Region eventRegion = ask >>= \ptr -> liftIO $ do-  (reg_   :: Ptr Region)	<- #{peek GdkEventExpose, region} ptr+  (reg_   :: Ptr Region)        <- #{peek GdkEventExpose, region} ptr   reg_ <- gdk_region_copy reg_   makeNewRegion reg_ @@ -569,12 +579,12 @@  -- | Get the visibility status of a window. eventVisibilityState :: EventM EVisibility VisibilityState-eventVisibilityState = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral) +eventVisibilityState = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral)   (#{peek GdkEventVisibility, state} ptr :: IO #{gtk2hs_type GdkVisibilityState})  -- | Get the mode of the mouse cursor crossing a window. eventCrossingMode :: EventM ECrossing CrossingMode-eventCrossingMode = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral) +eventCrossingMode = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral)   (#{peek GdkEventCrossing, mode} ptr :: IO #{gtk2hs_type GdkCrossingMode})  -- | Get the notify type of the mouse cursor crossing a window.@@ -589,51 +599,51 @@  -- | Query if a window gained focus (@True@) or lost the focus (@False@). eventFocusIn :: EventM EFocus Bool-eventFocusIn = ask >>= \ptr -> liftIO $ liftM toBool +eventFocusIn = ask >>= \ptr -> liftIO $ liftM toBool   (#{peek GdkEventFocus, in} ptr :: IO #{gtk2hs_type gint16})  -- | Get the @(x,y)@ position of the window within the parent window. eventPosition :: EventM EConfigure (Int,Int) eventPosition = ask >>= \ptr -> liftIO $ do-  (x :: #{gtk2hs_type gint})	<- #{peek GdkEventConfigure, x} ptr-  (y :: #{gtk2hs_type gint})	<- #{peek GdkEventConfigure, y} ptr+  (x :: #{gtk2hs_type gint})    <- #{peek GdkEventConfigure, x} ptr+  (y :: #{gtk2hs_type gint})    <- #{peek GdkEventConfigure, y} ptr   return (fromIntegral x, fromIntegral y)  -- | Get the new size of the window as @(width,height)@. eventSize :: EventM EConfigure (Int,Int) eventSize = ask >>= \ptr -> liftIO $ do-  (x :: #{gtk2hs_type gint})	<- #{peek GdkEventConfigure, width} ptr-  (y :: #{gtk2hs_type gint})	<- #{peek GdkEventConfigure, height} ptr+  (x :: #{gtk2hs_type gint})    <- #{peek GdkEventConfigure, width} ptr+  (y :: #{gtk2hs_type gint})    <- #{peek GdkEventConfigure, height} ptr   return (fromIntegral x, fromIntegral y)  eventProperty :: EventM EProperty Atom-eventProperty = ask >>= \ptr -> liftIO $ liftM Atom -  (#{peek GdkEventProperty, atom} ptr :: IO (Ptr ())) +eventProperty = ask >>= \ptr -> liftIO $ liftM Atom+  (#{peek GdkEventProperty, atom} ptr :: IO (Ptr ()))  -- | Query which window state bits have changed. eventWindowStateChanged :: EventM EWindowState [WindowState]-eventWindowStateChanged = ask >>= \ptr -> liftIO $ liftM (toFlags . fromIntegral) +eventWindowStateChanged = ask >>= \ptr -> liftIO $ liftM (toFlags . fromIntegral)   (#{peek GdkEventWindowState, changed_mask} ptr :: IO #{gtk2hs_type GdkWindowState})  -- | Query the new window state. eventWindowState :: EventM EWindowState [WindowState]-eventWindowState = ask >>= \ptr -> liftIO $ liftM (toFlags . fromIntegral) +eventWindowState = ask >>= \ptr -> liftIO $ liftM (toFlags . fromIntegral)   (#{peek GdkEventWindowState, new_window_state} ptr :: IO #{gtk2hs_type GdkWindowState})  #if GTK_CHECK_VERSION(2,6,0) -- | Query why a seleciton changed its owner. eventChangeReason :: EventM EOwnerChange OwnerChange-eventChangeReason = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral) +eventChangeReason = ask >>= \ptr -> liftIO $ liftM (toEnum . fromIntegral)   (#{peek GdkEventOwnerChange, reason} ptr :: IO #{gtk2hs_type GdkOwnerChange})-  + -- | Query what selection changed its owner. eventSelection :: EventM EOwnerChange SelectionTag-eventSelection = ask >>= \ptr -> liftIO $ liftM Atom +eventSelection = ask >>= \ptr -> liftIO $ liftM Atom   (#{peek GdkEventOwnerChange, selection} ptr :: IO (Ptr ()))  -- | Query the time when the selection was taken over. eventSelectionTime :: EventM EOwnerChange TimeStamp-eventSelectionTime = ask >>= \ptr -> liftIO $ liftM fromIntegral +eventSelectionTime = ask >>= \ptr -> liftIO $ liftM fromIntegral   (#{peek GdkEventOwnerChange, selection_time} ptr :: IO (#{gtk2hs_type guint32})) #endif @@ -641,12 +651,12 @@ -- | Check if a keyboard (@True@) or a mouse pointer grap (@False@) was --   broken. eventKeyboardGrab :: EventM EGrabBroken Bool-eventKeyboardGrab = ask >>= \ptr -> liftIO $ liftM toBool +eventKeyboardGrab = ask >>= \ptr -> liftIO $ liftM toBool   (#{peek GdkEventGrabBroken, keyboard} ptr :: IO #{gtk2hs_type gboolean})  -- | Check if a grab was broken implicitly. eventImplicit :: EventM EGrabBroken Bool-eventImplicit = ask >>= \ptr -> liftIO $ liftM toBool +eventImplicit = ask >>= \ptr -> liftIO $ liftM toBool   (#{peek GdkEventGrabBroken, implicit} ptr :: IO #{gtk2hs_type gboolean})  -- | Get the new window that owns the grab or @Nothing@ if the window
Graphics/UI/Gtk/Gdk/Events.hsc view
@@ -27,16 +27,16 @@ -- Stability   : deprecated -- Portability : portable (depends on GHC) ----- Definiton of a record that contains event information. Deprecated in+-- Definition of a record that contains event information. Deprecated in -- favor of 'Graphics.UI.Gtk.Gdk.EventM' and not exported by Gtk.hs. -- module Graphics.UI.Gtk.Gdk.Events (-  Modifier(..),		-- a mask of control keys+  Modifier(..),         -- a mask of control keys   TimeStamp,   currentTime,    -- | Deprecated way of conveying event information.-  Event(..),		-- information in event callbacks from Gdk+  Event(..),            -- information in event callbacks from Gdk   EventButton,   EventScroll,   EventMotion,@@ -54,7 +54,7 @@   marshExposeRect,    -- selector functions-  marshalEvent,		-- convert a pointer to an event data structure+  marshalEvent,         -- convert a pointer to an event data structure   -- used data structures   VisibilityState(..),   CrossingMode(..),@@ -68,25 +68,20 @@  import System.IO.Unsafe (unsafeInterleaveIO) import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Flags-import System.Glib.GObject ( makeNewGObject )-import Graphics.UI.Gtk.Gdk.Keys		(KeyVal, keyvalToChar, keyvalName)+import Graphics.UI.Gtk.Gdk.Keys         (KeyVal, keyvalToChar, keyvalName) #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.Gdk.Region       (Region, makeNewRegion) #endif-import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..),+import Graphics.UI.Gtk.Gdk.Enums        (Modifier(..),                                          VisibilityState(..),-					 CrossingMode(..),-					 NotifyType(..),-					 WindowState(..),-					 ScrollDirection(..))-import Graphics.UI.Gtk.General.Enums	(MouseButton(..), Click(..))-import Graphics.UI.Gtk.General.Structs	(Rectangle(..))-import Graphics.UI.Gtk.Types ( DrawWindow, mkDrawWindow )--import Data.Bits ((.|.), (.&.), testBit, shiftL, shiftR)-import Data.Maybe (catMaybes)-+                                         CrossingMode(..),+                                         NotifyType(..),+                                         WindowState(..),+                                         ScrollDirection(..))+import Graphics.UI.Gtk.General.Enums    (MouseButton(..), Click(..))+import Graphics.UI.Gtk.General.Structs  (Rectangle(..))  -- | The time (in milliseconds) when an event happened. This is used mostly -- for ordering events and responses to events.@@ -197,31 +192,31 @@   --   'Graphics.UI.Gtk.Abstract.Widget.widgetQueueDrawArea'.   --   | Expose {-    eventSent	:: Bool,+    eventSent   :: Bool,     -- | A bounding box denoting what needs to be updated. For a more     -- detailed information on the area that needs redrawing, use the     -- next field.-    eventArea	:: Rectangle,+    eventArea   :: Rectangle, #if GTK_MAJOR_VERSION < 3     -- | A set of horizontal stripes that denote the invalid area.     eventRegion      :: Region, #endif      -- | The number of contiguous 'Expose' events following this-    --   one. The only use for this is \"exposure compression\", i.e. +    --   one. The only use for this is \"exposure compression\", i.e.     --   handling all contiguous 'Expose' events in one go, though Gdk     --   performs some exposure compression so this is not normally needed.-    eventCount	:: Int }+    eventCount  :: Int }   -- | Mouse motion.   --   -- * Captures the movement of the mouse cursor while it is within the area   --   of the widget.   --   | Motion {-    eventSent	:: Bool,-    eventTime	:: TimeStamp,-    eventX,eventY	:: Double,-    eventModifier 	:: [Modifier],+    eventSent   :: Bool,+    eventTime   :: TimeStamp,+    eventX,eventY       :: Double,+    eventModifier       :: [Modifier],     -- | Indicate if this event is only a hint of the motion.     --     -- * If the 'Graphics.UI.Gtk.Abstract.Widget.PointerMotionHintMask'@@ -230,32 +225,32 @@     --  'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowGetPointer'     --   is called. In this case 'eventIsHint' is set to @True@.     ---    eventIsHint	:: Bool,+    eventIsHint :: Bool,     eventXRoot,-    eventYRoot	:: Double } +    eventYRoot  :: Double }   -- | A mouse button was pressed or released.   --   -- * This event is triggered if the mouse button was pressed or released   --   while the mouse cursor was within the region of the widget.   --   | Button {-    eventSent	:: Bool,+    eventSent   :: Bool,     -- | The kind of button press, see 'Click'. Note that double clicks will     --   trigger this event with 'eventClick' set to 'SingleClick',     --   'ReleaseClick',     --   'SingleClick', 'DoubleClick', 'ReleaseClick'. Triple clicks will     --   produce this sequence followed by 'SingleClick', 'DoubleClick',     --   'TripleClick', 'ReleaseClick'.-    eventClick	:: Click,+    eventClick  :: Click,     -- | The time of the event in milliseconds.-    eventTime	:: TimeStamp,-    eventX,eventY	:: Double,-    eventModifier	:: [Modifier],+    eventTime   :: TimeStamp,+    eventX,eventY       :: Double,+    eventModifier       :: [Modifier],     -- | The button that was pressed.-    eventButton	:: MouseButton,+    eventButton :: MouseButton,     -- | The coordinates of the click relative to the screen origin.     eventXRoot,-    eventYRoot	:: Double }+    eventYRoot  :: Double }   -- | A key was pressed while the widget had the input focus.   --   -- * If the widget has the current input focus (see@@ -272,10 +267,10 @@     --   to connect the same handler to     --  'Graphics.UI.Gtk.Abstract.Widget.onKeyPress' and     --  'Graphics.UI.Gtk.Abstract.Widget.onKeyRelease'.-    eventRelease	:: Bool,-    eventSent	:: Bool,-    eventTime	:: TimeStamp,-    eventModifier	:: [Modifier],+    eventRelease        :: Bool,+    eventSent   :: Bool,+    eventTime   :: TimeStamp,+    eventModifier       :: [Modifier],     -- | This flag is @True@ if Caps Lock is on while this key was pressed.     eventWithCapsLock   :: Bool,     -- | This flag is @True@ if Number Lock is on while this key was pressed.@@ -293,7 +288,7 @@     --   for a complete list refer to \"<gdk/gdkkeysyms.h>\" where all     --   possible values are defined. The corresponding strings are the     --   constants without the GDK_ prefix.-    eventKeyName	:: String,+    eventKeyName :: DefaultGlibString,     -- | A character matching the key that was pressed.     --     -- * This entry can be used to build up a whole input string.@@ -308,11 +303,11 @@   --   some GUI elements like buttons on a toolbar change their appearance.   --   | Crossing {-    eventSent	:: Bool,-    eventTime	:: TimeStamp,-    eventX,eventY	:: Double,+    eventSent   :: Bool,+    eventTime   :: TimeStamp,+    eventX,eventY       :: Double,     eventXRoot,-    eventYRoot	:: Double,+    eventYRoot  :: Double,     -- | This flag is false if the widget was entered, it is true when the     --   widget the mouse cursor left the widget.     eventLeaves :: Bool,@@ -321,21 +316,21 @@     -- * The mouse cursor might enter this widget because it grabs the mouse     --   cursor for e.g. a modal dialog box.     ---    eventCrossingMode	:: CrossingMode,+    eventCrossingMode   :: CrossingMode,     -- | Information on from what level of the widget hierarchy the mouse     --   cursor came.     --     -- * See 'NotifyType'.     ---    eventNotifyType	:: NotifyType,-    eventModifier	:: [Modifier]}-  -- | Gaining or loosing input focus.+    eventNotifyType     :: NotifyType,+    eventModifier       :: [Modifier]}+  -- | Gaining or losing input focus.   --   | Focus {-    eventSent	:: Bool,+    eventSent   :: Bool,     -- | This flag is @True@ if the widget receives the focus and @False@ if     -- it just lost the input focus.-    eventInFocus	:: Bool}+    eventInFocus        :: Bool}   -- | The widget\'s size has changed.   --   -- * In response to this event the application can allocate resources that@@ -343,23 +338,23 @@   --   is shown the first time and on every resize.   --   | Configure {-    eventSent	:: Bool,+    eventSent   :: Bool,     -- | Position within the parent window.-    eventXParent	:: Int,+    eventXParent        :: Int,     -- | Position within the parent window.-    eventYParent	:: Int,-    eventWidth	:: Int,-    eventHeight	:: Int}+    eventYParent        :: Int,+    eventWidth  :: Int,+    eventHeight :: Int}   -- | Change of visibility of a widget.   | Visibility {-    eventSent	:: Bool,+    eventSent   :: Bool,     -- | Denote what portions of the widget is visible.-    eventVisible	:: VisibilityState }+    eventVisible        :: VisibilityState }   -- | Wheel movement of the mouse.   --   -- * This action denotes that the content of the widget should be scrolled.   --   The event is triggered by the movement of the mouse wheel. Surrounding-  --   scroll bars are independant of this signal. Most mice do not have+  --   scroll bars are independent of this signal. Most mice do not have   --   buttons for horizontal scrolling, hence 'eventDirection' will usually not   --   contain 'ScrollLeft' and 'ScrollRight'. Mice with additional   --   buttons may not work on X since only five buttons are supported@@ -369,23 +364,23 @@   --   surround this widget which in turn tell this widget to update.   --   | Scroll {-    eventSent	:: Bool,-    eventTime	:: TimeStamp,-    eventX,eventY	:: Double,-    eventDirection	:: ScrollDirection,+    eventSent   :: Bool,+    eventTime   :: TimeStamp,+    eventX,eventY       :: Double,+    eventDirection      :: ScrollDirection,     eventXRoot,-    eventYRoot	:: Double}+    eventYRoot  :: Double}   -- | Indicate how the appearance of this window has changed.   | WindowState {-    eventSent	:: Bool,+    eventSent   :: Bool,     -- | The mask indicates which flags have changed.-    eventWindowMask	:: [WindowState],+    eventWindowMask     :: [WindowState],     -- | The state indicates the current state of the window.-    eventWindowState	:: [WindowState]} +    eventWindowState    :: [WindowState]}   -- | The state of the pen of a graphics tablet pen or touchscreen device.   | Proximity {-    eventSent	:: Bool,-    eventTime	:: TimeStamp,+    eventSent   :: Bool,+    eventTime   :: TimeStamp,     -- | Whether the stylus has moved in or out of contact with the tablet.     eventInContact     :: Bool   } deriving Show@@ -396,47 +391,47 @@   (case eType of     #{const GDK_DELETE}         -> marshAny     #{const GDK_DESTROY}        -> marshAny-    #{const GDK_EXPOSE}		-> marshExpose-    #{const GDK_MOTION_NOTIFY}	-> marshMotion-    #{const GDK_BUTTON_PRESS}	-> marshButton SingleClick+    #{const GDK_EXPOSE}         -> marshExpose+    #{const GDK_MOTION_NOTIFY}  -> marshMotion+    #{const GDK_BUTTON_PRESS}   -> marshButton SingleClick     #{const GDK_2BUTTON_PRESS}  -> marshButton DoubleClick-    #{const GDK_3BUTTON_PRESS}	-> marshButton TripleClick-    #{const GDK_BUTTON_RELEASE}	-> marshButton ReleaseClick-    #{const GDK_KEY_PRESS}	-> marshKey False-    #{const GDK_KEY_RELEASE}	-> marshKey True-    #{const GDK_ENTER_NOTIFY}	-> marshCrossing False-    #{const GDK_LEAVE_NOTIFY}	-> marshCrossing True-    #{const GDK_FOCUS_CHANGE}	-> marshFocus-    #{const GDK_CONFIGURE}	-> marshConfigure+    #{const GDK_3BUTTON_PRESS}  -> marshButton TripleClick+    #{const GDK_BUTTON_RELEASE} -> marshButton ReleaseClick+    #{const GDK_KEY_PRESS}      -> marshKey False+    #{const GDK_KEY_RELEASE}    -> marshKey True+    #{const GDK_ENTER_NOTIFY}   -> marshCrossing False+    #{const GDK_LEAVE_NOTIFY}   -> marshCrossing True+    #{const GDK_FOCUS_CHANGE}   -> marshFocus+    #{const GDK_CONFIGURE}      -> marshConfigure     #{const GDK_MAP}            -> marshAny-    #{const GDK_UNMAP}          -> marshAny    +    #{const GDK_UNMAP}          -> marshAny --    #{const GDK_PROPERTY_NOTIFY}-> marshProperty     #{const GDK_PROXIMITY_IN}   -> marshProximity True-    #{const GDK_PROXIMITY_OUT}	-> marshProximity False+    #{const GDK_PROXIMITY_OUT}  -> marshProximity False     #{const GDK_VISIBILITY_NOTIFY}-> marshVisibility-    #{const GDK_SCROLL}		-> marshScroll-    #{const GDK_WINDOW_STATE}	-> marshWindowState-    code			-> \_ -> fail $+    #{const GDK_SCROLL}         -> marshScroll+    #{const GDK_WINDOW_STATE}   -> marshWindowState+    code                        -> \_ -> fail $       "marshalEvent: unhandled event type " ++ show code ++       "\nplease report this as a bug to gtk2hs-devel@lists.sourceforge.net"     ) ptr  marshAny ptr = do-  (sent   ::#gtk2hs_type gint8)	<- #{peek GdkEventAny, send_event} ptr+  (sent   ::#gtk2hs_type gint8) <- #{peek GdkEventAny, send_event} ptr   return Event {     eventSent = toBool sent   }  marshExpose ptr = do   (#{const GDK_EXPOSE}::#gtk2hs_type GdkEventType) <- #{peek GdkEventAny,type} ptr-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventExpose, send_event} ptr-  (area_   ::Rectangle)		<- #{peek GdkEventExpose, area} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventExpose, send_event} ptr+  (area_   ::Rectangle)         <- #{peek GdkEventExpose, area} ptr #if GTK_MAJOR_VERSION < 3-  (reg_   :: Ptr Region)	<- #{peek GdkEventExpose, region} ptr+  (reg_   :: Ptr Region)        <- #{peek GdkEventExpose, region} ptr   reg_ <- gdk_region_copy reg_   region_ <- makeNewRegion reg_ #endif-  (count_  ::#gtk2hs_type gint)	<- #{peek GdkEventExpose, count} ptr+  (count_  ::#gtk2hs_type gint) <- #{peek GdkEventExpose, count} ptr   return $ Expose {     eventSent   = toBool sent_,     eventArea   = area_,@@ -453,43 +448,43 @@ marshExposeRect :: Ptr Event -> IO Rectangle marshExposeRect ptr = do   (#{const GDK_EXPOSE}::#gtk2hs_type GdkEventType) <- #{peek GdkEventAny,type} ptr-  (area_   ::Rectangle)		<- #{peek GdkEventExpose, area} ptr+  (area_   ::Rectangle)         <- #{peek GdkEventExpose, area} ptr   return area_  marshMotion ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventMotion, send_event} ptr-  (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventMotion, time} ptr-  (x_	   ::#gtk2hs_type gdouble)	<- #{peek GdkEventMotion, x} ptr-  (y_	   ::#gtk2hs_type gdouble)	<- #{peek GdkEventMotion, y} ptr-  (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventMotion, state} ptr-  (isHint_ ::#gtk2hs_type gint16)	<- #{peek GdkEventMotion, is_hint} ptr-  (xRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventMotion, x_root} ptr-  (yRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventMotion, y_root} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventMotion, send_event} ptr+  (time_   ::#gtk2hs_type guint32)      <- #{peek GdkEventMotion, time} ptr+  (x_      ::#gtk2hs_type gdouble)      <- #{peek GdkEventMotion, x} ptr+  (y_      ::#gtk2hs_type gdouble)      <- #{peek GdkEventMotion, y} ptr+  (modif_  ::#gtk2hs_type guint)        <- #{peek GdkEventMotion, state} ptr+  (isHint_ ::#gtk2hs_type gint16)       <- #{peek GdkEventMotion, is_hint} ptr+  (xRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventMotion, x_root} ptr+  (yRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventMotion, y_root} ptr   return $ Motion {     eventSent   = toBool sent_,     eventTime   = fromIntegral time_,-    eventX	   = realToFrac x_,-    eventY	   = realToFrac y_,+    eventX         = realToFrac x_,+    eventY         = realToFrac y_,     eventModifier  = (toFlags . fromIntegral) modif_,     eventIsHint = toBool isHint_,     eventXRoot  = realToFrac xRoot_,     eventYRoot  = realToFrac yRoot_}  marshButton but ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventButton, send_event} ptr-  (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventButton, time} ptr-  (x_	   ::#gtk2hs_type gdouble)	<- #{peek GdkEventButton, x} ptr-  (y_	   ::#gtk2hs_type gdouble)	<- #{peek GdkEventButton, y} ptr-  (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventButton, state} ptr-  (button_ ::#gtk2hs_type guint)	<- #{peek GdkEventButton, button} ptr-  (xRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventButton, x_root} ptr-  (yRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventButton, y_root} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventButton, send_event} ptr+  (time_   ::#gtk2hs_type guint32)      <- #{peek GdkEventButton, time} ptr+  (x_      ::#gtk2hs_type gdouble)      <- #{peek GdkEventButton, x} ptr+  (y_      ::#gtk2hs_type gdouble)      <- #{peek GdkEventButton, y} ptr+  (modif_  ::#gtk2hs_type guint)        <- #{peek GdkEventButton, state} ptr+  (button_ ::#gtk2hs_type guint)        <- #{peek GdkEventButton, button} ptr+  (xRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventButton, x_root} ptr+  (yRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventButton, y_root} ptr   return $ Button {     eventClick  = but,     eventSent   = toBool sent_,     eventTime   = fromIntegral time_,-    eventX	   = realToFrac x_,-    eventY	   = realToFrac y_,+    eventX         = realToFrac x_,+    eventY         = realToFrac y_,     eventModifier  = (toFlags . fromIntegral) modif_,     eventButton = (toEnum.fromIntegral) button_,     eventXRoot  = realToFrac xRoot_,@@ -497,12 +492,12 @@   marshKey up ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventKey, send_event} ptr-  (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventKey, time} ptr-  (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventKey, state} ptr-  (keyval_ ::#gtk2hs_type guint)	<- #{peek GdkEventKey, keyval} ptr-  -  (length_ ::#gtk2hs_type gint)	<- #{peek GdkEventKey, length} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventKey, send_event} ptr+  (time_   ::#gtk2hs_type guint32)      <- #{peek GdkEventKey, time} ptr+  (modif_  ::#gtk2hs_type guint)        <- #{peek GdkEventKey, state} ptr+  (keyval_ ::#gtk2hs_type guint)        <- #{peek GdkEventKey, keyval} ptr++  (length_ ::#gtk2hs_type gint) <- #{peek GdkEventKey, length} ptr   keyChar <- keyvalToChar keyval_   keyName <- unsafeInterleaveIO $ keyvalName keyval_   return $ Key {@@ -518,23 +513,23 @@     eventKeyChar = keyChar }  marshCrossing leave ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventCrossing, send_event} ptr-  (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventCrossing, time} ptr-  (x_	   ::#gtk2hs_type gdouble)	<- #{peek GdkEventCrossing, x} ptr-  (y_	   ::#gtk2hs_type gdouble)	<- #{peek GdkEventCrossing, y} ptr-  (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventCrossing, state} ptr-  (xRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventCrossing, x_root} ptr-  (yRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventCrossing, y_root} ptr-  (cMode_  ::#gtk2hs_type GdkCrossingMode) -				<- #{peek GdkEventCrossing, mode} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventCrossing, send_event} ptr+  (time_   ::#gtk2hs_type guint32)      <- #{peek GdkEventCrossing, time} ptr+  (x_      ::#gtk2hs_type gdouble)      <- #{peek GdkEventCrossing, x} ptr+  (y_      ::#gtk2hs_type gdouble)      <- #{peek GdkEventCrossing, y} ptr+  (modif_  ::#gtk2hs_type guint)        <- #{peek GdkEventCrossing, state} ptr+  (xRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventCrossing, x_root} ptr+  (yRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventCrossing, y_root} ptr+  (cMode_  ::#gtk2hs_type GdkCrossingMode)+                                <- #{peek GdkEventCrossing, mode} ptr   (nType_  ::#gtk2hs_type GdkNotifyType)-				<- #{peek GdkEventCrossing, detail} ptr  -  (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventCrossing, state} ptr+                                <- #{peek GdkEventCrossing, detail} ptr+  (modif_  ::#gtk2hs_type guint)        <- #{peek GdkEventCrossing, state} ptr   return $ Crossing {     eventSent   = toBool sent_,     eventTime   = fromIntegral time_,-    eventX	   = realToFrac x_,-    eventY	   = realToFrac y_,+    eventX         = realToFrac x_,+    eventY         = realToFrac y_,     eventXRoot  = realToFrac xRoot_,     eventYRoot  = realToFrac yRoot_,     eventLeaves = leave,@@ -544,18 +539,18 @@   marshFocus ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventFocus, send_event} ptr-  (inFocus_::#gtk2hs_type gint16)	<- #{peek GdkEventFocus, in} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventFocus, send_event} ptr+  (inFocus_::#gtk2hs_type gint16)       <- #{peek GdkEventFocus, in} ptr   return $ Focus {     eventSent   = toBool sent_,     eventInFocus= toBool inFocus_}  marshConfigure ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventConfigure, send_event} ptr-  (xPar_   ::#gtk2hs_type gint)	<- #{peek GdkEventConfigure, x} ptr-  (yPar_   ::#gtk2hs_type gint)	<- #{peek GdkEventConfigure, y} ptr-  (width_  ::#gtk2hs_type gint)	<- #{peek GdkEventConfigure, width} ptr-  (height_ ::#gtk2hs_type gint)	<- #{peek GdkEventConfigure, height} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventConfigure, send_event} ptr+  (xPar_   ::#gtk2hs_type gint) <- #{peek GdkEventConfigure, x} ptr+  (yPar_   ::#gtk2hs_type gint) <- #{peek GdkEventConfigure, y} ptr+  (width_  ::#gtk2hs_type gint) <- #{peek GdkEventConfigure, width} ptr+  (height_ ::#gtk2hs_type gint) <- #{peek GdkEventConfigure, height} ptr   return $ Configure {     eventSent   = toBool sent_,     eventXParent   = fromIntegral xPar_,@@ -565,54 +560,54 @@  {- marshProperty ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventProperty, send_event} ptr-  (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventProperty, time} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventProperty, send_event} ptr+  (time_   ::#gtk2hs_type guint32)      <- #{peek GdkEventProperty, time} ptr   return $ Property {     eventSent   = toBool sent_,     eventTime   = fromIntegral time_} -}  marshProximity contact ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventProximity, send_event} ptr-  (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventProximity, time} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventProximity, send_event} ptr+  (time_   ::#gtk2hs_type guint32)      <- #{peek GdkEventProximity, time} ptr   return $ Proximity {     eventSent   = toBool sent_,     eventTime   = fromIntegral time_,     eventInContact = contact}  marshVisibility ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventVisibility, send_event} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventVisibility, send_event} ptr   (state_  ::#gtk2hs_type GdkVisibilityState)-				<- #{peek GdkEventVisibility, state} ptr+                                <- #{peek GdkEventVisibility, state} ptr   return $ Visibility {     eventSent   = toBool sent_,     eventVisible= (toEnum.fromIntegral) state_}  marshScroll ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventScroll, send_event} ptr-  (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventScroll, time} ptr-  (x_	  ::#gtk2hs_type gdouble)	<- #{peek GdkEventScroll, x} ptr-  (y_	  ::#gtk2hs_type gdouble)	<- #{peek GdkEventScroll, y} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventScroll, send_event} ptr+  (time_   ::#gtk2hs_type guint32)      <- #{peek GdkEventScroll, time} ptr+  (x_     ::#gtk2hs_type gdouble)       <- #{peek GdkEventScroll, x} ptr+  (y_     ::#gtk2hs_type gdouble)       <- #{peek GdkEventScroll, y} ptr   (direc_  ::#gtk2hs_type GdkScrollDirection)-				<- #{peek GdkEventScroll, direction} ptr-  (xRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventScroll, x_root} ptr-  (yRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventScroll, y_root} ptr+                                <- #{peek GdkEventScroll, direction} ptr+  (xRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventScroll, x_root} ptr+  (yRoot_  ::#gtk2hs_type gdouble)      <- #{peek GdkEventScroll, y_root} ptr   return $ Scroll {     eventSent   = toBool sent_,     eventTime   = fromIntegral time_,-    eventX	   = realToFrac x_,-    eventY	   = realToFrac y_,+    eventX         = realToFrac x_,+    eventY         = realToFrac y_,     eventDirection  = (toEnum.fromIntegral) direc_,     eventXRoot  = realToFrac xRoot_,     eventYRoot  = realToFrac yRoot_}   marshWindowState ptr = do-  (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventWindowState, send_event} ptr+  (sent_   ::#gtk2hs_type gint8)        <- #{peek GdkEventWindowState, send_event} ptr   (wMask_  ::#gtk2hs_type GdkWindowState)-			<- #{peek GdkEventWindowState, changed_mask} ptr+                        <- #{peek GdkEventWindowState, changed_mask} ptr   (wState_ ::#gtk2hs_type GdkWindowState)-			<- #{peek GdkEventWindowState, new_window_state} ptr+                        <- #{peek GdkEventWindowState, new_window_state} ptr   return $ WindowState {     eventSent   = toBool sent_,     eventWindowMask  = (toFlags.fromIntegral) wMask_,
+ Graphics/UI/Gtk/Gdk/GLContext.chs view
@@ -0,0 +1,257 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) GLContext+--+--  Author : Chris Mennie+--+--  Created: 23 April 2016+--+--  Copyright (C) 2016 Chis Mennie+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- OpenGL context+--+module Graphics.UI.Gtk.Gdk.GLContext (+-- * Detail+--+-- | GLContext is an object representing the platform-specific OpenGL drawing context.+--+-- GLContexts are created for a GdkWindow, and the context will match the GdkVisual of the window.+--+-- A 'GLContext' is not tied to any particular normal framebuffer. For instance, it cannot draw to+-- the Window back buffer. The GDK repaint system is in full control of the painting to that.+-- GDK will handle the integration of your rendering with that of other widgets.+--+-- Support for 'GLContext' is platform-specific, context creation can fail, returning NULL context.+--+-- A 'GLContext' has to be made "current" in order to start using it, otherwise any OpenGL call will+-- be ignored.++-- * Class Hierarchy+-- |+-- @+-- |  'GObject'+-- |   +----'GLContext'+-- @+--++-- * Types+#if GTK_CHECK_VERSION(3,16,0)+  GLContext,+  GLContextClass,+  castToGLContext, gTypeGLContext,+#endif++-- * Methods+#if GTK_CHECK_VERSION(3,16,0)+    glContextGetDisplay,+    glContextGetWindow,+    glContextGetSharedContext,+    glContextGetVersion,+    glContextSetRequiredVersion,+    glContextGetRequiredVersion,+    glContextSetDebugEnabled,+    glContextGetDebugEnabled,+    glContextSetForwardCompatible,+    glContextGetForwardCompatible,+    glContextRealize,+#endif+#if GTK_CHECK_VERSION(3,20,0)+    glContextIsLegacy,+#endif+#if GTK_CHECK_VERSION(3,16,0)+    glContextMakeCurrent,+    glContextGetCurrent,+    glContextClearCurrent+#endif+  ) where++import Control.Monad    (liftM)+import Data.Maybe       (fromMaybe)++import System.Glib.FFI+import System.Glib.Flags                (toFlags)+{#import Graphics.UI.Gtk.Types#}+{#import Graphics.UI.Gtk.Gdk.Enums#}+{#import Graphics.UI.Gtk.Gdk.Cursor#}+import Graphics.UI.Gtk.General.Structs+import System.Glib.GError       (propagateGError)+import System.Glib.Attributes++{# context lib="gdk" prefix="gdk" #}+++--------------------+-- Methods+#if GTK_CHECK_VERSION(3,16,0)++-- | Retrieves the 'Graphics.UI.Gtk.Gdk.Display.Display' the context is created for.+--+glContextGetDisplay :: GLContextClass self => self -> IO (Maybe Display)+glContextGetDisplay self = do+    maybeNull (wrapNewGObject mkDisplay) $+        {# call gdk_gl_context_get_display #} (toGLContext self)+++-- | Retrieves the 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawWindow' used by the context.+--+glContextGetWindow :: GLContextClass self => self -> IO (Maybe DrawWindow)+glContextGetWindow self = do+    maybeNull (wrapNewGObject mkDrawWindow) $+        {# call gdk_gl_context_get_window #} (toGLContext self)+++-- | Retrieves the 'GLContext' that this context share data with.+--+glContextGetSharedContext :: GLContextClass self => self -> IO (Maybe GLContext)+glContextGetSharedContext self = do+    maybeNull (wrapNewGObject mkGLContext) $+        {# call gdk_gl_context_get_shared_context #} (toGLContext self)+++-- | Retrieves the OpenGL version of the context.+--+-- The context must be realized prior to calling this function.+--+glContextGetVersion :: GLContextClass self => self -> IO (Int, Int)+glContextGetVersion self = do+    alloca $ \majorPtr -> alloca $ \minorPtr -> do+        {# call gdk_gl_context_get_version #} (toGLContext self) majorPtr minorPtr+        major <- peek majorPtr+        minor <- peek minorPtr+        return (fromIntegral major, fromIntegral minor)+++-- | Sets the major and minor version of OpenGL to request.+--+-- Setting major and minor to zero will use the default values.+--+-- The 'GLContext' must not be realized or made current prior to calling this function.+--+glContextSetRequiredVersion :: GLContextClass self => self -> Int -> Int -> IO ()+glContextSetRequiredVersion self major minor =+    {# call gdk_gl_context_set_required_version #}+        (toGLContext self) (fromIntegral major) (fromIntegral minor)+++-- | Retrieves the major and minor version requested by calling 'glContextSetRequiredVersion'.+--+glContextGetRequiredVersion :: GLContextClass self => self -> IO (Int, Int)+glContextGetRequiredVersion self = do+    alloca $ \majorPtr -> alloca $ \minorPtr -> do+        {# call gdk_gl_context_get_required_version #} (toGLContext self) majorPtr minorPtr+        major <- peek majorPtr+        minor <- peek minorPtr+        return (fromIntegral major, fromIntegral minor)+++-- | Sets whether the 'GLContext' should perform extra validations and run time checking. This is+--  useful during development, but has additional overhead.+--+-- The 'GLContext' must not be realized or made current prior to calling this function.+--+glContextSetDebugEnabled :: GLContextClass self => self -> Bool -> IO ()+glContextSetDebugEnabled self enabled = do+    {# call gdk_gl_context_set_debug_enabled #} (toGLContext self) (fromBool enabled)+++-- | Retrieves the value set using glContextSetDebugEnabled.+--+glContextGetDebugEnabled :: GLContextClass self => self -> IO Bool+glContextGetDebugEnabled self = do+    liftM toBool $ {# call gdk_gl_context_get_debug_enabled #} (toGLContext self)+++-- | Sets whether the 'GLContext' should be forward compatible.+--+-- Forward compatible contexts must not support OpenGL functionality that has been marked as+-- deprecated in the requested version; non-forward compatible contexts, on the other hand, must+-- support both deprecated and non deprecated functionality.+--+-- The 'GLContext' must not be realized or made current prior to calling this function.+--+glContextSetForwardCompatible :: GLContextClass self => self -> Bool -> IO ()+glContextSetForwardCompatible self compatible = do+    {# call gdk_gl_context_set_forward_compatible #} (toGLContext self) (fromBool compatible)+++-- | Retrieves the value set using glContextSetForwardCompatible.+--+glContextGetForwardCompatible :: GLContextClass self => self -> IO Bool+glContextGetForwardCompatible self = do+    liftM toBool $ {# call gdk_gl_context_get_forward_compatible #} (toGLContext self)++#endif++#if GTK_CHECK_VERSION(3,20,0)+-- | Whether the 'GLContext' is in legacy mode or not.+--+-- The 'GLContext' must be realized before calling this function.+--+-- When realizing a GL context, GDK will try to use the OpenGL 3.2 core profile; this profile+-- removes all the OpenGL API that was deprecated prior to the 3.2 version of the specification.+-- If the realization is successful, this function will return False.+--+-- If the underlying OpenGL implementation does not support core profiles, GDK will fall back to+-- a pre-3.2 compatibility profile, and this function will return True.+--+-- You can use the value returned by this function to decide which kind of OpenGL API to use, or+-- whether to do extension discovery, or what kind of shader programs to load.+--+glContextIsLegacy :: GLContextClass self => self -> IO Bool+glContextIsLegacy self = do+    liftM toBool $ {# call gdk_gl_context_is_legacy #} (toGLContext self)+#endif+++#if GTK_CHECK_VERSION(3,16,0)+-- | Realizes the given 'GLContext'.+--+-- It is safe to call this function on a realized 'GLContext'.+--+glContextRealize :: GLContextClass self => self -> IO Bool+glContextRealize self =+    liftM toBool $+        propagateGError $ \errPtr ->+            {# call gdk_gl_context_realize #} (toGLContext self) errPtr+++-- | Makes the context the current one.+--+glContextMakeCurrent :: GLContextClass self => self -> IO ()+glContextMakeCurrent self = do+    {# call gdk_gl_context_make_current #} (toGLContext self)+++-- | Retrieves the current 'GLContext'.+--+glContextGetCurrent :: IO (Maybe GLContext)+glContextGetCurrent = do+    maybeNull (wrapNewGObject mkGLContext) $+        {# call gdk_gl_context_get_current #}+++-- | Clears the current 'GLContext'.+--+-- Any OpenGL call after this function returns will be ignored until glContextMakeCurrent+-- is called.+--+glContextClearCurrent :: IO ()+glContextClearCurrent = do+    {# call gdk_gl_context_clear_current #}++#endif
Graphics/UI/Gtk/Gdk/Gdk.chs view
@@ -38,16 +38,22 @@   keyboardGrab,   keyboardUngrab,   beep+#if GTK_MAJOR_VERSION >= 3+ ,RGBA(..)+#endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) -import System.Glib.Flags		(fromFlags)+import System.Glib.Flags                (fromFlags) import System.Glib.FFI {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Gdk.Cursor#} (Cursor(..)) import Graphics.UI.Gtk.Gdk.Events-import Graphics.UI.Gtk.Gdk.Enums	(EventMask, GrabStatus(..))+import Graphics.UI.Gtk.Gdk.Enums        (EventMask, GrabStatus(..))+#if GTK_MAJOR_VERSION >= 3+import Graphics.UI.Gtk.General.Structs (RGBA(..))+#endif  {#context lib="gdk" prefix ="gdk"#} @@ -174,7 +180,7 @@            -- for this application are reported as normal, but keyboard events            -- outside this application are reported with respect to @window@.            -- Both key press and key release events are always reported,-           -- independant of the event mask set by the application.+           -- independent of the event mask set by the application.   -> TimeStamp -- ^ @time@ - a timestamp from an 'Event', or 'currentTime' if                -- no timestamp is available.   -> IO GrabStatus -- ^ @Returns@ - 'GrabSuccess' if the grab was successful.
Graphics/UI/Gtk/Gdk/Keymap.chs view
@@ -28,24 +28,24 @@ module Graphics.UI.Gtk.Gdk.Keymap (  -- * Details--- +-- -- | Key values are the codes which are sent whenever a key is pressed or released. They appear in the -- keyval field of the 'EventKey' structure, which is passed to signal handlers for the--- 'keyPressEvent' and 'keyReleaseEvent' signals. --- +-- 'keyPressEvent' and 'keyReleaseEvent' signals.+-- -- Key values are regularly updated from the upstream X.org X11 implementation, so new values are added -- regularly. They will be prefixed with GDK_ rather than XF86XK_ or ' (for older symbols)'.--- +-- -- Key values can be converted into a string representation using 'keyvalName'. The reverse -- function, converting a string to a key value, is provided by 'keyvalFromName'.--- +-- -- The case of key values can be determined using 'keyvalIsUpper'. Key -- values can be converted to upper or lower case using 'keyvalToUpper' and -- 'keyvalToLower'.--- +-- -- When it makes sense, key values can be converted to and from Unicode characters with -- 'keyvalToUnicode'.--- +-- -- One 'Keymap' object exists for each user display. 'keymapGetDefault' returns the 'Keymap' -- for the default display; to obtain keymaps for other displays, use 'keymapGetForDisplay'. A -- keymap is a mapping from 'KeymapKey' to key values. You can think of a 'KeymapKey' as a@@ -61,7 +61,7 @@ -- movement in a horizontal direction. Usually groups are used for two different languages. In group 0, -- a key might have two English characters, and in group 1 it might have two Hebrew characters. The -- Hebrew characters will be printed on the key next to the English characters.--- +-- -- In order to use a keymap to interpret a key event, it's necessary to first convert the keyboard -- state into an effective group and level. This is done via a set of rules that varies widely -- according to type of keyboard and user configuration.  The function@@ -71,7 +71,7 @@ -- and level. i.e. it returns "unconsumed modifiers." The keyboard group may differ from the effective -- group used for keymap lookups because some keys don't have multiple groups - e.g. the Enter key is -- always in group 0 regardless of keyboard state.--- +-- -- Note that 'keymapTranslateKeyboardState' also returns the keyval, i.e. it goes ahead and -- performs the keymap lookup in addition to telling you which effective group/level values were used -- for the lookup. 'EventKey' already contains this keyval, however, so you don't normally need to@@ -121,12 +121,10 @@ #endif   ) where -import Control.Monad	(liftM)-import Data.Maybe (fromMaybe)+import Control.Monad    (liftM) import System.Glib.FFI-import System.Glib.UTFString-import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..))-import Graphics.UI.Gtk.Gdk.Keys	(KeyVal (..))+import Graphics.UI.Gtk.Gdk.Enums        (Modifier(..))+import Graphics.UI.Gtk.Gdk.Keys (KeyVal (..)) {#import Graphics.Rendering.Pango.Enums#} {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}@@ -164,26 +162,26 @@ -- 'keymapTranslateKeyboardState' instead of this function, since the effective -- group\/level may not be the same as the current keyboard state. ---keymapLookupKey :: KeymapClass self -                => (Maybe self) -- ^ @keymap@  a 'Keymap' or 'Nothing' to use the default keymap             +keymapLookupKey :: KeymapClass self+                => (Maybe self) -- ^ @keymap@  a 'Keymap' or 'Nothing' to use the default keymap                 -> KeymapKey -- ^ @key@ - a 'KeymapKey'                             -- with keycode, group, and level initialized                 -> IO Int    -- ^ returns a keyval, or 0 if none was mapped to                             -- the given @key@-keymapLookupKey Nothing key = +keymapLookupKey Nothing key =   liftM fromIntegral $   allocaBytes {# sizeof GdkKeymapKey #} $ \ keyPtr -> do     poke keyPtr key     {# call gdk_keymap_lookup_key #}       (Keymap nullForeignPtr)-      (castPtr keyPtr)    +      (castPtr keyPtr) keymapLookupKey (Just self) key =   liftM fromIntegral $   allocaBytes {# sizeof GdkKeymapKey #} $ \ keyPtr -> do     poke keyPtr key     {# call gdk_keymap_lookup_key #}       (toKeymap self)-      (castPtr keyPtr)    +      (castPtr keyPtr)  -- | Translates the contents of a 'EventKey' into a -- keyval, effective group, and level. Modifiers that affected the translation@@ -203,7 +201,7 @@ keymapTranslateKeyboardState self hardwareKeycode state group =   alloca $ \keyvalPtr ->   alloca $ \effectiveGroupPtr ->-  alloca $ \levelPtr -> +  alloca $ \levelPtr ->   alloca $ \modifierPtr -> do     success <- liftM toBool $               {# call gdk_keymap_translate_keyboard_state #}@@ -215,7 +213,7 @@                 effectiveGroupPtr                 levelPtr                 modifierPtr-    if success +    if success        then do          keyval <- peek keyvalPtr          effectiveGroup <- peek effectiveGroupPtr@@ -235,7 +233,7 @@ -- switch key might convert a keyboard between Hebrew to English modes, for -- example. 'EventKey' contains a @group@ field that -- indicates the active keyboard group. The level is computed from the modifier--- mask. +-- mask. -- keymapGetEntriesForKeyval :: KeymapClass self => self  -> KeyVal                -- ^ @keyval@ - a keyval, such as @GDK_a@, @GDK_Up@,@@ -260,7 +258,7 @@        else return Nothing  -- | Returns the keyvals bound to @hardwareKeycode@. The Nth 'KeymapKey'--- in @keys@ is bound to the Nth keyval in @keyvals@. +-- in @keys@ is bound to the Nth keyval in @keyvals@. -- When a keycode is pressed by the user, the -- keyval from this list of entries is selected by considering the effective -- keyboard group and level. See 'keymapTranslateKeyboardState'.@@ -270,7 +268,7 @@  -> IO (Maybe ([KeymapKey], [KeyVal])) keymapGetEntriesForKeycode self hardwareKeycode =   alloca $ \nEntriesPtr ->-  allocaArray 0 $ \ keysPtr -> +  allocaArray 0 $ \ keysPtr ->   allocaArray 0 $ \ keyvalsPtr -> do     success <- liftM toBool $               {# call gdk_keymap_get_entries_for_keycode #}@@ -319,7 +317,7 @@ #endif  #if GTK_CHECK_VERSION(2,16,0)--- | Returns whether the Caps Lock modifer is locked.+-- | Returns whether the Caps Lock modifier is locked. -- -- * Available since Gdk version 2.16 --
Graphics/UI/Gtk/Gdk/Keys.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Keys --@@ -60,31 +61,31 @@  -- | Converts a key value into a symbolic name. ---keyName :: KeyVal -> String+keyName :: KeyVal -> DefaultGlibString keyName k = unsafePerformIO $ keyvalName k  -- | Converts a key name to a key value. ---keyFromName :: String -> KeyVal+keyFromName :: DefaultGlibString -> KeyVal keyFromName k = unsafePerformIO $ keyvalFromName k  -- | Convert from a Gdk key symbol to the corresponding Unicode character. ---keyToChar :: +keyToChar ::     KeyVal          -- ^ @keyval@ - a Gdk key symbol  -> Maybe Char -- ^ returns the corresponding unicode character, or                -- Nothing if there is no corresponding character. keyToChar k = unsafePerformIO $ keyvalToChar k -keyvalName :: KeyVal -> IO String+keyvalName :: KeyVal -> IO DefaultGlibString keyvalName keyval = do   strPtr <- {# call gdk_keyval_name #} (fromIntegral keyval)   if strPtr==nullPtr then return "" else peekUTFString strPtr -keyvalFromName :: String -> IO KeyVal+keyvalFromName :: DefaultGlibString -> IO KeyVal keyvalFromName keyvalName =   liftM fromIntegral $-  withCString keyvalName $ \keyvalNamePtr ->+  withUTFString keyvalName $ \keyvalNamePtr ->   {# call gdk_keyval_from_name #}     keyvalNamePtr @@ -96,13 +97,13 @@  -- | Obtains the upper- and lower-case versions of the keyval symbol. Examples of keyvals are GDK_a, -- 'Enter', 'F1', etc.-keyvalConvertCase :: KeyVal -- ^ @symbol@ a keyval                                              -                  -> (KeyVal, KeyVal) -- ^ @(lower, upper)@ -                                        -- ^ lower is the lowercase version of symbol. -                                        -- ^ upper is uppercase version of symbol. -keyvalConvertCase keyval = +keyvalConvertCase :: KeyVal -- ^ @symbol@ a keyval+                  -> (KeyVal, KeyVal) -- ^ @(lower, upper)@+                                        -- ^ lower is the lowercase version of symbol.+                                        -- ^ upper is uppercase version of symbol.+keyvalConvertCase keyval =   unsafePerformIO $-  alloca $ \ lowerPtr -> +  alloca $ \ lowerPtr ->   alloca $ \ upperPtr -> do   {#call gdk_keyval_convert_case #}     (fromIntegral keyval)@@ -114,8 +115,8 @@  -- | Converts a key value to upper case, if applicable. keyvalToUpper :: KeyVal  -- ^ @keyval@  a key value.-              -> KeyVal -- ^ returns the upper case form of keyval, -                          -- or keyval itself if it is already in upper case or it is not subject to case       +              -> KeyVal -- ^ returns the upper case form of keyval,+                          -- or keyval itself if it is already in upper case or it is not subject to case keyvalToUpper keyval =   unsafePerformIO $   liftM fromIntegral $@@ -124,8 +125,8 @@  -- | Converts a key value to lower case, if applicable. keyvalToLower :: KeyVal  -- ^ @keyval@  a key value.-              -> KeyVal -- ^ returns the lower case form of keyval, -                          -- or keyval itself if it is already in lower case or it is not subject to case       +              -> KeyVal -- ^ returns the lower case form of keyval,+                          -- or keyval itself if it is already in lower case or it is not subject to case keyvalToLower keyval =   unsafePerformIO $   liftM fromIntegral $@@ -133,7 +134,7 @@      (fromIntegral keyval)  -- | Returns 'True' if the given key value is in upper case.-keyvalIsLower :: KeyVal +keyvalIsLower :: KeyVal               -> Bool -- ^ returns 'True' if keyval is in upper case, or if keyval is not subject to case conversion. keyvalIsLower keyval =   unsafePerformIO $@@ -142,7 +143,7 @@      (fromIntegral keyval)  -- | Returns 'True' if the given key value is in upper case.-keyvalIsUpper :: KeyVal +keyvalIsUpper :: KeyVal               -> Bool -- ^ returns 'True' if keyval is in upper case, or if keyval is not subject to case conversion. keyvalIsUpper keyval =   unsafePerformIO $
Graphics/UI/Gtk/Gdk/Pixbuf.chs view
@@ -1,4 +1,6 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE EmptyDataDecls #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Pixbuf --@@ -79,6 +81,7 @@ #endif #if GTK_CHECK_VERSION(3,0,0)   pixbufNewFromSurface,+  pixbufNewFromWindow, #endif   pixbufNewFromInline,   InlineImage,@@ -123,21 +126,22 @@   ) where  import Control.Monad (liftM)-import Data.Ix import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GDateTime import System.Glib.GObject {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Structs		(Rectangle(..))-import System.Glib.GError	(GError(..), GErrorClass(..), GErrorDomain,-				propagateGError)-import Graphics.UI.Gtk.Gdk.PixbufData ( PixbufData, mkPixbufData ) #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.Gdk.Pixmap (Bitmap, Pixmap)+import Graphics.UI.Gtk.General.Structs          (Rectangle(..)) #endif+import System.Glib.GError       (GError(..), GErrorClass(..), GErrorDomain,+                                propagateGError)+import Graphics.UI.Gtk.Gdk.PixbufData ( PixbufData, mkPixbufData )+#if GTK_MAJOR_VERSION < 3+import Graphics.UI.Gtk.Gdk.Pixmap (Bitmap)+#else import Graphics.Rendering.Cairo import Graphics.Rendering.Cairo.Types+#endif  {# context prefix="gdk" #} @@ -192,7 +196,7 @@ --   'pixbufGetRowstride', indicates the number of bytes between rows. -- -- * The returned array is a flat representation of a three dimensional---   array: x-coordiante, y-coordinate and several channels for each color.+--   array: x-coordinate, y-coordinate and several channels for each color. --   The number of channels is usually 3 for plain RGB data or 4 for --   RGB data with an alpha channel. To read or write a specific pixel --   use the formula: @p = y * rowstride + x * nChannels@ for the pixel.@@ -241,18 +245,18 @@ -- | Queries the rowstride of this image. -- -- * Queries the rowstride of a pixbuf, which is the number of bytes between---   rows. Use this value to caculate the offset to a certain row.+--   rows. Use this value to calculate the offset to a certain row. -- pixbufGetRowstride :: Pixbuf -> IO Int pixbufGetRowstride pb = liftM fromIntegral $   {#call unsafe pixbuf_get_rowstride#} pb --- | Returns an attribut of an image.+-- | Returns an attribute of an image. -- -- * Looks up if some information was stored under the @key@ when --   this image was saved. ---pixbufGetOption :: Pixbuf -> String -> IO (Maybe String)+pixbufGetOption :: (GlibString string) => Pixbuf -> string -> IO (Maybe string) pixbufGetOption pb key = withUTFString key $ \strPtr -> do   resPtr <- {#call unsafe pixbuf_get_option#} pb strPtr   if (resPtr==nullPtr) then return Nothing else@@ -274,11 +278,11 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'PixbufError'. ---pixbufNewFromFile :: FilePath -> IO Pixbuf+pixbufNewFromFile :: GlibFilePath fp => fp -> IO Pixbuf pixbufNewFromFile fname =   wrapNewGObject mkPixbuf $   propagateGError $ \errPtrPtr ->-     withUTFString fname $ \strPtr ->+     withUTFFilePath fname $ \strPtr -> #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)      {#call unsafe pixbuf_new_from_file_utf8#} #else@@ -297,7 +301,7 @@ -- -- * Available since Gtk+ version 2.4 ---pixbufNewFromFileAtSize :: String -> Int -> Int -> IO Pixbuf+pixbufNewFromFileAtSize :: GlibString string => string -> Int -> Int -> IO Pixbuf pixbufNewFromFileAtSize filename width height =   wrapNewGObject mkPixbuf $   propagateGError $ \errPtrPtr ->@@ -330,8 +334,8 @@ -- -- * Available since Gtk+ version 2.6 ---pixbufNewFromFileAtScale ::-     String -- ^ the name of the file+pixbufNewFromFileAtScale :: GlibString string+  => string -- ^ the name of the file   -> Int -- ^ target width   -> Int -- ^ target height   -> Bool -- ^ whether to preserve the aspect ratio@@ -356,7 +360,7 @@ -- | Creates a new pixbuf from a cairo Surface. -- -- Transfers image data from a cairo Surface and converts it to an RGB(A) representation inside a Pixbuf. This allows you to efficiently read individual pixels from cairo surfaces. For GdkWindows, use gdk_pixbuf_get_from_window() instead.--- +-- -- This function will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the surface contains one. pixbufNewFromSurface :: Surface -> Int -> Int -> Int -> Int -> IO Pixbuf pixbufNewFromSurface surface srcX srcY width height =@@ -367,18 +371,39 @@     (fromIntegral srcY)     (fromIntegral width)     (fromIntegral height)++-- | Creates a new pixbuf from a GDK window.+--+-- Transfers image data from a GdkWindow and converts it to an RGB(A) representation inside a GdkPixbuf. In other words, copies image data from a server-side drawable to a client-side RGB(A) buffer. This allows you to efficiently read individual pixels on the client side.+--+-- This function will create an RGB pixbuf with 8 bits per channel with the size specified by the width and height arguments scaled by the scale factor of window. The pixbuf will contain an alpha channel if the window contains one.+pixbufNewFromWindow :: DrawWindowClass self +  => self -- ^ @window@ - The source window.+  -> Int -- ^ @srcX@ - Source X coordinate within window.+  -> Int -- ^ @srcY@ - Source Y coordinate within window.+  -> Int -- ^ @width@ - Width in pixels of region to get.+  -> Int -- ^ @height@ - Height in pixels of region to get.+  -> IO Pixbuf+pixbufNewFromWindow window srcX srcY width height =+  wrapNewGObject mkPixbuf $+    {# call gdk_pixbuf_get_from_window #}+      (toDrawWindow window)+      (fromIntegral srcX)+      (fromIntegral srcY)+      (fromIntegral width)+      (fromIntegral height) #endif  -- | A string representing an image file format. ---type ImageFormat = String+type ImageFormat = DefaultGlibString  -- constant pixbufGetFormats A list of valid image file formats. -- pixbufGetFormats :: [ImageFormat]  pixbufGetFormats = ["png","bmp","wbmp", "gif","ico","ani","jpeg","pnm",-		    "ras","tiff","xpm","xbm","tga"]+                    "ras","tiff","xpm","xbm","tga"]  -- | Save an image to disk. --@@ -394,13 +419,12 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'PixbufError'. ---pixbufSave :: Pixbuf -> FilePath -> ImageFormat -> [(String, String)] ->-	      IO ()+pixbufSave :: (GlibString string, GlibFilePath fp) => Pixbuf -> fp -> ImageFormat -> [(string, string)] ->+              IO () pixbufSave pb fname iType options =   let (keys, values) = unzip options in-  let optLen = length keys in   propagateGError $ \errPtrPtr ->-    withUTFString fname $ \fnPtr ->+    withUTFFilePath fname $ \fnPtr ->     withUTFString iType $ \tyPtr ->     withUTFStringArray0 keys $ \keysPtr ->     withUTFStringArray values $ \valuesPtr -> do@@ -442,11 +466,11 @@        (fromIntegral rowStride)        nullFunPtr nullPtr --- | Create a new image from a String.+-- | Create a new image from a string. -- -- * Creates a new pixbuf from a string description. ---pixbufNewFromXPMData :: [String] -> IO Pixbuf+pixbufNewFromXPMData :: GlibString string => [string] -> IO Pixbuf pixbufNewFromXPMData s =   withUTFStringArray0 s $ \strsPtr ->     wrapNewGObject mkPixbuf $ {#call pixbuf_new_from_xpm_data#} strsPtr@@ -457,7 +481,7 @@ --   that is embedded in the executable. See --   'pixbufNewFromInline' for an example. ---data InlineImage = InlineImage+data InlineImage  -- | Create a new image from a static pointer. --@@ -476,14 +500,14 @@ -- > extern guint8 my_image[]; -- --   and save it in the current directory.---   The created file can be compiled with: +--   The created file can be compiled with: -- -- > cc -c my_image.c `pkg-config --cflags gdk-2.0` -- --    into an object file which must be linked into your Haskell program by --   specifying @my_image.o@ and @\"-#include my_image.h\"@ on --   the command line of GHC.---   Within you application you delcare a pointer to this image:+--   Within you application you declare a pointer to this image: -- -- > foreign label "my_image" myImage :: Ptr InlineImage --@@ -502,7 +526,7 @@     else do       errPtr <- peek errPtrPtr       (GError dom code msg) <- peek errPtr-      error msg+      error $ glibToString msg  -- | Create a restricted view of an image. --@@ -555,16 +579,16 @@  -- | Scale an image. ----- * Creates a new 'Pixbuf' containing a copy of +-- * Creates a new 'Pixbuf' containing a copy of --   @src@ scaled to the given measures. Leaves @src@---   unaffected. +--   unaffected. -- -- * @interp@ affects the quality and speed of the scaling function. --   'InterpNearest' is the fastest option but yields very poor quality --   when scaling down. 'InterpBilinear' is a good trade-off between --   speed and quality and should thus be used as a default. ---pixbufScaleSimple :: +pixbufScaleSimple ::   Pixbuf -- ^ @src@ - the source image   -> Int -- ^ @width@ - the target width   -> Int -- ^ @height@ the target height@@ -572,9 +596,9 @@   -> IO Pixbuf pixbufScaleSimple pb width height interp =     wrapNewGObject mkPixbuf $ liftM castPtr $-	{#call pixbuf_scale_simple#} (toPixbuf pb)-	(fromIntegral width) (fromIntegral height)-	(fromIntegral $ fromEnum interp)+        {#call pixbuf_scale_simple#} (toPixbuf pb)+        (fromIntegral width) (fromIntegral height)+        (fromIntegral $ fromEnum interp)  -- | Copy a scaled image part to another image. --@@ -587,16 +611,16 @@ -- 'pixbufComposite' if you need to blend the source image onto the -- destination. ---pixbufScale :: +pixbufScale ::     Pixbuf     -- ^ @src@ - the source pixbuf  -> Pixbuf     -- ^ @dest@ - the pixbuf into which to render the results  -> Int        -- ^ @destX@ - the left coordinate for region to render- -> Int        -- ^ @destY@ - the top coordinate for region to render + -> Int        -- ^ @destY@ - the top coordinate for region to render  -> Int        -- ^ @destWidth@ - the width of the region to render  -> Int        -- ^ @destHeight@ - the height of the region to render  -> Double     -- ^ @offsetX@ - the offset in the X direction (currently                -- rounded to an integer)- -> Double     -- ^ @offsetY@ - the offset in the Y direction + -> Double     -- ^ @offsetY@ - the offset in the Y direction                -- (currently rounded to an integer)  -> Double     -- ^ @scaleX@ - the scale factor in the X direction  -> Double     -- ^ @scaleY@ - the scale factor in the Y direction@@ -624,17 +648,17 @@      Pixbuf     -- ^ @src@ - the source pixbuf   -> Pixbuf     -- ^ @dest@ - the pixbuf into which to render the results   -> Int        -- ^ @destX@ - the left coordinate for region to render-  -> Int        -- ^ @destY@ - the top coordinate for region to render +  -> Int        -- ^ @destY@ - the top coordinate for region to render   -> Int        -- ^ @destWidth@ - the width of the region to render   -> Int        -- ^ @destHeight@ - the height of the region to render   -> Double     -- ^ @offsetX@ - the offset in the X direction (currently                 -- rounded to an integer)-  -> Double     -- ^ @offsetY@ - the offset in the Y direction +  -> Double     -- ^ @offsetY@ - the offset in the Y direction                 -- (currently rounded to an integer)   -> Double     -- ^ @scaleX@ - the scale factor in the X direction   -> Double     -- ^ @scaleY@ - the scale factor in the Y direction   -> InterpType -- ^ the interpolation type for the transformation.-  -> Word8 	-- ^ @alpha@ - the transparency+  -> Word8      -- ^ @alpha@ - the transparency   -> IO () pixbufComposite src dest destX destY destWidth destHeight   offsetX offsetY scaleX scaleY interp alpha =@@ -703,7 +727,7 @@  -- | Copy a rectangular portion into another 'Pixbuf'. ----- The source 'Pixbuf' remains unchanged. Converion between+-- The source 'Pixbuf' remains unchanged. Conversion between -- different formats is done automatically. -- pixbufCopyArea ::
Graphics/UI/Gtk/Gdk/PixbufAnimation.chs view
@@ -80,9 +80,7 @@ import System.Glib.GDateTime import System.Glib.GObject {#import Graphics.UI.Gtk.Types#}-import System.Glib.GError	(GError(..), GErrorClass(..), GErrorDomain,-				propagateGError)-{# import Graphics.UI.Gtk.Gdk.Pixbuf #}+import System.Glib.GError       (propagateGError)  {# context prefix="gdk" #} @@ -103,12 +101,13 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'PixbufError' or 'GFileError' ---pixbufAnimationNewFromFile :: FilePath               -- ^ Name of file to load, in the GLib file name encoding-                           -> IO PixbufAnimation     -- ^ A newly-created animation+pixbufAnimationNewFromFile :: GlibFilePath fp+                           => fp                 -- ^ Name of file to load, in the GLib file name encoding+                           -> IO PixbufAnimation -- ^ A newly-created animation pixbufAnimationNewFromFile fname =   wrapNewGObject mkPixbufAnimation $   propagateGError $ \errPtrPtr ->-     withUTFString fname $ \strPtr ->+     withUTFFilePath fname $ \strPtr -> #if defined (WIN32) && GTK_CHECK_VERSION(2,6,5)      {#call unsafe pixbuf_animation_new_from_file_utf8#} strPtr errPtrPtr #else
Graphics/UI/Gtk/Gdk/PixbufData.hs view
@@ -35,9 +35,8 @@  import System.Glib.FFI import Graphics.UI.Gtk.Types-import Data.Ix -- internal module of GHC-import Data.Array.Base ( MArray, newArray, newArray_, unsafeRead, unsafeWrite,+import Data.Array.Base ( MArray(..), newArray_, unsafeRead, unsafeWrite,                          getBounds, getNumElements )  -- | An array that stored the raw pixel data of a 'Pixbuf'.
Graphics/UI/Gtk/Gdk/Screen.chs view
@@ -68,7 +68,7 @@ #endif #endif ---  screenGetSystemVisual,+  screenGetSystemVisual, #if GTK_CHECK_VERSION(2,10,0)   screenIsComposited, #endif@@ -118,7 +118,7 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString@@ -128,7 +128,7 @@ import System.Glib.GList {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Signals-import Graphics.Rendering.Cairo.Types ( FontOptions(..), mkFontOptions, +import Graphics.Rendering.Cairo.Types ( FontOptions(..), mkFontOptions,                                         withFontOptions) import Graphics.UI.Gtk.General.Structs ( Rectangle(..) ) @@ -290,7 +290,7 @@ -- servers this value will not be correct. -- screenGetHeightMM :: Screen- -> IO Int -- ^ returns the heigth of @screen@ in millimeters.+ -> IO Int -- ^ returns the height of @screen@ in millimeters. screenGetHeightMM self =   liftM fromIntegral $   {# call gdk_screen_get_height_mm #}@@ -328,8 +328,8 @@ -- | Determines the name to pass to 'displayOpen' to get a 'Display' with this -- screen as the default screen. ---screenMakeDisplayName :: Screen- -> IO String -- ^ returns a newly allocated string+screenMakeDisplayName :: GlibString string => Screen+ -> IO string -- ^ returns a newly allocated string screenMakeDisplayName self =   {# call gdk_screen_make_display_name #}     self@@ -422,9 +422,9 @@ -- -- * Available since Gdk version 2.14 ---screenGetMonitorPlugName :: Screen+screenGetMonitorPlugName :: GlibString string => Screen  -> Int       -- ^ @monitorNum@ - number of the monitor- -> IO (Maybe String) -- ^ returns a newly-allocated string containing the name of the+ -> IO (Maybe string) -- ^ returns a newly-allocated string containing the name of the               -- monitor, or @Nothing@ if the name cannot be determined screenGetMonitorPlugName self monitorNum = do   sPtr <-@@ -440,8 +440,8 @@ -- -- FIXME needs a list of valid settings here, or a link to more information. ---screenGetSetting :: Screen- -> String      -- ^ @name@ - the name of the setting+screenGetSetting :: GlibString string => Screen+ -> string      -- ^ @name@ - the name of the setting  -> {-GValue*-} -- ^ @value@ - location to store the value of the setting  -> IO Bool     -- ^ returns @True@ if the setting existed and a value was                 -- stored in @value@, @False@ otherwise.
Graphics/UI/Gtk/General/Clipboard.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Clipboard --@@ -139,7 +140,7 @@ import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#} (SelectionTag, TargetTag,-  atomNew, Atom(..))+  Atom(..)) {#import Graphics.UI.Gtk.General.Selection#} (InfoId, SelectionDataM) import Graphics.UI.Gtk.General.Structs (   selectionPrimary,@@ -147,8 +148,7 @@   selectionClipboard,   withTargetEntries) import Control.Monad ( liftM )-import Control.Monad.Trans ( liftIO )-import Control.Monad.Reader (runReaderT, ask)+import Control.Monad.Reader (runReaderT) import Data.IORef ( newIORef, readIORef, writeIORef )  {# context lib="gtk" prefix="gtk" #}@@ -232,13 +232,13 @@ -- destructors and thereby free them. Thus, by setting these attributes each time we -- install new data functions, we cuningly finalized the previous closures. Hooray. -{-# NOINLINE getFuncQuark #-} +{-# NOINLINE getFuncQuark #-} getFuncQuark :: Quark-getFuncQuark = unsafePerformIO $ quarkFromString "hsClipboardGetFuncClosure"+getFuncQuark = unsafePerformIO $ quarkFromString ("hsClipboardGetFuncClosure"::DefaultGlibString) -{-# NOINLINE clearFuncQuark #-} +{-# NOINLINE clearFuncQuark #-} clearFuncQuark :: Quark-clearFuncQuark = unsafePerformIO $ quarkFromString "hsClipboardClearFuncClosure"+clearFuncQuark = unsafePerformIO $ quarkFromString ("hsClipboardClearFuncClosure"::DefaultGlibString)  -- %hash c:c65a d:b402 -- | Virtually sets the contents of the specified clipboard by providing a@@ -295,7 +295,7 @@ -- The difference between this function and 'clipboardSetWithData' is that -- a 'GObject' is passed in. ---clipboardSetWithOwner :: (ClipboardClass self, GObjectClass owner) => self+_clipboardSetWithOwner :: (ClipboardClass self, GObjectClass owner) => self  -> [(TargetTag, InfoId)]     -- ^ @targets@ - a list containing information                               -- about the available forms for the clipboard                               -- data@@ -311,7 +311,7 @@                               -- data succeeded. If setting the clipboard data                               -- failed the provided callback functions will be                               -- ignored.-clipboardSetWithOwner self targets getFunc clearFunc owner = do+_clipboardSetWithOwner self targets getFunc clearFunc owner = do   gFunPtr <- mkClipboardGetFunc     (\_ sPtr info _ -> runReaderT (getFunc info) sPtr >> return ())   cFunPtr <- mkClipboardClearFunc@@ -337,10 +337,10 @@ -- has not subsequently called, returns the owner set by -- 'clipboardSetWithOwner'. ---clipboardGetOwner :: ClipboardClass self => self+_clipboardGetOwner :: ClipboardClass self => self  -> IO (Maybe GObject) -- ^ returns the owner of the clipboard, if any; otherwise                         -- @Nothing@.-clipboardGetOwner self =+_clipboardGetOwner self =   maybeNull (makeNewGObject mkGObject) $   {# call gtk_clipboard_get_owner #}     (toClipboard self)@@ -351,8 +351,8 @@ -- 'clipboardSetWithData', and when the @clearFunc@ you supplied is called. -- Otherwise, the clipboard may be owned by someone else. ---clipboardClear :: ClipboardClass self => self -> IO ()-clipboardClear self =+_clipboardClear :: ClipboardClass self => self -> IO ()+_clipboardClear self =   {# call gtk_clipboard_clear #}     (toClipboard self) @@ -361,8 +361,8 @@ -- make a copy of the text and take responsibility for responding for requests -- for the text, and for converting the text into the requested format. ---clipboardSetText :: ClipboardClass self => self- -> String -- ^ @text@ - the text to be set as clipboard content+clipboardSetText :: (ClipboardClass self, GlibString string) => self+ -> string -- ^ @text@ - the text to be set as clipboard content  -> IO () clipboardSetText self text =   withUTFStringLen text $ \(textPtr,len) ->@@ -430,8 +430,8 @@ -- particular if the clipboard was empty or if the contents of the clipboard -- could not be converted into text form. ---clipboardRequestText :: ClipboardClass self => self- -> (Maybe String -> IO ())          -- ^ @callback@ - a function to call when+clipboardRequestText :: (ClipboardClass self, GlibString string) => self+ -> (Maybe string -> IO ())          -- ^ @callback@ - a function to call when                                      -- the text is received, or the retrieval                                      -- fails. (It will always be called one                                      -- way or the other.)@@ -542,9 +542,9 @@ -- -- * Available since Gtk+ version 2.10 ---clipboardRequestRichText :: (ClipboardClass self, TextBufferClass buffer) => self+clipboardRequestRichText :: (ClipboardClass self, TextBufferClass buffer, GlibString string) => self  -> buffer                               -- ^ @buffer@ - a 'TextBuffer' that determines the supported rich text formats-  -> (Maybe (TargetTag,String) -> IO ()) -- ^ @callback@ - a function to call+  -> (Maybe (TargetTag,string) -> IO ()) -- ^ @callback@ - a function to call                                          -- when the text is received, or the                                          -- retrieval fails. (It will always be                                          -- called one way or the other.)
Graphics/UI/Gtk/General/CssProvider.chs view
@@ -58,17 +58,14 @@    ) where +#if GTK_MAJOR_VERSION >= 3 {# context prefix ="gtk" #} -import Control.Monad (liftM)- import System.Glib.FFI import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#}-import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain,-                           propagateGError)+import System.Glib.GError (propagateGError) -#if GTK_MAJOR_VERSION >= 3 {#enum CssProviderError {underscoreToCase} deriving (Bounded,Eq,Show)#}  --------------------@@ -93,8 +90,9 @@   makeNewGObject mkCssProvider {# call gtk_css_provider_get_default #}  -- | Loads a theme from the usual theme paths-cssProviderGetNamed :: String                 -- ^ @name@ : A theme name-                    -> Maybe String           -- ^ @variant@ to load, for example, "dark"+cssProviderGetNamed :: GlibString string+                    => string                 -- ^ @name@ : A theme name+                    -> Maybe string           -- ^ @variant@ to load, for example, "dark"                     -> IO (Maybe CssProvider) -- ^ a @CssProvider@ with the theme loaded cssProviderGetNamed name variant =   maybeNull (makeNewGObject mkCssProvider) $@@ -119,9 +117,9 @@   errPtrPtr >> return ()  -- | Loads @css@ into @cssProvider@, making it clear any previously loaded information.-cssProviderLoadFromString :: CssProviderClass cssProvider+cssProviderLoadFromString :: (CssProviderClass cssProvider, GlibString string)                           => cssProvider -- ^ @cssProvider@ : a @CssProvider@-                          -> String      -- ^ @css@ : CSS data loaded in memory.+                          -> string      -- ^ @css@ : CSS data loaded in memory.                           -> IO () cssProviderLoadFromString cssProvider css =   withUTFStringLen css $ \(cssPtr, len) ->@@ -129,13 +127,13 @@  -- |Loads the data contained in @path@ into @cssProvider@, making it clear any previously -- loaded information-cssProviderLoadFromPath :: CssProviderClass cssProvider+cssProviderLoadFromPath :: (CssProviderClass cssProvider, GlibFilePath fp)                         => cssProvider -- ^ @cssProvider@ a @CssProvider@-                        -> FilePath    -- ^ the path of a filename to load+                        -> fp    -- ^ the path of a filename to load                         -> IO () cssProviderLoadFromPath cssProvider path =   propagateGError $ \errPtrPtr ->-  withUTFString path $ \pathPtr ->+  withUTFFilePath path $ \pathPtr ->   {# call gtk_css_provider_load_from_path #}   (toCssProvider cssProvider)   pathPtr@@ -147,9 +145,9 @@ -- Using @cssProviderLoadFromString@ with the return value from this function -- on a new provider created with @cssProviderNew@ will basically create a -- duplicate of this @provider@.-cssProviderToString :: CssProviderClass cssProvider+cssProviderToString :: (CssProviderClass cssProvider, GlibString string)                     => cssProvider -- ^ @provider@ a @CssProvider@-                    -> IO String+                    -> IO string cssProviderToString provider =   {# call gtk_css_provider_to_string #}   (toCssProvider provider) >>= peekUTFString
Graphics/UI/Gtk/General/DNDTypes.chs view
@@ -36,16 +36,16 @@   TargetList(TargetList),   SelectionData,   SelectionDataM,-  + -- * Constructors   atomNew,   targetListNew,-  mkTargetList  +  mkTargetList   ) where  import System.Glib.FFI+import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} ()-import System.Glib.UTFString ( readUTFString, withUTFString ) import Control.Monad ( liftM ) import Control.Monad.Reader ( ReaderT ) @@ -89,11 +89,11 @@ newtype Atom = Atom (Ptr ()) deriving Eq  instance Show Atom where-  show (Atom ptr) = atomToString ptr+  show (Atom ptr) = show (atomToString ptr :: DefaultGlibString)  atomToString ptr = unsafePerformIO $ do-	strPtr <- {#call unsafe gdk_atom_name#} ptr-	readUTFString strPtr+        strPtr <- {#call unsafe gdk_atom_name#} ptr+        readUTFString strPtr  -- | A 'TargetList' contains information about all possible formats -- (represented as 'TargetTag') that a widget can create or receive in form of@@ -111,7 +111,7 @@ --   different applications. Note that the name of an 'Atom' can be printed --   by 'show' though comparing the atom is merely an integer comparison. ---atomNew :: String -> IO Atom+atomNew :: GlibString string => string -> IO Atom atomNew name = withUTFString name $ \strPtr ->   liftM Atom $ {#call unsafe gdk_atom_intern#} strPtr 0 
Graphics/UI/Gtk/General/Drag.chs view
@@ -27,7 +27,7 @@ --  eventModifier   :: [Modifier], --  eventIsHint  (this needs to be True in order to avoid gdk_event_get_screen to be called (which causes havoc)) --  eventXRoot,---  eventYRoot  :: Double } +--  eventYRoot  :: Double } -- Button { --  eventClick  :: Click, --  eventTime  :: TimeStamp,@@ -39,7 +39,7 @@ --  eventTime  :: TimeStamp, --  eventModifier  :: [Modifier]} ----- drag_set_icon_pixmap : colormaps are a pain, they migth be useful here+-- drag_set_icon_pixmap : colormaps are a pain, they might be useful here -- drag_set_default_icon : obsolete drag_source_set_icon : colormap problem -- -- |@@ -68,14 +68,14 @@ #endif   castToDragContext, gTypeDragContext,   toDragContext,-  + -- * Methods #if GTK_MAJOR_VERSION < 3   dragContextActions,   dragContextSuggestedAction,   dragContextAction, #endif-  +   dragDestSet,   dragDestSetProxy,   dragDestUnset,@@ -132,17 +132,14 @@   dragMotion   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Flags-import System.Glib.UTFString ( withUTFString )-import System.Glib.GObject		(makeNewGObject)-import System.Glib.Attributes ( Attr, newAttr ) import Graphics.UI.Gtk.General.StockItems ( StockId ) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#}-{#import Graphics.UI.Gtk.General.Selection#} ( TargetList ) import Graphics.UI.Gtk.Gdk.Enums ( DragAction(..) ) import Graphics.UI.Gtk.General.Enums ( DestDefaults(..), DragProtocol(..) #if GTK_CHECK_VERSION(2,12,0)@@ -151,7 +148,7 @@ #endif                                      ) import Graphics.UI.Gtk.Gdk.Events ( TimeStamp, Modifier )-import Graphics.UI.Gtk.General.Structs ( Point, +import Graphics.UI.Gtk.General.Structs ( Point, #if GTK_MAJOR_VERSION < 3   dragContextGetActions, dragContextSetActions,   dragContextGetSuggestedAction, dragContextSetSuggestedAction,@@ -160,10 +157,13 @@   ) import Graphics.UI.Gtk.Signals import Control.Monad.Reader (runReaderT)+#if GTK_MAJOR_VERSION < 3+import System.Glib.Attributes ( Attr, newAttr )+#endif  {# context lib="gtk" prefix="gtk" #} -  + -------------------- -- Methods @@ -264,7 +264,7 @@     (toDragContext context)     (TargetList nullForeignPtr)   if ttPtr==nullPtr then return Nothing else return (Just (Atom ttPtr))-	+         -- %hash c:41c7 d:af3f -- | Returns the list of targets this widget can accept for drag-and-drop. --@@ -272,7 +272,7 @@ dragDestGetTargetList widget = do   tlPtr <- {# call gtk_drag_dest_get_target_list #} (toWidget widget)   if tlPtr==nullPtr then return Nothing else liftM Just (mkTargetList tlPtr)-  + -- %hash c:5c89 d:af3f -- | Sets the target types that this widget can accept from drag-and-drop. The -- widget must first be made into a drag destination with 'dragDestSet'.@@ -343,12 +343,12 @@ -- retrieval fails, GTK+ will emit a 'dragDataReceived' signal. Failure of -- the retrieval is indicated by passing @Nothing@ in the 'selectionData' signal. -- However, when 'dragGetData' is called--- implicitely because the 'DestDefaultDrop' was set, then the widget will+-- implicitly because the 'DestDefaultDrop' was set, then the widget will -- not receive notification of failed drops. ---dragGetData :: (WidgetClass widget, DragContextClass context) +dragGetData :: (WidgetClass widget, DragContextClass context)   => widget -- ^ The widget that will receive the 'dragDataReceived' signal.-  -> context +  -> context   -> TargetTag -- ^ The target (form of the data) to retrieve.   -> TimeStamp -- ^ A timestamp for retrieving the data. This will generally be                -- the time received in a 'dragMotion' or 'dragDrop' signal.@@ -426,7 +426,7 @@ -- %hash c:f73f d:af3f -- | Sets the icon for a given drag from a stock ID. ---dragSetIconStock :: DragContextClass context => context -> StockId +dragSetIconStock :: DragContextClass context => context -> StockId   -> Int -- ^ x hot-spot   -> Int -- ^ y hot-spot   -> IO ()@@ -445,8 +445,8 @@ -- icon theme (the icon is loaded at the DND size), thus x and y hot-spots -- have to be used with care. Since Gtk 2.8. ---dragSetIconName :: DragContextClass context => context -  -> String+dragSetIconName :: (DragContextClass context, GlibString string) => context+  -> string   -> Int -- ^ x hot-spot   -> Int -- ^ y hot-spot   -> IO ()@@ -470,7 +470,7 @@  -- %hash c:5785 d:af3f -- | Checks to see if a mouse drag starting at @(startX, startY)@ and ending--- at @(currentX, currenty)@ has passed the GTK+ drag threshold, and thus+-- at @(currentX, currentY)@ has passed the GTK+ drag threshold, and thus -- should trigger the beginning of a drag-and-drop operation. -- dragCheckThreshold :: WidgetClass widget => widget@@ -504,7 +504,7 @@  -- %hash c:63f5 d:af3f -- | Sets the icon that will be used for drags from a particular widget from a--- 'Pixbuf'. +-- 'Pixbuf'. -- dragSourceSetIconPixbuf :: WidgetClass widget => widget -> Pixbuf -> IO () dragSourceSetIconPixbuf widget pixbuf =@@ -528,7 +528,7 @@ -- | Sets the icon that will be used for drags from a particular source to a -- themed icon. See the docs for 'IconTheme' for more details. ---dragSourceSetIconName :: WidgetClass widget => widget -> String -> IO ()+dragSourceSetIconName :: (WidgetClass widget, GlibString string) => widget -> string -> IO () dragSourceSetIconName widget iconName =   withUTFString iconName $ \iconNamePtr ->   {# call gtk_drag_source_set_icon_name #}@@ -620,7 +620,7 @@ dragStatus ctxt mAction ts =   {# call gdk_drag_status #} ctxt (maybe 0 (fromIntegral . fromEnum) mAction)     (fromIntegral ts)-  + -- %hash c:fcf8 d:b945 -- | The 'dragBegin' signal is emitted on the drag source when a drag is -- started. A typical reason to connect to this signal is to set up a custom@@ -651,7 +651,7 @@ dragDataGet = Signal (\after object handler -> do       connect_OBJECT_PTR_WORD_WORD__NONE "drag-data-get" after object $         \ctxt dataPtr info time -> do-        runReaderT (handler ctxt (fromIntegral info) (fromIntegral time)) dataPtr >> +        runReaderT (handler ctxt (fromIntegral info) (fromIntegral time)) dataPtr >>                     return ())  -- %hash c:9251 d:a6d8
Graphics/UI/Gtk/General/Enums.chs view
@@ -27,8 +27,14 @@ -- module Graphics.UI.Gtk.General.Enums (   AccelFlags(..),+#if GTK_CHECK_VERSION(3,0,0)+  Align(..),+#endif   ArrowType(..),   AttachOptions(..),+#if GTK_CHECK_VERSION(3,10,0)+  BaselinePosition(..),+#endif   MouseButton(..),   ButtonBoxStyle(..),   CalendarDisplayOptions(..),@@ -41,6 +47,9 @@ #endif   DirectionType(..),   Justification(..),+#if GTK_CHECK_VERSION(3,6,0)+  LevelBarMode(..),+#endif #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED   MatchType(..),@@ -69,6 +78,9 @@   ScrollStep (..),   SelectionMode(..),   ShadowType(..),+#if GTK_CHECK_VERSION(3,0,0)+  StateFlags(..),+#endif   SortType(..),   StateType(..), #if GTK_MAJOR_VERSION < 3@@ -92,18 +104,21 @@ #endif   WindowPosition(..),   WindowType(..),-  WrapMode(..), +  WrapMode(..), #if GTK_CHECK_VERSION(2,16,0)   EntryIconPosition(..), #endif #if GTK_MAJOR_VERSION < 3   AnchorType (..), #endif+#if GTK_CHECK_VERSION(3,10,0)+  StackTransitionType (..),+#endif  module Graphics.UI.Gtk.Gdk.Enums   ) where -import System.Glib.Flags	(Flags)+import System.Glib.Flags        (Flags) import Graphics.UI.Gtk.Gdk.Enums  {#context lib="gtk" prefix ="gtk"#}@@ -115,6 +130,12 @@  instance Flags AccelFlags +#if GTK_CHECK_VERSION(3,0,0)+-- | State of an accelerator+--+{#enum Align {underscoreToCase} deriving(Bounded,Eq,Show)#}+#endif+ -- | Arrow directions for the arrow widget -- {#enum ArrowType {underscoreToCase} deriving (Eq,Show)#}@@ -125,13 +146,23 @@  instance Flags AttachOptions +#if GTK_CHECK_VERSION(3,10,0)+-- | Whenever a container has some form of natural row it may align children in +-- that row along a common typographical baseline. If the amount of vertical space+-- in the row is taller than the total requested height of the baseline-aligned+-- children then it can use a BaselinePosition to select where to put the+-- baseline inside the extra available space.+--+{#enum BaselinePosition {underscoreToCase} deriving (Eq,Show)#}+#endif+ -- | Mouse buttons. -- data MouseButton = LeftButton-		 | MiddleButton-		 | RightButton-		 | OtherButton Int-		   deriving (Eq,Show)+                 | MiddleButton+                 | RightButton+                 | OtherButton Int+                   deriving (Eq,Show)  instance Enum MouseButton where   toEnum 1 = LeftButton@@ -156,9 +187,9 @@ -- | Type of mouse click -- data Click = SingleClick-	   | DoubleClick-	   | TripleClick-	   | ReleaseClick+           | DoubleClick+           | TripleClick+           | ReleaseClick   deriving (Eq,Show,Enum)  -- | Specifies in which corner a child widget should be placed@@ -224,6 +255,10 @@ -- {#enum Justification {underscoreToCase} deriving (Eq,Show)#} +#if GTK_CHECK_VERSION(3,6,0)+{#enum LevelBarMode {underscoreToCase} deriving (Eq,Show)#}+#endif+ #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED -- | Some kind of string search options@@ -257,7 +292,7 @@ -- * The 'Packing' parameter determines how the child behaves in the horizontal --   or vertical way in an 'Graphics.UI.Gtk.Layout.HBox' or --   'Graphics.UI.Gtk.Layout.VBox', respectively. 'PackNatural'---   means the child is as big as it requests. It will stay at the start or +--   means the child is as big as it requests. It will stay at the start or --   end of a 'Graphics.UI.Gtk.Layout.Box' if there is more space available. --   All children packed with 'PackRepel' will be padded on both sides with --   additional space. 'PackGrow' will increase the size of a widget so that it@@ -271,12 +306,12 @@ --   it is irrelevant whether the main area is inserted at the start or --   the end of a box. Finally 'PackRepel' is most useful in a window --   where no widget can make use of excess space. Examples include a---   dialog box without list boxes or text fields. +--   dialog box without list boxes or text fields. -- data Packing = PackRepel-	     | PackGrow-	     | PackNatural-	     deriving (Enum,Eq,Show)+             | PackGrow+             | PackNatural+             deriving (Enum,Eq,Show)  -- The conversions between our Packing type and Gtk's expand and fill -- properties.@@ -308,7 +343,7 @@ {#enum PolicyType {underscoreToCase} deriving (Eq,Show)#}  -- | Position a scale's value is drawn relative to the--- trough+-- through -- {#enum PositionType {underscoreToCase} deriving (Eq,Show)#} @@ -358,6 +393,16 @@ -- {#enum ShadowType {underscoreToCase} deriving (Eq,Show)#} +#if GTK_CHECK_VERSION(3,0,0)+-- | Describes a widget state. Widget states are used to match the widget against+-- CSS pseudo-classes. Note that GTK extends the regular CSS classes and+-- sometimes uses different names.+--+{#enum StateFlags {underscoreToCase} deriving (Bounded,Eq,Show)#}++instance Flags StateFlags+#endif+ -- Sort a 'Graphics.UI.Gtk.ModelView.TreeViewColumn' in ascending or descending -- order. --@@ -390,14 +435,14 @@ {#enum SpinType {underscoreToCase} deriving (Eq,Show)#}  -- | The 'TargetFlags' enumeration is used to specify constraints on an entry---	 in a 'Graphics.UI.Gtk.Gdk.Selection.TargetList'. These flags are only---	 used for drag and drop.+--       in a 'Graphics.UI.Gtk.Gdk.Selection.TargetList'. These flags are only+--       used for drag and drop. -- -- * If the 'TargetSameApp' flag is set, the target will only be selected for---	 drags within a single application.+--       drags within a single application. -- -- * If the 'TargetSameWidget' flag is set, the target will only be selected---	 for drags within a single widget.+--       for drags within a single widget. -- {#enum TargetFlags {underscoreToCase} deriving(Bounded,Eq,Show) #} @@ -422,7 +467,7 @@ -- {#enum ToolbarStyle {underscoreToCase} deriving (Eq,Show)#} --- | Wether columns of a tree or list widget can be resized.+-- | Whether columns of a tree or list widget can be resized. -- {#enum TreeViewColumnSizing {underscoreToCase} deriving (Eq,Show)#} @@ -465,4 +510,8 @@ -- -- Removed in Gtk3. {#enum AnchorType {underscoreToCase} deriving (Eq,Show)#}+#endif++#if GTK_CHECK_VERSION(3,10,0)+{#enum StackTransitionType {underscoreToCase} deriving (Eq,Show)#} #endif
Graphics/UI/Gtk/General/General.chs view
@@ -36,7 +36,7 @@   postGUIAsync,   threadsEnter,   threadsLeave,-  +   -- * Main event loop   mainGUI,   mainQuit,@@ -54,12 +54,12 @@   quitAdd,   quitRemove, #endif-  +   -- * Grab widgets   grabAdd,   grabGetCurrent,   grabRemove,-  +   -- * Timeout and idle callbacks   Priority,   priorityLow,@@ -79,11 +79,12 @@   FD   ) where +import Control.Applicative+import Prelude import System.Environment (getProgName, getArgs)-import Control.Monad      (liftM, mapM, when)+import Control.Monad      (liftM, when) import Control.Concurrent (rtsSupportsBoundThreads, newEmptyMVar,                            putMVar, takeMVar)-import Data.IORef         (IORef, newIORef, readIORef, writeIORef)  import System.Glib.FFI import System.Glib.UTFString@@ -91,7 +92,7 @@ import System.Glib.MainLoop ( Priority, priorityLow, priorityDefaultIdle,   priorityHighIdle, priorityDefault, priorityHigh, timeoutRemove, idleRemove,   inputRemove, IOCondition(..), HandlerId )-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) import Graphics.UI.Gtk.Gdk.EventM (EventM) import Control.Monad.Reader (ask) import Control.Monad.Trans (liftIO)@@ -100,11 +101,11 @@ {#context lib="gtk" prefix ="gtk"#}  {---- | Retreive the current language.+-- | Retrieve the current language. -- * This function returns a String which's pointer can be used later on for --   comarisions. -----getDefaultLanguage :: IO String+--getDefaultLanguage :: GlibString string => IO string --getDefaultLanguage = do --  strPtr <- {#call unsafe get_default_language#} --  str <- peekUTFString strPtr@@ -114,7 +115,7 @@  unsafeInitGUIForThreadedRTS = initGUI --- We compile this module using -#includ"gtk/wingtk.h" to bypass the win32 abi+-- We compile this module using -#include"gtk/wingtk.h" to bypass the win32 abi -- check however we do not compile users programs with this header so if -- initGUI was ever inlined in a users program, then that program would not -- bypass the abi check and would fail on startup. So to stop that we must@@ -147,16 +148,16 @@   prog <- getProgName   args <- getArgs   let allArgs = (prog:args)-  withMany withUTFString allArgs $ \addrs  ->+  withMany withUTFString (map stringToGlib allArgs) $ \addrs  ->     withArrayLen       addrs   $ \argc argv ->-    with	       argv    $ \argvp ->-    with	       argc    $ \argcp -> do +    with               argv    $ \argvp ->+    with               argc    $ \argcp -> do       res <- {#call unsafe init_check#} (castPtr argcp) (castPtr argvp)       if (toBool res) then do         argc'   <- peek argcp         argv'   <- peek argvp         _:addrs'  <- peekArray argc' argv'  -- drop the program name-        mapM peekUTFString addrs'+        mapM ((glibToString <$>) . peekUTFString) addrs'         else error "Cannot initialize GUI."  -- g_thread_init aborts the whole program if it's called more than once so@@ -256,42 +257,42 @@ -- * Returns @True@ if the 'mainQuit' was called while processing the event. -- mainIterationDo :: Bool -> IO Bool-mainIterationDo blocking = +mainIterationDo blocking =   liftM toBool $ {#call main_iteration_do#} (fromBool blocking)  -- | Processes a single GDK event. This is public only to allow filtering of events between GDK and -- GTK+. You will not usually need to call this function directly.--- +-- -- While you should not call this function directly, you might want to know how exactly events are -- handled. So here is what this function does with the event:--- +-- --  1. Compress enter\/leave notify events. If the event passed build an enter\/leave pair together with --     the next event (peeked from GDK) both events are thrown away. This is to avoid a backlog of --     (de-)highlighting widgets crossed by the pointer.---    +-- --  2. Find the widget which got the event. If the widget can't be determined the event is thrown away --     unless it belongs to a INCR transaction. In that case it is passed to --     'selectionIncrEvent'.---    +-- --  3. Then the event is passed on a stack so you can query the currently handled event with --  'getCurrentEvent'.---    +-- --  4. The event is sent to a widget. If a grab is active all events for widgets that are not in the --     contained in the grab widget are sent to the latter with a few exceptions:---    +-- --       * Deletion and destruction events are still sent to the event widget for obvious reasons.---        +-- --       * Events which directly relate to the visual representation of the event widget.---        +-- --       * Leave events are delivered to the event widget if there was an enter event delivered to it --         before without the paired leave event.---        +-- --       * Drag events are not redirected because it is unclear what the semantics of that would be.---        +-- --     Another point of interest might be that all key events are first passed through the key snooper --     functions if there are any. Read the description of 'keySnooperInstall' if you need this --     feature.---    +-- --  5. After finishing the delivery the event is popped from the event stack. mainDoEvent :: EventM t () mainDoEvent = do@@ -302,11 +303,11 @@ -- | Trigger destruction of object in case the mainloop at level @mainLevel@ is quit. -- -- Removed in Gtk3.-quitAddDestroy :: ObjectClass obj -                 => Int -- ^ @mainLevel@ Level of the mainloop which shall trigger the destruction. -                 -> obj -- ^ @object@     Object to be destroyed.                                    +quitAddDestroy :: ObjectClass obj+                 => Int -- ^ @mainLevel@ Level of the mainloop which shall trigger the destruction.+                 -> obj -- ^ @object@     Object to be destroyed.                  -> IO ()-quitAddDestroy mainLevel obj = +quitAddDestroy mainLevel obj =   {#call quit_add_destroy #}      (fromIntegral mainLevel)      (toObject obj)@@ -314,14 +315,14 @@ -- | Registers a function to be called when an instance of the mainloop is left. -- -- Removed in Gtk3.-quitAdd :: Int -- ^ @mainLevel@ Level at which termination the function shall be called. You can pass 0 here to have the function run at the current mainloop.                                                                           +quitAdd :: Int -- ^ @mainLevel@ Level at which termination the function shall be called. You can pass 0 here to have the function run at the current mainloop.         -> (IO Bool) -- ^ @function@   The function to call. This should return 'False' to be removed from the list of quit handlers. Otherwise the function might be called again.         -> IO Int -- ^ returns    A handle for this quit handler (you need this for 'quitRemove') quitAdd mainLevel func = do-  funcPtr <- mkGtkFunction $ \ _ -> +  funcPtr <- mkGtkFunction $ \ _ ->     liftM fromBool func   liftM fromIntegral $-            {#call quit_add #} +            {#call quit_add #}               (fromIntegral mainLevel)               funcPtr               nullPtr@@ -334,7 +335,7 @@ -- | Removes a quit handler by its identifier. -- -- Removed in Gtk3.-quitRemove :: Int -- ^ @quitHandlerId@ Identifier for the handler returned when installing it.  +quitRemove :: Int -- ^ @quitHandlerId@ Identifier for the handler returned when installing it.            -> IO () quitRemove quitHandlerId =   {#call quit_remove #} (fromIntegral quitHandlerId)@@ -350,7 +351,7 @@ grabGetCurrent :: IO (Maybe Widget) grabGetCurrent  = do   wPtr <- {#call grab_get_current#}-  if (wPtr==nullPtr) then return Nothing else +  if (wPtr==nullPtr) then return Nothing else     liftM Just $ makeNewObject mkWidget (return wPtr)  -- | remove a grab widget
Graphics/UI/Gtk/General/IconFactory.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.General.IconFactory ( -- * Detail--- +-- -- | Browse the available stock icons in the list of stock IDs found here. You -- can also use the gtk-demo application for this purpose. --@@ -103,15 +103,16 @@   iconSizeGetName   ) where -import Control.Monad	(liftM)+import Control.Applicative+import Prelude+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GObject		(wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(TextDirection(..), StateType(..))+import Graphics.UI.Gtk.General.Enums    (TextDirection(..), StateType(..)) import Graphics.UI.Gtk.General.StockItems-import Graphics.UI.Gtk.General.Structs	(IconSize(..))+import Graphics.UI.Gtk.General.Structs  (IconSize(..))  {# context lib="gtk" prefix="gtk" #} @@ -125,7 +126,7 @@     where     lookupSizeString n = do       ptr <- {#call unsafe icon_size_get_name#} (fromIntegral n)-      if ptr==nullPtr then return "" else peekUTFString ptr+      if ptr==nullPtr then return "" else glibToString <$> peekUTFString ptr  -------------------- -- Constructors@@ -223,7 +224,7 @@ -- -- * Each icon in an application is contained in an 'IconSet'. The --   'IconSet' contains several variants ('IconSource's) to---   accomodate for different sizes and states.+--   accommodate for different sizes and states. -- iconSetNew :: IO IconSet iconSetNew  = do@@ -259,7 +260,7 @@ -- | Check if a given IconSize is registered. -- -- * Useful if your application expects a theme to install a set with a---   specific size. You can test if this actually happend and use another size+--   specific size. You can test if this actually happens and use another size --   if not. -- iconSizeCheck :: IconSize -> IO Bool@@ -268,18 +269,18 @@  -- | Register a new IconSize. ---iconSizeRegister ::-     String -- ^ the new name of the size+iconSizeRegister :: GlibString string+  => string -- ^ the new name of the size   -> Int -- ^ the width of the icon   -> Int -- ^ the height of the icon   -> IO IconSize -- ^ the new icon size iconSizeRegister name width height = liftM (toEnum . fromIntegral) $-  withUTFString name $ \strPtr -> {#call unsafe icon_size_register#} +  withUTFString name $ \strPtr -> {#call unsafe icon_size_register#}   strPtr (fromIntegral width) (fromIntegral height)  -- | Register an additional alias for a name. ---iconSizeRegisterAlias :: IconSize -> String -> IO ()+iconSizeRegisterAlias :: GlibString string => IconSize -> string -> IO () iconSizeRegisterAlias target alias = withUTFString alias $ \strPtr ->   {#call unsafe icon_size_register_alias#} strPtr ((fromIntegral . fromEnum) target) @@ -288,7 +289,7 @@ -- * This fixed value 'iconSizeInvalid' is returned if the name was --   not found. ---iconSizeFromName :: String -> IO IconSize+iconSizeFromName :: GlibString string => string -> IO IconSize iconSizeFromName name = liftM (toEnum . fromIntegral) $   withUTFString name {#call unsafe icon_size_from_name#} @@ -296,7 +297,7 @@ -- -- * Returns @Nothing@ if the name was not found. ---iconSizeGetName :: IconSize -> IO (Maybe String)+iconSizeGetName :: GlibString string => IconSize -> IO (Maybe string) iconSizeGetName size = do   strPtr <- {#call unsafe icon_size_get_name#} ((fromIntegral . fromEnum) size)   if strPtr==nullPtr then return Nothing else liftM Just $ peekUTFString strPtr@@ -317,7 +318,7 @@ -- -- * Returns @Nothing@ if the IconSource was generated by a Pixbuf. ---iconSourceGetFilename :: IconSource -> IO (Maybe String)+iconSourceGetFilename :: GlibString string => IconSource -> IO (Maybe string) iconSourceGetFilename is = do #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3   strPtr <- {#call unsafe icon_source_get_filename_utf8#} is@@ -341,7 +342,7 @@ -- | Retrieve the 'StateType' of this -- 'IconSource'. ----- * @Nothing@ is returned if the 'IconSource' matches all +-- * @Nothing@ is returned if the 'IconSource' matches all --   states. -- iconSourceGetState :: IconSource -> IO (Maybe StateType)@@ -381,12 +382,12 @@  -- | Load an icon picture from this filename. ---iconSourceSetFilename :: IconSource -> FilePath -> IO ()-iconSourceSetFilename is name = +iconSourceSetFilename :: GlibFilePath fp => IconSource -> fp -> IO ()+iconSourceSetFilename is name = #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3-  withUTFString name $ {# call unsafe icon_source_set_filename_utf8 #} is+  withUTFFilePath name $ {# call unsafe icon_source_set_filename_utf8 #} is #else-  withUTFString name $ {# call unsafe icon_source_set_filename #} is+  withUTFFilePath name $ {# call unsafe icon_source_set_filename #} is #endif  -- | Retrieves the source pixbuf, or Nothing if none is set.@@ -414,7 +415,7 @@ -- 'IconSource' so that is matches anything. -- iconSourceResetSize :: IconSource -> IO ()-iconSourceResetSize is = +iconSourceResetSize is =   {#call unsafe icon_source_set_size_wildcarded#} is (fromBool True)  -- | Mark this icon to be used only with this@@ -429,5 +430,5 @@ -- 'IconSource' so that is matches anything. -- iconSourceResetState :: IconSource -> IO ()-iconSourceResetState is = +iconSourceResetState is =   {#call unsafe icon_source_set_state_wildcarded#} is (fromBool True)
Graphics/UI/Gtk/General/IconTheme.chs view
@@ -33,31 +33,31 @@ -- -- | 'IconTheme' provides a facility for looking up icons by name and size. The main reason for using a -- name rather than simply providing a filename is to allow different icons to be used depending on--- what icon theme is selecetd by the user. The operation of icon themes on Linux and Unix follows the+-- what icon theme is selected by the user. The operation of icon themes on Linux and Unix follows the -- Icon Theme Specification. There is a default icon theme, named hicolor where applications should -- install their icons, but more additional application themes can be installed as operating system -- vendors and users choose.--- +-- -- Named icons are similar to the Themeable Stock Images facility, and the distinction between the -- two may be a bit confusing. A few things to keep in mind:--- +-- --   * Stock images usually are used in conjunction with Stock Items, such as ''StockOk'' or --     ''StockOpen''. Named icons are easier to set up and therefore are more useful for new icons --     that an application wants to add, such as application icons or window icons.---    +-- --   * Stock images can only be loaded at the symbolic sizes defined by the 'IconSize' enumeration, or --     by custom sizes defined by 'iconSizeRegister', while named icons are more flexible and any --     pixel size can be specified.---    +-- --   * Because stock images are closely tied to stock items, and thus to actions in the user interface, --     stock images may come in multiple variants for different widget states or writing directions.---    +-- -- A good rule of thumb is that if there is a stock image for what you want to use, use it, otherwise -- use a named icon. It turns out that internally stock images are generally defined in terms of one or -- more named icons. (An example of the more than one case is icons that depend on writing direction; -- ''StockGoForward'' uses the two themed icons 'gtkStockGoForwardLtr' and -- 'gtkStockGoForwardRtl'.)--- +-- -- In many cases, named themes are used indirectly, via 'Image' or stock items, rather than directly, -- but looking up icons directly is also simple. The 'IconTheme' object acts as a database of all the -- icons in the current theme. You can create new 'IconTheme' objects, but its much more efficient to@@ -139,16 +139,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString import System.Glib.GList-import System.Glib.Flags-import System.Glib.GObject		(wrapNewGObject, makeNewGObject, Quark)-import System.Glib.GError   (GErrorDomain, GErrorClass(..), propagateGError)+import System.Glib.GError   (propagateGError) import Graphics.UI.Gtk.General.Structs (Rectangle, Point) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}@@ -186,7 +182,7 @@ iconThemeGetDefault ::     IO IconTheme -- ^ returns A unique 'IconTheme' associated with the default                  -- screen. This icon theme is associated with the screen and-                 -- can be used as long as the screen is open. +                 -- can be used as long as the screen is open. iconThemeGetDefault =   makeNewGObject mkIconTheme $   {# call gtk_icon_theme_get_default #}@@ -201,7 +197,7 @@ iconThemeGetForScreen ::     Screen       -- ^ @screen@ - a 'Screen'  -> IO IconTheme -- ^ returns A unique 'IconTheme' associated with the given-                 -- screen. +                 -- screen. iconThemeGetForScreen screen =   makeNewGObject mkIconTheme $   {# call gtk_icon_theme_get_for_screen #}@@ -232,13 +228,13 @@ -- default icon theme, which is called DEFAULT_THEME_NAME, rather than directly -- on the icon path.) ---iconThemeSetSearchPath :: IconThemeClass self => self- -> [FilePath] -- ^ @path@ - list of directories that are searched for icon+iconThemeSetSearchPath :: (IconThemeClass self, GlibFilePath fp) => self+ -> [fp]   -- ^ @path@ - list of directories that are searched for icon            -- themes  -> Int    -- ^ @nElements@ - number of elements in @path@.  -> IO () iconThemeSetSearchPath self path nElements =-  withUTFStringArray path $ \pathPtr ->+  withUTFFilePathArray path $ \pathPtr ->   {# call gtk_icon_theme_set_search_path #}     (toIconTheme self)     pathPtr@@ -246,39 +242,39 @@  -- | Gets the current search path. See 'iconThemeSetSearchPath'. ---iconThemeGetSearchPath :: IconThemeClass self => self- -> IO ([FilePath], Int)         -- ^ @(path, nElements)@ +iconThemeGetSearchPath :: (IconThemeClass self, GlibFilePath fp) => self+ -> IO ([fp], Int)         -- ^ @(path, nElements)@                                 -- @path@ - location to store a list of icon theme path-                                -- directories. +                                -- directories. iconThemeGetSearchPath self =-  alloca $ \nElementsPtr -> +  alloca $ \nElementsPtr ->   allocaArray 0 $ \pathPtr -> do   {# call gtk_icon_theme_get_search_path #}     (toIconTheme self)     (castPtr pathPtr)     nElementsPtr-  pathStr <- readUTFStringArray0 pathPtr+  pathStr <- readUTFFilePathArray0 pathPtr   nElements <- peek nElementsPtr   return (pathStr, fromIntegral nElements)  -- | Appends a directory to the search path. See 'iconThemeSetSearchPath'. ---iconThemeAppendSearchPath :: IconThemeClass self => self- -> FilePath -- ^ @path@ - directory name to append to the icon path+iconThemeAppendSearchPath :: (IconThemeClass self, GlibFilePath fp) => self+ -> fp -- ^ @path@ - directory name to append to the icon path  -> IO () iconThemeAppendSearchPath self path =-  withUTFString path $ \pathPtr ->+  withUTFFilePath path $ \pathPtr ->   {# call gtk_icon_theme_append_search_path #}     (toIconTheme self)     pathPtr  -- | Prepends a directory to the search path. See 'iconThemeSetSearchPath'. ---iconThemePrependSearchPath :: IconThemeClass self => self- -> FilePath -- ^ @path@ - directory name to prepend to the icon path+iconThemePrependSearchPath :: (IconThemeClass self, GlibFilePath fp) => self+ -> fp -- ^ @path@ - directory name to prepend to the icon path  -> IO () iconThemePrependSearchPath self path =-  withUTFString path $ \pathPtr ->+  withUTFFilePath path $ \pathPtr ->   {# call gtk_icon_theme_prepend_search_path #}     (toIconTheme self)     pathPtr@@ -288,8 +284,8 @@ -- theme objects returned from 'iconThemeGetDefault' and -- 'iconThemeGetForScreen'. ---iconThemeSetCustomTheme :: IconThemeClass self => self- -> (Maybe String) -- ^ @themeName@ name of icon theme to use instead of configured theme, or 'Nothing' to unset a previously set custom theme+iconThemeSetCustomTheme :: (IconThemeClass self, GlibString string) => self+ -> (Maybe string) -- ^ @themeName@ name of icon theme to use instead of configured theme, or 'Nothing' to unset a previously set custom theme  -> IO () iconThemeSetCustomTheme self themeName =   maybeWith withUTFString themeName $ \themeNamePtr ->@@ -299,8 +295,8 @@  -- | Checks whether an icon theme includes an icon for a particular name. ---iconThemeHasIcon :: IconThemeClass self => self- -> String  -- ^ @iconName@ - the name of an icon+iconThemeHasIcon :: (IconThemeClass self, GlibString string) => self+ -> string  -- ^ @iconName@ - the name of an icon  -> IO Bool -- ^ returns @True@ if @iconTheme@ includes an icon for             -- @iconName@. iconThemeHasIcon self iconName =@@ -315,14 +311,14 @@ -- using 'iconInfoLoadIcon'. ('iconThemeLoadIcon' combines these two steps if -- all you need is the pixbuf.) ---iconThemeLookupIcon :: IconThemeClass self => self- -> String              -- ^ @iconName@ - the name of the icon to lookup+iconThemeLookupIcon :: (IconThemeClass self, GlibString string) => self+ -> string              -- ^ @iconName@ - the name of the icon to lookup  -> Int                 -- ^ @size@ - desired icon size  -> IconLookupFlags   -- ^ @flags@ - flags modifying the behavior of the                         -- icon lookup  -> IO (Maybe IconInfo)        -- ^ returns a 'IconInfo'                         -- structure containing information about the icon, or-                         -- 'Nothing' if the icon wasn't found. +                         -- 'Nothing' if the icon wasn't found. iconThemeLookupIcon self iconName size flags =   withUTFString iconName $ \iconNamePtr -> do   iiPtr <- {# call gtk_icon_theme_lookup_icon #}@@ -330,7 +326,7 @@           iconNamePtr           (fromIntegral size)           ((fromIntegral . fromEnum) flags)-  if iiPtr == nullPtr +  if iiPtr == nullPtr      then return Nothing      else liftM Just (mkIconInfo (castPtr iiPtr)) @@ -345,14 +341,14 @@ -- -- * Available since Gtk+ version 2.12 ---iconThemeChooseIcon :: IconThemeClass self => self- -> [String]              -- ^ @iconNames@ terminated list of icon names to lookup+iconThemeChooseIcon :: (IconThemeClass self, GlibString string) => self+ -> [string]              -- ^ @iconNames@ terminated list of icon names to lookup  -> Int                 -- ^ @size@ - desired icon size  -> IconLookupFlags   -- ^ @flags@ - flags modifying the behavior of the                         -- icon lookup  -> IO (Maybe IconInfo)        -- ^ returns a 'IconInfo'                         -- structure containing information about the icon, or-                         -- 'Nothing' if the icon wasn't found. +                         -- 'Nothing' if the icon wasn't found. iconThemeChooseIcon self iconNames size flags =   withUTFStringArray0 iconNames $ \iconNamesPtr -> do   iiPtr <- {# call gtk_icon_theme_choose_icon #}@@ -360,7 +356,7 @@           iconNamesPtr           (fromIntegral size)           ((fromIntegral . fromEnum) flags)-  if iiPtr == nullPtr +  if iiPtr == nullPtr      then return Nothing      else liftM Just (mkIconInfo (castPtr iiPtr)) @@ -379,14 +375,14 @@                         -- icon lookup  -> IO (Maybe IconInfo)        -- ^ returns a 'IconInfo'                         -- structure containing information about the icon, or-                        -- 'Nothing' if the icon wasn't found. +                        -- 'Nothing' if the icon wasn't found. iconThemeLookupByGIcon self icon size flags = do     iiPtr <- {# call gtk_icon_theme_lookup_by_gicon #}             (toIconTheme self)             (toIcon icon)             (fromIntegral size)             ((fromIntegral . fromEnum) flags)-    if iiPtr == nullPtr +    if iiPtr == nullPtr        then return Nothing        else liftM Just (mkIconInfo (castPtr iiPtr)) #endif@@ -405,15 +401,15 @@ -- of the pixbuf returned by this function. Otherwise Gtk+ may need to keep the -- old icon theme loaded, which would be a waste of memory. ---iconThemeLoadIcon :: IconThemeClass self => self- -> String            -- ^ @iconName@ - the name of the icon to lookup+iconThemeLoadIcon :: (IconThemeClass self, GlibString string) => self+ -> string            -- ^ @iconName@ - the name of the icon to lookup  -> Int               -- ^ @size@ - the desired icon size. The resulting icon                       -- may not be exactly this size; see 'iconInfoLoadIcon'.  -> IconLookupFlags -- ^ @flags@ - flags modifying the behavior of the icon                       -- lookup  -> IO (Maybe Pixbuf)  -- ^ returns the rendered icon; this may be a newly                       -- created icon or a new reference to an internal icon,-                      -- so you must not modify the icon. +                      -- so you must not modify the icon.                       -- `Nothing` if the icon isn't found. iconThemeLoadIcon self iconName size flags =   maybeNull (wrapNewGObject mkPixbuf) $@@ -432,14 +428,14 @@ -- -- * Available since Gtk+ version 2.12 ---iconThemeListContexts :: IconThemeClass self => self- -> IO [String] -- ^ returns a String list+iconThemeListContexts :: (IconThemeClass self, GlibString string) => self+ -> IO [string] -- ^ returns a String list                             -- holding the names of all the contexts in the-                            -- theme. +                            -- theme. iconThemeListContexts self = do   glistPtr <- {# call gtk_icon_theme_list_contexts #} (toIconTheme self)   list <- fromGList glistPtr-  result <- mapM readUTFString list       +  result <- mapM readUTFString list   {#call unsafe g_list_free #} (castPtr glistPtr)   return result #endif@@ -449,9 +445,9 @@ -- string is system dependent, but will typically include such values as -- \"Applications\" and \"MimeTypes\". ---iconThemeListIcons :: IconThemeClass self => self- -> (Maybe String) -- ^ @context@    a string identifying a particular type of icon, or 'Nothing' to list all icons.- -> IO [String] -- ^ returns a String list+iconThemeListIcons :: (IconThemeClass self, GlibString string) => self+ -> (Maybe string) -- ^ @context@    a string identifying a particular type of icon, or 'Nothing' to list all icons.+ -> IO [string] -- ^ returns a String list                -- holding the names of all the icons in the theme. iconThemeListIcons self context =   maybeWith withUTFString context $ \contextPtr -> do@@ -459,7 +455,7 @@              (toIconTheme self)              contextPtr   list <- fromGList glistPtr-  result <- mapM readUTFString list       +  result <- mapM readUTFString list   {#call unsafe g_list_free#} (castPtr glistPtr)   return result @@ -470,10 +466,10 @@ -- -- * Available since Gtk+ version 2.6 ---iconThemeGetIconSizes :: IconThemeClass self => self- -> String       -- ^ @iconName@ - the name of an icon+iconThemeGetIconSizes :: (IconThemeClass self, GlibString string) => self+ -> string       -- ^ @iconName@ - the name of an icon  -> IO [Int] -- ^ returns An newly allocated list describing the sizes at-            -- which the icon is available. +            -- which the icon is available. iconThemeGetIconSizes self iconName =   withUTFString iconName $ \iconNamePtr -> do   listPtr <- {# call gtk_icon_theme_get_icon_sizes #}@@ -487,8 +483,8 @@ -- | Gets the name of an icon that is representative of the current theme (for -- instance, to use when presenting a list of themes to the user.) ---iconThemeGetExampleIconName :: IconThemeClass self => self- -> IO (Maybe String)            -- ^ returns the name of an example icon or `Nothing'+iconThemeGetExampleIconName :: (IconThemeClass self, GlibString string) => self+ -> IO (Maybe string)            -- ^ returns the name of an example icon or `Nothing' iconThemeGetExampleIconName self = do   namePtr <- {# call gtk_icon_theme_get_example_icon_name #} (toIconTheme self)   if namePtr == nullPtr@@ -518,8 +514,8 @@ -- This function will generally be used with pixbufs loaded via -- 'pixbufNewFromInline'. ---iconThemeAddBuiltinIcon ::-    String -- ^ @iconName@ - the name of the icon to register+iconThemeAddBuiltinIcon :: GlibString string =>+    string -- ^ @iconName@ - the name of the icon to register  -> Int    -- ^ @size@ - the size at which to register the icon (different            -- images can be registered for the same icon name at different            -- sizes.)@@ -548,7 +544,7 @@  -- | Helper function for build 'IconInfo' mkIconInfo :: Ptr IconInfo -> IO IconInfo-mkIconInfo infoPtr = +mkIconInfo infoPtr =   liftM IconInfo $ newForeignPtr infoPtr icon_info_free  --------------------@@ -558,7 +554,7 @@ -- | -- iconInfoNewForPixbuf :: IconThemeClass iconTheme => iconTheme -> Pixbuf -> IO IconInfo-iconInfoNewForPixbuf iconTheme pixbuf = +iconInfoNewForPixbuf iconTheme pixbuf =   {# call gtk_icon_info_new_for_pixbuf #}           (toIconTheme iconTheme)           pixbuf@@ -571,7 +567,7 @@ -- | -- iconInfoCopy :: IconInfo -> IO IconInfo-iconInfoCopy self = +iconInfoCopy self =   {# call gtk_icon_info_copy #} self   >>= mkIconInfo @@ -579,14 +575,14 @@ -- used as anchor points for attaching emblems or overlays to the icon. iconInfoGetAttachPoints :: IconInfo -> IO (Maybe [Point]) iconInfoGetAttachPoints self =-  alloca $ \arrPtrPtr -> +  alloca $ \arrPtrPtr ->   alloca $ \nPointsPtr -> do-  success <- liftM toBool $ +  success <- liftM toBool $             {# call gtk_icon_info_get_attach_points #}               self               (castPtr arrPtrPtr)               nPointsPtr-  if success +  if success      then do        arrPtr <- peek arrPtrPtr        nPoints <- peek nPointsPtr@@ -599,16 +595,16 @@ -- theme creator. This may be different than the actual size of image; an example of this is small -- emblem icons that can be attached to a larger icon. These icons will be given the same base size as -- the larger icons to which they are attached.--- +-- iconInfoGetBaseSize :: IconInfo -> IO Int-iconInfoGetBaseSize self = +iconInfoGetBaseSize self =   liftM fromIntegral $   {# call gtk_icon_info_get_base_size #} self  -- | Gets the built-in image for this icon, if any. To allow GTK+ to use built in icon images, you must -- pass the ''IconLookupUseBuiltin'' to 'iconThemeLookupIcon'.-iconInfoGetBuiltinPixbuf :: IconInfo - -> IO (Maybe Pixbuf) -- ^ returns the built-in image pixbuf, or 'Nothing'. +iconInfoGetBuiltinPixbuf :: IconInfo+ -> IO (Maybe Pixbuf) -- ^ returns the built-in image pixbuf, or 'Nothing'. iconInfoGetBuiltinPixbuf self = do   pixbufPtr <- {# call gtk_icon_info_get_builtin_pixbuf #} self   if pixbufPtr == nullPtr@@ -617,19 +613,19 @@  -- | Gets the display name for an icon. A display name is a string to be used in place of the icon name -- in a user visible context like a list of icons.-iconInfoGetDisplayName :: IconInfo - -> IO (Maybe String) -- ^ returns the display name for the icon or 'Nothing', if the icon doesn't have a specified display name. +iconInfoGetDisplayName :: GlibString string => IconInfo+ -> IO (Maybe string) -- ^ returns the display name for the icon or 'Nothing', if the icon doesn't have a specified display name. iconInfoGetDisplayName self = do   strPtr <- {# call gtk_icon_info_get_display_name #} self-  if strPtr == nullPtr +  if strPtr == nullPtr      then return Nothing      else liftM Just $ peekUTFString strPtr  -- | Gets the coordinates of a rectangle within the icon that can be used for display of information such -- as a preview of the contents of a text file. See 'iconInfoSetRawCoordinates' for further -- information about the coordinate system.-iconInfoGetEmbeddedRect :: IconInfo - -> IO (Maybe Rectangle)  -- ^ @rectangle@ 'Rectangle' in which to store embedded +iconInfoGetEmbeddedRect :: IconInfo+ -> IO (Maybe Rectangle)  -- ^ @rectangle@ 'Rectangle' in which to store embedded                          -- rectangle coordinates. iconInfoGetEmbeddedRect self =   alloca $ \rectPtr -> do@@ -644,19 +640,19 @@ -- | Gets the filename for the icon. If the ''IconLookupUseBuiltin'' flag was passed to -- 'iconThemeLookupIcon', there may be no filename if a builtin icon is returned; in this case, -- you should use 'iconInfoGetBuiltinPixbuf'.-iconInfoGetFilename :: IconInfo - -> IO (Maybe String) -- ^ returns the filename for the icon, -                     -- or 'Nothing' if 'iconInfoGetBuiltinPixbuf' should be used instead. +iconInfoGetFilename :: GlibString string => IconInfo+ -> IO (Maybe string) -- ^ returns the filename for the icon,+                     -- or 'Nothing' if 'iconInfoGetBuiltinPixbuf' should be used instead. iconInfoGetFilename self = do   namePtr <- {# call gtk_icon_info_get_filename #} self   if namePtr == nullPtr-     then return Nothing +     then return Nothing      else liftM Just $ peekUTFString namePtr  -- | Looks up an icon in an icon theme, scales it to the given size and renders it into a pixbuf. This is -- a convenience function; if more details about the icon are needed, use 'iconThemeLookupIcon' -- followed by 'iconInfoLoadIcon'.--- +-- -- Note that you probably want to listen for icon theme changes and update the icon. This is usually -- done by connecting to the 'styleSet' signal. If for some reason you do not want to update -- the icon when the icon theme changes, you should consider using 'pixbufCopy' to make a private@@ -673,17 +669,17 @@ -- | Sets whether the coordinates returned by 'iconInfoGetEmbeddedRect' and -- 'iconInfoGetAttachPoints' should be returned in their original form as specified in the icon -- theme, instead of scaled appropriately for the pixbuf returned by 'iconInfoLoadIcon'.--- +-- -- Raw coordinates are somewhat strange; they are specified to be with respect to the unscaled pixmap -- for PNG and XPM icons, but for SVG icons, they are in a 1000x1000 coordinate space that is scaled to -- the final size of the icon. You can determine if the icon is an SVG icon by using -- 'iconInfoGetFilename', and seeing if it is non-'Nothing' and ends in '.svg'.--- +-- -- This function is provided primarily to allow compatibility wrappers for older API's, and is not -- expected to be useful for applications.-iconInfoSetRawCoordinates :: IconInfo - -> Bool  -- ^ @rawCoordinates@ whether the coordinates of -         -- embedded rectangles and attached points should be returned in their original   +iconInfoSetRawCoordinates :: IconInfo+ -> Bool  -- ^ @rawCoordinates@ whether the coordinates of+         -- embedded rectangles and attached points should be returned in their original  -> IO () iconInfoSetRawCoordinates self rawCoordinates =   {# call gtk_icon_info_set_raw_coordinates #}
Graphics/UI/Gtk/General/RcStyle.chs view
@@ -120,7 +120,7 @@  -- ** Optimizing RC Style Matches ----- | Everytime a widget is created and added to the layout hierarchy of a+-- | Every time a widget is created and added to the layout hierarchy of a -- 'Window' (\"anchored\" to be exact), a list of matching RC styles out of all -- RC styles read in so far is composed. For this, every RC style is matched -- against the widgets class path, the widgets name path and widgets@@ -276,7 +276,7 @@ -- [@NORMAL@] A color used for a widget in its normal state. -- -- [@ACTIVE@] A variant of the @NORMAL@ color used when the widget is in the--- 'StateActive' state, and also for the trough of a ScrollBar, tabs of a+-- 'StateActive' state, and also for the through of a ScrollBar, tabs of a -- NoteBook other than the current tab and similar areas. Frequently, this -- should be a darker variant of the @NORMAL@ color. --@@ -298,7 +298,7 @@ -- g, b}@, where @r@, @g@ and @b@ are either integers in the range 0-65535 or -- floats in the range 0.0-1.0. ----- Since 2.10, colors can also be specified by refering to a symbolic color,+-- Since 2.10, colors can also be specified by referring to a symbolic color, -- as follows: @\@color-name@, or by using expressions to combine colors. The -- following expressions are currently supported: --@@ -455,12 +455,11 @@   rcSetDefaultFiles,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.GType (GType)-import System.Glib.GTypeConstants (none) {#import Graphics.UI.Gtk.Types#}  @@ -494,7 +493,7 @@  -- | Adds a file to the list of files to be parsed at the end of 'initGUI'. ---rcAddDefaultFile :: String -> IO ()+rcAddDefaultFile :: GlibString string => string -> IO () rcAddDefaultFile filename =   withUTFString filename $ \filenamePtr ->   {# call gtk_rc_add_default_file #}@@ -503,7 +502,7 @@ -- | etrieves the current list of RC files that will be parsed at the end of -- 'initGUI'. ---rcGetDefaultFiles :: IO [String]+rcGetDefaultFiles :: GlibString string => IO [string] rcGetDefaultFiles = do   aPtr <- {# call gtk_rc_get_default_files #}   sPtrs <- peekArray0 nullPtr (castPtr aPtr)@@ -512,14 +511,14 @@ -- | Obtains the path to the IM modules file. See the documentation of the -- @GTK_IM_MODULE_FILE@ environment variable for more details. ---rcGetImModuleFile :: IO String+rcGetImModuleFile :: GlibString string => IO string rcGetImModuleFile =   {# call gtk_rc_get_im_module_file #}   >>= readUTFString  -- | Returns a directory in which GTK+ looks for theme engines. ---rcGetModuleDir :: IO String+rcGetModuleDir :: GlibString string => IO string rcGetModuleDir =   {# call gtk_rc_get_module_dir #}   >>= readUTFString@@ -540,11 +539,11 @@ -- pseudo-widgets that should be themed like widgets but don't actually have -- corresponding GTK+ widgets. ---rcGetStyleByPaths :: Settings-  -> Maybe String+rcGetStyleByPaths :: GlibString string => Settings+  -> Maybe string   -- ^ @widgetPath@ : the widget path to use when looking up the style, or   -- @Nothing@ if no matching against the widget path should be done-  -> Maybe String+  -> Maybe string   -- ^ @classPath@ :  the class path to use when looking up the style, or   -- @Nothing@ if no matching against the class path should be done.   -> GType@@ -568,14 +567,14 @@ -- | Returns the standard directory in which themes should be installed. (GTK+ -- does not actually use this directory itself.) ---rcGetThemeDir :: IO String+rcGetThemeDir :: GlibString string => IO string rcGetThemeDir =   {# call gtk_rc_get_theme_dir #}   >>= readUTFString  -- | Parses a given resource file. ---rcParse :: String+rcParse :: GlibString string => string   -- ^ @filename@ : the @filename@ of a file to parse. If @filename@ is not   -- absolute, it is searched in the current directory.     -> IO ()@@ -586,7 +585,7 @@  -- | Parses resource information directly from a string. ---rcParseString :: String -> IO ()+rcParseString :: GlibString string => string -> IO () rcParseString rcString =   withUTFString rcString $ \rcStringPtr ->   {# call gtk_rc_parse_string #}@@ -621,7 +620,7 @@ -- gets a new style, it will both redraw and recompute any cached information -- about its appearance. As an example, it is used when the default font size -- set by the operating system changes. Note that this function doesn't affect--- widgets that have a style set explicitely on them with 'widgetSetStyle'.+-- widgets that have a style set explicitly on them with 'widgetSetStyle'. -- rcResetStyles :: Settings -> IO () rcResetStyles settings =@@ -630,7 +629,7 @@  -- | Sets the list of files that GTK+ will read at the end of 'initGUI'. ---rcSetDefaultFiles :: [String] -> IO ()+rcSetDefaultFiles :: GlibString string => [string] -> IO () rcSetDefaultFiles files =   withUTFStringArray0 files $ \ssPtr ->   {# call gtk_rc_set_default_files #} ssPtr
Graphics/UI/Gtk/General/Selection.chs view
@@ -50,7 +50,7 @@ -- * Constructors   atomNew,   targetListNew,-  + -- * Methods   targetListAdd, #if GTK_CHECK_VERSION(2,6,0)@@ -101,7 +101,8 @@   ) where  import System.Glib.FFI-import System.Glib.Flags	(fromFlags)+import System.Glib.UTFString+import System.Glib.Flags        (fromFlags) import System.Glib.Signals import System.Glib.GObject {#import Graphics.UI.Gtk.Types#}@@ -119,12 +120,9 @@   )  import Graphics.UI.Gtk.Signals-import System.Glib.UTFString ( peekUTFString, withUTFStringLen,-                               withUTFStringArray0, peekUTFStringArray0 ) import Control.Monad ( liftM ) import Control.Monad.Trans ( liftIO ) import Control.Monad.Reader (runReaderT, ask)-import Data.Word ( Word32 )  {# context lib="gtk" prefix="gtk" #} @@ -268,9 +266,13 @@ -- The GtkSelectionData struct was made opaque in Gtk3, but the accessor routines -- where introduced in 2.14. #if GTK_CHECK_VERSION(2,14,0)+#if GTK_MAJOR_VERSION < 3 selectionDataGet_format selPtr = {#call gtk_selection_data_get_format#} selPtr+#endif selectionDataGet_length selPtr = {#call gtk_selection_data_get_length#} selPtr+#if GTK_MAJOR_VERSION < 3 selectionDataGet_data selPtr = {#call gtk_selection_data_get_data#} selPtr+#endif selectionDataGet_target selPtr = {#call gtk_selection_data_get_target#} selPtr #else selectionDataGet_format selPtr = {#get SelectionData -> format#} selPtr@@ -280,12 +282,12 @@ #endif  #if GTK_MAJOR_VERSION < 3--- | Retreives the data in the 'SelectionDataM' monad. The returned array+-- | Retrieves the data in the 'SelectionDataM' monad. The returned array --   must have elements of the size that were used to set this data. If --   the size or the type tag does not match, @Nothing@ is returned. -- -- Removed in Gtk3.-selectionDataGet :: (Integral a, Storable a) => +selectionDataGet :: (Integral a, Storable a) =>                     SelectionTypeTag -> SelectionDataM (Maybe [a]) selectionDataGet tagPtr = do   selPtr <- ask@@ -304,7 +306,7 @@ selectionDataGetLength :: SelectionDataM Int selectionDataGetLength = do   selPtr <- ask-  liftIO $ liftM fromIntegral $ selectionDataGet_length selPtr    +  liftIO $ liftM fromIntegral $ selectionDataGet_length selPtr  -- | Check if the currently stored data is valid. --@@ -316,7 +318,7 @@ selectionDataIsValid = do   len <- selectionDataGetLength   return (len>=0)-  + -- %hash c:9bdf d:af3f -- | Sets the contents of the selection from a string. The -- string is converted to the form determined by the allowed targets of the@@ -324,7 +326,7 @@ -- -- * Returns @True@ if setting the text was successful. ---selectionDataSetText :: String -> SelectionDataM Bool+selectionDataSetText :: GlibString string => string -> SelectionDataM Bool selectionDataSetText str = do   selPtr <- ask   liftM toBool $ liftIO $ withUTFStringLen str $ \(strPtr,len) ->@@ -333,7 +335,7 @@ -- %hash c:90e0 d:af3f -- | Gets the contents of the selection data as a string. ---selectionDataGetText :: SelectionDataM (Maybe String)+selectionDataGetText :: GlibString string => SelectionDataM (Maybe string) selectionDataGetText = do   selPtr <- ask   liftIO $ do@@ -373,19 +375,19 @@ -- -- * Returns @True@ if setting the URIs was successful. Since Gtk 2.6. ---selectionDataSetURIs :: [String] -> SelectionDataM Bool+selectionDataSetURIs :: GlibString string => [string] -> SelectionDataM Bool selectionDataSetURIs uris = do   selPtr <- ask   liftIO $ liftM toBool $ withUTFStringArray0 uris $ \strPtrPtr ->       {#call unsafe gtk_selection_data_set_uris #} selPtr strPtrPtr-    + -- %hash c:472f d:af3f -- | Gets the contents of the selection data as list of URIs. Returns -- @Nothing@ if the selection did not contain any URIs. -- -- * Since Gtk 2.6. ---selectionDataGetURIs :: SelectionDataM (Maybe [String])+selectionDataGetURIs :: GlibString string => SelectionDataM (Maybe [string]) selectionDataGetURIs = do   selPtr <- ask   liftIO $ do@@ -423,7 +425,7 @@ selectionDataGetTargets = do   selPtr <- ask   liftIO $ alloca $ \nAtomsPtr -> alloca $ \targetPtrPtr -> do-    valid <- liftM toBool $ +    valid <- liftM toBool $       {#call unsafe gtk_selection_data_get_targets #} selPtr targetPtrPtr nAtomsPtr     if not valid then return [] else do       len <- peek nAtomsPtr@@ -431,7 +433,7 @@       targetPtrs <- peekArray (fromIntegral len) targetPtr       {#call unsafe g_free#} (castPtr targetPtr)       return (map Atom targetPtrs)-      + #if GTK_CHECK_VERSION(2,6,0) -- %hash c:5a8 d:af3f -- | Given a 'SelectionDataM' holding a list of targets, determines if any of@@ -449,7 +451,7 @@     {#call unsafe gtk_selection_data_targets_include_image #}     selPtr     (fromBool writable)-#endif +#endif  -- %hash c:abe8 d:af3f -- | Given a 'SelectionDataM' holding a list of targets, determines if any of@@ -512,5 +514,5 @@ selectionGet = Signal (\after object handler -> do     connect_PTR_WORD_WORD__NONE "selection-get" after object $       \dataPtr info time -> do-      runReaderT (handler (fromIntegral info) (fromIntegral time)) dataPtr >> +      runReaderT (handler (fromIntegral info) (fromIntegral time)) dataPtr >>                   return ())
Graphics/UI/Gtk/General/Settings.chs view
@@ -57,18 +57,6 @@ import System.Glib.FFI import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.General.DNDTypes#} (SelectionTag, TargetTag,-  atomNew, Atom(..))-{#import Graphics.UI.Gtk.General.Selection#} (InfoId, SelectionDataM)-import Graphics.UI.Gtk.General.Structs (-  selectionPrimary,-  selectionSecondary,-  selectionClipboard,-  withTargetEntries)-import Control.Monad ( liftM )-import Control.Monad.Trans ( liftIO )-import Control.Monad.Reader (runReaderT, ask)-import Data.IORef ( newIORef, readIORef, writeIORef )  {# context lib="gtk" prefix="gtk" #} @@ -100,11 +88,11 @@ #endif  settingsSetLongProperty ::-    SettingsClass settings+    (SettingsClass settings, GlibString string)  => settings- -> String+ -> string  -> Int- -> String+ -> string  -> IO () settingsSetLongProperty settings name value origin =   withUTFString name $ \namePtr ->@@ -116,11 +104,11 @@     originPtr  settingsSetStringProperty ::-    SettingsClass settings+    (SettingsClass settings, GlibString string)  => settings- -> String- -> String- -> String+ -> string+ -> string+ -> string  -> IO () settingsSetStringProperty settings name value origin =   withUTFString name $ \namePtr ->
Graphics/UI/Gtk/General/StockItems.hsc view
@@ -1,4 +1,5 @@ {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*-  #include <gtk/gtk.h>@@ -54,7 +55,7 @@   stockCancel, #if GTK_CHECK_VERSION(2,16,0)   stockCapsLockWarning,-#endif                      +#endif   stockCDROM,   stockClear,   stockClose,@@ -72,7 +73,7 @@   stockDirectory, #if GTK_CHECK_VERSION(2,12,0)   stockDiscard,-#endif              +#endif   stockDisconnect,   stockDnd,   stockDndMultiple,@@ -123,10 +124,10 @@   stockOrientationReverseLandscape,   stockOrientationPortrait,   stockOrientationReversePortrait,-#endif                                 +#endif #if GTK_CHECK_VERSION(2,14,0)   stockPageSetup,-#endif                                 +#endif   stockPaste,   stockPreferences,   stockPrint,@@ -135,7 +136,7 @@   stockPrintPaused,   stockPrintReport,   stockPrintWarning,-#endif    +#endif   stockPrintPreview,   stockProperties,   stockQuit,@@ -147,7 +148,7 @@   stockSaveAs, #if GTK_CHECK_VERSION(2,10,0)   stockSelectAll,-#endif                +#endif   stockSelectColor,   stockSelectFont,   stockSortAscending,@@ -166,25 +167,25 @@   stockZoomOut   ) where --- The StockItem structure is completely marshaled to Haskell. It is +-- The StockItem structure is completely marshaled to Haskell. It is -- possible to marshal all strings lazily because the string pointers are -- valid throughout the lifetime of the application. The only drawback it -- that a stock item that is replaced by the another item with the same -- name will never be freed. This deficiency is built into Gtk however. -- -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Flags-import System.Glib.GList	(GSList, fromGSListRev)-import Graphics.UI.Gtk.Gdk.Events	(Modifier)-import Graphics.UI.Gtk.Gdk.Keys		(KeyVal)+import System.Glib.GList        (GSList, fromGSListRev)+import Graphics.UI.Gtk.Gdk.Events       (Modifier)+import Graphics.UI.Gtk.Gdk.Keys         (KeyVal)  -- |  A synonym for a standard button or icon. ---type StockId = String+type StockId = DefaultGlibString   -- Although the structure itself is allocated dynamically, its contents@@ -197,33 +198,33 @@ -- data StockItem = StockItem {   siStockId :: StockId,-  siLabel   :: String,+  siLabel   :: DefaultGlibString,   siModifier:: [Modifier],   siKeyval  :: KeyVal,-  siTransDom:: String }+  siTransDom:: DefaultGlibString }  instance Storable StockItem where-  sizeOf _	= #const sizeof(GtkStockItem)-  alignment _	= alignment (undefined::CString)-  peek siPtr	= do+  sizeOf _      = #const sizeof(GtkStockItem)+  alignment _   = alignment (undefined::CString)+  peek siPtr    = do     (stockId    :: CString) <- #{peek GtkStockItem, stock_id} siPtr-    (label	:: CString) <- #{peek GtkStockItem, label} siPtr-    (modifier	:: #gtk2hs_type GdkModifierType)-		            <- #{peek GtkStockItem, modifier} siPtr-    (keyval	:: #gtk2hs_type guint)-			    <- #{peek GtkStockItem, keyval} siPtr-    (transDom	:: CString) <- #{peek GtkStockItem, translation_domain} siPtr+    (label      :: CString) <- #{peek GtkStockItem, label} siPtr+    (modifier   :: #gtk2hs_type GdkModifierType)+                            <- #{peek GtkStockItem, modifier} siPtr+    (keyval     :: #gtk2hs_type guint)+                            <- #{peek GtkStockItem, keyval} siPtr+    (transDom   :: CString) <- #{peek GtkStockItem, translation_domain} siPtr     return $ StockItem {       siStockId  = unsafePerformIO $ peekUTFString' stockId,-      siLabel	 = unsafePerformIO $ peekUTFString' label,+      siLabel    = unsafePerformIO $ peekUTFString' label,       -- &%!?$ c2hs and hsc should agree on types-      siModifier = toFlags (fromIntegral modifier), -      siKeyval	 = keyval,+      siModifier = toFlags (fromIntegral modifier),+      siKeyval   = keyval,       siTransDom = unsafePerformIO $ peekUTFString' transDom }     where-      peekUTFString' :: CString -> IO String+      peekUTFString' :: CString -> IO DefaultGlibString       peekUTFString' strPtr | strPtr==nullPtr = return ""-			  | otherwise	    = peekUTFString strPtr+                            | otherwise       = peekUTFString strPtr    poke siPtr (StockItem {     siStockId = stockId,@@ -234,8 +235,8 @@     stockIdPtr <- newUTFString stockId     #{poke GtkStockItem, stock_id} siPtr stockIdPtr     labelPtr   <- newUTFString label-    #{poke GtkStockItem, label}	   siPtr labelPtr-    #{poke GtkStockItem, modifier} siPtr +    #{poke GtkStockItem, label}    siPtr labelPtr+    #{poke GtkStockItem, modifier} siPtr       ((fromIntegral (fromFlags modifier))::#{gtk2hs_type GdkModifierType})     #{poke GtkStockItem, keyval}   siPtr ((fromIntegral keyval)::#{gtk2hs_type guint})     transDomPtr<- newUTFString transDom@@ -258,7 +259,7 @@ -- | Lookup an item in stock. -- stockLookupItem :: StockId -> IO (Maybe StockItem)-stockLookupItem stockId = +stockLookupItem stockId =   alloca $ \siPtr ->   withUTFString stockId $ \strPtr -> do   res <- stock_lookup strPtr siPtr@@ -291,77 +292,77 @@ #if GTK_CHECK_VERSION(2,6,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-about.png>>-stockAbout		:: StockId-stockAbout		= #{const_str GTK_STOCK_ABOUT}+stockAbout              :: StockId+stockAbout              = #{const_str GTK_STOCK_ABOUT} #else-stockAbout		= stockMissingImage+stockAbout              = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-add.png>>-stockAdd		:: StockId-stockAdd		= #{const_str GTK_STOCK_ADD}+stockAdd                :: StockId+stockAdd                = #{const_str GTK_STOCK_ADD}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-apply.png>>-stockApply		:: StockId-stockApply		= #{const_str GTK_STOCK_APPLY}+stockApply              :: StockId+stockApply              = #{const_str GTK_STOCK_APPLY}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-bold.png>>-stockBold		:: StockId-stockBold		= #{const_str GTK_STOCK_BOLD}+stockBold               :: StockId+stockBold               = #{const_str GTK_STOCK_BOLD}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-cancel.png>>-stockCancel		:: StockId-stockCancel		= #{const_str GTK_STOCK_CANCEL}-                          +stockCancel             :: StockId+stockCancel             = #{const_str GTK_STOCK_CANCEL}+ #if GTK_CHECK_VERSION(2,16,0)--- | <<http://library.gnome.org/devel/gtk/stable/gtk-caps-lock-warning.png>>                          +-- | <<http://library.gnome.org/devel/gtk/stable/gtk-caps-lock-warning.png>> stockCapsLockWarning    :: StockId stockCapsLockWarning    = #{const_str GTK_STOCK_CAPS_LOCK_WARNING}-#endif                          +#endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-cdrom.png>>-stockCDROM		:: StockId-stockCDROM		= #{const_str GTK_STOCK_CDROM}+stockCDROM              :: StockId+stockCDROM              = #{const_str GTK_STOCK_CDROM}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-clear.png>>-stockClear		:: StockId-stockClear		= #{const_str GTK_STOCK_CLEAR}+stockClear              :: StockId+stockClear              = #{const_str GTK_STOCK_CLEAR}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-close.png>>-stockClose		:: StockId-stockClose		= #{const_str GTK_STOCK_CLOSE}+stockClose              :: StockId+stockClose              = #{const_str GTK_STOCK_CLOSE} #if GTK_CHECK_VERSION(2,2,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-color-picker.png>>-stockColorPicker	:: StockId-stockColorPicker	= #{const_str GTK_STOCK_COLOR_PICKER}+stockColorPicker        :: StockId+stockColorPicker        = #{const_str GTK_STOCK_COLOR_PICKER} #else stockColorPicker        = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-convert.png>>-stockConvert		:: StockId-stockConvert		= #{const_str GTK_STOCK_CONVERT}+stockConvert            :: StockId+stockConvert            = #{const_str GTK_STOCK_CONVERT} #if GTK_CHECK_VERSION(2,6,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-connect.png>>-stockConnect		:: StockId-stockConnect		= #{const_str GTK_STOCK_CONNECT}+stockConnect            :: StockId+stockConnect            = #{const_str GTK_STOCK_CONNECT} #else-stockConnect		= stockMissingImage+stockConnect            = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-copy.png>>-stockCopy		:: StockId-stockCopy		= #{const_str GTK_STOCK_COPY}+stockCopy               :: StockId+stockCopy               = #{const_str GTK_STOCK_COPY}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-cut.png>>-stockCut		:: StockId-stockCut		= #{const_str GTK_STOCK_CUT}+stockCut                :: StockId+stockCut                = #{const_str GTK_STOCK_CUT}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-delete.png>>-stockDelete		:: StockId-stockDelete		= #{const_str GTK_STOCK_DELETE}+stockDelete             :: StockId+stockDelete             = #{const_str GTK_STOCK_DELETE}  #if GTK_CHECK_VERSION(2,6,0) -- | <<http://library.gnome.org/devel/gtk/stable/gtk-dialog-authentication.png>>@@ -372,269 +373,269 @@ #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-dialog-error.png>>-stockDialogError	:: StockId-stockDialogError	= #{const_str GTK_STOCK_DIALOG_ERROR}+stockDialogError        :: StockId+stockDialogError        = #{const_str GTK_STOCK_DIALOG_ERROR}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-dialog-info.png>>-stockDialogInfo		:: StockId-stockDialogInfo		= #{const_str GTK_STOCK_DIALOG_INFO}+stockDialogInfo         :: StockId+stockDialogInfo         = #{const_str GTK_STOCK_DIALOG_INFO}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-dialog-question.png>>-stockDialogQuestion	:: StockId-stockDialogQuestion	= #{const_str GTK_STOCK_DIALOG_QUESTION}+stockDialogQuestion     :: StockId+stockDialogQuestion     = #{const_str GTK_STOCK_DIALOG_QUESTION}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-dialog-warning.png>>-stockDialogWarning	:: StockId-stockDialogWarning	= #{const_str GTK_STOCK_DIALOG_WARNING}+stockDialogWarning      :: StockId+stockDialogWarning      = #{const_str GTK_STOCK_DIALOG_WARNING} #if GTK_CHECK_VERSION(2,6,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-directory.png>>-stockDirectory		:: StockId-stockDirectory		= #{const_str GTK_STOCK_DIRECTORY}+stockDirectory          :: StockId+stockDirectory          = #{const_str GTK_STOCK_DIRECTORY} #else-stockDirectory		= stockMissingImage+stockDirectory          = stockMissingImage #endif  #if GTK_CHECK_VERSION(2,12,0)--- | +-- | stockDiscard            :: StockId stockDiscard            = #{const_str GTK_STOCK_DISCARD}-#endif                          +#endif  #if GTK_CHECK_VERSION(2,6,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-disconnect.png>>-stockDisconnect		:: StockId-stockDisconnect		= #{const_str GTK_STOCK_DISCONNECT}+stockDisconnect         :: StockId+stockDisconnect         = #{const_str GTK_STOCK_DISCONNECT} #else-stockDisconnect		= stockMissingImage+stockDisconnect         = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-dnd.png>>-stockDnd		:: StockId-stockDnd		= #{const_str GTK_STOCK_DND}+stockDnd                :: StockId+stockDnd                = #{const_str GTK_STOCK_DND}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-dnd-multiple.png>>-stockDndMultiple	:: StockId-stockDndMultiple	= #{const_str GTK_STOCK_DND_MULTIPLE}+stockDndMultiple        :: StockId+stockDndMultiple        = #{const_str GTK_STOCK_DND_MULTIPLE} #if GTK_CHECK_VERSION(2,6,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-edit.png>>-stockEdit		:: StockId-stockEdit		= #{const_str GTK_STOCK_EDIT}+stockEdit               :: StockId+stockEdit               = #{const_str GTK_STOCK_EDIT} #else-stockEdit		= stockMissingImage+stockEdit               = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-execute.png>>-stockExecute		:: StockId-stockExecute		= #{const_str GTK_STOCK_EXECUTE}+stockExecute            :: StockId+stockExecute            = #{const_str GTK_STOCK_EXECUTE} #if GTK_CHECK_VERSION(2,6,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-file.png>>-stockFile		:: StockId-stockFile		= #{const_str GTK_STOCK_FILE}+stockFile               :: StockId+stockFile               = #{const_str GTK_STOCK_FILE} #else-stockFile		= stockMissingImage+stockFile               = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-find.png>>-stockFind		:: StockId-stockFind		= #{const_str GTK_STOCK_FIND}+stockFind               :: StockId+stockFind               = #{const_str GTK_STOCK_FIND}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-find-and-replace.png>>-stockFindAndRelpace	:: StockId-stockFindAndRelpace	= #{const_str GTK_STOCK_FIND_AND_REPLACE}+stockFindAndRelpace     :: StockId+stockFindAndRelpace     = #{const_str GTK_STOCK_FIND_AND_REPLACE}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-floppy.png>>-stockFloppy		:: StockId-stockFloppy		= #{const_str GTK_STOCK_FLOPPY}+stockFloppy             :: StockId+stockFloppy             = #{const_str GTK_STOCK_FLOPPY} #if GTK_CHECK_VERSION(2,8,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-fullscreen.png>>-stockFullscreen		:: StockId-stockFullscreen		= #{const_str GTK_STOCK_FULLSCREEN}+stockFullscreen         :: StockId+stockFullscreen         = #{const_str GTK_STOCK_FULLSCREEN} #else-stockFullscreen		= stockMissingImage+stockFullscreen         = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-goto-bottom.png>>-stockGotoBottom		:: StockId-stockGotoBottom		= #{const_str GTK_STOCK_GOTO_BOTTOM}+stockGotoBottom         :: StockId+stockGotoBottom         = #{const_str GTK_STOCK_GOTO_BOTTOM}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-goto-first-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-goto-first-rtl.png>>-stockGotoFirst		:: StockId-stockGotoFirst		= #{const_str GTK_STOCK_GOTO_FIRST}+stockGotoFirst          :: StockId+stockGotoFirst          = #{const_str GTK_STOCK_GOTO_FIRST}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-goto-last-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-goto-last-rtl.png>>-stockGotoLast		:: StockId-stockGotoLast		= #{const_str GTK_STOCK_GOTO_LAST}+stockGotoLast           :: StockId+stockGotoLast           = #{const_str GTK_STOCK_GOTO_LAST}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-goto-top.png>>-stockGotoTop		:: StockId-stockGotoTop		= #{const_str GTK_STOCK_GOTO_TOP}+stockGotoTop            :: StockId+stockGotoTop            = #{const_str GTK_STOCK_GOTO_TOP}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-go-back-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-go-back-rtl.png>>-stockGoBack		:: StockId-stockGoBack		= #{const_str GTK_STOCK_GO_BACK}+stockGoBack             :: StockId+stockGoBack             = #{const_str GTK_STOCK_GO_BACK}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-go-down.png>>-stockGoDown		:: StockId-stockGoDown		= #{const_str GTK_STOCK_GO_DOWN}+stockGoDown             :: StockId+stockGoDown             = #{const_str GTK_STOCK_GO_DOWN}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-go-forward-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-go-forward-rtl.png>>-stockGoForward		:: StockId-stockGoForward		= #{const_str GTK_STOCK_GO_FORWARD}+stockGoForward          :: StockId+stockGoForward          = #{const_str GTK_STOCK_GO_FORWARD}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-go-up.png>>-stockGoUp		:: StockId-stockGoUp		= #{const_str GTK_STOCK_GO_UP}+stockGoUp               :: StockId+stockGoUp               = #{const_str GTK_STOCK_GO_UP} #if GTK_CHECK_VERSION(2,4,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-harddisk.png>>-stockHarddisk		:: StockId-stockHarddisk		= #{const_str GTK_STOCK_HARDDISK}+stockHarddisk           :: StockId+stockHarddisk           = #{const_str GTK_STOCK_HARDDISK} #else-stockHarddisk		= stockMissingImage+stockHarddisk           = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-help.png>>-stockHelp		:: StockId-stockHelp		= #{const_str GTK_STOCK_HELP}+stockHelp               :: StockId+stockHelp               = #{const_str GTK_STOCK_HELP}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-home.png>>-stockHome		:: StockId-stockHome		= #{const_str GTK_STOCK_HOME}+stockHome               :: StockId+stockHome               = #{const_str GTK_STOCK_HOME} #if GTK_CHECK_VERSION(2,4,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-indent-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-indent-rtl.png>>-stockIndent		:: StockId-stockIndent		= #{const_str GTK_STOCK_INDENT}+stockIndent             :: StockId+stockIndent             = #{const_str GTK_STOCK_INDENT} #else-stockIndent		= stockMissingImage+stockIndent             = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-index.png>>-stockIndex		:: StockId-stockIndex		= #{const_str GTK_STOCK_INDEX}+stockIndex              :: StockId+stockIndex              = #{const_str GTK_STOCK_INDEX} #if GTK_CHECK_VERSION(2,8,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-info.png>>-stockInfo		:: StockId-stockInfo		= #{const_str GTK_STOCK_INFO}+stockInfo               :: StockId+stockInfo               = #{const_str GTK_STOCK_INFO} #else-stockInfo		= stockMissingImage+stockInfo               = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-italic.png>>-stockItalic		:: StockId-stockItalic		= #{const_str GTK_STOCK_ITALIC}+stockItalic             :: StockId+stockItalic             = #{const_str GTK_STOCK_ITALIC}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-jump-to-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-jump-to-rtl.png>>-stockJumpTo		:: StockId-stockJumpTo		= #{const_str GTK_STOCK_JUMP_TO}+stockJumpTo             :: StockId+stockJumpTo             = #{const_str GTK_STOCK_JUMP_TO}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-justify-center.png>>-stockJustifyCenter	:: StockId-stockJustifyCenter	= #{const_str GTK_STOCK_JUSTIFY_CENTER}+stockJustifyCenter      :: StockId+stockJustifyCenter      = #{const_str GTK_STOCK_JUSTIFY_CENTER}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-justify-fill.png>>-stockJustifyFill	:: StockId-stockJustifyFill	= #{const_str GTK_STOCK_JUSTIFY_FILL}+stockJustifyFill        :: StockId+stockJustifyFill        = #{const_str GTK_STOCK_JUSTIFY_FILL}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-justify-left.png>>-stockJustifyLeft	:: StockId-stockJustifyLeft	= #{const_str GTK_STOCK_JUSTIFY_LEFT}+stockJustifyLeft        :: StockId+stockJustifyLeft        = #{const_str GTK_STOCK_JUSTIFY_LEFT}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-justify-right.png>>-stockJustifyRight	:: StockId-stockJustifyRight	= #{const_str GTK_STOCK_JUSTIFY_RIGHT}-                          --- | <<http://library.gnome.org/devel/gtk/stable/gtk-leave-fullscreen.png>>                          +stockJustifyRight       :: StockId+stockJustifyRight       = #{const_str GTK_STOCK_JUSTIFY_RIGHT}++-- | <<http://library.gnome.org/devel/gtk/stable/gtk-leave-fullscreen.png>> stockLeaveFullscreen    :: StockId stockLeaveFullscreen    = #{const_str GTK_STOCK_LEAVE_FULLSCREEN}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-missing-image.png>>-stockMissingImage	:: StockId-stockMissingImage	= #{const_str GTK_STOCK_MISSING_IMAGE}+stockMissingImage       :: StockId+stockMissingImage       = #{const_str GTK_STOCK_MISSING_IMAGE} #if GTK_CHECK_VERSION(2,6,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-forward-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-media-forward-rtl.png>>-stockMediaForward	:: StockId-stockMediaForward	= #{const_str GTK_STOCK_MEDIA_FORWARD}+stockMediaForward       :: StockId+stockMediaForward       = #{const_str GTK_STOCK_MEDIA_FORWARD}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-next-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-media-next-rtl.png>>-stockMediaNext  	:: StockId-stockMediaNext  	= #{const_str GTK_STOCK_MEDIA_NEXT}+stockMediaNext          :: StockId+stockMediaNext          = #{const_str GTK_STOCK_MEDIA_NEXT}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-pause.png>>-stockMediaPause		:: StockId-stockMediaPause		= #{const_str GTK_STOCK_MEDIA_PAUSE}+stockMediaPause         :: StockId+stockMediaPause         = #{const_str GTK_STOCK_MEDIA_PAUSE}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-play-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-media-play-rtl.png>>-stockMediaPlay		:: StockId-stockMediaPlay		= #{const_str GTK_STOCK_MEDIA_PLAY}+stockMediaPlay          :: StockId+stockMediaPlay          = #{const_str GTK_STOCK_MEDIA_PLAY}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-previous-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-media-previous-rtl.png>>-stockMediaPrevious	:: StockId-stockMediaPrevious	= #{const_str GTK_STOCK_MEDIA_PREVIOUS}+stockMediaPrevious      :: StockId+stockMediaPrevious      = #{const_str GTK_STOCK_MEDIA_PREVIOUS}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-record.png>>-stockMediaRecord	:: StockId-stockMediaRecord	= #{const_str GTK_STOCK_MEDIA_RECORD}+stockMediaRecord        :: StockId+stockMediaRecord        = #{const_str GTK_STOCK_MEDIA_RECORD}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-rewind-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-media-rewind-rtl.png>>-stockMediaRewind	:: StockId-stockMediaRewind	= #{const_str GTK_STOCK_MEDIA_REWIND}+stockMediaRewind        :: StockId+stockMediaRewind        = #{const_str GTK_STOCK_MEDIA_REWIND}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-media-stop.png>>-stockMediaStop		:: StockId-stockMediaStop		= #{const_str GTK_STOCK_MEDIA_STOP}+stockMediaStop          :: StockId+stockMediaStop          = #{const_str GTK_STOCK_MEDIA_STOP} #else-stockMediaForward	= stockMissingImage-stockMediaNext  	= stockMissingImage-stockMediaPause		= stockMissingImage-stockMediaPlay		= stockMissingImage-stockMediaPrevious	= stockMissingImage-stockMediaRecord	= stockMissingImage-stockMediaRewind	= stockMissingImage-stockMediaStop		= stockMissingImage+stockMediaForward       = stockMissingImage+stockMediaNext          = stockMissingImage+stockMediaPause         = stockMissingImage+stockMediaPlay          = stockMissingImage+stockMediaPrevious      = stockMissingImage+stockMediaRecord        = stockMissingImage+stockMediaRewind        = stockMissingImage+stockMediaStop          = stockMissingImage #endif #if GTK_CHECK_VERSION(2,4,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-network.png>>-stockNetwork		:: StockId-stockNetwork		= #{const_str GTK_STOCK_NETWORK}+stockNetwork            :: StockId+stockNetwork            = #{const_str GTK_STOCK_NETWORK} #else-stockNetwork		= stockMissingImage+stockNetwork            = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-new.png>>-stockNew		:: StockId-stockNew		= #{const_str GTK_STOCK_NEW}+stockNew                :: StockId+stockNew                = #{const_str GTK_STOCK_NEW}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-no.png>>-stockNo			:: StockId-stockNo			= #{const_str GTK_STOCK_NO}+stockNo                 :: StockId+stockNo                 = #{const_str GTK_STOCK_NO}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-ok.png>>-stockOk			:: StockId-stockOk			= #{const_str GTK_STOCK_OK}+stockOk                 :: StockId+stockOk                 = #{const_str GTK_STOCK_OK}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-open.png>>-stockOpen		:: StockId-stockOpen		= #{const_str GTK_STOCK_OPEN}+stockOpen               :: StockId+stockOpen               = #{const_str GTK_STOCK_OPEN} #if GTK_CHECK_VERSION(2,10,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-orientation-landscape.png>>@@ -666,151 +667,151 @@ #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-paste.png>>-stockPaste		:: StockId-stockPaste		= #{const_str GTK_STOCK_PASTE}+stockPaste              :: StockId+stockPaste              = #{const_str GTK_STOCK_PASTE}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-preferences.png>>-stockPreferences	:: StockId-stockPreferences	= #{const_str GTK_STOCK_PREFERENCES}+stockPreferences        :: StockId+stockPreferences        = #{const_str GTK_STOCK_PREFERENCES}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print.png>>-stockPrint		:: StockId-stockPrint		= #{const_str GTK_STOCK_PRINT}+stockPrint              :: StockId+stockPrint              = #{const_str GTK_STOCK_PRINT}  #if GTK_CHECK_VERSION(2,14,0)--- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-error.png>>    +-- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-error.png>> stockPrintError         :: StockId stockPrintError         = #{const_str GTK_STOCK_PRINT_ERROR}-                          + -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-paused.png>> stockPrintPaused        :: StockId stockPrintPaused        = #{const_str GTK_STOCK_PRINT_PAUSED}-                          + -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-report.png>> stockPrintReport        :: StockId stockPrintReport        = #{const_str GTK_STOCK_PRINT_REPORT}-                          + -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-warning.png>> stockPrintWarning       :: StockId stockPrintWarning       = #{const_str GTK_STOCK_PRINT_WARNING}-#endif    +#endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-preview.png>>-stockPrintPreview	:: StockId-stockPrintPreview	= #{const_str GTK_STOCK_PRINT_PREVIEW}+stockPrintPreview       :: StockId+stockPrintPreview       = #{const_str GTK_STOCK_PRINT_PREVIEW}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-properties.png>>-stockProperties		:: StockId-stockProperties		= #{const_str GTK_STOCK_PROPERTIES}+stockProperties         :: StockId+stockProperties         = #{const_str GTK_STOCK_PROPERTIES}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-quit.png>>-stockQuit		:: StockId-stockQuit		= #{const_str GTK_STOCK_QUIT}+stockQuit               :: StockId+stockQuit               = #{const_str GTK_STOCK_QUIT}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-redo-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-redo-rtl.png>>-stockRedo		:: StockId-stockRedo		= #{const_str GTK_STOCK_REDO}+stockRedo               :: StockId+stockRedo               = #{const_str GTK_STOCK_REDO}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-refresh.png>>-stockRefresh		:: StockId-stockRefresh		= #{const_str GTK_STOCK_REFRESH}+stockRefresh            :: StockId+stockRefresh            = #{const_str GTK_STOCK_REFRESH}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-remove.png>>-stockRemove		:: StockId-stockRemove		= #{const_str GTK_STOCK_REMOVE}+stockRemove             :: StockId+stockRemove             = #{const_str GTK_STOCK_REMOVE}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-revert-to-saved-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-revert-to-saved-rtl.png>>-stockRevertToSaved	:: StockId-stockRevertToSaved	= #{const_str GTK_STOCK_REVERT_TO_SAVED}+stockRevertToSaved      :: StockId+stockRevertToSaved      = #{const_str GTK_STOCK_REVERT_TO_SAVED}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-save.png>>-stockSave		:: StockId-stockSave		= #{const_str GTK_STOCK_SAVE}+stockSave               :: StockId+stockSave               = #{const_str GTK_STOCK_SAVE}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-save-as.png>>-stockSaveAs		:: StockId-stockSaveAs		= #{const_str GTK_STOCK_SAVE_AS}+stockSaveAs             :: StockId+stockSaveAs             = #{const_str GTK_STOCK_SAVE_AS} #if GTK_CHECK_VERSION(2,10,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-select-all.png>>-stockSelectAll		:: StockId-stockSelectAll		= #{const_str GTK_STOCK_SELECT_ALL}+stockSelectAll          :: StockId+stockSelectAll          = #{const_str GTK_STOCK_SELECT_ALL} #else-stockSelectAll		= stockMissingImage+stockSelectAll          = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-select-color.png>>-stockSelectColor	:: StockId-stockSelectColor	= #{const_str GTK_STOCK_SELECT_COLOR}+stockSelectColor        :: StockId+stockSelectColor        = #{const_str GTK_STOCK_SELECT_COLOR}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-font.png>>-stockSelectFont		:: StockId-stockSelectFont		= #{const_str GTK_STOCK_SELECT_FONT}+stockSelectFont         :: StockId+stockSelectFont         = #{const_str GTK_STOCK_SELECT_FONT}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-sort-ascending.png>>-stockSortAscending	:: StockId-stockSortAscending	= #{const_str GTK_STOCK_SORT_ASCENDING}+stockSortAscending      :: StockId+stockSortAscending      = #{const_str GTK_STOCK_SORT_ASCENDING}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-sort-descending.png>>-stockSortDescending	:: StockId-stockSortDescending	= #{const_str GTK_STOCK_SORT_DESCENDING}+stockSortDescending     :: StockId+stockSortDescending     = #{const_str GTK_STOCK_SORT_DESCENDING}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-spell-check.png>>-stockSpellCheck		:: StockId-stockSpellCheck		= #{const_str GTK_STOCK_SPELL_CHECK}+stockSpellCheck         :: StockId+stockSpellCheck         = #{const_str GTK_STOCK_SPELL_CHECK}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-stop.png>>-stockStop		:: StockId-stockStop		= #{const_str GTK_STOCK_STOP}+stockStop               :: StockId+stockStop               = #{const_str GTK_STOCK_STOP}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-strikethrough.png>>-stockStrikethrough	:: StockId-stockStrikethrough	= #{const_str GTK_STOCK_STRIKETHROUGH}+stockStrikethrough      :: StockId+stockStrikethrough      = #{const_str GTK_STOCK_STRIKETHROUGH}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-undelete-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-undelete-rtl.png>>-stockUndelete		:: StockId-stockUndelete		= #{const_str GTK_STOCK_UNDELETE}+stockUndelete           :: StockId+stockUndelete           = #{const_str GTK_STOCK_UNDELETE}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-underline.png>>-stockUnderline		:: StockId-stockUnderline		= #{const_str GTK_STOCK_UNDERLINE}+stockUnderline          :: StockId+stockUnderline          = #{const_str GTK_STOCK_UNDERLINE}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-undo-ltr.png>> -- <<http://library.gnome.org/devel/gtk/stable/gtk-undo-rtl.png>>-stockUndo		:: StockId-stockUndo		= #{const_str GTK_STOCK_UNDO}+stockUndo               :: StockId+stockUndo               = #{const_str GTK_STOCK_UNDO} #if GTK_CHECK_VERSION(2,4,0)  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-ltr.png>>--- <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-rtl.png>>    -stockUnindent		:: StockId-stockUnindent		= #{const_str GTK_STOCK_UNINDENT}+-- <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-rtl.png>>+stockUnindent           :: StockId+stockUnindent           = #{const_str GTK_STOCK_UNINDENT} #else-stockUnindent		= stockMissingImage+stockUnindent           = stockMissingImage #endif  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-yes.png>>-stockYes		:: StockId-stockYes		= #{const_str GTK_STOCK_YES}+stockYes                :: StockId+stockYes                = #{const_str GTK_STOCK_YES}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-zoom-100.png>>-stockZoom100		:: StockId-stockZoom100		= #{const_str GTK_STOCK_ZOOM_100}+stockZoom100            :: StockId+stockZoom100            = #{const_str GTK_STOCK_ZOOM_100}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-zoom-fit.png>>-stockZoomFit		:: StockId-stockZoomFit		= #{const_str GTK_STOCK_ZOOM_FIT}+stockZoomFit            :: StockId+stockZoomFit            = #{const_str GTK_STOCK_ZOOM_FIT}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-zoom-in.png>>-stockZoomIn		:: StockId-stockZoomIn		= #{const_str GTK_STOCK_ZOOM_IN}+stockZoomIn             :: StockId+stockZoomIn             = #{const_str GTK_STOCK_ZOOM_IN}  -- | <<http://library.gnome.org/devel/gtk/stable/gtk-zoom-out.png>>-stockZoomOut		:: StockId-stockZoomOut		= #{const_str GTK_STOCK_ZOOM_OUT}+stockZoomOut            :: StockId+stockZoomOut            = #{const_str GTK_STOCK_ZOOM_OUT}   
Graphics/UI/Gtk/General/Structs.hsc view
@@ -1,5 +1,6 @@ {-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-} {-# OPTIONS_HADDOCK hide #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- -*-haskell-*-  #include <gtk/gtk.h>@@ -37,6 +38,9 @@   Point,   Rectangle(..),   Color(..),+#if GTK_MAJOR_VERSION >= 3+  RGBA(..),+#endif #if GTK_MAJOR_VERSION < 3   GCValues(..),   pokeGCValues,@@ -78,7 +82,6 @@ #endif   widgetGetDrawWindow,   widgetGetSize,-  layoutGetDrawWindow,   windowGetFrame, #endif   styleGetForeground,@@ -118,20 +121,20 @@   KeymapKey (..)   ) where -import Control.Monad		(liftM)+import Control.Monad            (liftM) import Data.IORef import Control.Exception (handle, ErrorCall(..))  import System.Glib.FFI import System.Glib.UTFString ( UTFCorrection, ofsToUTF )-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)-import System.Glib.GObject		(makeNewGObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)+import System.Glib.GObject              (makeNewGObject) import Graphics.UI.Gtk.Types #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.Gdk.Enums (Function, Fill, SubwindowMode,                                   LineStyle, CapStyle, JoinStyle) #endif-import Graphics.UI.Gtk.General.Enums	(StateType)+import Graphics.UI.Gtk.General.Enums    (StateType) import Graphics.UI.Gtk.General.DNDTypes (InfoId, Atom(Atom) , SelectionTag,                                          TargetTag, SelectionTypeTag) import Graphics.Rendering.Pango.Structs ( Color(..), Rectangle(..) )@@ -142,14 +145,14 @@ -- | Represents the x and y coordinate of a point. -- type Point = (Int, Int)-    -instance Storable Point where           ++instance Storable Point where   sizeOf _ = #{const sizeof(GdkPoint)}   alignment _ = alignment (undefined:: #gtk2hs_type gint)   peek ptr = do-    (x_	     ::#gtk2hs_type gint)	<- #{peek GdkPoint, x} ptr-    (y_	     ::#gtk2hs_type gint)	<- #{peek GdkPoint, y} ptr-    return $ (fromIntegral x_, fromIntegral y_) +    (x_      ::#gtk2hs_type gint)       <- #{peek GdkPoint, x} ptr+    (y_      ::#gtk2hs_type gint)       <- #{peek GdkPoint, y} ptr+    return $ (fromIntegral x_, fromIntegral y_)   poke ptr (x, y) = do     #{poke GdkPoint, x} ptr ((fromIntegral x)::#gtk2hs_type gint)     #{poke GdkPoint, y} ptr ((fromIntegral y)::#gtk2hs_type gint)@@ -158,12 +161,12 @@   sizeOf _ = #{const sizeof(GdkRectangle)}   alignment _ = alignment (undefined:: #gtk2hs_type gint)   peek ptr = do-    (x_	     ::#gtk2hs_type gint)	<- #{peek GdkRectangle, x} ptr-    (y_	     ::#gtk2hs_type gint)	<- #{peek GdkRectangle, y} ptr-    (width_  ::#gtk2hs_type gint)	<- #{peek GdkRectangle, width} ptr-    (height_ ::#gtk2hs_type gint)	<- #{peek GdkRectangle, height} ptr-    return $ Rectangle (fromIntegral x_) (fromIntegral y_) -		       (fromIntegral width_) (fromIntegral height_)+    (x_      ::#gtk2hs_type gint)       <- #{peek GdkRectangle, x} ptr+    (y_      ::#gtk2hs_type gint)       <- #{peek GdkRectangle, y} ptr+    (width_  ::#gtk2hs_type gint)       <- #{peek GdkRectangle, width} ptr+    (height_ ::#gtk2hs_type gint)       <- #{peek GdkRectangle, height} ptr+    return $ Rectangle (fromIntegral x_) (fromIntegral y_)+                       (fromIntegral width_) (fromIntegral height_)   poke ptr (Rectangle x y width height) = do     #{poke GdkRectangle, x} ptr ((fromIntegral x)::#gtk2hs_type gint)     #{poke GdkRectangle, y} ptr ((fromIntegral y)::#gtk2hs_type gint)@@ -174,7 +177,7 @@   sizeOf _ = #{const sizeof(GdkColor)}   alignment _ = alignment (undefined::#gtk2hs_type guint32)   peek ptr = do-    red	   <- #{peek GdkColor, red} ptr+    red    <- #{peek GdkColor, red} ptr     green  <- #{peek GdkColor, green} ptr     blue   <- #{peek GdkColor, blue} ptr     return $ Color red green blue@@ -189,6 +192,26 @@ #endif     return () +#if GTK_MAJOR_VERSION >= 3+data RGBA = RGBA Double Double Double Double++instance Storable RGBA where+  sizeOf _ = #{const sizeof(GdkRGBA)}+  alignment _ = alignment (undefined::#gtk2hs_type guint32)+  peek ptr = do+    red    <- #{peek GdkRGBA, red} ptr+    green  <- #{peek GdkRGBA, green} ptr+    blue   <- #{peek GdkRGBA, blue} ptr+    alpha  <- #{peek GdkRGBA, alpha} ptr+    return $ RGBA red green blue alpha+  poke ptr (RGBA red green blue alpha) = do+    #{poke GdkRGBA, red}   ptr red+    #{poke GdkRGBA, green} ptr green+    #{poke GdkRGBA, blue}  ptr blue+    #{poke GdkRGBA, alpha} ptr alpha+    return ()+#endif+ #if GTK_MAJOR_VERSION < 3 type ColorMap = () @@ -241,46 +264,46 @@         backgroundPtr = #{ptr GdkGCValues, background} ptr     (foregroundPixelPtr :: CULong) <- #{peek GdkColor, pixel} foregroundPtr     (backgroundPixelPtr :: CULong) <- #{peek GdkColor, pixel} backgroundPtr-    colormapPtr <- gdkColormapGetSystem    +    colormapPtr <- gdkColormapGetSystem     gdkColormapQueryColor colormapPtr foregroundPixelPtr foregroundPtr     gdkColormapQueryColor colormapPtr backgroundPixelPtr backgroundPtr      foreground_ <- peek (#{ptr GdkGCValues, foreground} ptr)     background_ <- peek (#{ptr GdkGCValues, background} ptr)-    (function_	:: #{gtk2hs_type GdkFunction}) <- #{peek GdkGCValues, function} ptr-    (fill_	:: #{gtk2hs_type GdkFill}) <- #{peek GdkGCValues, fill} ptr-    tile_	<- do-		     pPtr <- #{peek GdkGCValues, tile} ptr-		     if (pPtr==nullPtr) then return Nothing else-		       liftM Just $ makeNewGObject mkPixmap $ return pPtr-    stipple_	<- do-		     pPtr <- #{peek GdkGCValues, stipple} ptr-		     if (pPtr==nullPtr) then return Nothing else-		       liftM Just $ makeNewGObject mkPixmap $ return pPtr-    clipMask_	<- do-		     pPtr <- #{peek GdkGCValues, clip_mask} ptr-		     if (pPtr==nullPtr) then return Nothing else-		       liftM Just $ makeNewGObject mkPixmap $ return pPtr-    (subwindow_	:: #{gtk2hs_type GdkSubwindowMode}) -		<- #{peek GdkGCValues, subwindow_mode} ptr-    (tsXOrigin_	:: #{gtk2hs_type gint}) -		<- #{peek GdkGCValues, ts_x_origin} ptr-    (tsYOrigin_	:: #{gtk2hs_type gint}) -		<- #{peek GdkGCValues, ts_y_origin} ptr-    (clipXOrigin_:: #{gtk2hs_type gint}) -		<- #{peek GdkGCValues, clip_x_origin} ptr-    (clipYOrigin_:: #{gtk2hs_type gint}) -		<- #{peek GdkGCValues, clip_y_origin} ptr-    (graphics_	:: #{gtk2hs_type gint})-		<- #{peek GdkGCValues, graphics_exposures} ptr-    (lineWidth_	:: #{gtk2hs_type gint})-		<- #{peek GdkGCValues, line_width} ptr-    (lineStyle_	:: #{gtk2hs_type GdkLineStyle}) -		<- #{peek GdkGCValues, line_style} ptr-    (capStyle_	:: #{gtk2hs_type GdkCapStyle}) -		<- #{peek GdkGCValues, cap_style} ptr-    (joinStyle_	:: #{gtk2hs_type GdkJoinStyle}) -		<- #{peek GdkGCValues, join_style} ptr+    (function_  :: #{gtk2hs_type GdkFunction}) <- #{peek GdkGCValues, function} ptr+    (fill_      :: #{gtk2hs_type GdkFill}) <- #{peek GdkGCValues, fill} ptr+    tile_       <- do+                     pPtr <- #{peek GdkGCValues, tile} ptr+                     if (pPtr==nullPtr) then return Nothing else+                       liftM Just $ makeNewGObject mkPixmap $ return pPtr+    stipple_    <- do+                     pPtr <- #{peek GdkGCValues, stipple} ptr+                     if (pPtr==nullPtr) then return Nothing else+                       liftM Just $ makeNewGObject mkPixmap $ return pPtr+    clipMask_   <- do+                     pPtr <- #{peek GdkGCValues, clip_mask} ptr+                     if (pPtr==nullPtr) then return Nothing else+                       liftM Just $ makeNewGObject mkPixmap $ return pPtr+    (subwindow_ :: #{gtk2hs_type GdkSubwindowMode})+                <- #{peek GdkGCValues, subwindow_mode} ptr+    (tsXOrigin_ :: #{gtk2hs_type gint})+                <- #{peek GdkGCValues, ts_x_origin} ptr+    (tsYOrigin_ :: #{gtk2hs_type gint})+                <- #{peek GdkGCValues, ts_y_origin} ptr+    (clipXOrigin_:: #{gtk2hs_type gint})+                <- #{peek GdkGCValues, clip_x_origin} ptr+    (clipYOrigin_:: #{gtk2hs_type gint})+                <- #{peek GdkGCValues, clip_y_origin} ptr+    (graphics_  :: #{gtk2hs_type gint})+                <- #{peek GdkGCValues, graphics_exposures} ptr+    (lineWidth_ :: #{gtk2hs_type gint})+                <- #{peek GdkGCValues, line_width} ptr+    (lineStyle_ :: #{gtk2hs_type GdkLineStyle})+                <- #{peek GdkGCValues, line_style} ptr+    (capStyle_  :: #{gtk2hs_type GdkCapStyle})+                <- #{peek GdkGCValues, cap_style} ptr+    (joinStyle_ :: #{gtk2hs_type GdkJoinStyle})+                <- #{peek GdkGCValues, join_style} ptr     return $ GCValues {       foreground = foreground_,       background = background_,@@ -300,6 +323,7 @@       capStyle   = (toEnum.fromIntegral) capStyle_,       joinStyle  = (toEnum.fromIntegral) joinStyle_     }+  poke = error "GCValues poke undefined (not sure why)"  pokeGCValues :: Ptr GCValues -> GCValues -> IO CInt pokeGCValues ptr (GCValues {@@ -322,17 +346,17 @@     joinStyle  = joinStyle_   }) = do     r <- newIORef 0-    add r #{const GDK_GC_FOREGROUND } $ +    add r #{const GDK_GC_FOREGROUND } $       poke (#{ptr GdkGCValues, foreground} ptr) foreground_-    add r #{const GDK_GC_BACKGROUND } $ +    add r #{const GDK_GC_BACKGROUND } $       poke (#{ptr GdkGCValues, background} ptr) background_-    add r #{const GDK_GC_FUNCTION } $ -      #{poke GdkGCValues, function} ptr +    add r #{const GDK_GC_FUNCTION } $+      #{poke GdkGCValues, function} ptr       (fromIntegral (fromEnum function_):: #{gtk2hs_type GdkFunction})     add r #{const GDK_GC_FILL } $-      #{poke GdkGCValues, fill} ptr +      #{poke GdkGCValues, fill} ptr       (fromIntegral (fromEnum fill_):: #{gtk2hs_type GdkFill})-    case tile_ of +    case tile_ of       Nothing -> return ()       Just tile_ -> add r #{const GDK_GC_TILE} $                     withForeignPtr (unPixmap tile_) $@@ -356,7 +380,7 @@     add r #{const GDK_GC_TS_Y_ORIGIN } $       #{poke GdkGCValues, ts_y_origin } ptr       (fromIntegral tsYOrigin_:: #{gtk2hs_type gint})-    add r #{const GDK_GC_CLIP_X_ORIGIN } $ +    add r #{const GDK_GC_CLIP_X_ORIGIN } $       #{poke GdkGCValues, clip_x_origin } ptr       (fromIntegral clipXOrigin_:: #{gtk2hs_type gint})     add r #{const GDK_GC_CLIP_Y_ORIGIN } $@@ -371,10 +395,10 @@     add r #{const GDK_GC_LINE_STYLE } $       #{poke GdkGCValues, line_style } ptr       (fromIntegral (fromEnum lineStyle_):: #{gtk2hs_type GdkLineStyle})-    add r #{const GDK_GC_CAP_STYLE } $ +    add r #{const GDK_GC_CAP_STYLE } $       #{poke GdkGCValues, cap_style } ptr       (fromIntegral (fromEnum capStyle_):: #{gtk2hs_type GdkCapStyle})-    add r #{const GDK_GC_JOIN_STYLE } $ +    add r #{const GDK_GC_JOIN_STYLE } $       #{poke GdkGCValues, join_style } ptr       (fromIntegral (fromEnum joinStyle_):: #{gtk2hs_type GdkJoinStyle})     readIORef r@@ -457,8 +481,8 @@   sizeOf _ = #{const sizeof(GtkRequisition)}   alignment _ = alignment (undefined::#gtk2hs_type gint)   peek ptr = do-    (width_  ::#gtk2hs_type gint)	<- #{peek GtkRequisition, width} ptr-    (height_ ::#gtk2hs_type gint)	<- #{peek GtkRequisition, height} ptr+    (width_  ::#gtk2hs_type gint)       <- #{peek GtkRequisition, width} ptr+    (height_ ::#gtk2hs_type gint)       <- #{peek GtkRequisition, height} ptr     return $ Requisition (fromIntegral width_) (fromIntegral height_)   poke ptr (Requisition width height) = do     #{poke GtkRequisition, width} ptr ((fromIntegral width)::#gtk2hs_type gint)@@ -504,7 +528,7 @@ -- dialogGetActionArea :: DialogClass dc => dc -> IO HBox dialogGetActionArea dc = makeNewObject mkHBox $ liftM castPtr $-  withForeignPtr ((unDialog.toDialog) dc) #{peek GtkDialog, action_area} +  withForeignPtr ((unDialog.toDialog) dc) #{peek GtkDialog, action_area} #endif  -- | Some constructors that can be used as response@@ -537,7 +561,7 @@   -- | \"Close\" was pressed.   --   -- * This value is returned from the \"Close\" stock dialog button.-	| ResponseClose+        | ResponseClose    -- | \"Yes\" was pressed.   --@@ -552,7 +576,7 @@   -- | \"Apply\" was pressed.   --   -- * This value is returned from the \"Apply\" stock dialog button.-	| ResponseApply+        | ResponseApply    -- |  \"Help\" was pressed.   --@@ -594,9 +618,10 @@ toResponse i = ResponseUser $ fromIntegral i  #if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0)--- | The identifer of a window of the underlying windowing system.+-- | The identifier of a window of the underlying windowing system. ---#ifdef GDK_NATIVE_WINDOW_POINTER+#if defined(GDK_NATIVE_WINDOW_POINTER) && !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ)+--GDK Quartz also defined GDK_NATIVE_WINDOW_POINTER newtype NativeWindowId = NativeWindowId (Ptr ()) deriving (Eq, Show) unNativeWindowId :: NativeWindowId -> Ptr a unNativeWindowId (NativeWindowId id) = castPtr id@@ -606,7 +631,7 @@ fromNativeWindowId = castPtr . unNativeWindowId nativeWindowIdNone :: NativeWindowId nativeWindowIdNone = NativeWindowId nullPtr-#elif defined(HAVE_QUARTZ_GTK) || (defined(WIN32) && GTK_MAJOR_VERSION >= 3)+#elif defined(HAVE_QUARTZ_GTK) || defined(GDK_WINDOWING_QUARTZ) || (defined(WIN32) && GTK_MAJOR_VERSION >= 3) newtype NativeWindowId = NativeWindowId (Maybe DrawWindow) deriving (Eq) unNativeWindowId :: NativeWindowId -> Maybe DrawWindow unNativeWindowId (NativeWindowId id) = id@@ -635,28 +660,28 @@  #if GTK_MAJOR_VERSION < 3 #if defined(WIN32)-foreign import ccall unsafe "gdk_win32_drawable_get_handle" +foreign import ccall unsafe "gdk_win32_drawable_get_handle"   gdk_win32_drawable_get_handle :: (Ptr Drawable) -> IO (Ptr a)-#elif !defined(HAVE_QUARTZ_GTK)-foreign import ccall unsafe "gdk_x11_drawable_get_xid" +#elif !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ)+foreign import ccall unsafe "gdk_x11_drawable_get_xid"   gdk_x11_drawable_get_xid :: (Ptr Drawable) -> IO CInt #endif #else-#if !defined(HAVE_QUARTZ_GTK) && !defined(WIN32)-foreign import ccall unsafe "gdk_x11_window_get_xid" +#if !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ) && !defined(WIN32)+foreign import ccall unsafe "gdk_x11_window_get_xid"   gdk_x11_drawable_get_xid :: (Ptr DrawWindow) -> IO CInt #endif #endif  -- | Get 'NativeWindowId' of 'Drawable'.-#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ) drawableGetID :: DrawableClass d => d -> IO NativeWindowId #else drawableGetID :: DrawWindowClass d => d -> IO NativeWindowId #endif drawableGetID d =   liftM toNativeWindowId $-#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ)   (\(Drawable drawable) -> #else   (\(DrawWindow drawable) ->@@ -669,12 +694,12 @@      liftM unsafeCoerce $ #endif      withForeignPtr drawable gdk_win32_drawable_get_handle-#elif !defined(HAVE_QUARTZ_GTK) && !defined(WIN32)+#elif !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ) && !defined(WIN32)      withForeignPtr drawable gdk_x11_drawable_get_xid #else      return $ Just (DrawWindow drawable) #endif-#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK) && !defined(GDK_WINDOWING_QUARTZ)   ) (toDrawable d) #else   ) (toDrawWindow d)@@ -726,7 +751,7 @@    -- | Icon size for icons next to dialog text.   | IconSizeDialog-  +   | IconSizeUser Int   deriving (Eq) @@ -740,14 +765,14 @@   toEnum #{const GTK_ICON_SIZE_DIALOG} = IconSizeDialog   toEnum n = IconSizeUser n   fromEnum IconSizeInvalid = #{const GTK_ICON_SIZE_INVALID}-  fromEnum IconSizeMenu = #{const GTK_ICON_SIZE_MENU}   +  fromEnum IconSizeMenu = #{const GTK_ICON_SIZE_MENU}   fromEnum IconSizeSmallToolbar = #{const GTK_ICON_SIZE_SMALL_TOOLBAR}   fromEnum IconSizeLargeToolbar = #{const GTK_ICON_SIZE_LARGE_TOOLBAR}   fromEnum IconSizeButton = #{const GTK_ICON_SIZE_BUTTON}   fromEnum IconSizeDnd = #{const GTK_ICON_SIZE_DND}   fromEnum IconSizeDialog = #{const GTK_ICON_SIZE_DIALOG}   fromEnum (IconSizeUser n) = n-  + -- entry Widget Combo #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED@@ -764,8 +789,8 @@ #if GTK_MAJOR_VERSION < 3 -- | Extract the buttons of a fileselection. ---fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> -			   IO (Button, Button)+fileSelectionGetButtons :: FileSelectionClass fsel => fsel ->+                           IO (Button, Button) fileSelectionGetButtons fsel =     do     ok <- butPtrToButton #{peek GtkFileSelection, ok_button}@@ -781,7 +806,7 @@  -- | Retrieves the 'DrawWindow' that the widget draws onto. ----- This function thows an error if the widget has not yet been realized, since+-- This function throws an error if the widget has not yet been realized, since -- a widget does not allocate its window resources until just before it is -- displayed on the screen. You can use the -- 'Graphics.UI.Gtk.Abstract.Widget.onRealize' signal to give you the@@ -804,22 +829,12 @@ -- Removed in Gtk3. widgetGetSize :: WidgetClass widget => widget -> IO (Int, Int) widgetGetSize da = withForeignPtr (unWidget.toWidget $ da) $ \wPtr -> do-    (width :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, width} -			       (#{ptr GtkWidget, allocation} wPtr)+    (width :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, width}+                               (#{ptr GtkWidget, allocation} wPtr)     (height :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, height}-				(#{ptr GtkWidget, allocation} wPtr)+                                (#{ptr GtkWidget, allocation} wPtr)     return (fromIntegral width, fromIntegral height) --- Layout related methods---- | Retrieves the 'Drawable' part.------ Removed in Gtk3.-layoutGetDrawWindow :: Layout -> IO DrawWindow-layoutGetDrawWindow lay = makeNewGObject mkDrawWindow $-  withForeignPtr (unLayout lay) $-  \lay' -> liftM castPtr $ #{peek GtkLayout, bin_window} lay'- -- Window related methods  -- | Retrieves the frame 'DrawWindow' that contains a 'Window'.@@ -924,7 +939,7 @@ -- | Retrieve the color for drawing anti-aliased text. -- -- * The anti-aliasing color is the color which is used when the rendering---   of a character does not make it clear if a certain pixel shoud be set+--   of a character does not make it clear if a certain pixel should be set --   or not. This color is between the text and the base color. -- -- * The parameter @state@ determines for which widget@@ -1072,7 +1087,6 @@ withTargetEntries tags fun = do   ptrsInfo <- mapM (\(Atom tag, info) -> gdk_atom_name tag >>= \strPtr ->                      return (TargetEntry strPtr info)) tags-  let len = length tags   res <- withArrayLen ptrsInfo (\len ptr -> fun len (castPtr ptr))   mapM_ (\(TargetEntry ptr _) -> g_free ptr) ptrsInfo   return res@@ -1095,31 +1109,31 @@ -- | A 'KeymapKey' is a hardware key that can be mapped to a keyval. data KeymapKey = KeymapKey {        keycode   :: Int -- ^ @keycode@ the hardware keycode. This is an identifying number for a physical key.-      ,group     :: Int -- ^ @group@ indicates movement in a horizontal direction. -                      -- Usually groups are used for two different languages. -                      -- In group  0, a key might have two English characters, -                      -- and in group 1 it might have two Hebrew characters. -                      -- The Hebrew characters will be printed on the key next to the English characters. -                      -- indicates which symbol on the key will be used, -                      -- in a vertical direction. So on a standard US keyboard, the                         -      ,level     :: Int -- ^ @level@ key with the number "1" on it also has the exclamation +      ,group     :: Int -- ^ @group@ indicates movement in a horizontal direction.+                      -- Usually groups are used for two different languages.+                      -- In group  0, a key might have two English characters,+                      -- and in group 1 it might have two Hebrew characters.+                      -- The Hebrew characters will be printed on the key next to the English characters.+                      -- indicates which symbol on the key will be used,+                      -- in a vertical direction. So on a standard US keyboard, the+      ,level     :: Int -- ^ @level@ key with the number "1" on it also has the exclamation                       -- point ("!") character on it. The level                       -- indicates whether to use the "1" or the "!" symbol. The letter keys are considered to                       -- have a lowercase letter at level 0, and an uppercase letter at level 1, though only                       -- the uppercase letter is printed.-    } deriving (Eq, Show) -               +    } deriving (Eq, Show)+ instance Storable KeymapKey where   sizeOf _ = #{const sizeof(GdkKeymapKey)}   alignment _ = alignment (undefined::#gtk2hs_type gint)   peek ptr = do-    (keycode_  ::#gtk2hs_type guint)	<- #{peek GdkKeymapKey, keycode} ptr-    (group_  ::#gtk2hs_type gint)	<- #{peek GdkKeymapKey, group} ptr-    (level_ ::#gtk2hs_type gint)	<- #{peek GdkKeymapKey, level} ptr+    (keycode_  ::#gtk2hs_type guint)    <- #{peek GdkKeymapKey, keycode} ptr+    (group_  ::#gtk2hs_type gint)       <- #{peek GdkKeymapKey, group} ptr+    (level_ ::#gtk2hs_type gint)        <- #{peek GdkKeymapKey, level} ptr     return $ KeymapKey (fromIntegral keycode_) (fromIntegral group_) (fromIntegral level_)   poke ptr (KeymapKey keycode group level) = do     #{poke GdkKeymapKey, keycode} ptr ((fromIntegral keycode)::#gtk2hs_type guint)     #{poke GdkKeymapKey, group} ptr ((fromIntegral group)::#gtk2hs_type gint)     #{poke GdkKeymapKey, level} ptr ((fromIntegral level)::#gtk2hs_type gint)-               -               ++
Graphics/UI/Gtk/General/Style.chs view
@@ -35,7 +35,7 @@ -- module Graphics.UI.Gtk.General.Style ( -- * Description--- +-- -- | Styles are attached to widgets and determine how particular parts are -- drawn and with what color. Thus they are should be seen as mandatory when -- one implements a new custom widgets via 'DrawingArea'. Although the@@ -70,21 +70,23 @@  {# context prefix ="gtk" #} +#if GTK_MAJOR_VERSION < 3 import System.Glib.FFI--{#import Graphics.UI.Gtk.Types#} {#import Graphics.Rendering.Pango.Types#} import Graphics.Rendering.Pango.BasicTypes-import Graphics.UI.Gtk.General.Structs		(styleGetForeground,-			 styleGetBackground,-			 styleGetLight,-			 styleGetMiddle,-			 styleGetDark,-			 styleGetText,-			 styleGetBase,-			 styleGetAntiAliasing,-                         Rectangle)+import Graphics.UI.Gtk.General.Structs          (Rectangle) import Graphics.UI.Gtk.General.Enums (StateType, ShadowType)+#endif++{#import Graphics.UI.Gtk.Types#}+import Graphics.UI.Gtk.General.Structs          (styleGetForeground,+                         styleGetBackground,+                         styleGetLight,+                         styleGetMiddle,+                         styleGetDark,+                         styleGetText,+                         styleGetBase,+                         styleGetAntiAliasing)  #if GTK_MAJOR_VERSION < 3 stylePaintFlatBox :: WidgetClass widget
Graphics/UI/Gtk/General/StyleContext.chs view
@@ -64,10 +64,15 @@ -- * Methods   styleContextAddProvider,   styleContextAddProviderForScreen,+  styleContextAddClass,+  styleContextRemoveClass,+  styleContextHasClass,+  styleContextListClasses, #endif    ) where +#if GTK_MAJOR_VERSION >= 3 {# context prefix ="gtk" #}  import Control.Monad (liftM)@@ -75,10 +80,8 @@ import System.Glib.FFI import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#}-import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain,-                           propagateGError)+import System.Glib.GList (fromGList) -#if GTK_MAJOR_VERSION >= 3 -- | Creates a standalone @StyleContext@, this style context won't be attached -- to any widget, so you may want to call @styleContextSetPath@ yourself. --@@ -135,5 +138,47 @@   (toScreen screen)   (toStyleProvider provider)   (fromIntegral priority)++-- | Adds a style class to context , so posterior calls to gtk_style_context_get()+-- or any of the gtk_render_*() functions will make use of this new class for styling.+--+-- In the CSS file format, a GtkEntry defining an “entry” class, would be matched by:+--+-- > GtkEntry.entry { ... }+-- While any widget defining an “entry” class would be matched by:+--+-- > .entry { ... }+styleContextAddClass :: (StyleContextClass context, GlibString string) => context -> string -> IO ()+styleContextAddClass context className =+  withUTFString className $ \classNamePtr ->+  {# call gtk_style_context_add_class #}+    (toStyleContext context)+    classNamePtr++-- | Removes @className@ from @context@.+styleContextRemoveClass :: (StyleContextClass context, GlibString string) => context -> string -> IO ()+styleContextRemoveClass context className =+  withUTFString className $ \classNamePtr ->+  {# call gtk_style_context_remove_class #}+    (toStyleContext context)+    classNamePtr++-- | Returns @True@ if context currently has defined the given class name+styleContextHasClass :: (StyleContextClass context, GlibString string) => context -> string -> IO Bool+styleContextHasClass context className =+  liftM toBool $+  withUTFString className $ \classNamePtr ->+  {# call gtk_style_context_has_class #}+    (toStyleContext context)+    classNamePtr++-- | Returns the list of classes currently defined in context.+styleContextListClasses :: (StyleContextClass context, GlibString string) => context -> IO [string]+styleContextListClasses context =+  {# call gtk_style_context_list_classes #}+    (toStyleContext context)+  >>= fromGList+  >>= mapM peekUTFString+  #endif
Graphics/UI/Gtk/General/StyleProvider.chs view
@@ -34,7 +34,7 @@ -- -- @StyleProvider@ is implemented by @CssProvider@ and @Settings@. #if GTK_MAJOR_VERSION >= 3--- * Typess+-- * Types   StyleProvider,   StyleProviderClass,   castToStyleProvider, gTypeStyleProvider,@@ -43,15 +43,9 @@    ) where +#if GTK_MAJOR_VERSION >= 3 {# context prefix ="gtk" #} -import Control.Monad (liftM)--import System.Glib.FFI-import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#}-import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain,-                           propagateGError) -#if GTK_MAJOR_VERSION >= 3 #endif
Graphics/UI/Gtk/General/hsgthread.c view
@@ -47,7 +47,7 @@ #if defined( WIN32 ) static CRITICAL_SECTION gtk2hs_finalizer_mutex; #else-static GStaticMutex gtk2hs_finalizer_mutex;+static GMutex gtk2hs_finalizer_mutex; #endif static GSource* gtk2hs_finalizer_source; static guint gtk2hs_finalizer_id;@@ -55,12 +55,37 @@  gboolean gtk2hs_run_finalizers(gpointer data); +#if defined( WIN32 ) && GLIB_CHECK_VERSION(2,32,0)+static GRecMutex recursive_mutex;++void imp_rec_lock() {+    g_rec_mutex_lock(&recursive_mutex);+}++void imp_rec_unlock() {+    g_rec_mutex_unlock(&recursive_mutex);+}+#endif+ /* Initialize the default _fmode on WIN32. */ void gtk2hs_initialise (void) { #if defined( WIN32 ) && defined( GTK2HS_SET_FMODE_BINARY )-	/* Some Windows GTK binraries (current Fedora MinGW ones) do */+	/* Some Windows GTK binaries (current Fedora MinGW ones) do */ 	/* not open files in binary mode.  This is a work around.    */-    _fmode = _O_BINARY;+    HANDLE handle = LoadLibrary("MSVCRT.dll");+    if(!handle) { +        fprintf(stderr, "Warning: failed to load MSVCRT.dll, ");+        fprintf(stderr, "binary mode was not set!\n");+        return;+    }+    +    int *_fmode_ptr = GetProcAddress(handle, "_fmode");+    if(!_fmode_ptr) {+        fprintf(stderr, "Warning: failed to load address of _fmode from MSVCRT.dll, ");+        fprintf(stderr, "binary mode was not set!\n");+        return;+    }+    *_fmode_ptr = _O_BINARY; #endif } @@ -77,9 +102,14 @@ #if defined( WIN32 )     InitializeCriticalSection(&gtk2hs_finalizer_mutex); #else-    g_static_mutex_init(&gtk2hs_finalizer_mutex);+    g_mutex_init(&gtk2hs_finalizer_mutex); #endif-    g_thread_init(NULL);++#if defined( WIN32 ) && GLIB_CHECK_VERSION(2,32,0)+    g_rec_mutex_init(&recursive_mutex);+    +    gdk_threads_set_lock_functions(imp_rec_lock, imp_rec_unlock);+#endif     gdk_threads_init();      /* from here onwards, the Gdk lock is held */@@ -102,7 +132,7 @@ #if defined( WIN32 )     EnterCriticalSection(&gtk2hs_finalizer_mutex); #else-    g_static_mutex_lock(&gtk2hs_finalizer_mutex);+    g_mutex_lock(&gtk2hs_finalizer_mutex); #endif     mutex_locked = 1;   }@@ -147,7 +177,7 @@ #if defined( WIN32 )     LeaveCriticalSection(&gtk2hs_finalizer_mutex); #else-    g_static_mutex_unlock(&gtk2hs_finalizer_mutex);+    g_mutex_unlock(&gtk2hs_finalizer_mutex); #endif   } }@@ -167,7 +197,7 @@ #if defined( WIN32 )     EnterCriticalSection(&gtk2hs_finalizer_mutex); #else-    g_static_mutex_lock(&gtk2hs_finalizer_mutex);+    g_mutex_lock(&gtk2hs_finalizer_mutex); #endif     mutex_locked = 1;   }@@ -190,7 +220,7 @@ #if defined( WIN32 )     LeaveCriticalSection(&gtk2hs_finalizer_mutex); #else-    g_static_mutex_unlock(&gtk2hs_finalizer_mutex);+    g_mutex_unlock(&gtk2hs_finalizer_mutex); #endif   } 
Graphics/UI/Gtk/Layout/Alignment.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Alignment ( -- * Detail--- +-- -- | The 'Alignment' widget controls the alignment and size of its child -- widget. It has four settings: xscale, yscale, xalign, and yalign. --@@ -81,12 +81,12 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -96,7 +96,7 @@  -- | Creates a new 'Alignment'. ---alignmentNew :: +alignmentNew ::     Float        -- ^ @xalign@ - the horizontal alignment of the child widget,                  -- from 0 (left) to 1 (right).  -> Float        -- ^ @yalign@ - the vertical alignment of the child widget,
Graphics/UI/Gtk/Layout/AspectFrame.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.AspectFrame ( -- * Detail--- +-- -- | The 'AspectFrame' is useful when you want pack a widget so that it can -- resize but always retains the same aspect ratio. For instance, one might be -- drawing a small preview of a larger image. 'AspectFrame' derives from@@ -65,13 +65,13 @@   aspectFrameObeyChild,   ) where -import Control.Monad	(liftM)-import Data.Maybe	(isNothing)+import Control.Monad    (liftM)+import Data.Maybe       (isNothing)  import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -83,7 +83,7 @@ -- -- The frame may be augmented with a label which can be set by @frameSetLabel@. ---aspectFrameNew :: +aspectFrameNew ::     Float          -- ^ @xalign@ - Horizontal alignment of the child within                    -- the allocation of the 'AspectFrame'. This ranges from 0.0                    -- (left aligned) to 1.0 (right aligned)
Graphics/UI/Gtk/Layout/Expander.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Layout.Expander ( -- * Detail--- +-- -- | A 'Expander' allows the user to hide or show its child by clicking on an -- expander triangle similar to the triangles used in a 'TreeView'. --@@ -110,7 +110,7 @@  -- | Creates a new expander using the given string as the text of the label. ---expanderNew :: String -> IO Expander+expanderNew :: GlibString string => string -> IO Expander expanderNew label =   makeNewObject mkExpander $   liftM (castPtr :: Ptr Widget -> Ptr Expander) $@@ -125,8 +125,8 @@ -- accelerator called a mnemonic. Pressing Alt and that key activates the -- button. ---expanderNewWithMnemonic :: -    String      -- ^ @label@ - the text of the label with an underscore in+expanderNewWithMnemonic :: GlibString string+ => string      -- ^ @label@ - the text of the label with an underscore in                 -- front of the mnemonic character  -> IO Expander expanderNewWithMnemonic label =@@ -182,7 +182,7 @@ -- -- This will also clear any previously set labels. ---expanderSetLabel :: Expander -> String -> IO ()+expanderSetLabel :: GlibString string => Expander -> string -> IO () expanderSetLabel self label =   withUTFString label $ \labelPtr ->   {# call gtk_expander_set_label #}@@ -192,7 +192,7 @@ -- | Fetches the text from the label of the expander, as set by -- 'expanderSetLabel'. ---expanderGetLabel :: Expander -> IO String+expanderGetLabel :: GlibString string => Expander -> IO string expanderGetLabel self =   {# call gtk_expander_get_label #}     self@@ -276,7 +276,7 @@  -- | Text of the expander's label. ---expanderLabel :: Attr Expander String+expanderLabel :: GlibString string => Attr Expander string expanderLabel = newAttr   expanderGetLabel   expanderSetLabel@@ -320,7 +320,7 @@  #if GTK_CHECK_VERSION(2,22,0) -- | Whether the label widget should fill all available horizontal space.--- +-- -- Default value: 'False' -- expanderLabelFill :: Attr Expander Bool
Graphics/UI/Gtk/Layout/Fixed.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Fixed ( -- * Detail--- +-- -- | The 'Fixed' widget is a container which can place child widgets at fixed -- positions and with fixed sizes, given in pixels. 'Fixed' performs no -- automatic layout management.@@ -96,11 +96,11 @@   fixedChildY,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Abstract.ContainerChildProperties 
+ Graphics/UI/Gtk/Layout/Grid.chs view
@@ -0,0 +1,380 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) Widget Alignment+--+--  Author : Axel Simon+--+--  Created: 15 May 2001+--+--  Copyright (C) 1999-2005 Axel Simon+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- A widget which controls the alignment and size of its child+--+module Graphics.UI.Gtk.Layout.Grid (+-- * Detail+--+-- | 'Grid' packs widgets into rows and columns.+--+-- * Class Hierarchy+-- |+-- @+-- |   'GObject'+-- |    +----'Object'+-- |          +----'Widget'+-- |                +----'Container'+-- |                      +----Grid+-- @++-- * Types+  Grid,+  GridClass,+  castToGrid,+  gTypeGrid,+  toGrid,++-- * Constructors+  gridNew,++-- * Methods+  gridAttach,+  gridAttachNextTo,+  gridSetRowHomogeneous,+  gridGetRowHomogeneous,+  gridSetRowSpacing,+  gridGetRowSpacing,+  gridSetColumnHomogeneous,+  gridGetColumnHomogeneous,+  gridSetColumnSpacing,+  gridGetColumnSpacing,++#if GTK_CHECK_VERSION(3,2,0)+  gridGetChildAt,+  gridInsertRow,+  gridInsertColumn,+  gridInsertNextTo,+#endif++#if GTK_CHECK_VERSION(3,10,0)+  gridRemoveRow,+  gridRemoveColumn,+  gridGetBaselineRow,+  gridSetBaselineRow,+  gridGetRowBaselinePosition,+  gridSetRowBaselinePosition+#endif++ ) where++import Control.Monad    (liftM)++import System.Glib.FFI+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)+{#import Graphics.UI.Gtk.Types#}+import Graphics.UI.Gtk.General.Enums    (PositionType)++#if GTK_CHECK_VERSION(3,10,0)+import Graphics.UI.Gtk.General.Enums    (BaselinePosition)+#endif++{# context lib="gtk" prefix="gtk" #}++---------------------+-- Constructors++-- | Creates a new grid widget.+--+gridNew :: IO Grid+gridNew =+ makeNewObject mkGrid $+ liftM (castPtr :: Ptr Widget -> Ptr Grid) $+ {# call unsafe grid_new #}++---------------------+-- Methods++-- | Adds a widget to the grid. The position of child is determined by left and top.+-- the number of "cells" that child will occupy is determined by width and height.+--+gridAttach :: (GridClass self, WidgetClass child)+ => self -- ^ @self@ - the grid.+ -> child -- ^ @child@ - the widget to add.+ -> Int -- ^ @left@ - the column number of to attach the left side of child to.+ -> Int -- ^ @top@ - the row number to attach the top side of child to.+ -> Int -- ^ @width@ - the number of columns that child will span.+ -> Int -- ^ @height@ - the number of rows that child will span.+ -> IO ()+gridAttach self child left top width height =+ {# call grid_attach #}+    (toGrid self)+    (toWidget child)+    (fromIntegral left)+    (fromIntegral top)+    (fromIntegral width)+    (fromIntegral height)++-- | Adds a widget to the grid. The widget is placed next to sibling , on the side+-- determined by side . When sibling is Nothing, the widget is placed in row (for+-- left or right placement) or column 0 (for top or bottom placement), at the end+-- indicated by side.+--+-- Attaching widgets labeled [1], [2], [3] with sibling == Nothing and side == GTK_POS_LEFT+-- yields a layout of 3[1].+--+gridAttachNextTo :: (GridClass self, WidgetClass child, WidgetClass sibling)+ => self -- ^ @self@ - the grid.+ -> child -- ^ @child@ - the widget to add+ -> Maybe sibling -- ^ @sib@ - the child of grid that child will be placed next to.+ -> PositionType -- ^ @pos@ - the side of the sibling that child is positioned next to.+ -> Int -- ^ @width@ - the number of columns that child will span.+ -> Int -- ^ @height@ - the number of rows that child will span.+ -> IO()+gridAttachNextTo self child sib pos width height =+ {# call grid_attach_next_to #}+    (toGrid self)+    (toWidget child)+    (maybe (Widget nullForeignPtr) toWidget sib)+    (fromIntegral $ fromEnum pos)+    (fromIntegral width)+    (fromIntegral height)++-- | Sets whether all rows of grid will have the same height.+--+gridSetRowHomogeneous :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Bool -- ^ @homogeneous@ - True to make row homogeneous.+ -> IO ()+gridSetRowHomogeneous self homogeneous =+ {# call grid_set_row_homogeneous #}+    (toGrid self)+    (fromBool homogeneous)++-- | Returns whether all rows of grid have the same height.+--+gridGetRowHomogeneous :: GridClass self+ => self -- ^ @self@ - the grid.+ -> IO Bool -- ^ returns whether all rows of grid have same height.+gridGetRowHomogeneous self =+ liftM toBool $+ {# call grid_get_row_homogeneous #}+    (toGrid self)++-- | Sets the amount of space between rows of grid.+--+gridSetRowSpacing :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @spacing@ - the amount of space to insert between rows.+ -> IO ()+gridSetRowSpacing self spacing =+ {# call grid_set_row_spacing #}+    (toGrid self)+    (fromIntegral spacing)++-- | Returns the amount of space between the rows of grid.+--+gridGetRowSpacing :: GridClass self+ => self -- ^ @self@ - the grid.+ -> IO Int -- ^ returns the spacing of grid.+gridGetRowSpacing self =+ liftM fromIntegral $+ {# call grid_get_row_spacing #}+    (toGrid self)++-- | Sets whether all columns of grid will have the same width.+--+gridSetColumnHomogeneous :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Bool -- ^ @homogeneous@ - True to make columns homogeneous.+ -> IO ()+gridSetColumnHomogeneous self homogeneous =+ {# call grid_set_column_homogeneous #}+    (toGrid self)+    (fromBool homogeneous)++-- | Returns whether all columns of grid have the same width.+--+gridGetColumnHomogeneous :: GridClass self+ => self -- ^ @self@ - the grid.+ -> IO Bool -- ^ returns whether all columns of grid have the same width.+gridGetColumnHomogeneous self =+ liftM toBool $+ {# call grid_get_column_homogeneous #}+    (toGrid self)++-- | Sets the amount of space between columns of grid.+--+gridSetColumnSpacing :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @spacing@ - the amount of space to insert between columns.+ -> IO ()+gridSetColumnSpacing self spacing =+ {# call grid_set_column_spacing #}+    (toGrid self)+    (fromIntegral spacing)++-- | Returns the  amount of space between the columns of grid.+--+gridGetColumnSpacing :: GridClass self+ => self -- ^ @self@ - the grid.+ -> IO Int -- ^ returns the spacing of grid.+gridGetColumnSpacing self =+ liftM fromIntegral $+ {# call grid_get_column_spacing #}+    (toGrid self)++#if GTK_CHECK_VERSION(3,2,0)++-- | Gets the child of grid whose area covers the grid cell whose upper left corner is at+-- left , top .+--+gridGetChildAt :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @left@ - the left edge of the cell.+ -> Int -- ^ @top@ - the top edge of the cell.+ -> IO (Maybe Widget) -- ^ returns the child at the given position or Nothing.+gridGetChildAt self left top = do+ ptr <- {# call grid_get_child_at #}+           (toGrid self)+           (fromIntegral left)+           (fromIntegral top)+ if ptr == nullPtr+    then return Nothing+    else liftM Just $ makeNewObject mkWidget (return ptr)++-- | Inserts a row at the specified position. Children which are attached at or below this+-- position are moved one row down. Children which span across this position are grown to+-- span the new row.+--+gridInsertRow :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @pos@ - the position to insert the row at.+ -> IO ()+gridInsertRow self pos =+ {# call grid_insert_row #}+    (toGrid self)+    (fromIntegral pos)++-- | Inserts a column at the specified position. Children which are attached at or to the+-- right of this position are moved one column to the right. Children which span across+-- this position are grown to span the new column+--+gridInsertColumn :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @pos@ - the positiion to insert the column at.+ -> IO ()+gridInsertColumn self pos =+ {# call grid_insert_column #}+    (toGrid self)+    (fromIntegral pos)++-- | Inserts a row or column at the specified position. The new row or column is placed+-- next to sibling , on the side determined by side. If side is GTK_POS_TOP or+-- GTK_POS_BOTTOM, a row is inserted. If side is GTK_POS_LEFT of GTK_POS_RIGHT, a+-- column is inserted.+--+gridInsertNextTo :: (GridClass self, WidgetClass sibling)+ => self -- ^ @self@ - the grid.+ -> sibling -- ^ @sib@ - the child of grid that the new row or column will be placed next to.+ -> PositionType -- ^ @pos@ - the isde of the sibling that child is positioned next to.+ -> IO ()+gridInsertNextTo self sib pos =+ {# call grid_insert_next_to #}+    (toGrid self)+    (toWidget sib)+    (fromIntegral $ fromEnum pos)++#endif++#if GTK_CHECK_VERSION(3,10,0)++-- | Removes a row from the grid. Children that are placed in this row are removed,+-- spanning children that overlap this row have their height reduced by one, and children+-- below the row are moved up.+--+gridRemoveRow :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @pos@ - the position of the row to remove.+ -> IO ()+gridRemoveRow self pos =+ {# call grid_remove_row #}+    (toGrid self)+    (fromIntegral pos)++-- | Removes a column from the grid. Children that are placed in this column are removed,+-- spanning children that overlap this column have their width reduced by one, and+-- children after the column are moved to the left.+--+gridRemoveColumn :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @pos@ -the position of the column to remove.+ -> IO ()+gridRemoveColumn self pos =+ {# call grid_remove_column #}+    (toGrid self)+    (fromIntegral pos)++-- | Returns which row defines the global baseline of grid.+--+gridGetBaselineRow :: GridClass self+ => self -- ^ @self@ - the grid.+ -> IO Int -- ^ returns the row index defining the global baseline.+gridGetBaselineRow self =+ liftM fromIntegral $+ {# call grid_get_baseline_row #}+    (toGrid self)++-- | Sets which row defines the global baseline for the entire grid. Each row in+-- the grid can have its own local baseline, but only one of those is global,+-- meaning it will be the baseline in the parent of the grid.+--+gridSetBaselineRow :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @row@ - the row index.+ -> IO ()+gridSetBaselineRow self row =+ {# call grid_set_baseline_row #}+    (toGrid self)+    (fromIntegral row)++-- | Returns the baseline position of row as set by gridSetRowBaselinePosition+-- or the default value BASELINE_POSITION_CENTER+--+gridGetRowBaselinePosition :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int -- ^ @row@ - a row index.+ -> IO BaselinePosition -- ^ returns  the baseline position of row.+gridGetRowBaselinePosition self row =+ liftM (toEnum . fromIntegral) $+ {# call grid_get_row_baseline_position #}+    (toGrid self)+    (fromIntegral row)++-- | Sets how the baseline should be positioned on row of the grid, in case that row+-- is assigned more space than is requested.+--+gridSetRowBaselinePosition :: GridClass self+ => self -- ^ @self@ - the grid.+ -> Int  -- ^ @row@ - a row index.+ -> BaselinePosition -- ^ @pos@ - a BaselinePosition.+ -> IO ()+gridSetRowBaselinePosition self row pos =+ {# call grid_set_row_baseline_position #}+    (toGrid self)+    (fromIntegral row)+    (fromIntegral $ fromEnum pos)++#endif
Graphics/UI/Gtk/Layout/HBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.HBox ( -- * Detail--- +-- -- | 'HBox' is a container that organizes child widgets into a single row. -- -- Use the 'Box' packing interface to determine the arrangement, spacing,@@ -59,10 +59,10 @@   hBoxNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -72,7 +72,7 @@  -- | Creates a new 'HBox'. ---hBoxNew :: +hBoxNew ::     Bool    -- ^ @homogeneous@ - @True@ if all children are to be given equal             -- space allotments.  -> Int     -- ^ @spacing@ - the number of pixels to place by default between
Graphics/UI/Gtk/Layout/HButtonBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.HButtonBox ( -- * Detail--- +-- -- | A button box should be used to provide a consistent layout of buttons -- throughout your application. The layout\/spacing can be altered by the -- programmer, or if desired, by the user to alter the \'feel\' of a program to
Graphics/UI/Gtk/Layout/HPaned.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.HPaned ( -- * Detail--- +-- -- | The HPaned widget is a container widget with two children arranged -- horizontally. The division between the two panes is adjustable by the user -- by dragging a handle. See 'Paned' for details.@@ -53,10 +53,10 @@   hPanedNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Layout/Layout.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Layout ( -- * Detail--- +-- -- | 'Layout' is similar to 'DrawingArea' in that it's a \"blank slate\" and -- doesn't do anything but paint a blank background by default. It's different -- in that it supports scrolling natively (you can add it to a@@ -63,9 +63,7 @@   layoutGetVAdjustment,   layoutSetHAdjustment,   layoutSetVAdjustment,-#if GTK_MAJOR_VERSION < 3   layoutGetDrawWindow,-#endif  -- * Attributes   layoutHAdjustment,@@ -82,18 +80,15 @@   afterSetScrollAdjustments,   ) where -import Data.Maybe	(fromMaybe)-import Control.Monad	(liftM)+import Data.Maybe       (fromMaybe)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-#if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.General.Structs	(layoutGetDrawWindow)-#endif import Graphics.UI.Gtk.Abstract.ContainerChildProperties  {# context lib="gtk" prefix="gtk" #}@@ -105,7 +100,7 @@ -- the layout to use for scrolling, pass @Nothing@ for @hadjustment@ and -- @vadjustment@. ---layoutNew :: +layoutNew ::     Maybe Adjustment -- ^ @hadjustment@ - horizontal scroll adjustment, or                      -- @Nothing@  -> Maybe Adjustment -- ^ @vadjustment@ - vertical scroll adjustment, or@@ -229,6 +224,13 @@   {# call layout_set_vadjustment #}     (toLayout self)     adjustment++-- | Retrieves the 'Drawable' part of the layout used for drawing operations.+--+layoutGetDrawWindow :: Layout -> IO DrawWindow+layoutGetDrawWindow lay = makeNewGObject mkDrawWindow $+  {# call layout_get_bin_window #}+    (toLayout lay)  -------------------- -- Attributes
Graphics/UI/Gtk/Layout/Notebook.chs view
@@ -43,7 +43,7 @@ -- module Graphics.UI.Gtk.Layout.Notebook ( -- * Detail--- +-- -- | The 'Notebook' widget is a 'Container' whose children are pages that can -- be switched between using tab labels along one edge. --@@ -188,25 +188,25 @@ #endif   ) where -import Control.Monad	(liftM)-import Data.Maybe	(maybe)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.Abstract.ContainerChildProperties-import Graphics.UI.Gtk.Display.Label	(labelNew)-import Graphics.UI.Gtk.General.Enums	(Packing(..), toPacking, fromPacking,-                                         PackType(..), PositionType(..), DirectionType(..))+import Graphics.UI.Gtk.Display.Label    (labelNew)+import Graphics.UI.Gtk.General.Enums    (Packing(..), toPacking, fromPacking,+                                         PackType(..), PositionType(..))  {# context lib="gtk" prefix="gtk" #}  #if GTK_MAJOR_VERSION < 3 {#pointer *GtkNotebookPage as NotebookPage foreign newtype #}+_ignoreNotebookPage = NotebookPage #endif  --------------------@@ -233,9 +233,9 @@ -- -- * This function returned @()@ in Gtk+ version 2.2.X and earlier ---notebookAppendPage :: (NotebookClass self, WidgetClass child) => self+notebookAppendPage :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child    -- ^ @child@ - the 'Widget' to use as the contents of the page.- -> String   -- ^ @tabLabel@ - the label for the page+ -> string   -- ^ @tabLabel@ - the label for the page  -> IO Int   -- ^ returns the index (starting from 0) of the appended page in              -- the notebook, or -1 if function fails notebookAppendPage self child tabLabel = do@@ -256,9 +256,9 @@ -- -- * This function returns @Int@ in Gtk+ version 2.4.0 and later. ---notebookAppendPage :: (NotebookClass self, WidgetClass child) => self+notebookAppendPage :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child    -- ^ @child@ - the 'Widget' to use as the contents of the page.- -> String   -- ^ @tabLabel@ - the label for the page+ -> string   -- ^ @tabLabel@ - the label for the page  -> IO () notebookAppendPage self child tabLabel = do   tab <- labelNew (Just tabLabel)@@ -331,9 +331,9 @@ -- -- * This function returned @()@ in Gtk version 2.2.X and earlier ---notebookPrependPage :: (NotebookClass self, WidgetClass child) => self+notebookPrependPage :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child    -- ^ @child@ - the 'Widget' to use as the contents of the page.- -> String   -- ^ @tabLabel@ - the label for the page+ -> string   -- ^ @tabLabel@ - the label for the page  -> IO Int   -- ^ returns the index (starting from 0) of the prepended page in              -- the notebook, or -1 if function fails notebookPrependPage self child tabLabel = do@@ -354,9 +354,9 @@ -- -- * This function returns @Int@ in Gtk version 2.4.0 and later. ---notebookPrependPage :: (NotebookClass self, WidgetClass child) => self+notebookPrependPage :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child    -- ^ @child@ - the 'Widget' to use as the contents of the page.- -> String   -- ^ @tabLabel@ - the label for the page+ -> string   -- ^ @tabLabel@ - the label for the page  -> IO () notebookPrependPage self child tabLabel = do   tab <- labelNew (Just tabLabel)@@ -428,9 +428,9 @@ -- -- * This function returned @()@ in Gtk version 2.2.X and earlier ---notebookInsertPage :: (NotebookClass self, WidgetClass child) => self+notebookInsertPage :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child    -- ^ @child@ - the 'Widget' to use as the contents of the page.- -> String   -- ^ @tabLabel@ - the label for the page+ -> string   -- ^ @tabLabel@ - the label for the page  -> Int      -- ^ @position@ - the index (starting at 0) at which to insert              -- the page, or -1 to append the page after all other pages.  -> IO Int   -- ^ returns the index (starting from 0) of the inserted page in@@ -454,9 +454,9 @@ -- -- * This function returns @Int@ in Gtk version 2.4.0 and later. ---notebookInsertPage :: (NotebookClass self, WidgetClass child) => self+notebookInsertPage :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child    -- ^ @child@ - the 'Widget' to use as the contents of the page.- -> String   -- ^ @tabLabel@ - the label for the page+ -> string   -- ^ @tabLabel@ - the label for the page  -> Int      -- ^ @position@ - the index (starting at 0) at which to insert              -- the page, or -1 to append the page after all other pages.  -> IO ()@@ -507,7 +507,7 @@ -- -- * This function returns @Int@ in Gtk version 2.4.0 and later ---notebookInsertPageMenu ::(NotebookClass nb, WidgetClass child, +notebookInsertPageMenu ::(NotebookClass nb, WidgetClass child,    WidgetClass tab, WidgetClass menu) => nb   -> child  -- ^ Widget to use as the contents of the page   -> tab    -- ^ Tab label widget for the page.@@ -552,7 +552,7 @@ --   Use @-1@ to request the last page. -- -- * Note that due to historical reasons, GtkNotebook refuses---   to switch to a page unless the child widget is visible. +--   to switch to a page unless the child widget is visible. --   Therefore, it is recommended to show child widgets before --   adding them to a notebook. --@@ -777,9 +777,9 @@  -- | Creates a new label and sets it as the menu label of @child@. ---notebookSetMenuLabelText :: (NotebookClass self, WidgetClass child) => self+notebookSetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child  -- ^ @child@ - the child widget- -> String -- ^ @menuText@ - the label text+ -> string -- ^ @menuText@ - the label text  -> IO () notebookSetMenuLabelText self child menuText =   withUTFString menuText $ \menuTextPtr ->@@ -790,10 +790,10 @@  -- | Retrieves the text of the menu label for the page containing @child@. ---notebookGetMenuLabelText :: (NotebookClass self, WidgetClass child) => self+notebookGetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child             -- ^ @child@ - the child widget of a page of the                       -- notebook.- -> IO (Maybe String) -- ^ returns value: the text of the tab label, or+ -> IO (Maybe string) -- ^ returns value: the text of the tab label, or                       -- @Nothing@ if the widget does not have a menu label                       -- other than the default menu label, or the menu label                       -- widget is not a 'Label'.@@ -843,10 +843,10 @@  -- | Retrieves the text of the tab label for the page containing @child@. ---notebookGetTabLabelText :: (NotebookClass self, WidgetClass child) => self+notebookGetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child             -- ^ @child@ - a widget contained in a page of                       -- @notebook@- -> IO (Maybe String) -- ^ returns value: the text of the tab label, or+ -> IO (Maybe string) -- ^ returns value: the text of the tab label, or                       -- @Nothing@ if the tab label widget is not a 'Label'. notebookGetTabLabelText self child =   {# call unsafe notebook_get_tab_label_text #}@@ -892,7 +892,7 @@     (toNotebook self)     (toWidget child)     (fromBool expand)-    (fromBool fill) +    (fromBool fill)     ((fromIntegral . fromEnum) packType)   where (expand, fill) = fromPacking pack @@ -928,9 +928,9 @@ -- | Creates a new label and sets it as the tab label for the page containing -- @child@. ---notebookSetTabLabelText :: (NotebookClass self, WidgetClass child) => self+notebookSetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self  -> child  -- ^ @child@ - the page- -> String -- ^ @tabText@ - the label text+ -> string -- ^ @tabText@ - the label text  -> IO () notebookSetTabLabelText self child tabText =   withUTFString tabText $ \tabTextPtr ->@@ -946,7 +946,7 @@ -- notebookSetTabReorderable :: (NotebookClass self, WidgetClass child) => self  -> child   -- ^ @child@ - a child page- -> Bool   -- ^ @reorderable@ - whether the tab is reorderable or not. + -> Bool   -- ^ @reorderable@ - whether the tab is reorderable or not.  -> IO () notebookSetTabReorderable self child reorderable =   {# call notebook_set_tab_reorderable #}@@ -960,7 +960,7 @@ -- notebookGetTabReorderable :: (NotebookClass self, WidgetClass child) => self  -> child  -- ^ @child@ - the child page- -> IO Bool  -- ^ return @True@ if the tab is reorderable. + -> IO Bool  -- ^ return @True@ if the tab is reorderable. notebookGetTabReorderable self child = liftM toBool $   {# call notebook_get_tab_reorderable #}     (toNotebook self)@@ -970,7 +970,7 @@ -- -- Note that 2 notebooks must share a common group identificator (see gtk_notebook_set_group_id()) to allow automatic tabs interchange between them. ----- If you want a widget to interact with a notebook through DnD (i.e.: accept dragged tabs from it) it must be set as a drop destination and accept the target "GTK_NOTEBOOK_TAB". +-- If you want a widget to interact with a notebook through DnD (i.e.: accept dragged tabs from it) it must be set as a drop destination and accept the target "GTK_NOTEBOOK_TAB". -- The notebook will fill the selection with a GtkWidget** pointing to the child widget that corresponds to the dropped tab. -- -- If you want a notebook to accept drags from other widgets, you will have to set your own DnD code to do it.@@ -979,7 +979,7 @@ -- notebookSetTabDetachable :: (NotebookClass self, WidgetClass child) => self  -> child  -- ^ @child@ - the child page- -> Bool  -- ^ @detachable@ - whether the tab is detachable or not + -> Bool  -- ^ @detachable@ - whether the tab is detachable or not  -> IO () notebookSetTabDetachable self child detachable =   {# call notebook_set_tab_detachable #}@@ -993,8 +993,8 @@ -- notebookGetTabDetachable :: (NotebookClass self, WidgetClass child) => self  -> child  -- ^ @child@ - the child page- -> IO Bool  -- ^ return @True@ if the tab is detachable. -notebookGetTabDetachable self child = liftM toBool $ + -> IO Bool  -- ^ return @True@ if the tab is detachable.+notebookGetTabDetachable self child = liftM toBool $   {# call notebook_get_tab_detachable #}     (toNotebook self)     (toWidget child)@@ -1004,7 +1004,7 @@ -- | Sets widget as one of the action widgets. Depending on the pack type the widget will be placed -- before or after the tabs. You can use a 'Box' if you need to pack more than one widget on the same -- side.--- +-- -- Note that action widgets are "internal" children of the notebook and thus not included in the list -- returned from 'containerForeach'. --@@ -1012,7 +1012,7 @@ -- notebookSetActionWidget :: (NotebookClass self, WidgetClass widget) => self                         -> widget-                        -> PackType -- ^ @packType@ pack type of the action widget +                        -> PackType -- ^ @packType@ pack type of the action widget                         -> IO () notebookSetActionWidget self widget packType =   {#call gtk_notebook_set_action_widget #}@@ -1138,14 +1138,14 @@ -- -- Default value: @Nothing@ ---notebookChildTabLabel :: (NotebookClass self, WidgetClass child) => child -> Attr self String+notebookChildTabLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string notebookChildTabLabel = newAttrFromContainerChildStringProperty "tab-label"  -- | The string displayed in the child's menu entry. -- -- Default value: @Nothing@ ---notebookChildMenuLabel :: (NotebookClass self, WidgetClass child) => child -> Attr self String+notebookChildMenuLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string notebookChildMenuLabel = newAttrFromContainerChildStringProperty "menu-label"  -- | The index of the child in the parent.@@ -1313,7 +1313,7 @@ pageAdded :: NotebookClass self => Signal self (Widget -> Int -> IO ()) pageAdded = Signal (connect_OBJECT_INT__NONE "page-added") #endif-  + -- * Deprecated #ifndef DISABLE_DEPRECATED @@ -1322,11 +1322,11 @@ -- onSwitchPage, afterSwitchPage :: NotebookClass nb => nb -> (Int -> IO ()) ->                                  IO (ConnectId nb)-onSwitchPage nb fun = connect_BOXED_WORD__NONE "switch-page" -		      (const $ return ()) False nb -		      (\_ page -> fun (fromIntegral page))-afterSwitchPage nb fun = connect_BOXED_WORD__NONE "switch-page" -			 (const $ return ()) True nb -			 (\_ page -> fun (fromIntegral page))+onSwitchPage nb fun = connect_BOXED_WORD__NONE "switch-page"+                      (const $ return ()) False nb+                      (\_ page -> fun (fromIntegral page))+afterSwitchPage nb fun = connect_BOXED_WORD__NONE "switch-page"+                         (const $ return ()) True nb+                         (\_ page -> fun (fromIntegral page))  #endif
Graphics/UI/Gtk/Layout/Overlay.chs view
@@ -24,11 +24,11 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) ----- A simple container that can display overlayed widgets+-- A simple container that can display overlaid widgets -- module Graphics.UI.Gtk.Layout.Overlay ( -- * Detail--- +-- -- | The Overlay widget is a Bin widget where widgets can be added as overlay of the bin widget.  -- * Class Hierarchy@@ -53,10 +53,10 @@   overlayAdd   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
+ Graphics/UI/Gtk/Layout/Stack.chs view
@@ -0,0 +1,426 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) Widgets Stack+--+--  Author : Moritz Schulte+--+--  Created: 27 April 2016+--+--  Copyright (C) 2015 Moritz Schulte+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- A widget which controls the alignment and size of its child+--+module Graphics.UI.Gtk.Layout.Stack (+-- * Detail+--+-- The 'Stack' widget is a container which only shows one of its+-- children at a time. In contrast to 'Notebook', 'Stack' does not+-- provide a means for users to change the visible child. Instead, the+-- 'StackSwitcher' widget can be used with 'Stack' to provide this+-- functionality.+--+-- Transitions between pages can be animated as slides or fades. This+-- can be controlled with 'stackSetTransitionType'. These+-- animations respect the 'gtk-enable-animations' setting.+--       +-- The GtkStack widget was added in GTK+ 3.10.+--+-- * Class Hierarchy+-- |+-- @+-- |  'GObject'+-- |   +----'Object'+-- |         +----'Widget'+-- |               +----'Container'+-- |                     +----'Stack'+-- @++-- * Types+#if GTK_CHECK_VERSION(3,12,0)+         Stack+       , castToStack+       , gTypeStack+       , toStack+       , StackTransitionType(..)+-- * Constructors+       , stackNew++-- * Methods+       , stackAddNamed+       , stackAddTitled+       , stackGetTransitionType+       , stackSetTransitionType+       , stackSetTransitionDuration+       , stackGetTransitionDuration+       , stackGetChildByName+       , stackSetVisibleChild+       , stackSetVisibleChildName+       , stackGetVisibleChildName+       , stackSetVisibleChildFull+#if GTK_CHECK_VERSION(3,16,0)+       , stackSetHomogeneous+       , stackGetHomogeneous+       , stackSetHhomogeneous+       , stackGetHhomogeneous+       , stackSetVhomogeneous+       , stackGetVhomogeneous+#endif+       , stackGetTransitionRunning+#if GTK_CHECK_VERSION(3,18,0)+       , stackSetInterpolateSize+       , stackGetInterpolateSize+#endif++-- * Attributes+#if GTK_CHECK_VERSION(3,16,0)+       , stackHhomogeneous+       , stackHomogeneous+#endif+#if GTK_CHECK_VERSION(3,18,0)+       , stackInterpolateSize+#endif+       , stackTransitionDuration+       , stackTransitionRunning+       , stackTransitionType+#if GTK_CHECK_VERSION(3,16,0)+       , stackVhomogeneous+#endif+       , stackVisibleChild+       , stackVisibleChildName+#endif+) where++#if GTK_CHECK_VERSION(3,12,0)++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.Enums    (StackTransitionType(..))+{#import Graphics.UI.Gtk.Types#}++{# context lib="gtk" prefix="gtk" #}++--------------------+-- Constructors++-- | Creates a new 'Stack' container.+--+stackNew :: IO Stack+stackNew =+  makeNewObject mkStack $+  liftM (castPtr :: Ptr Widget -> Ptr Stack) $+  {# call unsafe stack_new #}++--------------------+-- Methods++-- | Adds a child to stack . The child is identified by the name.+stackAddNamed :: (StackClass self, WidgetClass child, GlibString name) => self+ -> child+ -> name+ -> IO ()+stackAddNamed self child name =+  withUTFString name $ \namePtr ->+    {# call stack_add_named  #}+      (toStack self)+      (toWidget child)+      namePtr++-- | Adds a child to stack. The child is identified by the name. The+-- title will be used by 'StackSwitcher' to represent child in a tab+-- bar, so it should be short.+stackAddTitled :: (StackClass self, WidgetClass child,+                   GlibString name, GlibString title) => self+ -> child+ -> name+ -> title+ -> IO ()+stackAddTitled self child name title =+  withUTFString name $ \namePtr ->+    withUTFString title $ \titlePtr ->+      {# call stack_add_titled  #}+        (toStack self)+        (toWidget child)+        namePtr+        titlePtr++-- | Sets the type of animation that will be used for transitions+-- between pages in stack . Available types include various kinds of+-- fades and slides. The transition type can be changed without+-- problems at runtime, so it is possible to change the animation+-- based on the page that is about to become current.+stackSetTransitionType :: StackClass self => self+ -> StackTransitionType+ -> IO ()+stackSetTransitionType self transitionType =+  {# call unsafe stack_set_transition_type #}+    (toStack self)+    (fromIntegral $ fromEnum transitionType)++-- | Gets the type of animation that will be used for transitions+-- between pages in stack.+stackGetTransitionType :: StackClass self => self+ -> IO StackTransitionType+stackGetTransitionType self =+  liftM (toEnum . fromIntegral) $+  {# call unsafe stack_get_transition_type #}+    (toStack self)++-- | Sets the duration that transitions between pages in stack will+-- take.+stackSetTransitionDuration :: StackClass self => self+ -> Int+ -> IO ()+stackSetTransitionDuration self duration =+  {# call unsafe stack_set_transition_duration #}+    (toStack self)+    (fromIntegral duration)++-- | Returns the amount of time (in milliseconds) that transitions+-- between pages in stack will take.+stackGetTransitionDuration :: StackClass self => self+ -> IO Int+stackGetTransitionDuration self =+  liftM fromIntegral $+  {# call unsafe stack_get_transition_duration #}+    (toStack self)++-- | Finds the child of the GtkStack with the name given as the+-- argument. Returns Nothing if there is no child with this name.+stackGetChildByName :: (StackClass self, GlibString name) => self+ -> name+ -> IO Widget+stackGetChildByName self name =+  withUTFString name $ \namePtr ->+    makeNewObject mkWidget $+    {# call unsafe stack_get_child_by_name #}+      (toStack self)+      namePtr++-- | Gets Just the currently visible child of stack, or Nothing if+-- there are no visible children.+stackGetVisibleChild :: StackClass self => self+ -> IO (Maybe Widget)+stackGetVisibleChild self =+  maybeNull (makeNewObject mkWidget) $+  {# call unsafe stack_get_visible_child #}+    (toStack self)++-- | Makes child the visible child of stack. If child is different+-- from the currently visible child, the transition between the two+-- will be animated with the current transition type of stack. Note+-- that the child widget has to be visible itself (see 'widgetShow')+-- in order to become the visible child of stack.+stackSetVisibleChild :: (StackClass self, WidgetClass child) => self+ -> child+ -> IO ()+stackSetVisibleChild self child =+    {# call unsafe stack_set_visible_child #}+      (toStack self)+      (toWidget child)++-- | Makes the child with the given name visible.  If child is+-- different from the currently visible child, the transition between+-- the two will be animated with the current transition type of stack.+-- Note that the child widget has to be visible itself (see+-- `widgetShow') in order to become the visible child of stack.+stackSetVisibleChildName :: (StackClass self, GlibString name) => self+ -> name+ -> IO ()+stackSetVisibleChildName self name =+  withUTFString name $ \namePtr ->+    {# call unsafe stack_set_visible_child_name #}+      (toStack self)+      namePtr++-- | Returns the name of the currently visible child of stack, or+-- Nothing if there is no visible child.+stackGetVisibleChildName :: (StackClass self, GlibString name) => self+ -> IO (Maybe name)+stackGetVisibleChildName self =+  {# call unsafe stack_get_visible_child_name #}+      (toStack self)+  >>= maybePeekUTFString++-- | Makes the child with the given name visible.  Note that the child+-- widget has to be visible itself (see 'widgetShow') in order to+-- become the visible child of stack .+stackSetVisibleChildFull :: (StackClass self, GlibString name) => self+ -> name+ -> StackTransitionType+ -> IO ()+stackSetVisibleChildFull self name transitionType =+  withUTFString name $ \namePtr ->+    {# call unsafe stack_set_visible_child_full #}+      (toStack self)+      namePtr+      (fromIntegral $ fromEnum transitionType)++#if GTK_CHECK_VERSION(3,16,0)+-- | Sets the stack to be homogeneous or not. If it is homogeneous,+-- the stack will request the same size for all its children. If it+-- isn't, the stack may change size when a different child becomes+-- visible.+stackSetHomogeneous :: StackClass self => self -> Bool -> IO ()+stackSetHomogeneous self homogeneous =+  {# call stack_set_homogeneous #}+    (toStack self)+    (fromBool homogeneous)++-- | Gets whether stack is homogeneous. See 'stackSetHomogeneous'.+stackGetHomogeneous :: StackClass self => self -> IO Bool+stackGetHomogeneous self =+  liftM toBool $+  {# call stack_get_homogeneous #}+    (toStack self)++-- | Sets the stack to be horizontally homogeneous or not. If it is+-- homogeneous, the stack will request the same width for all its+-- children. If it isn't, the stack may change width when a different+-- child becomes visible.+stackSetHhomogeneous :: StackClass self => self -> Bool -> IO ()+stackSetHhomogeneous self hhomogeneous =+  {# call stack_set_hhomogeneous #}+    (toStack self)+    (fromBool hhomogeneous)++-- | Gets whether stack is horizontally homogeneous. See+-- 'stackSetHhomogeneous'.+stackGetHhomogeneous :: StackClass self => self -> IO Bool+stackGetHhomogeneous self =+  liftM toBool $+  {# call stack_get_hhomogeneous #}+    (toStack self)++-- | Sets the stack to be vertically homogeneous or not. If it is+-- homogeneous, the stack will request the same height for all its+-- children. If it isn't, the stack may change height when a different+-- child becomes visible.+stackSetVhomogeneous :: StackClass self => self -> Bool -> IO ()+stackSetVhomogeneous self vhomogeneous =+  {# call stack_set_vhomogeneous #}+    (toStack self)+    (fromBool vhomogeneous)++-- | Gets whether stack is vertically homogeneous. See+-- 'stackSetVhomogeneous'.+stackGetVhomogeneous :: StackClass self => self -> IO Bool+stackGetVhomogeneous self =+  liftM toBool $+  {# call stack_get_vhomogeneous #}+    (toStack self)+#endif++-- | Returns whether the stack is currently in a transition from one+-- page to another.+stackGetTransitionRunning :: StackClass self => self -> IO Bool+stackGetTransitionRunning self =+  liftM toBool $+  {# call stack_get_transition_running #}+    (toStack self)++#if GTK_CHECK_VERSION(3,18,0)+-- | Returns whether the stack is set up to interpolate between the+-- sizes of children on page switch.+stackGetInterpolateSize :: StackClass self => self -> IO Bool+stackGetInterpolateSize self =+  liftM toBool $+  {# call stack_get_interpolate_size #}+    (toStack self)++-- | Sets whether or not the stack will interpolate its size when+-- changing the visible child. If the 'interpolate-size' property is+-- set to True, stack will interpolate its size between the current+-- one and the one it'll take after changing the visible child,+-- according to the set transition duration.+stackSetInterpolateSize :: StackClass self => self -> Bool -> IO ()+stackSetInterpolateSize self interpolateSize =+  {# call stack_set_interpolate_size #}+    (toStack self)+    (fromBool interpolateSize)+#endif++--------------------+-- Attributes++#if GTK_CHECK_VERSION(3,16,0)+-- | True if the stack allocates the same width for all children.+stackHhomogeneous :: StackClass self => Attr self Bool+stackHhomogeneous = newAttr+  stackGetHhomogeneous+  stackSetHhomogeneous++-- | Homogeneous sizing.+stackHomogeneous :: StackClass self => Attr self Bool+stackHomogeneous = newAttr+  stackGetHomogeneous+  stackSetHomogeneous+#endif++#if GTK_CHECK_VERSION(3,18,0)+-- | Whether or not the size should smoothly change when changing+-- between differently sized children.+stackInterpolateSize :: StackClass self => Attr self Bool+stackInterpolateSize = newAttr+  stackGetInterpolateSize+  stackSetInterpolateSize+#endif++-- | The animation duration, in milliseconds.+stackTransitionDuration :: StackClass self => Attr self Int+stackTransitionDuration = newAttr+  stackGetTransitionDuration+  stackSetTransitionDuration++-- | Whether or not the transition is currently running.+stackTransitionRunning :: StackClass self => ReadAttr self Bool+stackTransitionRunning = readAttr+  stackGetTransitionRunning++-- | The type of animation used to transition.+stackTransitionType :: StackClass self => Attr self StackTransitionType+stackTransitionType = newAttr+  stackGetTransitionType+  stackSetTransitionType++#if GTK_CHECK_VERSION(3,16,0)+-- | True if the stack allocates the same height for all children.+stackVhomogeneous :: StackClass self => Attr self Bool+stackVhomogeneous = newAttr+  stackGetVhomogeneous+  stackSetVhomogeneous+#endif++-- | The widget currently visible in the stack.+stackVisibleChild :: StackClass self =>+  ReadWriteAttr self (Maybe Widget) Widget+stackVisibleChild = newAttr+  stackGetVisibleChild+  stackSetVisibleChild++-- | The name of the widget currently visible in the stack.+stackVisibleChildName :: StackClass self => ReadWriteAttr self (Maybe String) String+stackVisibleChildName = newAttr+  stackGetVisibleChildName+  stackSetVisibleChildName++#endif
+ Graphics/UI/Gtk/Layout/StackSwitcher.chs view
@@ -0,0 +1,124 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) Widgets StackSwitcher+--+--  Author : Moritz Schulte+--+--  Created: 27 April 2016+--+--  Copyright (C) 2016 Moritz Schulte+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- A widget which controls the alignment and size of its child+--+module Graphics.UI.Gtk.Layout.StackSwitcher (+-- * Detail+--+-- [...]+--+-- * Class Hierarchy+-- |+-- @+-- |  'GObject'+-- |   +----'Object'+-- |         +----'Widget'+-- |               +----'Container'+-- |                     +----'Box'+-- |                           +----'StackSwitcher'+-- @++-- * Types+#if GTK_CHECK_VERSION(3,10,0)+    StackSwitcher+  , castToStackSwitcher+  , gTypeStackSwitcher+  , toStackSwitcher++-- * Constructors+  , stackSwitcherNew++-- * Methods+  , stackSwitcherSetStack+  , stackSwitcherGetStack++-- * Attributes+  , stackSwitcherIconSize+  , stackSwitcherStack+#endif+) where++#if GTK_CHECK_VERSION(3,10,0)++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" #}++--------------------+-- Constructors++-- | Creates a new 'StackSwitcher'.+--+stackSwitcherNew :: IO StackSwitcher+stackSwitcherNew =+  makeNewObject mkStackSwitcher $+  liftM (castPtr :: Ptr Widget -> Ptr StackSwitcher) $+  {# call unsafe stack_switcher_new #}++--------------------+-- Methods++-- | Sets the stack to control.+stackSwitcherSetStack :: (StackSwitcherClass self, StackClass stack) => self+ -> stack+ -> IO ()+stackSwitcherSetStack self stack =+  {# call stack_switcher_set_stack #}+    (toStackSwitcher self)+    (toStack stack)++-- | Retrieves the stack.+stackSwitcherGetStack :: StackSwitcherClass self => self+ -> IO (Maybe Stack)+stackSwitcherGetStack self =+  maybeNull (makeNewObject mkStack) $+  {# call stack_switcher_get_stack #}+    (toStackSwitcher self)++--------------------+-- Attributes++-- | Use the "icon-size" property to change the size of the image+-- displayed when a GtkStackSwitcher is displaying icons.+--+-- Default value: @1@+--+stackSwitcherIconSize :: StackSwitcherClass self => Attr self Int+stackSwitcherIconSize = newAttrFromIntProperty "icon-size"++-- | The 'Stack' controlled by this 'StackSwitcher'.+--+stackSwitcherStack :: (StackSwitcherClass self, StackClass stack) =>+  ReadWriteAttr self (Maybe Stack) (Maybe stack)+stackSwitcherStack = newAttrFromMaybeObjectProperty "stack" gTypeContainer++#endif
Graphics/UI/Gtk/Layout/Table.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Table ( -- * Detail--- +-- -- | The 'Table' functions allow the programmer to arrange widgets in rows and -- columns, making it easy to align many widgets next to each other, -- horizontally and vertically.@@ -103,15 +103,15 @@   tableChildYPadding,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Flags		(fromFlags)+import System.Glib.Flags                (fromFlags) import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(AttachOptions(..))+import Graphics.UI.Gtk.General.Enums    (AttachOptions(..)) import Graphics.UI.Gtk.Abstract.ContainerChildProperties  {# context lib="gtk" prefix="gtk" #}@@ -124,7 +124,7 @@ -- can be changed later with 'tableResize'. @rows@ and @columns@ must both be -- in the range 0 .. 65535. ---tableNew :: +tableNew ::     Int      -- ^ @rows@ - The number of rows the new table should have.  -> Int      -- ^ @columns@ - The number of columns the new table should have.  -> Bool     -- ^ @homogeneous@ - If set to @True@, all table cells are@@ -309,7 +309,7 @@   {# call unsafe table_get_default_col_spacing #}     (toTable self) --- | Changes the homogenous property of table cells, ie. whether all cells are+-- | Changes the homogeneous property of table cells, ie. whether all cells are -- an equal size or not. -- tableSetHomogeneous :: TableClass self => self@@ -349,7 +349,7 @@   rows <- peek rowsPtr   columns <- peek columnsPtr   return (fromIntegral rows, fromIntegral columns)-  + #endif  --------------------
Graphics/UI/Gtk/Layout/VBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.VBox ( -- * Detail--- +-- -- | 'VBox' is a container that organizes child widgets into a single column. -- -- Use the 'Box' packing interface to determine the arrangement, spacing,@@ -59,10 +59,10 @@   vBoxNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -72,7 +72,7 @@  -- | Creates a new 'VBox'. ---vBoxNew :: +vBoxNew ::     Bool    -- ^ @homogeneous@ - @True@ if all children are to be given equal             -- space allotments.  -> Int     -- ^ @spacing@ - the number of pixels to place by default between
Graphics/UI/Gtk/Layout/VButtonBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.VButtonBox ( -- * Detail--- +-- -- | A button box should be used to provide a consistent layout of buttons -- throughout your application. The layout\/spacing can be altered by the -- programmer, or if desired, by the user to alter the \'feel\' of a program to
Graphics/UI/Gtk/Layout/VPaned.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.VPaned ( -- * Detail--- +-- -- | The VPaned widget is a container widget with two children arranged -- vertically. The division between the two panes is adjustable by the user by -- dragging a handle. See 'Paned' for details.@@ -53,10 +53,10 @@   vPanedNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/MenuComboToolbar/CheckMenuItem.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem ( -- * Detail--- +-- -- | A 'CheckMenuItem' is a menu item that maintains the state of a boolean -- value in addition to a 'MenuItem's usual role in activating application -- code.@@ -82,12 +82,12 @@   checkMenuItemToggled   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Types#} @@ -106,8 +106,8 @@  -- | Creates a new 'CheckMenuItem' with a label. ---checkMenuItemNewWithLabel :: -    String           -- ^ @label@ - the string to use for the label.+checkMenuItemNewWithLabel :: GlibString string+ => string           -- ^ @label@ - the string to use for the label.  -> IO CheckMenuItem checkMenuItemNewWithLabel label =   makeNewObject mkCheckMenuItem $@@ -120,8 +120,8 @@ -- created using 'Graphics.UI.Gtk.Display.Label.labelNewWithMnemonic', so -- underscores in @label@ indicate the mnemonic for the menu item. ---checkMenuItemNewWithMnemonic :: -    String           -- ^ @label@ - The text of the button, with an underscore+checkMenuItemNewWithMnemonic :: GlibString string+ => string           -- ^ @label@ - The text of the button, with an underscore                      -- in front of the mnemonic character  -> IO CheckMenuItem checkMenuItemNewWithMnemonic label =@@ -173,7 +173,7 @@     (toCheckMenuItem self)     (fromBool setting) --- | Query if the menu check is drawn as inconsistent (inbetween). See+-- | Query if the menu check is drawn as inconsistent (in between). See -- 'checkMenuItemSetInconsistent'. -- checkMenuItemGetInconsistent :: CheckMenuItemClass self => self -> IO Bool
Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs view
@@ -68,6 +68,7 @@   ComboBoxClass,   castToComboBox, gTypeComboBox,   toComboBox,+  ComboBoxText,  -- * Constructors   comboBoxNew,@@ -151,7 +152,7 @@  -- * Signals   changed,-  + -- * Deprecated #ifndef DISABLE_DEPRECATED   onChanged,@@ -161,29 +162,25 @@   ) where  import Control.Monad    (liftM)+import Data.Text (Text)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)-import System.Glib.GObject              (makeNewGObject,-                                         destroyFunPtr,-                                         Quark, objectSetAttribute, objectGetAttributeUnsafe ) {#import Graphics.UI.Gtk.Types#} hiding (ListStore)-{#import Graphics.UI.Gtk.ModelView.Types#} (TypedTreeModelClass,-                                            TreeIter,-                                            receiveTreeIter,+{#import Graphics.UI.Gtk.ModelView.Types#} (receiveTreeIter,                                             comboQuark) {#import Graphics.UI.Gtk.Signals#}-{#import Graphics.UI.Gtk.ModelView.CustomStore#} -{#import Graphics.UI.Gtk.ModelView.TreeModel#} +{#import Graphics.UI.Gtk.ModelView.CustomStore#}+{#import Graphics.UI.Gtk.ModelView.TreeModel#} import Graphics.UI.Gtk.ModelView.ListStore ( ListStore, listStoreNew,   listStoreInsert, listStorePrepend, listStoreAppend, listStoreRemove,-  listStoreGetValue )+  listStoreSafeGetValue ) import Graphics.UI.Gtk.ModelView.CellLayout ( cellLayoutSetAttributes,                                               cellLayoutPackStart, cellLayoutClear )-import Graphics.UI.Gtk.ModelView.CellRendererText ( cellRendererTextNew, +import Graphics.UI.Gtk.ModelView.CellRendererText ( cellRendererTextNew,                                                     cellText) {# context lib="gtk" prefix="gtk" #} @@ -259,16 +256,18 @@ -- widget and sets the model to the list store. The widget can contain only -- strings. The model can be retrieved with 'comboBoxGetModel'. The list -- store can be retrieved with 'comboBoxGetModelText'.--- Any exisiting model or renderers are removed before setting the new text+-- Any existing model or renderers are removed before setting the new text -- model. -- Note that the functions 'comboBoxAppendText', 'comboBoxInsertText', -- 'comboBoxPrependText', 'comboBoxRemoveText' and 'comboBoxGetActiveText' -- can be called on a combo box only once 'comboBoxSetModelText' is called. ---comboBoxSetModelText :: ComboBoxClass self => self -> IO (ListStore String)+type ComboBoxText = Text++comboBoxSetModelText :: ComboBoxClass self => self -> IO (ListStore ComboBoxText) comboBoxSetModelText combo = do   cellLayoutClear (toComboBox combo)-  store <- listStoreNew ([] :: [String])+  store <- listStoreNew ([] :: [ComboBoxText])   comboBoxSetModel combo (Just store) #if GTK_CHECK_VERSION(2,24,0)   let colId = makeColumnIdString 0@@ -283,7 +282,7 @@  -- | Retrieve the model that was created with 'comboBoxSetModelText'. ---comboBoxGetModelText :: ComboBoxClass self => self -> IO (ListStore String)+comboBoxGetModelText :: ComboBoxClass self => self -> IO (ListStore ComboBoxText) comboBoxGetModelText self = do   (Just store) <- objectGetAttributeUnsafe comboQuark (toComboBox self)   return store@@ -293,11 +292,11 @@ -- you can only use this function with combo boxes constructed with -- 'comboBoxNewText'. Returns the index of the appended text. ---comboBoxAppendText :: ComboBoxClass self => self -> String -> IO Int+comboBoxAppendText :: ComboBoxClass self => self -> ComboBoxText -> IO Int comboBoxAppendText self text = do   store <- comboBoxGetModelText self   listStoreAppend store text-  + -- %hash c:41de d:8ab0 -- | Inserts @string@ at @position@ in the list of strings stored in -- @comboBox@. Note that you can only use this function with combo boxes@@ -305,18 +304,18 @@ -- comboBoxInsertText :: ComboBoxClass self => self  -> Int    -- ^ @position@ - An index to insert @text@.- -> String -- ^ @text@ - A string.+ -> ComboBoxText -- ^ @text@ - A string.  -> IO () comboBoxInsertText self position text = do   store <- comboBoxGetModelText self   listStoreInsert store position text-  + -- %hash c:98ea d:9fab -- | Prepends @string@ to the list of strings stored in @comboBox@. Note that -- you can only use this function with combo boxes constructed with -- 'comboBoxNewText'. ---comboBoxPrependText :: ComboBoxClass self => self -> String -> IO ()+comboBoxPrependText :: ComboBoxClass self => self -> ComboBoxText -> IO () comboBoxPrependText self text = do   store <- comboBoxGetModelText self   listStorePrepend store text@@ -336,15 +335,14 @@ -- selected. Note that you can only use this function with combo boxes -- constructed with 'comboBoxNewText'. ---comboBoxGetActiveText :: ComboBoxClass self => self -> IO (Maybe String)+comboBoxGetActiveText :: ComboBoxClass self => self -> IO (Maybe ComboBoxText) comboBoxGetActiveText self = do   activeId <- comboBoxGetActive self   if activeId < 0     then return Nothing     else do       listStore <- comboBoxGetModelText self-      value <- listStoreGetValue listStore activeId-      return $ Just value+      listStoreSafeGetValue listStore activeId  #if GTK_CHECK_VERSION(2,6,0) -- %hash d:566e@@ -576,8 +574,8 @@ -- -- * Available since Gtk+ version 2.10 ---comboBoxSetTitle :: ComboBoxClass self => self- -> String -- ^ @title@ - a title for the menu in tearoff mode.+comboBoxSetTitle :: (ComboBoxClass self, GlibString string) => self+ -> string -- ^ @title@ - a title for the menu in tearoff mode.  -> IO () comboBoxSetTitle self title =   withUTFString title $ \titlePtr ->@@ -591,8 +589,8 @@ -- -- * Available since Gtk+ version 2.10 ---comboBoxGetTitle :: ComboBoxClass self => self- -> IO String -- ^ returns the menu's title in tearoff mode.+comboBoxGetTitle :: (ComboBoxClass self, GlibString string) => self+ -> IO string -- ^ returns the menu's title in tearoff mode. comboBoxGetTitle self =   {# call gtk_combo_box_get_title #}     (toComboBox self)@@ -613,7 +611,7 @@  -- | Sets the model column which combo_box should use to get strings from --   to be @textColumn@. The column text_column in the model of @comboBox@---   must be of type String.+--   must be of type ComboBoxText. -- --   This is only relevant if @comboBox@ has been created with "has-entry" --   as True.@@ -621,7 +619,7 @@ -- * Available since Gtk+ version 2.24 -- comboBoxSetEntryTextColumn :: ComboBoxClass comboBox => comboBox- -> ColumnId row String -- ^ @textColumn@ - A column in model to get the strings from for the internal entry.+ -> ColumnId row ComboBoxText -- ^ @textColumn@ - A column in model to get the strings from for the internal entry.  -> IO () comboBoxSetEntryTextColumn comboBox textColumn =   {# call gtk_combo_box_set_entry_text_column #}@@ -634,7 +632,7 @@ -- * Available since Gtk+ version 2.24 -- comboBoxGetEntryTextColumn :: ComboBoxClass comboBox => comboBox- -> IO (ColumnId row String) -- ^ returns a column in the data source model of @comboBox@.+ -> IO (ColumnId row ComboBoxText) -- ^ returns a column in the data source model of @comboBox@. comboBoxGetEntryTextColumn comboBox =   liftM (makeColumnIdString . fromIntegral) $   {# call gtk_combo_box_get_entry_text_column #}@@ -775,7 +773,7 @@ -- -- * Available since Gtk+ version 2.10 ---comboBoxTearoffTitle :: ComboBoxClass self => Attr self String+comboBoxTearoffTitle :: (ComboBoxClass self, GlibString string) => Attr self string comboBoxTearoffTitle = newAttrFromStringProperty "tearoff-title"  -- %hash c:efa9 d:89e5@@ -794,7 +792,7 @@ -- -- * Available since Gtk+ version 2.10 ---comboBoxTitle :: ComboBoxClass self => Attr self String+comboBoxTitle :: (ComboBoxClass self, GlibString string) => Attr self string comboBoxTitle = newAttr   comboBoxGetTitle   comboBoxSetTitle
Graphics/UI/Gtk/MenuComboToolbar/ImageMenuItem.chs view
@@ -31,7 +31,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.ImageMenuItem ( -- * Detail--- +-- -- | A 'ImageMenuItem' is a menu item which has an icon next to the text -- label. --@@ -71,12 +71,12 @@   imageMenuItemImage,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.StockItems @@ -96,7 +96,7 @@ -- | Creates a new 'ImageMenuItem' containing the image and text from a stock -- item. ---imageMenuItemNewFromStock :: +imageMenuItemNewFromStock ::     StockId          -- ^ @stockId@ - the name of the stock item.  -> IO ImageMenuItem imageMenuItemNewFromStock stockId =@@ -109,8 +109,8 @@  -- | Creates a new 'ImageMenuItem' containing a label. ---imageMenuItemNewWithLabel :: -    String           -- ^ @label@ - the text of the menu item.+imageMenuItemNewWithLabel :: GlibString string+ => string           -- ^ @label@ - the text of the menu item.  -> IO ImageMenuItem imageMenuItemNewWithLabel label =   makeNewObject mkImageMenuItem $@@ -123,8 +123,8 @@ -- created using 'Graphics.UI.Gtk.Display.Label.labelNewWithMnemonic', so -- underscores in @label@ indicate the mnemonic for the menu item. ---imageMenuItemNewWithMnemonic :: -    String           -- ^ @label@ - the text of the menu item, with an+imageMenuItemNewWithMnemonic :: GlibString string+ => string           -- ^ @label@ - the text of the menu item, with an                      -- underscore in front of the mnemonic character  -> IO ImageMenuItem imageMenuItemNewWithMnemonic label =
Graphics/UI/Gtk/MenuComboToolbar/Menu.chs view
@@ -25,8 +25,8 @@ -- -- The function menuPopup at a specific position is difficult to bind: --   The callback function that determines at which position the menu is---   to be shown is keept after the call returns. Maybe we could destroy---   this function pointer with a destory event?+--   to be shown is kept after the call returns. Maybe we could destroy+--   this function pointer with a destroy event? -- -- | -- Maintainer  : gtk2hs-users@lists.sourceforge.net@@ -37,7 +37,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.Menu ( -- * Detail--- +-- -- | A 'Menu' is a 'MenuShell' that implements a drop down menu consisting of -- a list of 'MenuItem' objects which can be navigated and activated by the -- user to perform application functions.@@ -114,7 +114,7 @@   menuChildBottomAttach,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import Data.Maybe  (fromMaybe)  import System.Glib.FFI@@ -122,8 +122,7 @@ import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(makeNewGObject)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Abstract.ContainerChildProperties import Graphics.UI.Gtk.Gdk.Events (MouseButton, TimeStamp)@@ -157,7 +156,7 @@     (toWidget child)     (fromIntegral position) --- | Popup a context menu where a button press occurred. +-- | Popup a context menu where a button press occurred. -- -- * This function must be called in response to a button click. It opens --   the given menu at a place determined by the last emitted event (hence@@ -216,7 +215,7 @@ -- its immediate children, its menu items, can be constructed. The main purpose -- of this function is to spare the programmer the inconvenience of having to -- call 'menuItemSetAccelPath' on each menu item that should support runtime--- user changable accelerators. Instead, by just calling 'menuSetAccelPath' on+-- user changeable accelerators. Instead, by just calling 'menuSetAccelPath' on -- their parent, each menu item of this menu, that contains a label describing -- its purpose, automatically gets an accel path assigned. --@@ -232,8 +231,8 @@ -- accelerators at runtime. More details about accelerator paths and their -- default setups can be found at 'accelMapAddEntry'. ---menuSetAccelPath :: MenuClass self => self- -> String -- ^ @accelPath@ - a valid accelerator path+menuSetAccelPath :: (MenuClass self, GlibString string) => self+ -> string -- ^ @accelPath@ - a valid accelerator path  -> IO () menuSetAccelPath self accelPath =   withUTFString accelPath $ \accelPathPtr ->@@ -244,7 +243,7 @@ -- | Sets the title string for the menu. The title is displayed when the menu -- is shown as a tearoff menu. ---menuSetTitle :: MenuClass self => self -> String -> IO ()+menuSetTitle :: (MenuClass self, GlibString string) => self -> string -> IO () menuSetTitle self title =   withUTFString title $ \titlePtr ->   {# call unsafe menu_set_title #}@@ -253,8 +252,8 @@  -- | Returns the title of the menu. See 'menuSetTitle'. ---menuGetTitle :: MenuClass self => self- -> IO (Maybe String) -- ^ returns the title of the menu, or @Nothing@ if the+menuGetTitle :: (MenuClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns the title of the menu, or @Nothing@ if the                       -- menu has no title set on it. menuGetTitle self =   {# call unsafe menu_get_title #}@@ -344,7 +343,7 @@ menuGetAttachWidget :: MenuClass self => self -> IO (Maybe Widget) menuGetAttachWidget self = do   wPtr <- {#call unsafe menu_get_attach_widget#} (toMenu self)-  if wPtr==nullPtr then return Nothing else liftM Just $ +  if wPtr==nullPtr then return Nothing else liftM Just $     makeNewObject mkWidget (return wPtr)  #if GTK_CHECK_VERSION(2,2,0)@@ -412,7 +411,7 @@ -- -- * Available since Gtk+ version 2.6 ---menuGetForAttachWidget :: WidgetClass widget => +menuGetForAttachWidget :: WidgetClass widget =>     widget                  -- ^ @widget@ - a 'Widget'  -> IO [Menu] menuGetForAttachWidget widget =@@ -430,7 +429,7 @@ -- -- Default value: \"\" ---menuTitle :: MenuClass self => Attr self String+menuTitle :: (MenuClass self, GlibString string) => Attr self string menuTitle = newAttrFromStringProperty "tearoff-title"  #if GTK_CHECK_VERSION(2,6,0)
Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.MenuBar ( -- * Detail--- +-- -- | The 'MenuBar' is a subclass of 'MenuShell' which contains one to many -- 'MenuItem'. The result is a standard menu bar which can hold many menu -- items.@@ -70,11 +70,11 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Widget MenuItem --@@ -26,7 +27,7 @@ -- -- TODO ----- figure out what the signals \"toggle-size-allocate\" and +-- figure out what the signals \"toggle-size-allocate\" and --   \"toggle-size-request\" are good for and bind them if useful -- -- figure out if the connectToToggle signal is useful at all@@ -40,12 +41,12 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.MenuItem ( -- * Detail--- --- | The 'MenuItem' widget and the derived widgets are the only valid childs+--+-- | The 'MenuItem' widget and the derived widgets are the only valid children -- for menus. Their function is to correctly handle highlighting, alignment, -- events and submenus. ----- As it derives from 'Bin' it can hold any valid child widget, altough only+-- As it derives from 'Bin' it can hold any valid child widget, although only -- a few are really useful.  -- * Class Hierarchy@@ -126,12 +127,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -150,8 +151,8 @@  -- | Creates a new 'MenuItem' whose child is a 'Label'. ---menuItemNewWithLabel :: -    String      -- ^ @label@ - the text for the label+menuItemNewWithLabel :: GlibString string+ => string      -- ^ @label@ - the text for the label  -> IO MenuItem menuItemNewWithLabel label =   makeNewObject mkMenuItem $@@ -164,8 +165,8 @@ -- using 'labelNewWithMnemonic', so underscores in @label@ indicate the -- mnemonic for the menu item. ---menuItemNewWithMnemonic :: -    String      -- ^ @label@ - The text of the label, with an underscore in+menuItemNewWithMnemonic :: GlibString string+ => string      -- ^ @label@ - The text of the label, with an underscore in                 -- front of the mnemonic character  -> IO MenuItem menuItemNewWithMnemonic label =@@ -180,12 +181,12 @@ #if GTK_CHECK_VERSION(2,16,0) -- | Sets text on the MenuItem label -menuItemSetLabel :: (MenuItemClass self) => self -> String -> IO ()+menuItemSetLabel :: (MenuItemClass self, GlibString string) => self -> string -> IO () menuItemSetLabel self label =   withUTFString label $ {# call gtk_menu_item_set_label #} (toMenuItem self)  -- | Gets text on the MenuItem label-menuItemGetLabel :: (MenuItemClass self) => self -> IO String+menuItemGetLabel :: (MenuItemClass self, GlibString string) => self -> IO string menuItemGetLabel self =   {# call gtk_menu_item_get_label #}     (toMenuItem self)@@ -281,7 +282,7 @@  -- | Set the accelerator path on the menu item, through which runtime changes of -- the menu item's accelerator caused by the user can be identified and saved--- to persistant storage (see 'accelMapSave' on this). To setup a default+-- to persistent storage (see 'accelMapSave' on this). To setup a default -- accelerator for this menu item, call 'accelMapAddEntry' with the same accel -- path. See also 'accelMapAddEntry' on the specifics of accelerator paths, and -- 'menuSetAccelPath' for a more convenient variant of this function.@@ -293,8 +294,8 @@ -- Note that you do need to set an accelerator on the parent menu with -- 'menuSetAccelGroup' for this to work. ---menuItemSetAccelPath :: MenuItemClass self => self- -> Maybe String -- ^ @accelPath@ - accelerator path, corresponding to this+menuItemSetAccelPath :: (MenuItemClass self, GlibString string) => self+ -> Maybe string -- ^ @accelPath@ - accelerator path, corresponding to this                  -- menu item's functionality, or @Nothing@ to unset the                  -- current path.  -> IO ()@@ -325,12 +326,12 @@ #if GTK_CHECK_VERSION(2,16,0) -- | \'label\' property. See 'menuItemSetLabel' and 'menuItemGetLabel' ---menuItemLabel :: MenuItemClass self => Attr self String+menuItemLabel :: (MenuItemClass self, GlibString string) => Attr self string menuItemLabel = newAttr   menuItemGetLabel   menuItemSetLabel --- | \'useUnderline\' property. See 'menuItemSetUseUnderline' and +-- | \'useUnderline\' property. See 'menuItemSetUseUnderline' and -- 'menuItemGetUseEUnderline' -- menuItemUseUnderline :: MenuItemClass self => Attr self Bool
Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.MenuShell ( -- * Detail--- +-- -- | A 'MenuShell' is the abstract base class used to derive the 'Menu' and -- 'MenuBar' subclasses. --@@ -92,13 +92,13 @@   afterSelectionDone   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Enums	(MenuDirectionType(..))+import Graphics.UI.Gtk.General.Enums    (MenuDirectionType(..))  {# context lib="gtk" prefix="gtk" #} @@ -219,7 +219,7 @@ -- to submenus whenever a submenu is popped up, so you don't have to worry -- about recursively setting it for your entire menu hierarchy. Only when -- programmatically picking a submenu and popping it up manually, the--- @takeFocus@ property of the submenu needs to be set explicitely.+-- @takeFocus@ property of the submenu needs to be set explicitly. -- -- Note that setting it to @False@ has side-effects: --
Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.MenuToolButton ( -- * Detail--- +-- -- | A 'MenuToolButton' is a 'ToolItem' that contains a button and a small -- additional button with an arrow. When clicked, the arrow button pops up a -- dropdown menu.@@ -82,16 +82,15 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems-import Graphics.Rendering.Pango.Markup  {# context lib="gtk" prefix="gtk" #} @@ -102,10 +101,10 @@ -- | Creates a new 'MenuToolButton' using @iconWidget@ as icon and @label@ as -- label. ---menuToolButtonNew :: WidgetClass iconWidget => +menuToolButtonNew :: (WidgetClass iconWidget, GlibString string) =>     Maybe iconWidget  -- ^ @iconWidget@ - a widget that will be used as icon                       -- widget, or @Nothing@- -> Maybe String      -- ^ @label@ - a string that will be used as label, or+ -> Maybe string      -- ^ @label@ - a string that will be used as label, or                       -- @Nothing@  -> IO MenuToolButton menuToolButtonNew iconWidget label =@@ -119,7 +118,7 @@ -- | Creates a new 'MenuToolButton'. The new 'MenuToolButton' will contain an -- icon and label from the stock item indicated by @stockId@. ---menuToolButtonNewFromStock :: +menuToolButtonNewFromStock ::     StockId           -- ^ @stockId@ - the name of a stock item  -> IO MenuToolButton menuToolButtonNewFromStock stockId =@@ -157,10 +156,10 @@ -- menu. See 'Graphics.UI.Gtk.MenuComboToolbar.ToolItem.toolItemSetTooltip' -- for setting a tooltip on the whole 'MenuToolButton'. ---menuToolButtonSetArrowTooltip :: MenuToolButtonClass self => self+menuToolButtonSetArrowTooltip :: (MenuToolButtonClass self, GlibString string) => self  -> Tooltips -- ^ @tooltips@ - the 'Tooltips' object to be used- -> String   -- ^ @tipText@ - text to be used as tooltip text for tool item- -> String   -- ^ @tipPrivate@ - text to be used as private tooltip text+ -> string   -- ^ @tipText@ - text to be used as tooltip text for tool item+ -> string   -- ^ @tipPrivate@ - text to be used as private tooltip text  -> IO () menuToolButtonSetArrowTooltip self tooltips tipText tipPrivate =   withUTFString tipPrivate $ \tipPrivatePtr ->@@ -179,8 +178,8 @@ -- -- * Available since Gtk+ version 2.12 ---menuToolButtonSetArrowTooltipText :: MenuToolButtonClass self => self- -> String -- ^ @text@ - text to be used as tooltip text for button's arrow+menuToolButtonSetArrowTooltipText :: (MenuToolButtonClass self, GlibString string) => self+ -> string -- ^ @text@ - text to be used as tooltip text for button's arrow            -- button  -> IO () menuToolButtonSetArrowTooltipText self text =@@ -195,8 +194,8 @@ -- -- * Available since Gtk+ version 2.12 ---menuToolButtonSetArrowTooltipMarkup :: MenuToolButtonClass self => self- -> Markup -- ^ @markup@ - markup text to be used as tooltip text for button's+menuToolButtonSetArrowTooltipMarkup :: (MenuToolButtonClass self, GlibString markup) => self+ -> markup -- ^ @markup@ - markup text to be used as tooltip text for button's            -- arrow button  -> IO () menuToolButtonSetArrowTooltipMarkup self markup =@@ -219,7 +218,7 @@ -------------------- -- Signals --- | +-- | -- onShowMenu, afterShowMenu :: MenuToolButtonClass self => self  -> IO ()
Graphics/UI/Gtk/MenuComboToolbar/RadioMenuItem.chs view
@@ -31,7 +31,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.RadioMenuItem ( -- * Detail--- +-- -- | A radio menu item is a check menu item that belongs to a group. At each -- instant exactly one of the radio menu items from a group is selected. @@ -63,17 +63,17 @@   radioMenuItemNewWithLabelFromWidget,   radioMenuItemNewWithMnemonicFromWidget, -  -- * Compatibilty aliases+  -- * Compatibility aliases   radioMenuItemNewJoinGroup,   radioMenuItemNewJoinGroupWithLabel,   radioMenuItemNewJoinGroupWithMnemonic,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -92,7 +92,7 @@  -- | Creates a new 'RadioMenuItem' whose child is a simple 'Label'. ---radioMenuItemNewWithLabel :: String -> IO RadioMenuItem+radioMenuItemNewWithLabel :: GlibString string => string -> IO RadioMenuItem radioMenuItemNewWithLabel label =   makeNewObject mkRadioMenuItem $   liftM (castPtr :: Ptr Widget -> Ptr RadioMenuItem) $@@ -105,7 +105,7 @@ -- created using 'labelNewWithMnemonic', so underscores in @label@ indicate the -- mnemonic for the menu item. ---radioMenuItemNewWithMnemonic :: String -> IO RadioMenuItem+radioMenuItemNewWithMnemonic :: GlibString string => string -> IO RadioMenuItem radioMenuItemNewWithMnemonic label =   makeNewObject mkRadioMenuItem $   liftM (castPtr :: Ptr Widget -> Ptr RadioMenuItem) $@@ -117,7 +117,7 @@ -- | Create a new radio button, adding it to the same group as the group to -- which @groupMember@ belongs. ---radioMenuItemNewFromWidget :: +radioMenuItemNewFromWidget ::     RadioMenuItem    -- ^ @groupMember@ - a member of an existing radio button                      -- group, to which the new radio button will be added.  -> IO RadioMenuItem@@ -131,10 +131,10 @@ -- | Create a new radio button with a label, adding it to the same group as the -- group to which @groupMember@ belongs. ---radioMenuItemNewWithLabelFromWidget :: -    RadioMenuItem    -- ^ @groupMember@ - a member of an existing radio button+radioMenuItemNewWithLabelFromWidget :: GlibString string+ => RadioMenuItem    -- ^ @groupMember@ - a member of an existing radio button                      -- group, to which the new radio button will be added.- -> String+ -> string  -> IO RadioMenuItem radioMenuItemNewWithLabelFromWidget groupMember label =   {# call unsafe radio_menu_item_get_group #} groupMember >>= \groupPtr ->@@ -149,12 +149,12 @@ -- another radio button. Underscores in the label string indicate the mnemonic -- for the menu item. ---radioMenuItemNewWithMnemonicFromWidget :: RadioMenuItem- -> String+radioMenuItemNewWithMnemonicFromWidget :: GlibString string => RadioMenuItem+ -> string  -> IO RadioMenuItem radioMenuItemNewWithMnemonicFromWidget groupMember label =   {# call unsafe radio_menu_item_get_group #} groupMember >>= \groupPtr ->-  withUTFString label $ \strPtr -> +  withUTFString label $ \strPtr ->   makeNewObject mkRadioMenuItem $   liftM (castPtr :: Ptr Widget -> Ptr RadioMenuItem) $   {# call unsafe radio_menu_item_new_with_mnemonic #}@@ -168,7 +168,9 @@ radioMenuItemNewJoinGroup = radioMenuItemNewFromWidget  -- | Alias for 'radioMenuItemNewWithLabelFromWidget'.+radioMenuItemNewJoinGroupWithLabel :: GlibString string => RadioMenuItem -> string -> IO RadioMenuItem radioMenuItemNewJoinGroupWithLabel = radioMenuItemNewWithLabelFromWidget  -- | Alias for 'radioMenuItemNewWithMnemonicFromWidget'.+radioMenuItemNewJoinGroupWithMnemonic :: GlibString string => RadioMenuItem -> string -> IO RadioMenuItem radioMenuItemNewJoinGroupWithMnemonic = radioMenuItemNewWithMnemonicFromWidget
Graphics/UI/Gtk/MenuComboToolbar/RadioToolButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.RadioToolButton ( -- * Detail--- +-- -- | A 'RadioToolButton' is a 'ToolItem' that contains a radio button, that -- is, a button that is part of a group of toggle buttons where only one button -- can be active at a time.@@ -76,13 +76,13 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.GList import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.StockItems @@ -105,7 +105,7 @@ -- 'RadioToolButton' will contain an icon and label from the stock item -- indicated by @stockId@. ---radioToolButtonNewFromStock :: +radioToolButtonNewFromStock ::     StockId            -- ^ @stockId@ - the name of a stock item  -> IO RadioToolButton radioToolButtonNewFromStock stockId =@@ -116,10 +116,10 @@     nullPtr     stockIdPtr --- | Creates a new 'RadioToolButton' adding it to the same group as +-- | Creates a new 'RadioToolButton' adding it to the same group as -- the group to which @groupMember@ belongs. ---radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember => +radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember =>     groupMember        -- ^ @groupMember@ - a member of an existing radio group,                        -- to which the new radio tool button will be added.  -> IO RadioToolButton@@ -133,7 +133,7 @@ -- to which @groupMember@ belongs. The new 'RadioToolButton' will contain an -- icon and label from the stock item indicated by @stockId@. ---radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember => +radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember =>     groupMember        -- ^ @groupMember@ - a member of an existing radio group,                        -- to which the new radio tool button will be added.  -> StockId            -- ^ @stockId@ - the name of a stock item
Graphics/UI/Gtk/MenuComboToolbar/SeparatorMenuItem.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.SeparatorMenuItem ( -- * Detail--- +-- -- | The 'SeparatorMenuItem' is a separator used to group items within a menu. -- It displays a horizontal line with a shadow to make it appear sunken into -- the interface.@@ -55,10 +55,10 @@   separatorMenuItemNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.SeparatorToolItem ( -- * Detail--- +-- -- | A 'SeparatorToolItem' is a 'ToolItem' that separates groups of other -- 'ToolItem's. Depending on the theme, a 'SeparatorToolItem' will often look -- like a vertical line on horizontally docked toolbars.@@ -71,11 +71,11 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.TearoffMenuItem ( -- * Detail--- +-- -- | A 'TearoffMenuItem' is a special 'MenuItem' which is used to tear off and -- reattach its menu. --@@ -63,10 +63,10 @@   tearoffMenuItemNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/MenuComboToolbar/ToggleToolButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.ToggleToolButton ( -- * Detail--- +-- -- | A 'ToggleToolButton' is a 'ToolItem' that contains a toggle button. -- -- Use 'toggleToolButtonNew' to create a new 'ToggleToolButton'. Use@@ -76,12 +76,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems@@ -105,7 +105,7 @@ -- -- It is an error if @stockId@ is not a name of a stock item. ---toggleToolButtonNewFromStock :: +toggleToolButtonNewFromStock ::     StockId             -- ^ @stockId@ - the name of the stock item  -> IO ToggleToolButton toggleToolButtonNewFromStock stockId =
Graphics/UI/Gtk/MenuComboToolbar/ToolButton.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Widget ToolButton --@@ -29,7 +30,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.ToolButton ( -- * Detail--- +-- -- | 'ToolButton's are 'ToolItems' containing buttons. -- -- Use 'toolButtonNew' to create a new 'ToolButton'. Use@@ -107,12 +108,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems@@ -126,10 +127,10 @@ -- | Creates a new 'ToolButton' using @iconWidget@ as icon and @label@ as -- label. ---toolButtonNew :: WidgetClass iconWidget => +toolButtonNew :: (WidgetClass iconWidget, GlibString string) =>     Maybe iconWidget -- ^ @iconWidget@ - a widget that will be used as icon                      -- widget, or @Nothing@- -> Maybe String     -- ^ @label@ - a string that will be used as label, or+ -> Maybe string     -- ^ @label@ - a string that will be used as label, or                      -- @Nothing@  -> IO ToolButton toolButtonNew iconWidget label =@@ -145,7 +146,7 @@ -- -- It is an error if @stockId@ is not a name of a stock item. ---toolButtonNewFromStock :: +toolButtonNewFromStock ::     StockId       -- ^ @stockId@ - the name of the stock item  -> IO ToolButton toolButtonNewFromStock stockId =@@ -165,8 +166,8 @@ -- property. If the \"stock_id\" property is also @Nothing@, @button@ will not -- have a label. ---toolButtonSetLabel :: ToolButtonClass self => self- -> Maybe String -- ^ @label@ - a string that will be used as label, or+toolButtonSetLabel :: (ToolButtonClass self, GlibString string) => self+ -> Maybe string -- ^ @label@ - a string that will be used as label, or                  -- @Nothing@.  -> IO () toolButtonSetLabel self label =@@ -178,7 +179,7 @@ -- | Returns the label used by the tool button, or @Nothing@ if the tool -- button doesn't have a label. or uses a the label from a stock item. ---toolButtonGetLabel :: ToolButtonClass self => self -> IO (Maybe String)+toolButtonGetLabel :: (ToolButtonClass self, GlibString string) => self -> IO (Maybe string) toolButtonGetLabel self =   {# call gtk_tool_button_get_label #}     (toToolButton self)@@ -223,7 +224,7 @@  -- | Returns the name of the stock item. See 'toolButtonSetStockId'. ---toolButtonGetStockId :: ToolButtonClass self => self -> IO (Maybe String)+toolButtonGetStockId :: ToolButtonClass self => self -> IO (Maybe StockId) toolButtonGetStockId self =   {# call gtk_tool_button_get_stock_id #}     (toToolButton self)@@ -286,8 +287,8 @@ -- -- * Available since Gtk+ version 2.8 ---toolButtonSetIconName :: ToolButtonClass self => self- -> String -- ^ @iconName@ - the name of the themed icon+toolButtonSetIconName :: (ToolButtonClass self, GlibString string) => self+ -> string -- ^ @iconName@ - the name of the themed icon  -> IO () toolButtonSetIconName self iconName =   withUTFString iconName $ \iconNamePtr ->@@ -300,8 +301,8 @@ -- -- * Available since Gtk+ version 2.8 ---toolButtonGetIconName :: ToolButtonClass self => self- -> IO String -- ^ returns the icon name or @\"\"@ if the tool button has no+toolButtonGetIconName :: (ToolButtonClass self, GlibString string) => self+ -> IO string -- ^ returns the icon name or @\"\"@ if the tool button has no               -- themed icon. toolButtonGetIconName self =   {# call gtk_tool_button_get_icon_name #}@@ -318,7 +319,7 @@ -- -- Default value: @Nothing@ ---toolButtonLabel :: ToolButtonClass self => Attr self (Maybe String)+toolButtonLabel :: (ToolButtonClass self, GlibString string) => Attr self (Maybe string) toolButtonLabel = newAttr   toolButtonGetLabel   toolButtonSetLabel@@ -345,7 +346,7 @@ -- -- Default value: @Nothing@ ---toolButtonStockId :: ToolButtonClass self => ReadWriteAttr self (Maybe String) (Maybe String)+toolButtonStockId :: ToolButtonClass self => ReadWriteAttr self (Maybe StockId) (Maybe StockId) toolButtonStockId = newAttr   toolButtonGetStockId   toolButtonSetStockId@@ -357,7 +358,7 @@ -- -- Default value: \"\" ---toolButtonIconName :: ToolButtonClass self => Attr self String+toolButtonIconName :: (ToolButtonClass self, GlibString string) => Attr self string toolButtonIconName = newAttr   toolButtonGetIconName   toolButtonSetIconName
Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.ToolItem ( -- * Detail--- +-- -- | 'ToolItem's are widgets that can appear on a toolbar. To create a toolbar -- item that contain something else than a button, use 'toolItemNew'. Use -- 'containerAdd' to add a child widget to the tool item.@@ -105,17 +105,17 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) import Graphics.Rendering.Pango.Enums   (EllipsizeMode (..)) import Graphics.UI.Gtk.Misc.SizeGroup {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Structs	(IconSize)-import Graphics.UI.Gtk.General.Enums	(Orientation(..), ToolbarStyle(..), ReliefStyle(..))+import Graphics.UI.Gtk.General.Structs  (IconSize)+import Graphics.UI.Gtk.General.Enums    (Orientation(..), ToolbarStyle(..), ReliefStyle(..))  {# context lib="gtk" prefix="gtk" #} @@ -181,10 +181,10 @@ -- 'tooltipsSetTip'. -- -- Removed in Gtk3.-toolItemSetTooltip :: ToolItemClass self => self+toolItemSetTooltip :: (ToolItemClass self, GlibString string) => self  -> Tooltips -- ^ @tooltips@ - The 'Tooltips' object to be used- -> String   -- ^ @tipText@ - text to be used as tooltip text for @toolItem@- -> String   -- ^ @tipPrivate@ - text to be used as private tooltip text+ -> string   -- ^ @tipText@ - text to be used as tooltip text for @toolItem@+ -> string   -- ^ @tipPrivate@ - text to be used as private tooltip text  -> IO () toolItemSetTooltip self tooltips tipText tipPrivate =   withUTFString tipPrivate $ \tipPrivatePtr ->@@ -327,15 +327,15 @@ -- | If @menuItemId@ matches the string passed to 'toolItemSetProxyMenuItem' -- return the corresponding 'MenuItem'. ---toolItemGetProxyMenuItem :: ToolItemClass self => self- -> String            -- ^ @menuItemId@ - a string used to identify the menu+toolItemGetProxyMenuItem :: (ToolItemClass self, GlibString string) => self+ -> string            -- ^ @menuItemId@ - a string used to identify the menu                       -- item  -> IO (Maybe Widget) -- ^ returns The 'MenuItem' passed to                       -- 'toolItemSetProxyMenuItem', if the @menuItemId@s                       -- match. toolItemGetProxyMenuItem self menuItemId =   maybeNull (makeNewObject mkWidget) $-  withCString menuItemId $ \menuItemIdPtr ->+  withUTFString menuItemId $ \menuItemIdPtr ->   {# call unsafe tool_item_get_proxy_menu_item #}     (toToolItem self)     menuItemIdPtr@@ -344,12 +344,12 @@ -- is used to identify the caller of this function and should also be used with -- 'toolItemGetProxyMenuItem'. ---toolItemSetProxyMenuItem :: (ToolItemClass self, MenuItemClass menuItem) => self- -> String   -- ^ @menuItemId@ - a string used to identify @menuItem@+toolItemSetProxyMenuItem :: (ToolItemClass self, MenuItemClass menuItem, GlibString string) => self+ -> string   -- ^ @menuItemId@ - a string used to identify @menuItem@  -> menuItem -- ^ @menuItem@ - a 'MenuItem' to be used in the overflow menu  -> IO () toolItemSetProxyMenuItem self menuItemId menuItem =-  withCString menuItemId $ \menuItemIdPtr ->+  withUTFString menuItemId $ \menuItemIdPtr ->   {# call tool_item_set_proxy_menu_item #}     (toToolItem self)     menuItemIdPtr@@ -363,14 +363,14 @@ -- toolItemGetEllipsizeMode :: ToolItemClass item => item                          -> IO EllipsizeMode  -- ^ returns   a PangoEllipsizeMode indicating how text in @toolItem@ should be ellipsized.-toolItemGetEllipsizeMode item = +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 +toolItemGetTextAlignment :: ToolItemClass item => item                          -> IO Double -- ^ returns   a gfloat indicating the horizontal text alignment used for @toolItem@ toolItemGetTextAlignment item =   liftM realToFrac $@@ -380,7 +380,7 @@ -- | 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@ +                           -> IO Orientation -- ^ returns   a 'Orientation' indicating the orientation used for @toolItem@ toolItemGetTextOrientation item =   liftM (toEnum . fromIntegral) $   {#call gtk_tool_item_get_text_orientation #}
Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs view
@@ -42,16 +42,16 @@ -- |               +----'Container' -- |                     +----'ToolItemGroup' -- @-  + #if GTK_CHECK_VERSION(2,20,0)--- * Types  +-- * Types   ToolItemGroup,   ToolItemGroupClass,   castToToolItemGroup,   toToolItemGroup,  -- * Constructors-  toolItemGroupNew,  +  toolItemGroupNew,  -- * Methods   toolItemGroupGetDropItem,@@ -60,7 +60,7 @@   toolItemGroupGetNthItem,   toolItemGroupInsert,   toolItemGroupSetItemPosition,-  + -- * Attributes   toolItemGroupCollapsed,   toolItemGroupEllipsize,@@ -77,18 +77,16 @@ #endif ) where -import Control.Monad	(liftM)+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.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.General.Enums    (ReliefStyle(..))+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#}  {# context lib="gtk" prefix="gtk" #} @@ -97,12 +95,12 @@ -- -- * Available since Gtk+ version 2.20 ---toolItemGroupNew :: String -- ^ @label@   the label of the new group -                 -> IO ToolItemGroup -- ^ returns a new 'ToolItemGroup'.    +toolItemGroupNew :: GlibString string => string -- ^ @label@   the label of the new group+                 -> IO ToolItemGroup -- ^ returns a new 'ToolItemGroup'. toolItemGroupNew label =   makeNewObject mkToolItemGroup $   liftM (castPtr :: Ptr Widget -> Ptr ToolItemGroup) $-  withUTFString label $ \ labelPtr -> +  withUTFString label $ \ labelPtr ->     {#call gtk_tool_item_group_new #}       labelPtr @@ -113,7 +111,7 @@ toolItemGroupGetDropItem :: ToolItemGroupClass self => self                          -> (Int, Int)                          -> IO ToolItem-toolItemGroupGetDropItem group (x, y) = +toolItemGroupGetDropItem group (x, y) =   makeNewObject mkToolItem $   {#call gtk_tool_item_group_get_drop_item #}     (toToolItemGroup group)@@ -125,9 +123,9 @@ -- * 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 +                               => 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 #}@@ -139,7 +137,7 @@ -- * Available since Gtk+ version 2.20 -- toolItemGroupGetNItems :: ToolItemGroupClass group => group-                       -> IO Int -- ^ returns the number of tool items in group +                       -> IO Int -- ^ returns the number of tool items in group toolItemGroupGetNItems group =     liftM fromIntegral $     {#call gtk_tool_item_group_get_n_items #}@@ -150,8 +148,8 @@ -- * Available since Gtk+ version 2.20 -- toolItemGroupGetNthItem :: ToolItemGroupClass group => group-                        -> Int  -- ^ @index@   the index                -                        -> IO ToolItem  -- ^ returns the 'ToolItem' at index +                        -> Int  -- ^ @index@   the index+                        -> IO ToolItem  -- ^ returns the 'ToolItem' at index toolItemGroupGetNthItem group index =   makeNewObject mkToolItem $   {#call gtk_tool_item_group_get_nth_item #}@@ -162,10 +160,10 @@ -- -- * Available since Gtk+ version 2.20 ---toolItemGroupInsert :: (ToolItemGroupClass group, ToolItemClass item) +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. +                     -> Int -- ^ @position@ the position of item in group, starting with 0.                            -- The position -1 means end of list.                      -> IO () toolItemGroupInsert group item position =@@ -183,14 +181,14 @@                                -> 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 = +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.--- +-- | Whether the group has been collapsed and items are hidden.+-- -- Default value: 'False' -- -- * Available since Gtk+ version 2.20@@ -200,7 +198,7 @@   newAttrFromBoolProperty "collapsed"  -- | Ellipsize for item group headers.--- +-- -- Default value: EllipsizeNone -- -- * Available since Gtk+ version 2.20@@ -211,7 +209,7 @@      {# call pure unsafe pango_ellipsize_mode_get_type #}  -- | Relief of the group header button.--- +-- -- Default value: 'ReliefNormal' -- -- * Available since Gtk+ version 2.20@@ -222,12 +220,12 @@      {# 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 :: GlibString string => ToolItemGroupClass group => Attr group string toolItemGroupLabel =   newAttrFromStringProperty "label" @@ -241,7 +239,7 @@       {# 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@@ -251,7 +249,7 @@   newAttrFromBoolProperty "expand"  -- | Whether the item should fill the available space.--- +-- -- Default value: 'True' -- -- * Available since Gtk+ version 2.20@@ -261,7 +259,7 @@   newAttrFromBoolProperty "fill"  -- | Whether the item should be the same size as other homogeneous items.--- +-- -- Default value: 'True' -- -- * Available since Gtk+ version 2.20@@ -271,7 +269,7 @@   newAttrFromBoolProperty "homogeneous"  -- | Whether the item should start a new row.--- +-- -- Default value: 'False' -- -- * Available since Gtk+ version 2.20@@ -281,9 +279,9 @@   newAttrFromBoolProperty "new-row"  -- | Position of the item within this group.--- +-- -- Allowed values: >= 0--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.20
Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs view
@@ -23,7 +23,7 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) ----- A tool palette with categories                                                                             +-- A tool palette with categories -- -- * Module available since Gtk+ version 2.20 --@@ -41,9 +41,9 @@ -- * 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'.@@ -64,7 +64,7 @@ -- @  #if GTK_CHECK_VERSION(2,20,0)--- * Types  +-- * Types   ToolPalette,   ToolPaletteClass,   castToToolPalette,@@ -92,22 +92,20 @@ -- * Child Attributes   toolPaletteChildExclusive,   toolPaletteChildExpand,-    --- * Signals    ++-- * Signals   toolPaletteSetScrollAdjustments, #endif ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -120,7 +118,7 @@  -- | Creates a new tool palette. ----- * Available since Gtk+ version 2.20    +-- * Available since Gtk+ version 2.20 -- toolPaletteNew :: IO ToolPalette toolPaletteNew =@@ -131,7 +129,7 @@ -- | 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    +-- * Available since Gtk+ version 2.20 -- toolPaletteUnsetIconSize :: ToolPaletteClass self => self -> IO () toolPaletteUnsetIconSize palette =@@ -141,7 +139,7 @@ -- | 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    +-- * Available since Gtk+ version 2.20 -- toolPaletteUnsetStyle :: ToolPaletteClass self => self -> IO () toolPaletteUnsetStyle palette =@@ -150,7 +148,7 @@  -- | Gets the horizontal adjustment of the tool palette. ----- * Available since Gtk+ version 2.20    +-- * Available since Gtk+ version 2.20 -- toolPaletteGetHAdjustment :: ToolPaletteClass self => self                           -> IO Adjustment@@ -161,7 +159,7 @@  -- | Gets the vertical adjustment of the tool palette. ----- * Available since Gtk+ version 2.20    +-- * Available since Gtk+ version 2.20 -- toolPaletteGetVAdjustment :: ToolPaletteClass self => self                           -> IO Adjustment@@ -172,12 +170,12 @@  -- | Gets the position of group in palette as index. See 'toolPaletteSetGroupPosition'. ----- * Available since Gtk+ version 2.20    +-- * Available since Gtk+ version 2.20 ---toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) +toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group)                               => palette                               -> group-                              -> IO Int -- ^ returns the index of group or -1 if group is not a child of palette +                              -> 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 #}@@ -187,9 +185,9 @@ -- | 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    +-- * Available since Gtk+ version 2.20 ---toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) +toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group)                               => palette                               -> group                               -> Int@@ -202,13 +200,13 @@  -- | 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    +-- * Available since Gtk+ version 2.20 -- toolPaletteIconSize :: ToolPaletteClass self => Attr self IconSize toolPaletteIconSize =@@ -216,20 +214,20 @@         {# 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    +-- * 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    +-- * Available since Gtk+ version 2.20 -- toolPaletteToolbarStyle :: ToolPaletteClass self => Attr self ToolbarStyle toolPaletteToolbarStyle =@@ -237,20 +235,20 @@     {# 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    +-- * 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    +-- * Available since Gtk+ version 2.20 -- toolPaletteChildExpand :: ToolPaletteClass self => Attr self Bool toolPaletteChildExpand =@@ -260,7 +258,7 @@ -- emit this signal to connect two instances of 'Scrollbar' to the scroll directions of the -- 'Toolpalette'. ----- * Available since Gtk+ version 2.20    +-- * Available since Gtk+ version 2.20 -- toolPaletteSetScrollAdjustments :: ToolPaletteClass self => Signal self (Adjustment -> Adjustment -> IO ()) toolPaletteSetScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments")
Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs view
@@ -27,8 +27,8 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.Toolbar ( -- * Detail--- --- | This widget underwent a signficant overhaul in gtk 2.4 and the+--+-- | This widget underwent a significant overhaul in gtk 2.4 and the -- recommended api changed substantially. The old interface is still supported -- but it is not recommended. --@@ -52,7 +52,7 @@ #ifndef DISABLE_DEPRECATED -- | * The following information applies to the old interface only. ----- 'Button's, 'RadioButton's and 'ToggleButton's can be added by refering to+-- 'Button's, 'RadioButton's and 'ToggleButton's can be added by referring to -- stock images. Their size can be changed by calling 'toolbarSetIconSize'. In -- contrast, normal widget cannot be added. Due to the bad interface of -- "Toolbar" mnemonics of 'RadioButton's and 'ToggleButton's are not honored.@@ -161,30 +161,33 @@   afterPopupContextMenu,   ) where -import Control.Monad	(liftM)-import Data.Maybe	(fromJust)--import System.Glib.FFI+import Control.Monad    (liftM)+#if GTK_MAJOR_VERSION < 3+#ifndef DISABLE_DEPRECATED+import Data.Maybe       (fromJust)+import qualified Data.Text as T (filter)+import Graphics.UI.Gtk.General.StockItems+import Graphics.UI.Gtk.Display.Image    (imageNewFromStock) import System.Glib.UTFString+#endif+#endif+import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.Abstract.ContainerChildProperties-import Graphics.UI.Gtk.General.Enums	(Orientation(..), ToolbarStyle(..),-					 ReliefStyle(..))-import Graphics.UI.Gtk.General.StockItems-import Graphics.UI.Gtk.General.Structs	(+import Graphics.UI.Gtk.General.Enums    (Orientation(..), ToolbarStyle(..),+                                         ReliefStyle(..))+import Graphics.UI.Gtk.General.Structs  ( #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED-					 toolbarChildToggleButton,-					 toolbarChildRadioButton,+                                         toolbarChildToggleButton,+                                         toolbarChildRadioButton, #endif #endif-					 IconSize(..))-import Graphics.UI.Gtk.General.StockItems	(stockLookupItem, siLabel, stockMissingImage)-import Graphics.UI.Gtk.Display.Image	(imageNewFromStock)+                                         IconSize(..))  {# context lib="gtk" prefix="gtk" #} @@ -199,17 +202,17 @@   liftM (castPtr :: Ptr Widget -> Ptr Toolbar) $   {# call unsafe toolbar_new #} --- Make tooltips or not? ----mkToolText :: Maybe (String,String) -> (CString -> CString -> IO a) -> IO a-mkToolText Nothing               fun = fun nullPtr nullPtr-mkToolText (Just (text,private)) fun = withUTFString text $ \txtPtr -> -  withUTFString private $ \prvPtr -> fun txtPtr prvPtr- -------------------- -- Methods #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED+-- Make tooltips or not?+--+mkToolText :: GlibString string => Maybe (string,string) -> (CString -> CString -> IO a) -> IO a+mkToolText Nothing               fun = fun nullPtr nullPtr+mkToolText (Just (text,private)) fun = withUTFString text $ \txtPtr ->+  withUTFString private $ \prvPtr -> fun txtPtr prvPtr+ -- | Insert a new 'Button' into the 'Toolbar'. -- -- The new 'Button' is created at position @pos@, counting from 0.@@ -218,25 +221,25 @@ -- which must be a valid entry in the 'Toolbar's Style or the -- default 'IconFactory'. ----- If you whish to have 'Tooltips' added to this button you can+-- If you wish to have 'Tooltips' added to this button you can -- specify @Just (tipText, tipPrivate)@ , otherwise specify @Nothing@. ----- The newly created 'Button' is returned. Use this button to +-- The newly created 'Button' is returned. Use this button to -- add an action function with @\"connectToClicked\"@. -- -- * Warning: this function is deprecated and should not be used in -- newly-written code. -- -- Removed in Gtk3.-toolbarInsertNewButton :: ToolbarClass self => self+toolbarInsertNewButton :: (ToolbarClass self, GlibString string) => self  -> Int  -> StockId- -> Maybe (String,String)+ -> Maybe (string,string)  -> IO Button-toolbarInsertNewButton self pos stockId tooltips = +toolbarInsertNewButton self pos stockId tooltips =   withUTFString stockId $ \stockPtr ->   mkToolText tooltips $ \textPtr privPtr ->-  makeNewObject mkButton $ liftM castPtr $ +  makeNewObject mkButton $ liftM castPtr $   {# call unsafe toolbar_insert_stock #}     (toToolbar self)     stockPtr@@ -254,9 +257,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarAppendNewButton :: ToolbarClass self => self- -> String- -> Maybe (String, String)+toolbarAppendNewButton :: (ToolbarClass self, GlibString string) => self+ -> StockId+ -> Maybe (string, string)  -> IO Button toolbarAppendNewButton self = toolbarInsertNewButton self (-1) @@ -268,9 +271,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarPrependNewButton :: ToolbarClass self => self- -> String- -> Maybe (String, String)+toolbarPrependNewButton :: (ToolbarClass self, GlibString string) => self+ -> StockId+ -> Maybe (string, string)  -> IO Button toolbarPrependNewButton self = toolbarInsertNewButton self 0 @@ -282,23 +285,23 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarInsertNewToggleButton :: ToolbarClass self => self+toolbarInsertNewToggleButton :: (ToolbarClass self, GlibString string) => self  -> Int  -> StockId- -> Maybe (String, String)+ -> Maybe (string, string)  -> IO ToggleButton toolbarInsertNewToggleButton self pos stockId tooltips = do   mItem <- stockLookupItem stockId   item <- case mItem of     (Just item) -> return item-    Nothing	-> liftM fromJust $ stockLookupItem stockMissingImage-  let label = (filter (/= '_')) $ siLabel item+    Nothing     -> liftM fromJust $ stockLookupItem stockMissingImage+  let label = (T.filter (/= '_')) $ siLabel item   size <- toolbarGetIconSize (toToolbar self)   image <- imageNewFromStock stockId size   makeNewObject mkToggleButton $ liftM castPtr $     withUTFString label $ \lblPtr -> mkToolText tooltips $ \textPtr privPtr ->-    {#call unsafe toolbar_insert_element#} (toToolbar self) -    toolbarChildToggleButton (Widget nullForeignPtr) lblPtr +    {#call unsafe toolbar_insert_element#} (toToolbar self)+    toolbarChildToggleButton (Widget nullForeignPtr) lblPtr     textPtr privPtr (toWidget image) nullFunPtr nullPtr (fromIntegral pos)  -- | Append a new 'ToggleButton' to the 'Toolbar'.@@ -309,9 +312,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarAppendNewToggleButton :: ToolbarClass self => self- -> String- -> Maybe (String, String)+toolbarAppendNewToggleButton :: (ToolbarClass self, GlibString string) => self+ -> StockId+ -> Maybe (string, string)  -> IO ToggleButton toolbarAppendNewToggleButton self = toolbarInsertNewToggleButton self (-1) @@ -323,9 +326,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarPrependNewToggleButton :: ToolbarClass self => self- -> String- -> Maybe (String, String)+toolbarPrependNewToggleButton :: (ToolbarClass self, GlibString string) => self+ -> StockId+ -> Maybe (string, string)  -> IO ToggleButton toolbarPrependNewToggleButton self = toolbarInsertNewToggleButton self 0 @@ -337,32 +340,32 @@ -- newly-written code. -- -- The @parent@ argument must be set to another--- 'RadioButton' in the group. If @Nothing@ is given, --- a new group is generated (which is the desired behavious for the+-- 'RadioButton' in the group. If @Nothing@ is given,+-- a new group is generated (which is the desired behaviour for the -- first button of a group). -- -- * Warning: this function is deprecated and should not be used in -- newly-written code. -- -- Removed in Gtk3.-toolbarInsertNewRadioButton :: (ToolbarClass self, RadioButtonClass rb) => self+toolbarInsertNewRadioButton :: (ToolbarClass self, RadioButtonClass rb, GlibString string) => self  -> Int  -> StockId- -> Maybe (String,String)+ -> Maybe (string,string)  -> Maybe rb  -> IO RadioButton toolbarInsertNewRadioButton self pos stockId tooltips rb = do   mItem <- stockLookupItem stockId   item <- case mItem of     (Just item) -> return item-    Nothing	-> liftM fromJust $ stockLookupItem stockMissingImage-  let label = (filter (/= '_')) $ siLabel item+    Nothing     -> liftM fromJust $ stockLookupItem stockMissingImage+  let label = (T.filter (/= '_')) $ siLabel item   size <- toolbarGetIconSize (toToolbar self)   image <- imageNewFromStock stockId size   makeNewObject mkRadioButton $ liftM castPtr $     withUTFString label $ \lblPtr -> mkToolText tooltips $ \textPtr privPtr ->-    {#call unsafe toolbar_insert_element#} (toToolbar self) -    toolbarChildRadioButton (maybe (Widget nullForeignPtr) toWidget rb) +    {#call unsafe toolbar_insert_element#} (toToolbar self)+    toolbarChildRadioButton (maybe (Widget nullForeignPtr) toWidget rb)       lblPtr  textPtr privPtr (toWidget image) nullFunPtr nullPtr       (fromIntegral pos) @@ -374,9 +377,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarAppendNewRadioButton :: (ToolbarClass self, RadioButtonClass rb) => self- -> String- -> Maybe (String, String)+toolbarAppendNewRadioButton :: (ToolbarClass self, RadioButtonClass rb, GlibString string) => self+ -> StockId+ -> Maybe (string, string)  -> Maybe rb  -> IO RadioButton toolbarAppendNewRadioButton self = toolbarInsertNewRadioButton self (-1)@@ -389,9 +392,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarPrependNewRadioButton :: (ToolbarClass self, RadioButtonClass rb) => self- -> String- -> Maybe (String, String)+toolbarPrependNewRadioButton :: (ToolbarClass self, RadioButtonClass rb, GlibString string) => self+ -> StockId+ -> Maybe (string, string)  -> Maybe rb  -> IO RadioButton toolbarPrependNewRadioButton self = toolbarInsertNewRadioButton self 0@@ -406,12 +409,12 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarInsertNewWidget :: (ToolbarClass self, WidgetClass w) => self+toolbarInsertNewWidget :: (ToolbarClass self, WidgetClass w, GlibString string) => self  -> Int  -> w- -> Maybe (String,String)+ -> Maybe (string,string)  -> IO ()-toolbarInsertNewWidget self pos w tooltips = +toolbarInsertNewWidget self pos w tooltips =   mkToolText tooltips $ \textPtr privPtr ->   {# call unsafe toolbar_insert_widget #}     (toToolbar self)@@ -428,9 +431,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarAppendNewWidget :: (ToolbarClass self, WidgetClass w) => self+toolbarAppendNewWidget :: (ToolbarClass self, WidgetClass w, GlibString string) => self  -> w- -> Maybe (String, String)+ -> Maybe (string, string)  -> IO () toolbarAppendNewWidget self = toolbarInsertNewWidget self (-1) @@ -442,9 +445,9 @@ -- newly-written code. -- -- Removed in Gtk3.-toolbarPrependNewWidget :: (ToolbarClass self, WidgetClass w) => self- -> w - -> Maybe (String, String)+toolbarPrependNewWidget :: (ToolbarClass self, WidgetClass w, GlibString string) => self+ -> w+ -> Maybe (string, string)  -> IO () toolbarPrependNewWidget self = toolbarInsertNewWidget self 0 #endif@@ -761,7 +764,7 @@ -- Application developers should handle this signal if they want to display -- a context menu on the toolbar. The context-menu should appear at the -- coordinates given by @x@ and @y@. The mouse button number is given by the--- @button@ parameter. If the menu was popped up using the keybaord, @button@+-- @button@ parameter. If the menu was popped up using the keyboard, @button@ -- is -1. -- onPopupContextMenu, afterPopupContextMenu :: ToolbarClass self => self
Graphics/UI/Gtk/Misc/Accessible.chs view
@@ -29,7 +29,7 @@ -- * Detail -- -- | Accessible accessibility support for widgets.---  +--  -- * Class Hierarchy -- |@@ -52,18 +52,14 @@ #endif ) where -import Control.Monad	(liftM)+#if GTK_CHECK_VERSION(2,22,0)  import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+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,22,0) -------------------- -- Methods @@ -82,11 +78,11 @@ -- -- * Available since Gtk+ version 2.22 ---accessibleSetWidget :: (AccessibleClass self, WidgetClass widget) -                      => self -- ^ @accessible@ a 'Accessible' -                      -> widget -- ^ @widget@     a 'Widget'     +accessibleSetWidget :: (AccessibleClass self, WidgetClass widget)+                      => self -- ^ @accessible@ a 'Accessible'+                      -> widget -- ^ @widget@     a 'Widget'                       -> IO ()-accessibleSetWidget self widget =                       +accessibleSetWidget self widget =   {#call accessible_set_widget #}      (toAccessible self)      (toWidget widget)
Graphics/UI/Gtk/Misc/Adjustment.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.Adjustment ( -- * Detail--- +-- -- | The 'Adjustment' object represents a value which has an associated lower -- and upper bound, together with step and page increments, and a page size. It -- is used within several Gtk+ widgets, including 'SpinButton', 'Viewport', and@@ -93,12 +93,12 @@   afterValueChanged,   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -116,7 +116,7 @@ -- @pageSize@ is needed to determine if the end of the slider is still in the -- range. ---adjustmentNew :: +adjustmentNew ::     Double        -- ^ @value@ - the initial value.  -> Double        -- ^ @lower@ - the minimum value.  -> Double        -- ^ @upper@ - the maximum value.@@ -199,7 +199,7 @@     self  -- | Updates the 'Adjustment' @value@ to ensure that the range between @lower@--- and @upper@ is in the current page (i.e. between @value@ and @value + +-- and @upper@ is in the current page (i.e. between @value@ and @value + -- pageSize@). If the range is larger than the page size, then only the start -- of it will be in the current page. A \"changed\" signal will be emitted if -- the value is changed.
Graphics/UI/Gtk/Misc/Arrow.chs view
@@ -27,14 +27,14 @@ -- module Graphics.UI.Gtk.Misc.Arrow ( -- * Detail--- +-- -- | 'Arrow' should be used to draw simple arrows that need to point in one of -- the four cardinal directions (up, down, left, or right). The style of the -- arrow can be one of shadow in, shadow out, etched in, or etched out. Note--- that these directions and style types may be ammended in versions of Gtk to+-- that these directions and style types may be amended in versions of Gtk to -- come. ----- 'Arrow' will fill any space alloted to it, but since it is inherited from+-- 'Arrow' will fill any space allotted to it, but since it is inherited from -- 'Misc', it can be padded and\/or aligned, to fill exactly the space the -- programmer desires. --@@ -70,14 +70,14 @@   arrowShadowType,   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(ArrowType(..), ShadowType(..))+import Graphics.UI.Gtk.General.Enums    (ArrowType(..), ShadowType(..))  {# context lib="gtk" prefix="gtk" #} 
Graphics/UI/Gtk/Misc/Calendar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.Calendar ( -- * Detail--- +-- -- | 'Calendar' is a widget that displays a calendar, one month at a time. It -- can be created with 'calendarNew'. --@@ -115,16 +115,16 @@   afterPrevYear,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Flags		(fromFlags, toFlags)+import System.Glib.Flags                (fromFlags, toFlags) import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Enums	(CalendarDisplayOptions(..))+import Graphics.UI.Gtk.General.Enums    (CalendarDisplayOptions(..))  {# context lib="gtk" prefix="gtk" #} @@ -364,9 +364,9 @@ onDaySelectedDoubleClick, afterDaySelectedDoubleClick :: CalendarClass self => self  -> IO ()  -> IO (ConnectId self)-onDaySelectedDoubleClick = +onDaySelectedDoubleClick =   connect_NONE__NONE "day-selected-double-click" False-afterDaySelectedDoubleClick = +afterDaySelectedDoubleClick =   connect_NONE__NONE "day-selected-double-click" True  -- | The month changed.
Graphics/UI/Gtk/Misc/DrawingArea.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.DrawingArea ( -- * Detail--- +-- -- | The 'DrawingArea' widget is used for creating custom user interface -- elements. It's essentially a blank widget; you can draw on -- the 'Drawable' returned by 'drawingAreaGetDrawWindow'.@@ -86,16 +86,14 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.General.Structs	(widgetGetDrawWindow, widgetGetSize)+import Graphics.UI.Gtk.General.Structs  (widgetGetDrawWindow, widgetGetSize) #endif--- to make haddock happy:-import Graphics.UI.Gtk.Abstract.Widget  {# context lib="gtk" prefix="gtk" #} 
Graphics/UI/Gtk/Misc/EventBox.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Misc.EventBox ( -- * Detail--- +-- -- | The 'EventBox' widget is a subclass of 'Bin' which also has its own -- window. It is useful since it allows you to catch events for widgets which -- do not have their own window.@@ -66,11 +66,11 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
+ Graphics/UI/Gtk/Misc/GLArea.chs view
@@ -0,0 +1,393 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) Widget GLArea+--+--  Author : Chris Mennie+--+--  Created: 23 April 2016+--+--  Copyright (C) 2016 Chis Mennie+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- A widget for custom drawing with OpenGL+--+module Graphics.UI.Gtk.Misc.GLArea (+-- * Detail+--+-- | The 'GLArea' is a widget that allows drawing with OpenGL.+--+-- GLArea sets up its own 'Graphics.UI.Gtk.Gdk.GLContext.GLContext' for the window it creates, and creates a+-- custom GL framebuffer that the widget will do GL rendering onto. It also+-- ensures that this framebuffer is the default GL rendering target when+-- rendering.+--+-- In order to draw, you have to connect to the 'glAreaRender' signal.+--+-- The GLArea widget ensures that the 'Graphics.UI.Gtk.Gdk.GLContext.GLContext' is associated with the+-- widget's drawing area, and it is kept updated when the size and position+-- of the drawing area changes.+--+-- If you need to initialize OpenGL state, e.g. buffer objects or shaders,+-- you should use the 'Graphics.UI.Gtk.Abstract.Widget.realize' signal; you can use the 'Graphics.UI.Gtk.Abstract.Widget.unrealize' signal+-- to clean up.+--+-- To receive mouse events on a drawing area, you will need to enable them+-- with 'Graphics.UI.Gtk.Abstract.Widget.widgetAddEvents'. To receive keyboard events, you will need to set the+-- 'Graphics.UI.Gtk.Abstract.Widget.widgetCanFocus' attribute on the drawing area.++-- * Class Hierarchy+-- |+-- @+-- |  'GObject'+-- |   +----'Object'+-- |         +----'Widget'+-- |               +----GLArea+-- @++-- * Types+#if GTK_CHECK_VERSION(3,16,0)+  GLArea,+  GLAreaClass,+  castToGLArea, gTypeGLArea,+  toGLArea,+#endif++-- * Constructors+#if GTK_CHECK_VERSION(3,16,0)+  glAreaNew,+#endif++-- * Methods+#if GTK_CHECK_VERSION(3,16,0)+  glAreaGetContext,+  glAreaMakeCurrent,+  glAreaQueueRender,+  glAreaAttachBuffers,+  glAreaSetAutoRender,+  glAreaGetAutoRender,+  glAreaSetHasAlpha,+  glAreaGetHasAlpha,+  glAreaSetHasDepthBuffer,+  glAreaGetHasDepthBuffer,+  glAreaSetHasStencilBuffer,+  glAreaGetHasStencilBuffer,+  glAreaGetRequiredVersion,+  glAreaSetRequiredVersion,+  glAreaGetError,+#endif++-- * Attributes+#if GTK_CHECK_VERSION(3,16,0)+  glAreaAutoRender,+  glAreaContext,+  glAreaHasAlpha,+  glAreaHasDepthBuffer,+  glAreaHasStencilBuffer,+#endif++-- * Signals+#if GTK_CHECK_VERSION(3,16,0)+  glAreaResize,+  glAreaRender+#endif++  ) where++import Control.Monad    (liftM)+import Control.Monad.Trans              ( liftIO )+import System.Glib.FFI+import System.Glib.UTFString+import System.Glib.Attributes+import System.Glib.Properties+import System.Glib.GError+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)+import Graphics.UI.Gtk.Gdk.GLContext+{#import Graphics.UI.Gtk.Types#}+{#import Graphics.UI.Gtk.Signals#}++{# context lib="gtk" prefix="gtk" #}++--------------------+-- Constructors++#if GTK_CHECK_VERSION(3,16,0)+-- | Creates a new GLArea widget.+--+glAreaNew :: IO GLArea+glAreaNew =+  makeNewObject mkGLArea $+  liftM (castPtr :: Ptr Widget -> Ptr GLArea) $+  {# call unsafe gl_area_new #}+#endif+++--------------------+-- Methods+++#if GTK_CHECK_VERSION(3,16,0)+-- | Retrieves the 'Graphics.UI.Gtk.Gdk.GLContext.GLContext' used by area.+--+glAreaGetContext :: GLAreaClass self => self+    -> IO (Maybe GLContext)+glAreaGetContext self = do+    maybeNull (wrapNewGObject mkGLContext) $+        {# call gtk_gl_area_get_context #} (toGLArea self)+++-- | Ensures that the 'Graphics.UI.Gtk.Gdk.GLContext.GLContext' used by area is associated with the GLArea.+--+-- This function is automatically called before emitting the 'glAreaRender' signal,+-- and doesn't normally need to be called by application code.+--+glAreaMakeCurrent :: GLAreaClass self => self -> IO ()+glAreaMakeCurrent self =+    {# call gtk_gl_area_make_current #} (toGLArea self)+++-- | Marks the currently rendered data (if any) as invalid, and queues a redraw+-- of the widget, ensuring that the 'glAreaRender' signal is emitted during the draw.+--+-- This is only needed when 'glAreaSetAutoRender' has been called with a False+-- value. The default behaviour is to emit 'glAreaRender' on each draw.+--+glAreaQueueRender :: GLAreaClass self => self -> IO ()+glAreaQueueRender self =+    {# call gtk_gl_area_queue_render #} (toGLArea self)+++-- | Ensures that the area framebuffer object is made the current draw and read+-- target, and that all the required buffers for the area are created and+-- bound to the framebuffer.+--+-- This function is automatically called before emitting the 'glAreaRender' signal,+-- and doesn't normally need to be called by application code.+--+glAreaAttachBuffers :: GLAreaClass self => self -> IO ()+glAreaAttachBuffers self =+    {# call gtk_gl_area_attach_buffers #} (toGLArea self)+++-- | Gets the current error set on the area.+--+glAreaGetError :: GLAreaClass self => self -> IO (Maybe GError)+glAreaGetError self = do+    err <- {# call gtk_gl_area_get_error #} (toGLArea self)+    if err == nullPtr+        then return Nothing+        else liftM Just (peek $ castPtr err)+++-- | If hasAlpha is True the buffer allocated by the widget will have an alpha channel component,+-- and when rendering to the window the result will be composited over whatever is below the+-- widget.+--+-- If hasAlpha is False there will be no alpha channel, and the buffer will fully replace anything+-- below the widget.+--+glAreaSetHasAlpha :: GLAreaClass self => self -> Bool -> IO ()+glAreaSetHasAlpha self hasAlpha =+  {# call gl_area_set_has_alpha #}+    (toGLArea self)+    (fromBool hasAlpha)+++-- | Returns whether the area has an alpha component.+--+glAreaGetHasAlpha :: GLAreaClass self => self -> IO Bool+glAreaGetHasAlpha self =+  liftM toBool $+    {# call unsafe gl_area_get_has_alpha #} (toGLArea self)+++-- | If hasDepthBuffer is True the widget will allocate and enable a depth buffer for the target+-- framebuffer. Otherwise there will be none.+--+glAreaSetHasDepthBuffer :: GLAreaClass self => self -> Bool -> IO ()+glAreaSetHasDepthBuffer self hasDepthBuffer =+  {# call gl_area_set_has_depth_buffer #}+    (toGLArea self)+    (fromBool hasDepthBuffer)+++-- | Returns whether the area has a depth buffer.+--+glAreaGetHasDepthBuffer :: GLAreaClass self => self -> IO Bool+glAreaGetHasDepthBuffer self =+  liftM toBool $+    {# call unsafe gl_area_get_has_depth_buffer #} (toGLArea self)+++-- | If hasStencilBuffer is True the widget will allocate and enable a stencil buffer for the target+-- framebuffer. Otherwise there will be none.+--+glAreaSetHasStencilBuffer :: GLAreaClass self => self -> Bool -> IO ()+glAreaSetHasStencilBuffer self hasStencilBuffer =+  {# call gl_area_set_has_stencil_buffer #}+    (toGLArea self)+    (fromBool hasStencilBuffer)+++-- | Returns whether the area has a stencil buffer.+--+glAreaGetHasStencilBuffer :: GLAreaClass self => self -> IO Bool+glAreaGetHasStencilBuffer self =+  liftM toBool $+    {# call unsafe gl_area_get_has_stencil_buffer #} (toGLArea self)+++-- | If autoRender is True the 'glAreaRender' signal will be emitted every time the widget draws. This is+-- the default and is useful if drawing the widget is faster.+--+-- If autoRender is False the data from previous rendering is kept around and will be used for+-- drawing the widget the next time, unless the window is resized. In order to force a rendering+-- 'glAreaQueueRender' must be called. This mode is useful when the scene changes seldomly, but takes+-- a long time to redraw.+--+glAreaSetAutoRender :: GLAreaClass self => self -> Bool -> IO ()+glAreaSetAutoRender self autoRender =+  {# call gl_area_set_auto_render #}+    (toGLArea self)+    (fromBool autoRender)++-- | Returns whether the area is in auto render mode or not.+--+glAreaGetAutoRender :: GLAreaClass self => self -> IO Bool+glAreaGetAutoRender self =+  liftM toBool $+  {# call unsafe gl_area_get_auto_render #}+    (toGLArea self)+++-- | Retrieves the required version of OpenGL set using 'glAreaSetRequiredVersion'.+--+glAreaGetRequiredVersion :: GLAreaClass self => self -> IO (Int, Int)+glAreaGetRequiredVersion self = do+    alloca $ \majorPtr -> alloca $ \minorPtr -> do+        {# call gtk_gl_area_get_required_version #} (toGLArea self) majorPtr minorPtr+        major <- peek majorPtr+        minor <- peek minorPtr+        return (fromIntegral major, fromIntegral minor)+++-- | Sets the required version of OpenGL to be used when creating the context for the widget.+--+-- This function must be called before the area has been realized.+--+glAreaSetRequiredVersion :: GLAreaClass self => self -> Int -> Int -> IO ()+glAreaSetRequiredVersion self major minor =+    {# call gtk_gl_area_set_required_version #}+        (toGLArea self) (fromIntegral major) (fromIntegral minor)++#endif++--------------------+-- Attributes+++#if GTK_CHECK_VERSION(3,16,0)+-- | If set to True the 'glAreaRender' signal will be emitted every time the widget draws. This is the+-- default and is useful if drawing the widget is faster.+--+-- If set to False the data from previous rendering is kept around and will be used for drawing the+-- widget the next time, unless the window is resized. In order to force a rendering+-- 'glAreaQueueRender' must be called. This mode is useful when the scene changes seldomly, but+-- takes a long time to redraw.+--+-- Default value: True+--+glAreaAutoRender :: GLAreaClass self => Attr self Bool+glAreaAutoRender = newAttr+  glAreaGetAutoRender+  glAreaSetAutoRender+++-- | The 'Graphics.UI.Gtk.Gdk.GLContext.GLContext' used by the GLArea widget.+--+-- The GLArea widget is responsible for creating the 'Graphics.UI.Gtk.Gdk.GLContext.GLContext' instance. If you need to render with+-- other kinds of buffers (stencil, depth, etc), use render buffers.+--+glAreaContext :: GLAreaClass self => ReadAttr self (Maybe GLContext)+glAreaContext = readAttr glAreaGetContext+++-- | If set to True the buffer allocated by the widget will have an alpha channel component, and+-- when rendering to the window the result will be composited over whatever is below the widget.+--+-- If set to False there will be no alpha channel, and the buffer will fully replace anything below+-- the widget.+--+-- Default value: False+--+glAreaHasAlpha :: GLAreaClass self => Attr self Bool+glAreaHasAlpha = newAttr+  glAreaGetHasAlpha+  glAreaSetHasAlpha+++-- | If set to True the widget will allocate and enable a depth buffer for the target framebuffer.+--+-- Default value: False+--+glAreaHasDepthBuffer :: GLAreaClass self => Attr self Bool+glAreaHasDepthBuffer = newAttr+  glAreaGetHasDepthBuffer+  glAreaSetHasDepthBuffer+++-- | If set to True the widget will allocate and enable a stencil buffer for the target framebuffer.+--+-- Default value: False+--+glAreaHasStencilBuffer :: GLAreaClass self => Attr self Bool+glAreaHasStencilBuffer = newAttr+  glAreaGetHasStencilBuffer+  glAreaSetHasStencilBuffer++#endif++--------------------+-- Signals++#if GTK_CHECK_VERSION(3,16,0)++-- | The glAreaResize signal is emitted once when the widget is realized, and then each time the widget+-- is changed while realized. This is useful in order to keep GL state up to date with the widget+-- size, like for instance camera properties which may depend on the width/height ratio.+--+-- The GL context for the area is guaranteed to be current when this signal is emitted.+--+-- The default handler sets up the GL viewport.+--+glAreaResize :: GLAreaClass glac => Signal glac (Int -> Int -> IO ())+glAreaResize = Signal (connect_INT_INT__NONE "resize")+++-- | The glAreaRender signal is emitted every time the contents of the GLArea should be redrawn.+--+-- The context is bound to the area prior to emitting this function, and the buffers are painted+-- to the window once the emission terminates.+--+glAreaRender :: GLAreaClass glac => Signal glac (Maybe GLContext -> IO (Bool))+glAreaRender = Signal (connect_BOXED__BOOL "render" unwrapGLContextPtr)+++unwrapGLContextPtr :: Ptr GLContext -> IO (Maybe GLContext)+unwrapGLContextPtr ptr = do+    maybeNull (makeNewGObject mkGLContext) (return ptr)++#endif
Graphics/UI/Gtk/Misc/HandleBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.HandleBox ( -- * Detail--- +-- -- | The 'HandleBox' widget allows a portion of a window to be \"torn off\". -- It is a bin widget which displays its child and a handle that the user can -- drag to tear off a separate window (the float window) containing the child@@ -37,12 +37,12 @@ -- -- When reattaching, the ghost and float window, must be aligned along one -- of the edges, the snap edge. This either can be specified by the application--- programmer explicitely, or Gtk+ will pick a reasonable default based on the+-- programmer explicitly, or Gtk+ will pick a reasonable default based on the -- handle position. -- -- To make detaching and reattaching the handlebox as minimally confusing as -- possible to the user, it is important to set the snap edge so that the snap--- edge does not move when the handlebox is deattached. For instance, if the+-- edge does not move when the handlebox is detached. For instance, if the -- handlebox is packed at the bottom of a VBox, then when the handlebox is -- detached, the bottom edge of the handlebox's allocation will remain fixed as -- the height of the handlebox shrinks, so the snap edge should be set to@@ -91,15 +91,15 @@   afterChildDetached,   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Enums	(ShadowType(..), PositionType(..))+import Graphics.UI.Gtk.General.Enums    (ShadowType(..), PositionType(..))  {# context lib="gtk" prefix="gtk" #} @@ -227,7 +227,7 @@ -------------------- -- Signals --- Note: for these two signales we ignore the given Widget in the handler.+-- Note: for these two signals we ignore the given Widget in the handler.  -- | This signal is emitted when the contents of the handlebox are reattached -- to the main window.
Graphics/UI/Gtk/Misc/IMContextSimple.chs view
@@ -49,7 +49,7 @@   imContextSimpleAddTable,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import Data.Map (Map)  import System.Glib.FFI@@ -76,12 +76,12 @@ -- | 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+imContextSimpleAddTable :: (IMContextSimpleClass self, GlibString string) => 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@@ -91,7 +91,7 @@                        nx <- newUTFString x                        ny <- newUTFString y                        return (nx, ny)) (M.toList table)-  withArray (concatMap (\(x,y) -> [x, y]) tableList) $ \(tablePtr :: Ptr CString) -> +  withArray (concatMap (\(x,y) -> [x, y]) tableList) $ \(tablePtr :: Ptr CString) ->       {# call gtk_im_context_simple_add_table #}         (toIMContextSimple self)         (castPtr tablePtr)
Graphics/UI/Gtk/Misc/IMMulticontext.chs view
@@ -49,8 +49,6 @@   imMulticontextAppendMenuitems,   ) where -import Control.Monad	(liftM)- import System.Glib.FFI {#import Graphics.UI.Gtk.Types#} 
Graphics/UI/Gtk/Misc/SizeGroup.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.SizeGroup ( -- * Detail--- +-- -- | 'SizeGroup' provides a mechanism for grouping a number of widgets -- together so they all request the same amount of space. This is typically -- useful when you want a column of widgets to have the same size, but you@@ -87,11 +87,10 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import System.Glib.GObject		(wrapNewGObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -103,7 +102,7 @@  -- | Create a new 'SizeGroup'. ---sizeGroupNew :: +sizeGroupNew ::     SizeGroupMode -- ^ @mode@ - the mode for the new size group.  -> IO SizeGroup sizeGroupNew mode =
+ Graphics/UI/Gtk/Misc/Switch.chs view
@@ -0,0 +1,195 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) Widgets Switch+--+--  Author : Warlock <internalmike@gmail.com>+--+--  Created: 10 November 2017+--+--  Copyright (C) 2017 Warlock+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- A "light switch" style toggle+--+module Graphics.UI.Gtk.Misc.Switch (+-- * Detail+--+-- [...]+--+-- * Class Hierarchy+-- |+-- @+-- |  'GObject'+-- |   +----'Object'+-- |         +----'Widget'+-- |               +----'Switch'+-- @++-- * Types+#if GTK_MAJOR_VERSION >= 3+    Switch+  , castToSwitch+  , gTypeSwitch+  , toSwitch++-- * Constructors+  , switchNew++-- * Methods+  , switchSetActive+  , switchGetActive+#if GTK_CHECK_VERSION(3,14,0)+  , switchSetState+  , switchGetState+#endif++-- * Attributes+  , switchActive+#if GTK_CHECK_VERSION(3,14,0)+  , switchState+#endif++-- * Signals+  , switchActivate+#if GTK_CHECK_VERSION(3,14,0)+  , stateSet+#endif+#endif+) where++#if GTK_MAJOR_VERSION >= 3++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#}+{#import Graphics.UI.Gtk.Signals#}++{# context lib="gtk" prefix="gtk" #}++--------------------+-- Constructors++-- | Creates a new 'Switch'.+--+switchNew :: IO Switch+switchNew =+  makeNewObject mkSwitch $+  liftM (castPtr :: Ptr Widget -> Ptr Switch) $+  {# call unsafe switch_new #}++--------------------+-- Methods++-- | Changes the state of control to the desired one.+-- See 'switchGetActive'.+switchSetActive :: SwitchClass self => self+ -> Bool+ -> IO ()+switchSetActive self is_active =+  {# call switch_set_active #}+    (toSwitch self)+    (fromBool is_active)++-- | Gets whether the GtkSwitch is in its on or off state.+switchGetActive :: SwitchClass self => self+ -> IO Bool+switchGetActive self =+  liftM toBool $+  {# call switch_get_active #}+    (toSwitch self)++#if GTK_CHECK_VERSION(3,14,0)+-- | Sets the underlying state of the GtkSwitch.+-- Normally, this is the same as 'switchActive', unless the switch is set up for+-- delayed state changes. This function is typically called+-- from a 'stateSet' signal handler.+--+-- See 'stateSet' for details.+switchSetState :: SwitchClass self => self+ -> Bool+ -> IO ()+switchSetState self state =+  {# call switch_set_state #}+    (toSwitch self)+    (fromBool state)++-- | Gets the underlying state of the GtkSwitch.+-- Set 'switchSetState'.+switchGetState :: SwitchClass self => self+ -> IO Bool+switchGetState self =+  liftM toBool $+  {# call switch_get_state #}+    (toSwitch self)+#endif++--------------------+-- Attributes++-- | Whether the switch is in its on or off state.+--+-- Default value: @False@+--+switchActive :: SwitchClass self => Attr self Bool+switchActive = newAttr+  switchGetActive+  switchSetActive++#if GTK_CHECK_VERSION(3,14,0)+-- | The backend state that is controlled by the switch. See 'stateSet' for details.+--+-- Default value: @False@+--+switchState :: SwitchClass self => Attr self Bool+switchState = newAttr+  switchGetState+  switchSetState+#endif++--------------------+-- Signals+++-- | This signal on GtkSwitch is an action signal and emitting it causes+-- the switch to animate. Applications should never connect to this signal,+-- but use the notify::active signal.+--+switchActivate :: SwitchClass self => Signal self (IO ())+switchActivate = Signal (connect_NONE__NONE "activate")++#if GTK_CHECK_VERSION(3,14,0)+-- | This signal on GtkSwitch is emitted to change the underlying state.+-- It is emitted when the user changes the switch position.+-- The default handler keeps the state in sync with the 'switchActive' property.+--+-- To implement delayed state change, applications can connect to this signal,+-- initiate the change of the underlying state, and call 'switchSetState'+-- when the underlying state change is complete.+-- The signal handler should return @True@ to prevent the default handler from running.+--+-- Visually, the underlying state is represented by the through color of the switch,+-- while the 'switchActive' property is represented by the position of the switch.+--+stateSet :: SwitchClass self => Signal self (Bool -> IO Bool)+stateSet = Signal (connect_BOOL__BOOL "state-set")+#endif++#endif
Graphics/UI/Gtk/Misc/Tooltip.chs view
@@ -43,24 +43,24 @@ -- --   * Set the 'hasTooltip' property to 'True', this will make GTK+ monitor the widget for motion and --     related events which are needed to determine when and where to show a tooltip.---    +-- --   * Connect to the 'queryTooltip' signal. This signal will be emitted when a tooltip is supposed to --     be shown. One of the arguments passed to the signal handler is a 'Tooltip' object. This is the --     object that we are about to display as a tooltip, and can be manipulated in your callback using --     functions like 'tooltipSetIcon'. There are functions for setting the tooltip's markup, --     setting an image from a stock icon, or even putting in a custom widget.---    +-- --   * Return 'True' from your query-tooltip handler. This causes the tooltip to be show. If you return --    'False', it will not be shown.---    +-- -- In the probably rare case where you want to have even more control over the tooltip that is about to -- be shown, you can set your own 'Window' which will be used as tooltip window. This works as -- follows:--- +-- --   * Set 'hasTooltip' and connect to 'queryTooltip' as before.---    +-- --   * Use 'widgetSetTooltipWindow' to set a 'Window' created by you as tooltip window.---    +-- --   * In the 'queryTooltip' callback you can access your window using 'widgetGetTooltipWindow' --     and manipulate as you wish. The semantics of the return value are exactly as before, return 'True' --     to show the window, 'False' to not show it.@@ -99,14 +99,13 @@ #endif   ) where -import Control.Monad	(liftM)+#if GTK_CHECK_VERSION(2,12,0)+ import Data.Maybe (fromMaybe)  import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GObject		(constructNewGObject,makeNewGObject)-import Graphics.UI.Gtk.General.Structs	(IconSize(..), Rectangle)-import Graphics.Rendering.Pango.Markup+import Graphics.UI.Gtk.General.Structs  (IconSize(..), Rectangle) {#import Graphics.UI.Gtk.Types#} #ifdef HAVE_GIO {#import System.GIO.Types#}@@ -114,15 +113,14 @@  {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,12,0) -------------------- -- Methods  -- | Sets the text of the tooltip to be @markup@, which is marked up with the -- Pango text markup language. If @markup@ is 'Nothing', the label will be hidden. ---tooltipSetMarkup :: TooltipClass self => self- -> Maybe Markup -- ^ @markup@ - a markup string (see Pango markup format) or 'Nothing'+tooltipSetMarkup :: (TooltipClass self, GlibString markup) => self+ -> Maybe markup -- ^ @markup@ - a markup string (see Pango markup format) or 'Nothing'  -> IO () tooltipSetMarkup self markup =   maybeWith withUTFString markup $ \markupPtr ->@@ -133,8 +131,8 @@ -- | Sets the text of the tooltip to be @text@. If @text@ is 'Nothing' -- the label will be hidden. See also 'tooltipSetMarkup'. ---tooltipSetText :: TooltipClass self => self- -> Maybe String -- ^ @text@ - a text string or 'Nothing'+tooltipSetText :: (TooltipClass self, GlibString string) => self+ -> Maybe string -- ^ @text@ - a text string or 'Nothing'  -> IO () tooltipSetText self text =   maybeWith withUTFString text $ \textPtr ->@@ -157,12 +155,12 @@ -- stock item indicated by @stockId@ with the size indicated by @size@. If -- @stockId@ is 'Nothing' the image will be hidden. ---tooltipSetIconFromStock :: TooltipClass self => self-  -> Maybe String -- ^ @id@ a stock id, or 'Nothing' -  -> IconSize -- ^ @size@ a stock icon size   +tooltipSetIconFromStock :: (TooltipClass self, GlibString string) => self+  -> Maybe string -- ^ @id@ a stock id, or 'Nothing'+  -> IconSize -- ^ @size@ a stock icon size   -> IO () tooltipSetIconFromStock self id size =-  maybeWith withUTFString id $ \ idPtr -> +  maybeWith withUTFString id $ \ idPtr ->   {#call tooltip_set_icon_from_stock#}     (toTooltip self)     idPtr@@ -175,12 +173,12 @@ -- -- * Available since Gtk+ version 2.14 ---tooltipSetIconFromIconName :: TooltipClass self => self-  -> Maybe String -- ^ @iconName@ an icon name, or 'Nothing' -  -> IconSize  -- ^ @size@ a stock icon size     +tooltipSetIconFromIconName :: (TooltipClass self, GlibString string) => self+  -> Maybe string -- ^ @iconName@ an icon name, or 'Nothing'+  -> IconSize  -- ^ @size@ a stock icon size   -> IO () tooltipSetIconFromIconName self iconName size =-  maybeWith withUTFString iconName $ \ iconPtr -> +  maybeWith withUTFString iconName $ \ iconPtr ->   {#call tooltip_set_icon_from_icon_name#}     (toTooltip self)     iconPtr@@ -192,11 +190,11 @@ -- a box with a 'Image' and 'Label' is embedded in the tooltip, which can be -- configured using 'tooltipSetMarkup' and 'tooltipSetIcon'. ---tooltipSetCustom :: (TooltipClass self, WidgetClass widget) => self -  -> Maybe widget  -- ^ @customWidget@ a 'Widget', or 'Nothing' to unset the old custom widget. +tooltipSetCustom :: (TooltipClass self, WidgetClass widget) => self+  -> Maybe widget  -- ^ @customWidget@ a 'Widget', or 'Nothing' to unset the old custom widget.   -> IO () tooltipSetCustom self customWidget =-  {#call tooltip_set_custom#} +  {#call tooltip_set_custom#}     (toTooltip self)     (maybe (Widget nullForeignPtr) toWidget customWidget) @@ -221,7 +219,7 @@ -- tooltipSetTipArea :: TooltipClass self => self -> Rectangle -> IO () tooltipSetTipArea self rect =-  with rect $ \ rectPtr -> +  with rect $ \ rectPtr ->   {#call tooltip_set_tip_area#}     (toTooltip self)     (castPtr rectPtr)@@ -231,8 +229,8 @@ #if GTK_CHECK_VERSION(2,20,0) -- | Sets the icon of the tooltip (which is in front of the text) to be the icon indicated by gicon with -- the size indicated by size. If gicon is 'Nothing', the image will be hidden.-tooltipSetIconFromGIcon :: TooltipClass self => self -                        -> Maybe Icon  -- ^ @gicon@   a GIcon representing the icon, or 'Nothing'. allow-none. +tooltipSetIconFromGIcon :: TooltipClass self => self+                        -> Maybe Icon  -- ^ @gicon@   a GIcon representing the icon, or 'Nothing'. allow-none.                         -> IconSize                         -> IO () tooltipSetIconFromGIcon tooltip icon size =
Graphics/UI/Gtk/Misc/Viewport.chs view
@@ -81,13 +81,14 @@   viewportShadowType,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)+import Data.Maybe (fromMaybe)  import System.Glib.FFI import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(ShadowType(..))+import Graphics.UI.Gtk.General.Enums    (ShadowType(..))  {# context lib="gtk" prefix="gtk" #} @@ -96,16 +97,16 @@  -- | Creates a new 'Viewport' with the given adjustments. ---viewportNew :: -    Adjustment  -- ^ @hadjustment@ - horizontal adjustment.- -> Adjustment  -- ^ @vadjustment@ - vertical adjustment.+viewportNew ::+    Maybe Adjustment  -- ^ @hadjustment@ - horizontal adjustment.+ -> Maybe Adjustment  -- ^ @vadjustment@ - vertical adjustment.  -> IO Viewport viewportNew hadjustment vadjustment =   makeNewObject mkViewport $   liftM (castPtr :: Ptr Widget -> Ptr Viewport) $   {# call unsafe viewport_new #}-    hadjustment-    vadjustment+    (fromMaybe (Adjustment nullForeignPtr) hadjustment)+    (fromMaybe (Adjustment nullForeignPtr) vadjustment)  -------------------- -- Methods
Graphics/UI/Gtk/ModelView.chs view
@@ -24,7 +24,7 @@ -- Portability : portable (depends on GHC) -- -- New model-based tree\/list widget system.--- +-- -- This just re-exports the Graphics.UI.Gtk.ModelView.* modules. -- -- * Note: From this version of Gtk2Hs this system will be the default
Graphics/UI/Gtk/ModelView/CellEditable.chs view
@@ -54,14 +54,13 @@ -- * Attributes #if GTK_CHECK_VERSION(2,20,0)   cellEditableEditingCanceled,-#endif  +#endif  -- * Signals   cellEditableEditingDone,   cellEditableRemoveWidget,   ) where -import Control.Monad	(liftM) import Control.Monad.Reader.Class (ask) import Control.Monad.Trans (liftIO) @@ -70,15 +69,14 @@ 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)+import Graphics.UI.Gtk.Gdk.EventM (EventM, EAny)  {# context lib="gtk" prefix="gtk" #}  -------------------- -- Methods --- | Begins editing on a @cellEditable@. @event@ is the 'Event' that began the editing process. +-- | Begins editing on a @cellEditable@. @event@ is the 'Event' that began the editing process. -- cellEditableStartEditing :: CellEditableClass self => self -> EventM EAny () cellEditableStartEditing self = do@@ -105,9 +103,9 @@ -- 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
Graphics/UI/Gtk/ModelView/CellLayout.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.ModelView.CellLayout ( -- * Detail--- +-- -- | 'CellLayout' is an interface which is implemented by all objects which -- provide a 'TreeViewColumn' API for packing cells, setting attributes and data funcs. @@ -68,7 +68,6 @@ import System.Glib.FFI import System.Glib.GList import System.Glib.Attributes-import System.Glib.GObject (destroyFunPtr) import System.Glib.GType {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#}@@ -171,7 +170,7 @@ cellLayoutAddColumnAttribute :: (CellLayoutClass self, CellRendererClass cell) => self  -> cell   -- ^ @cell@ - A 'CellRenderer'.  -> ReadWriteAttr cell a v  -- ^ @attribute@ - An attribute of a renderer.- -> ColumnId row v    -- ^ @column@ - The virtual column of the model from which to + -> ColumnId row v    -- ^ @column@ - The virtual column of the model from which to                       -- retrieve the attribute.  -> IO () cellLayoutAddColumnAttribute self cell attr column =@@ -200,15 +199,15 @@ -- pass the child model to this function. -- cellLayoutSetAttributes :: (CellLayoutClass self,-			     CellRendererClass cell,-			     TreeModelClass (model row),-			     TypedTreeModelClass model)+                             CellRendererClass cell,+                             TreeModelClass (model row),+                             TypedTreeModelClass model)  => self  -> cell   -- ^ @cell@ - A 'CellRenderer'.  -> model row -- ^ @model@ - A model containing rows of type @row@.  -> (row -> [AttrOp cell]) -- ^ Function to set attributes on the cell renderer.  -> IO ()-cellLayoutSetAttributes self cell model attributes = +cellLayoutSetAttributes self cell model attributes =   cellLayoutSetAttributeFunc self cell model $ \iter -> do     row <- treeModelGetRow model iter     set cell (attributes row)@@ -217,8 +216,8 @@ -- attributes of the 'CellRenderer' @cell@ using the row's content. -- cellLayoutSetAttributeFunc :: (CellLayoutClass self,-			       CellRendererClass cell,-			       TreeModelClass model)+                               CellRendererClass cell,+                               TreeModelClass model)  => self  -> cell   -- ^ @cell@ - A 'CellRenderer'.  -> model  -- ^ @model@ - A model from which to draw data.@@ -226,12 +225,12 @@  -> IO () cellLayoutSetAttributeFunc self cell model func = do   fPtr <- mkSetAttributeFunc $ \_ cellPtr' modelPtr' iterPtr _ -> do-    iter <- convertIterFromParentToChildModel iterPtr modelPtr' +    iter <- convertIterFromParentToChildModel iterPtr modelPtr'       (toTreeModel model)     let (CellRenderer cellPtr) = toCellRenderer cell     if unsafeForeignPtrToPtr cellPtr  /= cellPtr' then       error ("cellLayoutSetAttributeFunc: attempt to set attributes of "++-	     "a different CellRenderer.")+             "a different CellRenderer.")       else func iter   {#call gtk_cell_layout_set_cell_data_func #} (toCellLayout self)     (toCellRenderer cell) fPtr (castFunPtrToPtr fPtr) destroyFunPtr@@ -286,14 +285,14 @@  foreign import ccall safe "gtk_tree_model_filter_convert_iter_to_child_iter"   treeModelFilterConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter ->-    Ptr TreeIter -> IO () +    Ptr TreeIter -> IO ()  foreign import ccall unsafe "gtk_tree_model_sort_get_model"   treeModelSortGetModel :: Ptr TreeModel -> IO (Ptr TreeModel)-  + foreign import ccall safe "gtk_tree_model_sort_convert_iter_to_child_iter"   treeModelSortConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter ->-    Ptr TreeIter -> IO () +    Ptr TreeIter -> IO ()  -- | Clears all existing attributes previously set with -- 'cellLayoutSetAttributes'.
Graphics/UI/Gtk/ModelView/CellRenderer.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.CellRenderer ( -- * Detail---	 +--       -- | The 'CellRenderer' is a base class of a set of objects used for rendering -- a cell to a 'Drawable'. These objects are used primarily by the 'TreeView' -- widget, though they aren't tied to them in any specific way. It is worth@@ -114,11 +114,12 @@   ) where  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes ( Attr, WriteAttr ) import System.Glib.Properties {#import Graphics.UI.Gtk.Types#} #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.Gdk.GC		(Color)+import Graphics.UI.Gtk.Gdk.GC           (Color) #endif {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.ModelView.Types#}@@ -145,7 +146,7 @@ #endif  -- %hash c:6d51 d:dc3e--- | Returns	@(width, height)@	denoting the size of the fixed size of+-- | Returns    @(width, height)@       denoting the size of the fixed size of -- @cell@. If no fixed size is set, returns @-1@ for that value. -- cellRendererGetFixedSize :: CellRendererClass self => self@@ -267,7 +268,7 @@ -- -- Default value: @\"\"@ ---cellBackground :: CellRendererClass self => WriteAttr self String+cellBackground :: (CellRendererClass self, GlibString string) => WriteAttr self string cellBackground = writeAttrFromStringProperty "cell-background"  #if GTK_MAJOR_VERSION < 3@@ -305,7 +306,7 @@  #if GTK_CHECK_VERSION(2,6,0) -- %hash c:41f0 d:49f--- | This signal gets emitted when a cell starts to be edited. The indended+-- | This signal gets emitted when a cell starts to be edited. The intended -- use of this signal is to do special setup on @editable@, e.g. adding a -- 'EntryCompletion' or setting up additional columns in a 'ComboBox'. --@@ -324,11 +325,11 @@ -- * Available since Gtk+ version 2.6 -- editingStarted :: CellRendererClass self =>-		  Signal self (Widget -> TreePath -> IO ())+                  Signal self (Widget -> TreePath -> IO ()) editingStarted = Signal editingStartedInternal  editingStartedInternal after cr act =- connect_OBJECT_STRING__NONE "editing-started" after cr+ connect_OBJECT_GLIBSTRING__NONE "editing-started" after cr  $ \ce path -> act ce (stringToTreePath path) #endif #endif
Graphics/UI/Gtk/ModelView/CellRendererAccel.chs view
@@ -73,9 +73,10 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties import Graphics.UI.Gtk.Gdk.Enums (Modifier)@@ -107,9 +108,9 @@ -- Attributes  -- | The keyval of the accelerator.--- +-- -- Allowed values: <= GMaxint--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.10@@ -127,9 +128,9 @@  -- | 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@@ -140,7 +141,7 @@ -- | 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@@ -156,15 +157,15 @@ -- -- * Available since Gtk+ version 2.10 ---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 -> +accelEdited :: (CellRendererAccelClass self, GlibString string) => Signal self (string -> KeyVal -> Modifier -> KeyCode -> IO ())+accelEdited = Signal (\after obj user -> connect_GLIBSTRING_INT_ENUM_INT__NONE "accel_edited" after obj+                      (\ path keyval modifier keycode ->                         user path (fromIntegral keyval) modifier (fromIntegral keycode)))  -- | 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")+accelCleared :: (CellRendererAccelClass self, GlibString string) => Signal self (string -> IO ())+accelCleared = Signal (connect_GLIBSTRING__NONE "accel_cleared") #endif
Graphics/UI/Gtk/ModelView/CellRendererCombo.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.ModelView.CellRendererCombo ( -- * Detail---       +-- -- | 'CellRendererCombo' renders text in a cell like -- 'Graphics.UI.Gtk.ModelView.CellRendererText' from which it is derived. But -- while 'Graphics.UI.Gtk.ModelView.CellRendererText' offers a simple entry to@@ -73,9 +73,9 @@ import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes                   (Attr, WriteAttr, writeAttr) import System.Glib.Properties-import System.Glib.GObject                      (constructNewGObject) import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#}@@ -88,7 +88,7 @@ -- Constructors  -- | Creates a new 'CellRendererCombo'. This 'Renderer' allows for displaying---   a fixed set of options the user can choose from. +--   a fixed set of options the user can choose from. -- cellRendererComboNew :: IO CellRendererCombo cellRendererComboNew = do@@ -112,12 +112,13 @@ --   tree model can be a datum in the tree model that is used to populate the --   view in which the 'CellRendererCombo' is part of. In other words, it is --   possible that every 'CellRendererCombo' can show a different set of---   options on each row. +--   options on each row. -- cellComboTextModel :: ( TreeModelClass (model row),                         TypedTreeModelClass model,-                        CellRendererComboClass self) =>-                        WriteAttr self (model row, ColumnId row String)+                        CellRendererComboClass self,+                        GlibString string) =>+                        WriteAttr self (model row, ColumnId row string) cellComboTextModel = writeAttr setter   where   setter cr (model, col) = do
Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs view
@@ -72,12 +72,13 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes                   (Attr) import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -107,7 +108,7 @@ cellPixbufExpanderOpen :: CellRendererPixbufClass self => Attr self Pixbuf cellPixbufExpanderOpen = newAttrFromObjectProperty "pixbuf-expander-open"   {# call pure unsafe gdk_pixbuf_get_type #}-  + -- | Pixbuf for closed expander. -- cellPixbufExpanderClosed :: CellRendererPixbufClass self => Attr self Pixbuf@@ -118,7 +119,7 @@ -- -- Default value: @\"\"@ ---cellPixbufStockId :: CellRendererPixbufClass self => Attr self String+cellPixbufStockId :: (CellRendererPixbufClass self, GlibString string) => Attr self string cellPixbufStockId = newAttrFromStringProperty "stock-id"  -- | The 'IconSize' value that specifies the size of the rendered icon.@@ -132,7 +133,7 @@ -- -- Default value: @\"\"@ ---cellPixbufStockDetail :: CellRendererPixbufClass self => Attr self String+cellPixbufStockDetail :: (CellRendererPixbufClass self, GlibString string) => Attr self string cellPixbufStockDetail = newAttrFromStringProperty "stock-detail"  #if GTK_CHECK_VERSION(2,8,0)@@ -141,7 +142,7 @@ -- -- Default value: @\"\"@ ---cellPixbufIconName :: CellRendererPixbufClass self => Attr self String+cellPixbufIconName :: (CellRendererPixbufClass self, GlibString string) => Attr self string cellPixbufIconName = newAttrFromStringProperty "icon-name"  -- | Specifies whether the rendered pixbuf should be colorized according to
Graphics/UI/Gtk/ModelView/CellRendererProgress.chs view
@@ -59,12 +59,13 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Attributes			(Attr)+import System.Glib.UTFString+import System.Glib.Attributes                   (Attr) import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -101,6 +102,6 @@ -- -- Default value: @Nothing@ ---cellProgressText :: CellRendererProgressClass self => Attr self (Maybe String)+cellProgressText :: (CellRendererProgressClass self, GlibString string) => Attr self (Maybe string) cellProgressText = newAttrFromMaybeStringProperty "text" #endif
Graphics/UI/Gtk/ModelView/CellRendererSpin.chs view
@@ -73,7 +73,7 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes@@ -99,7 +99,7 @@ -------------------- -- Attributes --- | The adjustment that holds the value of the spinbutton. +-- | The adjustment that holds the value of the spinbutton. -- -- * Available since Gtk+ version 2.10 --@@ -108,9 +108,9 @@                                {# 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@@ -119,9 +119,9 @@ cellRendererSpinClimbRate = newAttrFromDoubleProperty "climb-rate"  -- | The number of decimal places to display.--- +-- -- Allowed values: <= 20--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.10
Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs view
@@ -23,7 +23,7 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) ----- Renders a spinning animation in a cell                                                             +-- Renders a spinning animation in a cell -- -- * Module available since Gtk+ version 2.20 --@@ -32,7 +32,7 @@ -- | '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'.@@ -46,9 +46,9 @@ -- |         +----'CellRenderer' -- |               +----'CellRendererSpinner' -- @-  + #if GTK_CHECK_VERSION(2,20,0)--- * Types  +-- * Types   CellRendererSpinner,   CellRendererSpinnerClass,   castToCellRendererSpinner,@@ -64,13 +64,13 @@ #endif ) where -import Control.Monad	(liftM)+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.General.Structs  (IconSize(..)) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -86,7 +86,7 @@   {#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@@ -97,11 +97,11 @@  -- | 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@@ -111,7 +111,7 @@     newAttrFromIntProperty "pulse"  -- | The 'IconSize' value that specifies the size of the rendered spinner.--- +-- -- Default value: 'IconSizeMenu' -- -- * Available since Gtk+ version 2.20
Graphics/UI/Gtk/ModelView/CellRendererText.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.CellRendererText ( -- * Detail--- +-- -- | A 'CellRendererText' renders a given text in its cell, using the font, -- color and style information provided by its attributes. The text will be -- ellipsized if it is too long and the ellipsize property allows it.@@ -118,20 +118,21 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Properties import System.Glib.Attributes (Attr, WriteAttr)-import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.ModelView.Types#}-import Graphics.UI.Gtk.General.Structs		(Color(..))+import Graphics.UI.Gtk.General.Structs          () import Graphics.Rendering.Pango.Enums {#import Graphics.Rendering.Pango.BasicTypes#} ( FontDescription(..),-					 makeNewFontDescription )-{#import Graphics.Rendering.Pango.Layout#}	( LayoutAlignment, LayoutWrapMode )+                                         makeNewFontDescription )+{#import Graphics.Rendering.Pango.Layout#}      ( LayoutAlignment, LayoutWrapMode )  {# context lib="gtk" prefix="gtk" #} @@ -153,7 +154,7 @@ -- 'cellTextFont' and 'Graphics.UI.Gtk.ModelView.CellRenderer.cellYPad' -- attribute set on it. Further changes in these properties do not affect the -- height, so they must be accompanied by a subsequent call to this function.--- Using this function is unflexible, and should really only be used if+-- Using this function is inflexible, and should really only be used if -- calculating the size of a cell is too slow (ie, a massive number of cells -- displayed). If @numberOfRows@ is -1, then the fixed height is unset, and -- the height is determined by the properties again.@@ -175,7 +176,7 @@ -- -- Default value: @\"\"@ ---cellTextBackground :: CellRendererClass self => WriteAttr self String+cellTextBackground :: (CellRendererClass self, GlibString string) => WriteAttr self string cellTextBackground = writeAttrFromStringProperty "background"  -- | Text background color as a 'Color'.@@ -212,7 +213,7 @@ -- cellTextEllipsize :: CellRendererTextClass self => Attr self EllipsizeMode cellTextEllipsize = newAttrFromEnumProperty "ellipsize"-		{# call pure pango_ellipsize_mode_get_type #}+                {# call pure pango_ellipsize_mode_get_type #}  -- | Whether the 'cellTextEllipsize' tag affects the ellipsize mode. --@@ -224,7 +225,7 @@  -- | Name of the font family, e.g. Sans, Helvetica, Times, Monospace. ---cellTextFamily :: CellRendererTextClass self => Attr self String+cellTextFamily :: (CellRendererTextClass self, GlibString string) => Attr self string cellTextFamily = newAttrFromStringProperty "family"  -- | Determines if 'cellTextFamily' has an effect.@@ -234,7 +235,7 @@  -- | Font description as a string. ---cellTextFont :: CellRendererTextClass self => Attr self String+cellTextFont :: (CellRendererTextClass self, GlibString string) => Attr self string cellTextFont = newAttrFromStringProperty "font"  -- | Font description as a 'Graphics.Rendering.Pango.FontDescription'.@@ -248,7 +249,7 @@ -- -- Default value: @\"\"@ ---cellTextForeground :: CellRendererClass self => WriteAttr self String+cellTextForeground :: (CellRendererClass self, GlibString string) => WriteAttr self string cellTextForeground = writeAttrFromStringProperty "foreground"  -- | Text foreground color as a 'Color'.@@ -268,7 +269,7 @@ --   a hint when rendering the text. If you don't understand this parameter, --   you probably don't need it. ---cellTextLanguage :: CellRendererTextClass self => Attr self (Maybe String)+cellTextLanguage :: (CellRendererTextClass self, GlibString string) => Attr self (Maybe string) cellTextLanguage = newAttrFromMaybeStringProperty "language"  -- | Whether the 'cellTextLanguage' tag is used, default is @False@.@@ -278,7 +279,7 @@  -- | Define a markup string instead of a text. See 'cellText'. ---cellTextMarkup :: CellRendererTextClass cr => WriteAttr cr (Maybe String)+cellTextMarkup :: (CellRendererTextClass cr, GlibString string) => WriteAttr cr (Maybe string) cellTextMarkup  = writeAttrFromMaybeStringProperty "markup"  -- %hash c:4e25 d:f7c6@@ -339,7 +340,7 @@ -- cellTextStretch :: CellRendererTextClass self => Attr self Stretch cellTextStretch = newAttrFromEnumProperty "stretch"-	      {# call pure pango_stretch_get_type #}+              {# call pure pango_stretch_get_type #}  -- | Whether the 'cellTextStretch' tag is used, default is @False@. --@@ -360,7 +361,7 @@ -- cellTextStyle :: CellRendererTextClass self => Attr self FontStyle cellTextStyle = newAttrFromEnumProperty "style"-	    {# call pure pango_style_get_type #}+            {# call pure pango_style_get_type #}  -- | Whether the 'cellTextStyle' tag is used, default is @False@. --@@ -370,14 +371,14 @@ -- | Define the attribute that specifies the text to be rendered. See --   also 'cellTextMarkup'. ---cellText :: CellRendererTextClass cr => Attr cr String+cellText :: (CellRendererTextClass cr, GlibString string) => Attr cr string cellText  = newAttrFromStringProperty "text"  -- | Style of underline for this text. -- cellTextUnderline :: CellRendererTextClass self => Attr self Underline cellTextUnderline = newAttrFromEnumProperty "underline"-		{# call pure pango_underline_get_type #}+                {# call pure pango_underline_get_type #}  -- | Whether the 'cellTextUnderline' tag is used, default is @False@. --@@ -388,7 +389,7 @@ -- cellTextVariant :: CellRendererTextClass self => Attr self Variant cellTextVariant = newAttrFromEnumProperty "variant"-	      {# call pure pango_variant_get_type #}+              {# call pure pango_variant_get_type #}  -- | Whether the 'cellTextVariant' tag is used, default is @False@. --@@ -429,7 +430,7 @@ -- cellTextWrapMode :: CellRendererTextClass self => Attr self LayoutWrapMode cellTextWrapMode = newAttrFromEnumProperty "wrap-mode"-	       {# call pure pango_wrap_mode_get_type #}+               {# call pure pango_wrap_mode_get_type #}  -- | Specifies the width at which the text is wrapped. The wrap-mode --   property can be used to influence at what character positions the@@ -472,12 +473,12 @@ -- indicates that the model should be updated with the supplied value. -- The value is always a string which matches the 'cellText' attribute of -- 'CellRendererText' (and its derivates like 'CellRendererCombo').--- --- * This signal is not emitted when editing is disabled (see +--+-- * This signal is not emitted when editing is disabled (see --   'cellTextEditable') or when the user aborts editing. ---edited :: CellRendererTextClass self =>-	  Signal self (TreePath -> String -> IO ())+edited :: (CellRendererTextClass self, GlibString string) =>+          Signal self (TreePath -> string -> IO ()) edited = Signal internalEdited  --------------------@@ -485,24 +486,24 @@  #ifndef DISABLE_DEPRECATED -- %hash c:76ed-onEdited :: CellRendererTextClass self => self- -> (TreePath -> String -> IO ())+onEdited :: (CellRendererTextClass self, GlibString string) => self+ -> (TreePath -> string -> IO ())  -> IO (ConnectId self) onEdited = internalEdited False {-# DEPRECATED onEdited "instead of 'onEdited obj' use 'on obj edited'" #-}  -- %hash c:f70c-afterEdited :: CellRendererTextClass self => self- -> (TreePath -> String -> IO ())+afterEdited :: (CellRendererTextClass self, GlibString string) => self+ -> (TreePath -> string -> IO ())  -> IO (ConnectId self) afterEdited = internalEdited True {-# DEPRECATED afterEdited "instead of 'afterEdited obj' use 'after obj edited'" #-} #endif -internalEdited :: CellRendererTextClass cr =>-		  Bool -> cr ->-                  (TreePath -> String -> IO ()) ->+internalEdited :: (CellRendererTextClass cr, GlibString string) =>+                  Bool -> cr ->+                  (TreePath -> string -> IO ()) ->                   IO (ConnectId cr) internalEdited after cr user =-  connect_STRING_STRING__NONE "edited" after cr $ \path string -> do+  connect_GLIBSTRING_GLIBSTRING__NONE "edited" after cr $ \path string -> do     user (stringToTreePath path) string
Graphics/UI/Gtk/ModelView/CellRendererToggle.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.CellRendererToggle ( -- * Detail--- +-- -- | 'CellRendererToggle' renders a toggle button in a cell. The button is -- drawn as a radio or checkbutton, depending on the radio property. When -- activated, it emits the toggled signal.@@ -73,13 +73,14 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes                   (Attr)-import System.Glib.Properties			(newAttrFromBoolProperty,-						 newAttrFromIntProperty)-import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)+import System.Glib.Properties                   (newAttrFromBoolProperty,+                                                 newAttrFromIntProperty)+import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -210,24 +211,24 @@ --   represents a 'TreePath' into the model and can be converted using --   'stringToTreePath'. ---cellToggled :: CellRendererToggleClass self => Signal self (String -> IO ())-cellToggled = Signal (connect_STRING__NONE "toggled")+cellToggled :: (CellRendererToggleClass self, GlibString string) => Signal self (string -> IO ())+cellToggled = Signal (connect_GLIBSTRING__NONE "toggled")  -------------------- -- Deprecated Signals  #ifndef DISABLE_DEPRECATED -- %hash c:21f7-onCellToggled :: CellRendererToggleClass self => self- -> (String -> IO ())+onCellToggled :: (CellRendererToggleClass self, GlibString string) => self+ -> (string -> IO ())  -> IO (ConnectId self)-onCellToggled = connect_STRING__NONE "toggled" False+onCellToggled = connect_GLIBSTRING__NONE "toggled" False {-# DEPRECATED onCellToggled "instead of 'onCellToggled obj' use 'on obj cellToggled'" #-}  -- %hash c:82f6-afterCellToggled :: CellRendererToggleClass self => self- -> (String -> IO ())+afterCellToggled :: (CellRendererToggleClass self, GlibString string) => self+ -> (string -> IO ())  -> IO (ConnectId self)-afterCellToggled = connect_STRING__NONE "toggled" True+afterCellToggled = connect_GLIBSTRING__NONE "toggled" True {-# DEPRECATED afterCellToggled "instead of 'afterCellToggled obj' use 'after obj cellToggled'" #-} #endif
Graphics/UI/Gtk/ModelView/CellView.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.ModelView.CellView ( -- * Detail--- +-- -- | A 'CellView' displays a single row of a 'TreeModel', using cell renderers -- just like 'TreeView'. 'CellView' doesn't support some of the more complex -- features of 'TreeView', like cell editing and drag and drop.@@ -69,16 +69,18 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import System.Glib.Properties			(writeAttrFromStringProperty)+import System.Glib.Properties                   (writeAttrFromStringProperty)+#if GTK_MAJOR_VERSION < 3 {#import System.Glib.GList#}+#endif {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.ModelView.Types#}-import Graphics.UI.Gtk.General.Structs		(Color, Requisition)+import Graphics.UI.Gtk.General.Structs          (Color, Requisition)  {# context lib="gtk" prefix="gtk" #} @@ -98,8 +100,8 @@ -- makes its show @markup@. The text can be marked up with the Pango -- text markup language. ---cellViewNewWithMarkup :: -    String      -- ^ @markup@ - the text to display in the cell view+cellViewNewWithMarkup :: GlibString string+ => string      -- ^ @markup@ - the text to display in the cell view  -> IO CellView cellViewNewWithMarkup markup =   makeNewObject mkCellView $@@ -111,7 +113,7 @@ -- | Creates a new 'CellView' widget, adds a 'CellRendererPixbuf' to it, and -- makes its show @pixbuf@. ---cellViewNewWithPixbuf :: +cellViewNewWithPixbuf ::     Pixbuf      -- ^ @pixbuf@ - the image to display in the cell view  -> IO CellView cellViewNewWithPixbuf pixbuf =@@ -123,8 +125,8 @@ -- | Creates a new 'CellView' widget, adds a 'CellRendererText' to it, and -- makes its show @text@. ---cellViewNewWithText :: -    String      -- ^ @text@ - the text to display in the cell view+cellViewNewWithText :: GlibString string+ => string      -- ^ @text@ - the text to display in the cell view  -> IO CellView cellViewNewWithText text =   makeNewObject mkCellView $@@ -193,7 +195,7 @@ -- -- Default value: @\"\"@ ---cellViewBackground :: CellViewClass self => WriteAttr self String+cellViewBackground :: (CellViewClass self, GlibString string) => WriteAttr self string cellViewBackground = writeAttrFromStringProperty "background"  #endif
Graphics/UI/Gtk/ModelView/CustomStore.chs view
@@ -33,7 +33,7 @@ -- 'customStoreGetRow' functions. -- module Graphics.UI.Gtk.ModelView.CustomStore (-  -- * The definition of a row-based store.  +  -- * The definition of a row-based store.   CustomStore,   TreeModelFlags(..),   TreeModelIface(..),@@ -45,30 +45,26 @@   customStoreGetPrivate,   customStoreGetStamp,   customStoreInvalidateIters,-  -- for backwards compatability, not documented+  -- for backwards compatibility, not documented   treeModelGetRow,   treeModelSetColumn,   ) where -import Control.Monad	                        (liftM, when)+import Control.Monad                            (liftM) import Control.Monad.Reader                     (runReaderT) import Data.IORef                               (IORef, newIORef, readIORef, writeIORef) import Data.Maybe                               (fromMaybe)-import System.Glib.FFI			hiding	(maybeNull)-import System.Glib.Flags			(Flags, fromFlags)-{#import System.Glib.GObject#}			(GObjectClass(..), GObject(..), unGObject,-                                                 makeNewGObject, objectUnref)+import System.Glib.FFI                  hiding  (maybeNull)+import System.Glib.Flags                        (Flags, fromFlags) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#} import Graphics.UI.Gtk.General.DNDTypes         (SelectionDataM, SelectionData) -import System.Glib.StoreValue			(TMType(..), GenericValue(..), valueSetGenericValue)-{#import System.Glib.GValue#}			(GValue(GValue), allocaGValue)-{#import System.Glib.GType#}			(GType)-import System.Glib.GValueTypes                  (valueSetString)+{#import System.Glib.GValue#}                   (GValue(GValue))+{#import System.Glib.GType#}                    (GType) import qualified System.Glib.GTypeConstants as GConst {#import System.Glib.GValueTypes#}-{#import System.Glib.GValue#}			(valueInit)+{#import System.Glib.GValue#}                   (valueInit)  {# context lib="gtk" prefix="gtk" #} @@ -113,10 +109,10 @@ --   the model is installed into a widget since the number of defined --   columns are only checked once by widgets. customStoreSetColumn :: TypedTreeModelClass model-	=> model row -- ^ the store in which to allocate a new column-	-> (ColumnId row ty) -- ^ the column that should be set-	-> (row -> ty) -- ^ the function that sets the property-	-> IO ()+        => model row -- ^ the store in which to allocate a new column+        -> (ColumnId row ty) -- ^ the column that should be set+        -> (row -> ty) -- ^ the function that sets the property+        -> IO () customStoreSetColumn model (ColumnId _ setter colId) acc | colId<0 = return ()                                                          | otherwise =   case toTypedTreeModel model of@@ -133,16 +129,16 @@          let (beg,_:end) = splitAt colId cols          writeIORef cMap (beg++setter acc:end) --- this is a backwards compatability definition+-- this is a backwards compatibility definition treeModelSetColumn :: TypedTreeModelClass model-	=> model row -- ^ the store in which to allocate a new column-	-> (ColumnId row ty) -- ^ the column that should be set-	-> (row -> ty) -- ^ the function that sets the property-	-> IO ()+        => model row -- ^ the store in which to allocate a new column+        -> (ColumnId row ty) -- ^ the column that should be set+        -> (row -> ty) -- ^ the function that sets the property+        -> IO () treeModelSetColumn = customStoreSetColumn  data CustomStoreImplementation model row = CustomStoreImplementation {-    customStoreColumns          :: ColumnMap row,	                -- provide access via columns+    customStoreColumns          :: ColumnMap row,                       -- provide access via columns     customStoreIface            :: TreeModelIface row,            -- functions implementing a tree model     customTreeDragSourceIface   :: DragSourceIface model row,     -- the drag and drop source interface     customTreeDragDestIface     :: DragDestIface model row        -- the drag and drop dest interface@@ -157,7 +153,7 @@     --   Return @Nothing@ if the path does not exit.     treeModelIfaceGetIter       :: TreePath -> IO (Maybe TreeIter),              -- convert a path to an iterator     -- | Convert an iterator to a path. The iterator will always be valid.-    treeModelIfaceGetPath       :: TreeIter -> IO TreePath,                      -- convert an interator to a path+    treeModelIfaceGetPath       :: TreeIter -> IO TreePath,                      -- convert an iterator to a path     -- | Retrieve a row at the given iterator.     treeModelIfaceGetRow        :: TreeIter -> IO row,                           -- get the row at an iter     -- | Advance the given iterator to the next node at the same level.@@ -212,7 +208,7 @@     --   its information be used to insert a new row at the given path.     treeDragDestDragDataReceived:: model row -> TreePath -> SelectionDataM Bool      -- insert row from selection object   }-  + -- | Create a new store that implements the 'TreeModelIface' interface and -- optionally the 'DragSourceIface' and the 'DragDestIface'. If the latter two -- are set to @Nothing@ a dummy interface is substituted that rejects every@@ -250,13 +246,13 @@ -- | Extract a row of the given model at the given 'TreeIter'. -- customStoreGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row-customStoreGetRow model iter = +customStoreGetRow model iter =   case toTypedTreeModel model of     TypedTreeModel model -> do       impl <- withForeignPtr model gtk2hs_store_get_impl >>= deRefStablePtr       treeModelIfaceGetRow (customStoreIface impl) iter --- this is a backwards compatability definition+-- this is a backwards compatibility definition treeModelGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row treeModelGetRow = customStoreGetRow @@ -375,9 +371,9 @@       (CABool ca) -> valueInit gVal GConst.bool >> valueSetBool gVal (ca row)       (CAString ca) -> valueInit gVal GConst.string >> valueSetString gVal (ca row)       (CAPixbuf ca) -> valueInit gVal {#call fun unsafe gdk_pixbuf_get_type#} >>-			valueSetGObject gVal (ca row)+                        valueSetGObject gVal (ca row)       CAInvalid -> valueInit gVal GConst.int >> valueSetInt gVal 0-      + foreign export ccall "gtk2hs_store_get_value_impl"   treeModelIfaceGetValue_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> CInt -> Ptr GValue -> IO () @@ -531,7 +527,3 @@ maybeNull marshal ptr   | ptr == nullPtr = return Nothing   | otherwise      = liftM Just (marshal ptr)--iterSetStamp :: CInt -> TreeIter -> TreeIter-iterSetStamp t (TreeIter _ a b c) = (TreeIter t a b c)-
Graphics/UI/Gtk/ModelView/Gtk2HsStore.c view
@@ -274,7 +274,7 @@  /**  *- *  gtk2hs_store_init: this is called everytime a new custom list object+ *  gtk2hs_store_init: this is called every time a new custom list object  *                     instance is created (we do that in gtk2hs_store_new).  *                     Initialise the list structure's fields here.  *
Graphics/UI/Gtk/ModelView/IconView.chs view
@@ -145,11 +145,11 @@ import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties import System.Glib.GList                        (fromGList) import System.Glib.Flags-import System.Glib.GObject                      (makeNewGObject, constructNewGObject) import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) import Graphics.UI.Gtk.Gdk.Enums                (DragAction(..)) import Graphics.UI.Gtk.Gdk.Events               (Modifier(..))@@ -157,10 +157,8 @@ {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.General.Enums#}        (Orientation, SelectionMode) {#import Graphics.UI.Gtk.ModelView.TreeModel#}-{#import Graphics.UI.Gtk.ModelView.CustomStore#} {#import Graphics.UI.Gtk.ModelView.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#}     (TargetList(..))-import Graphics.Rendering.Pango.Markup          (Markup)  {# context lib="gtk" prefix="gtk" #} @@ -222,8 +220,8 @@ -- source is set using 'iconViewSetMarkupSource', then the text source is -- ignored. ---iconViewSetTextColumn :: IconViewClass self => self- -> ColumnId row String -- ^ @column@ - A column in the currently used model.+iconViewSetTextColumn :: (IconViewClass self, GlibString string) => self+ -> ColumnId row string -- ^ @column@ - A column in the currently used model.  -> IO () iconViewSetTextColumn self column =   {# call gtk_icon_view_set_text_column #}@@ -232,21 +230,21 @@  -- | Returns the column with text for @iconView@. ---iconViewGetTextColumn :: IconViewClass self => self- -> IO (ColumnId row String) -- ^ returns the text column, or 'invalidColumnId' if it's unset.+iconViewGetTextColumn :: (IconViewClass self, GlibString string) => self+ -> IO (ColumnId row string) -- ^ returns the text column, or 'invalidColumnId' if it's unset. iconViewGetTextColumn self =   liftM (makeColumnIdString . fromIntegral) $   {# call gtk_icon_view_get_text_column #}     (toIconView self)-     + -- %hash c:995f d:801c -- | Sets the column of the text for entries in the 'IconView' as a markup -- string (see 'Graphics.Rendering.Pango.Markup'). A text source that is set -- using 'iconViewSetTextSource' is ignored once a markup source is set. ---iconViewSetMarkupColumn :: IconViewClass self => self- -> ColumnId row Markup -- ^ @column@ - A column in the currently used model.+iconViewSetMarkupColumn :: (IconViewClass self, GlibString markup) => self+ -> ColumnId row markup -- ^ @column@ - A column in the currently used model.  -> IO () iconViewSetMarkupColumn self column =   {# call gtk_icon_view_set_markup_column #}@@ -255,8 +253,8 @@  -- | Returns the column with markup text for @iconView@. ---iconViewGetMarkupColumn :: IconViewClass self => self- -> IO (ColumnId row Markup) -- ^ returns the markup column, or 'invalidColumnId' if it's unset.+iconViewGetMarkupColumn :: (IconViewClass self, GlibString markup) => self+ -> IO (ColumnId row markup) -- ^ returns the markup column, or 'invalidColumnId' if it's unset. iconViewGetMarkupColumn self =   liftM (makeColumnIdString . fromIntegral) $   {# call gtk_icon_view_get_markup_column #}@@ -306,7 +304,7 @@ -- cannot be modified from within this function. -- iconViewSelectedForeach :: IconViewClass self => self- -> (TreePath -> IO ()) -- ^ @(\path -> ...)@ - The funcion to call for each+ -> (TreePath -> IO ()) -- ^ @(\path -> ...)@ - The function to call for each                         -- selected icon.  -> IO () iconViewSelectedForeach self func = do@@ -592,7 +590,7 @@ iconViewGetItemAtPos :: IconViewClass self => self  -> Int                   -- ^ @x@ - The x position to be identified  -> Int                   -- ^ @y@ - The y position to be identified- -> IO (Maybe (TreePath, CellRenderer)) + -> IO (Maybe (TreePath, CellRenderer))                           -- specified position iconViewGetItemAtPos self x y =   alloca $ \pathPtrPtr -> alloca $ \crPtrPtr -> do@@ -702,7 +700,7 @@  -- %hash c:8354 d:f7f3 -- | Retrieve the first and last visible path.--- Note that there may be invisible paths inbetween.+-- Note that there may be invisible paths in between. -- -- * Available since Gtk+ version 2.8 --@@ -833,8 +831,8 @@ -- * Available since Gtk+ version 2.22 -- iconViewGetItemRow :: IconViewClass self => self-                   -> TreePath -- ^ @path@      the 'TreePath' of the item            -                   -> IO Int -- ^ returns   The row in which the item is displayed +                   -> TreePath -- ^ @path@      the 'TreePath' of the item+                   -> IO Int -- ^ returns   The row in which the item is displayed iconViewGetItemRow self path =   liftM fromIntegral $   withTreePath path $ \path ->@@ -847,8 +845,8 @@ -- * Available since Gtk+ version 2.22 -- iconViewGetItemColumn :: IconViewClass self => self-                   -> TreePath -- ^ @path@      the 'TreePath' of the item            -                   -> IO Int -- ^ returns   The column in which the item is displayed +                   -> TreePath -- ^ @path@      the 'TreePath' of the item+                   -> IO Int -- ^ returns   The column in which the item is displayed iconViewGetItemColumn self path =   liftM fromIntegral $   withTreePath path $ \path ->@@ -892,7 +890,7 @@ -- -- Default value: 'invalidColumnId' ---iconViewTextColumn :: IconViewClass self => Attr self (ColumnId row String)+iconViewTextColumn :: (IconViewClass self, GlibString string) => Attr self (ColumnId row string) iconViewTextColumn = newAttr   iconViewGetTextColumn   iconViewSetTextColumn@@ -905,7 +903,7 @@ -- -- Default value: 'invalidColumnId' ---iconViewMarkupColumn :: IconViewClass self => Attr self (ColumnId row Markup)+iconViewMarkupColumn :: (IconViewClass self, GlibString markup) => Attr self (ColumnId row markup) iconViewMarkupColumn = newAttr   iconViewGetMarkupColumn   iconViewSetMarkupColumn@@ -1012,7 +1010,7 @@ #if GTK_CHECK_VERSION(2,22,0) -- | The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are -- positioned relative to each other.--- +-- -- Default value: 'OrientationVertical' -- -- * Available since Gtk+ version 2.22
Graphics/UI/Gtk/ModelView/ListStore.hs view
@@ -4,7 +4,7 @@ -- --  Author : Duncan Coutts, Axel Simon -----  Created: 11 Feburary 2006+--  Created: 11 February 2006 -- --  Copyright (C) 2005 Duncan Coutts, Axel Simon --@@ -27,13 +27,13 @@ -- module Graphics.UI.Gtk.ModelView.ListStore ( --- * Types +-- * Types   ListStore,  -- * Constructors   listStoreNew,   listStoreNewDND,-  + -- * Implementation of Interfaces   listStoreDefaultDragSourceIface,   listStoreDefaultDragDestIface,@@ -41,6 +41,7 @@ -- * Methods   listStoreIterToIndex,   listStoreGetValue,+  listStoreSafeGetValue,   listStoreSetValue,   listStoreToList,   listStoreGetSize,@@ -64,8 +65,8 @@ import Graphics.UI.Gtk.ModelView.Sequence (Seq) #endif -import Graphics.UI.Gtk.Types (GObjectClass(..), TreeModelClass)-import Graphics.UI.Gtk.ModelView.Types (TypedTreeModelClass, TreeIter(..))+import Graphics.UI.Gtk.Types (GObjectClass(..))+-- import Graphics.UI.Gtk.ModelView.Types () import Graphics.UI.Gtk.ModelView.CustomStore import Graphics.UI.Gtk.ModelView.TreeModel import Graphics.UI.Gtk.ModelView.TreeDrag@@ -97,11 +98,12 @@   customStoreNew rows ListStore TreeModelIface {       treeModelIfaceGetFlags      = return [TreeModelListOnly],       treeModelIfaceGetIter       = \[n] -> readIORef rows >>= \rows ->-                                     return (if Seq.null rows then Nothing else-                                             Just (TreeIter 0 (fromIntegral n) 0 0)),+                                     return (if inRange (0, Seq.length rows - 1) n+                                                 then Just (TreeIter 0 (fromIntegral n) 0 0)+                                                 else Nothing),       treeModelIfaceGetPath       = \(TreeIter _ n _ _) -> return [fromIntegral n],       treeModelIfaceGetRow        = \(TreeIter _ n _ _) ->-                                 readIORef rows >>= \rows -> +                                 readIORef rows >>= \rows ->                                  if inRange (0, Seq.length rows - 1) (fromIntegral n)                                    then return (rows `Seq.index` fromIntegral n)                                    else fail "ListStore.getRow: iter does not refer to a valid entry",@@ -111,7 +113,11 @@                                  if inRange (0, Seq.length rows - 1) (fromIntegral (n+1))                                    then return (Just (TreeIter 0 (n+1) 0 0))                                    else return Nothing,-      treeModelIfaceIterChildren  = \_ -> return Nothing,+      treeModelIfaceIterChildren  = \index -> readIORef rows >>= \rows ->+                                         case index of+                                             Nothing | not (Seq.null rows) ->+                                                        return (Just (TreeIter 0 0 0 0))+                                             _       -> return Nothing,       treeModelIfaceIterHasChild  = \_ -> return False,       treeModelIfaceIterNChildren = \index -> readIORef rows >>= \rows ->                                            case index of@@ -175,6 +181,15 @@ listStoreGetValue (ListStore model) index =   readIORef (customStoreGetPrivate model) >>= return . (`Seq.index` index) +-- | Extract the value at the given index.+--+listStoreSafeGetValue :: ListStore a -> Int -> IO (Maybe a)+listStoreSafeGetValue (ListStore model) index = do+  seq <- readIORef (customStoreGetPrivate model)+  return $ if index >=0 && index < Seq.length seq+                then Just $ seq `Seq.index` index+                else Nothing+ -- | Update the value at the given index. The index must exist. -- listStoreSetValue :: ListStore a -> Int -> a -> IO ()@@ -199,7 +214,7 @@ listStoreGetSize :: ListStore a -> IO Int listStoreGetSize (ListStore model) =   liftM Seq.length $ readIORef (customStoreGetPrivate model)-  + -- | Insert an element in front of the given element. The element is appended -- if the index is greater or equal to the size of the list. listStoreInsert :: ListStore a -> Int -> a -> IO ()@@ -224,10 +239,10 @@   stamp <- customStoreGetStamp model   treeModelRowInserted model [0] (TreeIter stamp 0 0 0) --- | Prepend a list to the store. Not implemented yet.-listStorePrependList :: ListStore a -> [a] -> IO ()-listStorePrependList store list =-  mapM_ (listStoreInsert store 0) (reverse list)+---- | Prepend a list to the store. Not implemented yet.+--listStorePrependList :: ListStore a -> [a] -> IO ()+--listStorePrependList store list =+--  mapM_ (listStoreInsert store 0) (reverse list)  -- | Append an element to the store. Returns the index of the inserted -- element.@@ -248,7 +263,7 @@       endIndex = startIndex + Seq.length seq' - 1   writeIORef (customStoreGetPrivate model) (seq Seq.>< seq')   stamp <- customStoreGetStamp model-  flip mapM [startIndex..endIndex] $ \index ->    +  flip mapM [startIndex..endIndex] $ \index ->     treeModelRowInserted model [index] (TreeIter stamp (fromIntegral index) 0 0) -} @@ -269,36 +284,36 @@ listStoreClear (ListStore model) =    -- Since deleting rows can cause callbacks (eg due to selection changes)-  -- we have to make sure the model is consitent with the view at each+  -- we have to make sure the model is consistent with the view at each   -- intermediate step of clearing the store. Otherwise at some intermediate-  -- stage when the view has only been informed about some delections, the+  -- stage when the view has only been informed about some deletions, the   -- user might query the model expecting to find the remaining rows are there   -- but find them deleted. That'd be bad.   --   let loop (-1) Seq.EmptyR = return ()       loop n (seq Seq.:> _) = do         writeIORef (customStoreGetPrivate model) seq-	treeModelRowDeleted model [n]-	loop (n-1) (Seq.viewr seq)+        treeModelRowDeleted model [n]+        loop (n-1) (Seq.viewr seq)     in do seq <- readIORef (customStoreGetPrivate model)          loop (Seq.length seq - 1) (Seq.viewr seq) --- | Permute the rows of the store. Not yet implemented.-listStoreReorder :: ListStore a -> [Int] -> IO ()-listStoreReorder store = undefined---- | Swap two rows of the store. Not yet implemented.-listStoreSwap :: ListStore a -> Int -> Int -> IO ()-listStoreSwap store = undefined---- | Move the element at the first index in front of the element denoted by--- the second index. Not yet implemented.-listStoreMoveBefore :: ListStore a -> Int -> Int -> IO ()-listStoreMoveBefore store = undefined---- | Move the element at the first index past the element denoted by the--- second index. Not yet implemented.-listStoreMoveAfter :: ListStore a -> Int -> Int -> IO ()-listStoreMoveAfter store = undefined+---- | Permute the rows of the store. Not yet implemented.+--listStoreReorder :: ListStore a -> [Int] -> IO ()+--listStoreReorder store = undefined+--+---- | Swap two rows of the store. Not yet implemented.+--listStoreSwap :: ListStore a -> Int -> Int -> IO ()+--listStoreSwap store = undefined+--+---- | Move the element at the first index in front of the element denoted by+---- the second index. Not yet implemented.+--listStoreMoveBefore :: ListStore a -> Int -> Int -> IO ()+--listStoreMoveBefore store = undefined+--+---- | Move the element at the first index past the element denoted by the+---- second index. Not yet implemented.+--listStoreMoveAfter :: ListStore a -> Int -> Int -> IO ()+--listStoreMoveAfter store = undefined 
Graphics/UI/Gtk/ModelView/Sequence.hs view
@@ -23,59 +23,59 @@ -- as described in section 4.2 of -- --    * Ralf Hinze and Ross Paterson,---	\"Finger trees: a simple general-purpose data structure\",---	submitted to /Journal of Functional Programming/.---	<http://www.soi.city.ac.uk/~ross/papers/FingerTree.html>+--      \"Finger trees: a simple general-purpose data structure\",+--      submitted to /Journal of Functional Programming/.+--      <http://www.soi.city.ac.uk/~ross/papers/FingerTree.html> -- -----------------------------------------------------------------------------  module Graphics.UI.Gtk.ModelView.Sequence (-	Seq,-	-- * Construction-	empty,		-- :: Seq a-	singleton,	-- :: a -> Seq a-	(<|),		-- :: a -> Seq a -> Seq a-	(|>),		-- :: Seq a -> a -> Seq a-	(><),		-- :: Seq a -> Seq a -> Seq a-	-- * Deconstruction-	null,		-- :: Seq a -> Bool-	-- ** Views-	ViewL(..),-	viewl,		-- :: Seq a -> ViewL a-	ViewR(..),-	viewr,		-- :: Seq a -> ViewR a-	-- ** Indexing-	length,		-- :: Seq a -> Int-	index,		-- :: Seq a -> Int -> a-	adjust,		-- :: (a -> a) -> Int -> Seq a -> Seq a-	update,		-- :: Int -> a -> Seq a -> Seq a-	take,		-- :: Int -> Seq a -> Seq a-	drop,		-- :: Int -> Seq a -> Seq a-	splitAt,	-- :: Int -> Seq a -> (Seq a, Seq a)-	-- * Lists-	fromList,	-- :: [a] -> Seq a-	toList,		-- :: Seq a -> [a]-	-- * Folds-	-- ** Right associative-	foldr,		-- :: (a -> b -> b) -> b -> Seq a -> b-	foldr1,		-- :: (a -> a -> a) -> Seq a -> a-	foldr',		-- :: (a -> b -> b) -> b -> Seq a -> b-	foldrM,		-- :: Monad m => (a -> b -> m b) -> b -> Seq a -> m b-	-- ** Left associative-	foldl,		-- :: (a -> b -> a) -> a -> Seq b -> a-	foldl1,		-- :: (a -> a -> a) -> Seq a -> a-	foldl',		-- :: (a -> b -> a) -> a -> Seq b -> a-	foldlM,		-- :: Monad m => (a -> b -> m a) -> a -> Seq b -> m a-	-- * Transformations-	reverse,	-- :: Seq a -> Seq a+        Seq,+        -- * Construction+        empty,          -- :: Seq a+        singleton,      -- :: a -> Seq a+        (<|),           -- :: a -> Seq a -> Seq a+        (|>),           -- :: Seq a -> a -> Seq a+        (><),           -- :: Seq a -> Seq a -> Seq a+        -- * Deconstruction+        null,           -- :: Seq a -> Bool+        -- ** Views+        ViewL(..),+        viewl,          -- :: Seq a -> ViewL a+        ViewR(..),+        viewr,          -- :: Seq a -> ViewR a+        -- ** Indexing+        length,         -- :: Seq a -> Int+        index,          -- :: Seq a -> Int -> a+        adjust,         -- :: (a -> a) -> Int -> Seq a -> Seq a+        update,         -- :: Int -> a -> Seq a -> Seq a+        take,           -- :: Int -> Seq a -> Seq a+        drop,           -- :: Int -> Seq a -> Seq a+        splitAt,        -- :: Int -> Seq a -> (Seq a, Seq a)+        -- * Lists+        fromList,       -- :: [a] -> Seq a+        toList,         -- :: Seq a -> [a]+        -- * Folds+        -- ** Right associative+        foldr,          -- :: (a -> b -> b) -> b -> Seq a -> b+        foldr1,         -- :: (a -> a -> a) -> Seq a -> a+        foldr',         -- :: (a -> b -> b) -> b -> Seq a -> b+        foldrM,         -- :: Monad m => (a -> b -> m b) -> b -> Seq a -> m b+        -- ** Left associative+        foldl,          -- :: (a -> b -> a) -> a -> Seq b -> a+        foldl1,         -- :: (a -> a -> a) -> Seq a -> a+        foldl',         -- :: (a -> b -> a) -> a -> Seq b -> a+        foldlM,         -- :: Monad m => (a -> b -> m a) -> a -> Seq b -> m a+        -- * Transformations+        reverse,        -- :: Seq a -> Seq a #if TESTING-	valid,+        valid, #endif-	) where+        ) where  import Prelude hiding (-	null, length, take, drop, splitAt, foldl, foldl1, foldr, foldr1,-	reverse)+        null, length, take, drop, splitAt, foldl, foldl', foldl1, foldr, foldr1,+        reverse) import qualified Prelude (foldr) import Data.List (intersperse) import qualified Data.List (foldl')@@ -93,7 +93,7 @@ infixl 5 |>, :>  class Sized a where-	size :: a -> Int+        size :: a -> Int  ------------------------------------------------------------------------ -- Random access sequences@@ -103,73 +103,73 @@ newtype Seq a = Seq (FingerTree (Elem a))  instance Functor Seq where-	fmap f (Seq xs) = Seq (fmap (fmap f) xs)+        fmap f (Seq xs) = Seq (fmap (fmap f) xs)  instance Eq a => Eq (Seq a) where-	xs == ys = length xs == length ys && toList xs == toList ys+        xs == ys = length xs == length ys && toList xs == toList ys  instance Ord a => Ord (Seq a) where-	compare xs ys = compare (toList xs) (toList ys)+        compare xs ys = compare (toList xs) (toList ys)  #if TESTING instance (Show a) => Show (Seq a) where-	showsPrec p (Seq x) = showsPrec p x+        showsPrec p (Seq x) = showsPrec p x #else instance Show a => Show (Seq a) where-	showsPrec _ xs = showChar '<' .-		flip (Prelude.foldr ($)) (intersperse (showChar ',')-						(map shows (toList xs))) .-		showChar '>'+        showsPrec _ xs = showChar '<' .+                flip (Prelude.foldr ($)) (intersperse (showChar ',')+                                                (map shows (toList xs))) .+                showChar '>' #endif  -- Finger trees  data FingerTree a-	= Empty-	| Single a-	| Deep {-# UNPACK #-} !Int !(Digit a) (FingerTree (Node a)) !(Digit a)+        = Empty+        | Single a+        | Deep {-# UNPACK #-} !Int !(Digit a) (FingerTree (Node a)) !(Digit a) #if TESTING-	deriving Show+        deriving Show #endif  instance Sized a => Sized (FingerTree a) where-	size Empty		= 0-	size (Single x)		= size x-	size (Deep v _ _ _)	= v+        size Empty              = 0+        size (Single x)         = size x+        size (Deep v _ _ _)     = v  instance Functor FingerTree where-	fmap _ Empty = Empty-	fmap f (Single x) = Single (f x)-	fmap f (Deep v pr m sf) =-		Deep v (fmap f pr) (fmap (fmap f) m) (fmap f sf)+        fmap _ Empty = Empty+        fmap f (Single x) = Single (f x)+        fmap f (Deep v pr m sf) =+                Deep v (fmap f pr) (fmap (fmap f) m) (fmap f sf)  {-# INLINE deep #-}-deep		:: Sized a => Digit a -> FingerTree (Node a) -> Digit a -> FingerTree a-deep pr m sf	=  Deep (size pr + size m + size sf) pr m sf+deep            :: Sized a => Digit a -> FingerTree (Node a) -> Digit a -> FingerTree a+deep pr m sf    =  Deep (size pr + size m + size sf) pr m sf  -- Digits  data Digit a-	= One a-	| Two a a-	| Three a a a-	| Four a a a a+        = One a+        | Two a a+        | Three a a a+        | Four a a a a #if TESTING-	deriving Show+        deriving Show #endif  instance Functor Digit where-	fmap f (One a) = One (f a)-	fmap f (Two a b) = Two (f a) (f b)-	fmap f (Three a b c) = Three (f a) (f b) (f c)-	fmap f (Four a b c d) = Four (f a) (f b) (f c) (f d)+        fmap f (One a) = One (f a)+        fmap f (Two a b) = Two (f a) (f b)+        fmap f (Three a b c) = Three (f a) (f b) (f c)+        fmap f (Four a b c d) = Four (f a) (f b) (f c) (f d)  instance Sized a => Sized (Digit a) where-	size xs = foldlDigit (\ i x -> i + size x) 0 xs+        size xs = foldlDigit (\ i x -> i + size x) 0 xs  {-# SPECIALIZE digitToTree :: Digit (Elem a) -> FingerTree (Elem a) #-} {-# SPECIALIZE digitToTree :: Digit (Node a) -> FingerTree (Node a) #-}-digitToTree	:: Sized a => Digit a -> FingerTree a+digitToTree     :: Sized a => Digit a -> FingerTree a digitToTree (One a) = Single a digitToTree (Two a b) = deep (One a) Empty (One b) digitToTree (Three a b c) = deep (Two a b) Empty (One c)@@ -178,27 +178,27 @@ -- Nodes  data Node a-	= Node2 {-# UNPACK #-} !Int a a-	| Node3 {-# UNPACK #-} !Int a a a+        = Node2 {-# UNPACK #-} !Int a a+        | Node3 {-# UNPACK #-} !Int a a a #if TESTING-	deriving Show+        deriving Show #endif  instance Functor (Node) where-	fmap f (Node2 v a b) = Node2 v (f a) (f b)-	fmap f (Node3 v a b c) = Node3 v (f a) (f b) (f c)+        fmap f (Node2 v a b) = Node2 v (f a) (f b)+        fmap f (Node3 v a b c) = Node3 v (f a) (f b) (f c)  instance Sized (Node a) where-	size (Node2 v _ _)	= v-	size (Node3 v _ _ _)	= v+        size (Node2 v _ _)      = v+        size (Node3 v _ _ _)    = v  {-# INLINE node2 #-}-node2		:: Sized a => a -> a -> Node a-node2 a b	=  Node2 (size a + size b) a b+node2           :: Sized a => a -> a -> Node a+node2 a b       =  Node2 (size a + size b) a b  {-# INLINE node3 #-}-node3		:: Sized a => a -> a -> a -> Node a-node3 a b c	=  Node3 (size a + size b + size c) a b c+node3           :: Sized a => a -> a -> a -> Node a+node3 a b c     =  Node3 (size a + size b + size c) a b c  nodeToDigit :: Node a -> Digit a nodeToDigit (Node2 _ a b) = Two a b@@ -209,14 +209,14 @@ newtype Elem a  =  Elem { getElem :: a }  instance Sized (Elem a) where-	size _ = 1+        size _ = 1  instance Functor Elem where-	fmap f (Elem x) = Elem (f x)+        fmap f (Elem x) = Elem (f x)  #ifdef TESTING instance (Show a) => Show (Elem a) where-	showsPrec p (Elem x) = showsPrec p x+        showsPrec p (Elem x) = showsPrec p x #endif  ------------------------------------------------------------------------@@ -224,298 +224,298 @@ ------------------------------------------------------------------------  -- | /O(1)/. The empty sequence.-empty		:: Seq a-empty		=  Seq Empty+empty           :: Seq a+empty           =  Seq Empty  -- | /O(1)/. A singleton sequence.-singleton	:: a -> Seq a-singleton x	=  Seq (Single (Elem x))+singleton       :: a -> Seq a+singleton x     =  Seq (Single (Elem x))  -- | /O(1)/. Add an element to the left end of a sequence. -- Mnemonic: a triangle with the single element at the pointy end.-(<|)		:: a -> Seq a -> Seq a-x <| Seq xs	=  Seq (Elem x `consTree` xs)+(<|)            :: a -> Seq a -> Seq a+x <| Seq xs     =  Seq (Elem x `consTree` xs)  {-# SPECIALIZE consTree :: Elem a -> FingerTree (Elem a) -> FingerTree (Elem a) #-} {-# SPECIALIZE consTree :: Node a -> FingerTree (Node a) -> FingerTree (Node a) #-}-consTree	:: Sized a => a -> FingerTree a -> FingerTree a-consTree a Empty	= Single a-consTree a (Single b)	= deep (One a) Empty (One b)+consTree        :: Sized a => a -> FingerTree a -> FingerTree a+consTree a Empty        = Single a+consTree a (Single b)   = deep (One a) Empty (One b) consTree a (Deep s (Four b c d e) m sf) = m `seq`-	Deep (size a + s) (Two a b) (node3 c d e `consTree` m) sf+        Deep (size a + s) (Two a b) (node3 c d e `consTree` m) sf consTree a (Deep s (Three b c d) m sf) =-	Deep (size a + s) (Four a b c d) m sf+        Deep (size a + s) (Four a b c d) m sf consTree a (Deep s (Two b c) m sf) =-	Deep (size a + s) (Three a b c) m sf+        Deep (size a + s) (Three a b c) m sf consTree a (Deep s (One b) m sf) =-	Deep (size a + s) (Two a b) m sf+        Deep (size a + s) (Two a b) m sf  -- | /O(1)/. Add an element to the right end of a sequence. -- Mnemonic: a triangle with the single element at the pointy end.-(|>)		:: Seq a -> a -> Seq a-Seq xs |> x	=  Seq (xs `snocTree` Elem x)+(|>)            :: Seq a -> a -> Seq a+Seq xs |> x     =  Seq (xs `snocTree` Elem x)  {-# SPECIALIZE snocTree :: FingerTree (Elem a) -> Elem a -> FingerTree (Elem a) #-} {-# SPECIALIZE snocTree :: FingerTree (Node a) -> Node a -> FingerTree (Node a) #-}-snocTree	:: Sized a => FingerTree a -> a -> FingerTree a-snocTree Empty a	=  Single a-snocTree (Single a) b	=  deep (One a) Empty (One b)+snocTree        :: Sized a => FingerTree a -> a -> FingerTree a+snocTree Empty a        =  Single a+snocTree (Single a) b   =  deep (One a) Empty (One b) snocTree (Deep s pr m (Four a b c d)) e = m `seq`-	Deep (s + size e) pr (m `snocTree` node3 a b c) (Two d e)+        Deep (s + size e) pr (m `snocTree` node3 a b c) (Two d e) snocTree (Deep s pr m (Three a b c)) d =-	Deep (s + size d) pr m (Four a b c d)+        Deep (s + size d) pr m (Four a b c d) snocTree (Deep s pr m (Two a b)) c =-	Deep (s + size c) pr m (Three a b c)+        Deep (s + size c) pr m (Three a b c) snocTree (Deep s pr m (One a)) b =-	Deep (s + size b) pr m (Two a b)+        Deep (s + size b) pr m (Two a b)  -- | /O(log(min(n1,n2)))/. Concatenate two sequences.-(><)		:: Seq a -> Seq a -> Seq a+(><)            :: Seq a -> Seq a -> Seq a Seq xs >< Seq ys = Seq (appendTree0 xs ys)  -- The appendTree/addDigits gunk below is machine generated  appendTree0 :: FingerTree (Elem a) -> FingerTree (Elem a) -> FingerTree (Elem a) appendTree0 Empty xs =-	xs+        xs appendTree0 xs Empty =-	xs+        xs appendTree0 (Single x) xs =-	x `consTree` xs+        x `consTree` xs appendTree0 xs (Single x) =-	xs `snocTree` x+        xs `snocTree` x appendTree0 (Deep s1 pr1 m1 sf1) (Deep s2 pr2 m2 sf2) =-	Deep (s1 + s2) pr1 (addDigits0 m1 sf1 pr2 m2) sf2+        Deep (s1 + s2) pr1 (addDigits0 m1 sf1 pr2 m2) sf2  addDigits0 :: FingerTree (Node (Elem a)) -> Digit (Elem a) -> Digit (Elem a) -> FingerTree (Node (Elem a)) -> FingerTree (Node (Elem a)) addDigits0 m1 (One a) (One b) m2 =-	appendTree1 m1 (node2 a b) m2+        appendTree1 m1 (node2 a b) m2 addDigits0 m1 (One a) (Two b c) m2 =-	appendTree1 m1 (node3 a b c) m2+        appendTree1 m1 (node3 a b c) m2 addDigits0 m1 (One a) (Three b c d) m2 =-	appendTree2 m1 (node2 a b) (node2 c d) m2+        appendTree2 m1 (node2 a b) (node2 c d) m2 addDigits0 m1 (One a) (Four b c d e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits0 m1 (Two a b) (One c) m2 =-	appendTree1 m1 (node3 a b c) m2+        appendTree1 m1 (node3 a b c) m2 addDigits0 m1 (Two a b) (Two c d) m2 =-	appendTree2 m1 (node2 a b) (node2 c d) m2+        appendTree2 m1 (node2 a b) (node2 c d) m2 addDigits0 m1 (Two a b) (Three c d e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits0 m1 (Two a b) (Four c d e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits0 m1 (Three a b c) (One d) m2 =-	appendTree2 m1 (node2 a b) (node2 c d) m2+        appendTree2 m1 (node2 a b) (node2 c d) m2 addDigits0 m1 (Three a b c) (Two d e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits0 m1 (Three a b c) (Three d e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits0 m1 (Three a b c) (Four d e f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits0 m1 (Four a b c d) (One e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits0 m1 (Four a b c d) (Two e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits0 m1 (Four a b c d) (Three e f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits0 m1 (Four a b c d) (Four e f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2  appendTree1 :: FingerTree (Node a) -> Node a -> FingerTree (Node a) -> FingerTree (Node a) appendTree1 Empty a xs =-	a `consTree` xs+        a `consTree` xs appendTree1 xs a Empty =-	xs `snocTree` a+        xs `snocTree` a appendTree1 (Single x) a xs =-	x `consTree` a `consTree` xs+        x `consTree` a `consTree` xs appendTree1 xs a (Single x) =-	xs `snocTree` a `snocTree` x+        xs `snocTree` a `snocTree` x appendTree1 (Deep s1 pr1 m1 sf1) a (Deep s2 pr2 m2 sf2) =-	Deep (s1 + size a + s2) pr1 (addDigits1 m1 sf1 a pr2 m2) sf2+        Deep (s1 + size a + s2) pr1 (addDigits1 m1 sf1 a pr2 m2) sf2  addDigits1 :: FingerTree (Node (Node a)) -> Digit (Node a) -> Node a -> Digit (Node a) -> FingerTree (Node (Node a)) -> FingerTree (Node (Node a)) addDigits1 m1 (One a) b (One c) m2 =-	appendTree1 m1 (node3 a b c) m2+        appendTree1 m1 (node3 a b c) m2 addDigits1 m1 (One a) b (Two c d) m2 =-	appendTree2 m1 (node2 a b) (node2 c d) m2+        appendTree2 m1 (node2 a b) (node2 c d) m2 addDigits1 m1 (One a) b (Three c d e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits1 m1 (One a) b (Four c d e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits1 m1 (Two a b) c (One d) m2 =-	appendTree2 m1 (node2 a b) (node2 c d) m2+        appendTree2 m1 (node2 a b) (node2 c d) m2 addDigits1 m1 (Two a b) c (Two d e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits1 m1 (Two a b) c (Three d e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits1 m1 (Two a b) c (Four d e f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits1 m1 (Three a b c) d (One e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits1 m1 (Three a b c) d (Two e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits1 m1 (Three a b c) d (Three e f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits1 m1 (Three a b c) d (Four e f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits1 m1 (Four a b c d) e (One f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits1 m1 (Four a b c d) e (Two f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits1 m1 (Four a b c d) e (Three f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits1 m1 (Four a b c d) e (Four f g h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2  appendTree2 :: FingerTree (Node a) -> Node a -> Node a -> FingerTree (Node a) -> FingerTree (Node a) appendTree2 Empty a b xs =-	a `consTree` b `consTree` xs+        a `consTree` b `consTree` xs appendTree2 xs a b Empty =-	xs `snocTree` a `snocTree` b+        xs `snocTree` a `snocTree` b appendTree2 (Single x) a b xs =-	x `consTree` a `consTree` b `consTree` xs+        x `consTree` a `consTree` b `consTree` xs appendTree2 xs a b (Single x) =-	xs `snocTree` a `snocTree` b `snocTree` x+        xs `snocTree` a `snocTree` b `snocTree` x appendTree2 (Deep s1 pr1 m1 sf1) a b (Deep s2 pr2 m2 sf2) =-	Deep (s1 + size a + size b + s2) pr1 (addDigits2 m1 sf1 a b pr2 m2) sf2+        Deep (s1 + size a + size b + s2) pr1 (addDigits2 m1 sf1 a b pr2 m2) sf2  addDigits2 :: FingerTree (Node (Node a)) -> Digit (Node a) -> Node a -> Node a -> Digit (Node a) -> FingerTree (Node (Node a)) -> FingerTree (Node (Node a)) addDigits2 m1 (One a) b c (One d) m2 =-	appendTree2 m1 (node2 a b) (node2 c d) m2+        appendTree2 m1 (node2 a b) (node2 c d) m2 addDigits2 m1 (One a) b c (Two d e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits2 m1 (One a) b c (Three d e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits2 m1 (One a) b c (Four d e f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits2 m1 (Two a b) c d (One e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits2 m1 (Two a b) c d (Two e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits2 m1 (Two a b) c d (Three e f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits2 m1 (Two a b) c d (Four e f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits2 m1 (Three a b c) d e (One f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits2 m1 (Three a b c) d e (Two f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits2 m1 (Three a b c) d e (Three f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits2 m1 (Three a b c) d e (Four f g h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits2 m1 (Four a b c d) e f (One g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits2 m1 (Four a b c d) e f (Two g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits2 m1 (Four a b c d) e f (Three g h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits2 m1 (Four a b c d) e f (Four g h i j) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2  appendTree3 :: FingerTree (Node a) -> Node a -> Node a -> Node a -> FingerTree (Node a) -> FingerTree (Node a) appendTree3 Empty a b c xs =-	a `consTree` b `consTree` c `consTree` xs+        a `consTree` b `consTree` c `consTree` xs appendTree3 xs a b c Empty =-	xs `snocTree` a `snocTree` b `snocTree` c+        xs `snocTree` a `snocTree` b `snocTree` c appendTree3 (Single x) a b c xs =-	x `consTree` a `consTree` b `consTree` c `consTree` xs+        x `consTree` a `consTree` b `consTree` c `consTree` xs appendTree3 xs a b c (Single x) =-	xs `snocTree` a `snocTree` b `snocTree` c `snocTree` x+        xs `snocTree` a `snocTree` b `snocTree` c `snocTree` x appendTree3 (Deep s1 pr1 m1 sf1) a b c (Deep s2 pr2 m2 sf2) =-	Deep (s1 + size a + size b + size c + s2) pr1 (addDigits3 m1 sf1 a b c pr2 m2) sf2+        Deep (s1 + size a + size b + size c + s2) pr1 (addDigits3 m1 sf1 a b c pr2 m2) sf2  addDigits3 :: FingerTree (Node (Node a)) -> Digit (Node a) -> Node a -> Node a -> Node a -> Digit (Node a) -> FingerTree (Node (Node a)) -> FingerTree (Node (Node a)) addDigits3 m1 (One a) b c d (One e) m2 =-	appendTree2 m1 (node3 a b c) (node2 d e) m2+        appendTree2 m1 (node3 a b c) (node2 d e) m2 addDigits3 m1 (One a) b c d (Two e f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits3 m1 (One a) b c d (Three e f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits3 m1 (One a) b c d (Four e f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits3 m1 (Two a b) c d e (One f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits3 m1 (Two a b) c d e (Two f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits3 m1 (Two a b) c d e (Three f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits3 m1 (Two a b) c d e (Four f g h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits3 m1 (Three a b c) d e f (One g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits3 m1 (Three a b c) d e f (Two g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits3 m1 (Three a b c) d e f (Three g h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits3 m1 (Three a b c) d e f (Four g h i j) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2 addDigits3 m1 (Four a b c d) e f g (One h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits3 m1 (Four a b c d) e f g (Two h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits3 m1 (Four a b c d) e f g (Three h i j) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2 addDigits3 m1 (Four a b c d) e f g (Four h i j k) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2  appendTree4 :: FingerTree (Node a) -> Node a -> Node a -> Node a -> Node a -> FingerTree (Node a) -> FingerTree (Node a) appendTree4 Empty a b c d xs =-	a `consTree` b `consTree` c `consTree` d `consTree` xs+        a `consTree` b `consTree` c `consTree` d `consTree` xs appendTree4 xs a b c d Empty =-	xs `snocTree` a `snocTree` b `snocTree` c `snocTree` d+        xs `snocTree` a `snocTree` b `snocTree` c `snocTree` d appendTree4 (Single x) a b c d xs =-	x `consTree` a `consTree` b `consTree` c `consTree` d `consTree` xs+        x `consTree` a `consTree` b `consTree` c `consTree` d `consTree` xs appendTree4 xs a b c d (Single x) =-	xs `snocTree` a `snocTree` b `snocTree` c `snocTree` d `snocTree` x+        xs `snocTree` a `snocTree` b `snocTree` c `snocTree` d `snocTree` x appendTree4 (Deep s1 pr1 m1 sf1) a b c d (Deep s2 pr2 m2 sf2) =-	Deep (s1 + size a + size b + size c + size d + s2) pr1 (addDigits4 m1 sf1 a b c d pr2 m2) sf2+        Deep (s1 + size a + size b + size c + size d + s2) pr1 (addDigits4 m1 sf1 a b c d pr2 m2) sf2  addDigits4 :: FingerTree (Node (Node a)) -> Digit (Node a) -> Node a -> Node a -> Node a -> Node a -> Digit (Node a) -> FingerTree (Node (Node a)) -> FingerTree (Node (Node a)) addDigits4 m1 (One a) b c d e (One f) m2 =-	appendTree2 m1 (node3 a b c) (node3 d e f) m2+        appendTree2 m1 (node3 a b c) (node3 d e f) m2 addDigits4 m1 (One a) b c d e (Two f g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits4 m1 (One a) b c d e (Three f g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits4 m1 (One a) b c d e (Four f g h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits4 m1 (Two a b) c d e f (One g) m2 =-	appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2+        appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2 addDigits4 m1 (Two a b) c d e f (Two g h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits4 m1 (Two a b) c d e f (Three g h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits4 m1 (Two a b) c d e f (Four g h i j) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2 addDigits4 m1 (Three a b c) d e f g (One h) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 addDigits4 m1 (Three a b c) d e f g (Two h i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits4 m1 (Three a b c) d e f g (Three h i j) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2 addDigits4 m1 (Three a b c) d e f g (Four h i j k) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2 addDigits4 m1 (Four a b c d) e f g h (One i) m2 =-	appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2+        appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 addDigits4 m1 (Four a b c d) e f g h (Two i j) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node2 g h) (node2 i j) m2 addDigits4 m1 (Four a b c d) e f g h (Three i j k) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2 addDigits4 m1 (Four a b c d) e f g h (Four i j k l) m2 =-	appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node3 j k l) m2+        appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node3 j k l) m2  ------------------------------------------------------------------------ -- Deconstruction ------------------------------------------------------------------------  -- | /O(1)/. Is this the empty sequence?-null		:: Seq a -> Bool+null            :: Seq a -> Bool null (Seq Empty) = True-null _		=  False+null _          =  False  -- | /O(1)/. The number of elements in the sequence.-length		:: Seq a -> Int+length          :: Seq a -> Int length (Seq xs) =  size xs  -- Views@@ -524,10 +524,10 @@  -- | View of the left end of a sequence. data ViewL a-	= EmptyL	-- ^ empty sequence-	| a :< Seq a	-- ^ leftmost element and the rest of the sequence+        = EmptyL        -- ^ empty sequence+        | a :< Seq a    -- ^ leftmost element and the rest of the sequence #ifndef __HADDOCK__-	deriving (Eq, Show)+        deriving (Eq, Show) #else instance Eq a => Eq (ViewL a) instance Show a => Show (ViewL a)@@ -535,79 +535,79 @@   instance Functor ViewL where-	fmap _ EmptyL		= EmptyL-	fmap f (x :< xs)	= f x :< fmap f xs+        fmap _ EmptyL           = EmptyL+        fmap f (x :< xs)        = f x :< fmap f xs  -- | /O(1)/. Analyse the left end of a sequence.-viewl		::  Seq a -> ViewL a-viewl (Seq xs)	=  case viewLTree xs of-	Nothing2 -> EmptyL-	Just2 (Elem x) xs' -> x :< Seq xs'+viewl           ::  Seq a -> ViewL a+viewl (Seq xs)  =  case viewLTree xs of+        Nothing2 -> EmptyL+        Just2 (Elem x) xs' -> x :< Seq xs'  {-# SPECIALIZE viewLTree :: FingerTree (Elem a) -> Maybe2 (Elem a) (FingerTree (Elem a)) #-} {-# SPECIALIZE viewLTree :: FingerTree (Node a) -> Maybe2 (Node a) (FingerTree (Node a)) #-}-viewLTree	:: Sized a => FingerTree a -> Maybe2 a (FingerTree a)-viewLTree Empty			= Nothing2-viewLTree (Single a)		= Just2 a Empty+viewLTree       :: Sized a => FingerTree a -> Maybe2 a (FingerTree a)+viewLTree Empty                 = Nothing2+viewLTree (Single a)            = Just2 a Empty viewLTree (Deep s (One a) m sf) = Just2 a (case viewLTree m of-	Nothing2	-> digitToTree sf-	Just2 b m'	-> Deep (s - size a) (nodeToDigit b) m' sf)+        Nothing2        -> digitToTree sf+        Just2 b m'      -> Deep (s - size a) (nodeToDigit b) m' sf) viewLTree (Deep s (Two a b) m sf) =-	Just2 a (Deep (s - size a) (One b) m sf)+        Just2 a (Deep (s - size a) (One b) m sf) viewLTree (Deep s (Three a b c) m sf) =-	Just2 a (Deep (s - size a) (Two b c) m sf)+        Just2 a (Deep (s - size a) (Two b c) m sf) viewLTree (Deep s (Four a b c d) m sf) =-	Just2 a (Deep (s - size a) (Three b c d) m sf)+        Just2 a (Deep (s - size a) (Three b c d) m sf)  -- | View of the right end of a sequence. data ViewR a-	= EmptyR	-- ^ empty sequence-	| Seq a :> a	-- ^ the sequence minus the rightmost element,-			-- and the rightmost element+        = EmptyR        -- ^ empty sequence+        | Seq a :> a    -- ^ the sequence minus the rightmost element,+                        -- and the rightmost element #ifndef __HADDOCK__-	deriving (Eq, Show)+        deriving (Eq, Show) #else instance Eq a => Eq (ViewR a) instance Show a => Show (ViewR a) #endif  instance Functor ViewR where-	fmap _ EmptyR		= EmptyR-	fmap f (xs :> x)	= fmap f xs :> f x+        fmap _ EmptyR           = EmptyR+        fmap f (xs :> x)        = fmap f xs :> f x  -- | /O(1)/. Analyse the right end of a sequence.-viewr		::  Seq a -> ViewR a-viewr (Seq xs)	=  case viewRTree xs of-	Nothing2 -> EmptyR-	Just2 xs' (Elem x) -> Seq xs' :> x+viewr           ::  Seq a -> ViewR a+viewr (Seq xs)  =  case viewRTree xs of+        Nothing2 -> EmptyR+        Just2 xs' (Elem x) -> Seq xs' :> x  {-# SPECIALIZE viewRTree :: FingerTree (Elem a) -> Maybe2 (FingerTree (Elem a)) (Elem a) #-} {-# SPECIALIZE viewRTree :: FingerTree (Node a) -> Maybe2 (FingerTree (Node a)) (Node a) #-}-viewRTree	:: Sized a => FingerTree a -> Maybe2 (FingerTree a) a-viewRTree Empty			= Nothing2-viewRTree (Single z)		= Just2 Empty z+viewRTree       :: Sized a => FingerTree a -> Maybe2 (FingerTree a) a+viewRTree Empty                 = Nothing2+viewRTree (Single z)            = Just2 Empty z viewRTree (Deep s pr m (One z)) = Just2 (case viewRTree m of-	Nothing2	->  digitToTree pr-	Just2 m' y	->  Deep (s - size z) pr m' (nodeToDigit y)) z+        Nothing2        ->  digitToTree pr+        Just2 m' y      ->  Deep (s - size z) pr m' (nodeToDigit y)) z viewRTree (Deep s pr m (Two y z)) =-	Just2 (Deep (s - size z) pr m (One y)) z+        Just2 (Deep (s - size z) pr m (One y)) z viewRTree (Deep s pr m (Three x y z)) =-	Just2 (Deep (s - size z) pr m (Two x y)) z+        Just2 (Deep (s - size z) pr m (Two x y)) z viewRTree (Deep s pr m (Four w x y z)) =-	Just2 (Deep (s - size z) pr m (Three w x y)) z+        Just2 (Deep (s - size z) pr m (Three w x y)) z  -- Indexing  -- | /O(log(min(i,n-i)))/. The element at the specified position-index		:: Seq a -> Int -> a+index           :: Seq a -> Int -> a index (Seq xs) i   | 0 <= i && i < size xs = case lookupTree (-i) xs of-				Place _ (Elem x) -> x-  | otherwise	= error "index out of bounds"+                                Place _ (Elem x) -> x+  | otherwise   = error "index out of bounds"  data Place a = Place {-# UNPACK #-} !Int a #if TESTING-	deriving Show+        deriving Show #endif  {-# SPECIALIZE lookupTree :: Int -> FingerTree (Elem a) -> Place (Elem a) #-}@@ -615,135 +615,135 @@ lookupTree :: Sized a => Int -> FingerTree a -> Place a lookupTree i (Single x) = Place i x lookupTree i (Deep _ pr m sf)-  | vpr > 0	=  lookupDigit i pr-  | vm > 0	=  case lookupTree vpr m of-			Place i' xs -> lookupNode i' xs-  | otherwise	=  lookupDigit vm sf-  where	vpr	=  i + size pr-	vm	=  vpr + size m+  | vpr > 0     =  lookupDigit i pr+  | vm > 0      =  case lookupTree vpr m of+                        Place i' xs -> lookupNode i' xs+  | otherwise   =  lookupDigit vm sf+  where vpr     =  i + size pr+        vm      =  vpr + size m  {-# SPECIALIZE lookupNode :: Int -> Node (Elem a) -> Place (Elem a) #-} {-# SPECIALIZE lookupNode :: Int -> Node (Node a) -> Place (Node a) #-} lookupNode :: Sized a => Int -> Node a -> Place a lookupNode i (Node2 _ a b)-  | va > 0	= Place i a-  | otherwise	= Place va b-  where	va	= i + size a+  | va > 0      = Place i a+  | otherwise   = Place va b+  where va      = i + size a lookupNode i (Node3 _ a b c)-  | va > 0	= Place i a-  | vab > 0	= Place va b-  | otherwise	= Place vab c-  where	va	= i + size a-	vab	= va + size b+  | va > 0      = Place i a+  | vab > 0     = Place va b+  | otherwise   = Place vab c+  where va      = i + size a+        vab     = va + size b  {-# SPECIALIZE lookupDigit :: Int -> Digit (Elem a) -> Place (Elem a) #-} {-# SPECIALIZE lookupDigit :: Int -> Digit (Node a) -> Place (Node a) #-} lookupDigit :: Sized a => Int -> Digit a -> Place a lookupDigit i (One a) = Place i a lookupDigit i (Two a b)-  | va > 0	= Place i a-  | otherwise	= Place va b-  where	va	= i + size a+  | va > 0      = Place i a+  | otherwise   = Place va b+  where va      = i + size a lookupDigit i (Three a b c)-  | va > 0	= Place i a-  | vab > 0	= Place va b-  | otherwise	= Place vab c-  where	va	= i + size a-	vab	= va + size b+  | va > 0      = Place i a+  | vab > 0     = Place va b+  | otherwise   = Place vab c+  where va      = i + size a+        vab     = va + size b lookupDigit i (Four a b c d)-  | va > 0	= Place i a-  | vab > 0	= Place va b-  | vabc > 0	= Place vab c-  | otherwise	= Place vabc d-  where	va	= i + size a-	vab	= va + size b-	vabc	= vab + size c+  | va > 0      = Place i a+  | vab > 0     = Place va b+  | vabc > 0    = Place vab c+  | otherwise   = Place vabc d+  where va      = i + size a+        vab     = va + size b+        vabc    = vab + size c  -- | /O(log(min(i,n-i)))/. Replace the element at the specified position-update		:: Int -> a -> Seq a -> Seq a-update i x	= adjust (const x) i+update          :: Int -> a -> Seq a -> Seq a+update i x      = adjust (const x) i  -- | /O(log(min(i,n-i)))/. Update the element at the specified position-adjust		:: (a -> a) -> Int -> Seq a -> Seq a+adjust          :: (a -> a) -> Int -> Seq a -> Seq a adjust f i (Seq xs)   | 0 <= i && i < size xs = Seq (adjustTree (const (fmap f)) (-i) xs)-  | otherwise	= Seq xs+  | otherwise   = Seq xs  {-# SPECIALIZE adjustTree :: (Int -> Elem a -> Elem a) -> Int -> FingerTree (Elem a) -> FingerTree (Elem a) #-} {-# SPECIALIZE adjustTree :: (Int -> Node a -> Node a) -> Int -> FingerTree (Node a) -> FingerTree (Node a) #-}-adjustTree	:: Sized a => (Int -> a -> a) ->-			Int -> FingerTree a -> FingerTree a+adjustTree      :: Sized a => (Int -> a -> a) ->+                        Int -> FingerTree a -> FingerTree a adjustTree f i (Single x) = Single (f i x) adjustTree f i (Deep s pr m sf)-  | vpr > 0	= Deep s (adjustDigit f i pr) m sf-  | vm > 0	= Deep s pr (adjustTree (adjustNode f) vpr m) sf-  | otherwise	= Deep s pr m (adjustDigit f vm sf)-  where	vpr	= i + size pr-	vm	= vpr + size m+  | vpr > 0     = Deep s (adjustDigit f i pr) m sf+  | vm > 0      = Deep s pr (adjustTree (adjustNode f) vpr m) sf+  | otherwise   = Deep s pr m (adjustDigit f vm sf)+  where vpr     = i + size pr+        vm      = vpr + size m  {-# SPECIALIZE adjustNode :: (Int -> Elem a -> Elem a) -> Int -> Node (Elem a) -> Node (Elem a) #-} {-# SPECIALIZE adjustNode :: (Int -> Node a -> Node a) -> Int -> Node (Node a) -> Node (Node a) #-}-adjustNode	:: Sized a => (Int -> a -> a) -> Int -> Node a -> Node a+adjustNode      :: Sized a => (Int -> a -> a) -> Int -> Node a -> Node a adjustNode f i (Node2 s a b)-  | va > 0	= Node2 s (f i a) b-  | otherwise	= Node2 s a (f va b)-  where	va	= i + size a+  | va > 0      = Node2 s (f i a) b+  | otherwise   = Node2 s a (f va b)+  where va      = i + size a adjustNode f i (Node3 s a b c)-  | va > 0	= Node3 s (f i a) b c-  | vab > 0	= Node3 s a (f va b) c-  | otherwise	= Node3 s a b (f vab c)-  where	va	= i + size a-	vab	= va + size b+  | va > 0      = Node3 s (f i a) b c+  | vab > 0     = Node3 s a (f va b) c+  | otherwise   = Node3 s a b (f vab c)+  where va      = i + size a+        vab     = va + size b  {-# SPECIALIZE adjustDigit :: (Int -> Elem a -> Elem a) -> Int -> Digit (Elem a) -> Digit (Elem a) #-} {-# SPECIALIZE adjustDigit :: (Int -> Node a -> Node a) -> Int -> Digit (Node a) -> Digit (Node a) #-}-adjustDigit	:: Sized a => (Int -> a -> a) -> Int -> Digit a -> Digit a+adjustDigit     :: Sized a => (Int -> a -> a) -> Int -> Digit a -> Digit a adjustDigit f i (One a) = One (f i a) adjustDigit f i (Two a b)-  | va > 0	= Two (f i a) b-  | otherwise	= Two a (f va b)-  where	va	= i + size a+  | va > 0      = Two (f i a) b+  | otherwise   = Two a (f va b)+  where va      = i + size a adjustDigit f i (Three a b c)-  | va > 0	= Three (f i a) b c-  | vab > 0	= Three a (f va b) c-  | otherwise	= Three a b (f vab c)-  where	va	= i + size a-	vab	= va + size b+  | va > 0      = Three (f i a) b c+  | vab > 0     = Three a (f va b) c+  | otherwise   = Three a b (f vab c)+  where va      = i + size a+        vab     = va + size b adjustDigit f i (Four a b c d)-  | va > 0	= Four (f i a) b c d-  | vab > 0	= Four a (f va b) c d-  | vabc > 0	= Four a b (f vab c) d-  | otherwise	= Four a b c (f vabc d)-  where	va	= i + size a-	vab	= va + size b-	vabc	= vab + size c+  | va > 0      = Four (f i a) b c d+  | vab > 0     = Four a (f va b) c d+  | vabc > 0    = Four a b (f vab c) d+  | otherwise   = Four a b c (f vabc d)+  where va      = i + size a+        vab     = va + size b+        vabc    = vab + size c  -- Splitting  -- | /O(log(min(i,n-i)))/. The first @i@ elements of a sequence.-take		:: Int -> Seq a -> Seq a-take i		=  fst . splitAt i+take            :: Int -> Seq a -> Seq a+take i          =  fst . splitAt i  -- | /O(log(min(i,n-i)))/. Elements of sequence after the first @i@.-drop		:: Int -> Seq a -> Seq a-drop i		=  snd . splitAt i+drop            :: Int -> Seq a -> Seq a+drop i          =  snd . splitAt i  -- | /O(log(min(i,n-i)))/. Split a sequence at a given position.-splitAt			:: Int -> Seq a -> (Seq a, Seq a)-splitAt i (Seq xs)	=  (Seq l, Seq r)-  where	(l, r)		=  split i xs+splitAt                 :: Int -> Seq a -> (Seq a, Seq a)+splitAt i (Seq xs)      =  (Seq l, Seq r)+  where (l, r)          =  split i xs  split :: Int -> FingerTree (Elem a) ->-	(FingerTree (Elem a), FingerTree (Elem a))-split i Empty	= i `seq` (Empty, Empty)+        (FingerTree (Elem a), FingerTree (Elem a))+split i Empty   = i `seq` (Empty, Empty) split i xs-  | size xs > i	= (l, consTree x r)-  | otherwise	= (xs, Empty)+  | size xs > i = (l, consTree x r)+  | otherwise   = (xs, Empty)   where Split l x r = splitTree (-i) xs  data Split t a = Split t a t #if TESTING-	deriving Show+        deriving Show #endif  {-# SPECIALIZE splitTree :: Int -> FingerTree (Elem a) -> Split (FingerTree (Elem a)) (Elem a) #-}@@ -751,80 +751,80 @@ splitTree :: Sized a => Int -> FingerTree a -> Split (FingerTree a) a splitTree i (Single x) = i `seq` Split Empty x Empty splitTree i (Deep _ pr m sf)-  | vpr > 0	= case splitDigit i pr of-			Split l x r -> Split (maybe Empty digitToTree l) x (deepL r m sf)-  | vm > 0	= case splitTree vpr m of-			Split ml xs mr -> case splitNode (vpr + size ml) xs of-			    Split l x r -> Split (deepR pr  ml l) x (deepL r mr sf)-  | otherwise	= case splitDigit vm sf of-			Split l x r -> Split (deepR pr  m  l) x (maybe Empty digitToTree r)-  where	vpr	= i + size pr-	vm	= vpr + size m+  | vpr > 0     = case splitDigit i pr of+                        Split l x r -> Split (maybe Empty digitToTree l) x (deepL r m sf)+  | vm > 0      = case splitTree vpr m of+                        Split ml xs mr -> case splitNode (vpr + size ml) xs of+                            Split l x r -> Split (deepR pr  ml l) x (deepL r mr sf)+  | otherwise   = case splitDigit vm sf of+                        Split l x r -> Split (deepR pr  m  l) x (maybe Empty digitToTree r)+  where vpr     = i + size pr+        vm      = vpr + size m  {-# SPECIALIZE deepL :: Maybe (Digit (Elem a)) -> FingerTree (Node (Elem a)) -> Digit (Elem a) -> FingerTree (Elem a) #-} {-# SPECIALIZE deepL :: Maybe (Digit (Node a)) -> FingerTree (Node (Node a)) -> Digit (Node a) -> FingerTree (Node a) #-} deepL :: Sized a => Maybe (Digit a) -> FingerTree (Node a) -> Digit a -> FingerTree a-deepL Nothing m sf	= case viewLTree m of-	Nothing2	-> digitToTree sf-	Just2 a m'	-> deep (nodeToDigit a) m' sf-deepL (Just pr) m sf	= deep pr m sf+deepL Nothing m sf      = case viewLTree m of+        Nothing2        -> digitToTree sf+        Just2 a m'      -> deep (nodeToDigit a) m' sf+deepL (Just pr) m sf    = deep pr m sf  {-# SPECIALIZE deepR :: Digit (Elem a) -> FingerTree (Node (Elem a)) -> Maybe (Digit (Elem a)) -> FingerTree (Elem a) #-} {-# SPECIALIZE deepR :: Digit (Node a) -> FingerTree (Node (Node a)) -> Maybe (Digit (Node a)) -> FingerTree (Node a) #-} deepR :: Sized a => Digit a -> FingerTree (Node a) -> Maybe (Digit a) -> FingerTree a-deepR pr m Nothing	= case viewRTree m of-	Nothing2	-> digitToTree pr-	Just2 m' a	-> deep pr m' (nodeToDigit a)-deepR pr m (Just sf)	= deep pr m sf+deepR pr m Nothing      = case viewRTree m of+        Nothing2        -> digitToTree pr+        Just2 m' a      -> deep pr m' (nodeToDigit a)+deepR pr m (Just sf)    = deep pr m sf  {-# SPECIALIZE splitNode :: Int -> Node (Elem a) -> Split (Maybe (Digit (Elem a))) (Elem a) #-} {-# SPECIALIZE splitNode :: Int -> Node (Node a) -> Split (Maybe (Digit (Node a))) (Node a) #-} splitNode :: Sized a => Int -> Node a -> Split (Maybe (Digit a)) a splitNode i (Node2 _ a b)-  | va > 0	= Split Nothing a (Just (One b))-  | otherwise	= Split (Just (One a)) b Nothing-  where	va	= i + size a+  | va > 0      = Split Nothing a (Just (One b))+  | otherwise   = Split (Just (One a)) b Nothing+  where va      = i + size a splitNode i (Node3 _ a b c)-  | va > 0	= Split Nothing a (Just (Two b c))-  | vab > 0	= Split (Just (One a)) b (Just (One c))-  | otherwise	= Split (Just (Two a b)) c Nothing-  where	va	= i + size a-	vab	= va + size b+  | va > 0      = Split Nothing a (Just (Two b c))+  | vab > 0     = Split (Just (One a)) b (Just (One c))+  | otherwise   = Split (Just (Two a b)) c Nothing+  where va      = i + size a+        vab     = va + size b  {-# SPECIALIZE splitDigit :: Int -> Digit (Elem a) -> Split (Maybe (Digit (Elem a))) (Elem a) #-} {-# SPECIALIZE splitDigit :: Int -> Digit (Node a) -> Split (Maybe (Digit (Node a))) (Node a) #-} splitDigit :: Sized a => Int -> Digit a -> Split (Maybe (Digit a)) a splitDigit i (One a) = i `seq` Split Nothing a Nothing splitDigit i (Two a b)-  | va > 0	= Split Nothing a (Just (One b))-  | otherwise	= Split (Just (One a)) b Nothing-  where	va	= i + size a+  | va > 0      = Split Nothing a (Just (One b))+  | otherwise   = Split (Just (One a)) b Nothing+  where va      = i + size a splitDigit i (Three a b c)-  | va > 0	= Split Nothing a (Just (Two b c))-  | vab > 0	= Split (Just (One a)) b (Just (One c))-  | otherwise	= Split (Just (Two a b)) c Nothing-  where	va	= i + size a-	vab	= va + size b+  | va > 0      = Split Nothing a (Just (Two b c))+  | vab > 0     = Split (Just (One a)) b (Just (One c))+  | otherwise   = Split (Just (Two a b)) c Nothing+  where va      = i + size a+        vab     = va + size b splitDigit i (Four a b c d)-  | va > 0	= Split Nothing a (Just (Three b c d))-  | vab > 0	= Split (Just (One a)) b (Just (Two c d))-  | vabc > 0	= Split (Just (Two a b)) c (Just (One d))-  | otherwise	= Split (Just (Three a b c)) d Nothing-  where	va	= i + size a-	vab	= va + size b-	vabc	= vab + size c+  | va > 0      = Split Nothing a (Just (Three b c d))+  | vab > 0     = Split (Just (One a)) b (Just (Two c d))+  | vabc > 0    = Split (Just (Two a b)) c (Just (One d))+  | otherwise   = Split (Just (Three a b c)) d Nothing+  where va      = i + size a+        vab     = va + size b+        vabc    = vab + size c  ------------------------------------------------------------------------ -- Lists ------------------------------------------------------------------------  -- | /O(n)/. Create a sequence from a finite list of elements.-fromList  	:: [a] -> Seq a-fromList  	=  Data.List.foldl' (|>) empty+fromList        :: [a] -> Seq a+fromList        =  Data.List.foldl' (|>) empty  -- | /O(n)/. List of elements of the sequence.-toList		:: Seq a -> [a]-toList		=  foldr (:) []+toList          :: Seq a -> [a]+toList          =  foldr (:) []  ------------------------------------------------------------------------ -- Folds@@ -840,7 +840,7 @@ foldrTree _ z Empty = z foldrTree f z (Single x) = x `f` z foldrTree f z (Deep _ pr m sf) =-	foldrDigit f (foldrTree (flip (foldrNode f)) (foldrDigit f z sf) m) pr+        foldrDigit f (foldrTree (flip (foldrNode f)) (foldrDigit f z sf) m) pr  foldrDigit :: (a -> b -> b) -> b -> Digit a -> b foldrDigit f z (One a) = a `f` z@@ -862,7 +862,7 @@ foldr1Tree _ Empty = error "foldr1: empty sequence" foldr1Tree _ (Single x) = x foldr1Tree f (Deep _ pr m sf) =-	foldrDigit f (foldrTree (flip (foldrNode f)) (foldr1Digit f sf) m) pr+        foldrDigit f (foldrTree (flip (foldrNode f)) (foldr1Digit f sf) m) pr  foldr1Digit :: (a -> a -> a) -> Digit a -> a foldr1Digit f (One a) = a@@ -880,7 +880,7 @@ foldlTree _ z Empty = z foldlTree f z (Single x) = z `f` x foldlTree f z (Deep _ pr m sf) =-	foldlDigit f (foldlTree (foldlNode f) (foldlDigit f z pr) m) sf+        foldlDigit f (foldlTree (foldlNode f) (foldlDigit f z pr) m) sf  foldlDigit :: (a -> b -> a) -> a -> Digit b -> a foldlDigit f z (One a) = z `f` a@@ -902,7 +902,7 @@ foldl1Tree _ Empty = error "foldl1: empty sequence" foldl1Tree _ (Single x) = x foldl1Tree f (Deep _ pr m sf) =-	foldlDigit f (foldlTree (foldlNode f) (foldl1Digit f pr) m) sf+        foldlDigit f (foldlTree (foldlNode f) (foldl1Digit f pr) m) sf  foldl1Digit :: (a -> a -> a) -> Digit a -> a foldl1Digit f (One a) = a@@ -950,9 +950,9 @@ reverseTree _ Empty = Empty reverseTree f (Single x) = Single (f x) reverseTree f (Deep s pr m sf) =-	Deep s (reverseDigit f sf)-		(reverseTree (reverseNode f) m)-		(reverseDigit f pr)+        Deep s (reverseDigit f sf)+                (reverseTree (reverseNode f) m)+                (reverseDigit f pr)  reverseDigit :: (a -> a) -> Digit a -> Digit a reverseDigit f (One a) = One (f a)@@ -971,76 +971,76 @@ ------------------------------------------------------------------------  instance Arbitrary a => Arbitrary (Seq a) where-	arbitrary = liftM Seq arbitrary-	coarbitrary (Seq x) = coarbitrary x+        arbitrary = liftM Seq arbitrary+        coarbitrary (Seq x) = coarbitrary x  instance Arbitrary a => Arbitrary (Elem a) where-	arbitrary = liftM Elem arbitrary-	coarbitrary (Elem x) = coarbitrary x+        arbitrary = liftM Elem arbitrary+        coarbitrary (Elem x) = coarbitrary x  instance (Arbitrary a, Sized a) => Arbitrary (FingerTree a) where-	arbitrary = sized arb-	  where arb :: (Arbitrary a, Sized a) => Int -> Gen (FingerTree a)-		arb 0 = return Empty-		arb 1 = liftM Single arbitrary-		arb n = liftM3 deep arbitrary (arb (n `div` 2)) arbitrary+        arbitrary = sized arb+          where arb :: (Arbitrary a, Sized a) => Int -> Gen (FingerTree a)+                arb 0 = return Empty+                arb 1 = liftM Single arbitrary+                arb n = liftM3 deep arbitrary (arb (n `div` 2)) arbitrary -	coarbitrary Empty = variant 0-	coarbitrary (Single x) = variant 1 . coarbitrary x-	coarbitrary (Deep _ pr m sf) =-		variant 2 . coarbitrary pr . coarbitrary m . coarbitrary sf+        coarbitrary Empty = variant 0+        coarbitrary (Single x) = variant 1 . coarbitrary x+        coarbitrary (Deep _ pr m sf) =+                variant 2 . coarbitrary pr . coarbitrary m . coarbitrary sf  instance (Arbitrary a, Sized a) => Arbitrary (Node a) where-	arbitrary = oneof [-			liftM2 node2 arbitrary arbitrary,-			liftM3 node3 arbitrary arbitrary arbitrary]+        arbitrary = oneof [+                        liftM2 node2 arbitrary arbitrary,+                        liftM3 node3 arbitrary arbitrary arbitrary] -	coarbitrary (Node2 _ a b) = variant 0 . coarbitrary a . coarbitrary b-	coarbitrary (Node3 _ a b c) =-		variant 1 . coarbitrary a . coarbitrary b . coarbitrary c+        coarbitrary (Node2 _ a b) = variant 0 . coarbitrary a . coarbitrary b+        coarbitrary (Node3 _ a b c) =+                variant 1 . coarbitrary a . coarbitrary b . coarbitrary c  instance Arbitrary a => Arbitrary (Digit a) where-	arbitrary = oneof [-			liftM One arbitrary,-			liftM2 Two arbitrary arbitrary,-			liftM3 Three arbitrary arbitrary arbitrary,-			liftM4 Four arbitrary arbitrary arbitrary arbitrary]+        arbitrary = oneof [+                        liftM One arbitrary,+                        liftM2 Two arbitrary arbitrary,+                        liftM3 Three arbitrary arbitrary arbitrary,+                        liftM4 Four arbitrary arbitrary arbitrary arbitrary] -	coarbitrary (One a) = variant 0 . coarbitrary a-	coarbitrary (Two a b) = variant 1 . coarbitrary a . coarbitrary b-	coarbitrary (Three a b c) =-		variant 2 . coarbitrary a . coarbitrary b . coarbitrary c-	coarbitrary (Four a b c d) =-		variant 3 . coarbitrary a . coarbitrary b . coarbitrary c . coarbitrary d+        coarbitrary (One a) = variant 0 . coarbitrary a+        coarbitrary (Two a b) = variant 1 . coarbitrary a . coarbitrary b+        coarbitrary (Three a b c) =+                variant 2 . coarbitrary a . coarbitrary b . coarbitrary c+        coarbitrary (Four a b c d) =+                variant 3 . coarbitrary a . coarbitrary b . coarbitrary c . coarbitrary d  ------------------------------------------------------------------------ -- Valid trees ------------------------------------------------------------------------  class Valid a where-	valid :: a -> Bool+        valid :: a -> Bool  instance Valid (Elem a) where-	valid _ = True+        valid _ = True  instance Valid (Seq a) where-	valid (Seq xs) = valid xs+        valid (Seq xs) = valid xs  instance (Sized a, Valid a) => Valid (FingerTree a) where-	valid Empty = True-	valid (Single x) = valid x-	valid (Deep s pr m sf) =-		s == size pr + size m + size sf && valid pr && valid m && valid sf+        valid Empty = True+        valid (Single x) = valid x+        valid (Deep s pr m sf) =+                s == size pr + size m + size sf && valid pr && valid m && valid sf  instance (Sized a, Valid a) => Valid (Node a) where-	valid (Node2 s a b) = s == size a + size b && valid a && valid b-	valid (Node3 s a b c) =-		s == size a + size b + size c && valid a && valid b && valid c+        valid (Node2 s a b) = s == size a + size b && valid a && valid b+        valid (Node3 s a b c) =+                s == size a + size b + size c && valid a && valid b && valid c  instance Valid a => Valid (Digit a) where-	valid (One a) = valid a-	valid (Two a b) = valid a && valid b-	valid (Three a b c) = valid a && valid b && valid c-	valid (Four a b c d) = valid a && valid b && valid c && valid d+        valid (One a) = valid a+        valid (Two a b) = valid a && valid b+        valid (Three a b c) = valid a && valid b && valid c+        valid (Four a b c d) = valid a && valid b && valid c && valid d  #endif
Graphics/UI/Gtk/ModelView/TreeDrag.chs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Interface DragSource and DragDest --@@ -57,11 +57,12 @@ -- so easy in Gtk2Hs, I think we can do without the cheat way.  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.GObject {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#}      (TreePath, fromTreePath, withTreePath,                                                  NativeTreePath(..))-import Graphics.UI.Gtk.General.DNDTypes         (SelectionDataM, SelectionData,+import Graphics.UI.Gtk.General.DNDTypes         (SelectionDataM,                                                  TargetTag, atomNew) import Control.Monad                            (liftM) import Control.Monad.Trans                      (liftIO)@@ -84,7 +85,7 @@ -- 'Graphics.UI.Gtk.General.Selection.InfoId' of @0@. -- targetTreeModelRow :: TargetTag-targetTreeModelRow = unsafePerformIO $ atomNew "GTK_TREE_MODEL_ROW"+targetTreeModelRow = unsafePerformIO $ atomNew ("GTK_TREE_MODEL_ROW"::DefaultGlibString)  -- %hash c:8dcb d:af3f -- | Obtains a 'TreeModel' and a path from 'SelectionDataM' whenever the target is@@ -113,6 +114,6 @@ treeSetRowDragData treeModel path = do   selPtr <- ask   liftM toBool $ liftIO $ withTreePath path $ \path ->-    {# call unsafe gtk_tree_set_row_drag_data #} selPtr +    {# call unsafe gtk_tree_set_row_drag_data #} selPtr     (toTreeModel treeModel)     path
Graphics/UI/Gtk/ModelView/TreeModel.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Rank2Types #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) TreeModel --@@ -27,7 +28,7 @@ -- module Graphics.UI.Gtk.ModelView.TreeModel ( -- * Detail---               +-- -- | The 'TreeModel' interface defines a generic storage object for use by the -- 'TreeView' and similar widgets. Specifically, the functions in defined here -- are used by Gtk's widgets to access the stored data. Thus, rather than@@ -105,7 +106,7 @@   TypedTreeModel,   TypedTreeModelClass,   toTypedTreeModel,-  +   TreeIter(..),   TreePath, @@ -154,18 +155,15 @@    ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Flags		(toFlags)+import System.Glib.Flags                (toFlags) import System.Glib.UTFString {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Types#}-import System.Glib.StoreValue		(TMType, GenericValue,-					 valueGetGenericValue)-{#import System.Glib.GValue#}		(GValue(GValue), allocaGValue)-{#import Graphics.UI.Gtk.ModelView.CustomStore#} (TreeModelFlags(..),-                                                  treeModelGetRow)+{#import System.Glib.GValue#}           (GValue(GValue), allocaGValue)+{#import Graphics.UI.Gtk.ModelView.CustomStore#} (TreeModelFlags(..)) {#import Graphics.UI.Gtk.ModelView.Types#}  (TypedTreeModel,                                              TypedTreeModelClass,                                              toTypedTreeModel,@@ -197,7 +195,7 @@ makeColumnIdBool = ColumnId valueGetBool CABool  -- | Create a 'ColumnId' to extract an string.-makeColumnIdString :: Int -> ColumnId row String+makeColumnIdString :: GlibString string => Int -> ColumnId row string makeColumnIdString = ColumnId valueGetString CAString  -- | Create a 'ColumnId' to extract an 'Pixbuf'.@@ -219,8 +217,8 @@  instance Show (ColumnId row ty) where   show (ColumnId _ _ i) = show i-   + -------------------- -- Methods @@ -242,8 +240,8 @@ -- * Returns @Nothing@ if the string is not a colon separated list of numbers --   that references a valid node. ---treeModelGetIterFromString :: TreeModelClass self => self- -> String   -- ^ @pathString@ - A string representation of a 'TreePath'.+treeModelGetIterFromString :: (TreeModelClass self, GlibString string) => self+ -> string   -- ^ @pathString@ - A string representation of a 'TreePath'.  -> IO (Maybe TreeIter) treeModelGetIterFromString self pathString =   receiveTreeIter $ \iterPtr ->@@ -313,7 +311,7 @@     iterPtr     (fromIntegral colId)     gVal-  getter gVal  +  getter gVal  -- %hash c:5c12 d:d7db -- | Retrieve an iterator to the node following it at the current level. If@@ -438,9 +436,9 @@ -- -- * Available since Gtk+ version 2.2 ---treeModelGetStringFromIter :: TreeModelClass self => self+treeModelGetStringFromIter :: (TreeModelClass self, GlibString string) => self  -> TreeIter  -- ^ @iter@ - An 'TreeIter'.- -> IO String -- ^ the returned string representation+ -> IO string -- ^ the returned string representation treeModelGetStringFromIter self iter = with iter $ \iter ->   {# call gtk_tree_model_get_string_from_iter #}     (toTreeModel self)@@ -582,11 +580,11 @@  -> TreePath -- ^ @path@ - A 'TreePath' pointing to the tree node whose              -- children have been reordered  -> Maybe TreeIter -- ^ @iter@ - A valid 'TreeIter' pointing to the node whose-                   -- children have been reordered, or @Nothing@ if +                   -- children have been reordered, or @Nothing@ if                    -- @path@ is @[]@.  -> [Int]   -- ^ @newOrder@ - a list of integers giving the previous position             -- of each node at this hierarchy level.- +  -> IO () treeModelRowsReordered self path iter array = do   n <- treeModelIterNChildren self iter
Graphics/UI/Gtk/ModelView/TreeModelFilter.chs view
@@ -81,15 +81,13 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.GObject			(wrapNewGObject) import System.Glib.Attributes import System.Glib.Properties {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.TreeModel#}-{#import Graphics.UI.Gtk.ModelView.CustomStore#} {#import Graphics.UI.Gtk.ModelView.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -118,14 +116,14 @@  -> IO (TypedTreeModelFilter row) treeModelFilterNew childModel [] =   liftM unsafeTreeModelFilterToGeneric $-  wrapNewGObject mkTreeModelFilter $ +  wrapNewGObject mkTreeModelFilter $   liftM (castPtr :: Ptr TreeModel -> Ptr TreeModelFilter) $   {# call gtk_tree_model_filter_new #}     (toTreeModel childModel)     (NativeTreePath nullPtr) treeModelFilterNew childModel root =   liftM unsafeTreeModelFilterToGeneric $-  wrapNewGObject mkTreeModelFilter $ +  wrapNewGObject mkTreeModelFilter $   liftM (castPtr :: Ptr TreeModel -> Ptr TreeModelFilter) $   withTreePath root $ \root ->   {# call gtk_tree_model_filter_new #}@@ -170,7 +168,7 @@ --   should look for visibility information. A row containing @True@ means --   that this row should be shown. ---treeModelFilterSetVisibleColumn :: +treeModelFilterSetVisibleColumn ::  (TreeModelFilterClass (self row),   TypedTreeModelClass self)  => self row@@ -200,7 +198,7 @@  -> TreeIter  -> IO TreeIter treeModelFilterConvertChildIterToIter self childIter =-  with childIter $ \childIterPtr -> +  with childIter $ \childIterPtr ->   alloca $ \filterIterPtr -> do   {# call tree_model_filter_convert_child_iter_to_iter #}     (toTreeModelFilter self)@@ -296,6 +294,6 @@ -- treeModelFilterVirtualRoot :: TreeModelFilterClass self => ReadAttr self TreePath treeModelFilterVirtualRoot = readAttrFromBoxedOpaqueProperty (peekTreePath . castPtr)-                             "virtual-root" +                             "virtual-root"                              {#call pure unsafe gtk_tree_path_get_type#} #endif
Graphics/UI/Gtk/ModelView/TreeModelSort.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.TreeModelSort ( -- * Detail--- +-- -- | The 'TreeModelSort' is a model which implements the 'TreeSortable' -- interface. It does not hold any data itself, but rather is created with a -- child model and proxies its data. It has identical rows to its@@ -66,10 +66,9 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.GObject			(wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.TreeModel#} {#import Graphics.UI.Gtk.ModelView.Types#}@@ -149,7 +148,7 @@  -> TreeIter  -> IO TreeIter treeModelSortConvertChildIterToIter self childIter =-  with childIter $ \childIterPtr -> +  with childIter $ \childIterPtr ->   alloca $ \sortIterPtr -> do   {# call tree_model_sort_convert_child_iter_to_iter #}     (toTreeModelSort self)
Graphics/UI/Gtk/ModelView/TreeRowReference.chs view
@@ -44,7 +44,7 @@   treeRowReferenceValid,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI {#import Graphics.UI.Gtk.Types#}@@ -68,7 +68,7 @@  -> TreePath  -> IO (Maybe TreeRowReference) treeRowReferenceNew self path = withTreePath path $ \path -> do-  rowRefPtr <- +  rowRefPtr <-     {#call gtk_tree_row_reference_new#} (toTreeModel self) path   if rowRefPtr==nullPtr then return Nothing else     liftM (Just . TreeRowReference) $
Graphics/UI/Gtk/ModelView/TreeSelection.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.TreeSelection ( -- * Detail--- +-- -- | The 'TreeSelection' object is a helper object to manage the selection for -- a 'TreeView' widget. The 'TreeSelection' object is automatically created -- when a new 'TreeView' widget is created, and cannot exist independentally of@@ -104,13 +104,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.GList                (fromGList) import System.Glib.Attributes-import System.Glib.GObject		(destroyFunPtr)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.Enums    (SelectionMode(..))@@ -161,7 +160,7 @@     (castFunPtrToPtr fPtr)     destroyFunPtr --- | Callback type for a function that is called everytime the selection+-- | Callback type for a function that is called every time the selection -- changes. This function is set with 'treeSelectionSetSelectFunction'. -- type TreeSelectionCB = TreePath -> IO Bool@@ -233,7 +232,7 @@ -- treeSelectionGetSelectedRows :: TreeSelectionClass self => self  -> IO [TreePath] -- ^ returns a list containing a 'TreePath' for-		  -- each selected row.+                  -- each selected row. treeSelectionGetSelectedRows self =   {# call gtk_tree_selection_get_selected_rows #}     (toTreeSelection self)@@ -283,7 +282,7 @@ treeSelectionPathIsSelected self path =   liftM toBool $   withTreePath path $ \path ->-  {# call unsafe tree_selection_path_is_selected #}+  {# call tree_selection_path_is_selected #}     (toTreeSelection self)     path @@ -313,7 +312,7 @@ treeSelectionIterIsSelected self iter =   liftM toBool $   with iter $ \iterPtr ->-  {# call unsafe tree_selection_iter_is_selected #}+  {# call tree_selection_iter_is_selected #}     (toTreeSelection self)     iterPtr 
Graphics/UI/Gtk/ModelView/TreeSortable.chs view
@@ -44,7 +44,7 @@ -- 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' or -- 'Graphics.UI.Gtk.ModelView.TreeStore.TreeStore' model in a -- 'Graphics.UI.Gtk.ModelView.TreeModelSort.TreeModelSort'.---    +-- -- A 'Graphics.UI.Gtk.ModelView.TreeViewColumn' can be sorted by the user -- though clicking into the column's header. The rows in the view will then be -- sorted by the sorting function set for that column. Specifically, a set of@@ -88,17 +88,14 @@   sortColumnChanged   ) where -import Control.Monad	(liftM, when)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Flags		(Flags, toFlags)-import System.Glib.UTFString-import System.Glib.GObject		(destroyFunPtr) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.General.Enums#}	(SortType(..))+{#import Graphics.UI.Gtk.General.Enums#}        (SortType(..)) {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.ModelView.Types#}-import Graphics.UI.Gtk.General.Structs	(SortColumnId,+import Graphics.UI.Gtk.General.Structs  (SortColumnId,                                          treeSortableDefaultSortColumnId )  {# context lib="gtk" prefix="gtk" #}@@ -112,7 +109,7 @@ --   the returned Boolean flag is @False@. -- treeSortableGetSortColumnId :: TreeSortableClass self => self- -> IO (SortType, Bool, SortColumnId)   -- ^ @(type, columnSet, sortColumnId)@ + -> IO (SortType, Bool, SortColumnId)   -- ^ @(type, columnSet, sortColumnId)@                      -- returns @True@ in @columnSet@ if @sortColumnId@ is not                      -- 'treeSortableDefaultSortColumnId'. The @type@ value indicates increasing                      -- or decreasing ordering.@@ -183,7 +180,7 @@ -- 'treeSortableDefaultSortColumnId' then the model will sort using -- this function. ----- | If @sortFunc@ is 'Nothing', then there will be no default comparison function. +-- | If @sortFunc@ is 'Nothing', then there will be no default comparison function. -- This means that once the -- model has been sorted, it can't go back to the default state. In this case, when the current sort -- column id of sortable is 'TreeSortableDefaultSortColumnId', the model will be unsorted.
Graphics/UI/Gtk/ModelView/TreeStore.hs view
@@ -4,7 +4,7 @@ -- --  Author : Duncan Coutts, Axel Simon -----  Created: 11 Feburary 2006+--  Created: 11 February 2006 -- --  Copyright (C) 2005 Duncan Coutts, Axel Simon --@@ -57,14 +57,14 @@   ) where  import Data.Bits-import Data.Word (Word)+import Data.Word (Word32) import Data.Maybe ( fromMaybe, isJust ) import Data.Tree-import Control.Monad ( liftM, when )+import Control.Monad ( when ) import Control.Exception (assert) import Data.IORef import Graphics.UI.Gtk.ModelView.Types-import Graphics.UI.Gtk.Types (GObjectClass(..), TreeModelClass)+import Graphics.UI.Gtk.Types (GObjectClass(..)) import Graphics.UI.Gtk.ModelView.CustomStore import Graphics.UI.Gtk.ModelView.TreeModel import Graphics.UI.Gtk.ModelView.TreeDrag@@ -102,6 +102,20 @@ -- * The given rose tree determines the initial content and may be the empty --   list. Each 'Tree' in the forest corresponds to one top-level node. --+-- * The TreeStore maintains the initially given Forest and aligns the 'TreePath'+--   bits to fit in 96-bit length 'TreeIter' storage.+--+-- * Additionally, a cache is used to achieve higher performance if operating on+--   recently used TreePaths.+--+-- * __Note:__ due to the limited amount of bits available in TreeIter storage, only+--   limited depth forests can be used with this implementation, the result of too deep+--   Forests is an undefined behaviour while trying to retrieve the deeply nested nodes.+--   For example: assuming the average requiement is 8 bits per tree level (max number of+--   children at the level is 255), then we can only use 12 levels deep trees (96/8) -+--   any further levels in a TreePath will not be encoded in the corresponding TreeIter+--   storage.+-- treeStoreNew :: Forest a -> IO (TreeStore a) treeStoreNew forest = treeStoreNewDND forest                         (Just treeStoreDefaultDragSourceIface)@@ -112,7 +126,7 @@ -- * In addition to 'treeStoreNew', this function takes an two interfaces --   to implement user-defined drag-and-drop functionality. ---treeStoreNewDND :: Forest a -- ^ the inital tree stored in this model+treeStoreNewDND :: Forest a -- ^ the initial tree stored in this model   -> Maybe (DragSourceIface TreeStore a) -- ^ an optional interface for drags   -> Maybe (DragDestIface TreeStore a) -- ^ an optional interface to handle drops   -> IO (TreeStore a)@@ -217,24 +231,22 @@ -- low level bit-twiddling utility functions -- --- TODO: figure out how these things work when Word is 64 bits--bitsNeeded :: Word -> Int+bitsNeeded :: Word32 -> Int bitsNeeded n = bitsNeeded' 0 n   where bitsNeeded' b 0 = b         bitsNeeded' b n = bitsNeeded' (b+1) (n `shiftR` 1) -getBitSlice :: TreeIter -> Int -> Int -> Word+getBitSlice :: TreeIter -> Int -> Int -> Word32 getBitSlice (TreeIter _ a b c) off count =       getBitSliceWord a  off     count   .|. getBitSliceWord b (off-32) count   .|. getBitSliceWord c (off-64) count -  where getBitSliceWord :: Word -> Int -> Int -> Word+  where getBitSliceWord :: Word32 -> Int -> Int -> Word32         getBitSliceWord word off count =-          word `shiftR` off .&. (1 `shiftL` count - 1)+          word `shift` (-off) .&. (1 `shiftL` count - 1) -setBitSlice :: TreeIter -> Int -> Int -> Word -> TreeIter+setBitSlice :: TreeIter -> Int -> Int -> Word32 -> TreeIter setBitSlice (TreeIter stamp a b c) off count value =   assert (value < 1 `shiftL` count) $   TreeIter stamp@@ -242,30 +254,30 @@            (setBitSliceWord b (off-32) count value)            (setBitSliceWord c (off-64) count value) -  where setBitSliceWord :: Word -> Int -> Int -> Word -> Word+  where setBitSliceWord :: Word32 -> Int -> Int -> Word32 -> Word32         setBitSliceWord word off count value =-          let mask = (1 `shiftL` count - 1) `shiftL` off-           in (word .&. complement mask) .|. (value `shiftL` off)+          let mask = (1 `shiftL` count - 1) `shift` off+           in (word .&. complement mask) .|. (value `shift` off)  -iterPrefixEqual :: TreeIter -> TreeIter -> Int -> Bool-iterPrefixEqual (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) pos-  | pos>64 = let mask = 1 `shiftL` (pos-64) - 1 in-             a1==a2 && b1==b2 && (c1 .&. mask) == (c2 .&. mask)-  | pos>32 = let mask = 1 `shiftL` (pos-32) - 1 in-             a1==a2 && (b1 .&. mask) == (b2 .&. mask)-  | otherwise = let mask = 1 `shiftL` pos - 1 in-                (a1 .&. mask) == (a2 .&. mask)+--iterPrefixEqual :: TreeIter -> TreeIter -> Int -> Bool+--iterPrefixEqual (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) pos+--  | pos>64 = let mask = 1 `shiftL` (pos-64) - 1 in+--             a1==a2 && b1==b2 && (c1 .&. mask) == (c2 .&. mask)+--  | pos>32 = let mask = 1 `shiftL` (pos-32) - 1 in+--             a1==a2 && (b1 .&. mask) == (b2 .&. mask)+--  | otherwise = let mask = 1 `shiftL` pos - 1 in+--                (a1 .&. mask) == (a2 .&. mask)  -- | The invalid tree iterator. -- invalidIter :: TreeIter invalidIter = TreeIter 0 0 0 0 -showIterBits (TreeIter _ a b c) = [showBits a, showBits b, showBits c]--showBits :: Bits a => a -> String-showBits a = [ if testBit a i then '1' else '0' | i <- [0..bitSize a - 1] ]+--showIterBits (TreeIter _ a b c) = [showBits a, showBits b, showBits c]+--+--showBits :: Bits a => a -> String+--showBits a = [ if testBit a i then '1' else '0' | i <- [0..bitSize a - 1] ]  -- | Calculate the maximum number of nodes on a per-level basis. --@@ -294,7 +306,7 @@   where   fP pos ti _ [] = Just ti -- the remaining bits are zero anyway   fP pos ti [] _ = Nothing-  fP pos ti (d:ds) (p:ps) = let idx = fromIntegral (p+1) :: Word in+  fP pos ti (d:ds) (p:ps) = let idx = fromIntegral (p+1) in     if idx >= bit d then Nothing else     fP (pos+d) (setBitSlice ti pos d idx) ds ps @@ -388,7 +400,6 @@   where   cmp (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) =       a1==a2 && b1==b2 && c2==c2-  cache'@((cur,sibs):_) = advanceCache depth iter cache  -- | Get the leaf index of this iterator. --@@ -410,7 +421,7 @@ -- iterNext :: Depth -> TreeIter -> Cache a -> (Maybe TreeIter, Cache a) iterNext depth iter cache = let-    (pos,leaf,child) = getTreeIterLeaf depth iter+    (pos,leaf,_child) = getTreeIterLeaf depth iter     curIdx = getBitSlice iter pos leaf     nextIdx = curIdx+1     nextIter = setBitSlice iter pos leaf nextIdx@@ -426,7 +437,7 @@                 (Maybe TreeIter, Cache a) iterNthChild depth childIdx_ iter cache = let     (pos,leaf,child) = getTreeIterLeaf depth iter-    childIdx = fromIntegral childIdx_+1 :: Word+    childIdx = fromIntegral childIdx_+1     nextIter = setBitSlice iter (pos+leaf) child childIdx   in   if childIdx>=bit child then (Nothing, cache) else@@ -446,7 +457,7 @@ -- iterParent :: Depth -> TreeIter -> Maybe TreeIter iterParent depth iter = let-    (pos,leaf,child) = getTreeIterLeaf depth iter+    (pos,leaf,_child) = getTreeIterLeaf depth iter   in if pos==0 then Nothing else      if getBitSlice iter pos leaf==0 then Nothing else      Just (setBitSlice iter pos leaf 0)@@ -680,7 +691,7 @@     _ -> fail ("treeStoreGetTree: path does not exist " ++ show path)  -- | Extract a subtree from the current model. Like 'treeStoreGetTree'---   but returns @Nothing@ if the path refers to a non-existant node.+--   but returns @Nothing@ if the path refers to a non-existent node. -- treeStoreLookup :: TreeStore a -> TreePath -> IO (Maybe (Tree a)) treeStoreLookup (TreeStore model) path = do
Graphics/UI/Gtk/ModelView/TreeView.chs view
@@ -56,14 +56,14 @@ -- module Graphics.UI.Gtk.ModelView.TreeView ( -- * Description--- +-- -- | Widget that displays any object that implements the 'TreeModel' -- interface. ----- The widget supports scrolling natively. This implies that pixel +-- The widget supports scrolling natively. This implies that pixel -- coordinates can be given in two formats: relative to the current view's -- upper left corner or relative to the whole list's coordinates. The former--- are called widget coordinates while the letter are called tree +-- are called widget coordinates while the letter are called tree -- coordinates.  -- * Class Hierarchy@@ -234,7 +234,7 @@   rowActivated,   testCollapseRow,   testExpandRow,-  + -- * Deprecated #ifndef DISABLE_DEPRECATED #if GTK_MAJOR_VERSION < 3@@ -260,25 +260,22 @@ #endif   ) where -import Control.Monad	(liftM, mapM)-import Data.Maybe	(fromMaybe)+import Control.Monad    (liftM,)+import Data.Maybe       (fromMaybe)  import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GList		(fromGList)+import System.Glib.GList                (fromGList) import System.Glib.Flags import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(makeNewGObject, wrapNewGObject,-					 destroyFunPtr) import Graphics.UI.Gtk.Gdk.Enums        (DragAction(..)) import Graphics.UI.Gtk.Gdk.Events       (Modifier(..))-import Graphics.UI.Gtk.General.Structs	(Point, Rectangle)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.General.Structs  (Point, Rectangle)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-{#import Graphics.UI.Gtk.ModelView.TreeViewColumn#}-import Graphics.UI.Gtk.ModelView.TreeModel (ColumnId, columnIdToNumber,+import Graphics.UI.Gtk.ModelView.TreeModel (columnIdToNumber,                                             makeColumnIdString) {#import Graphics.UI.Gtk.ModelView.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#}     (TargetList(..))@@ -296,7 +293,7 @@   liftM (castPtr :: Ptr Widget -> Ptr TreeView) $   {# call tree_view_new #} --- | Create a new 'TreeView' +-- | Create a new 'TreeView' -- widget with @model@ as the storage model. -- treeViewNewWithModel :: TreeModelClass model => model -> IO TreeView@@ -321,12 +318,12 @@ -- | Set the 'TreeModel' for the current View. -- treeViewSetModel :: (TreeViewClass self, TreeModelClass model) => self- -> model+ -> Maybe model  -> IO () treeViewSetModel self model =   {# call tree_view_set_model #}     (toTreeView self)-    (toTreeModel model)+    (maybe (TreeModel nullForeignPtr) toTreeModel model)  -- | Retrieve a 'TreeSelection' that -- holds the current selected nodes of the View.@@ -396,7 +393,7 @@   {# call tree_view_columns_autosize #}     (toTreeView self) --- | Set wether the columns headers are sensitive to mouse clicks.+-- | Set whether the columns headers are sensitive to mouse clicks. -- treeViewSetHeadersClickable :: TreeViewClass self => self -> Bool -> IO () treeViewSetHeadersClickable self setting =@@ -471,9 +468,9 @@ -- treeViewGetColumn :: TreeViewClass self => self -> Int -> IO (Maybe TreeViewColumn) treeViewGetColumn self pos = do-  tvcPtr <- {# call unsafe tree_view_get_column #} (toTreeView self) +  tvcPtr <- {# call unsafe tree_view_get_column #} (toTreeView self)     (fromIntegral pos)-  if tvcPtr==nullPtr then return Nothing else +  if tvcPtr==nullPtr then return Nothing else     liftM Just $ makeNewObject mkTreeViewColumn (return tvcPtr)  -- | Return all 'TreeViewColumn's in this 'TreeView'.@@ -609,32 +606,43 @@  -- | Scroll to a cell. ----- * Scroll to a cell as specified by @path@ and @tvc@. ---   The cell is aligned within the 'TreeView' widget as---   follows: horizontally by @hor@ from left (@0.0@) to---   right (@1.0@) and vertically by @ver@ from top---   (@0.0@) to buttom (@1.0@).+-- Moves the alignments of tree_view to the position specified by mbColumn and mbPath.+-- If mbColumn is Nothing, then no horizontal scrolling occurs. Likewise, if mbPath+-- is Nothing no vertical scrolling occurs. At a minimum, one of mbColumn or mbPath+-- need to be provided. @rowAlign@ determines where the row is placed, and+-- @colAlign@ determines where column is placed. Both are expected to be between+-- 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment,+-- 0.5 means center. --+-- If Nothing is passed instead of @rowAlign@ and @colAlign@, then the tree does+-- the minimum amount of work to scroll the cell onto the screen. This means+-- that the cell will be scrolled to the edge closest to its current position.+-- If the cell is currently visible on the screen, nothing is done.+--+-- This function only works if the model is set, and path is a valid row on+-- the model. If the model changes before the tree_view is realized, the+-- centered path will be modified to reflect this change.+-- treeViewScrollToCell :: TreeViewClass self => self- -> TreePath- -> TreeViewColumn+ -> Maybe TreePath+ -> Maybe TreeViewColumn  -> Maybe (Float, Float)  -> IO ()-treeViewScrollToCell self path column (Just (ver,hor)) =-  withTreePath path $ \path ->+treeViewScrollToCell self mbPath mbColumn (Just (rowAlign, colAlign)) =+  maybeWithTreePath mbPath $ \path ->   {# call tree_view_scroll_to_cell #}     (toTreeView self)     path-    column-    1 -    (realToFrac ver)-    (realToFrac hor)-treeViewScrollToCell self path column Nothing = -  withTreePath path $ \path ->+    (maybe (TreeViewColumn nullForeignPtr) toTreeViewColumn mbColumn)+    1+    (realToFrac rowAlign)+    (realToFrac colAlign)+treeViewScrollToCell self mbPath mbColumn Nothing =+  maybeWithTreePath mbPath $ \path ->   {# call tree_view_scroll_to_cell #}     (toTreeView self)     path-    column+    (maybe (TreeViewColumn nullForeignPtr) toTreeViewColumn mbColumn)     0     0.0     0.0@@ -645,7 +653,7 @@ --   selects it.  This is useful when you want to focus the user\'s --   attention on a particular row.  If @focusColumn@ is given, --   then the input focus is given to the column specified by---   it. Additionally, if @focusColumn@ is specified, and +--   it. Additionally, if @focusColumn@ is specified, and --   @startEditing@ is @True@, --   then editing will be started in the --   specified cell.  This function is often followed by a@@ -675,7 +683,7 @@ -- | Selects a cell in a specific row. -- -- * Similar to 'treeViewSetCursor' but allows a column to---   containt several 'CellRenderer's.+--   contain several 'CellRenderer's. -- -- * Only available in Gtk 2.2 and higher. --@@ -785,7 +793,7 @@     (toTreeView self)     path --- | Call function for every expaned row.+-- | Call function for every expanded row. -- treeViewMapExpandedRows :: TreeViewClass self => self  -> (TreePath -> IO ())@@ -908,7 +916,7 @@     tvc     (castPtr (rPtr :: Ptr Rectangle))     >> peek rPtr-treeViewGetCellArea self (Just tp) tvc = +treeViewGetCellArea self (Just tp) tvc =   withTreePath tp $ \tp ->   alloca $ \rPtr -> do   {# call unsafe tree_view_get_cell_area #}@@ -926,7 +934,7 @@ --   If @path@ is @Nothing@ or points to a path not --   currently displayed, the @y@ and @height@ fields of --   the 'Rectangle' will be filled with @0@. The background---   areas tile the widget's area to cover the entire tree window +--   areas tile the widget's area to cover the entire tree window --   (except for the area used for header buttons). Contrast this with --   'treeViewGetCellArea'. --@@ -942,7 +950,7 @@     tvc     (castPtr (rPtr :: Ptr Rectangle))   >> peek rPtr-treeViewGetBackgroundArea self (Just tp) tvc = +treeViewGetBackgroundArea self (Just tp) tvc =   withTreePath tp $ \tp -> alloca $ \rPtr ->   {# call unsafe tree_view_get_background_area #}     (toTreeView self)@@ -967,10 +975,10 @@ #ifndef DISABLE_DEPRECATED #if GTK_MAJOR_VERSION < 3 -- | 'treeViewTreeToWidgetCoords' has been deprecated since version 2.12 and should not be used in--- newly-written code. Due to historial reasons the name of this function is incorrect. For converting+-- newly-written code. Due to historical reasons the name of this function is incorrect. For converting -- bin window coordinates to coordinates relative to bin window, please see -- 'treeViewConvertBinWindowToWidgetCoords'.--- +-- -- Converts tree coordinates (coordinates in full scrollable area of the tree) to bin window -- coordinates. --@@ -992,10 +1000,10 @@   return (fromIntegral wx, fromIntegral wy)  -- | 'treeViewWidgetToTreeCoords' has been deprecated since version 2.12 and should not be used in--- newly-written code. Due to historial reasons the name of this function is incorrect. For converting+-- newly-written code. Due to historical reasons the name of this function is incorrect. For converting -- coordinates relative to the widget to bin window coordinates, please see -- 'treeViewConvertWidgetToBinWindowCoords'.--- +-- -- Converts bin window coordinates to coordinates for the tree (the full scrollable area of the tree). -- -- Removed in Gtk3.@@ -1021,7 +1029,7 @@ -- | Converts bin window coordinates to coordinates for the tree (the full scrollable area of the tree). treeViewConvertBinWindowToTreeCoords :: TreeViewClass self => self  -> Point -- ^ @(bx, by)@ - bin window X and Y coordinates- -> IO Point -- ^ @(tx, ty)@ returns tree X and Y coordinates + -> IO Point -- ^ @(tx, ty)@ returns tree X and Y coordinates treeViewConvertBinWindowToTreeCoords self (bx, by) =   alloca $ \txPtr ->   alloca $ \tyPtr -> do@@ -1038,7 +1046,7 @@ -- | Converts bin window coordinates (see 'treeViewGetBinWindow' to widget relative coordinates. treeViewConvertBinWindowToWidgetCoords :: TreeViewClass self => self  -> Point -- ^ @(bx, by)@ - bin window X and Y coordinates- -> IO Point -- ^ @(wx, wy)@ returns widget X and Y coordinates + -> IO Point -- ^ @(wx, wy)@ returns widget X and Y coordinates treeViewConvertBinWindowToWidgetCoords self (bx, by) =   alloca $ \wxPtr ->   alloca $ \wyPtr -> do@@ -1056,7 +1064,7 @@ -- coordinates. treeViewConvertTreeToBinWindowCoords :: TreeViewClass self => self  -> Point -- ^ @(tx, ty)@ - tree X and Y coordinates- -> IO Point -- ^ @(bx, by)@ returns bin window X and Y coordinates + -> IO Point -- ^ @(bx, by)@ returns bin window X and Y coordinates treeViewConvertTreeToBinWindowCoords self (tx, ty) =   alloca $ \bxPtr ->   alloca $ \byPtr -> do@@ -1073,7 +1081,7 @@ -- | Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates. treeViewConvertTreeToWidgetCoords :: TreeViewClass self => self  -> Point -- ^ @(tx, ty)@ - tree X and Y coordinates- -> IO Point -- ^ @(wx, wy)@ returns widget X and Y coordinates + -> IO Point -- ^ @(wx, wy)@ returns widget X and Y coordinates treeViewConvertTreeToWidgetCoords self (wx, wy) =   alloca $ \bxPtr ->   alloca $ \byPtr -> do@@ -1090,7 +1098,7 @@ -- | Converts widget coordinates to coordinates for the window (see 'treeViewGetBinWindow' ). treeViewConvertWidgetToBinWindowCoords :: TreeViewClass self => self  -> Point -- ^ @(wx, wy)@ - widget X and Y coordinates- -> IO Point -- ^ @(bx, by)@ returns bin window X and Y coordinates + -> IO Point -- ^ @(bx, by)@ returns bin window X and Y coordinates treeViewConvertWidgetToBinWindowCoords self (wx, wy) =   alloca $ \bxPtr ->   alloca $ \byPtr -> do@@ -1107,7 +1115,7 @@ -- | Converts widget coordinates to coordinates for the tree (the full scrollable area of the tree). treeViewConvertWidgetToTreeCoords :: TreeViewClass self => self  -> Point -- ^ @(wx, wy)@ - bin window X and Y coordinates- -> IO Point -- ^ @(tx, ty)@ returns tree X and Y coordinates + -> IO Point -- ^ @(tx, ty)@ returns tree X and Y coordinates treeViewConvertWidgetToTreeCoords self (wx, wy) =   alloca $ \txPtr ->   alloca $ \tyPtr -> do@@ -1168,8 +1176,8 @@ -- %hash c:ecc5 d:bed6 -- | Gets the column searched on by the interactive search code. ---treeViewGetSearchColumn :: TreeViewClass self => self- -> IO (ColumnId row String) -- ^ returns the column the interactive search code searches in.+treeViewGetSearchColumn :: (TreeViewClass self, GlibString string) => self+ -> IO (ColumnId row string) -- ^ returns the column the interactive search code searches in. treeViewGetSearchColumn self =   liftM (makeColumnIdString . fromIntegral) $   {# call unsafe tree_view_get_search_column #}@@ -1187,8 +1195,8 @@ -- search column is not used if a comparison function is set, see -- 'treeViewSetSearchEqualFunc'. ---treeViewSetSearchColumn :: TreeViewClass self => self- -> (ColumnId row String) -- ^ @column@ - the column of the model to search in, or -1 to disable+treeViewSetSearchColumn :: (TreeViewClass self, GlibString string) => self+ -> (ColumnId row string) -- ^ @column@ - the column of the model to search in, or -1 to disable         -- searching  -> IO () treeViewSetSearchColumn self column =@@ -1204,15 +1212,15 @@ --   the 'treeViewSearchColumn' (which isn't used anyway when a comparison --   function is installed). ---treeViewSetSearchEqualFunc :: TreeViewClass self => self- -> Maybe (String -> TreeIter -> IO Bool)+treeViewSetSearchEqualFunc :: (TreeViewClass self, GlibString string) => self+ -> Maybe (string -> TreeIter -> IO Bool)  -> IO () treeViewSetSearchEqualFunc self (Just pred) = do   fPtr <- mkTreeViewSearchEqualFunc (\_ _ keyPtr iterPtr _ -> do     key <- peekUTFString keyPtr     iter <- peek iterPtr     liftM (fromBool . not) $ pred key iter)-  {# call tree_view_set_search_equal_func #} (toTreeView self) fPtr +  {# call tree_view_set_search_equal_func #} (toTreeView self) fPtr     (castFunPtrToPtr fPtr) destroyFunPtr   {# call tree_view_set_search_column #} (toTreeView self) 0 treeViewSetSearchEqualFunc self Nothing = do@@ -1294,7 +1302,7 @@     (toTreeView self)  -- | Enables of disables the hover expansion mode of the tree view. Hover--- expansion makes rows expand or collaps if the pointer moves over them.+-- expansion makes rows expand or collapse if the pointer moves over them. -- -- * Available since Gtk+ version 2.6 --@@ -1342,7 +1350,7 @@     startPath <- fromTreePath startTPPtr     endPath <- fromTreePath endTPPtr     return (startPath, endPath)-    + #endif  #if GTK_CHECK_VERSION(2,10,0)@@ -1471,7 +1479,7 @@ foreign import ccall "wrapper" mkTreeViewRowSeparatorFunc ::   (Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO {#type gboolean#}) ->   IO TreeViewRowSeparatorFunc-  + #if GTK_CHECK_VERSION(2,10,0) -- %hash c:778a d:eacd -- | Returns whether rubber banding is turned on for @treeView@. If the@@ -1608,11 +1616,11 @@   -> Maybe Point -- ^ @point@ - the coordinates of the mouse or @Nothing@                  --   if a keyboard tooltip is to be generated   -> IO (Maybe TreeIter) -- ^ @Just iter@ if a tooltip should be shown for that row-treeViewGetTooltipContext self (Just (x,y)) = +treeViewGetTooltipContext self (Just (x,y)) =   alloca $ \xPtr -> alloca $ \yPtr -> receiveTreeIter $     {#call gtk_tree_view_get_tooltip_context#} (toTreeView self)     xPtr yPtr 0 nullPtr nullPtr-treeViewGetTooltipContext self Nothing = +treeViewGetTooltipContext self Nothing =   receiveTreeIter $     {#call gtk_tree_view_get_tooltip_context#} (toTreeView self)     nullPtr nullPtr 1 nullPtr nullPtr@@ -1623,7 +1631,7 @@  -- | The model for the tree view. ---treeViewModel :: (TreeViewClass self, TreeModelClass model) => ReadWriteAttr self (Maybe TreeModel) model+treeViewModel :: TreeViewClass self => Attr self (Maybe TreeModel) treeViewModel = newAttr   treeViewGetModel   treeViewSetModel@@ -1697,7 +1705,7 @@ -- -- Default value: 'invalidColumnId' ---treeViewSearchColumn :: TreeViewClass self => Attr self (ColumnId row String)+treeViewSearchColumn :: (TreeViewClass self, GlibString string) => Attr self (ColumnId row string) treeViewSearchColumn = newAttr   treeViewGetSearchColumn   treeViewSetSearchColumn@@ -1734,7 +1742,7 @@  -- %hash c:c694 d:3f15 -- | Enables of disables the hover expansion mode of @treeView@. Hover--- expansion makes rows expand or collaps if the pointer moves over them.+-- expansion makes rows expand or collapse if the pointer moves over them. -- -- This mode is primarily intended for 'TreeView's in popups, e.g. in -- 'ComboBox' or 'EntryCompletion'.@@ -1829,7 +1837,7 @@ -- -- Default value: 'invalidColumnId' ---treeViewTooltipColumn :: TreeViewClass self => Attr self (ColumnId row String)+treeViewTooltipColumn :: (TreeViewClass self, GlibString string) => Attr self (ColumnId row string) treeViewTooltipColumn = newAttr   (\self -> liftM (makeColumnIdString . fromIntegral) $   {# call unsafe tree_view_get_tooltip_column #}@@ -1918,10 +1926,10 @@ onRowActivated, afterRowActivated :: TreeViewClass self => self  -> (TreePath -> TreeViewColumn -> IO ())  -> IO (ConnectId self)-onRowActivated = connect_BOXED_OBJECT__NONE "row_activated" -		   readNTP False-afterRowActivated = connect_BOXED_OBJECT__NONE "row_activated" -		      readNTP True+onRowActivated = connect_BOXED_OBJECT__NONE "row_activated"+                   readNTP False+afterRowActivated = connect_BOXED_OBJECT__NONE "row_activated"+                      readNTP True  -- | Children of this node were hidden. --@@ -1948,7 +1956,7 @@ -- * Connect to this signal if you want to provide you own search facility. --   Note that you must handle all keyboard input yourself. ---onStartInteractiveSearch, afterStartInteractiveSearch :: +onStartInteractiveSearch, afterStartInteractiveSearch ::   TreeViewClass self => self -> IO () -> IO (ConnectId self)  #if GTK_CHECK_VERSION(2,2,0)@@ -1962,7 +1970,7 @@  onStartInteractiveSearch =   connect_NONE__NONE "start_interactive_search" False-afterStartInteractiveSearch = +afterStartInteractiveSearch =   connect_NONE__NONE "start_interactive_search" True  #endif@@ -1970,7 +1978,7 @@ -- | Determine if this row should be collapsed. -- -- * If the application connects to this function and returns @False@,---   the specifc row will not be altered.+--   the specific row will not be altered. -- onTestCollapseRow, afterTestCollapseRow :: TreeViewClass self => self  -> (TreeIter -> TreePath -> IO Bool)@@ -1983,7 +1991,7 @@ -- | Determine if this row should be expanded. -- -- * If the application connects to this function and returns @False@,---   the specifc row will not be altered.+--   the specific row will not be altered. -- onTestExpandRow, afterTestExpandRow :: TreeViewClass self => self  -> (TreeIter -> TreePath -> IO Bool)
Graphics/UI/Gtk/ModelView/TreeViewColumn.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.TreeViewColumn ( -- * Detail--- +-- -- | The 'TreeViewColumn' object represents a visible column in a 'TreeView' -- widget. It allows to set properties of the column header, and functions as a -- holding pen for the cell renderers which determine how the data in the@@ -128,20 +128,22 @@   afterColClicked   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString-{#import System.Glib.GList#}			(fromGList)+#if GTK_MAJOR_VERSION < 3+{#import System.Glib.GList#}                    (fromGList)+#endif import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object          (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Enums		(TreeViewColumnSizing(..),-						 SortType(..))+import Graphics.UI.Gtk.General.Enums            (TreeViewColumnSizing(..),+                                                 SortType(..)) import Graphics.UI.Gtk.General.Structs          (SortColumnId)-{#import Graphics.UI.Gtk.ModelView.TreeModel#}	()+{#import Graphics.UI.Gtk.ModelView.TreeModel#}  ()  {# context lib="gtk" prefix="gtk" #} @@ -151,7 +153,7 @@ -- | Generate a new TreeViewColumn widget. -- treeViewColumnNew :: IO TreeViewColumn-treeViewColumnNew  = makeNewObject mkTreeViewColumn +treeViewColumnNew  = makeNewObject mkTreeViewColumn   {# call tree_view_column_new #}  @@ -256,7 +258,7 @@   {# call unsafe tree_view_column_get_resizable #}     self --- | Set wether the column can be resized.+-- | Set whether the column can be resized. -- treeViewColumnSetSizing :: TreeViewColumn  -> TreeViewColumnSizing@@ -347,7 +349,7 @@  -- | Set the widget's title if a custom widget has not been set. ---treeViewColumnSetTitle :: TreeViewColumn -> String -> IO ()+treeViewColumnSetTitle :: GlibString string => TreeViewColumn -> string -> IO () treeViewColumnSetTitle self title =   withUTFString title $ \titlePtr ->   {# call tree_view_column_set_title #}@@ -356,7 +358,7 @@  -- | Get the widget's title. ---treeViewColumnGetTitle :: TreeViewColumn -> IO (Maybe String)+treeViewColumnGetTitle :: GlibString string => TreeViewColumn -> IO (Maybe string) treeViewColumnGetTitle self =   {# call unsafe tree_view_column_get_title #}     self@@ -392,7 +394,7 @@ -- showing the column title. In case only a text title was set this will be a -- 'Alignment' widget with a 'Label' inside. ---treeViewColumnGetWidget :: TreeViewColumn +treeViewColumnGetWidget :: TreeViewColumn  -> IO (Maybe Widget) -- ^ returns the 'Widget' in the column header, or 'Nothing' treeViewColumnGetWidget self = do   widgetPtr <- {# call unsafe tree_view_column_get_widget #} self@@ -442,7 +444,7 @@ -- -- * Sets the logical @columnId@ that this column sorts on when --   this column is selected for sorting. The selected column's header---   will be clickable after this call. Logical refers to the +--   will be clickable after this call. Logical refers to the --   'Graphics.UI.Gtk.ModelView.TreeSortable.SortColumnId' for which --   a comparison function was set. --@@ -666,7 +668,7 @@ -- -- Default value: \"\" ---treeViewColumnTitle :: ReadWriteAttr TreeViewColumn (Maybe String) String+treeViewColumnTitle :: GlibString string => ReadWriteAttr TreeViewColumn (Maybe string) string treeViewColumnTitle = newAttr   treeViewColumnGetTitle   treeViewColumnSetTitle
Graphics/UI/Gtk/ModelView/Types.chs view
@@ -1,5 +1,9 @@+{-# LANGUAGE GADTs #-} {-# LANGUAGE MagicHash #-}+{-# LANGUAGE Rank2Types #-}+{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK hide #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) CustomStore TreeModel --@@ -33,41 +37,43 @@   TypedTreeModelClass,   toTypedTreeModel,   unsafeTreeModelToGeneric,-  +   TypedTreeModelSort(..),   unsafeTreeModelSortToGeneric,   TypedTreeModelFilter(..),   unsafeTreeModelFilterToGeneric,-  +   -- TreeIter   TreeIter(..),   receiveTreeIter,   peekTreeIter,   treeIterSetStamp,-  +   -- TreePath   TreePath,   NativeTreePath(..),   newTreePath,   withTreePath,+  maybeWithTreePath,   peekTreePath,   fromTreePath,   stringToTreePath,-  +   -- Columns   ColumnAccess(..),   ColumnId(..),-  +   -- Storing the model in a ComboBox-  comboQuark,  +  comboQuark,   ) where  import GHC.Exts (unsafeCoerce#)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.GValue         (GValue) import System.Glib.GObject        (Quark, quarkFromString)-{#import Graphics.UI.Gtk.Types#}	(TreeModel, TreeModelSort, TreeModelFilter,+{#import Graphics.UI.Gtk.Types#}        (TreeModel, TreeModelSort, TreeModelFilter,                                    Pixbuf) import Data.Char ( isDigit ) import Control.Monad ( liftM )@@ -114,8 +120,8 @@ -- use of the three words is therefore implementation specific. See also -- 'TreePath'. ---data TreeIter = TreeIter {-# UNPACK #-} !CInt !Word !Word !Word-	      deriving Show+data TreeIter = TreeIter {-# UNPACK #-} !CInt !Word32 !Word32 !Word32+              deriving Show  {#pointer *TreeIter as TreeIterPtr -> TreeIter #} @@ -131,7 +137,7 @@                            (ptrToWord user_data2)                            (ptrToWord user_data3)) -    where ptrToWord :: Ptr a -> Word+    where ptrToWord :: Ptr a -> Word32           ptrToWord ptr = fromIntegral (ptr `minusPtr` nullPtr)    poke ptr (TreeIter stamp user_data user_data2 user_data3) = do@@ -140,7 +146,7 @@     {# set TreeIter->user_data2 #} ptr (wordToPtr user_data2)     {# set TreeIter->user_data3 #} ptr (wordToPtr user_data3) -    where wordToPtr :: Word -> Ptr a+    where wordToPtr :: Word32 -> Ptr a           wordToPtr word = nullPtr `plusPtr` fromIntegral word  -- Pass a pointer to a structure large enough to hold a GtkTreeIter@@ -196,6 +202,9 @@   nativeTreePathFree nativePath   return res +maybeWithTreePath :: Maybe TreePath -> (NativeTreePath -> IO a) -> IO a+maybeWithTreePath mbTp act = maybe (act (NativeTreePath nullPtr)) (`withTreePath` act) mbTp+ nativeTreePathGetIndices :: NativeTreePath -> IO [Int] nativeTreePathGetIndices tp = do   depth <- liftM fromIntegral $ {# call unsafe tree_path_get_depth #} tp@@ -207,13 +216,13 @@ -- | Convert the given pointer to a tree path. peekTreePath :: Ptr NativeTreePath -> IO TreePath peekTreePath tpPtr | tpPtr==nullPtr = return []-		   | otherwise =+                   | otherwise =   nativeTreePathGetIndices (NativeTreePath tpPtr)  -- | Convert the given pointer to a tree path. Frees the pointer. fromTreePath :: Ptr NativeTreePath -> IO TreePath fromTreePath tpPtr | tpPtr==nullPtr = return []-		   | otherwise = do+                   | otherwise = do   path <- nativeTreePathGetIndices (NativeTreePath tpPtr)   nativeTreePathFree (NativeTreePath tpPtr)   return path@@ -221,10 +230,11 @@ -- | Convert a comma or colon separated string into a 'TreePath'. Any -- non-digit characters are assumed to separate indices, thus, the function -- always is always successful.-stringToTreePath :: String -> TreePath-stringToTreePath "" = []-stringToTreePath path = getNum 0 (dropWhile (not . isDigit) path)+stringToTreePath :: DefaultGlibString -> TreePath+stringToTreePath = stringToTreePath' . glibToString   where+  stringToTreePath' "" = []+  stringToTreePath' path = getNum 0 (dropWhile (not . isDigit) path)   getNum acc ('0':xs) = getNum (10*acc) xs   getNum acc ('1':xs) = getNum (10*acc+1) xs   getNum acc ('2':xs) = getNum (10*acc+2) xs@@ -235,23 +245,23 @@   getNum acc ('7':xs) = getNum (10*acc+7) xs   getNum acc ('8':xs) = getNum (10*acc+8) xs   getNum acc ('9':xs) = getNum (10*acc+9) xs-  getNum acc xs = acc:stringToTreePath (dropWhile (not . isDigit) xs)+  getNum acc xs = acc:stringToTreePath' (dropWhile (not . isDigit) xs)  -- | Accessing a row for a specific value. Used for 'ColumnMap'.-data ColumnAccess row-  = CAInvalid-  | CAInt (row -> Int)-  | CABool (row -> Bool)-  | CAString (row -> String)-  | CAPixbuf (row -> Pixbuf)+data ColumnAccess row where+  CAInvalid :: ColumnAccess row+  CAInt     :: (row -> Int) -> ColumnAccess row+  CABool    :: (row -> Bool) -> ColumnAccess row+  CAString  :: GlibString string => (row -> string) -> ColumnAccess row+  CAPixbuf  :: (row -> Pixbuf) -> ColumnAccess row  -- | The type of a tree column.-data ColumnId row ty +data ColumnId row ty   = ColumnId (GValue -> IO ty) ((row -> ty) -> ColumnAccess row) Int  -- it shouldn't matter if the following function is actually inlined-{-# NOINLINE comboQuark #-}  +{-# NOINLINE comboQuark #-} comboQuark :: Quark comboQuark =-  unsafePerformIO $ quarkFromString "comboBoxHaskellStringModelQuark"-  +  unsafePerformIO $ quarkFromString ("comboBoxHaskellStringModelQuark"::DefaultGlibString)+
Graphics/UI/Gtk/Multiline/TextBuffer.chs view
@@ -30,12 +30,12 @@ -- --     gtk_text_buffer_insert_with_tags equivalent to calling textBufferInsert, --     then textBufferApplyTag on the inserted text.--- +-- --     gtk_text_buffer_insert_with_tags_by_name same as gtk_text_buffer_insert_with_tags,---     just use textTagName handle tag name.     +--     just use textTagName handle tag name. -- --     gtk_text_buffer_create_tag Equivalent to calling textTagNew---     and then adding the tag to the buffer's tag table. +--     and then adding the tag to the buffer's tag table. -- -- The following functions do not make sense due to Haskell's wide character --   representation of Unicode:@@ -53,7 +53,7 @@ -- module Graphics.UI.Gtk.Multiline.TextBuffer ( -- * Detail--- +-- -- | You may wish to begin by reading the text widget conceptual overview -- which gives an overview of all the objects and data types related to the -- text widget and how they work together.@@ -195,21 +195,19 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject			(wrapNewGObject,-						 makeNewGObject) import Data.ByteString (ByteString) import Data.ByteString.Unsafe (unsafeUseAsCStringLen, unsafePackCStringFinalizer) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Multiline.Types#}-import Graphics.UI.Gtk.Multiline.TextMark	(TextMark, MarkName)-import Graphics.UI.Gtk.Multiline.TextTag	(TextTag, TagName)+import Graphics.UI.Gtk.Multiline.TextMark       (MarkName)+import Graphics.UI.Gtk.Multiline.TextTag        (TagName)  {# context lib="gtk" prefix="gtk" #} @@ -261,9 +259,9 @@ -- the signal. @iter@ is invalidated when insertion occurs (because the buffer -- contents change). ---textBufferInsert :: TextBufferClass self => self+textBufferInsert :: (TextBufferClass self, GlibString string) => self  -> TextIter -- ^ @iter@ - a position in the buffer- -> String   -- ^ @text@ - text to insert+ -> string   -- ^ @text@ - text to insert  -> IO () textBufferInsert self iter text =   withUTFStringLen text $ \(textPtr, len) ->@@ -293,7 +291,7 @@ -- | Simply calls 'textBufferInsert', using the current cursor position as the -- insertion point. ---textBufferInsertAtCursor :: TextBufferClass self => self -> String -> IO ()+textBufferInsertAtCursor :: (TextBufferClass self, GlibString string) => self -> string -> IO () textBufferInsertAtCursor self text =   withUTFStringLen text $ \(textPtr, len) ->   {# call text_buffer_insert_at_cursor #}@@ -323,9 +321,9 @@ -- decide if the text should be inserted. This value could be set to the result -- of 'Graphics.UI.Gtk.Multiline.TextView.textViewGetEditable'. ---textBufferInsertInteractive :: TextBufferClass self => self+textBufferInsertInteractive :: (TextBufferClass self, GlibString string) => self  -> TextIter -- ^ @iter@ - a position in @buffer@- -> String   -- ^ @text@ - the text to insert+ -> string   -- ^ @text@ - the text to insert  -> Bool     -- ^ @defaultEditable@ - default editability of buffer  -> IO Bool  -- ^ returns whether text was actually inserted textBufferInsertInteractive self iter text defaultEditable =@@ -359,8 +357,8 @@  -- | Calls 'textBufferInsertInteractive' at the cursor position. ---textBufferInsertInteractiveAtCursor :: TextBufferClass self => self- -> String  -- ^ @text@ - the text to insert+textBufferInsertInteractiveAtCursor :: (TextBufferClass self, GlibString string) => self+ -> string  -- ^ @text@ - the text to insert  -> Bool    -- ^ @defaultEditable@ - default editability of buffer  -> IO Bool -- ^ returns whether text was actually inserted textBufferInsertInteractiveAtCursor self text defaultEditable =@@ -470,8 +468,8 @@  -- | Deletes current contents of @buffer@, and inserts @text@ instead. ---textBufferSetText :: TextBufferClass self => self- -> String -- ^ @text@ - text to insert+textBufferSetText :: (TextBufferClass self, GlibString string) => self+ -> string -- ^ @text@ - text to insert  -> IO () textBufferSetText self text =   withUTFStringLen text $ \(textPtr, len) ->@@ -487,11 +485,11 @@ -- /not/ correspond to character indexes into the buffer. Contrast -- with 'textBufferGetSlice'. ---textBufferGetText :: TextBufferClass self => self+textBufferGetText :: (TextBufferClass self, GlibString string) => self  -> TextIter  -- ^ @start@ - start of a range  -> TextIter  -- ^ @end@ - end of a range  -> Bool      -- ^ @includeHiddenChars@ - whether to include invisible text- -> IO String+ -> IO string textBufferGetText self start end includeHiddenChars =   {# call unsafe text_buffer_get_text #}     (toTextBuffer self)@@ -509,11 +507,11 @@ -- that @(chr 0xFFFC)@ can occur in normal text as well, so it is not a reliable -- indicator that a pixbuf or widget is in the buffer. ---textBufferGetSlice :: TextBufferClass self => self+textBufferGetSlice :: (TextBufferClass self, GlibString string) => self  -> TextIter  -- ^ @start@ - start of a range  -> TextIter  -- ^ @end@ - end of a range  -> Bool      -- ^ @includeHiddenChars@ - whether to include invisible text- -> IO String+ -> IO string textBufferGetSlice self start end includeHiddenChars =   {# call unsafe text_buffer_get_slice #}     (toTextBuffer self)@@ -622,7 +620,7 @@     (fromBool leftGravity)  #if GTK_CHECK_VERSION(2,12,0)--- | Adds the mark at position given by the 'TextIter'. +-- | Adds the mark at position given by the 'TextIter'. -- The mark may not be added to any other buffer. -- -- Emits the 'markSet' signal as notification of the mark's initial placement.@@ -857,7 +855,7 @@     iter     (fromIntegral charOffset)   return iter-  + -- | Create an iterator at a specific line. -- textBufferGetIterAtLine :: TextBufferClass self => self@@ -1123,8 +1121,8 @@ -- we'll ask for the paste data and return, and at some point later -- after the main loop runs, the paste data will be inserted.) textBufferPasteClipboard :: TextBufferClass self => self-  -> Clipboard  -- ^ @clipboard@ - 	the GtkClipboard to paste from-  -> TextIter   -- ^ @location@ - 	location to insert pasted text+  -> Clipboard  -- ^ @clipboard@ -      the GtkClipboard to paste from+  -> TextIter   -- ^ @location@ -       location to insert pasted text   -> Bool       -- ^ @defaultEditable@ -   whether the buffer is editable by default   -> IO () textBufferPasteClipboard self clipboard overrideLocation defaultEditable =@@ -1139,7 +1137,7 @@ -- we'll ask for the paste data and return, and at some point later -- after the main loop runs, the paste data will be inserted.) textBufferPasteClipboardAtCursor :: TextBufferClass self => self-  -> Clipboard  -- ^ @clipboard@ - 	the GtkClipboard to paste from+  -> Clipboard  -- ^ @clipboard@ -      the GtkClipboard to paste from   -> Bool       -- ^ @defaultEditable@ -   whether the buffer is editable by default   -> IO () textBufferPasteClipboardAtCursor self clipboard defaultEditable =@@ -1151,7 +1149,7 @@  -- | Copies the currently-selected text to a clipboard. textBufferCopyClipboard :: TextBufferClass self => self-  -> Clipboard -- ^ @clipboard@ - 	the GtkClipboard object to copy to+  -> Clipboard -- ^ @clipboard@ -       the GtkClipboard object to copy to   -> IO () textBufferCopyClipboard self clipboard =   {# call gtk_text_buffer_copy_clipboard #}@@ -1161,7 +1159,7 @@ -- | Copies the currently-selected text to a clipboard, -- then deletes said text if it's editable. textBufferCutClipboard :: TextBufferClass self => self-  -> Clipboard  -- ^ @clipboard@ - 	the GtkClipboard object to cut to+  -> Clipboard  -- ^ @clipboard@ -      the GtkClipboard object to cut to   -> Bool       -- ^ @defaultEditable@ -   whether the buffer is editable by default   -> IO () textBufferCutClipboard self clipboard defaultEditable =@@ -1171,11 +1169,11 @@     (fromBool defaultEditable) #endif --- | Adds clipboard to the list of clipboards in which the selection contents of @self@ are available. +-- | Adds clipboard to the list of clipboards in which the selection contents of @self@ are available. -- In most cases, @clipboard@ will be the 'Clipboard' of type 'selectionPrimary' for a view of @self@. -- textBufferAddSelectionClipboard :: TextBufferClass self => self- -> Clipboard  -- ^ @clipboard@ - 	the 'Clipboard' object to add+ -> Clipboard  -- ^ @clipboard@ -       the 'Clipboard' object to add  -> IO () textBufferAddSelectionClipboard self clipboard =   {# call text_buffer_add_selection_clipboard #} (toTextBuffer self) clipboard@@ -1185,7 +1183,7 @@ textBufferRemoveSelectionClipboard :: TextBufferClass self => self  -> Clipboard  -- ^ @clipboard@ -        the 'Clipboard' object to remove  -> IO ()-textBufferRemoveSelectionClipboard self clipboard =  +textBufferRemoveSelectionClipboard self clipboard =   {# call text_buffer_remove_selection_clipboard #} (toTextBuffer self) clipboard  --------------------@@ -1204,7 +1202,7 @@ -- -- Default value: \"\" ---textBufferText :: TextBufferClass self => Attr self String+textBufferText :: (TextBufferClass self, GlibString string) => Attr self string textBufferText = newAttrFromStringProperty "text" #endif @@ -1221,7 +1219,7 @@  -- | A 'TextTag' was applied to a region of text. ---applyTag :: TextBufferClass self => Signal self (TextTag -> TextIter -> TextIter -> IO ()) +applyTag :: TextBufferClass self => Signal self (TextTag -> TextIter -> TextIter -> IO ()) applyTag = Signal (connect_OBJECT_BOXED_BOXED__NONE "apply-tag" mkTextIterCopy mkTextIterCopy)  -- | A new atomic user action is started.@@ -1256,7 +1254,7 @@ insertPixbuf :: TextBufferClass self => Signal self (TextIter -> Pixbuf -> IO ()) insertPixbuf = Signal (connect_BOXED_OBJECT__NONE "insert-pixbuf" mkTextIterCopy) --- | The 'insertChildAnchor' signal is emitted to insert a 'TextChildAnchor' in a 'TextBuffer'. +-- | The 'insertChildAnchor' signal is emitted to insert a 'TextChildAnchor' in a 'TextBuffer'. -- Insertion actually occurs in the default handler. -- -- * See note in 'bufferInsertText'.@@ -1272,7 +1270,7 @@ --   to prevent the default handler from running. If additional text should --   be inserted, this can be done using the 'after' function to connect. ---bufferInsertText :: TextBufferClass self => Signal self (TextIter -> String -> IO ())+bufferInsertText :: (TextBufferClass self, GlibString string) => Signal self (TextIter -> string -> IO ()) bufferInsertText = Signal $ \after obj handler ->   connect_BOXED_PTR_INT__NONE "insert-text" mkTextIterCopy after obj   (\iter strPtr strLen -> peekUTFStringLen (strPtr, strLen) >>= handler iter)@@ -1290,8 +1288,8 @@ modifiedChanged :: TextBufferClass self => Signal self (IO ()) modifiedChanged = Signal (connect_NONE__NONE "modified-changed") --- | The 'pasteDone' signal is emitted after paste operation has been completed. --- This is useful to properly scroll the view to the end of the pasted text. +-- | The 'pasteDone' signal is emitted after paste operation has been completed.+-- This is useful to properly scroll the view to the end of the pasted text. -- See 'textBufferPasteClipboard' for more details. pasteDone :: TextBufferClass self => Signal self (Clipboard -> IO ()) pasteDone = Signal (connect_OBJECT__NONE "paste-done")@@ -1311,9 +1309,9 @@ onApplyTag, afterApplyTag :: TextBufferClass self => self  -> (TextTag -> TextIter -> TextIter -> IO ())  -> IO (ConnectId self)-onApplyTag = connect_OBJECT_BOXED_BOXED__NONE "apply-tag" +onApplyTag = connect_OBJECT_BOXED_BOXED__NONE "apply-tag"   mkTextIterCopy mkTextIterCopy False-afterApplyTag = connect_OBJECT_BOXED_BOXED__NONE "apply-tag" +afterApplyTag = connect_OBJECT_BOXED_BOXED__NONE "apply-tag"   mkTextIterCopy mkTextIterCopy True  -- | A new atomic user action is started.@@ -1367,19 +1365,19 @@  -- | Some text was inserted. ---onBufferInsertText, afterBufferInsertText :: TextBufferClass self => self- -> (TextIter -> String -> IO ())+onBufferInsertText, afterBufferInsertText :: (TextBufferClass self, GlibString string) => self+ -> (TextIter -> string -> IO ())  -> IO (ConnectId self)-onBufferInsertText self user = +onBufferInsertText self user =   connect_BOXED_PTR_INT__NONE "insert-text" mkTextIterCopy False self $     \iter strP strLen -> do       str <- peekUTFStringLen (strP,strLen)-      user iter str -afterBufferInsertText self user = +      user iter str+afterBufferInsertText self user =   connect_BOXED_PTR_INT__NONE "insert-text" mkTextIterCopy True self $     \iter strP strLen -> do       str <- peekUTFStringLen (strP,strLen)-      user iter str +      user iter str  -- | A 'TextMark' within the buffer was deleted. --@@ -1410,9 +1408,9 @@ onRemoveTag, afterRemoveTag :: TextBufferClass self => self  -> (TextTag -> TextIter -> TextIter -> IO ())  -> IO (ConnectId self)-onRemoveTag = connect_OBJECT_BOXED_BOXED__NONE "remove-tag" +onRemoveTag = connect_OBJECT_BOXED_BOXED__NONE "remove-tag"   mkTextIterCopy mkTextIterCopy False-afterRemoveTag = connect_OBJECT_BOXED_BOXED__NONE "remove-tag" +afterRemoveTag = connect_OBJECT_BOXED_BOXED__NONE "remove-tag"   mkTextIterCopy mkTextIterCopy True  #endif
Graphics/UI/Gtk/Multiline/TextIter.chs view
@@ -34,7 +34,7 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) ----- An iterator is an abstract datatype representing a pointer into a +-- An iterator is an abstract datatype representing a pointer into a -- 'TextBuffer'. -- module Graphics.UI.Gtk.Multiline.TextIter (@@ -138,18 +138,17 @@   textIterLine,   ) where -import Control.Monad	(liftM)-import Data.Maybe	(fromMaybe)-import Data.Char	(chr)+import Control.Monad    (liftM)+import Data.Maybe       (fromMaybe)+import Data.Char        (chr)  import System.Glib.FFI-import System.Glib.Flags		(fromFlags)+import System.Glib.Flags                (fromFlags) import System.Glib.UTFString import System.Glib.Attributes-import System.Glib.GObject		(makeNewGObject) import System.Glib.GList {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(TextSearchFlags(..))+import Graphics.UI.Gtk.General.Enums    (TextSearchFlags(..)) {#import Graphics.UI.Gtk.Multiline.Types#} {#import Graphics.UI.Gtk.Multiline.TextTag#} {#import Graphics.Rendering.Pango.BasicTypes#}@@ -201,7 +200,7 @@ -- If the element at this iterator is a non-character -- element, such as an image embedded in the buffer, the Unicode \"unknown\" -- character 0xFFFC is returned. If invoked on the end iterator,--- @Nothigng@ is returned.+-- @Nothing@ is returned. -- textIterGetChar :: TextIter -> IO (Maybe Char) textIterGetChar ti = do@@ -216,7 +215,7 @@ -- Note that 0xFFFC can occur in normal text as well, so it is not a reliable -- indicator that a pixbuf or widget is in the buffer. ---textIterGetSlice :: TextIter -> TextIter -> IO String+textIterGetSlice :: GlibString string => TextIter -> TextIter -> IO string textIterGetSlice end start = do   cStr <- {#call text_iter_get_slice#} start end   str <- peekUTFString cStr@@ -228,7 +227,7 @@ -- * Pictures (and other objects) are stripped form the output. Thus, this --   function does not preserve offsets. ---textIterGetText :: TextIter -> TextIter -> IO String+textIterGetText :: GlibString string => TextIter -> TextIter -> IO string textIterGetText start end = do   cStr <- {#call text_iter_get_text#} start end   str <- peekUTFString cStr@@ -239,7 +238,7 @@ -- text is usually invisible because a 'TextTag' with the \"invisible\" -- attribute turned on has been applied to it. ---textIterGetVisibleSlice :: TextIter -> TextIter -> IO String+textIterGetVisibleSlice :: GlibString string => TextIter -> TextIter -> IO string textIterGetVisibleSlice start end = do   cStr <- {#call text_iter_get_visible_slice#} start end   str <- peekUTFString cStr@@ -250,7 +249,7 @@ -- text is usually invisible because a 'TextTag' with the \"invisible\" -- attribute turned on has been applied to it. ---textIterGetVisibleText :: TextIter -> TextIter -> IO String+textIterGetVisibleText :: GlibString string => TextIter -> TextIter -> IO string textIterGetVisibleText start end = do   cStr <- {#call text_iter_get_visible_text#} start end   str <- peekUTFString cStr@@ -265,8 +264,8 @@   if pbPtr==nullPtr then return Nothing else liftM Just $     makeNewGObject mkPixbuf (return pbPtr) --- | If the location at @iter@ contains a child anchor, --- the anchor is returned (with no new reference count added). +-- | If the location at @iter@ contains a child anchor,+-- the anchor is returned (with no new reference count added). -- Otherwise, @Nothing@ is returned. -- textIterGetChildAnchor :: TextIter -> IO (Maybe TextChildAnchor)@@ -330,7 +329,7 @@   {#call unsafe text_iter_ends_tag#} ti (TextTag nullForeignPtr)  -- | Query if the 'TextIter' is at the--- beginning or the end of a 'TextTag'. This is equivalent to +-- beginning or the end of a 'TextTag'. This is equivalent to -- ('textIterBeginsTag' || 'textIterEndsTag'), i.e. it -- tells you whether a range with @tag@ applied to it begins /or/ ends at -- @iter@.@@ -375,7 +374,7 @@ -- 'textIterCanInsert' to handle this case. -- textIterEditable :: TextIter -> Bool -> IO Bool-textIterEditable ti def = liftM toBool $ +textIterEditable ti def = liftM toBool $   {#call unsafe text_iter_editable#} ti (fromBool def)  -- | Check if new text can be inserted at 'TextIter'.@@ -392,7 +391,7 @@ -- if you want to insert text depending on the current editable status. -- textIterCanInsert :: TextIter -> Bool -> IO Bool-textIterCanInsert ti def = liftM toBool $ +textIterCanInsert ti def = liftM toBool $   {#call unsafe text_iter_can_insert#} ti (fromBool def)  -- | Determine if 'TextIter' begins a new@@ -435,28 +434,28 @@ -- sentence. -- textIterStartsSentence :: TextIter -> IO Bool-textIterStartsSentence ti = liftM toBool $ +textIterStartsSentence ti = liftM toBool $   {#call unsafe text_iter_starts_sentence#} ti  -- | Determine if 'TextIter' ends a -- sentence. -- textIterEndsSentence :: TextIter -> IO Bool-textIterEndsSentence ti = liftM toBool $ +textIterEndsSentence ti = liftM toBool $   {#call unsafe text_iter_ends_sentence#} ti  -- | Determine if 'TextIter' is inside -- a sentence. -- textIterInsideSentence :: TextIter -> IO Bool-textIterInsideSentence ti = liftM toBool $ +textIterInsideSentence ti = liftM toBool $   {#call unsafe text_iter_inside_sentence#} ti  -- | Determine if 'TextIter' is at a -- cursor position. -- textIterIsCursorPosition :: TextIter -> IO Bool-textIterIsCursorPosition ti = liftM toBool $ +textIterIsCursorPosition ti = liftM toBool $   {#call unsafe text_iter_is_cursor_position#} ti  -- | Return number of characters in this line.@@ -467,17 +466,17 @@ textIterGetCharsInLine ti = liftM fromIntegral $   {#call unsafe text_iter_get_chars_in_line#} ti --- | Computes the effect of any tags applied to this spot in the text. --- The values parameter should be initialized to the default settings you wish to use if no tags are in effect. --- You'd typically obtain the defaults from 'textViewGetDefaultAttributes'. --- 'textIterGetAttributes' will modify values, applying the effects of any tags present at iter. +-- | Computes the effect of any tags applied to this spot in the text.+-- The values parameter should be initialized to the default settings you wish to use if no tags are in effect.+-- You'd typically obtain the defaults from 'textViewGetDefaultAttributes'.+-- 'textIterGetAttributes' will modify values, applying the effects of any tags present at iter. -- If any tags affected values, the function returns @True@. -- textIterGetAttributes :: TextIter -> TextAttributes -> IO Bool textIterGetAttributes ti ta = liftM toBool $   {#call unsafe text_iter_get_attributes#} ti ta --- | A convenience wrapper around 'textIterGetAttributes', which returns the language in effect at iter. +-- | A convenience wrapper around 'textIterGetAttributes', which returns the language in effect at iter. -- If no tags affecting language apply to iter, the return value is identical to that of 'getDefaultLanguage'. -- textIterGetLanguage :: TextIter -> IO Language@@ -488,36 +487,36 @@ -- the buffer. -- textIterIsEnd :: TextIter -> IO Bool-textIterIsEnd ti = liftM toBool $ +textIterIsEnd ti = liftM toBool $   {#call unsafe text_iter_is_end#} ti  -- | Determine if 'TextIter' is at the -- beginning of the buffer. -- textIterIsStart :: TextIter -> IO Bool-textIterIsStart ti = liftM toBool $ +textIterIsStart ti = liftM toBool $   {#call unsafe text_iter_is_start#} ti  -- | Move 'TextIter' forwards. ----- * Retuns True if the iterator is pointing to a character.+-- * Returns True if the iterator is pointing to a character. -- textIterForwardChar :: TextIter -> IO Bool-textIterForwardChar ti = liftM toBool $ +textIterForwardChar ti = liftM toBool $   {#call unsafe text_iter_forward_char#} ti  -- | Move 'TextIter' backwards. ----- * Retuns True if the movement was possible.+-- * Returns True if the movement was possible. -- textIterBackwardChar :: TextIter -> IO Bool-textIterBackwardChar ti = liftM toBool $ +textIterBackwardChar ti = liftM toBool $   {#call unsafe text_iter_backward_char#} ti  -- | Move 'TextIter' forwards by -- @n@ characters. ----- * Retuns @True@ if the iterator is pointing to a new character (and @False@ if+-- * Returns @True@ if the iterator is pointing to a new character (and @False@ if --   the iterator points to a picture or has not moved). -- -- *  Note that images embedded@@ -525,49 +524,49 @@ -- move onto an image instead of a character. -- textIterForwardChars :: TextIter -> Int -> IO Bool-textIterForwardChars ti n = liftM toBool $ +textIterForwardChars ti n = liftM toBool $   {#call unsafe text_iter_forward_chars#} ti (fromIntegral n)  -- | Move 'TextIter' backwards by -- @n@ characters. ----- * Retuns @True@ if the iterator is pointing to a new character (and @False@ if+-- * Returns @True@ if the iterator is pointing to a new character (and @False@ if --   the iterator points to a picture or has not moved). -- textIterBackwardChars :: TextIter -> Int -> IO Bool-textIterBackwardChars ti n = liftM toBool $ +textIterBackwardChars ti n = liftM toBool $   {#call unsafe text_iter_backward_chars#} ti (fromIntegral n)   -- | Move 'TextIter' forwards. ----- * Retuns True if the iterator is pointing to a new line (and False if the+-- * Returns True if the iterator is pointing to a new line (and False if the --   iterator points to a picture or has not moved). -- -- * If 'TextIter' is on the first line, it will be moved to the --   beginning of the buffer. -- textIterForwardLine :: TextIter -> IO Bool-textIterForwardLine ti = liftM toBool $ +textIterForwardLine ti = liftM toBool $   {#call unsafe text_iter_forward_line#} ti  -- | Move 'TextIter' backwards. ----- * Retuns True if the iterator is pointing to a new line (and False if the+-- * Returns True if the iterator is pointing to a new line (and False if the --   iterator points to a picture or has not moved). -- -- * If 'TextIter' is on the first line, it will be moved to the end --   of the buffer. -- textIterBackwardLine :: TextIter -> IO Bool-textIterBackwardLine ti = liftM toBool $ +textIterBackwardLine ti = liftM toBool $   {#call unsafe text_iter_backward_line#} ti   -- | Move 'TextIter' forwards by -- @n@ lines. ----- * Retuns True if the iterator is pointing to a new line (and False if the+-- * Returns True if the iterator is pointing to a new line (and False if the --   iterator points to a picture or has not moved). -- -- * If 'TextIter' is on the first line, it will be moved to the@@ -576,13 +575,13 @@ -- * @n@ can be negative. -- textIterForwardLines :: TextIter -> Int -> IO Bool-textIterForwardLines ti n = liftM toBool $ +textIterForwardLines ti n = liftM toBool $   {#call unsafe text_iter_forward_lines#} ti (fromIntegral n)  -- | Move 'TextIter' backwards by -- @n@ lines. ----- * Retuns True if the iterator is pointing to a new line (and False if the+-- * Returns True if the iterator is pointing to a new line (and False if the --   iterator points to a picture or has not moved). -- -- * If 'TextIter' is on the first line, it will be moved to the end@@ -591,50 +590,50 @@ -- * @n@ can be negative. -- textIterBackwardLines :: TextIter -> Int -> IO Bool-textIterBackwardLines ti n = liftM toBool $ +textIterBackwardLines ti n = liftM toBool $   {#call unsafe text_iter_backward_lines#} ti (fromIntegral n)  -- | Move 'TextIter' forwards by -- @n@ word ends. ----- * Retuns True if the iterator is pointing to a new word end.+-- * Returns True if the iterator is pointing to a new word end. -- textIterForwardWordEnds :: TextIter -> Int -> IO Bool-textIterForwardWordEnds ti n = liftM toBool $ +textIterForwardWordEnds ti n = liftM toBool $   {#call unsafe text_iter_forward_word_ends#} ti (fromIntegral n)  -- | Move 'TextIter' backwards by -- @n@ word beginnings. ----- * Retuns True if the iterator is pointing to a new word start.+-- * Returns True if the iterator is pointing to a new word start. -- textIterBackwardWordStarts :: TextIter -> Int -> IO Bool-textIterBackwardWordStarts ti n = liftM toBool $ +textIterBackwardWordStarts ti n = liftM toBool $   {#call unsafe text_iter_backward_word_starts#} ti (fromIntegral n)  -- | Move 'TextIter' forwards to the -- next word end. ----- * Retuns True if the iterator has moved to a new word end.+-- * Returns True if the iterator has moved to a new word end. -- textIterForwardWordEnd :: TextIter -> IO Bool-textIterForwardWordEnd ti = liftM toBool $ +textIterForwardWordEnd ti = liftM toBool $   {#call unsafe text_iter_forward_word_end#} ti  -- | Move 'TextIter' backwards to -- the next word beginning. ----- * Retuns True if the iterator has moved to a new word beginning.+-- * Returns True if the iterator has moved to a new word beginning. -- textIterBackwardWordStart :: TextIter -> IO Bool-textIterBackwardWordStart ti = liftM toBool $ +textIterBackwardWordStart ti = liftM toBool $   {#call unsafe text_iter_backward_word_start#} ti  -- | Move 'TextIter' forwards to -- the next cursor position. -- -- * Some characters are composed of two Unicode codes. This function ensures---   that 'TextIter' does not point inbetween such double characters.+--   that 'TextIter' does not point in between such double characters. -- -- * Returns True if 'TextIter' moved and points to a character (not --   to an object).@@ -647,7 +646,7 @@ -- to the next cursor position. -- -- * Some characters are composed of two Unicode codes. This function ensures---   that 'TextIter' does not point inbetween such double characters.+--   that 'TextIter' does not point in between such double characters. -- -- * Returns True if 'TextIter' moved and points to a character (not --   to an object).@@ -663,7 +662,7 @@ --   to an object). -- textIterForwardCursorPositions :: TextIter -> Int -> IO Bool-textIterForwardCursorPositions ti n = liftM toBool $ +textIterForwardCursorPositions ti n = liftM toBool $   {#call unsafe text_iter_forward_cursor_positions#} ti (fromIntegral n)  -- | Move 'TextIter' backwards@@ -673,51 +672,51 @@ --   to an object). -- textIterBackwardCursorPositions :: TextIter -> Int -> IO Bool-textIterBackwardCursorPositions ti n = liftM toBool $ +textIterBackwardCursorPositions ti n = liftM toBool $   {#call unsafe text_iter_backward_cursor_positions#} ti (fromIntegral n)   -- | Move 'TextIter' forwards by -- @n@ sentence ends. ----- * Retuns True if the iterator is pointing to a new sentence end.+-- * Returns True if the iterator is pointing to a new sentence end. -- textIterForwardSentenceEnds :: TextIter -> Int -> IO Bool-textIterForwardSentenceEnds ti n = liftM toBool $ +textIterForwardSentenceEnds ti n = liftM toBool $   {#call unsafe text_iter_forward_sentence_ends#} ti (fromIntegral n)  -- | Move 'TextIter' backwards -- by @n@ sentence beginnings. ----- * Retuns True if the iterator is pointing to a new sentence start.+-- * Returns True if the iterator is pointing to a new sentence start. -- textIterBackwardSentenceStarts :: TextIter -> Int -> IO Bool-textIterBackwardSentenceStarts ti n = liftM toBool $ +textIterBackwardSentenceStarts ti n = liftM toBool $   {#call unsafe text_iter_backward_sentence_starts#} ti (fromIntegral n)  -- | Move 'TextIter' forwards to -- the next sentence end. ----- * Retuns True if the iterator has moved to a new sentence end.+-- * Returns True if the iterator has moved to a new sentence end. -- textIterForwardSentenceEnd :: TextIter -> IO Bool-textIterForwardSentenceEnd ti = liftM toBool $ +textIterForwardSentenceEnd ti = liftM toBool $   {#call unsafe text_iter_forward_sentence_end#} ti  -- | Move 'TextIter' backwards -- to the next sentence beginning. ----- * Retuns True if the iterator has moved to a new sentence beginning.+-- * Returns True if the iterator has moved to a new sentence beginning. -- textIterBackwardSentenceStart :: TextIter -> IO Bool-textIterBackwardSentenceStart ti = liftM toBool $ +textIterBackwardSentenceStart ti = liftM toBool $   {#call unsafe text_iter_backward_sentence_start#} ti  -- | Set 'TextIter' to an offset within the -- buffer. -- textIterSetOffset :: TextIter -> Int -> IO ()-textIterSetOffset ti n = +textIterSetOffset ti n =   {#call unsafe text_iter_set_offset#} ti (fromIntegral n)  -- | Set 'TextIter' to a line within the@@ -727,7 +726,7 @@ --   moves @iter@ to the start of the last line in the buffer. -- textIterSetLine :: TextIter -> Int -> IO ()-textIterSetLine ti n = +textIterSetLine ti n =   {#call unsafe text_iter_set_line#} ti (fromIntegral n)  -- | Set 'TextIter' to an offset within the line.@@ -738,14 +737,14 @@ --   next line. -- textIterSetLineOffset :: TextIter -> Int -> IO ()-textIterSetLineOffset ti n = +textIterSetLineOffset ti n =   {#call unsafe text_iter_set_line_offset#} ti (fromIntegral n)  -- | Like 'textIterSetLineOffset', but the offset is in visible characters, -- i.e. text with a tag making it invisible is not counted in the offset. -- textIterSetVisibleLineOffset :: TextIter -> Int -> IO ()-textIterSetVisibleLineOffset ti n = +textIterSetVisibleLineOffset ti n =   {#call unsafe text_iter_set_visible_line_offset#} ti (fromIntegral n)  -- | Moves @iter@ forward to the \"end iterator,\" which points one past the@@ -775,7 +774,7 @@ -- textIterForwardToTagToggle :: TextIter -> Maybe TextTag -> IO Bool textIterForwardToTagToggle ti tt = liftM toBool $-  {#call unsafe text_iter_forward_to_tag_toggle#} ti +  {#call unsafe text_iter_forward_to_tag_toggle#} ti     (fromMaybe (TextTag nullForeignPtr) tt)  -- | Moves 'TextIter' backward to@@ -787,13 +786,9 @@ -- textIterBackwardToTagToggle :: TextIter -> Maybe TextTag -> IO Bool textIterBackwardToTagToggle ti tt = liftM toBool $-  {#call unsafe text_iter_backward_to_tag_toggle#} ti +  {#call unsafe text_iter_backward_to_tag_toggle#} ti     (fromMaybe (TextTag nullForeignPtr) tt) --- Setup a callback for a predicate function.----type TextCharPredicateCB = Char -> Bool- {#pointer TextCharPredicate#}  foreign import ccall "wrapper" mkTextCharPredicate ::@@ -811,7 +806,7 @@                            IO Bool textIterForwardFindChar ti pred limit = do   fPtr <- mkTextCharPredicate (\c _ -> return $ fromBool $ pred (chr (fromIntegral c)))-  res <- liftM toBool $ {#call text_iter_forward_find_char#} +  res <- liftM toBool $ {#call text_iter_forward_find_char#}     ti fPtr nullPtr (fromMaybe (TextIter nullForeignPtr) limit)   freeHaskellFunPtr fPtr   return res@@ -828,7 +823,7 @@                             IO Bool textIterBackwardFindChar ti pred limit = do   fPtr <- mkTextCharPredicate (\c _ -> return $ fromBool $ pred (chr (fromIntegral c)))-  res <- liftM toBool $ {#call text_iter_backward_find_char#} +  res <- liftM toBool $ {#call text_iter_backward_find_char#}     ti fPtr nullPtr (fromMaybe (TextIter nullForeignPtr) limit)   freeHaskellFunPtr fPtr   return res@@ -842,14 +837,14 @@ -- -- * Returns the start and end position of the string found. ---textIterForwardSearch :: TextIter -> String -> [TextSearchFlags] ->+textIterForwardSearch :: GlibString string => TextIter -> string -> [TextSearchFlags] ->                          Maybe TextIter -> IO (Maybe (TextIter, TextIter)) textIterForwardSearch ti str flags limit = do   start  <- makeEmptyTextIter   end <- makeEmptyTextIter   found <- liftM toBool $ withUTFString str $ \cStr ->-    {#call unsafe text_iter_forward_search#} ti cStr -    ((fromIntegral.fromFlags) flags) start end +    {#call unsafe text_iter_forward_search#} ti cStr+    ((fromIntegral.fromFlags) flags) start end     (fromMaybe (TextIter nullForeignPtr) limit)   return $ if found then Just (start,end) else Nothing @@ -862,14 +857,14 @@ -- -- * Returns the start and end position of the string found. ---textIterBackwardSearch :: TextIter -> String -> [TextSearchFlags] ->+textIterBackwardSearch :: GlibString string => TextIter -> string -> [TextSearchFlags] ->                           Maybe TextIter -> IO (Maybe (TextIter, TextIter)) textIterBackwardSearch ti str flags limit = do   start  <- makeEmptyTextIter   end <- makeEmptyTextIter   found <- liftM toBool $ withUTFString str $ \cStr ->-    {#call unsafe text_iter_backward_search#} ti cStr -    ((fromIntegral.fromFlags) flags) start end +    {#call unsafe text_iter_backward_search#} ti cStr+    ((fromIntegral.fromFlags) flags) start end     (fromMaybe (TextIter nullForeignPtr) limit)   return $ if found then Just (start,end) else Nothing @@ -946,10 +941,10 @@  -- | Calls 'textIterForwardVisibleWordEnd' up to count times. ---textIterForwardVisibleWordEnds :: TextIter - -> Int   -- ^ @couter@ - number of times to move                        - -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   -textIterForwardVisibleWordEnds self count = +textIterForwardVisibleWordEnds :: TextIter+ -> Int   -- ^ @counter@ - number of times to move+ -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator+textIterForwardVisibleWordEnds self count =   liftM toBool $   {# call text_iter_forward_visible_word_ends #}     self@@ -957,76 +952,76 @@  -- | Calls 'textIterBackwardVisibleWordStart' up to count times. ---textIterBackwardVisibleWordStarts :: TextIter - -> Int   -- ^ @couter@ - number of times to move                        - -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   +textIterBackwardVisibleWordStarts :: TextIter+ -> Int   -- ^ @counter@ - number of times to move+ -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator textIterBackwardVisibleWordStarts self count =   liftM toBool $   {# call text_iter_backward_visible_word_starts #}     self     (fromIntegral count) --- | Moves forward to the next visible word end. --- (If iter is currently on a word end, moves forward to the next one after that.) --- Word breaks are determined by Pango and should be correct for nearly any language +-- | Moves forward to the next visible word end.+-- (If iter is currently on a word end, moves forward to the next one after that.)+-- Word breaks are determined by Pango and should be correct for nearly any language -- (if not, the correct fix would be to the Pango word break algorithms). -- textIterForwardVisibleWordEnd :: TextIter- -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   + -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator textIterForwardVisibleWordEnd self =   liftM toBool $   {# call text_iter_forward_visible_word_end #}     self --- | Moves backward to the previous visible word start. --- (If iter is currently on a word start, moves backward to the next one after that.) --- Word breaks are determined by Pango and should be correct for nearly any language +-- | Moves backward to the previous visible word start.+-- (If iter is currently on a word start, moves backward to the next one after that.)+-- Word breaks are determined by Pango and should be correct for nearly any language -- (if not, the correct fix would be to the Pango word break algorithms).--- +-- textIterBackwardVisibleWordStart :: TextIter- -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   + -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator textIterBackwardVisibleWordStart self =   liftM toBool $   {# call text_iter_backward_visible_word_start #}     self --- | Moves iter forward to the next visible cursor position. +-- | Moves iter forward to the next visible cursor position. -- See 'textIterForwardCursorPosition' for details. -- textIterForwardVisibleCursorPosition :: TextIter- -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   + -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator textIterForwardVisibleCursorPosition self =   liftM toBool $   {# call text_iter_forward_visible_cursor_position #}     self --- | Moves iter forward to the previous visible cursor position. +-- | Moves iter forward to the previous visible cursor position. -- See 'textIterBackwardCursorPosition' for details.--- +-- textIterBackwardVisibleCursorPosition :: TextIter- -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   + -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator textIterBackwardVisibleCursorPosition self =   liftM toBool $   {# call text_iter_backward_visible_cursor_position #}     self --- | Moves up to count visible cursor positions. +-- | Moves up to count visible cursor positions. -- See 'textIterForwardCursorPosition' for details. textIterForwardVisibleCursorPositions :: TextIter- -> Int   -- ^ @couter@ - number of times to move                        - -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   + -> Int   -- ^ @counter@ - number of times to move+ -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator textIterForwardVisibleCursorPositions self count =   liftM toBool $   {# call text_iter_forward_visible_cursor_positions #}     self     (fromIntegral count) --- | Moves up to count visible cursor positions. +-- | Moves up to count visible cursor positions. -- See 'textIterBackwardCursorPosition' for details. ---textIterBackwardVisibleCursorPositions :: TextIter - -> Int   -- ^ @couter@ - number of times to move                        - -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator   +textIterBackwardVisibleCursorPositions :: TextIter+ -> Int   -- ^ @counter@ - number of times to move+ -> IO Bool -- ^ return @True@ if iter moved and is not the end iterator textIterBackwardVisibleCursorPositions self count =   liftM toBool $   {# call text_iter_backward_visible_cursor_positions #}@@ -1045,26 +1040,26 @@   res <- {#call unsafe text_iter_compare#} ti1 ti2   return $ case res of     (-1)   -> LT-    0	   -> EQ-    1	   -> GT+    0      -> EQ+    1      -> GT --- | Checks whether iter falls in the range [start, end). +-- | Checks whether iter falls in the range [start, end). -- start and end must be in ascending order. ---textIterInRange :: TextIter +textIterInRange :: TextIter  -> TextIter -- ^ @start@ start of range  -> TextIter -- ^ @end@ end of range  -> IO Bool  -- ^ @True@ if iter is in the range textIterInRange ti start end = liftM toBool $   {# call unsafe text_iter_in_range #} ti start end --- | Swaps the value of first and second if second comes before first in the buffer. --- That is, ensures that first and second are in sequence. --- Most text buffer functions that take a range call this automatically on your behalf, so there's no real reason to call it yourself in those cases. +-- | Swaps the value of first and second if second comes before first in the buffer.+-- That is, ensures that first and second are in sequence.+-- Most text buffer functions that take a range call this automatically on your behalf, so there's no real reason to call it yourself in those cases. -- There are some exceptions, such as 'textIterInRange', that expect a pre-sorted range. -- textIterOrder :: TextIter -> TextIter -> IO ()-textIterOrder first second = +textIterOrder first second =   {# call text_iter_order #} first second  --------------------
Graphics/UI/Gtk/Multiline/TextMark.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Multiline.TextMark ( -- * Detail--- +-- -- | You may wish to begin by reading the text widget conceptual overview -- which gives an overview of all the objects and data types related to the -- text widget and how they work together.@@ -80,22 +80,23 @@   textMarkGetLeftGravity,  -- * Attributes+  textMarkName,   textMarkVisible,+  textMarkLeftGravity   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(makeNewGObject, wrapNewGObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}  -- | The name of a mark.-type MarkName = String+type MarkName = DefaultGlibString  -------------------- -- Constructors@@ -113,7 +114,7 @@ -- -- * Available since Gtk+ version 2.12 ---textMarkNew :: +textMarkNew ::   Maybe MarkName  -- ^ @markName@ - name for mark, or @Nothing@  -> Bool  -- ^ @leftGravity@ - whether the mark has left gravity  -> IO TextMark@@ -188,7 +189,7 @@ -------------------- -- Attributes --- | Retreives the name of a mark.+-- | Retrieves the name of a mark. -- textMarkName :: TextMarkClass self => ReadAttr self (Maybe MarkName) textMarkName = readAttrFromMaybeStringProperty "name"
Graphics/UI/Gtk/Multiline/TextTag.chs view
@@ -19,7 +19,7 @@ --  Lesser General Public License for more details. -- -- TODO--- +-- --     Didn't bind `textTagTabs` properties, we need to bind PangoTab first (in `pango-tabs.c`) -- -- |@@ -31,7 +31,7 @@ -- module Graphics.UI.Gtk.Multiline.TextTag ( -- * Detail--- +-- -- | You may wish to begin by reading the text widget conceptual overview -- which gives an overview of all the objects and data types related to the -- text widget and how they work together.@@ -154,29 +154,31 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject		(wrapNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.Rendering.Pango.Font import Graphics.Rendering.Pango.BasicTypes      (FontDescription (..), makeNewFontDescription)-import Graphics.Rendering.Pango.Enums	(FontStyle(..), Variant(..),-					 Stretch(..), Underline(..))-import Graphics.UI.Gtk.General.Enums	(TextDirection(..),-					 Justification(..), WrapMode(..))+import Graphics.Rendering.Pango.Enums   (FontStyle(..), Variant(..),+                                         Stretch(..), Underline(..))+import Graphics.UI.Gtk.General.Enums    (TextDirection(..),+                                         Justification(..), WrapMode(..)) import Graphics.UI.Gtk.General.Structs  (Color(..)) import Graphics.UI.Gtk.Multiline.Types  ( TextIter, mkTextIterCopy )-import Graphics.UI.Gtk.Gdk.Events	(Event, marshalEvent)+#ifndef DISABLE_DEPRECATED+import Graphics.UI.Gtk.Gdk.Events       (Event, marshalEvent)+#endif import Graphics.UI.Gtk.Gdk.EventM (EventM, EAny) import Control.Monad.Reader ( runReaderT )  {# context lib="gtk" prefix="gtk" #} -type TagName = String+type TagName = DefaultGlibString  -------------------- -- Constructors@@ -188,13 +190,13 @@ textTagNew :: Maybe TagName -> IO TextTag textTagNew (Just name) =   wrapNewGObject mkTextTag $-  withCString name $ \namePtr ->+  withUTFString name $ \namePtr ->   {# call unsafe text_tag_new #}     namePtr textTagNew Nothing =   wrapNewGObject mkTextTag $ {# call unsafe text_tag_new #} nullPtr-     + -------------------- -- Methods @@ -238,20 +240,20 @@  -- | Copies src and returns a new 'TextAttributes'. ---textAttributesCopy :: -  TextAttributes  -- ^ @src@ - a 'TextAttributes' to be copied +textAttributesCopy ::+  TextAttributes  -- ^ @src@ - a 'TextAttributes' to be copied  -> IO TextAttributes textAttributesCopy src =   {#call text_attributes_copy#} src >>= makeNewTextAttributes --- | Copies the values from src to dest so that dest has the same values as src. +-- | Copies the values from src to dest so that dest has the same values as src. -- textAttributesCopyValues :: TextAttributes -> TextAttributes -> IO () textAttributesCopyValues src dest =   {# call text_attributes_copy_values #} src dest  -- | This function is use internal for transform TextAttributes.--- Don't expoert this function.+-- Don't export this function. makeNewTextAttributes :: Ptr TextAttributes -> IO TextAttributes makeNewTextAttributes ptr =   liftM TextAttributes $ newForeignPtr ptr text_attributes_unref@@ -266,14 +268,14 @@ -- -- Default value: @Nothing@ ---textTagName :: TextTagClass self => Attr self (Maybe String)+textTagName :: (TextTagClass self, GlibString string) => Attr self (Maybe string) textTagName = newAttrFromMaybeStringProperty "name"  -- | Background color as a string. -- -- Default value: \"\" ---textTagBackground :: TextTagClass self => WriteAttr self String+textTagBackground :: (TextTagClass self, GlibString string) => WriteAttr self string textTagBackground = writeAttrFromStringProperty "background"  -- | Whether this tag affects the background color.@@ -294,7 +296,7 @@ -- | Whether this tag affects background height. -- -- Default value: @False@--- +-- textTagBackgroundFullHeightSet :: TextTagClass self => Attr self Bool textTagBackgroundFullHeightSet = newAttrFromBoolProperty "background-full-height-set" @@ -314,7 +316,7 @@   {# call pure unsafe gdk_pixmap_get_type #}  -- | Whether this tag affects the background stipple.--- +-- -- Default value: @False@ -- -- Removed in Gtk3.@@ -326,11 +328,11 @@ -- -- Default value: \"\" ---textTagForeground :: TextTagClass self => WriteAttr self String+textTagForeground :: (TextTagClass self, GlibString string) => WriteAttr self string textTagForeground = writeAttrFromStringProperty "foreground"  -- | Whether this tag affects the foreground color.--- +-- -- Default value: @False@ -- textTagForegroundSet :: TextTagClass self => Attr self Bool@@ -352,7 +354,7 @@   {# call pure unsafe gdk_pixmap_get_type #}  -- | Whether this tag affects the foreground stipple.--- +-- -- Default value: @False@ -- -- Removed in Gtk3.@@ -376,7 +378,7 @@ textTagEditable = newAttrFromBoolProperty "editable"  -- | Whether this tag affects text editability.--- +-- -- Default value: @False@ -- textTagEditableSet :: TextTagClass self => Attr self Bool@@ -386,7 +388,7 @@ -- -- Default value: \"\" ---textTagFont :: TextTagClass self => Attr self String+textTagFont :: (TextTagClass self, GlibString string) => Attr self string textTagFont = newAttrFromStringProperty "font"  -- | Font description as a 'FontDescription' struct.@@ -400,11 +402,11 @@ -- -- Default value: \"\" ---textTagFamily :: TextTagClass self => Attr self String+textTagFamily :: (TextTagClass self, GlibString string) => Attr self string textTagFamily = newAttrFromStringProperty "family"  -- | Whether this tag affects the font family.--- +-- -- Default value: @False@ -- textTagFamilySet :: TextTagClass self => Attr self Bool@@ -419,7 +421,7 @@   {# call pure unsafe pango_style_get_type #}  -- | Whether this tag affects the font style.--- +-- -- Default value: @False@ -- textTagStyleSet :: TextTagClass self => Attr self Bool@@ -429,7 +431,7 @@ -- textTagTabs :: TextTagClass self => Attr self TabArray  -- | Whether this tag affects tabs.--- +-- -- Default value: @False@ -- textTagTabsSet :: TextTagClass self => Attr self Bool@@ -444,7 +446,7 @@   {# call pure unsafe pango_variant_get_type #}  -- | Whether this tag affects the font variant.--- +-- -- Default value: @False@ -- textTagVariantSet :: TextTagClass self => Attr self Bool@@ -461,7 +463,7 @@ textTagWeight = newAttrFromIntProperty "weight"  -- | Whether this tag affects the font weight.--- +-- -- Default value: @False@ -- textTagWeightSet :: TextTagClass self => Attr self Bool@@ -489,7 +491,7 @@ textTagSize = newAttrFromIntProperty "size"  -- | Whether this tag affects the font size.--- +-- -- Default value: @False@ -- textTagSizeSet :: TextTagClass self => Attr self Bool@@ -506,7 +508,7 @@ textTagScale = newAttrFromDoubleProperty "scale"  -- | Whether this tag scales the font size by a factor.--- +-- -- Default value: @False@ -- textTagScaleSet :: TextTagClass self => Attr self Bool@@ -530,7 +532,7 @@   {# call pure unsafe gtk_justification_get_type #}  -- | Whether this tag affects paragraph justification.--- +-- -- Default value: @False@ -- textTagJustificationSet :: TextTagClass self => Attr self Bool@@ -542,11 +544,11 @@ -- -- Default value: \"\" ---textTagLanguage :: TextTagClass self => Attr self String+textTagLanguage :: (TextTagClass self, GlibString string) => Attr self string textTagLanguage = newAttrFromStringProperty "language"  -- | Whether this tag affects the language the text is rendered as.--- +-- -- Default value: @False@ -- textTagLanguageSet :: TextTagClass self => Attr self Bool@@ -562,7 +564,7 @@ textTagLeftMargin = newAttrFromIntProperty "left-margin"  -- | Whether this tag affects the left margin.--- +-- -- Default value: @False@ -- textTagLeftMarginSet :: TextTagClass self => Attr self Bool@@ -578,7 +580,7 @@ textTagRightMargin = newAttrFromIntProperty "right-margin"  -- | Whether this tag affects the right margin.--- +-- -- Default value: @False@ -- textTagRightMarginSet :: TextTagClass self => Attr self Bool@@ -592,7 +594,7 @@ textTagIndent = newAttrFromIntProperty "indent"  -- | Whether this tag affects indentation.--- +-- -- Default value: @False@ -- textTagIndentSet :: TextTagClass self => Attr self Bool@@ -620,7 +622,7 @@ textTagPixelsAboveLines = newAttrFromIntProperty "pixels-above-lines"  -- | Whether this tag affects the number of pixels above lines.--- +-- -- Default value: @False@ -- textTagPixelsAboveLinesSet :: TextTagClass self => Attr self Bool@@ -636,7 +638,7 @@ textTagPixelsBelowLines = newAttrFromIntProperty "pixels-below-lines"  -- | Whether this tag affects the number of pixels below lines.--- +-- -- Default value: @False@ -- textTagPixelsBelowLinesSet :: TextTagClass self => Attr self Bool@@ -652,7 +654,7 @@ textTagPixelsInsideWrap = newAttrFromIntProperty "pixels-inside-wrap"  -- | Whether this tag affects the number of pixels between wrapped lines.--- +-- -- Default value: @False@ -- textTagPixelsInsideWrapSet :: TextTagClass self => Attr self Bool@@ -666,7 +668,7 @@ textTagStrikethrough = newAttrFromBoolProperty "strikethrough"  -- | Whether this tag affects strikethrough.--- +-- -- Default value: @False@ -- textTagStrikethroughSet :: TextTagClass self => Attr self Bool@@ -681,7 +683,7 @@   {# call pure unsafe pango_underline_get_type #}  -- | Whether this tag affects underlining.--- +-- -- Default value: @False@ -- textTagUnderlineSet :: TextTagClass self => Attr self Bool@@ -697,7 +699,7 @@   {# call pure unsafe gtk_wrap_mode_get_type #}  -- | Whether this tag affects line wrap mode.--- +-- -- Default value: @False@ -- textTagWrapModeSet :: TextTagClass self => Attr self Bool@@ -716,7 +718,7 @@ textTagInvisible = newAttrFromBoolProperty "invisible"  -- | Whether this tag affects text visibility.--- +-- -- Default value: @False@ -- textTagInvisibleSet :: TextTagClass self => Attr self Bool@@ -726,11 +728,11 @@ -- -- Default value: \"\" ---textTagParagraphBackground :: TextTagClass self => WriteAttr self String+textTagParagraphBackground :: (TextTagClass self, GlibString string) => WriteAttr self string textTagParagraphBackground = writeAttrFromStringProperty "paragraph-background"  -- | Whether this tag affects the paragraph background color.--- +-- -- Default value: @False@ -- textTagParagraphBackgroundSet :: TextTagClass self => Attr self Bool@@ -739,7 +741,7 @@ -- | The paragraph background color as a as a (possibly unallocated) 'Color'. -- textTagParagraphBackgroundGdk :: TextTagClass self => Attr self Color-textTagParagraphBackgroundGdk = +textTagParagraphBackgroundGdk =   newAttrFromBoxedStorableProperty "paragraph-background-gdk"   {# call pure unsafe gdk_color_get_type #} #endif@@ -782,7 +784,7 @@ --   e.g. mouse clicks to implement hyperlinking. -- onTextTagEvent :: TextTagClass t => t -> (Event -> TextIter -> IO ()) ->-		  IO (ConnectId t)+                  IO (ConnectId t) onTextTagEvent tt act =   connect_PTR_BOXED_BOXED__BOOL "event" marshalEvent mkTextIterCopy False tt     (\_ event iter -> act event iter >> return False)
Graphics/UI/Gtk/Multiline/TextTagTable.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Multiline.TextTagTable ( -- * Detail--- +-- -- | You may wish to begin by reading the text widget conceptual overview -- which gives an overview of all the objects and data types related to the -- text widget and how they work together.@@ -56,10 +56,10 @@   textTagTableGetSize   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM, void) -import System.Glib.FFI-import System.Glib.GObject	(wrapNewGObject, makeNewGObject)+import System.Glib.FFI (withForeignPtr, nullPtr, Ptr(..), CInt(..), CChar(..), FunPtr(..), maybeNull)+import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -84,7 +84,7 @@ -- an already-added tag. -- textTagTableAdd :: (TextTagTableClass self, TextTagClass tag) => self -> tag -> IO ()-textTagTableAdd self tag =+textTagTableAdd self tag = void $   {# call text_tag_table_add #}     (toTextTagTable self)     (toTextTag tag)@@ -99,13 +99,13 @@  -- | Look up a named tag. ---textTagTableLookup :: TextTagTableClass self => self- -> String             -- ^ @name@ - name of a tag+textTagTableLookup :: (TextTagTableClass self, GlibString string) => self+ -> string             -- ^ @name@ - name of a tag  -> IO (Maybe TextTag) -- ^ returns The tag, or @Nothing@ if none by that name                        -- is in the table. textTagTableLookup self name =   maybeNull (makeNewGObject mkTextTag) $-  withCString name $ \namePtr ->+  withUTFString name $ \namePtr ->   {# call unsafe text_tag_table_lookup #}     (toTextTagTable self)     namePtr
Graphics/UI/Gtk/Multiline/TextView.chs view
@@ -20,14 +20,14 @@ -- -- TODO ----- If PangoTabArray is bound: ---    Fucntions: textViewSetTabs and textViewGetTabs+-- If PangoTabArray is bound:+--    Functions: textViewSetTabs and textViewGetTabs --    Properties: textViewTabs ----- All on... and after... signales had incorrect names (underscore instead of hypens). Thus+-- All on... and after... signals had incorrect names (underscore instead of hyphens). Thus -- they could not have been used in applications and removing them can't break anything.--- Thus, I've removed them. Also, all key-binding singals are now removed as there is--- no way to add additional key bindings programatically in a type-safe way, let alone+-- Thus, I've removed them. Also, all key-binding signals are now removed as there is+-- no way to add additional key bindings programmatically in a type-safe way, let alone -- use these signals. -- -- |@@ -39,7 +39,7 @@ -- module Graphics.UI.Gtk.Multiline.TextView ( -- * Detail--- +-- -- | You may wish to begin by reading the text widget conceptual overview -- which gives an overview of all the objects and data types related to the -- text widget and how they work together.@@ -188,27 +188,26 @@   textViewPreeditChanged   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties           (newAttrFromStringProperty)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)-import Graphics.UI.Gtk.Gdk.EventM	(EventM, EKey)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)+import Graphics.UI.Gtk.Gdk.EventM       (EventM, EKey) import Control.Monad.Reader             ( ask ) import Control.Monad.Trans              ( liftIO ) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Multiline.Types#}-{#import Graphics.UI.Gtk.Multiline.TextIter#} {#import Graphics.UI.Gtk.Multiline.TextTag#}-import Graphics.UI.Gtk.General.Enums	(TextWindowType(..), DeleteType(..),-					 DirectionType(..), Justification(..),-					 MovementStep(..), WrapMode(..),+import Graphics.UI.Gtk.General.Enums    (TextWindowType(..), DeleteType(..),+                                         DirectionType(..), Justification(..),+                                         MovementStep(..), WrapMode(..),                                          ScrollStep (..))-import System.Glib.GList		(fromGList)-import Graphics.UI.Gtk.General.Structs	(Rectangle(..))+import System.Glib.GList                (fromGList)+import Graphics.UI.Gtk.General.Structs  (Rectangle(..))  {# context lib="gtk" prefix="gtk" #} @@ -309,7 +308,7 @@              -- vertical alignment of mark within visible area (if @Nothing@,              -- scroll just enough to get the iterator onscreen)  -> IO Bool  -- ^ returns @True@ if scrolling occurred-textViewScrollToIter self iter withinMargin align = +textViewScrollToIter self iter withinMargin align =   let (useAlign, xalign, yalign) = case align of         Nothing -> (False, 0, 0)         Just (xalign, yalign) -> (True, xalign, yalign)@@ -718,7 +717,7 @@     (fromIntegral xpos)     (fromIntegral ypos) --- | Move a child widget within the 'TextView'. This is really only apprpriate+-- | Move a child widget within the 'TextView'. This is really only appropriate -- for \"floating\" child widgets added using 'textViewAddChildInWindow'. -- textViewMoveChild :: (TextViewClass self, WidgetClass child) => self@@ -1046,7 +1045,7 @@ -- | Allow the 'TextView' input method to internally handle key press and release events. If this -- function returns 'True', then no further processing should be done for this key event. See -- 'imContextFilterKeypress'.--- +-- -- Note that you are expected to call this function from your handler when overriding key event -- handling. This is needed in the case when you need to insert your own key handling between the input -- method and the default key event handling of the 'TextView'.@@ -1062,7 +1061,7 @@       (castPtr ptr)  -- | Reset the input method context of the text view if needed.--- +-- -- This can be necessary in the case where modifying the buffer would confuse on-going input method -- behavior. --@@ -1121,13 +1120,13 @@   textViewSetEditable  -- | Which IM (input method) module should be used for this entry. See GtkIMContext.--- Setting this to a non-empty value overrides the system-wide IM module setting. +-- Setting this to a non-empty value overrides the system-wide IM module setting. -- See the GtkSettings "gtk-im-module" property. -- -- Default value: \"\" ---textViewImModule :: TextViewClass self => Attr self String-textViewImModule = +textViewImModule :: TextViewClass self => Attr self DefaultGlibString+textViewImModule =   newAttrFromStringProperty "im-module"  -- | Whether to wrap lines never, at word boundaries, or at character@@ -1229,7 +1228,7 @@  -- | Copying to the clipboard. ----- * This signal is emitted when a selection is copied to the clipboard. +-- * This signal is emitted when a selection is copied to the clipboard. -- -- * The action itself happens when the 'TextView' processes this --   signal.@@ -1265,8 +1264,8 @@ -- * The action itself happens when the 'TextView' processes this --   signal. ---insertAtCursor :: TextViewClass self => Signal self (String -> IO ())-insertAtCursor = Signal (connect_STRING__NONE "insert-at-cursor")+insertAtCursor :: (TextViewClass self, GlibString string) => Signal self (string -> IO ())+insertAtCursor = Signal (connect_GLIBSTRING__NONE "insert-at-cursor")  -- | Moving the cursor. --@@ -1279,11 +1278,11 @@ moveCursor :: TextViewClass self => Signal self (MovementStep -> Int -> Bool -> IO ()) moveCursor = Signal (connect_ENUM_INT_BOOL__NONE "move-cursor") --- | The 'moveViewport' signal is a keybinding signal which can be bound to key combinations --- to allow the user to move the viewport, i.e. +-- | The 'moveViewport' signal is a keybinding signal which can be bound to key combinations+-- to allow the user to move the viewport, i.e. -- change what part of the text view is visible in a containing scrolled window. -- There are no default bindings for this signal.--- +-- moveViewport :: TextViewClass self => Signal self (ScrollStep -> Int -> IO ()) moveViewport = Signal (connect_ENUM_INT__NONE "move-viewport") @@ -1310,7 +1309,7 @@  -- | Pasting from the clipboard. ----- * This signal is emitted when something is pasted from the clipboard. +-- * This signal is emitted when something is pasted from the clipboard. -- -- * The action itself happens when the 'TextView' processes this --   signal.@@ -1329,7 +1328,7 @@  -- | Inserting an anchor. ----- * This signal is emitted when anchor is inserted into the text. +-- * This signal is emitted when anchor is inserted into the text. -- -- * The action itself happens when the 'TextView' processes this --   signal.@@ -1342,14 +1341,14 @@ setAnchor :: TextViewClass self => Signal self (IO ()) setAnchor = Signal (connect_NONE__NONE "set-anchor") --- | The 'setTextViewScrollAdjustments' signal is a keybinding signal which +-- | The 'setTextViewScrollAdjustments' signal is a keybinding signal which -- gets emitted to toggle the visibility of the cursor. -- The default binding for this signal is F7. -- setTextViewScrollAdjustments :: TextViewClass self => Signal self (Adjustment -> Adjustment -> IO ()) setTextViewScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments") --- | The 'toggleCursorVisible' signal is a keybinding signal +-- | The 'toggleCursorVisible' signal is a keybinding signal -- which gets emitted to toggle the visibility of the cursor. -- The default binding for this signal is F7. --@@ -1359,7 +1358,7 @@ -- | Insert Overwrite mode has changed. -- -- * This signal is emitted when the 'TextView' changes from---   inserting mode to overwriting mode and vice versa. +--   inserting mode to overwriting mode and vice versa. -- -- * The action itself happens when the 'TextView' processes this --   signal.@@ -1369,8 +1368,8 @@  -- | If an input method is used, the typed text will not immediately be committed to the buffer. So if -- you are interested in the text, connect to this signal.--- +-- -- This signal is only emitted if the text at the given position is actually editable.-textViewPreeditChanged :: TextViewClass self => Signal self (String -> IO ())-textViewPreeditChanged = Signal (connect_STRING__NONE "preedit-changed")+textViewPreeditChanged :: (TextViewClass self, GlibString string) => Signal self (string -> IO ())+textViewPreeditChanged = Signal (connect_GLIBSTRING__NONE "preedit-changed") 
Graphics/UI/Gtk/Multiline/Types.chs view
@@ -32,7 +32,7 @@   ) where  import System.Glib.FFI-import Graphics.UI.Gtk.General.Structs	(textIterSize)+import Graphics.UI.Gtk.General.Structs  (textIterSize)  {# context lib="gtk" prefix="gtk" #} @@ -50,7 +50,7 @@       copyBytes iterPtr' iterPtr textIterSize   return (TextIter iter') --- | Interal marshaling util+-- | Internal marshaling util -- mkTextIterCopy :: Ptr TextIter -> IO TextIter mkTextIterCopy iterPtr = do
Graphics/UI/Gtk/Ornaments/Frame.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Ornaments.Frame ( -- * Detail--- +-- -- | The frame widget is a Bin that surrounds its child with a decorative -- frame and an optional label. If present, the label is drawn in a gap in the -- top side of the frame. The position of the label can be controlled with@@ -73,15 +73,15 @@   frameLabelWidget,   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(ShadowType(..))+import Graphics.UI.Gtk.General.Enums    (ShadowType(..))  {# context lib="gtk" prefix="gtk" #} @@ -104,8 +104,8 @@  -- | Sets the text of the label. ---frameSetLabel :: FrameClass self => self- -> String -- ^ @label@ - the text to use as the label of the frame+frameSetLabel :: (FrameClass self, GlibString string) => self+ -> string -- ^ @label@ - the text to use as the label of the frame  -> IO () frameSetLabel self label =   withUTFString label $ \labelPtr ->@@ -185,9 +185,9 @@ -- | If the frame's label widget is a 'Label', returns the text in the label -- widget. ---frameGetLabel :: FrameClass self => self- -> IO String -- ^ returns the text in the label, or if there was no label-              -- widget or the lable widget was not a 'Label' then an +frameGetLabel :: (FrameClass self, GlibString string) => self+ -> IO string -- ^ returns the text in the label, or if there was no label+              -- widget or the label widget was not a 'Label' then an               -- exception is thrown frameGetLabel self =   throwIfNull "frameGetLabel: the title of the frame was not a Label widget."@@ -200,7 +200,7 @@  -- | Text of the frame's label. ---frameLabel :: FrameClass self => Attr self String+frameLabel :: (FrameClass self, GlibString string) => Attr self string frameLabel = newAttr   frameGetLabel   frameSetLabel
Graphics/UI/Gtk/Ornaments/HSeparator.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Ornaments.HSeparator ( -- * Detail--- +-- -- | The 'HSeparator' widget is a horizontal separator, used to group the -- widgets within a window. It displays a horizontal line with a shadow to make -- it appear sunken into the interface.@@ -52,10 +52,10 @@   hSeparatorNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Ornaments/VSeparator.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Ornaments.VSeparator ( -- * Detail--- +-- -- | The 'VSeparator' widget is a vertical separator, used to group the -- widgets within a window. It displays a vertical line with a shadow to make -- it appear sunken into the interface.@@ -52,10 +52,10 @@   vSeparatorNew,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Printing/PageSetup.chs view
@@ -47,7 +47,7 @@ -- resulting page setup. -- -- Printing support was added in Gtk+ 2.10.---   +--  -- * Class Hierarchy --@@ -98,12 +98,11 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.GError import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Printing.PaperSize#} (PaperSize(..), mkPaperSize, Unit(..))@@ -128,8 +127,8 @@ -- -- * Available since Gtk+ version 2.12 ---pageSetupNewFromFile ::-    String -- ^ @fileName@ - the filename to read the page setup from+pageSetupNewFromFile :: GlibString string+ => string -- ^ @fileName@ - the filename to read the page setup from  -> IO PageSetup pageSetupNewFromFile fileName =   propagateGError $ \errorPtr ->@@ -137,7 +136,7 @@   setupPtr <- {# call gtk_page_setup_new_from_file #}              fileNamePtr              errorPtr-  wrapNewGObject mkPageSetup (return setupPtr) +  wrapNewGObject mkPageSetup (return setupPtr)  #endif @@ -350,8 +349,8 @@ -- -- * Available since Gtk+ version 2.14 ---pageSetupLoadFile :: PageSetupClass self => self- -> String  -- ^ @fileName@ - the filename to read the page setup from+pageSetupLoadFile :: (PageSetupClass self, GlibString string) => self+ -> string  -- ^ @fileName@ - the filename to read the page setup from  -> IO Bool -- ^ returns @True@ on success pageSetupLoadFile self fileName =   liftM toBool $@@ -369,8 +368,8 @@ -- -- * Available since Gtk+ version 2.12 ---pageSetupToFile :: PageSetupClass self => self- -> String  -- ^ @fileName@ - the file to save to+pageSetupToFile :: (PageSetupClass self, GlibString string) => self+ -> string  -- ^ @fileName@ - the file to save to  -> IO Bool -- ^ returns @True@ on success pageSetupToFile self fileName =   liftM toBool $
Graphics/UI/Gtk/Printing/PaperSize.chs view
@@ -75,12 +75,11 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.GList-{#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #} @@ -111,8 +110,8 @@ -- -- * Available since Gtk+ version 2.10 ---paperSizeNew ::-    Maybe String -- ^ @name@ - a paper size name, or 'Nothing'+paperSizeNew :: GlibString string+ => Maybe string -- ^ @name@ - a paper size name, or 'Nothing'  -> IO PaperSize paperSizeNew name =   maybeWith withUTFString name $ \namePtr ->@@ -128,9 +127,9 @@ -- -- * Available since Gtk+ version 2.10 ---paperSizeNewFromPpd ::-    String -- ^ @ppdName@ - a PPD paper name- -> String -- ^ @ppdDisplayName@ - the corresponding human-readable name+paperSizeNewFromPpd :: GlibString string+ => string -- ^ @ppdName@ - a PPD paper name+ -> string -- ^ @ppdDisplayName@ - the corresponding human-readable name  -> Double -- ^ @width@ - the paper width, in points  -> Double -- ^ @height@ - the paper height in points  -> IO PaperSize@@ -149,9 +148,9 @@ -- -- * Available since Gtk+ version 2.10 ---paperSizeNewCustom ::-    String -- ^ @name@ - the paper name- -> String -- ^ @displayName@ - the human-readable name+paperSizeNewCustom :: GlibString string+ => string -- ^ @name@ - the paper name+ -> string -- ^ @displayName@ - the human-readable name  -> Double -- ^ @width@ - the paper width, in units of @unit@  -> Double -- ^ @height@ - the paper height, in units of @unit@  -> Unit   -- ^ @unit@ - the unit for @width@ and @height@@@ -198,8 +197,8 @@ -- -- * Available since Gtk+ version 2.10 ---paperSizeGetName :: PaperSize- -> IO String -- ^ returns the name of @size@+paperSizeGetName :: GlibString string => PaperSize+ -> IO string -- ^ returns the name of @size@ paperSizeGetName self =   {# call gtk_paper_size_get_name #}     self@@ -209,8 +208,8 @@ -- -- * Available since Gtk+ version 2.10 ---paperSizeGetDisplayName :: PaperSize- -> IO String -- ^ returns the human-readable name of @size@+paperSizeGetDisplayName :: GlibString string => PaperSize+ -> IO string -- ^ returns the human-readable name of @size@ paperSizeGetDisplayName self =   {# call gtk_paper_size_get_display_name #}     self@@ -220,8 +219,8 @@ -- -- * Available since Gtk+ version 2.10 ---paperSizeGetPpdName :: PaperSize- -> IO (Maybe String)            -- ^ returns the PPD name of @size@, or 'Nothing'+paperSizeGetPpdName :: GlibString string => PaperSize+ -> IO (Maybe string)            -- ^ returns the PPD name of @size@, or 'Nothing' paperSizeGetPpdName self =   {# call gtk_paper_size_get_ppd_name #}     self@@ -337,8 +336,8 @@ -- -- * Available since Gtk+ version 2.10 ---paperSizeGetDefault ::-    IO String -- ^ returns the name of the default paper size.+paperSizeGetDefault :: GlibString string+ => IO string -- ^ returns the name of the default paper size. paperSizeGetDefault =   {# call gtk_paper_size_get_default #}   >>= peekUTFString
Graphics/UI/Gtk/Printing/PrintContext.chs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Widget PrintContext --@@ -74,10 +74,11 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import Data.IORef (newIORef)  import System.Glib.FFI+import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {#import Graphics.Rendering.Pango.Types#} {#import Graphics.Rendering.Pango.BasicTypes#}@@ -93,7 +94,7 @@ -- printContextGetCairoContext :: PrintContextClass self => self  -> IO Cairo -- ^ returns the cairo context of @context@-printContextGetCairoContext self = +printContextGetCairoContext self =   liftM Cairo $   {# call gtk_print_context_get_cairo_context #} (toPrintContext self) @@ -189,18 +190,18 @@   pl <- wrapNewGObject mkPangoLayoutRaw $     {# call gtk_print_context_create_pango_layout #}     (toPrintContext self)-  ps <- makeNewPangoString ""+  ps <- makeNewPangoString (""::DefaultGlibString)   psRef <- newIORef ps   return (PangoLayout psRef pl)  #if GTK_CHECK_VERSION(2,20,0) printContextGetHardMargins :: PrintContextClass self => self                            -> IO (Maybe (Double, Double, Double, Double))-                             -- ^ returns @(top, bottom, left, right)@ -                             -- @top@ top hardware printer margin             -                             -- @bottom@ bottom hardware printer margin             -                             -- @left@ left hardware printer margin             -                             -- @right@ right hardware printer margin             +                             -- ^ returns @(top, bottom, left, right)@+                             -- @top@ top hardware printer margin+                             -- @bottom@ bottom hardware printer margin+                             -- @left@ left hardware printer margin+                             -- @right@ right hardware printer margin printContextGetHardMargins self =   alloca $ \ topPtr ->   alloca $ \ bottomPtr ->
Graphics/UI/Gtk/Printing/PrintOperation.chs view
@@ -91,9 +91,18 @@ -- * Methods   printOperationSetAllowAsync,   printOperationGetError,+  printOperationSetJobName,+  printOperationSetNPages, #if GTK_CHECK_VERSION(2,18,0)   printOperationGetNPagesToPrint, #endif+  printOperationSetCurrentPage,+  printOperationSetUseFullPage,+  printOperationSetUnit,+  printOperationSetExportFilename,+  printOperationSetShowProgress,+  printOperationSetTrackPrintStatus,+  printOperationSetCustomTabLabel,   printOperationRun,   printOperationCancel, #if GTK_CHECK_VERSION(2,16,0)@@ -151,7 +160,7 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes@@ -228,8 +237,8 @@ -- If you don't set a job name, Gtk+ picks a default one by numbering -- successive print jobs. ---printOperationSetJobName :: PrintOperationClass self => self- -> String -- ^ @jobName@ - a string that identifies the print job+printOperationSetJobName :: (PrintOperationClass self, GlibString string) => self+ -> string -- ^ @jobName@ - a string that identifies the print job  -> IO () printOperationSetJobName self jobName =   withUTFString jobName $ \jobNamePtr ->@@ -240,9 +249,9 @@ -- | Sets the number of pages in the document. -- -- This /must/ be set to a positive number before the rendering starts. It--- may be set in a 'beginPrint' signal hander.+-- may be set in a 'beginPrint' signal handler. ----- Note that the page numbers passed to the 'requestPageSetup' +-- Note that the page numbers passed to the 'requestPageSetup' -- and 'drawPage' signals -- are 0-based, i.e. if the user chooses to print all pages, the last -- 'draw-page' signal will be for page @nPages@ - 1.@@ -318,15 +327,15 @@     ((fromIntegral . fromEnum) unit)  -- | Sets up the 'PrintOperation' to generate a file instead of showing the--- print dialog. The indended use of this function is for implementing \"Export+-- print dialog. The intended use of this function is for implementing \"Export -- to PDF\" actions. Currently, PDF is the only supported format. -- -- \"Print to PDF\" support is independent of this and is done by letting -- the user pick the \"Print to PDF\" item from the list of printers in the -- print dialog. ---printOperationSetExportFilename :: PrintOperationClass self => self- -> String -- ^ @filename@ - the filename for the exported file+printOperationSetExportFilename :: (PrintOperationClass self, GlibString string) => self+ -> string -- ^ @filename@ - the filename for the exported file  -> IO () printOperationSetExportFilename self filename =   withUTFString filename $ \filenamePtr ->@@ -363,8 +372,8 @@  -- | Sets the label for the tab holding custom widgets. ---printOperationSetCustomTabLabel :: PrintOperationClass self => self- -> String -- ^ @label@ - the label to use, or empty to use the default+printOperationSetCustomTabLabel :: (PrintOperationClass self, GlibString string) => self+ -> string -- ^ @label@ - the label to use, or empty to use the default            -- label  -> IO () printOperationSetCustomTabLabel self label =@@ -381,7 +390,7 @@ -- progress of the print operation. Furthermore, it may use a recursive -- mainloop to show the print dialog. ----- If you call 'printOperationSetAllowAsync' or set the 'allowAsync' +-- If you call 'printOperationSetAllowAsync' or set the 'allowAsync' -- property the operation will run asynchronously -- if this is supported on the platform. The 'done' signal will be emitted with the result of the operation when -- the it is done (i.e. when the dialog is canceled, or when the print succeeds@@ -464,8 +473,8 @@ -- Use 'printOperationGetStatus' to obtain a status value that is suitable -- for programmatic use. ---printOperationGetStatusString :: PrintOperationClass self => self- -> IO String -- ^ returns a string representation of the status of the print+printOperationGetStatusString :: (PrintOperationClass self, GlibString string) => self+ -> IO string -- ^ returns a string representation of the status of the print               -- operation printOperationGetStatusString self =   {# call gtk_print_operation_get_status_string #}@@ -490,15 +499,15 @@ -- | Runs a page setup dialog, letting the user modify the values from @pageSetup@. If the user cancels -- the dialog, the returned 'PageSetup' is identical to the passed in @pageSetup@, otherwise it -- contains the modifications done in the dialog.--- +-- -- Note that this function may use a recursive mainloop to show the page setup dialog. See -- 'printRunPageSetupDialogAsync' if this is a problem.-printRunPageSetupDialog :: (WindowClass window, PageSetupClass pageSetup, PrintSettingsClass setting) -                          => window -- ^ @parent@     transient parent. -                          -> pageSetup -- ^ @pageSetup@ an existing 'PageSetup'. -                          -> setting -- ^ @settings@   a 'PrintSettings'                    -                          -> IO PageSetup  -- ^ returns    a new 'PageSetup'                    -printRunPageSetupDialog window pageSetup setting = +printRunPageSetupDialog :: (WindowClass window, PageSetupClass pageSetup, PrintSettingsClass setting)+                          => window -- ^ @parent@     transient parent.+                          -> pageSetup -- ^ @pageSetup@ an existing 'PageSetup'.+                          -> setting -- ^ @settings@   a 'PrintSettings'+                          -> IO PageSetup  -- ^ returns    a new 'PageSetup'+printRunPageSetupDialog window pageSetup setting =   wrapNewGObject mkPageSetup $   {#call gtk_print_run_page_setup_dialog #}      (toWindow window)@@ -512,14 +521,14 @@   -> IO PageSetupDoneFunc  -- | Runs a page setup dialog, letting the user modify the values from @pageSetup@.--- +-- -- In contrast to 'printRunPageSetupDialog', this function returns after showing the page setup -- dialog on platforms that support this, and calls @doneCb@ from a signal handler for the 'response' -- signal of the dialog. printRunPageSetupDialogAsync :: (WindowClass window, PageSetupClass pageSetup, PrintSettingsClass setting)-                               => window -- ^ @parent@     transient parent. -                               -> pageSetup -- ^ @pageSetup@ an existing 'PageSetup'. -                               -> setting -- ^ @settings@   a 'PrintSettings'                    +                               => window -- ^ @parent@     transient parent.+                               -> pageSetup -- ^ @pageSetup@ an existing 'PageSetup'.+                               -> setting -- ^ @settings@   a 'PrintSettings'                                -> (PageSetup -> IO ()) -- ^ @doneCb@    a function to call when the user saves the modified page setup                                -> IO () printRunPageSetupDialogAsync window pageSetup setting doneCb = do@@ -534,20 +543,20 @@      nullPtr  -- | Ends a preview.--- +-- -- This function must be called to finish a custom print preview.-printOperationPreviewEndPreview :: PrintOperationPreviewClass self -                                  => self +printOperationPreviewEndPreview :: PrintOperationPreviewClass self+                                  => self                                   -> IO () printOperationPreviewEndPreview self =   {# call gtk_print_operation_preview_end_preview #}     (toPrintOperationPreview self)  -- | Returns whether the given page is included in the set of pages that have been selected for printing.-printOperationPreviewIsSelected :: PrintOperationPreviewClass self -                                  => self  -- ^ @preview@ a 'PrintOperationPreview'                      -                                  -> Int  -- ^ @pageNr@ a page number                                   -                                  -> IO Bool -- ^ returns 'True' if the page has been selected for printing +printOperationPreviewIsSelected :: PrintOperationPreviewClass self+                                  => self  -- ^ @preview@ a 'PrintOperationPreview'+                                  -> Int  -- ^ @pageNr@ a page number+                                  -> IO Bool -- ^ returns 'True' if the page has been selected for printing printOperationPreviewIsSelected self pageNr =   liftM toBool $   {# call gtk_print_operation_preview_is_selected #}@@ -556,14 +565,14 @@  -- | Renders a page to the preview, using the print context that was passed to the "preview" handler -- together with preview.--- +-- -- A custom iprint preview should use this function in its 'expose' handler to render the currently -- selected page.--- +-- -- Note that this function requires a suitable cairo context to be associated with the print context.-printOperationPreviewRenderPage :: PrintOperationPreviewClass self -                                  => self  -- ^ @preview@ a 'PrintOperationPreview' -                                  -> Int  -- ^ @pageNr@ the page to render         +printOperationPreviewRenderPage :: PrintOperationPreviewClass self+                                  => self  -- ^ @preview@ a 'PrintOperationPreview'+                                  -> Int  -- ^ @pageNr@ the page to render                                   -> IO () printOperationPreviewRenderPage self pageNr =   {# call gtk_print_operation_preview_render_page #}@@ -574,63 +583,63 @@ -- Attributes  -- | The 'PageSetup' used by default.--- +-- -- This page setup will be used by 'printOperationRun', but it can be overridden on a per-page -- basis by connecting to the 'requestPageSetup' signal.--- +-- -- Since 2.10 printOperationDefaultPageSetup :: (PrintOperationClass self, PageSetupClass pageSetup) => ReadWriteAttr self PageSetup pageSetup printOperationDefaultPageSetup = newAttrFromObjectProperty "default-page-setup"                                    {# call pure unsafe gtk_page_setup_get_type #}  -- | The 'PrintSettings' used for initializing the dialog.--- +-- -- Setting this property is typically used to re-establish print settings from a previous print -- operation, see 'printOperationRun'.--- +-- -- Since 2.10 printOperationPrintSettings :: (PrintOperationClass self, PrintSettingsClass printSettings) => ReadWriteAttr self PrintSettings printSettings printOperationPrintSettings = newAttrFromObjectProperty "print-settings"                                 {# call pure unsafe gtk_print_settings_get_type #}  -- | A string used to identify the job (e.g. in monitoring applications like eggcups).--- +-- -- If you don't set a job name, GTK+ picks a default one by numbering successive print jobs.--- +-- -- Default value: \"\"--- +-- -- Since 2.10-printOperationJobName :: PrintOperationClass self => Attr self String+printOperationJobName :: (PrintOperationClass self, GlibString string) => Attr self string printOperationJobName = newAttrFromStringProperty "job-name"  -- | The number of pages in the document.--- +-- -- This must be set to a positive number before the rendering starts. It may be set in a 'beginPrint'--- signal hander.--- +-- signal handler.+-- -- Note that the page numbers passed to the 'requestPageSetup' and 'drawPage' signals are 0-based, -- i.e. if the user chooses to print all pages, the last 'drawPage' signal will be for page @nPages@ - -- 1.--- +-- -- Allowed values: >= 'GMaxulong'--- +-- -- Default value: -1--- +-- -- Since 2.10 printOperationNPages :: PrintOperationClass self => Attr self Int printOperationNPages = newAttrFromIntProperty "n-pages"  -- | The current page in the document.--- +-- -- If this is set before 'printOperationRun', the user will be able to select to print only the -- current page.--- +-- -- Note that this only makes sense for pre-paginated documents.--- +-- -- Allowed values: >= 'GMaxulong'--- +-- -- Default value: -1--- +-- -- Since 2.10 printOperationCurrentPage :: PrintOperationClass self => Attr self Int printOperationCurrentPage = newAttrFromIntProperty "current-page"@@ -639,9 +648,9 @@ -- the top left corner of the page (which may not be the top left corner of the sheet, depending on -- page orientation and the number of pages per sheet). Otherwise, the origin is at the top left corner -- of the imageable area (i.e. inside the margins).--- +-- -- Default value: 'False'--- +-- -- Since 2.10 printOperationUseFullPage :: PrintOperationClass self => Attr self Bool printOperationUseFullPage = newAttrFromBoolProperty "use-full-page"@@ -650,66 +659,66 @@ -- printer queues and printer. This can allow your application to show things like "out of paper" -- issues, and when the print job actually reaches the printer. However, this is often implemented -- using polling, and should not be enabled unless needed.--- +-- -- Default value: 'False'--- +-- -- Since 2.10 printOperationTrackPrintStatus :: PrintOperationClass self => Attr self Bool printOperationTrackPrintStatus = newAttrFromBoolProperty "track-print-status"  -- | The transformation for the cairo context obtained from 'PrintContext' is set up in such a way that -- distances are measured in units of unit.--- +-- -- Default value: ''UnitPixel''--- +-- -- Since 2.10--- +-- printOperationUnit :: PrintOperationClass self => Attr self Unit printOperationUnit = newAttrFromEnumProperty "unit"                        {# call pure unsafe gtk_unit_get_type #}  -- | Determines whether to show a progress dialog during the print operation.--- +-- -- Default value: 'False'--- +-- -- Since 2.10 printOperationShowProgress :: PrintOperationClass self => Attr self Bool printOperationShowProgress = newAttrFromBoolProperty "show-progress"  -- | Determines whether the print operation may run asynchronously or not.--- +-- -- Some systems don't support asynchronous printing, but those that do will return -- ''PrintOperationResultInProgress'' as the status, and emit the "done" signal when the operation -- is actually done.--- +-- -- The Windows port does not support asynchronous operation at all (this is unlikely to change). On -- other platforms, all actions except for ''PrintOperationActionExport'' support asynchronous -- operation.--- +-- -- Default value: 'False'--- +-- -- Since 2.10 printOperationAllowAsync :: PrintOperationClass self => Attr self Bool printOperationAllowAsync = newAttrFromBoolProperty "allow-async"  -- | The name of a file to generate instead of showing the print dialog. Currently, PDF is the only -- supported format.--- +-- -- The intended use of this property is for implementing "Export to PDF" actions.--- +-- -- "Print to PDF" support is independent of this and is done by letting the user pick the "Print to -- PDF" item from the list of printers in the print dialog.--- +-- -- Default value: 'Nothing'--- +-- -- Since 2.10-printOperationExportFilename :: PrintOperationClass self => Attr self String+printOperationExportFilename :: (PrintOperationClass self, GlibString string) => Attr self string printOperationExportFilename = newAttrFromStringProperty "export-filename"  -- | The status of the print operation.--- +-- -- Default value: ''PrintStatusInitial''--- +-- -- Since 2.10 printOperationStatus :: PrintOperationClass self => ReadAttr self PrintStatus printOperationStatus = readAttrFromEnumProperty "status"@@ -717,65 +726,65 @@  -- | A string representation of the status of the print operation. The string is translated and suitable -- for displaying the print status e.g.  in a 'Statusbar'.--- +-- -- See the 'printOperationStatus' property for a status value that is suitable for programmatic use.--- +-- -- Default value: \"\"--- +-- -- Since 2.10-printOperationStatusString :: PrintOperationClass self => ReadAttr self String+printOperationStatusString :: (PrintOperationClass self, GlibString string) => ReadAttr self string printOperationStatusString = readAttrFromStringProperty "status-string"  -- | Used as the label of the tab containing custom widgets. Note that this property may be ignored on -- some platforms.--- +-- -- If this is 'Nothing', GTK+ uses a default label.--- +-- -- Default value: 'Nothing'--- +-- -- Since 2.10-printOperationCustomTabLabel :: PrintOperationClass self => Attr self String+printOperationCustomTabLabel :: (PrintOperationClass self, GlibString string) => Attr self string printOperationCustomTabLabel = newAttrFromStringProperty "custom-tab-label"  #if GTK_CHECK_VERSION(2,18,0) -- | If 'True', the print operation will support print of selection. This allows the print dialog to show a -- "Selection" button.--- +-- -- Default value: 'False'--- +-- -- Since 2.18 printOperationSupportSelection :: PrintOperationClass self => Attr self Bool printOperationSupportSelection = newAttrFromBoolProperty "support-selection"  -- | Determines whether there is a selection in your application. This can allow your application to -- print the selection. This is typically used to make a "Selection" button sensitive.--- +-- -- Default value: 'False'--- +-- -- Since 2.18 printOperationHasSelection :: PrintOperationClass self => Attr self Bool printOperationHasSelection = newAttrFromBoolProperty "has-selection"  -- | If 'True', page size combo box and orientation combo box are embedded into page setup page.--- +-- -- Default value: 'False'--- +-- -- Since 2.18 printOperationEmbedPageSetup :: PrintOperationClass self => Attr self Bool printOperationEmbedPageSetup = newAttrFromBoolProperty "embed-page-setup"  -- | The number of pages that will be printed.--- +-- -- Note that this value is set during print preparation phase (''PrintStatusPreparing''), so this -- value should never be get before the data generation phase (''PrintStatusGeneratingData''). You -- can connect to the 'statusChanged' signal and call 'printOperationGetNPagesToPrint' when -- print status is ''PrintStatusGeneratingData''. This is typically used to track the progress of -- print operation.--- +-- -- Allowed values: >= 'GMaxulong'--- +-- -- Default value: -1--- +-- -- Since 2.18 printOperationNPagesToPrint :: PrintOperationClass self => ReadAttr self Int printOperationNPagesToPrint = readAttrFromIntProperty "n-pages-to-print"@@ -921,13 +930,13 @@ printOptPreview = Signal (connect_OBJECT_OBJECT_OBJECT__BOOL "preview")  -- | The 'ready' signal gets emitted once per preview operation, before the first page is rendered.--- +-- -- A handler for this signal can be used for setup tasks. printOptReady :: PrintOperationPreviewClass self => Signal self (PrintContext -> IO ()) printOptReady = Signal (connect_OBJECT__NONE "ready")  -- | The 'gotPageSize' signal is emitted once for each page that gets rendered to the preview.--- +-- -- A handler for this signal should update the context according to @pageSetup@ and set up a suitable -- cairo context, using 'printContextSetCairoContext'. printOptGotPageSize :: PrintOperationPreviewClass self => Signal self (PrintContext -> PageSetup -> IO ())
Graphics/UI/Gtk/Printing/PrintSettings.chs view
@@ -114,7 +114,7 @@ #endif  -- * Attributes-  printSettingsPrinter,  +  printSettingsPrinter,   printSettingsOrientation,   printSettingsPaperSize,   printSettingsUseColor,@@ -142,11 +142,10 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString import System.Glib.GError {#import Graphics.UI.Gtk.Types#}@@ -190,13 +189,13 @@ -- -- * Available since Gtk+ version 2.12 ---printSettingsNewFromFile ::-    String -- ^ @fileName@ - the filename to read the settings from+printSettingsNewFromFile :: GlibFilePath fp+ => fp -- ^ @fileName@ - the filename to read the settings from  -> IO PrintSettings printSettingsNewFromFile fileName =   wrapNewGObject mkPrintSettings $   propagateGError $ \errorPtr ->-  withUTFString fileName $ \fileNamePtr -> +  withUTFFilePath fileName $ \fileNamePtr ->   {# call gtk_print_settings_new_from_file #}         fileNamePtr         errorPtr@@ -217,8 +216,8 @@  -- | Returns @True@, if a value is associated with @key@. ---printSettingsHasKey :: PrintSettingsClass self => self- -> String  -- ^ @key@ - a key+printSettingsHasKey :: (PrintSettingsClass self, GlibString string) => self+ -> string  -- ^ @key@ - a key  -> IO Bool -- ^ returns @True@, if @key@ has a value printSettingsHasKey self key =   liftM toBool $@@ -229,9 +228,9 @@  -- | Looks up the string value associated with @key@. ---printSettingsGet :: PrintSettingsClass self => self- -> String    -- ^ @key@ - a key- -> IO String -- ^ returns the string value for @key@+printSettingsGet :: (PrintSettingsClass self, GlibString string) => self+ -> string    -- ^ @key@ - a key+ -> IO string -- ^ returns the string value for @key@ printSettingsGet self key =   withUTFString key $ \keyPtr ->   {# call gtk_print_settings_get #}@@ -241,9 +240,9 @@  -- | Associates @value@ with @key@. ---printSettingsSet :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key- -> String -- ^ @value@ - a string value+printSettingsSet :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key+ -> string -- ^ @value@ - a string value  -> IO () printSettingsSet self key value =   withUTFString value $ \valuePtr ->@@ -255,8 +254,8 @@  -- | Removes any value associated with @key@ ---printSettingsUnset :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key+printSettingsUnset :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key  -> IO () printSettingsUnset self key =   withUTFString key $ \keyPtr ->@@ -280,17 +279,17 @@  {#pointer PrintSettingsFunc#} -foreign import ccall "wrapper" mkPrintSettingsFunc :: +foreign import ccall "wrapper" mkPrintSettingsFunc ::   (CString -> CString -> Ptr () -> IO ())-  -> IO PrintSettingsFunc +  -> IO PrintSettingsFunc  -- | Returns the boolean represented by the value that is associated with -- @key@. -- -- The string \"true\" represents @True@, any other string @False@. ---printSettingsGetBool :: PrintSettingsClass self => self- -> String  -- ^ @key@ - a key+printSettingsGetBool :: (PrintSettingsClass self, GlibString string) => self+ -> string  -- ^ @key@ - a key  -> IO Bool -- ^ returns @True@, if @key@ maps to a true value. printSettingsGetBool self key =   liftM toBool $@@ -301,8 +300,8 @@  -- | Sets @key@ to a boolean value. ---printSettingsSetBool :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key+printSettingsSetBool :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key  -> Bool   -- ^ @value@ - a boolean  -> IO () printSettingsSetBool self key value =@@ -314,8 +313,8 @@  -- | Returns the double value associated with @key@, or 0. ---printSettingsGetDouble :: PrintSettingsClass self => self- -> String    -- ^ @key@ - a key+printSettingsGetDouble :: (PrintSettingsClass self, GlibString string) => self+ -> string    -- ^ @key@ - a key  -> IO Double -- ^ returns the double value of @key@ printSettingsGetDouble self key =   liftM realToFrac $@@ -330,8 +329,8 @@ -- -- Floating point numbers are parsed with 'gAsciiStrtod'. ---printSettingsGetDoubleWithDefault :: PrintSettingsClass self => self- -> String    -- ^ @key@ - a key+printSettingsGetDoubleWithDefault :: (PrintSettingsClass self, GlibString string) => self+ -> string    -- ^ @key@ - a key  -> Double    -- ^ @def@ - the default value  -> IO Double -- ^ returns the floating point number associated with @key@ printSettingsGetDoubleWithDefault self key def =@@ -344,8 +343,8 @@  -- | Sets @key@ to a double value. ---printSettingsSetDouble :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key+printSettingsSetDouble :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key  -> Double -- ^ @value@ - a double value  -> IO () printSettingsSetDouble self key value =@@ -358,8 +357,8 @@ -- | Returns the value associated with @key@, interpreted as a length. The -- returned value is converted to @units@. ---printSettingsGetLength :: PrintSettingsClass self => self- -> String    -- ^ @key@ - a key+printSettingsGetLength :: (PrintSettingsClass self, GlibString string) => self+ -> string    -- ^ @key@ - a key  -> Unit      -- ^ @unit@ - the unit of the return value  -> IO Double -- ^ returns the length value of @key@, converted to @unit@ printSettingsGetLength self key unit =@@ -372,8 +371,8 @@  -- | Associates a length in units of @unit@ with @key@. ---printSettingsSetLength :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key+printSettingsSetLength :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key  -> Double -- ^ @value@ - a length  -> Unit   -- ^ @unit@ - the unit of @length@  -> IO ()@@ -387,8 +386,8 @@  -- | Returns the integer value of @key@, or 0. ---printSettingsGetInt :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key+printSettingsGetInt :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key  -> IO Int -- ^ returns the integer value of @key@ printSettingsGetInt self key =   liftM fromIntegral $@@ -400,8 +399,8 @@ -- | Returns the value of @key@, interpreted as an integer, or the default -- value. ---printSettingsGetIntWithDefault :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key+printSettingsGetIntWithDefault :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key  -> Int    -- ^ @def@ - the default value  -> IO Int -- ^ returns the integer value of @key@ printSettingsGetIntWithDefault self key def =@@ -414,8 +413,8 @@  -- | Sets @key@ to an integer value. ---printSettingsSetInt :: PrintSettingsClass self => self- -> String -- ^ @key@ - a key+printSettingsSetInt :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @key@ - a key  -> Int    -- ^ @value@ - an integer  -> IO () printSettingsSetInt self key value =@@ -426,16 +425,16 @@     (fromIntegral value)  -- | Convenience function to obtain the value of ''PrintSettingsPrinter''.-printSettingsGetPrinter :: PrintSettingsClass self => self- -> IO String -- ^ returns the printer name+printSettingsGetPrinter :: (PrintSettingsClass self, GlibString string) => self+ -> IO string -- ^ returns the printer name printSettingsGetPrinter self =   {# call gtk_print_settings_get_printer #}     (toPrintSettings self)   >>= peekUTFString  -- | Convenience function to obtain the value of ''PrintSettingsPrinter''.-printSettingsSetPrinter :: PrintSettingsClass self => self- -> String -- ^ @printer@ - the printer name+printSettingsSetPrinter :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @printer@ - the printer name  -> IO () printSettingsSetPrinter self printer =   withUTFString printer $ \printerPtr ->@@ -463,7 +462,7 @@ -- | Gets the value of 'PrintSettingsPaperFormat', converted to a 'PaperSize'. printSettingsGetPaperSize :: PrintSettingsClass self => self  -> IO PaperSize -- ^ returns the paper size-printSettingsGetPaperSize self = +printSettingsGetPaperSize self =   {# call gtk_print_settings_get_paper_size #}             (toPrintSettings self)   >>= mkPaperSize . castPtr@@ -773,7 +772,7 @@ -- | Gets the value of 'PrintSettingsPageRanges'. -- -- printSettingsGetPageRanges :: PrintSettingsClass self => self---  -> IO [PageRange]               -- ^ returns an array of 'PageRange'. +--  -> IO [PageRange]               -- ^ returns an array of 'PageRange'. -- printSettingsGetPageRanges self = --   alloca $ \numRangesPtr -> do --   rangeListPtr <- {# call gtk_print_settings_get_page_ranges #}@@ -791,8 +790,8 @@ --  -> [PageRange]                  -- ^ @pageRanges@ - an array of 'PageRange' --  -> IO () -- printSettingsSetPageRanges self rangeList =---   withArrayLen (concatMap (\(PageRange x y) -> [fromIntegral x, fromIntegral y]) rangeList) ---       $ \rangeLen rangeListPtr -> +--   withArrayLen (concatMap (\(PageRange x y) -> [fromIntegral x, fromIntegral y]) rangeList)+--       $ \rangeLen rangeListPtr -> --           {# call gtk_print_settings_set_page_ranges #} --              (toPrintSettings self) --              (castPtr rangeListPtr)@@ -816,16 +815,16 @@     ((fromIntegral . fromEnum) pageSet)  -- | Gets the value of 'PrintSettingsDefaultSource'.-printSettingsGetDefaultSource :: PrintSettingsClass self => self- -> IO String -- ^ returns the default source+printSettingsGetDefaultSource :: (PrintSettingsClass self, GlibString string) => self+ -> IO string -- ^ returns the default source printSettingsGetDefaultSource self =   {# call gtk_print_settings_get_default_source #}     (toPrintSettings self)   >>= peekUTFString  -- | Sets the value of 'PrintSettingsDefaultSource'.-printSettingsSetDefaultSource :: PrintSettingsClass self => self- -> String -- ^ @defaultSource@ - the default source+printSettingsSetDefaultSource :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @defaultSource@ - the default source  -> IO () printSettingsSetDefaultSource self defaultSource =   withUTFString defaultSource $ \defaultSourcePtr ->@@ -834,16 +833,16 @@     defaultSourcePtr  -- | Gets the value of 'PrintSettingsMediaType'.-printSettingsGetMediaType :: PrintSettingsClass self => self- -> IO String -- ^ returns the media type+printSettingsGetMediaType :: (PrintSettingsClass self, GlibString string) => self+ -> IO string -- ^ returns the media type printSettingsGetMediaType self =   {# call gtk_print_settings_get_media_type #}     (toPrintSettings self)   >>= peekUTFString  -- | Sets the value of 'PrintSettingsMediaType'.-printSettingsSetMediaType :: PrintSettingsClass self => self- -> String -- ^ @mediaType@ - the media type+printSettingsSetMediaType :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @mediaType@ - the media type  -> IO () printSettingsSetMediaType self mediaType =   withUTFString mediaType $ \mediaTypePtr ->@@ -852,16 +851,16 @@     mediaTypePtr  -- | Gets the value of 'PrintSettingsDither'.-printSettingsGetDither :: PrintSettingsClass self => self- -> IO String -- ^ returns the dithering that is used+printSettingsGetDither :: (PrintSettingsClass self, GlibString string) => self+ -> IO string -- ^ returns the dithering that is used printSettingsGetDither self =   {# call gtk_print_settings_get_dither #}     (toPrintSettings self)   >>= peekUTFString  -- | Sets the value of 'PrintSettingsDither'.-printSettingsSetDither :: PrintSettingsClass self => self- -> String -- ^ @dither@ - the dithering that is used+printSettingsSetDither :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @dither@ - the dithering that is used  -> IO () printSettingsSetDither self dither =   withUTFString dither $ \ditherPtr ->@@ -870,16 +869,16 @@     ditherPtr  -- | Gets the value of 'PrintSettingsFinishings'.-printSettingsGetFinishings :: PrintSettingsClass self => self- -> IO String -- ^ returns the finishings+printSettingsGetFinishings :: (PrintSettingsClass self, GlibString string) => self+ -> IO string -- ^ returns the finishings printSettingsGetFinishings self =   {# call gtk_print_settings_get_finishings #}     (toPrintSettings self)   >>= peekUTFString  -- | Sets the value of 'PrintSettingsFinishings'.-printSettingsSetFinishings :: PrintSettingsClass self => self- -> String -- ^ @finishings@ - the finishings+printSettingsSetFinishings :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @finishings@ - the finishings  -> IO () printSettingsSetFinishings self finishings =   withUTFString finishings $ \finishingsPtr ->@@ -888,16 +887,16 @@     finishingsPtr  -- | Gets the value of 'PrintSettingsOutputBin'.-printSettingsGetOutputBin :: PrintSettingsClass self => self- -> IO String -- ^ returns the output bin+printSettingsGetOutputBin :: (PrintSettingsClass self, GlibString string) => self+ -> IO string -- ^ returns the output bin printSettingsGetOutputBin self =   {# call gtk_print_settings_get_output_bin #}     (toPrintSettings self)   >>= peekUTFString  -- | Sets the value of 'PrintSettingsOutputBin'.-printSettingsSetOutputBin :: PrintSettingsClass self => self- -> String -- ^ @outputBin@ - the output bin+printSettingsSetOutputBin :: (PrintSettingsClass self, GlibString string) => self+ -> string -- ^ @outputBin@ - the output bin  -> IO () printSettingsSetOutputBin self outputBin =   withUTFString outputBin $ \outputBinPtr ->@@ -911,8 +910,8 @@ -- -- * Available since Gtk+ version 2.14 ---printSettingsLoadFile :: PrintSettingsClass self => self- -> String  -- ^ @fileName@ - the filename to read the settings from+printSettingsLoadFile :: (PrintSettingsClass self, GlibString string) => self+ -> string  -- ^ @fileName@ - the filename to read the settings from  -> IO Bool -- ^ returns @True@ on success printSettingsLoadFile self fileName =   liftM toBool $@@ -930,8 +929,8 @@ -- -- * Available since Gtk+ version 2.12 ---printSettingsToFile :: PrintSettingsClass self => self- -> String  -- ^ @fileName@ - the file to save to+printSettingsToFile :: (PrintSettingsClass self, GlibString string) => self+ -> string  -- ^ @fileName@ - the file to save to  -> IO Bool -- ^ returns @True@ on success printSettingsToFile self fileName =   liftM toBool $@@ -944,7 +943,7 @@ #endif  -- | Obtain the value of 'PrintSettingsPrinter'.-printSettingsPrinter :: PrintSettingsClass self => Attr self String+printSettingsPrinter :: (PrintSettingsClass self, GlibString string) => Attr self string printSettingsPrinter = newAttr   printSettingsGetPrinter   printSettingsSetPrinter@@ -1028,31 +1027,31 @@   printSettingsSetPageSet  -- | The value of 'PrintSettingsDefaultSource'.-printSettingsDefaultSource :: PrintSettingsClass self => Attr self String+printSettingsDefaultSource :: (PrintSettingsClass self, GlibString string) => Attr self string printSettingsDefaultSource = newAttr   printSettingsGetDefaultSource   printSettingsSetDefaultSource  -- | The value of 'PrintSettingsMediaType'.-printSettingsMediaType :: PrintSettingsClass self => Attr self String+printSettingsMediaType :: (PrintSettingsClass self, GlibString string) => Attr self string printSettingsMediaType = newAttr   printSettingsGetMediaType   printSettingsSetMediaType  -- | The value of 'PrintSettingsDither'.-printSettingsDither :: PrintSettingsClass self => Attr self String+printSettingsDither :: (PrintSettingsClass self, GlibString string) => Attr self string printSettingsDither = newAttr   printSettingsGetDither   printSettingsSetDither  -- | The value of 'PrintSettingsFinishings'.-printSettingsFinishings :: PrintSettingsClass self => Attr self String+printSettingsFinishings :: (PrintSettingsClass self, GlibString string) => Attr self string printSettingsFinishings = newAttr   printSettingsGetFinishings   printSettingsSetFinishings  -- | The value of 'PrintSettingsOutputBin'.-printSettingsOutputBin :: PrintSettingsClass self => Attr self String+printSettingsOutputBin :: (PrintSettingsClass self, GlibString string) => Attr self string printSettingsOutputBin = newAttr   printSettingsGetOutputBin   printSettingsSetOutputBin
Graphics/UI/Gtk/Recent/RecentChooser.chs view
@@ -89,29 +89,29 @@ #endif   ) where -import Control.Monad	(liftM)+#if GTK_CHECK_VERSION(2,10,0) +import Control.Monad    (liftM)+ import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties import System.Glib.GList-import System.Glib.GObject        (Quark, quarkFromString)-import System.Glib.GError   (GErrorDomain, GErrorClass(..), propagateGError, checkGError)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import System.Glib.GError   (checkGError)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Recent.RecentInfo#} (RecentInfo, mkRecentInfo) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}  {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0) -------------------- -- Enums -- | These identify the various errors that can occur while calling 'RecentChooser' functions. {#enum RecentChooserError {underscoreToCase} deriving (Bounded,Eq,Show)#} --- | Used to specify the sorting method to be applyed to the recently used resource list.+-- | Used to specify the sorting method to be applied to the recently used resource list. {#enum RecentSortType {underscoreToCase} deriving (Bounded,Eq,Show)#}  --------------------@@ -155,8 +155,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentChooserSetCurrentURI :: RecentChooserClass self => self- -> String  -- ^ @uri@ - a URI+recentChooserSetCurrentURI :: (RecentChooserClass self, GlibString string) => self+ -> string  -- ^ @uri@ - a URI  -> IO Bool -- ^ returns @True@ if the URI was found. recentChooserSetCurrentURI self uri =   checkGError ( \errorPtr ->@@ -173,8 +173,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentChooserGetCurrentURI :: RecentChooserClass self => self- -> IO String -- ^ returns a newly string holding a URI.+recentChooserGetCurrentURI :: (RecentChooserClass self, GlibString string) => self+ -> IO string -- ^ returns a newly string holding a URI. recentChooserGetCurrentURI self =   {# call gtk_recent_chooser_get_current_uri #}     (toRecentChooser self)@@ -199,8 +199,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentChooserSelectURI :: RecentChooserClass self => self- -> String  -- ^ @uri@ - a URI+recentChooserSelectURI :: (RecentChooserClass self, GlibString string) => self+ -> string  -- ^ @uri@ - a URI  -> IO Bool -- ^ returns @True@ if @uri@ was found. recentChooserSelectURI self uri =   checkGError ( \errorPtr ->@@ -217,8 +217,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentChooserUnselectURI :: RecentChooserClass self => self- -> String -- ^ @uri@ - a URI+recentChooserUnselectURI :: (RecentChooserClass self, GlibString string) => self+ -> string -- ^ @uri@ - a URI  -> IO () recentChooserUnselectURI self uri =   withUTFString uri $ \uriPtr ->@@ -253,7 +253,7 @@ -- \"limit\" properties of @chooser@. -- recentChooserGetItems :: RecentChooserClass self => self- -> IO [RecentInfo] -- ^ returns A list of 'RecentInfo' objects. + -> IO [RecentInfo] -- ^ returns A list of 'RecentInfo' objects. recentChooserGetItems self = do   glist <- {# call gtk_recent_chooser_get_items #} (toRecentChooser self)   list <- fromGList glist@@ -267,9 +267,9 @@ -- -- * Available since Gtk+ version 2.10 ---recentChooserGetURIs :: RecentChooserClass self => self- -> IO [String]-recentChooserGetURIs self = +recentChooserGetURIs :: (RecentChooserClass self, GlibString string) => self+ -> IO [string]+recentChooserGetURIs self =   alloca $ \lengthPtr -> do   str <- {# call gtk_recent_chooser_get_uris #}           (toRecentChooser self)@@ -321,7 +321,7 @@ -- Attributes  -- | Whether the private items should be displayed.--- +-- -- Default value: 'False' -- -- * Available since Gtk+ version 2.10@@ -331,20 +331,20 @@  -- | Whether this 'RecentChooser' should display a tooltip containing the full path of the recently used -- resources.--- +-- -- Default value: 'False'---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserShowTips :: RecentChooserClass self => Attr self Bool recentChooserShowTips = newAttrFromBoolProperty "show-tips"  -- | Whether this 'RecentChooser' should display an icon near the item.--- +-- -- Default value: 'True'---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserShowIcons :: RecentChooserClass self => Attr self Bool@@ -353,30 +353,30 @@ -- | Whether this 'RecentChooser' should display the recently used resources even if not present -- anymore. Setting this to 'False' will perform a potentially expensive check on every local resource -- (every remote resource will always be displayed).--- +-- -- Default value: 'True'---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserShowNotFound :: RecentChooserClass self => Attr self Bool recentChooserShowNotFound = newAttrFromBoolProperty "show-not-found"  -- | Allow the user to select multiple resources.--- +-- -- Default value: 'False'---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserSelectMultiple :: RecentChooserClass self => Attr self Bool recentChooserSelectMultiple = newAttrFromBoolProperty "select-multiple"  -- | Whether this 'RecentChooser' should display only local (file:) resources.--- +-- -- Default value: 'True'---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserLocalOnly :: RecentChooserClass self => Attr self Bool@@ -385,22 +385,22 @@ -- | The maximum number of recently used resources to be displayed, or -1 to display all items. By -- default, the 'Setting':gtk-recent-files-limit setting is respected: you can override that limit on -- a particular instance of 'RecentChooser' by setting this property.--- +-- -- Allowed values: >= 'GMaxulong'--- +-- -- Default value: -1---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserLimit :: RecentChooserClass self => Attr self Int recentChooserLimit = newAttrFromIntProperty "limit"  -- | Sorting order to be used when displaying the recently used resources.--- +-- -- Default value: ''RecentSortNone''---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserSortType :: RecentChooserClass self => Attr self RecentSortType@@ -408,8 +408,8 @@                           {# call pure unsafe gtk_recent_sort_type_get_type #}  -- | The 'RecentFilter' object to be used when displaying the recently used resources.---  --+-- -- * Available since Gtk+ version 2.10 -- recentChooserFilter :: (RecentChooserClass self, RecentFilterClass recentFilter) => ReadWriteAttr self RecentFilter recentFilter@@ -421,7 +421,7 @@  -- | This signal is emitted when there is a change in the set of selected -- recently used resources. This can happen when a user modifies the selection--- with the mouse or the keyboard, or when explicitely calling functions to+-- with the mouse or the keyboard, or when explicitly calling functions to -- change the selection. -- --
Graphics/UI/Gtk/Recent/RecentChooserMenu.chs view
@@ -79,12 +79,12 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -126,9 +126,9 @@ -- -- * Available since Gtk+ version 2.10 ---recentChooserMenuNewForManager :: RecentManagerClass manager +recentChooserMenuNewForManager :: RecentManagerClass manager                                => manager -- ^ @manager@ - a 'RecentManager'-                               -> IO RecentChooserMenu -- ^ returns a new 'RecentChooserMenu', bound to manager. +                               -> IO RecentChooserMenu -- ^ returns a new 'RecentChooserMenu', bound to manager. recentChooserMenuNewForManager manager =   makeNewObject mkRecentChooserMenu $   liftM (castPtr :: Ptr Widget -> Ptr RecentChooserMenu) $@@ -139,7 +139,7 @@ -- 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
Graphics/UI/Gtk/Recent/RecentChooserWidget.chs view
@@ -67,18 +67,16 @@ #endif   ) where -import Control.Monad	(liftM)+#if GTK_CHECK_VERSION(2,10,0) +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)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)  {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0)- -------------------- -- Constructors @@ -96,9 +94,9 @@ -- 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 +recentChooserWidgetNewForManager :: RecentManagerClass manager                                  => manager -- ^ @manager@ - a 'RecentManager'-                                 -> IO RecentChooserWidget -- ^ returns a new 'RecentChooserWidget' +                                 -> IO RecentChooserWidget -- ^ returns a new 'RecentChooserWidget' recentChooserWidgetNewForManager manager =   makeNewObject mkRecentChooserWidget $   liftM (castPtr :: Ptr Widget -> Ptr RecentChooserWidget) $
Graphics/UI/Gtk/Recent/RecentFilter.chs view
@@ -84,17 +84,15 @@ #endif   ) where -import Control.Monad	(liftM)+#if GTK_CHECK_VERSION(2,10,0)  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.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.@@ -125,8 +123,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentFilterGetName :: RecentFilterClass self => self- -> IO String -- ^ returns the name of the filter+recentFilterGetName :: (RecentFilterClass self, GlibString string) => self+ -> IO string -- ^ returns the name of the filter recentFilterGetName self =   {# call gtk_recent_filter_get_name #}     (toRecentFilter self)@@ -137,8 +135,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentFilterSetName :: RecentFilterClass self => self- -> String -- ^ @name@ - then human readable name of @filter@+recentFilterSetName :: (RecentFilterClass self, GlibString string) => self+ -> string -- ^ @name@ - then human readable name of @filter@  -> IO () recentFilterSetName self name =   withUTFString name $ \namePtr ->@@ -150,8 +148,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentFilterAddMimeType :: RecentFilterClass self => self- -> String -- ^ @mimeType@ - a MIME type+recentFilterAddMimeType :: (RecentFilterClass self, GlibString string) => self+ -> string -- ^ @mimeType@ - a MIME type  -> IO () recentFilterAddMimeType self mimeType =   withUTFString mimeType $ \mimeTypePtr ->@@ -164,8 +162,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentFilterAddPattern :: RecentFilterClass self => self- -> String -- ^ @pattern@ - a file pattern+recentFilterAddPattern :: (RecentFilterClass self, GlibString string) => self+ -> string -- ^ @pattern@ - a file pattern  -> IO () recentFilterAddPattern self pattern =   withUTFString pattern $ \patternPtr ->@@ -186,8 +184,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentFilterAddApplication :: RecentFilterClass self => self- -> String -- ^ @application@ - an application name+recentFilterAddApplication :: (RecentFilterClass self, GlibString string) => self+ -> string -- ^ @application@ - an application name  -> IO () recentFilterAddApplication self application =   withUTFString application $ \applicationPtr ->@@ -201,8 +199,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentFilterAddGroup :: RecentFilterClass self => self- -> String -- ^ @group@ - a group name+recentFilterAddGroup :: (RecentFilterClass self, GlibString string) => self+ -> string -- ^ @group@ - a group name  -> IO () recentFilterAddGroup self group =   withUTFString group $ \groupPtr ->
Graphics/UI/Gtk/Recent/RecentInfo.chs view
@@ -56,17 +56,16 @@ #endif   ) where -import Control.Monad	(liftM)+#if GTK_CHECK_VERSION(2,10,0) +import Control.Monad    (liftM)+ import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0) -------------------- -- Types {#pointer *RecentInfo foreign newtype#}@@ -88,8 +87,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoExists :: RecentInfo -                 -> IO Bool -- ^ returns 'True' if the resource exists +recentInfoExists :: RecentInfo+                 -> IO Bool -- ^ returns 'True' if the resource exists recentInfoExists self =   liftM toBool $   {# call gtk_recent_info_exists #}@@ -100,7 +99,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetAdded :: RecentInfo +recentInfoGetAdded :: RecentInfo                    -> IO Int -- ^ returns the number of seconds elapsed from system's Epoch when the resource was added to the list, or -1 on failure. recentInfoGetAdded self =   liftM fromIntegral $@@ -111,7 +110,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetAge :: RecentInfo +recentInfoGetAge :: RecentInfo                  -> IO Int -- ^ returns a positive integer containing the number of days elapsed since the time this resource was last modified. recentInfoGetAge self =   liftM fromIntegral $@@ -119,22 +118,22 @@     self  -- | Gets the data regarding the application that has registered the resource pointed by info.--- +-- -- If the command line contains any escape characters defined inside the storage specification, they -- will be expanded. -- -- * Available since Gtk+ version 2.10 ---recentInfoGetApplicationInfo :: RecentInfo -                             -> String  -- ^ @appName@ the name of the application that has registered this item-                             -> IO (Maybe ([String], Int, Int))+recentInfoGetApplicationInfo :: GlibString string => RecentInfo+                             -> string  -- ^ @appName@ the name of the application that has registered this item+                             -> IO (Maybe ([string], Int, Int))                               -- ^ @appExec@ return location for the string containing the command line. transfer none.                               -- ^ @count@    return location for the number of times this item was registered. out.                               -- ^ @time@    out. out. recentInfoGetApplicationInfo self appName =   alloca $ \countPtr ->   alloca $ \timePtr ->-  allocaArray 0 $ \execPtr -> +  allocaArray 0 $ \execPtr ->   withUTFString appName $ \appNamePtr -> do     success <- liftM toBool $               {# call gtk_recent_info_get_application_info #}@@ -143,7 +142,7 @@                 execPtr                 countPtr                 timePtr-    if success +    if success        then do          exec <- mapM peekUTFString =<< peekArray 0 execPtr          count <- peek countPtr@@ -155,8 +154,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetApplications :: RecentInfo -> IO [String]-recentInfoGetApplications self = +recentInfoGetApplications :: GlibString string => RecentInfo -> IO [string]+recentInfoGetApplications self =   alloca $ \lengthPtr -> do     str <- {# call gtk_recent_info_get_applications #} self lengthPtr     length <- peek lengthPtr@@ -166,8 +165,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetDescription :: RecentInfo -                         -> IO String -- ^ returns the description of the resource. +recentInfoGetDescription :: GlibString string => RecentInfo+                         -> IO string -- ^ returns the description of the resource. recentInfoGetDescription self =   {# call gtk_recent_info_get_description #}     self@@ -177,19 +176,19 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetDisplayName :: RecentInfo -                         -> IO String -- ^ returns the display name of the resource. +recentInfoGetDisplayName :: GlibString string => RecentInfo+                         -> IO string -- ^ returns the display name of the resource. recentInfoGetDisplayName self =   {# call gtk_recent_info_get_display_name #}     self   >>= peekUTFString --- | Returns all groups registered for the recently used item info. +-- | Returns all groups registered for the recently used item info. -- -- * Available since Gtk+ version 2.10 ---recentInfoGetGroups :: RecentInfo -> IO [String]-recentInfoGetGroups self = +recentInfoGetGroups :: GlibString string => RecentInfo -> IO [string]+recentInfoGetGroups self =   alloca $ \lengthPtr -> do     str <- {# call gtk_recent_info_get_groups #} self lengthPtr     length <- peek lengthPtr@@ -199,7 +198,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetIcon :: RecentInfo +recentInfoGetIcon :: RecentInfo                   -> Int  -- ^ @size@    the size of the icon in pixels                   -> IO (Maybe Pixbuf) -- ^ returns a 'Pixbuf' containing the icon, or 'Nothing' recentInfoGetIcon self size =@@ -212,8 +211,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetMimeType :: RecentInfo -                      -> IO String -- ^ returns the MIME type of the resource. +recentInfoGetMimeType :: GlibString string => RecentInfo+                      -> IO string -- ^ returns the MIME type of the resource. recentInfoGetMimeType self =   {# call gtk_recent_info_get_mime_type #}     self@@ -223,7 +222,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetModified :: RecentInfo +recentInfoGetModified :: RecentInfo                       -> IO Int -- ^ returns the number of seconds elapsed from system's Epoch when the resource was last modified, or -1 on failure. recentInfoGetModified self =   liftM fromIntegral $@@ -235,8 +234,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetPrivateHint :: RecentInfo -                         -> IO Bool -- ^ returns 'True' if the private flag was found, 'False' otherwise. +recentInfoGetPrivateHint :: RecentInfo+                         -> IO Bool -- ^ returns 'True' if the private flag was found, 'False' otherwise. recentInfoGetPrivateHint self =   liftM toBool $   {# call gtk_recent_info_get_private_hint #}@@ -247,8 +246,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetShortName :: RecentInfo -                       -> IO String+recentInfoGetShortName :: GlibString string => RecentInfo+                       -> IO string recentInfoGetShortName self =   {# call gtk_recent_info_get_short_name #}     self@@ -258,8 +257,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetURI :: RecentInfo -                 -> IO String -- ^ returns the URI of the resource. +recentInfoGetURI :: GlibString string => RecentInfo+                 -> IO string -- ^ returns the URI of the resource. recentInfoGetURI self =   {# call gtk_recent_info_get_uri #}     self@@ -270,7 +269,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetURIDisplay :: RecentInfo -> IO String+recentInfoGetURIDisplay :: GlibString string => RecentInfo -> IO string recentInfoGetURIDisplay self =   {# call gtk_recent_info_get_uri_display #}     self@@ -280,7 +279,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoGetVisited :: RecentInfo +recentInfoGetVisited :: RecentInfo                      -> IO Int -- ^ returns the number of seconds elapsed from system's Epoch when the resource was last visited, or -1 on failure. recentInfoGetVisited self =   liftM fromIntegral $@@ -291,8 +290,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoHasApplication :: RecentInfo -                         -> String  -- ^ @appName@ a string containing an application name                              +recentInfoHasApplication :: GlibString string => RecentInfo+                         -> string  -- ^ @appName@ a string containing an application name                          -> IO Bool -- ^ returns  'True' if an application with name @appName@ was found, 'False' otherwise. recentInfoHasApplication self appName =   liftM toBool $@@ -305,9 +304,9 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoHasGroup :: RecentInfo -                   -> String  -- ^ @groupName@ name of a group              -                   -> IO Bool -- ^ returns    'True' if the group was found. +recentInfoHasGroup :: GlibString string => RecentInfo+                   -> string  -- ^ @groupName@ name of a group+                   -> IO Bool -- ^ returns    'True' if the group was found. recentInfoHasGroup self groupName =   liftM toBool $   withUTFString groupName $ \groupNamePtr ->@@ -319,8 +318,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoIsLocal :: RecentInfo -                  -> IO Bool -- ^ returns 'True' if the resource is local. +recentInfoIsLocal :: RecentInfo+                  -> IO Bool -- ^ returns 'True' if the resource is local. recentInfoIsLocal self =   liftM toBool $   {# call gtk_recent_info_is_local #}@@ -331,8 +330,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoLastApplication :: RecentInfo -                          -> IO String -- ^ returns an application name. +recentInfoLastApplication :: GlibString string => RecentInfo+                          -> IO string -- ^ returns an application name. recentInfoLastApplication self =   {# call gtk_recent_info_last_application #}     self@@ -342,7 +341,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentInfoMatch :: RecentInfo -> RecentInfo +recentInfoMatch :: RecentInfo -> RecentInfo                 -> IO Bool -- ^ returns 'True' if both 'RecentInfo' structures point to se same resource, 'False' otherwise. recentInfoMatch self infoB =   liftM toBool $
Graphics/UI/Gtk/Recent/RecentManager.chs view
@@ -27,7 +27,7 @@ -- -- * Module available since Gtk+ version 2.10 ----- TODO: +-- TODO: --      GtkRecentData --      gtk_recent_manager_add_full --@@ -44,7 +44,7 @@ -- -- The 'RecentManager' acts like a database of all the recently used files. -- You can create new 'RecentManager' objects, but it is more efficient to use--- the standard recent manager for the 'Screen' so that informations about the+-- the standard recent manager for the 'Screen' so that information about the -- recently used files is shared with other people using them. In case the -- default screen is being used, adding a new recently used file is as simple -- as:@@ -89,23 +89,22 @@ #endif   ) where -import Control.Monad	(liftM)+#if GTK_CHECK_VERSION(2,10,0) +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 System.Glib.GObject        (Quark, quarkFromString)-import System.Glib.GError   (GErrorDomain, GErrorClass(..), propagateGError, checkGError)+import System.Glib.GError   (propagateGError, checkGError) {#import Graphics.UI.Gtk.Recent.RecentInfo#} (RecentInfo, mkRecentInfo) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}  {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0)- -------------------- -- Constructors @@ -128,7 +127,7 @@ -- -- * Available since Gtk+ version 2.10 ---recentManagerGetDefault :: IO RecentManager -- ^ returns A unique 'RecentManager'. +recentManagerGetDefault :: IO RecentManager -- ^ returns A unique 'RecentManager'. recentManagerGetDefault =   makeNewGObject mkRecentManager $   {# call gtk_recent_manager_get_default #}@@ -146,8 +145,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentManagerAddItem :: RecentManagerClass self => self- -> String  -- ^ @uri@ - a valid URI+recentManagerAddItem :: (RecentManagerClass self, GlibString string) => self+ -> string  -- ^ @uri@ - a valid URI  -> IO Bool -- ^ returns @True@ if the new item was successfully added to the             -- recently used resources list recentManagerAddItem self uri =@@ -163,8 +162,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentManagerRemoveItem :: RecentManagerClass self => self- -> String  -- ^ @uri@ - the URI of the item you wish to remove+recentManagerRemoveItem :: (RecentManagerClass self, GlibString string) => self+ -> string  -- ^ @uri@ - the URI of the item you wish to remove  -> IO Bool -- ^ returns @True@ if the item pointed by @uri@ has been             -- successfully removed by the recently used resources list, and             -- @False@ otherwise.@@ -179,20 +178,20 @@                   (\_ -> return False)  -- | Searches for a URI inside the recently used resources list, and returns a--- structure containing informations about the resource like its MIME type, or+-- structure containing information about the resource like its MIME type, or -- its display name. -- -- -- * Available since Gtk+ version 2.10 ---recentManagerLookupItem :: RecentManagerClass self => self- -> String                -- ^ @uri@ - a URI+recentManagerLookupItem :: (RecentManagerClass self, GlibString string) => self+ -> string                -- ^ @uri@ - a URI  -> IO RecentInfo -- ^ returns a 'RecentInfo'                           -- structure containing information about the                           -- resource pointed by @uri@, or {@NULL@, FIXME: this                           -- should probably be converted to a Maybe data type}                           -- if the URI was not registered in the recently used-                          -- resources list. +                          -- resources list. recentManagerLookupItem self uri =   propagateGError $ \errorPtr ->   withUTFString uri $ \uriPtr -> do@@ -208,8 +207,8 @@ -- -- * Available since Gtk+ version 2.10 ---recentManagerHasItem :: RecentManagerClass self => self- -> String  -- ^ @uri@ - a URI+recentManagerHasItem :: (RecentManagerClass self, GlibString string) => self+ -> string  -- ^ @uri@ - a URI  -> IO Bool -- ^ returns @True@ if the resource was found, @False@ otherwise. recentManagerHasItem self uri =   liftM toBool $@@ -226,9 +225,9 @@ -- -- * Available since Gtk+ version 2.10 ---recentManagerMoveItem :: RecentManagerClass self => self- -> String  -- ^ @uri@ - the URI of a recently used resource- -> String  -- ^ @newUri@ - the new URI of the recently used resource to remove the item pointed by @uri@ in the list+recentManagerMoveItem :: (RecentManagerClass self, GlibString string) => self+ -> string  -- ^ @uri@ - the URI of a recently used resource+ -> string  -- ^ @newUri@ - the new URI of the recently used resource to remove the item pointed by @uri@ in the list  -> IO Bool -- ^ returns @True@ on success. recentManagerMoveItem self uri newUri =   checkGError ( \errorPtr ->@@ -249,7 +248,7 @@ -- recentManagerGetItems :: RecentManagerClass self => self  -> IO [RecentInfo]                        -- ^ returns a list of newly allocated-                            -- 'RecentInfo' objects. +                            -- 'RecentInfo' objects. recentManagerGetItems self = do   glist <- {# call gtk_recent_manager_get_items #}             (toRecentManager self)@@ -275,32 +274,32 @@ -- Attributes  -- | The full path to the file to be used to store and read the recently used resources list--- +-- -- Default value: 'Nothing'--- +-- -- * Available since Gtk+ version 2.10 ---recentManagerFilename :: RecentManagerClass self => ReadAttr self String+recentManagerFilename :: (RecentManagerClass self, GlibString string) => ReadAttr self string recentManagerFilename = readAttrFromStringProperty "filename"  -- | The maximum number of items to be returned by the 'recentManagerGetItems' function.--- +-- -- Allowed values: >= 'GMaxulong'--- +-- -- Default value: -1---  --+-- -- * Available since Gtk+ version 2.10 -- recentManagerLimit :: RecentManagerClass self => Attr self Int recentManagerLimit = newAttrFromIntProperty "limit"  -- | The size of the recently used resources list.--- +-- -- Allowed values: >= 'GMaxulong'--- +-- -- Default value: 0--- +-- -- -- * Available since Gtk+ version 2.10 --
Graphics/UI/Gtk/Scrolling/HScrollbar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Scrolling.HScrollbar ( -- * Detail--- +-- -- | The 'HScrollbar' widget is a widget arranged horizontally creating a -- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment' -- may be added to handle the adjustment of the scrollbar using@@ -58,10 +58,10 @@   hScrollbarNewDefaults   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -71,7 +71,7 @@  -- | Creates a new horizontal scrollbar. ---hScrollbarNew :: +hScrollbarNew ::     Adjustment    -- ^ @adjustment@ - the 'Adjustment' to use.  -> IO HScrollbar hScrollbarNew adjustment =
Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs view
@@ -131,15 +131,15 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM) import Data.Maybe    (fromMaybe)  import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.General.Enums	(PolicyType(..), CornerType(..), ShadowType(..))+import Graphics.UI.Gtk.General.Enums    (PolicyType(..), CornerType(..), ShadowType(..))  {# context lib="gtk" prefix="gtk" #} @@ -189,7 +189,7 @@ -- 'PolicyType' enumeration. If 'PolicyAlways', the scrollbar is always -- present; if 'PolicyNever', the scrollbar is never present; if -- 'PolicyAutomatic', the scrollbar is present only if needed (that is, if the--- slider part of the bar would be smaller than the trough - the display is+-- slider part of the bar would be smaller than the through - the display is -- larger than the page size). -- scrolledWindowSetPolicy :: ScrolledWindowClass self => self
Graphics/UI/Gtk/Scrolling/VScrollbar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Scrolling.VScrollbar ( -- * Detail--- +-- -- | The 'VScrollbar' widget is a widget arranged vertically creating a -- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment' -- may be added to handle the adjustment of the scrollbar using@@ -58,10 +58,10 @@   vScrollbarNewDefaults   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -71,7 +71,7 @@  -- | Creates a new vertical scrollbar. ---vScrollbarNew :: +vScrollbarNew ::     Adjustment    -- ^ @adjustment@ - the 'Adjustment' to use.  -> IO VScrollbar vScrollbarNew adjustment =
Graphics/UI/Gtk/Selectors/ColorButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Selectors.ColorButton ( -- * Detail--- +-- -- | The 'ColorButton' is a button which displays the currently selected color -- an allows to open a color selection dialog to change the color. It is -- suitable widget for selecting a color in a preference dialog.@@ -78,15 +78,15 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.General.Structs	(Color)+import Graphics.UI.Gtk.General.Structs  (Color)  {# context lib="gtk" prefix="gtk" #} @@ -108,7 +108,7 @@  -- | Creates a new color button. ---colorButtonNewWithColor :: +colorButtonNewWithColor ::     Color          -- ^ @color@ - A 'Color' to set the current color with.  -> IO ColorButton colorButtonNewWithColor color =@@ -185,8 +185,8 @@  -- | Sets the title for the color selection dialog. ---colorButtonSetTitle :: ColorButtonClass self => self- -> String -- ^ @title@ - String containing new window title.+colorButtonSetTitle :: (ColorButtonClass self, GlibString string) => self+ -> string -- ^ @title@ - String containing new window title.  -> IO () colorButtonSetTitle self title =   withUTFString title $ \titlePtr ->@@ -196,8 +196,8 @@  -- | Gets the title of the color selection dialog. ---colorButtonGetTitle :: ColorButtonClass self => self- -> IO String -- ^ returns An internal string, do not free the return value+colorButtonGetTitle :: (ColorButtonClass self, GlibString string) => self+ -> IO string -- ^ returns An internal string, do not free the return value colorButtonGetTitle self =   {# call gtk_color_button_get_title #}     (toColorButton self)@@ -221,7 +221,7 @@ -- -- Default value: \"Pick a Color\" ---colorButtonTitle :: ColorButtonClass self => Attr self String+colorButtonTitle :: (ColorButtonClass self, GlibString string) => Attr self string colorButtonTitle = newAttr   colorButtonGetTitle   colorButtonSetTitle
Graphics/UI/Gtk/Selectors/ColorSelection.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Selectors.ColorSelection ( -- * Detail--- +-- -- | The 'ColorSelection' is a widget that is used to select a color. It -- consists of a color wheel and number of sliders and entry boxes for color -- parameters such as hue, saturation, value, red, green, blue, and opacity. It@@ -76,11 +76,11 @@   colorSelectionPreviousAlpha,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.Structs (Color) @@ -146,7 +146,7 @@ -- colorSelectionGetHasOpacityControl :: ColorSelectionClass self => self  -> IO Bool -- ^ returns @True@ if the color selector has an opacity control.-            -- @False@ if it does't.+            -- @False@ if it doesn't. colorSelectionGetHasOpacityControl self =   liftM toBool $   {# call unsafe color_selection_get_has_opacity_control #}
Graphics/UI/Gtk/Selectors/ColorSelectionDialog.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Selectors.ColorSelectionDialog ( -- * Detail--- +-- -- | The 'ColorSelectionDialog' provides a standard dialog which allows the -- user to select a color much like the 'FileSelection' provides a standard -- dialog for file selection.@@ -63,17 +63,17 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.General.Structs	(colorSelectionDialogGetColor,-					colorSelectionDialogGetOkButton,-					colorSelectionDialogGetCancelButton,-					colorSelectionDialogGetHelpButton)+import Graphics.UI.Gtk.General.Structs  (colorSelectionDialogGetColor,+                                        colorSelectionDialogGetOkButton,+                                        colorSelectionDialogGetCancelButton,+                                        colorSelectionDialogGetHelpButton) #endif  {# context lib="gtk" prefix="gtk" #}@@ -83,8 +83,8 @@  -- | Creates a new 'ColorSelectionDialog'. ---colorSelectionDialogNew :: -    String                  -- ^ @title@ - a string containing the title text+colorSelectionDialogNew :: GlibString string+ => string                  -- ^ @title@ - a string containing the title text                             -- for the dialog.  -> IO ColorSelectionDialog colorSelectionDialogNew title =
Graphics/UI/Gtk/Selectors/FileChooser.chs view
@@ -30,7 +30,7 @@ -- module Graphics.UI.Gtk.Selectors.FileChooser ( -- * Detail--- +-- -- | 'FileChooser' is an interface that can be implemented by file selection -- widgets. In Gtk+, the main objects that implement this interface are -- 'FileChooserWidget', 'FileChooserDialog', and 'FileChooserButton'. You do@@ -40,11 +40,11 @@ -- -- 'FileChooser' allows for shortcuts to various places in the filesystem. -- In the default implementation these are displayed in the left pane. It may--- be a bit confusing at first taht these shortcuts come from various sources+-- be a bit confusing at first that these shortcuts come from various sources -- and in various flavours, so lets explain the terminology here:  -- ** File Names and Encodings--- +-- -- | When the user is finished selecting files in a 'FileChooser', your -- program can get the selected names either as filenames or as URIs. For URIs, -- the normal escaping rules are applied if the URI contains non-ASCII@@ -53,7 +53,7 @@ -- Glib documentation for more details about this variable.  -- ** Adding a Preview Widget--- +-- -- | You can add a custom preview widget to a file chooser and then get -- notification about when the preview needs to be updated. To install a -- preview widget, use 'fileChooserSetPreviewWidget'. Then, connect to the@@ -66,14 +66,14 @@ -- that indicates whether your callback could successfully generate a preview.  -- ** Adding Extra Widgets--- +-- -- | You can add extra widgets to a file chooser to provide options that are -- not present in the default design. For example, you can add a toggle button -- to give the user the option to open a file in read-only mode. You can use -- 'fileChooserSetExtraWidget' to insert additional widgets in a file chooser.  -- ** Key Bindings--- +-- -- | Internally, Gtk+ implements a file chooser's graphical user interface -- with the private GtkFileChooserDefaultClass. This widget has several key -- bindings and their associated signals. This section describes the available@@ -98,23 +98,23 @@ -- following fragment in your .gtkrc-2.0 file: -- -- > binding "my-own-gtkfilechooser-bindings" {--- > 	bind "AltShiftl" {--- > 		"location-popup" ()--- > 	}--- > 	bind "AltShiftUp" {--- > 		"up-folder" ()--- > 	}--- > 	bind "AltShiftDown" {--- > 		"down-folder" ()--- > 	}--- > 	bind "AltShiftHome" {--- > 		"home-folder-folder" ()--- > 	}+-- >    bind "AltShiftl" {+-- >            "location-popup" ()+-- >    }+-- >    bind "AltShiftUp" {+-- >            "up-folder" ()+-- >    }+-- >    bind "AltShiftDown" {+-- >            "down-folder" ()+-- >    }+-- >    bind "AltShiftHome" {+-- >            "home-folder-folder" ()+-- >    } -- > }--- > +-- > -- > class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"--- > 	--- +-- >    +--  -- * Class Hierarchy -- |@@ -239,10 +239,10 @@ import System.Glib.UTFString import System.Glib.Attributes {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) import Graphics.UI.Gtk.Signals {#import System.Glib.GList#}-import System.Glib.GError		(propagateGError, GErrorDomain, GErrorClass(..))+import System.Glib.GError               (propagateGError, GErrorDomain, GErrorClass(..))  {# context lib="gtk" prefix="gtk" #} @@ -353,11 +353,11 @@ -- documentation for those functions for an example of using -- 'fileChooserSetCurrentName' as well. ---fileChooserSetCurrentName :: FileChooserClass self => self- -> FilePath -- ^ @name@ - the filename to use, as a Unicode string+fileChooserSetCurrentName :: (FileChooserClass self, GlibFilePath fp) => self+ -> fp -- ^ @name@ - the filename to use, as a Unicode string  -> IO () fileChooserSetCurrentName self name =-  withUTFString name $ \namePtr ->+  withUTFFilePath name $ \namePtr ->   {# call gtk_file_chooser_set_current_name #}     (toFileChooser self)     namePtr@@ -369,8 +369,8 @@ -- If the file chooser is in folder mode, this function returns the selected -- folder. ---fileChooserGetFilename :: FileChooserClass self => self- -> IO (Maybe FilePath) -- ^ returns The currently selected filename, or+fileChooserGetFilename :: (FileChooserClass self, GlibFilePath fp) => self+ -> IO (Maybe fp) -- ^ returns The currently selected filename, or                         -- @Nothing@ if no file is selected, or the selected                         -- file can't be represented with a local filename. fileChooserGetFilename self =@@ -380,7 +380,7 @@   {# call gtk_file_chooser_get_filename #} #endif     (toFileChooser self)-  >>= maybePeek readCString+  >>= maybePeek peekUTFFilePath  -- | Sets @filename@ as the current filename for the file chooser, by changing -- to the file's parent folder and actually selecting the file in list. If the
Graphics/UI/Gtk/Selectors/FileChooserButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Selectors.FileChooserButton ( -- * Detail--- +-- -- | The 'FileChooserButton' is a widget that lets the user select a file. It -- implements the 'FileChooser' interface. Visually, it is a file name with a -- button to bring up a 'FileChooserDialog'. The user can then use that dialog@@ -75,17 +75,21 @@   fileChooserButtonDialog,   fileChooserButtonTitle,   fileChooserButtonWidthChars,++-- * Signals+  fileChooserButtonFileSet  #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}+{#import Graphics.UI.Gtk.Signals#}  #if GTK_CHECK_VERSION(2,6,0) {#import Graphics.UI.Gtk.Selectors.FileChooser#} (FileChooserAction)@@ -102,8 +106,8 @@  -- | Creates a new file-selecting button widget. ---fileChooserButtonNew :: -    String               -- ^ @title@ - the title of the browse dialog.+fileChooserButtonNew :: GlibString string+ => string               -- ^ @title@ - the title of the browse dialog.  -> FileChooserAction    -- ^ @action@ - the open mode for the widget.  -> IO FileChooserButton fileChooserButtonNew title action =@@ -118,10 +122,10 @@ -- | Creates a new file-selecting button widget using @backend@. -- -- Removed in Gtk3.-fileChooserButtonNewWithBackend :: -    String               -- ^ @title@ - the title of the browse dialog.+fileChooserButtonNewWithBackend :: GlibString string+ => string               -- ^ @title@ - the title of the browse dialog.  -> FileChooserAction    -- ^ @action@ - the open mode for the widget.- -> String               -- ^ @backend@ - the name of the file system backend+ -> string               -- ^ @backend@ - the name of the file system backend                          -- to use.  -> IO FileChooserButton fileChooserButtonNewWithBackend title action backend =@@ -138,7 +142,7 @@ -- | Creates a 'FileChooserButton' widget which uses @dialog@ as it's -- file-picking window. ---fileChooserButtonNewWithDialog :: FileChooserDialogClass dialog => +fileChooserButtonNewWithDialog :: FileChooserDialogClass dialog =>     dialog               -- ^ @dialog@ - the 'FileChooserDialog' widget to                          -- use.  -> IO FileChooserButton@@ -153,8 +157,8 @@  -- | Retrieves the title of the browse dialog used by the button. ---fileChooserButtonGetTitle :: FileChooserButtonClass self => self- -> IO String -- ^ returns a pointer to the browse dialog's title.+fileChooserButtonGetTitle :: (FileChooserButtonClass self, GlibString string) => self+ -> IO string -- ^ returns a pointer to the browse dialog's title. fileChooserButtonGetTitle self =   {# call gtk_file_chooser_button_get_title #}     (toFileChooserButton self)@@ -162,8 +166,8 @@  -- | Modifies the @title@ of the browse dialog used by the button. ---fileChooserButtonSetTitle :: FileChooserButtonClass self => self- -> String -- ^ @title@ - the new browse dialog title.+fileChooserButtonSetTitle :: (FileChooserButtonClass self, GlibString string) => self+ -> string -- ^ @title@ - the new browse dialog title.  -> IO () fileChooserButtonSetTitle self title =   withUTFString title $ \titlePtr ->@@ -205,15 +209,25 @@ -- -- Default value: \"Select A File\" ---fileChooserButtonTitle :: FileChooserButtonClass self => Attr self String+fileChooserButtonTitle :: (FileChooserButtonClass self, GlibString string) => Attr self string fileChooserButtonTitle = newAttr   fileChooserButtonGetTitle   fileChooserButtonSetTitle --- | +-- | -- fileChooserButtonWidthChars :: FileChooserButtonClass self => Attr self Int fileChooserButtonWidthChars = newAttr   fileChooserButtonGetWidthChars   fileChooserButtonSetWidthChars++--------------------+-- Signals++-- %hash c:b660 d:ab72+-- | Emitted when the user selects a file.+--+fileChooserButtonFileSet :: FileChooserButtonClass self => Signal self (IO ())+fileChooserButtonFileSet = Signal (connect_NONE__NONE "file-set")+ #endif
Graphics/UI/Gtk/Selectors/FileChooserDialog.chs view
@@ -30,7 +30,7 @@ -- module Graphics.UI.Gtk.Selectors.FileChooserDialog ( -- * Detail--- +-- -- | 'FileChooserDialog' is a dialog box suitable for use with \"File\/Open\" -- or \"File\/Save as\" commands. This widget works by putting a -- 'FileChooserWidget' inside a 'Dialog'. It exposes the 'FileChooser',@@ -42,7 +42,7 @@ -- Instead, you should use the functions that work on a 'FileChooser'.  -- ** Response Codes--- +-- -- | 'FileChooserDialog' inherits from 'Dialog', so buttons that go in its -- action area have response codes such as 'ResponseAccept' and -- 'ResponseCancel'.@@ -77,14 +77,14 @@ import Data.Maybe (isJust, fromJust)  import System.Glib.FFI+import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Selectors.FileChooser#}-import System.Glib.GObject (objectNew) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.Windows.Window import Graphics.UI.Gtk.Windows.Dialog-import System.Glib.GValue		(allocaGValue)-import System.Glib.GValueTypes		(valueSetMaybeString)+import System.Glib.GValue               (allocaGValue)+import System.Glib.GValueTypes          (valueSetMaybeString) import System.Glib.Attributes  {# context lib="gtk" prefix="gtk" #}@@ -101,10 +101,11 @@ -- | Creates a new 'FileChooserDialog'. -- fileChooserDialogNew-  :: Maybe String            -- ^ Title of the dialog (or default)+  :: GlibString string+  => Maybe string            -- ^ Title of the dialog (or default)   -> Maybe Window            -- ^ Transient parent of the dialog (or none)   -> FileChooserAction       -- ^ Open or save mode for the dialog-  -> [(String, ResponseId)]  -- ^ Buttons and their response codes+  -> [(string, ResponseId)]  -- ^ Buttons and their response codes   -> IO FileChooserDialog fileChooserDialogNew title parent action buttons =   internalFileChooserDialogNew title parent action buttons Nothing@@ -114,11 +115,12 @@ -- files and you use a more expressive vfs, such as gnome-vfs, to load files. -- fileChooserDialogNewWithBackend-  :: Maybe String              -- ^ Title of the dialog (or default)+  :: GlibString string+  => Maybe string              -- ^ Title of the dialog (or default)   -> Maybe Window              -- ^ Transient parent of the dialog (or none)   -> FileChooserAction         -- ^ Open or save mode for the dialog-  -> [(String, ResponseId)]    -- ^ Buttons and their response codes-  -> String                    -- ^ The name of the filesystem backend to use+  -> [(string, ResponseId)]    -- ^ Buttons and their response codes+  -> string                    -- ^ The name of the filesystem backend to use   -> IO FileChooserDialog fileChooserDialogNewWithBackend title parent action buttons backend =   internalFileChooserDialogNew title parent action buttons (Just backend)@@ -128,12 +130,12 @@ -- bug, see <http://bugzilla.gnome.org/show_bug.cgi?id=141004> -- The solution is to call objectNew and add the buttons manually. -internalFileChooserDialogNew ::-  Maybe String ->           -- Title of the dialog (or default)+internalFileChooserDialogNew :: GlibString string =>+  Maybe string ->           -- Title of the dialog (or default)   Maybe Window ->           -- Transient parent of the dialog (or none)   FileChooserAction ->      -- Open or save mode for the dialog-  [(String, ResponseId)] -> -- Buttons and their response codes-  Maybe String ->           -- The name of the backend to use (optional)+  [(string, ResponseId)] -> -- Buttons and their response codes+  Maybe string ->           -- The name of the backend to use (optional)   IO FileChooserDialog internalFileChooserDialogNew title parent action buttons backend = do   objType <- {# call unsafe gtk_file_chooser_dialog_get_type #}
Graphics/UI/Gtk/Selectors/FileChooserWidget.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Selectors.FileChooserWidget ( -- * Detail--- +-- -- | 'FileChooserWidget' is a widget suitable for selecting files. It is the -- main building block of a 'FileChooserDialog'. Most applications will only -- need to use the latter; you can use 'FileChooserWidget' as part of a larger@@ -89,7 +89,7 @@ -- be embedded in custom windows, and it is the same widget that is used by -- 'FileChooserDialog'. ---fileChooserWidgetNew :: +fileChooserWidgetNew ::     FileChooserAction    -- ^ @action@ - Open or save mode for the widget  -> IO FileChooserWidget fileChooserWidgetNew action =@@ -105,7 +105,7 @@ -- and it is the same widget that is used by 'FileChooserDialog'. -- -- Removed in Gtk3.-fileChooserWidgetNewWithBackend :: +fileChooserWidgetNewWithBackend ::     FileChooserAction    -- ^ @action@ - Open or save mode for the widget  -> String               -- ^ @backend@ - The name of the specific filesystem                          -- backend to use.
Graphics/UI/Gtk/Selectors/FileFilter.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Selectors.FileFilter ( -- * Detail--- +-- -- | A 'FileFilter' can be used to restrict the files being shown in a -- 'FileChooser'. Files can be filtered based on their name (with -- 'fileFilterAddPattern'), on their mime type (with 'fileFilterAddMimeType'),@@ -78,17 +78,14 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.Flags		(Flags, fromFlags)+import System.Glib.Flags                (Flags, fromFlags) import System.Glib.UTFString import System.Glib.Attributes--- Back in <X.h> DestroyNotify is defined as 17-#undef DestroyNotify-import System.Glib.GObject              (DestroyNotify, destroyFunPtr) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)  {# context lib="gtk" prefix="gtk" #} @@ -117,8 +114,9 @@ -- be displayed in the file selector user interface if there is a selectable -- list of filters. ---fileFilterSetName :: FileFilter- -> String -- ^ @name@ - the human-readable-name for the filter+fileFilterSetName :: GlibString string+ => FileFilter+ -> string -- ^ @name@ - the human-readable-name for the filter  -> IO () fileFilterSetName self name =   withUTFString name $ \namePtr ->@@ -128,8 +126,9 @@  -- | Gets the human-readable name for the filter. See 'fileFilterSetName'. ---fileFilterGetName :: FileFilter- -> IO String -- ^ returns The human-readable name of the filter+fileFilterGetName :: GlibString string+ => FileFilter+ -> IO string -- ^ returns The human-readable name of the filter fileFilterGetName self =   {# call gtk_file_filter_get_name #}     self@@ -137,8 +136,9 @@  -- | Adds a rule allowing a given mime type to @filter@. ---fileFilterAddMimeType :: FileFilter- -> String     -- ^ @mimeType@ - name of a MIME type+fileFilterAddMimeType :: GlibString string+ => FileFilter+ -> string     -- ^ @mimeType@ - name of a MIME type  -> IO () fileFilterAddMimeType self mimeType =   withUTFString mimeType $ \mimeTypePtr ->@@ -148,8 +148,9 @@  -- | Adds a rule allowing a shell style glob to a filter. ---fileFilterAddPattern :: FileFilter- -> String     -- ^ @pattern@ - a shell style glob+fileFilterAddPattern :: GlibString string+ => FileFilter+ -> string     -- ^ @pattern@ - a shell style glob  -> IO () fileFilterAddPattern self pattern =   withUTFString pattern $ \patternPtr ->@@ -163,13 +164,13 @@ -- Gtk+ to avoid retrieving expensive information when it isn't needed by the -- filter. ---fileFilterAddCustom :: FileFilter+fileFilterAddCustom :: GlibString string => FileFilter  -> [FileFilterFlags]     -- ^ @needed@ - list of flags indicating the                           -- information that the custom filter function needs.- -> (   Maybe String      -- filename-     -> Maybe String      -- uri-     -> Maybe String      -- display name-     -> Maybe String      -- mime type+ -> (   Maybe string      -- filename+     -> Maybe string      -- uri+     -> Maybe string      -- display name+     -> Maybe string      -- mime type      -> IO Bool)          -- ^ @(\filename uri displayName mimeType -> ...)@ -                           -- filter function; if the function                           -- returns @True@, then the file will be displayed.@@ -201,7 +202,7 @@   IO CInt  foreign import ccall "wrapper" mkHandler_GtkFileFilterFunc ::-  GtkFileFilterFunc -> +  GtkFileFilterFunc ->   IO (FunPtr GtkFileFilterFunc)  #if GTK_CHECK_VERSION(2,6,0)@@ -220,7 +221,7 @@  -- | \'name\' property. See 'fileFilterGetName' and 'fileFilterSetName' ---fileFilterName :: Attr FileFilter String+fileFilterName :: GlibString string => Attr FileFilter string fileFilterName = newAttr   fileFilterGetName   fileFilterSetName
Graphics/UI/Gtk/Selectors/FontButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Selectors.FontButton ( -- * Detail--- +-- -- | The 'FontButton' is a button which displays the currently selected font -- an allows to open a font selection dialog to change the font. It is suitable -- widget for selecting a font in a preference dialog.@@ -85,13 +85,13 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -111,8 +111,8 @@  -- | Creates a new font picker widget. ---fontButtonNewWithFont :: -    String        -- ^ @fontname@ - Name of font to display in font selection+fontButtonNewWithFont :: GlibString string+ => string        -- ^ @fontname@ - Name of font to display in font selection                   -- dialog  -> IO FontButton fontButtonNewWithFont fontname =@@ -127,8 +127,8 @@  -- | Sets or updates the currently-displayed font in font picker dialog. ---fontButtonSetFontName :: FontButtonClass self => self- -> String  -- ^ @fontname@ - Name of font to display in font selection dialog+fontButtonSetFontName :: (FontButtonClass self, GlibString string) => self+ -> string  -- ^ @fontname@ - Name of font to display in font selection dialog  -> IO Bool -- ^ returns Return value of 'Graphics.UI.Gtk.Selectors.FontSelectionDialog.fontSelectionDialogSetFontName' if             -- the font selection dialog exists, otherwise @False@. fontButtonSetFontName self fontname =@@ -140,8 +140,8 @@  -- | Retrieves the name of the currently selected font. ---fontButtonGetFontName :: FontButtonClass self => self- -> IO String -- ^ returns an internal copy of the font name which must not be+fontButtonGetFontName :: (FontButtonClass self, GlibString string) => self+ -> IO string -- ^ returns an internal copy of the font name which must not be               -- freed. fontButtonGetFontName self =   {# call gtk_font_button_get_font_name #}@@ -233,8 +233,8 @@  -- | Sets the title for the font selection dialog. ---fontButtonSetTitle :: FontButtonClass self => self- -> String -- ^ @title@ - a string containing the font selection dialog title+fontButtonSetTitle :: (FontButtonClass self, GlibString string) => self+ -> string -- ^ @title@ - a string containing the font selection dialog title  -> IO () fontButtonSetTitle self title =   withUTFString title $ \titlePtr ->@@ -244,8 +244,8 @@  -- | Retrieves the title of the font selection dialog. ---fontButtonGetTitle :: FontButtonClass self => self- -> IO String -- ^ returns an internal copy of the title string which must not+fontButtonGetTitle :: (FontButtonClass self, GlibString string) => self+ -> IO string -- ^ returns an internal copy of the title string which must not               -- be freed. fontButtonGetTitle self =   {# call gtk_font_button_get_title #}@@ -259,7 +259,7 @@ -- -- Default value: \"Pick a Font\" ---fontButtonTitle :: FontButtonClass self => Attr self String+fontButtonTitle :: (FontButtonClass self, GlibString string) => Attr self string fontButtonTitle = newAttr   fontButtonGetTitle   fontButtonSetTitle@@ -268,7 +268,7 @@ -- -- Default value: \"Sans 12\" ---fontButtonFontName :: FontButtonClass self => Attr self String+fontButtonFontName :: (FontButtonClass self, GlibString string) => Attr self string fontButtonFontName = newAttrFromStringProperty "font-name"  -- | If this property is set to @True@, the label will be drawn in the
Graphics/UI/Gtk/Selectors/FontSelection.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Selectors.FontSelection ( -- * Detail--- +-- -- | The 'FontSelection' widget lists the available fonts, styles and sizes, -- allowing the user to select a font. It is used in the 'FontSelectionDialog' -- widget to provide a dialog box for selecting fonts.@@ -72,13 +72,13 @@   fontSelectionPreviewText,   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -99,8 +99,8 @@  -- | Gets the currently-selected font name. ---fontSelectionGetFontName :: FontSelectionClass self => self- -> IO (Maybe String) -- ^ returns the name of the currently selected font, or+fontSelectionGetFontName :: (FontSelectionClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns the name of the currently selected font, or                       -- @Nothing@ if no font is selected. fontSelectionGetFontName self =   {# call unsafe font_selection_get_font_name #}@@ -109,8 +109,8 @@  -- | Sets the currently-selected font. ---fontSelectionSetFontName :: FontSelectionClass self => self- -> String  -- ^ @fontname@ - a fontname.+fontSelectionSetFontName :: (FontSelectionClass self, GlibString string) => self+ -> string  -- ^ @fontname@ - a fontname.  -> IO Bool -- ^ returns @True@ if the font was found. fontSelectionSetFontName self fontname =   liftM toBool $@@ -121,7 +121,7 @@  -- | Gets the text displayed in the preview area. ---fontSelectionGetPreviewText :: FontSelectionClass self => self -> IO String+fontSelectionGetPreviewText :: (FontSelectionClass self, GlibString string) => self -> IO string fontSelectionGetPreviewText self =   {# call unsafe font_selection_get_preview_text #}     (toFontSelection self)@@ -129,7 +129,7 @@  -- | Sets the text displayed in the preview area. ---fontSelectionSetPreviewText :: FontSelectionClass self => self -> String -> IO ()+fontSelectionSetPreviewText :: (FontSelectionClass self, GlibString string) => self -> string -> IO () fontSelectionSetPreviewText self text =   withUTFString text $ \textPtr ->   {# call font_selection_set_preview_text #}@@ -143,14 +143,14 @@ -- -- Default value: \"\" ---fontSelectionFontName :: FontSelectionClass self => Attr self String+fontSelectionFontName :: (FontSelectionClass self, GlibString string) => Attr self string fontSelectionFontName = newAttrFromStringProperty "font_name"  -- | The text to display in order to demonstrate the selected font. -- -- Default value: \"abcdefghijk ABCDEFGHIJK\" ---fontSelectionPreviewText :: FontSelectionClass self => Attr self String+fontSelectionPreviewText :: (FontSelectionClass self, GlibString string) => Attr self string fontSelectionPreviewText = newAttr   fontSelectionGetPreviewText   fontSelectionSetPreviewText
Graphics/UI/Gtk/Selectors/FontSelectionDialog.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Selectors.FontSelectionDialog ( -- * Detail--- +-- -- | The 'FontSelectionDialog' widget is a dialog box for selecting a font. -- -- To set the font which is initially selected, use@@ -77,12 +77,12 @@   fontSelectionDialogPreviewText,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -92,8 +92,8 @@  -- | Creates a new 'FontSelectionDialog'. ---fontSelectionDialogNew :: -    String                 -- ^ @title@ - the title of the dialog box.+fontSelectionDialogNew :: GlibString string+ => string                 -- ^ @title@ - the title of the dialog box.  -> IO FontSelectionDialog fontSelectionDialogNew title =   makeNewObject mkFontSelectionDialog $@@ -107,8 +107,8 @@  -- | Gets the currently-selected font name. ---fontSelectionDialogGetFontName :: FontSelectionDialogClass self => self- -> IO (Maybe String) -- ^ returns the currently-selected font name, or+fontSelectionDialogGetFontName :: (FontSelectionDialogClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns the currently-selected font name, or                       -- @Nothing@ if no font is selected. fontSelectionDialogGetFontName self =   {# call font_selection_dialog_get_font_name #}@@ -117,8 +117,8 @@  -- | Sets the currently-selected font. ---fontSelectionDialogSetFontName :: FontSelectionDialogClass self => self- -> String  -- ^ @fontname@ - a fontname.+fontSelectionDialogSetFontName :: (FontSelectionDialogClass self, GlibString string) => self+ -> string  -- ^ @fontname@ - a fontname.  -> IO Bool -- ^ returns @True@ if the font was found. fontSelectionDialogSetFontName self fontname =   liftM toBool $@@ -129,7 +129,7 @@  -- | Gets the text displayed in the preview area. ---fontSelectionDialogGetPreviewText :: FontSelectionDialogClass self => self -> IO String+fontSelectionDialogGetPreviewText :: (FontSelectionDialogClass self, GlibString string) => self -> IO string fontSelectionDialogGetPreviewText self =   {# call unsafe font_selection_dialog_get_preview_text #}     (toFontSelectionDialog self)@@ -137,7 +137,7 @@  -- | Sets the text displayed in the preview area. ---fontSelectionDialogSetPreviewText :: FontSelectionDialogClass self => self -> String -> IO ()+fontSelectionDialogSetPreviewText :: (FontSelectionDialogClass self, GlibString string) => self -> string -> IO () fontSelectionDialogSetPreviewText self text =   withUTFString text $ \textPtr ->   {# call font_selection_dialog_set_preview_text #}@@ -150,8 +150,8 @@ -- * Available since Gtk+ version 2.14 -- fontSelectionDialogGetCancelButton :: FontSelectionDialogClass self => self-                                    -> IO Widget -- ^ returns the 'Widget' used in the dialog for the 'Cancel' button. -fontSelectionDialogGetCancelButton self = +                                    -> IO Widget -- ^ returns the 'Widget' used in the dialog for the 'Cancel' button.+fontSelectionDialogGetCancelButton self =   makeNewObject mkWidget $   {#call gtk_font_selection_dialog_get_cancel_button #}      (toFontSelectionDialog self)@@ -161,8 +161,8 @@ -- * Available since Gtk+ version 2.14 -- fontSelectionDialogGetOkButton :: FontSelectionDialogClass self => self-                               -> IO Widget -- ^ returns the 'Widget' used in the dialog for the 'OK' button. -fontSelectionDialogGetOkButton self = +                               -> IO Widget -- ^ returns the 'Widget' used in the dialog for the 'OK' button.+fontSelectionDialogGetOkButton self =   makeNewObject mkWidget $   {#call gtk_font_selection_dialog_get_ok_button #}      (toFontSelectionDialog self)@@ -175,8 +175,8 @@ -- * Available since Gtk+ version 2.22 -- fontSelectionDialogGetFontSelection :: FontSelectionDialogClass self => self-                                    -> IO FontSelection -- ^ returns the embedded 'FontSelection' -fontSelectionDialogGetFontSelection self = +                                    -> IO FontSelection -- ^ returns the embedded 'FontSelection'+fontSelectionDialogGetFontSelection self =   makeNewObject mkFontSelection $   liftM (castPtr :: Ptr Widget -> Ptr FontSelection) $   {#call gtk_font_selection_dialog_get_font_selection #}@@ -189,7 +189,7 @@ -- | \'previewText\' property. See 'fontSelectionDialogGetPreviewText' and -- 'fontSelectionDialogSetPreviewText' ---fontSelectionDialogPreviewText :: FontSelectionDialogClass self => Attr self String+fontSelectionDialogPreviewText :: (FontSelectionDialogClass self, GlibString string) => Attr self string fontSelectionDialogPreviewText = newAttr   fontSelectionDialogGetPreviewText   fontSelectionDialogSetPreviewText
Graphics/UI/Gtk/Selectors/HSV.chs view
@@ -71,13 +71,12 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.Attributes-import System.Glib.Properties-import Graphics.UI.Gtk.General.Enums	(DirectionType (..))-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.General.Enums    (DirectionType (..))+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Types#} @@ -107,9 +106,9 @@ -- hsvSetColor :: HSVClass self => self  -> (Double, Double, Double)-   -- ^ @(h, s, v)@ -   -- @h@ - value for the hue -   -- @s@ value for the saturation +   -- ^ @(h, s, v)@+   -- @h@ - value for the hue+   -- @s@ value for the saturation    -- @v@ value for the value  -> IO () hsvSetColor self (h, s, v) =@@ -144,7 +143,7 @@ -- hsvSetMetrics :: HSVClass self => self  -> (Int, Int)- -- ^ @(size, ringWidth)@ + -- ^ @(size, ringWidth)@  -- ^ @size@ - Diameter for the hue ring  -- ^ @ringWidth@ - Width of the hue ring  -> IO ()@@ -157,7 +156,7 @@ -- | Queries the size and ring width of an 'HSV' color selector. -- hsvGetMetrics :: HSVClass self => self- -> IO (Int, Int) -- ^ @(size, ringWidth)@ + -> IO (Int, Int) -- ^ @(size, ringWidth)@                   -- @size@ - Return value for the diameter of the hue ring                   -- @ringWidth@ - Return value for the width of the hue ring hsvGetMetrics self =@@ -190,9 +189,9 @@ -- hsvToRgb ::  (Double, Double, Double)-   -- ^ @(h, s, v)@ -   -- @h@ - value for the hue -   -- @s@ value for the saturation +   -- ^ @(h, s, v)@+   -- @h@ - value for the hue+   -- @s@ value for the saturation    -- @v@ value for the value  -> (Double, Double, Double) -- ^ @(r, g, b)@  @r@ - Return value for the red                             -- component @g@ - Return value for the green@@ -217,15 +216,15 @@  -- | Converts a color from RGB space to 'HSV'. Input values must be in the [0.0, 1.0] range; output values -- will be in the same range.-rgbToHsv :: -       (Double, Double, Double) -    -- ^ @(r, g, b)@  @r@ value for the red component -    -- @g@ value for the green component +rgbToHsv ::+       (Double, Double, Double)+    -- ^ @(r, g, b)@  @r@ value for the red component+    -- @g@ value for the green component     -- @b@ value for the blue component     -> (Double, Double, Double)-   -- ^ @(h, s, v)@ -   -- @h@ - Return value for the hue -   -- @s@ - Return value for the saturation +   -- ^ @(h, s, v)@+   -- @h@ - Return value for the hue+   -- @s@ - Return value for the saturation    -- @v@ - Return value for the value rgbToHsv (r, g, b) =   unsafePerformIO $@@ -246,7 +245,7 @@  -------------------- -- Attributes--- | Color in an 'HSV' color selector. +-- | Color in an 'HSV' color selector. -- Color component values must be in the [0.0, 1.0] range. hsvColor :: HSVClass self => Attr self (Double, Double, Double) hsvColor = newAttr@@ -271,5 +270,5 @@ -- hsvMove :: HSVClass self => Signal self (DirectionType -> IO ()) hsvMove = Signal (connect_ENUM__NONE "move")-        + #endif
− Graphics/UI/Gtk/Signals.chs
@@ -1,952 +0,0 @@-{-# OPTIONS_HADDOCK hide #-}--- -*-haskell-*---- -------------------- automatically generated file - do not edit ---------------  Callback installers for the GIMP Toolkit (GTK) Binding for Haskell------  Author : Axel Simon------  Created: 1 July 2000------  Copyright (C) 2000-2005 Axel Simon------  This library is free software; you can redistribute it and/or---  modify it under the terms of the GNU Lesser General Public---  License as published by the Free Software Foundation; either---  version 2.1 of the License, or (at your option) any later version.------  This library is distributed in the hope that it will be useful,---  but WITHOUT ANY WARRANTY; without even the implied warranty of---  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU---  Lesser General Public License for more details.------ #hide---- These functions are used to connect signals to widgets. They are auto---- matically created through HookGenerator.hs which takes a list of possible--- function signatures that are included in the GTK sources (gtkmarshal.list).------ The object system in the second version of GTK is based on GObject from--- GLIB. This base class is rather primitive in that it only implements--- ref and unref methods (and others that are not interesting to us). If--- the marshall list mentions OBJECT it refers to an instance of this --- GObject which is automatically wrapped with a ref and unref call.--- Structures which are not derived from GObject have to be passed as--- BOXED which gives the signal connect function a possibility to do the--- conversion into a proper ForeignPtr type. In special cases the signal--- connect function use a PTR type which will then be mangled in the--- user function directly. The latter is needed if a signal delivers a--- pointer to a string and its length in a separate integer.----module Graphics.UI.Gtk.Signals (-  module System.Glib.Signals,--  connect_BOXED__BOOL,-  connect_PTR__BOOL,-  connect_BOXED_BOXED__BOOL,-  connect_ENUM__BOOL,-  connect_ENUM_DOUBLE__BOOL,-  connect_INT__BOOL,-  connect_OBJECT_BOXED__BOOL,-  connect_INT_INT__BOOL,-  connect_INT_INT_INT__BOOL,-  connect_WORD__BOOL,-  connect_NONE__BOOL,-  connect_BOOL__BOOL,-  connect_NONE__ENUM,-  connect_ENUM__ENUM,-  connect_PTR__INT,-  connect_BOOL__NONE,-  connect_INT__NONE,-  connect_INT_INT__NONE,-  connect_NONE__NONE,-  connect_DOUBLE__NONE,-  connect_BOXED__NONE,-  connect_BOXED_BOXED__NONE,-  connect_BOXED_BOXED_PTR__NONE,-  connect_BOXED_OBJECT__NONE,-  connect_BOXED_WORD__NONE,-  connect_ENUM__NONE,-  connect_ENUM_INT__NONE,-  connect_ENUM_INT_BOOL__NONE,-  connect_OBJECT__NONE,-  connect_MOBJECT__NONE,-  connect_OBJECT_BOXED_BOXED__NONE,-  connect_OBJECT_OBJECT__NONE,-  connect_PTR__NONE,-  connect_PTR_WORD__NONE,-  connect_STRING__NONE,-  connect_STRING_STRING__NONE,-  connect_WORD_WORD__NONE,-  connect_WORD_STRING__NONE,-  connect_BOXED_PTR_INT__NONE,-  connect_INT_BOOL__NONE,-  connect_OBJECT_STRING__NONE,-  connect_STRING__BOOL,-  connect_OBJECT_PTR_BOXED__BOOL,-  connect_PTR_BOXED_BOXED__BOOL,-  connect_PTR_INT_PTR__NONE,-  connect_PTR_WORD_WORD__NONE,-  connect_OBJECT_PTR_WORD_WORD__NONE,-  connect_OBJECT_INT_INT_PTR_WORD_WORD__NONE,-  connect_OBJECT_INT_INT_WORD__BOOL,-  connect_OBJECT_WORD__NONE,-  connect_OBJECT_ENUM__BOOL,-  connect_BOXED_STRING__NONE,-  connect_OBJECT_INT__NONE,-  connect_ENUM_BOOL__BOOL,-  connect_BOXED_INT__NONE,-  connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL,-  connect_INT_STRING_INT__NONE,-  connect_STRING_INT_ENUM_INT__NONE,-  connect_OBJECT__BOOL,-  connect_OBJECT_INT_OBJECT__NONE,-  connect_OBJECT_OBJECT_OBJECT__NONE,-  connect_OBJECT_OBJECT_OBJECT__BOOL,-  connect_ENUM_PTR__NONE,-  -  ) where--import Control.Monad	(liftM)--import System.Glib.FFI-import System.Glib.UTFString   (peekUTFString,maybePeekUTFString)-import System.Glib.GError      (failOnGError)-{#import System.Glib.Signals#}-{#import System.Glib.GObject#} -import Graphics.UI.Gtk.General.Threading---{#context lib="gtk" prefix="gtk" #}----- Here are the generators that turn a Haskell function into--- a C function pointer. The fist Argument is always the widget,--- the last one is the user g_pointer. Both are ignored.---connect_BOXED__BOOL :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> -  ConnectAfter -> obj ->-  (a -> IO Bool) ->-  IO (ConnectId obj)-connect_BOXED__BOOL signal boxedPre1 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> IO Bool-        action _ box1 =-          failOnGError $-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1'--connect_PTR__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Ptr a -> IO Bool) ->-  IO (ConnectId obj)-connect_PTR__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> IO Bool-        action _ ptr1 =-          failOnGError $-          user (castPtr ptr1)--connect_BOXED_BOXED__BOOL :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> (Ptr b' -> IO b) -> -  ConnectAfter -> obj ->-  (a -> b -> IO Bool) ->-  IO (ConnectId obj)-connect_BOXED_BOXED__BOOL signal boxedPre1 boxedPre2 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Ptr () -> IO Bool-        action _ box1 box2 =-          failOnGError $-          boxedPre2 (castPtr box2) >>= \box2' ->-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' box2'--connect_ENUM__BOOL :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> IO Bool) ->-  IO (ConnectId obj)-connect_ENUM__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> IO Bool-        action _ enum1 =-          failOnGError $-          user (toEnum enum1)--connect_ENUM_DOUBLE__BOOL :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> Double -> IO Bool) ->-  IO (ConnectId obj)-connect_ENUM_DOUBLE__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Double -> IO Bool-        action _ enum1 double2 =-          failOnGError $-          user (toEnum enum1) double2--connect_INT__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Int -> IO Bool) ->-  IO (ConnectId obj)-connect_INT__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> IO Bool-        action _ int1 =-          failOnGError $-          user int1--connect_OBJECT_BOXED__BOOL :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  (Ptr b' -> IO b) -> -  ConnectAfter -> obj ->-  (a' -> b -> IO Bool) ->-  IO (ConnectId obj)-connect_OBJECT_BOXED__BOOL signal boxedPre2 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Ptr () -> IO Bool-        action _ obj1 box2 =-          failOnGError $-          boxedPre2 (castPtr box2) >>= \box2' ->-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') box2'--connect_INT_INT__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Int -> Int -> IO Bool) ->-  IO (ConnectId obj)-connect_INT_INT__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Int -> IO Bool-        action _ int1 int2 =-          failOnGError $-          user int1 int2--connect_INT_INT_INT__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Int -> Int -> Int -> IO Bool) ->-  IO (ConnectId obj)-connect_INT_INT_INT__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Int -> Int -> IO Bool-        action _ int1 int2 int3 =-          failOnGError $-          user int1 int2 int3--connect_WORD__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Word -> IO Bool) ->-  IO (ConnectId obj)-connect_WORD__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Word -> IO Bool-        action _ int1 =-          failOnGError $-          user int1--connect_NONE__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (IO Bool) ->-  IO (ConnectId obj)-connect_NONE__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> IO Bool-        action _ =-          failOnGError $-          user--connect_BOOL__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Bool -> IO Bool) ->-  IO (ConnectId obj)-connect_BOOL__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Bool -> IO Bool-        action _ bool1 =-          failOnGError $-          user bool1--connect_NONE__ENUM :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (IO a) ->-  IO (ConnectId obj)-connect_NONE__ENUM signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> IO Int-        action _ =-          failOnGError $-          liftM fromEnum $ -          user--connect_ENUM__ENUM :: -  (Enum a, Enum b, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> IO b) ->-  IO (ConnectId obj)-connect_ENUM__ENUM signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> IO Int-        action _ enum1 =-          failOnGError $-          liftM fromEnum $ -          user (toEnum enum1)--connect_PTR__INT :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Ptr a -> IO Int) ->-  IO (ConnectId obj)-connect_PTR__INT signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> IO Int-        action _ ptr1 =-          failOnGError $-          user (castPtr ptr1)--connect_BOOL__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Bool -> IO ()) ->-  IO (ConnectId obj)-connect_BOOL__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Bool -> IO ()-        action _ bool1 =-          failOnGError $-          user bool1--connect_INT__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Int -> IO ()) ->-  IO (ConnectId obj)-connect_INT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> IO ()-        action _ int1 =-          failOnGError $-          user int1--connect_INT_INT__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Int -> Int -> IO ()) ->-  IO (ConnectId obj)-connect_INT_INT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Int -> IO ()-        action _ int1 int2 =-          failOnGError $-          user int1 int2--connect_NONE__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (IO ()) ->-  IO (ConnectId obj)-connect_NONE__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> IO ()-        action _ =-          failOnGError $-          user--connect_DOUBLE__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Double -> IO ()) ->-  IO (ConnectId obj)-connect_DOUBLE__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Double -> IO ()-        action _ double1 =-          failOnGError $-          user double1--connect_BOXED__NONE :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> -  ConnectAfter -> obj ->-  (a -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED__NONE signal boxedPre1 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> IO ()-        action _ box1 =-          failOnGError $-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1'--connect_BOXED_BOXED__NONE :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> (Ptr b' -> IO b) -> -  ConnectAfter -> obj ->-  (a -> b -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED_BOXED__NONE signal boxedPre1 boxedPre2 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Ptr () -> IO ()-        action _ box1 box2 =-          failOnGError $-          boxedPre2 (castPtr box2) >>= \box2' ->-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' box2'--connect_BOXED_BOXED_PTR__NONE :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> (Ptr b' -> IO b) -> -  ConnectAfter -> obj ->-  (a -> b -> Ptr c -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED_BOXED_PTR__NONE signal boxedPre1 boxedPre2 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Ptr () -> Ptr () -> IO ()-        action _ box1 box2 ptr3 =-          failOnGError $-          boxedPre2 (castPtr box2) >>= \box2' ->-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' box2' (castPtr ptr3)--connect_BOXED_OBJECT__NONE :: -  (GObjectClass b', GObjectClass obj) => SignalName ->-  (Ptr a' -> IO a) -> -  ConnectAfter -> obj ->-  (a -> b' -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED_OBJECT__NONE signal boxedPre1 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Ptr GObject -> IO ()-        action _ box1 obj2 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj2) >>= \obj2' ->-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' (unsafeCastGObject obj2')--connect_BOXED_WORD__NONE :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> -  ConnectAfter -> obj ->-  (a -> Word -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED_WORD__NONE signal boxedPre1 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Word -> IO ()-        action _ box1 int2 =-          failOnGError $-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' int2--connect_ENUM__NONE :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> IO ()) ->-  IO (ConnectId obj)-connect_ENUM__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> IO ()-        action _ enum1 =-          failOnGError $-          user (toEnum enum1)--connect_ENUM_INT__NONE :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> Int -> IO ()) ->-  IO (ConnectId obj)-connect_ENUM_INT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Int -> IO ()-        action _ enum1 int2 =-          failOnGError $-          user (toEnum enum1) int2--connect_ENUM_INT_BOOL__NONE :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> Int -> Bool -> IO ()) ->-  IO (ConnectId obj)-connect_ENUM_INT_BOOL__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Int -> Bool -> IO ()-        action _ enum1 int2 bool3 =-          failOnGError $-          user (toEnum enum1) int2 bool3--connect_OBJECT__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> IO ()-        action _ obj1 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1')--connect_MOBJECT__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (Maybe a' -> IO ()) ->-  IO (ConnectId obj)-connect_MOBJECT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> IO ()-        action _ obj1 =-          failOnGError $-          maybeNull (makeNewGObject (GObject, objectUnrefFromMainloop)) (return obj1) >>= \obj1' ->-          user (liftM unsafeCastGObject obj1')--connect_OBJECT_BOXED_BOXED__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  (Ptr b' -> IO b) -> (Ptr c' -> IO c) -> -  ConnectAfter -> obj ->-  (a' -> b -> c -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_BOXED_BOXED__NONE signal boxedPre2 boxedPre3 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Ptr () -> Ptr () -> IO ()-        action _ obj1 box2 box3 =-          failOnGError $-          boxedPre3 (castPtr box3) >>= \box3' ->-          boxedPre2 (castPtr box2) >>= \box2' ->-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') box2' box3'--connect_OBJECT_OBJECT__NONE :: -  (GObjectClass a', GObjectClass b', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> b' -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_OBJECT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Ptr GObject -> IO ()-        action _ obj1 obj2 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj2) >>= \obj2' ->-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') (unsafeCastGObject obj2')--connect_PTR__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Ptr a -> IO ()) ->-  IO (ConnectId obj)-connect_PTR__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> IO ()-        action _ ptr1 =-          failOnGError $-          user (castPtr ptr1)--connect_PTR_WORD__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Ptr a -> Word -> IO ()) ->-  IO (ConnectId obj)-connect_PTR_WORD__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Word -> IO ()-        action _ ptr1 int2 =-          failOnGError $-          user (castPtr ptr1) int2--connect_STRING__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (String -> IO ()) ->-  IO (ConnectId obj)-connect_STRING__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> CString -> IO ()-        action _ str1 =-          failOnGError $-          peekUTFString str1 >>= \str1' ->-          user str1'--connect_STRING_STRING__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (String -> String -> IO ()) ->-  IO (ConnectId obj)-connect_STRING_STRING__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> CString -> CString -> IO ()-        action _ str1 str2 =-          failOnGError $-          peekUTFString str2 >>= \str2' ->-          peekUTFString str1 >>= \str1' ->-          user str1' str2'--connect_WORD_WORD__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Word -> Word -> IO ()) ->-  IO (ConnectId obj)-connect_WORD_WORD__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Word -> Word -> IO ()-        action _ int1 int2 =-          failOnGError $-          user int1 int2--connect_WORD_STRING__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Word -> String -> IO ()) ->-  IO (ConnectId obj)-connect_WORD_STRING__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Word -> CString -> IO ()-        action _ int1 str2 =-          failOnGError $-          peekUTFString str2 >>= \str2' ->-          user int1 str2'--connect_BOXED_PTR_INT__NONE :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> -  ConnectAfter -> obj ->-  (a -> Ptr b -> Int -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED_PTR_INT__NONE signal boxedPre1 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Ptr () -> Int -> IO ()-        action _ box1 ptr2 int3 =-          failOnGError $-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' (castPtr ptr2) int3--connect_INT_BOOL__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Int -> Bool -> IO ()) ->-  IO (ConnectId obj)-connect_INT_BOOL__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Bool -> IO ()-        action _ int1 bool2 =-          failOnGError $-          user int1 bool2--connect_OBJECT_STRING__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> String -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_STRING__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> CString -> IO ()-        action _ obj1 str2 =-          failOnGError $-          peekUTFString str2 >>= \str2' ->-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') str2'--connect_STRING__BOOL :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (String -> IO Bool) ->-  IO (ConnectId obj)-connect_STRING__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> CString -> IO Bool-        action _ str1 =-          failOnGError $-          peekUTFString str1 >>= \str1' ->-          user str1'--connect_OBJECT_PTR_BOXED__BOOL :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  (Ptr c' -> IO c) -> -  ConnectAfter -> obj ->-  (a' -> Ptr b -> c -> IO Bool) ->-  IO (ConnectId obj)-connect_OBJECT_PTR_BOXED__BOOL signal boxedPre3 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Ptr () -> Ptr () -> IO Bool-        action _ obj1 ptr2 box3 =-          failOnGError $-          boxedPre3 (castPtr box3) >>= \box3' ->-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') (castPtr ptr2) box3'--connect_PTR_BOXED_BOXED__BOOL :: -  GObjectClass obj => SignalName ->-  (Ptr b' -> IO b) -> (Ptr c' -> IO c) -> -  ConnectAfter -> obj ->-  (Ptr a -> b -> c -> IO Bool) ->-  IO (ConnectId obj)-connect_PTR_BOXED_BOXED__BOOL signal boxedPre2 boxedPre3 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Ptr () -> Ptr () -> IO Bool-        action _ ptr1 box2 box3 =-          failOnGError $-          boxedPre3 (castPtr box3) >>= \box3' ->-          boxedPre2 (castPtr box2) >>= \box2' ->-          user (castPtr ptr1) box2' box3'--connect_PTR_INT_PTR__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Ptr a -> Int -> Ptr c -> IO ()) ->-  IO (ConnectId obj)-connect_PTR_INT_PTR__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Int -> Ptr () -> IO ()-        action _ ptr1 int2 ptr3 =-          failOnGError $-          user (castPtr ptr1) int2 (castPtr ptr3)--connect_PTR_WORD_WORD__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Ptr a -> Word -> Word -> IO ()) ->-  IO (ConnectId obj)-connect_PTR_WORD_WORD__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Word -> Word -> IO ()-        action _ ptr1 int2 int3 =-          failOnGError $-          user (castPtr ptr1) int2 int3--connect_OBJECT_PTR_WORD_WORD__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> Ptr b -> Word -> Word -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_PTR_WORD_WORD__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Ptr () -> Word -> Word -> IO ()-        action _ obj1 ptr2 int3 int4 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') (castPtr ptr2) int3 int4--connect_OBJECT_INT_INT_PTR_WORD_WORD__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> Int -> Int -> Ptr d -> Word -> Word -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_INT_INT_PTR_WORD_WORD__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Int -> Int -> Ptr () -> Word -> Word -> IO ()-        action _ obj1 int2 int3 ptr4 int5 int6 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') int2 int3 (castPtr ptr4) int5 int6--connect_OBJECT_INT_INT_WORD__BOOL :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> Int -> Int -> Word -> IO Bool) ->-  IO (ConnectId obj)-connect_OBJECT_INT_INT_WORD__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Int -> Int -> Word -> IO Bool-        action _ obj1 int2 int3 int4 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') int2 int3 int4--connect_OBJECT_WORD__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> Word -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_WORD__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Word -> IO ()-        action _ obj1 int2 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') int2--connect_OBJECT_ENUM__BOOL :: -  (GObjectClass a', Enum b, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> b -> IO Bool) ->-  IO (ConnectId obj)-connect_OBJECT_ENUM__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Int -> IO Bool-        action _ obj1 enum2 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') (toEnum enum2)--connect_BOXED_STRING__NONE :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> -  ConnectAfter -> obj ->-  (a -> String -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED_STRING__NONE signal boxedPre1 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> CString -> IO ()-        action _ box1 str2 =-          failOnGError $-          peekUTFString str2 >>= \str2' ->-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' str2'--connect_OBJECT_INT__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> Int -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_INT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Int -> IO ()-        action _ obj1 int2 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') int2--connect_ENUM_BOOL__BOOL :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> Bool -> IO Bool) ->-  IO (ConnectId obj)-connect_ENUM_BOOL__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Bool -> IO Bool-        action _ enum1 bool2 =-          failOnGError $-          user (toEnum enum1) bool2--connect_BOXED_INT__NONE :: -  GObjectClass obj => SignalName ->-  (Ptr a' -> IO a) -> -  ConnectAfter -> obj ->-  (a -> Int -> IO ()) ->-  IO (ConnectId obj)-connect_BOXED_INT__NONE signal boxedPre1 after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr () -> Int -> IO ()-        action _ box1 int2 =-          failOnGError $-          boxedPre1 (castPtr box1) >>= \box1' ->-          user box1' int2--connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL :: -  (GObjectClass a', GObjectClass e', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> Int -> Int -> Bool -> e' -> IO Bool) ->-  IO (ConnectId obj)-connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Int -> Int -> Bool -> Ptr GObject -> IO Bool-        action _ obj1 int2 int3 bool4 obj5 =-          failOnGError $-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj5) >>= \obj5' ->-          makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') int2 int3 bool4 (unsafeCastGObject obj5')--connect_INT_STRING_INT__NONE :: -  GObjectClass obj => SignalName ->-  ConnectAfter -> obj ->-  (Int -> String -> Int -> IO ()) ->-  IO (ConnectId obj)-connect_INT_STRING_INT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> CString -> Int -> IO ()-        action _ int1 str2 int3 =-          failOnGError $-          peekUTFString str2 >>= \str2' ->-          user int1 str2' int3--connect_STRING_INT_ENUM_INT__NONE :: -  (Enum c, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (String -> Int -> c -> Int -> IO ()) ->-  IO (ConnectId obj)-connect_STRING_INT_ENUM_INT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> CString -> Int -> Int -> Int -> IO ()-        action _ str1 int2 enum3 int4 =-          failOnGError $-          peekUTFString str1 >>= \str1' ->-          user str1' int2 (toEnum enum3) int4--connect_OBJECT__BOOL :: -  (GObjectClass a', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> IO Bool) ->-  IO (ConnectId obj)-connect_OBJECT__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> IO Bool-        action _ obj1 =-          failOnGError $-          makeNewGObject (GObject, objectUnref) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1')--connect_OBJECT_INT_OBJECT__NONE :: -  (GObjectClass a', GObjectClass c', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> Int -> c' -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_INT_OBJECT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Int -> Ptr GObject -> IO ()-        action _ obj1 int2 obj3 =-          failOnGError $-          makeNewGObject (GObject, objectUnref) (return obj3) >>= \obj3' ->-          makeNewGObject (GObject, objectUnref) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') int2 (unsafeCastGObject obj3')--connect_OBJECT_OBJECT_OBJECT__NONE :: -  (GObjectClass a', GObjectClass b', GObjectClass c', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> b' -> c' -> IO ()) ->-  IO (ConnectId obj)-connect_OBJECT_OBJECT_OBJECT__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Ptr GObject -> Ptr GObject -> IO ()-        action _ obj1 obj2 obj3 =-          failOnGError $-          makeNewGObject (GObject, objectUnref) (return obj3) >>= \obj3' ->-          makeNewGObject (GObject, objectUnref) (return obj2) >>= \obj2' ->-          makeNewGObject (GObject, objectUnref) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') (unsafeCastGObject obj2') (unsafeCastGObject obj3')--connect_OBJECT_OBJECT_OBJECT__BOOL :: -  (GObjectClass a', GObjectClass b', GObjectClass c', GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a' -> b' -> c' -> IO Bool) ->-  IO (ConnectId obj)-connect_OBJECT_OBJECT_OBJECT__BOOL signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Ptr GObject -> Ptr GObject -> Ptr GObject -> IO Bool-        action _ obj1 obj2 obj3 =-          failOnGError $-          makeNewGObject (GObject, objectUnref) (return obj3) >>= \obj3' ->-          makeNewGObject (GObject, objectUnref) (return obj2) >>= \obj2' ->-          makeNewGObject (GObject, objectUnref) (return obj1) >>= \obj1' ->-          user (unsafeCastGObject obj1') (unsafeCastGObject obj2') (unsafeCastGObject obj3')--connect_ENUM_PTR__NONE :: -  (Enum a, GObjectClass obj) => SignalName ->-  ConnectAfter -> obj ->-  (a -> Ptr b -> IO ()) ->-  IO (ConnectId obj)-connect_ENUM_PTR__NONE signal after obj user =-  connectGeneric signal after obj action-  where action :: Ptr GObject -> Int -> Ptr () -> IO ()-        action _ enum1 ptr2 =-          failOnGError $-          user (toEnum enum1) (castPtr ptr2)-
− Graphics/UI/Gtk/Types.chs
@@ -1,5108 +0,0 @@-{-# LANGUAGE CPP #-}-{-# OPTIONS_HADDOCK hide #-}--- -*-haskell-*---- -------------------- automatically generated file - do not edit -------------  Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell------  Author : Axel Simon------  Copyright (C) 2001-2005 Axel Simon------  This library is free software; you can redistribute it and/or---  modify it under the terms of the GNU Lesser General Public---  License as published by the Free Software Foundation; either---  version 2.1 of the License, or (at your option) any later version.------  This library is distributed in the hope that it will be useful,---  but WITHOUT ANY WARRANTY; without even the implied warranty of---  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU---  Lesser General Public License for more details.------ #hide---- |--- Maintainer  : gtk2hs-users@lists.sourceforge.net--- Stability   : provisional--- Portability : portable (depends on GHC)------ This file reflects the Gtk+ object hierarchy in terms of Haskell classes.------ Note: the mk... functions were originally meant to simply be an alias--- for the constructor. However, in order to communicate the destructor--- of an object to objectNew, the mk... functions are now a tuple containing--- Haskell constructor and the destructor function pointer. This hack avoids--- changing all modules that simply pass mk... to objectNew.----module Graphics.UI.Gtk.Types (--  module System.Glib.GObject,-  module Graphics.UI.Gtk.General.Threading,-  AtkObject(AtkObject), AtkObjectClass,-  toAtkObject, -  mkAtkObject, unAtkObject,-  castToAtkObject, gTypeAtkObject,-  Accessible(Accessible), AccessibleClass,-  toAccessible, -  mkAccessible, unAccessible,-  castToAccessible, gTypeAccessible,-  Keymap(Keymap), KeymapClass,-  toKeymap, -  mkKeymap, unKeymap,-  castToKeymap, gTypeKeymap,-  DisplayManager(DisplayManager), DisplayManagerClass,-  toDisplayManager, -  mkDisplayManager, unDisplayManager,-  castToDisplayManager, gTypeDisplayManager,-  AppLaunchContext(AppLaunchContext), AppLaunchContextClass,-  toAppLaunchContext, -  mkAppLaunchContext, unAppLaunchContext,-  castToAppLaunchContext, gTypeAppLaunchContext,-  PrintSettings(PrintSettings), PrintSettingsClass,-  toPrintSettings, -  mkPrintSettings, unPrintSettings,-  castToPrintSettings, gTypePrintSettings,-  PrintOperation(PrintOperation), PrintOperationClass,-  toPrintOperation, -  mkPrintOperation, unPrintOperation,-  castToPrintOperation, gTypePrintOperation,-  PrintOperationPreview(PrintOperationPreview), PrintOperationPreviewClass,-  toPrintOperationPreview, -  mkPrintOperationPreview, unPrintOperationPreview,-  castToPrintOperationPreview, gTypePrintOperationPreview,-  PageSetup(PageSetup), PageSetupClass,-  toPageSetup, -  mkPageSetup, unPageSetup,-  castToPageSetup, gTypePageSetup,-  PrintContext(PrintContext), PrintContextClass,-  toPrintContext, -  mkPrintContext, unPrintContext,-  castToPrintContext, gTypePrintContext,-  RecentChooser(RecentChooser), RecentChooserClass,-  toRecentChooser, -  mkRecentChooser, unRecentChooser,-  castToRecentChooser, gTypeRecentChooser,-  RecentManager(RecentManager), RecentManagerClass,-  toRecentManager, -  mkRecentManager, unRecentManager,-  castToRecentManager, gTypeRecentManager,-  DrawWindow(DrawWindow), DrawWindowClass,-  toDrawWindow, -  mkDrawWindow, unDrawWindow,-  castToDrawWindow, gTypeDrawWindow,-  Screen(Screen), ScreenClass,-  toScreen, -  mkScreen, unScreen,-  castToScreen, gTypeScreen,-  Display(Display), DisplayClass,-  toDisplay, -  mkDisplay, unDisplay,-  castToDisplay, gTypeDisplay,-  Visual(Visual), VisualClass,-  toVisual, -  mkVisual, unVisual,-  castToVisual, gTypeVisual,-  Device(Device), DeviceClass,-  toDevice, -  mkDevice, unDevice,-  castToDevice, gTypeDevice,-  Settings(Settings), SettingsClass,-  toSettings, -  mkSettings, unSettings,-  castToSettings, gTypeSettings,-  TextBuffer(TextBuffer), TextBufferClass,-  toTextBuffer, -  mkTextBuffer, unTextBuffer,-  castToTextBuffer, gTypeTextBuffer,-  TextTag(TextTag), TextTagClass,-  toTextTag, -  mkTextTag, unTextTag,-  castToTextTag, gTypeTextTag,-  TextTagTable(TextTagTable), TextTagTableClass,-  toTextTagTable, -  mkTextTagTable, unTextTagTable,-  castToTextTagTable, gTypeTextTagTable,-  Style(Style), StyleClass,-  toStyle, -  mkStyle, unStyle,-  castToStyle, gTypeStyle,-  RcStyle(RcStyle), RcStyleClass,-  toRcStyle, -  mkRcStyle, unRcStyle,-  castToRcStyle, gTypeRcStyle,-  DragContext(DragContext), DragContextClass,-  toDragContext, -  mkDragContext, unDragContext,-  castToDragContext, gTypeDragContext,-  Pixbuf(Pixbuf), PixbufClass,-  toPixbuf, -  mkPixbuf, unPixbuf,-  castToPixbuf, gTypePixbuf,-  PixbufAnimation(PixbufAnimation), PixbufAnimationClass,-  toPixbufAnimation, -  mkPixbufAnimation, unPixbufAnimation,-  castToPixbufAnimation, gTypePixbufAnimation,-  PixbufSimpleAnim(PixbufSimpleAnim), PixbufSimpleAnimClass,-  toPixbufSimpleAnim, -  mkPixbufSimpleAnim, unPixbufSimpleAnim,-  castToPixbufSimpleAnim, gTypePixbufSimpleAnim,-  PixbufAnimationIter(PixbufAnimationIter), PixbufAnimationIterClass,-  toPixbufAnimationIter, -  mkPixbufAnimationIter, unPixbufAnimationIter,-  castToPixbufAnimationIter, gTypePixbufAnimationIter,-  TextChildAnchor(TextChildAnchor), TextChildAnchorClass,-  toTextChildAnchor, -  mkTextChildAnchor, unTextChildAnchor,-  castToTextChildAnchor, gTypeTextChildAnchor,-  TextMark(TextMark), TextMarkClass,-  toTextMark, -  mkTextMark, unTextMark,-  castToTextMark, gTypeTextMark,-  RecentFilter(RecentFilter), RecentFilterClass,-  toRecentFilter, -  mkRecentFilter, unRecentFilter,-  castToRecentFilter, gTypeRecentFilter,-  Widget(Widget), WidgetClass,-  toWidget, -  mkWidget, unWidget,-  castToWidget, gTypeWidget,-  HSV(HSV), HSVClass,-  toHSV, -  mkHSV, unHSV,-  castToHSV, gTypeHSV,-  Misc(Misc), MiscClass,-  toMisc, -  mkMisc, unMisc,-  castToMisc, gTypeMisc,-  Label(Label), LabelClass,-  toLabel, -  mkLabel, unLabel,-  castToLabel, gTypeLabel,-  AccelLabel(AccelLabel), AccelLabelClass,-  toAccelLabel, -  mkAccelLabel, unAccelLabel,-  castToAccelLabel, gTypeAccelLabel,-  Arrow(Arrow), ArrowClass,-  toArrow, -  mkArrow, unArrow,-  castToArrow, gTypeArrow,-  Image(Image), ImageClass,-  toImage, -  mkImage, unImage,-  castToImage, gTypeImage,-  Container(Container), ContainerClass,-  toContainer, -  mkContainer, unContainer,-  castToContainer, gTypeContainer,-  ToolPalette(ToolPalette), ToolPaletteClass,-  toToolPalette, -  mkToolPalette, unToolPalette,-  castToToolPalette, gTypeToolPalette,-  ToolItemGroup(ToolItemGroup), ToolItemGroupClass,-  toToolItemGroup, -  mkToolItemGroup, unToolItemGroup,-  castToToolItemGroup, gTypeToolItemGroup,-  Bin(Bin), BinClass,-  toBin, -  mkBin, unBin,-  castToBin, gTypeBin,-  Alignment(Alignment), AlignmentClass,-  toAlignment, -  mkAlignment, unAlignment,-  castToAlignment, gTypeAlignment,-  Frame(Frame), FrameClass,-  toFrame, -  mkFrame, unFrame,-  castToFrame, gTypeFrame,-  AspectFrame(AspectFrame), AspectFrameClass,-  toAspectFrame, -  mkAspectFrame, unAspectFrame,-  castToAspectFrame, gTypeAspectFrame,-  Button(Button), ButtonClass,-  toButton, -  mkButton, unButton,-  castToButton, gTypeButton,-  ScaleButton(ScaleButton), ScaleButtonClass,-  toScaleButton, -  mkScaleButton, unScaleButton,-  castToScaleButton, gTypeScaleButton,-  VolumeButton(VolumeButton), VolumeButtonClass,-  toVolumeButton, -  mkVolumeButton, unVolumeButton,-  castToVolumeButton, gTypeVolumeButton,-  LinkButton(LinkButton), LinkButtonClass,-  toLinkButton, -  mkLinkButton, unLinkButton,-  castToLinkButton, gTypeLinkButton,-  ToggleButton(ToggleButton), ToggleButtonClass,-  toToggleButton, -  mkToggleButton, unToggleButton,-  castToToggleButton, gTypeToggleButton,-  CheckButton(CheckButton), CheckButtonClass,-  toCheckButton, -  mkCheckButton, unCheckButton,-  castToCheckButton, gTypeCheckButton,-  RadioButton(RadioButton), RadioButtonClass,-  toRadioButton, -  mkRadioButton, unRadioButton,-  castToRadioButton, gTypeRadioButton,-  ColorButton(ColorButton), ColorButtonClass,-  toColorButton, -  mkColorButton, unColorButton,-  castToColorButton, gTypeColorButton,-  FontButton(FontButton), FontButtonClass,-  toFontButton, -  mkFontButton, unFontButton,-  castToFontButton, gTypeFontButton,-  MenuItem(MenuItem), MenuItemClass,-  toMenuItem, -  mkMenuItem, unMenuItem,-  castToMenuItem, gTypeMenuItem,-  CheckMenuItem(CheckMenuItem), CheckMenuItemClass,-  toCheckMenuItem, -  mkCheckMenuItem, unCheckMenuItem,-  castToCheckMenuItem, gTypeCheckMenuItem,-  RadioMenuItem(RadioMenuItem), RadioMenuItemClass,-  toRadioMenuItem, -  mkRadioMenuItem, unRadioMenuItem,-  castToRadioMenuItem, gTypeRadioMenuItem,-  TearoffMenuItem(TearoffMenuItem), TearoffMenuItemClass,-  toTearoffMenuItem, -  mkTearoffMenuItem, unTearoffMenuItem,-  castToTearoffMenuItem, gTypeTearoffMenuItem,-  ImageMenuItem(ImageMenuItem), ImageMenuItemClass,-  toImageMenuItem, -  mkImageMenuItem, unImageMenuItem,-  castToImageMenuItem, gTypeImageMenuItem,-  SeparatorMenuItem(SeparatorMenuItem), SeparatorMenuItemClass,-  toSeparatorMenuItem, -  mkSeparatorMenuItem, unSeparatorMenuItem,-  castToSeparatorMenuItem, gTypeSeparatorMenuItem,-  Overlay(Overlay), OverlayClass,-  toOverlay, -  mkOverlay, unOverlay,-  castToOverlay, gTypeOverlay,-  Window(Window), WindowClass,-  toWindow, -  mkWindow, unWindow,-  castToWindow, gTypeWindow,-  Assistant(Assistant), AssistantClass,-  toAssistant, -  mkAssistant, unAssistant,-  castToAssistant, gTypeAssistant,-  OffscreenWindow(OffscreenWindow), OffscreenWindowClass,-  toOffscreenWindow, -  mkOffscreenWindow, unOffscreenWindow,-  castToOffscreenWindow, gTypeOffscreenWindow,-  Dialog(Dialog), DialogClass,-  toDialog, -  mkDialog, unDialog,-  castToDialog, gTypeDialog,-  AboutDialog(AboutDialog), AboutDialogClass,-  toAboutDialog, -  mkAboutDialog, unAboutDialog,-  castToAboutDialog, gTypeAboutDialog,-  ColorSelectionDialog(ColorSelectionDialog), ColorSelectionDialogClass,-  toColorSelectionDialog, -  mkColorSelectionDialog, unColorSelectionDialog,-  castToColorSelectionDialog, gTypeColorSelectionDialog,-  FileChooserDialog(FileChooserDialog), FileChooserDialogClass,-  toFileChooserDialog, -  mkFileChooserDialog, unFileChooserDialog,-  castToFileChooserDialog, gTypeFileChooserDialog,-  FontSelectionDialog(FontSelectionDialog), FontSelectionDialogClass,-  toFontSelectionDialog, -  mkFontSelectionDialog, unFontSelectionDialog,-  castToFontSelectionDialog, gTypeFontSelectionDialog,-  MessageDialog(MessageDialog), MessageDialogClass,-  toMessageDialog, -  mkMessageDialog, unMessageDialog,-  castToMessageDialog, gTypeMessageDialog,-  EventBox(EventBox), EventBoxClass,-  toEventBox, -  mkEventBox, unEventBox,-  castToEventBox, gTypeEventBox,-  HandleBox(HandleBox), HandleBoxClass,-  toHandleBox, -  mkHandleBox, unHandleBox,-  castToHandleBox, gTypeHandleBox,-  ScrolledWindow(ScrolledWindow), ScrolledWindowClass,-  toScrolledWindow, -  mkScrolledWindow, unScrolledWindow,-  castToScrolledWindow, gTypeScrolledWindow,-  Viewport(Viewport), ViewportClass,-  toViewport, -  mkViewport, unViewport,-  castToViewport, gTypeViewport,-  Expander(Expander), ExpanderClass,-  toExpander, -  mkExpander, unExpander,-  castToExpander, gTypeExpander,-  ComboBox(ComboBox), ComboBoxClass,-  toComboBox, -  mkComboBox, unComboBox,-  castToComboBox, gTypeComboBox,-  ToolItem(ToolItem), ToolItemClass,-  toToolItem, -  mkToolItem, unToolItem,-  castToToolItem, gTypeToolItem,-  ToolButton(ToolButton), ToolButtonClass,-  toToolButton, -  mkToolButton, unToolButton,-  castToToolButton, gTypeToolButton,-  MenuToolButton(MenuToolButton), MenuToolButtonClass,-  toMenuToolButton, -  mkMenuToolButton, unMenuToolButton,-  castToMenuToolButton, gTypeMenuToolButton,-  ToggleToolButton(ToggleToolButton), ToggleToolButtonClass,-  toToggleToolButton, -  mkToggleToolButton, unToggleToolButton,-  castToToggleToolButton, gTypeToggleToolButton,-  RadioToolButton(RadioToolButton), RadioToolButtonClass,-  toRadioToolButton, -  mkRadioToolButton, unRadioToolButton,-  castToRadioToolButton, gTypeRadioToolButton,-  SeparatorToolItem(SeparatorToolItem), SeparatorToolItemClass,-  toSeparatorToolItem, -  mkSeparatorToolItem, unSeparatorToolItem,-  castToSeparatorToolItem, gTypeSeparatorToolItem,-  Box(Box), BoxClass,-  toBox, -  mkBox, unBox,-  castToBox, gTypeBox,-  ButtonBox(ButtonBox), ButtonBoxClass,-  toButtonBox, -  mkButtonBox, unButtonBox,-  castToButtonBox, gTypeButtonBox,-  HButtonBox(HButtonBox), HButtonBoxClass,-  toHButtonBox, -  mkHButtonBox, unHButtonBox,-  castToHButtonBox, gTypeHButtonBox,-  VButtonBox(VButtonBox), VButtonBoxClass,-  toVButtonBox, -  mkVButtonBox, unVButtonBox,-  castToVButtonBox, gTypeVButtonBox,-  VBox(VBox), VBoxClass,-  toVBox, -  mkVBox, unVBox,-  castToVBox, gTypeVBox,-  RecentChooserWidget(RecentChooserWidget), RecentChooserWidgetClass,-  toRecentChooserWidget, -  mkRecentChooserWidget, unRecentChooserWidget,-  castToRecentChooserWidget, gTypeRecentChooserWidget,-  ColorSelection(ColorSelection), ColorSelectionClass,-  toColorSelection, -  mkColorSelection, unColorSelection,-  castToColorSelection, gTypeColorSelection,-  FontSelection(FontSelection), FontSelectionClass,-  toFontSelection, -  mkFontSelection, unFontSelection,-  castToFontSelection, gTypeFontSelection,-  FileChooserWidget(FileChooserWidget), FileChooserWidgetClass,-  toFileChooserWidget, -  mkFileChooserWidget, unFileChooserWidget,-  castToFileChooserWidget, gTypeFileChooserWidget,-  HBox(HBox), HBoxClass,-  toHBox, -  mkHBox, unHBox,-  castToHBox, gTypeHBox,-  InfoBar(InfoBar), InfoBarClass,-  toInfoBar, -  mkInfoBar, unInfoBar,-  castToInfoBar, gTypeInfoBar,-  FileChooserButton(FileChooserButton), FileChooserButtonClass,-  toFileChooserButton, -  mkFileChooserButton, unFileChooserButton,-  castToFileChooserButton, gTypeFileChooserButton,-  Statusbar(Statusbar), StatusbarClass,-  toStatusbar, -  mkStatusbar, unStatusbar,-  castToStatusbar, gTypeStatusbar,-  Fixed(Fixed), FixedClass,-  toFixed, -  mkFixed, unFixed,-  castToFixed, gTypeFixed,-  Paned(Paned), PanedClass,-  toPaned, -  mkPaned, unPaned,-  castToPaned, gTypePaned,-  HPaned(HPaned), HPanedClass,-  toHPaned, -  mkHPaned, unHPaned,-  castToHPaned, gTypeHPaned,-  VPaned(VPaned), VPanedClass,-  toVPaned, -  mkVPaned, unVPaned,-  castToVPaned, gTypeVPaned,-  IconView(IconView), IconViewClass,-  toIconView, -  mkIconView, unIconView,-  castToIconView, gTypeIconView,-  Layout(Layout), LayoutClass,-  toLayout, -  mkLayout, unLayout,-  castToLayout, gTypeLayout,-  MenuShell(MenuShell), MenuShellClass,-  toMenuShell, -  mkMenuShell, unMenuShell,-  castToMenuShell, gTypeMenuShell,-  Menu(Menu), MenuClass,-  toMenu, -  mkMenu, unMenu,-  castToMenu, gTypeMenu,-  RecentChooserMenu(RecentChooserMenu), RecentChooserMenuClass,-  toRecentChooserMenu, -  mkRecentChooserMenu, unRecentChooserMenu,-  castToRecentChooserMenu, gTypeRecentChooserMenu,-  MenuBar(MenuBar), MenuBarClass,-  toMenuBar, -  mkMenuBar, unMenuBar,-  castToMenuBar, gTypeMenuBar,-  Notebook(Notebook), NotebookClass,-  toNotebook, -  mkNotebook, unNotebook,-  castToNotebook, gTypeNotebook,-  Table(Table), TableClass,-  toTable, -  mkTable, unTable,-  castToTable, gTypeTable,-  TextView(TextView), TextViewClass,-  toTextView, -  mkTextView, unTextView,-  castToTextView, gTypeTextView,-  Toolbar(Toolbar), ToolbarClass,-  toToolbar, -  mkToolbar, unToolbar,-  castToToolbar, gTypeToolbar,-  TreeView(TreeView), TreeViewClass,-  toTreeView, -  mkTreeView, unTreeView,-  castToTreeView, gTypeTreeView,-  Calendar(Calendar), CalendarClass,-  toCalendar, -  mkCalendar, unCalendar,-  castToCalendar, gTypeCalendar,-  CellView(CellView), CellViewClass,-  toCellView, -  mkCellView, unCellView,-  castToCellView, gTypeCellView,-  DrawingArea(DrawingArea), DrawingAreaClass,-  toDrawingArea, -  mkDrawingArea, unDrawingArea,-  castToDrawingArea, gTypeDrawingArea,-  Spinner(Spinner), SpinnerClass,-  toSpinner, -  mkSpinner, unSpinner,-  castToSpinner, gTypeSpinner,-  Entry(Entry), EntryClass,-  toEntry, -  mkEntry, unEntry,-  castToEntry, gTypeEntry,-  SpinButton(SpinButton), SpinButtonClass,-  toSpinButton, -  mkSpinButton, unSpinButton,-  castToSpinButton, gTypeSpinButton,-  Range(Range), RangeClass,-  toRange, -  mkRange, unRange,-  castToRange, gTypeRange,-  Scale(Scale), ScaleClass,-  toScale, -  mkScale, unScale,-  castToScale, gTypeScale,-  HScale(HScale), HScaleClass,-  toHScale, -  mkHScale, unHScale,-  castToHScale, gTypeHScale,-  VScale(VScale), VScaleClass,-  toVScale, -  mkVScale, unVScale,-  castToVScale, gTypeVScale,-  Scrollbar(Scrollbar), ScrollbarClass,-  toScrollbar, -  mkScrollbar, unScrollbar,-  castToScrollbar, gTypeScrollbar,-  HScrollbar(HScrollbar), HScrollbarClass,-  toHScrollbar, -  mkHScrollbar, unHScrollbar,-  castToHScrollbar, gTypeHScrollbar,-  VScrollbar(VScrollbar), VScrollbarClass,-  toVScrollbar, -  mkVScrollbar, unVScrollbar,-  castToVScrollbar, gTypeVScrollbar,-  Separator(Separator), SeparatorClass,-  toSeparator, -  mkSeparator, unSeparator,-  castToSeparator, gTypeSeparator,-  HSeparator(HSeparator), HSeparatorClass,-  toHSeparator, -  mkHSeparator, unHSeparator,-  castToHSeparator, gTypeHSeparator,-  VSeparator(VSeparator), VSeparatorClass,-  toVSeparator, -  mkVSeparator, unVSeparator,-  castToVSeparator, gTypeVSeparator,-  Invisible(Invisible), InvisibleClass,-  toInvisible, -  mkInvisible, unInvisible,-  castToInvisible, gTypeInvisible,-  ProgressBar(ProgressBar), ProgressBarClass,-  toProgressBar, -  mkProgressBar, unProgressBar,-  castToProgressBar, gTypeProgressBar,-  Adjustment(Adjustment), AdjustmentClass,-  toAdjustment, -  mkAdjustment, unAdjustment,-  castToAdjustment, gTypeAdjustment,-  IMContext(IMContext), IMContextClass,-  toIMContext, -  mkIMContext, unIMContext,-  castToIMContext, gTypeIMContext,-  IMMulticontext(IMMulticontext), IMMulticontextClass,-  toIMMulticontext, -  mkIMMulticontext, unIMMulticontext,-  castToIMMulticontext, gTypeIMMulticontext,-  IMContextSimple(IMContextSimple), IMContextSimpleClass,-  toIMContextSimple, -  mkIMContextSimple, unIMContextSimple,-  castToIMContextSimple, gTypeIMContextSimple,-  TreeViewColumn(TreeViewColumn), TreeViewColumnClass,-  toTreeViewColumn, -  mkTreeViewColumn, unTreeViewColumn,-  castToTreeViewColumn, gTypeTreeViewColumn,-  CellRenderer(CellRenderer), CellRendererClass,-  toCellRenderer, -  mkCellRenderer, unCellRenderer,-  castToCellRenderer, gTypeCellRenderer,-  CellRendererSpinner(CellRendererSpinner), CellRendererSpinnerClass,-  toCellRendererSpinner, -  mkCellRendererSpinner, unCellRendererSpinner,-  castToCellRendererSpinner, gTypeCellRendererSpinner,-  CellRendererPixbuf(CellRendererPixbuf), CellRendererPixbufClass,-  toCellRendererPixbuf, -  mkCellRendererPixbuf, unCellRendererPixbuf,-  castToCellRendererPixbuf, gTypeCellRendererPixbuf,-  CellRendererText(CellRendererText), CellRendererTextClass,-  toCellRendererText, -  mkCellRendererText, unCellRendererText,-  castToCellRendererText, gTypeCellRendererText,-  CellRendererAccel(CellRendererAccel), CellRendererAccelClass,-  toCellRendererAccel, -  mkCellRendererAccel, unCellRendererAccel,-  castToCellRendererAccel, gTypeCellRendererAccel,-  CellRendererSpin(CellRendererSpin), CellRendererSpinClass,-  toCellRendererSpin, -  mkCellRendererSpin, unCellRendererSpin,-  castToCellRendererSpin, gTypeCellRendererSpin,-  CellRendererCombo(CellRendererCombo), CellRendererComboClass,-  toCellRendererCombo, -  mkCellRendererCombo, unCellRendererCombo,-  castToCellRendererCombo, gTypeCellRendererCombo,-  CellRendererToggle(CellRendererToggle), CellRendererToggleClass,-  toCellRendererToggle, -  mkCellRendererToggle, unCellRendererToggle,-  castToCellRendererToggle, gTypeCellRendererToggle,-  CellRendererProgress(CellRendererProgress), CellRendererProgressClass,-  toCellRendererProgress, -  mkCellRendererProgress, unCellRendererProgress,-  castToCellRendererProgress, gTypeCellRendererProgress,-  FileFilter(FileFilter), FileFilterClass,-  toFileFilter, -  mkFileFilter, unFileFilter,-  castToFileFilter, gTypeFileFilter,-  Builder(Builder), BuilderClass,-  toBuilder, -  mkBuilder, unBuilder,-  castToBuilder, gTypeBuilder,-  StyleContext(StyleContext), StyleContextClass,-  toStyleContext, -  mkStyleContext, unStyleContext,-  castToStyleContext, gTypeStyleContext,-  StyleProvider(StyleProvider), StyleProviderClass,-  toStyleProvider, -  mkStyleProvider, unStyleProvider,-  castToStyleProvider, gTypeStyleProvider,-  CssProvider(CssProvider), CssProviderClass,-  toCssProvider, -  mkCssProvider, unCssProvider,-  castToCssProvider, gTypeCssProvider,-  CellLayout(CellLayout), CellLayoutClass,-  toCellLayout, -  mkCellLayout, unCellLayout,-  castToCellLayout, gTypeCellLayout,-  TreeSortable(TreeSortable), TreeSortableClass,-  toTreeSortable, -  mkTreeSortable, unTreeSortable,-  castToTreeSortable, gTypeTreeSortable,-  Tooltip(Tooltip), TooltipClass,-  toTooltip, -  mkTooltip, unTooltip,-  castToTooltip, gTypeTooltip,-  StatusIcon(StatusIcon), StatusIconClass,-  toStatusIcon, -  mkStatusIcon, unStatusIcon,-  castToStatusIcon, gTypeStatusIcon,-  TreeSelection(TreeSelection), TreeSelectionClass,-  toTreeSelection, -  mkTreeSelection, unTreeSelection,-  castToTreeSelection, gTypeTreeSelection,-  TreeModel(TreeModel), TreeModelClass,-  toTreeModel, -  mkTreeModel, unTreeModel,-  castToTreeModel, gTypeTreeModel,-  TreeStore(TreeStore), TreeStoreClass,-  toTreeStore, -  mkTreeStore, unTreeStore,-  castToTreeStore, gTypeTreeStore,-  ListStore(ListStore), ListStoreClass,-  toListStore, -  mkListStore, unListStore,-  castToListStore, gTypeListStore,-  TreeModelSort(TreeModelSort), TreeModelSortClass,-  toTreeModelSort, -  mkTreeModelSort, unTreeModelSort,-  castToTreeModelSort, gTypeTreeModelSort,-  TreeModelFilter(TreeModelFilter), TreeModelFilterClass,-  toTreeModelFilter, -  mkTreeModelFilter, unTreeModelFilter,-  castToTreeModelFilter, gTypeTreeModelFilter,-  IconFactory(IconFactory), IconFactoryClass,-  toIconFactory, -  mkIconFactory, unIconFactory,-  castToIconFactory, gTypeIconFactory,-  IconTheme(IconTheme), IconThemeClass,-  toIconTheme, -  mkIconTheme, unIconTheme,-  castToIconTheme, gTypeIconTheme,-  SizeGroup(SizeGroup), SizeGroupClass,-  toSizeGroup, -  mkSizeGroup, unSizeGroup,-  castToSizeGroup, gTypeSizeGroup,-  Clipboard(Clipboard), ClipboardClass,-  toClipboard, -  mkClipboard, unClipboard,-  castToClipboard, gTypeClipboard,-  AccelGroup(AccelGroup), AccelGroupClass,-  toAccelGroup, -  mkAccelGroup, unAccelGroup,-  castToAccelGroup, gTypeAccelGroup,-  AccelMap(AccelMap), AccelMapClass,-  toAccelMap, -  mkAccelMap, unAccelMap,-  castToAccelMap, gTypeAccelMap,-  EntryCompletion(EntryCompletion), EntryCompletionClass,-  toEntryCompletion, -  mkEntryCompletion, unEntryCompletion,-  castToEntryCompletion, gTypeEntryCompletion,-  EntryBuffer(EntryBuffer), EntryBufferClass,-  toEntryBuffer, -  mkEntryBuffer, unEntryBuffer,-  castToEntryBuffer, gTypeEntryBuffer,-  Action(Action), ActionClass,-  toAction, -  mkAction, unAction,-  castToAction, gTypeAction,-  RecentAction(RecentAction), RecentActionClass,-  toRecentAction, -  mkRecentAction, unRecentAction,-  castToRecentAction, gTypeRecentAction,-  ToggleAction(ToggleAction), ToggleActionClass,-  toToggleAction, -  mkToggleAction, unToggleAction,-  castToToggleAction, gTypeToggleAction,-  RadioAction(RadioAction), RadioActionClass,-  toRadioAction, -  mkRadioAction, unRadioAction,-  castToRadioAction, gTypeRadioAction,-  ActionGroup(ActionGroup), ActionGroupClass,-  toActionGroup, -  mkActionGroup, unActionGroup,-  castToActionGroup, gTypeActionGroup,-  UIManager(UIManager), UIManagerClass,-  toUIManager, -  mkUIManager, unUIManager,-  castToUIManager, gTypeUIManager,-  WindowGroup(WindowGroup), WindowGroupClass,-  toWindowGroup, -  mkWindowGroup, unWindowGroup,-  castToWindowGroup, gTypeWindowGroup,-  CellEditable(CellEditable), CellEditableClass,-  toCellEditable, -  mkCellEditable, unCellEditable,-  castToCellEditable, gTypeCellEditable,-  Editable(Editable), EditableClass,-  toEditable, -  mkEditable, unEditable,-  castToEditable, gTypeEditable,-  FileChooser(FileChooser), FileChooserClass,-  toFileChooser, -  mkFileChooser, unFileChooser,-  castToFileChooser, gTypeFileChooser-  ) where--import Foreign.ForeignPtr (ForeignPtr, castForeignPtr)-#if __GLASGOW_HASKELL__ >= 707-import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)-#else-import Foreign.ForeignPtr (unsafeForeignPtrToPtr)-#endif-import Foreign.C.Types    (CULong(..), CUInt(..))-import System.Glib.GType  (GType, typeInstanceIsA)-{#import System.Glib.GObject#}-import Graphics.UI.Gtk.General.Threading--{# context lib="gtk" prefix="gtk" #}---- The usage of foreignPtrToPtr should be safe as the evaluation will only be--- forced if the object is used afterwards----castTo :: (GObjectClass obj, GObjectClass obj') => GType -> String-                                                -> (obj -> obj')-castTo gtype objTypeName obj =-  case toGObject obj of-    gobj@(GObject objFPtr)-      | typeInstanceIsA ((unsafeForeignPtrToPtr.castForeignPtr) objFPtr) gtype-                  -> unsafeCastGObject gobj-      | otherwise -> error $ "Cannot cast object to " ++ objTypeName----- ****************************************************************** AtkObject--{#pointer *AtkObject as AtkObject foreign newtype #} deriving (Eq,Ord)--mkAtkObject = (AtkObject, objectUnrefFromMainloop)-unAtkObject (AtkObject o) = o--class GObjectClass o => AtkObjectClass o-toAtkObject :: AtkObjectClass o => o -> AtkObject-toAtkObject = unsafeCastGObject . toGObject--instance AtkObjectClass AtkObject-instance GObjectClass AtkObject where-  toGObject = GObject . castForeignPtr . unAtkObject-  unsafeCastGObject = AtkObject . castForeignPtr . unGObject--castToAtkObject :: GObjectClass obj => obj -> AtkObject-castToAtkObject = castTo gTypeAtkObject "AtkObject"--gTypeAtkObject :: GType-gTypeAtkObject =-  {# call fun unsafe atk_object_get_type #}---- ***************************************************************** Accessible--{#pointer *GtkAccessible as Accessible foreign newtype #} deriving (Eq,Ord)--mkAccessible = (Accessible, objectUnrefFromMainloop)-unAccessible (Accessible o) = o--class AtkObjectClass o => AccessibleClass o-toAccessible :: AccessibleClass o => o -> Accessible-toAccessible = unsafeCastGObject . toGObject--instance AccessibleClass Accessible-instance AtkObjectClass Accessible-instance GObjectClass Accessible where-  toGObject = GObject . castForeignPtr . unAccessible-  unsafeCastGObject = Accessible . castForeignPtr . unGObject--castToAccessible :: GObjectClass obj => obj -> Accessible-castToAccessible = castTo gTypeAccessible "Accessible"--gTypeAccessible :: GType-gTypeAccessible =-  {# call fun unsafe gtk_accessible_get_type #}---- ********************************************************************* Keymap--{#pointer *GdkKeymap as Keymap foreign newtype #} deriving (Eq,Ord)--mkKeymap = (Keymap, objectUnrefFromMainloop)-unKeymap (Keymap o) = o--class GObjectClass o => KeymapClass o-toKeymap :: KeymapClass o => o -> Keymap-toKeymap = unsafeCastGObject . toGObject--instance KeymapClass Keymap-instance GObjectClass Keymap where-  toGObject = GObject . castForeignPtr . unKeymap-  unsafeCastGObject = Keymap . castForeignPtr . unGObject--castToKeymap :: GObjectClass obj => obj -> Keymap-castToKeymap = castTo gTypeKeymap "Keymap"--gTypeKeymap :: GType-gTypeKeymap =-  {# call fun unsafe gdk_keymap_get_type #}---- ************************************************************* DisplayManager--{#pointer *GdkDisplayManager as DisplayManager foreign newtype #} deriving (Eq,Ord)--mkDisplayManager = (DisplayManager, objectUnrefFromMainloop)-unDisplayManager (DisplayManager o) = o--class GObjectClass o => DisplayManagerClass o-toDisplayManager :: DisplayManagerClass o => o -> DisplayManager-toDisplayManager = unsafeCastGObject . toGObject--instance DisplayManagerClass DisplayManager-instance GObjectClass DisplayManager where-  toGObject = GObject . castForeignPtr . unDisplayManager-  unsafeCastGObject = DisplayManager . castForeignPtr . unGObject--castToDisplayManager :: GObjectClass obj => obj -> DisplayManager-castToDisplayManager = castTo gTypeDisplayManager "DisplayManager"--gTypeDisplayManager :: GType-gTypeDisplayManager =-  {# call fun unsafe gdk_display_manager_get_type #}---- *********************************************************** AppLaunchContext--{#pointer *GdkAppLaunchContext as AppLaunchContext foreign newtype #} deriving (Eq,Ord)--mkAppLaunchContext = (AppLaunchContext, objectUnrefFromMainloop)-unAppLaunchContext (AppLaunchContext o) = o--class GObjectClass o => AppLaunchContextClass o-toAppLaunchContext :: AppLaunchContextClass o => o -> AppLaunchContext-toAppLaunchContext = unsafeCastGObject . toGObject--instance AppLaunchContextClass AppLaunchContext-instance GObjectClass AppLaunchContext where-  toGObject = GObject . castForeignPtr . unAppLaunchContext-  unsafeCastGObject = AppLaunchContext . castForeignPtr . unGObject--castToAppLaunchContext :: GObjectClass obj => obj -> AppLaunchContext-castToAppLaunchContext = castTo gTypeAppLaunchContext "AppLaunchContext"--gTypeAppLaunchContext :: GType-gTypeAppLaunchContext =-  {# call fun unsafe gdk_app_launch_context_get_type #}---- ************************************************************** PrintSettings--{#pointer *GtkPrintSettings as PrintSettings foreign newtype #} deriving (Eq,Ord)--mkPrintSettings = (PrintSettings, objectUnrefFromMainloop)-unPrintSettings (PrintSettings o) = o--class GObjectClass o => PrintSettingsClass o-toPrintSettings :: PrintSettingsClass o => o -> PrintSettings-toPrintSettings = unsafeCastGObject . toGObject--instance PrintSettingsClass PrintSettings-instance GObjectClass PrintSettings where-  toGObject = GObject . castForeignPtr . unPrintSettings-  unsafeCastGObject = PrintSettings . castForeignPtr . unGObject--castToPrintSettings :: GObjectClass obj => obj -> PrintSettings-castToPrintSettings = castTo gTypePrintSettings "PrintSettings"--gTypePrintSettings :: GType-gTypePrintSettings =-  {# call fun unsafe gtk_print_settings_get_type #}---- ************************************************************* PrintOperation--{#pointer *GtkPrintOperation as PrintOperation foreign newtype #} deriving (Eq,Ord)--mkPrintOperation = (PrintOperation, objectUnrefFromMainloop)-unPrintOperation (PrintOperation o) = o--class GObjectClass o => PrintOperationClass o-toPrintOperation :: PrintOperationClass o => o -> PrintOperation-toPrintOperation = unsafeCastGObject . toGObject--instance PrintOperationClass PrintOperation-instance GObjectClass PrintOperation where-  toGObject = GObject . castForeignPtr . unPrintOperation-  unsafeCastGObject = PrintOperation . castForeignPtr . unGObject--castToPrintOperation :: GObjectClass obj => obj -> PrintOperation-castToPrintOperation = castTo gTypePrintOperation "PrintOperation"--gTypePrintOperation :: GType-gTypePrintOperation =-  {# call fun unsafe gtk_print_operation_get_type #}---- ****************************************************** PrintOperationPreview--{#pointer *GtkPrintOperationPreview as PrintOperationPreview foreign newtype #} deriving (Eq,Ord)--mkPrintOperationPreview = (PrintOperationPreview, objectUnrefFromMainloop)-unPrintOperationPreview (PrintOperationPreview o) = o--class GObjectClass o => PrintOperationPreviewClass o-toPrintOperationPreview :: PrintOperationPreviewClass o => o -> PrintOperationPreview-toPrintOperationPreview = unsafeCastGObject . toGObject--instance PrintOperationPreviewClass PrintOperationPreview-instance GObjectClass PrintOperationPreview where-  toGObject = GObject . castForeignPtr . unPrintOperationPreview-  unsafeCastGObject = PrintOperationPreview . castForeignPtr . unGObject--castToPrintOperationPreview :: GObjectClass obj => obj -> PrintOperationPreview-castToPrintOperationPreview = castTo gTypePrintOperationPreview "PrintOperationPreview"--gTypePrintOperationPreview :: GType-gTypePrintOperationPreview =-  {# call fun unsafe gtk_print_operation_preview_get_type #}---- ****************************************************************** PageSetup--{#pointer *GtkPageSetup as PageSetup foreign newtype #} deriving (Eq,Ord)--mkPageSetup = (PageSetup, objectUnrefFromMainloop)-unPageSetup (PageSetup o) = o--class GObjectClass o => PageSetupClass o-toPageSetup :: PageSetupClass o => o -> PageSetup-toPageSetup = unsafeCastGObject . toGObject--instance PageSetupClass PageSetup-instance GObjectClass PageSetup where-  toGObject = GObject . castForeignPtr . unPageSetup-  unsafeCastGObject = PageSetup . castForeignPtr . unGObject--castToPageSetup :: GObjectClass obj => obj -> PageSetup-castToPageSetup = castTo gTypePageSetup "PageSetup"--gTypePageSetup :: GType-gTypePageSetup =-  {# call fun unsafe gtk_page_setup_get_type #}---- *************************************************************** PrintContext--{#pointer *GtkPrintContext as PrintContext foreign newtype #} deriving (Eq,Ord)--mkPrintContext = (PrintContext, objectUnrefFromMainloop)-unPrintContext (PrintContext o) = o--class GObjectClass o => PrintContextClass o-toPrintContext :: PrintContextClass o => o -> PrintContext-toPrintContext = unsafeCastGObject . toGObject--instance PrintContextClass PrintContext-instance GObjectClass PrintContext where-  toGObject = GObject . castForeignPtr . unPrintContext-  unsafeCastGObject = PrintContext . castForeignPtr . unGObject--castToPrintContext :: GObjectClass obj => obj -> PrintContext-castToPrintContext = castTo gTypePrintContext "PrintContext"--gTypePrintContext :: GType-gTypePrintContext =-  {# call fun unsafe gtk_print_context_get_type #}---- ************************************************************** RecentChooser--{#pointer *GtkRecentChooser as RecentChooser foreign newtype #} deriving (Eq,Ord)--mkRecentChooser = (RecentChooser, objectUnrefFromMainloop)-unRecentChooser (RecentChooser o) = o--class GObjectClass o => RecentChooserClass o-toRecentChooser :: RecentChooserClass o => o -> RecentChooser-toRecentChooser = unsafeCastGObject . toGObject--instance RecentChooserClass RecentChooser-instance GObjectClass RecentChooser where-  toGObject = GObject . castForeignPtr . unRecentChooser-  unsafeCastGObject = RecentChooser . castForeignPtr . unGObject--castToRecentChooser :: GObjectClass obj => obj -> RecentChooser-castToRecentChooser = castTo gTypeRecentChooser "RecentChooser"--gTypeRecentChooser :: GType-gTypeRecentChooser =-  {# call fun unsafe gtk_recent_chooser_get_type #}---- ************************************************************** RecentManager--{#pointer *GtkRecentManager as RecentManager foreign newtype #} deriving (Eq,Ord)--mkRecentManager = (RecentManager, objectUnrefFromMainloop)-unRecentManager (RecentManager o) = o--class GObjectClass o => RecentManagerClass o-toRecentManager :: RecentManagerClass o => o -> RecentManager-toRecentManager = unsafeCastGObject . toGObject--instance RecentManagerClass RecentManager-instance GObjectClass RecentManager where-  toGObject = GObject . castForeignPtr . unRecentManager-  unsafeCastGObject = RecentManager . castForeignPtr . unGObject--castToRecentManager :: GObjectClass obj => obj -> RecentManager-castToRecentManager = castTo gTypeRecentManager "RecentManager"--gTypeRecentManager :: GType-gTypeRecentManager =-  {# call fun unsafe gtk_recent_manager_get_type #}---- ***************************************************************** DrawWindow--{#pointer *GdkWindow as DrawWindow foreign newtype #} deriving (Eq,Ord)--mkDrawWindow = (DrawWindow, objectUnrefFromMainloop)-unDrawWindow (DrawWindow o) = o--class GObjectClass o => DrawWindowClass o-toDrawWindow :: DrawWindowClass o => o -> DrawWindow-toDrawWindow = unsafeCastGObject . toGObject--instance DrawWindowClass DrawWindow-instance GObjectClass DrawWindow where-  toGObject = GObject . castForeignPtr . unDrawWindow-  unsafeCastGObject = DrawWindow . castForeignPtr . unGObject--castToDrawWindow :: GObjectClass obj => obj -> DrawWindow-castToDrawWindow = castTo gTypeDrawWindow "DrawWindow"--gTypeDrawWindow :: GType-gTypeDrawWindow =-  {# call fun unsafe gdk_window_get_type #}---- ********************************************************************* Screen--{#pointer *GdkScreen as Screen foreign newtype #} deriving (Eq,Ord)--mkScreen = (Screen, objectUnrefFromMainloop)-unScreen (Screen o) = o--class GObjectClass o => ScreenClass o-toScreen :: ScreenClass o => o -> Screen-toScreen = unsafeCastGObject . toGObject--instance ScreenClass Screen-instance GObjectClass Screen where-  toGObject = GObject . castForeignPtr . unScreen-  unsafeCastGObject = Screen . castForeignPtr . unGObject--castToScreen :: GObjectClass obj => obj -> Screen-castToScreen = castTo gTypeScreen "Screen"--gTypeScreen :: GType-gTypeScreen =-  {# call fun unsafe gdk_screen_get_type #}---- ******************************************************************** Display--{#pointer *GdkDisplay as Display foreign newtype #} deriving (Eq,Ord)--mkDisplay = (Display, objectUnrefFromMainloop)-unDisplay (Display o) = o--class GObjectClass o => DisplayClass o-toDisplay :: DisplayClass o => o -> Display-toDisplay = unsafeCastGObject . toGObject--instance DisplayClass Display-instance GObjectClass Display where-  toGObject = GObject . castForeignPtr . unDisplay-  unsafeCastGObject = Display . castForeignPtr . unGObject--castToDisplay :: GObjectClass obj => obj -> Display-castToDisplay = castTo gTypeDisplay "Display"--gTypeDisplay :: GType-gTypeDisplay =-  {# call fun unsafe gdk_display_get_type #}---- ********************************************************************* Visual--{#pointer *GdkVisual as Visual foreign newtype #} deriving (Eq,Ord)--mkVisual = (Visual, objectUnrefFromMainloop)-unVisual (Visual o) = o--class GObjectClass o => VisualClass o-toVisual :: VisualClass o => o -> Visual-toVisual = unsafeCastGObject . toGObject--instance VisualClass Visual-instance GObjectClass Visual where-  toGObject = GObject . castForeignPtr . unVisual-  unsafeCastGObject = Visual . castForeignPtr . unGObject--castToVisual :: GObjectClass obj => obj -> Visual-castToVisual = castTo gTypeVisual "Visual"--gTypeVisual :: GType-gTypeVisual =-  {# call fun unsafe gdk_visual_get_type #}---- ********************************************************************* Device--{#pointer *GdkDevice as Device foreign newtype #} deriving (Eq,Ord)--mkDevice = (Device, objectUnrefFromMainloop)-unDevice (Device o) = o--class GObjectClass o => DeviceClass o-toDevice :: DeviceClass o => o -> Device-toDevice = unsafeCastGObject . toGObject--instance DeviceClass Device-instance GObjectClass Device where-  toGObject = GObject . castForeignPtr . unDevice-  unsafeCastGObject = Device . castForeignPtr . unGObject--castToDevice :: GObjectClass obj => obj -> Device-castToDevice = castTo gTypeDevice "Device"--gTypeDevice :: GType-gTypeDevice =-  {# call fun unsafe gdk_device_get_type #}---- ******************************************************************* Settings--{#pointer *GtkSettings as Settings foreign newtype #} deriving (Eq,Ord)--mkSettings = (Settings, objectUnrefFromMainloop)-unSettings (Settings o) = o--class GObjectClass o => SettingsClass o-toSettings :: SettingsClass o => o -> Settings-toSettings = unsafeCastGObject . toGObject--instance SettingsClass Settings-instance GObjectClass Settings where-  toGObject = GObject . castForeignPtr . unSettings-  unsafeCastGObject = Settings . castForeignPtr . unGObject--castToSettings :: GObjectClass obj => obj -> Settings-castToSettings = castTo gTypeSettings "Settings"--gTypeSettings :: GType-gTypeSettings =-  {# call fun unsafe gtk_settings_get_type #}---- ***************************************************************** TextBuffer--{#pointer *GtkTextBuffer as TextBuffer foreign newtype #} deriving (Eq,Ord)--mkTextBuffer = (TextBuffer, objectUnrefFromMainloop)-unTextBuffer (TextBuffer o) = o--class GObjectClass o => TextBufferClass o-toTextBuffer :: TextBufferClass o => o -> TextBuffer-toTextBuffer = unsafeCastGObject . toGObject--instance TextBufferClass TextBuffer-instance GObjectClass TextBuffer where-  toGObject = GObject . castForeignPtr . unTextBuffer-  unsafeCastGObject = TextBuffer . castForeignPtr . unGObject--castToTextBuffer :: GObjectClass obj => obj -> TextBuffer-castToTextBuffer = castTo gTypeTextBuffer "TextBuffer"--gTypeTextBuffer :: GType-gTypeTextBuffer =-  {# call fun unsafe gtk_text_buffer_get_type #}---- ******************************************************************** TextTag--{#pointer *GtkTextTag as TextTag foreign newtype #} deriving (Eq,Ord)--mkTextTag = (TextTag, objectUnrefFromMainloop)-unTextTag (TextTag o) = o--class GObjectClass o => TextTagClass o-toTextTag :: TextTagClass o => o -> TextTag-toTextTag = unsafeCastGObject . toGObject--instance TextTagClass TextTag-instance GObjectClass TextTag where-  toGObject = GObject . castForeignPtr . unTextTag-  unsafeCastGObject = TextTag . castForeignPtr . unGObject--castToTextTag :: GObjectClass obj => obj -> TextTag-castToTextTag = castTo gTypeTextTag "TextTag"--gTypeTextTag :: GType-gTypeTextTag =-  {# call fun unsafe gtk_text_tag_get_type #}---- *************************************************************** TextTagTable--{#pointer *GtkTextTagTable as TextTagTable foreign newtype #} deriving (Eq,Ord)--mkTextTagTable = (TextTagTable, objectUnrefFromMainloop)-unTextTagTable (TextTagTable o) = o--class GObjectClass o => TextTagTableClass o-toTextTagTable :: TextTagTableClass o => o -> TextTagTable-toTextTagTable = unsafeCastGObject . toGObject--instance TextTagTableClass TextTagTable-instance GObjectClass TextTagTable where-  toGObject = GObject . castForeignPtr . unTextTagTable-  unsafeCastGObject = TextTagTable . castForeignPtr . unGObject--castToTextTagTable :: GObjectClass obj => obj -> TextTagTable-castToTextTagTable = castTo gTypeTextTagTable "TextTagTable"--gTypeTextTagTable :: GType-gTypeTextTagTable =-  {# call fun unsafe gtk_text_tag_table_get_type #}---- ********************************************************************** Style--{#pointer *GtkStyle as Style foreign newtype #} deriving (Eq,Ord)--mkStyle = (Style, objectUnrefFromMainloop)-unStyle (Style o) = o--class GObjectClass o => StyleClass o-toStyle :: StyleClass o => o -> Style-toStyle = unsafeCastGObject . toGObject--instance StyleClass Style-instance GObjectClass Style where-  toGObject = GObject . castForeignPtr . unStyle-  unsafeCastGObject = Style . castForeignPtr . unGObject--castToStyle :: GObjectClass obj => obj -> Style-castToStyle = castTo gTypeStyle "Style"--gTypeStyle :: GType-gTypeStyle =-  {# call fun unsafe gtk_style_get_type #}---- ******************************************************************** RcStyle--{#pointer *GtkRcStyle as RcStyle foreign newtype #} deriving (Eq,Ord)--mkRcStyle = (RcStyle, objectUnrefFromMainloop)-unRcStyle (RcStyle o) = o--class GObjectClass o => RcStyleClass o-toRcStyle :: RcStyleClass o => o -> RcStyle-toRcStyle = unsafeCastGObject . toGObject--instance RcStyleClass RcStyle-instance GObjectClass RcStyle where-  toGObject = GObject . castForeignPtr . unRcStyle-  unsafeCastGObject = RcStyle . castForeignPtr . unGObject--castToRcStyle :: GObjectClass obj => obj -> RcStyle-castToRcStyle = castTo gTypeRcStyle "RcStyle"--gTypeRcStyle :: GType-gTypeRcStyle =-  {# call fun unsafe gtk_rc_style_get_type #}---- **************************************************************** DragContext--{#pointer *GdkDragContext as DragContext foreign newtype #} deriving (Eq,Ord)--mkDragContext = (DragContext, objectUnrefFromMainloop)-unDragContext (DragContext o) = o--class GObjectClass o => DragContextClass o-toDragContext :: DragContextClass o => o -> DragContext-toDragContext = unsafeCastGObject . toGObject--instance DragContextClass DragContext-instance GObjectClass DragContext where-  toGObject = GObject . castForeignPtr . unDragContext-  unsafeCastGObject = DragContext . castForeignPtr . unGObject--castToDragContext :: GObjectClass obj => obj -> DragContext-castToDragContext = castTo gTypeDragContext "DragContext"--gTypeDragContext :: GType-gTypeDragContext =-  {# call fun unsafe gdk_drag_context_get_type #}---- ********************************************************************* Pixbuf--{#pointer *GdkPixbuf as Pixbuf foreign newtype #} deriving (Eq,Ord)--mkPixbuf = (Pixbuf, objectUnref)-unPixbuf (Pixbuf o) = o--class GObjectClass o => PixbufClass o-toPixbuf :: PixbufClass o => o -> Pixbuf-toPixbuf = unsafeCastGObject . toGObject--instance PixbufClass Pixbuf-instance GObjectClass Pixbuf where-  toGObject = GObject . castForeignPtr . unPixbuf-  unsafeCastGObject = Pixbuf . castForeignPtr . unGObject--castToPixbuf :: GObjectClass obj => obj -> Pixbuf-castToPixbuf = castTo gTypePixbuf "Pixbuf"--gTypePixbuf :: GType-gTypePixbuf =-  {# call fun unsafe gdk_pixbuf_get_type #}---- ************************************************************ PixbufAnimation--{#pointer *GdkPixbufAnimation as PixbufAnimation foreign newtype #} deriving (Eq,Ord)--mkPixbufAnimation = (PixbufAnimation, objectUnref)-unPixbufAnimation (PixbufAnimation o) = o--class GObjectClass o => PixbufAnimationClass o-toPixbufAnimation :: PixbufAnimationClass o => o -> PixbufAnimation-toPixbufAnimation = unsafeCastGObject . toGObject--instance PixbufAnimationClass PixbufAnimation-instance GObjectClass PixbufAnimation where-  toGObject = GObject . castForeignPtr . unPixbufAnimation-  unsafeCastGObject = PixbufAnimation . castForeignPtr . unGObject--castToPixbufAnimation :: GObjectClass obj => obj -> PixbufAnimation-castToPixbufAnimation = castTo gTypePixbufAnimation "PixbufAnimation"--gTypePixbufAnimation :: GType-gTypePixbufAnimation =-  {# call fun unsafe gdk_pixbuf_animation_get_type #}---- *********************************************************** PixbufSimpleAnim--{#pointer *GdkPixbufSimpleAnim as PixbufSimpleAnim foreign newtype #} deriving (Eq,Ord)--mkPixbufSimpleAnim = (PixbufSimpleAnim, objectUnref)-unPixbufSimpleAnim (PixbufSimpleAnim o) = o--class PixbufAnimationClass o => PixbufSimpleAnimClass o-toPixbufSimpleAnim :: PixbufSimpleAnimClass o => o -> PixbufSimpleAnim-toPixbufSimpleAnim = unsafeCastGObject . toGObject--instance PixbufSimpleAnimClass PixbufSimpleAnim-instance PixbufAnimationClass PixbufSimpleAnim-instance GObjectClass PixbufSimpleAnim where-  toGObject = GObject . castForeignPtr . unPixbufSimpleAnim-  unsafeCastGObject = PixbufSimpleAnim . castForeignPtr . unGObject--castToPixbufSimpleAnim :: GObjectClass obj => obj -> PixbufSimpleAnim-castToPixbufSimpleAnim = castTo gTypePixbufSimpleAnim "PixbufSimpleAnim"--gTypePixbufSimpleAnim :: GType-gTypePixbufSimpleAnim =-  {# call fun unsafe gdk_pixbuf_simple_anim_get_type #}---- ******************************************************** PixbufAnimationIter--{#pointer *GdkPixbufAnimationIter as PixbufAnimationIter foreign newtype #} deriving (Eq,Ord)--mkPixbufAnimationIter = (PixbufAnimationIter, objectUnref)-unPixbufAnimationIter (PixbufAnimationIter o) = o--class GObjectClass o => PixbufAnimationIterClass o-toPixbufAnimationIter :: PixbufAnimationIterClass o => o -> PixbufAnimationIter-toPixbufAnimationIter = unsafeCastGObject . toGObject--instance PixbufAnimationIterClass PixbufAnimationIter-instance GObjectClass PixbufAnimationIter where-  toGObject = GObject . castForeignPtr . unPixbufAnimationIter-  unsafeCastGObject = PixbufAnimationIter . castForeignPtr . unGObject--castToPixbufAnimationIter :: GObjectClass obj => obj -> PixbufAnimationIter-castToPixbufAnimationIter = castTo gTypePixbufAnimationIter "PixbufAnimationIter"--gTypePixbufAnimationIter :: GType-gTypePixbufAnimationIter =-  {# call fun unsafe gdk_pixbuf_animation_iter_get_type #}---- ************************************************************ TextChildAnchor--{#pointer *GtkTextChildAnchor as TextChildAnchor foreign newtype #} deriving (Eq,Ord)--mkTextChildAnchor = (TextChildAnchor, objectUnrefFromMainloop)-unTextChildAnchor (TextChildAnchor o) = o--class GObjectClass o => TextChildAnchorClass o-toTextChildAnchor :: TextChildAnchorClass o => o -> TextChildAnchor-toTextChildAnchor = unsafeCastGObject . toGObject--instance TextChildAnchorClass TextChildAnchor-instance GObjectClass TextChildAnchor where-  toGObject = GObject . castForeignPtr . unTextChildAnchor-  unsafeCastGObject = TextChildAnchor . castForeignPtr . unGObject--castToTextChildAnchor :: GObjectClass obj => obj -> TextChildAnchor-castToTextChildAnchor = castTo gTypeTextChildAnchor "TextChildAnchor"--gTypeTextChildAnchor :: GType-gTypeTextChildAnchor =-  {# call fun unsafe gtk_text_child_anchor_get_type #}---- ******************************************************************* TextMark--{#pointer *GtkTextMark as TextMark foreign newtype #} deriving (Eq,Ord)--mkTextMark = (TextMark, objectUnrefFromMainloop)-unTextMark (TextMark o) = o--class GObjectClass o => TextMarkClass o-toTextMark :: TextMarkClass o => o -> TextMark-toTextMark = unsafeCastGObject . toGObject--instance TextMarkClass TextMark-instance GObjectClass TextMark where-  toGObject = GObject . castForeignPtr . unTextMark-  unsafeCastGObject = TextMark . castForeignPtr . unGObject--castToTextMark :: GObjectClass obj => obj -> TextMark-castToTextMark = castTo gTypeTextMark "TextMark"--gTypeTextMark :: GType-gTypeTextMark =-  {# call fun unsafe gtk_text_mark_get_type #}---- *************************************************************** RecentFilter--{#pointer *GtkRecentFilter as RecentFilter foreign newtype #} deriving (Eq,Ord)--mkRecentFilter = (RecentFilter, objectUnrefFromMainloop)-unRecentFilter (RecentFilter o) = o--class GObjectClass o => RecentFilterClass o-toRecentFilter :: RecentFilterClass o => o -> RecentFilter-toRecentFilter = unsafeCastGObject . toGObject--instance RecentFilterClass RecentFilter-instance GObjectClass RecentFilter where-  toGObject = GObject . castForeignPtr . unRecentFilter-  unsafeCastGObject = RecentFilter . castForeignPtr . unGObject--castToRecentFilter :: GObjectClass obj => obj -> RecentFilter-castToRecentFilter = castTo gTypeRecentFilter "RecentFilter"--gTypeRecentFilter :: GType-gTypeRecentFilter =-  {# call fun unsafe gtk_recent_filter_get_type #}---- ********************************************************************* Widget--{#pointer *GtkWidget as Widget foreign newtype #} deriving (Eq,Ord)--mkWidget = (Widget, objectUnrefFromMainloop)-unWidget (Widget o) = o--class GObjectClass o => WidgetClass o-toWidget :: WidgetClass o => o -> Widget-toWidget = unsafeCastGObject . toGObject--instance WidgetClass Widget-instance GObjectClass Widget where-  toGObject = GObject . castForeignPtr . unWidget-  unsafeCastGObject = Widget . castForeignPtr . unGObject--castToWidget :: GObjectClass obj => obj -> Widget-castToWidget = castTo gTypeWidget "Widget"--gTypeWidget :: GType-gTypeWidget =-  {# call fun unsafe gtk_widget_get_type #}---- ************************************************************************ HSV--{#pointer *GtkHSV as HSV foreign newtype #} deriving (Eq,Ord)--mkHSV = (HSV, objectUnrefFromMainloop)-unHSV (HSV o) = o--class WidgetClass o => HSVClass o-toHSV :: HSVClass o => o -> HSV-toHSV = unsafeCastGObject . toGObject--instance HSVClass HSV-instance WidgetClass HSV-instance GObjectClass HSV where-  toGObject = GObject . castForeignPtr . unHSV-  unsafeCastGObject = HSV . castForeignPtr . unGObject--castToHSV :: GObjectClass obj => obj -> HSV-castToHSV = castTo gTypeHSV "HSV"--gTypeHSV :: GType-gTypeHSV =-  {# call fun unsafe gtk_hsv_get_type #}---- *********************************************************************** Misc--{#pointer *GtkMisc as Misc foreign newtype #} deriving (Eq,Ord)--mkMisc = (Misc, objectUnrefFromMainloop)-unMisc (Misc o) = o--class WidgetClass o => MiscClass o-toMisc :: MiscClass o => o -> Misc-toMisc = unsafeCastGObject . toGObject--instance MiscClass Misc-instance WidgetClass Misc-instance GObjectClass Misc where-  toGObject = GObject . castForeignPtr . unMisc-  unsafeCastGObject = Misc . castForeignPtr . unGObject--castToMisc :: GObjectClass obj => obj -> Misc-castToMisc = castTo gTypeMisc "Misc"--gTypeMisc :: GType-gTypeMisc =-  {# call fun unsafe gtk_misc_get_type #}---- ********************************************************************** Label--{#pointer *GtkLabel as Label foreign newtype #} deriving (Eq,Ord)--mkLabel = (Label, objectUnrefFromMainloop)-unLabel (Label o) = o--class MiscClass o => LabelClass o-toLabel :: LabelClass o => o -> Label-toLabel = unsafeCastGObject . toGObject--instance LabelClass Label-instance MiscClass Label-instance WidgetClass Label-instance GObjectClass Label where-  toGObject = GObject . castForeignPtr . unLabel-  unsafeCastGObject = Label . castForeignPtr . unGObject--castToLabel :: GObjectClass obj => obj -> Label-castToLabel = castTo gTypeLabel "Label"--gTypeLabel :: GType-gTypeLabel =-  {# call fun unsafe gtk_label_get_type #}---- ***************************************************************** AccelLabel--{#pointer *GtkAccelLabel as AccelLabel foreign newtype #} deriving (Eq,Ord)--mkAccelLabel = (AccelLabel, objectUnrefFromMainloop)-unAccelLabel (AccelLabel o) = o--class LabelClass o => AccelLabelClass o-toAccelLabel :: AccelLabelClass o => o -> AccelLabel-toAccelLabel = unsafeCastGObject . toGObject--instance AccelLabelClass AccelLabel-instance LabelClass AccelLabel-instance MiscClass AccelLabel-instance WidgetClass AccelLabel-instance GObjectClass AccelLabel where-  toGObject = GObject . castForeignPtr . unAccelLabel-  unsafeCastGObject = AccelLabel . castForeignPtr . unGObject--castToAccelLabel :: GObjectClass obj => obj -> AccelLabel-castToAccelLabel = castTo gTypeAccelLabel "AccelLabel"--gTypeAccelLabel :: GType-gTypeAccelLabel =-  {# call fun unsafe gtk_accel_label_get_type #}---- ********************************************************************** Arrow--{#pointer *GtkArrow as Arrow foreign newtype #} deriving (Eq,Ord)--mkArrow = (Arrow, objectUnrefFromMainloop)-unArrow (Arrow o) = o--class MiscClass o => ArrowClass o-toArrow :: ArrowClass o => o -> Arrow-toArrow = unsafeCastGObject . toGObject--instance ArrowClass Arrow-instance MiscClass Arrow-instance WidgetClass Arrow-instance GObjectClass Arrow where-  toGObject = GObject . castForeignPtr . unArrow-  unsafeCastGObject = Arrow . castForeignPtr . unGObject--castToArrow :: GObjectClass obj => obj -> Arrow-castToArrow = castTo gTypeArrow "Arrow"--gTypeArrow :: GType-gTypeArrow =-  {# call fun unsafe gtk_arrow_get_type #}---- ********************************************************************** Image--{#pointer *GtkImage as Image foreign newtype #} deriving (Eq,Ord)--mkImage = (Image, objectUnrefFromMainloop)-unImage (Image o) = o--class MiscClass o => ImageClass o-toImage :: ImageClass o => o -> Image-toImage = unsafeCastGObject . toGObject--instance ImageClass Image-instance MiscClass Image-instance WidgetClass Image-instance GObjectClass Image where-  toGObject = GObject . castForeignPtr . unImage-  unsafeCastGObject = Image . castForeignPtr . unGObject--castToImage :: GObjectClass obj => obj -> Image-castToImage = castTo gTypeImage "Image"--gTypeImage :: GType-gTypeImage =-  {# call fun unsafe gtk_image_get_type #}---- ****************************************************************** Container--{#pointer *GtkContainer as Container foreign newtype #} deriving (Eq,Ord)--mkContainer = (Container, objectUnrefFromMainloop)-unContainer (Container o) = o--class WidgetClass o => ContainerClass o-toContainer :: ContainerClass o => o -> Container-toContainer = unsafeCastGObject . toGObject--instance ContainerClass Container-instance WidgetClass Container-instance GObjectClass Container where-  toGObject = GObject . castForeignPtr . unContainer-  unsafeCastGObject = Container . castForeignPtr . unGObject--castToContainer :: GObjectClass obj => obj -> Container-castToContainer = castTo gTypeContainer "Container"--gTypeContainer :: GType-gTypeContainer =-  {# call fun unsafe gtk_container_get_type #}---- **************************************************************** ToolPalette--{#pointer *GtkToolPalette as ToolPalette foreign newtype #} deriving (Eq,Ord)--mkToolPalette = (ToolPalette, objectUnrefFromMainloop)-unToolPalette (ToolPalette o) = o--class ContainerClass o => ToolPaletteClass o-toToolPalette :: ToolPaletteClass o => o -> ToolPalette-toToolPalette = unsafeCastGObject . toGObject--instance ToolPaletteClass ToolPalette-instance ContainerClass ToolPalette-instance WidgetClass ToolPalette-instance GObjectClass ToolPalette where-  toGObject = GObject . castForeignPtr . unToolPalette-  unsafeCastGObject = ToolPalette . castForeignPtr . unGObject--castToToolPalette :: GObjectClass obj => obj -> ToolPalette-castToToolPalette = castTo gTypeToolPalette "ToolPalette"--gTypeToolPalette :: GType-gTypeToolPalette =-  {# call fun unsafe gtk_tool_palette_get_type #}---- ************************************************************** ToolItemGroup--{#pointer *GtkToolItemGroup as ToolItemGroup foreign newtype #} deriving (Eq,Ord)--mkToolItemGroup = (ToolItemGroup, objectUnrefFromMainloop)-unToolItemGroup (ToolItemGroup o) = o--class ContainerClass o => ToolItemGroupClass o-toToolItemGroup :: ToolItemGroupClass o => o -> ToolItemGroup-toToolItemGroup = unsafeCastGObject . toGObject--instance ToolItemGroupClass ToolItemGroup-instance ContainerClass ToolItemGroup-instance WidgetClass ToolItemGroup-instance GObjectClass ToolItemGroup where-  toGObject = GObject . castForeignPtr . unToolItemGroup-  unsafeCastGObject = ToolItemGroup . castForeignPtr . unGObject--castToToolItemGroup :: GObjectClass obj => obj -> ToolItemGroup-castToToolItemGroup = castTo gTypeToolItemGroup "ToolItemGroup"--gTypeToolItemGroup :: GType-gTypeToolItemGroup =-  {# call fun unsafe gtk_tool_item_group_get_type #}---- ************************************************************************ Bin--{#pointer *GtkBin as Bin foreign newtype #} deriving (Eq,Ord)--mkBin = (Bin, objectUnrefFromMainloop)-unBin (Bin o) = o--class ContainerClass o => BinClass o-toBin :: BinClass o => o -> Bin-toBin = unsafeCastGObject . toGObject--instance BinClass Bin-instance ContainerClass Bin-instance WidgetClass Bin-instance GObjectClass Bin where-  toGObject = GObject . castForeignPtr . unBin-  unsafeCastGObject = Bin . castForeignPtr . unGObject--castToBin :: GObjectClass obj => obj -> Bin-castToBin = castTo gTypeBin "Bin"--gTypeBin :: GType-gTypeBin =-  {# call fun unsafe gtk_bin_get_type #}---- ****************************************************************** Alignment--{#pointer *GtkAlignment as Alignment foreign newtype #} deriving (Eq,Ord)--mkAlignment = (Alignment, objectUnrefFromMainloop)-unAlignment (Alignment o) = o--class BinClass o => AlignmentClass o-toAlignment :: AlignmentClass o => o -> Alignment-toAlignment = unsafeCastGObject . toGObject--instance AlignmentClass Alignment-instance BinClass Alignment-instance ContainerClass Alignment-instance WidgetClass Alignment-instance GObjectClass Alignment where-  toGObject = GObject . castForeignPtr . unAlignment-  unsafeCastGObject = Alignment . castForeignPtr . unGObject--castToAlignment :: GObjectClass obj => obj -> Alignment-castToAlignment = castTo gTypeAlignment "Alignment"--gTypeAlignment :: GType-gTypeAlignment =-  {# call fun unsafe gtk_alignment_get_type #}---- ********************************************************************** Frame--{#pointer *GtkFrame as Frame foreign newtype #} deriving (Eq,Ord)--mkFrame = (Frame, objectUnrefFromMainloop)-unFrame (Frame o) = o--class BinClass o => FrameClass o-toFrame :: FrameClass o => o -> Frame-toFrame = unsafeCastGObject . toGObject--instance FrameClass Frame-instance BinClass Frame-instance ContainerClass Frame-instance WidgetClass Frame-instance GObjectClass Frame where-  toGObject = GObject . castForeignPtr . unFrame-  unsafeCastGObject = Frame . castForeignPtr . unGObject--castToFrame :: GObjectClass obj => obj -> Frame-castToFrame = castTo gTypeFrame "Frame"--gTypeFrame :: GType-gTypeFrame =-  {# call fun unsafe gtk_frame_get_type #}---- **************************************************************** AspectFrame--{#pointer *GtkAspectFrame as AspectFrame foreign newtype #} deriving (Eq,Ord)--mkAspectFrame = (AspectFrame, objectUnrefFromMainloop)-unAspectFrame (AspectFrame o) = o--class FrameClass o => AspectFrameClass o-toAspectFrame :: AspectFrameClass o => o -> AspectFrame-toAspectFrame = unsafeCastGObject . toGObject--instance AspectFrameClass AspectFrame-instance FrameClass AspectFrame-instance BinClass AspectFrame-instance ContainerClass AspectFrame-instance WidgetClass AspectFrame-instance GObjectClass AspectFrame where-  toGObject = GObject . castForeignPtr . unAspectFrame-  unsafeCastGObject = AspectFrame . castForeignPtr . unGObject--castToAspectFrame :: GObjectClass obj => obj -> AspectFrame-castToAspectFrame = castTo gTypeAspectFrame "AspectFrame"--gTypeAspectFrame :: GType-gTypeAspectFrame =-  {# call fun unsafe gtk_aspect_frame_get_type #}---- ********************************************************************* Button--{#pointer *GtkButton as Button foreign newtype #} deriving (Eq,Ord)--mkButton = (Button, objectUnrefFromMainloop)-unButton (Button o) = o--class BinClass o => ButtonClass o-toButton :: ButtonClass o => o -> Button-toButton = unsafeCastGObject . toGObject--instance ButtonClass Button-instance BinClass Button-instance ContainerClass Button-instance WidgetClass Button-instance GObjectClass Button where-  toGObject = GObject . castForeignPtr . unButton-  unsafeCastGObject = Button . castForeignPtr . unGObject--castToButton :: GObjectClass obj => obj -> Button-castToButton = castTo gTypeButton "Button"--gTypeButton :: GType-gTypeButton =-  {# call fun unsafe gtk_button_get_type #}---- **************************************************************** ScaleButton--{#pointer *GtkScaleButton as ScaleButton foreign newtype #} deriving (Eq,Ord)--mkScaleButton = (ScaleButton, objectUnrefFromMainloop)-unScaleButton (ScaleButton o) = o--class ButtonClass o => ScaleButtonClass o-toScaleButton :: ScaleButtonClass o => o -> ScaleButton-toScaleButton = unsafeCastGObject . toGObject--instance ScaleButtonClass ScaleButton-instance ButtonClass ScaleButton-instance BinClass ScaleButton-instance ContainerClass ScaleButton-instance WidgetClass ScaleButton-instance GObjectClass ScaleButton where-  toGObject = GObject . castForeignPtr . unScaleButton-  unsafeCastGObject = ScaleButton . castForeignPtr . unGObject--castToScaleButton :: GObjectClass obj => obj -> ScaleButton-castToScaleButton = castTo gTypeScaleButton "ScaleButton"--gTypeScaleButton :: GType-gTypeScaleButton =-  {# call fun unsafe gtk_scale_button_get_type #}---- *************************************************************** VolumeButton--{#pointer *GtkVolumeButton as VolumeButton foreign newtype #} deriving (Eq,Ord)--mkVolumeButton = (VolumeButton, objectUnrefFromMainloop)-unVolumeButton (VolumeButton o) = o--class ScaleButtonClass o => VolumeButtonClass o-toVolumeButton :: VolumeButtonClass o => o -> VolumeButton-toVolumeButton = unsafeCastGObject . toGObject--instance VolumeButtonClass VolumeButton-instance ScaleButtonClass VolumeButton-instance ButtonClass VolumeButton-instance BinClass VolumeButton-instance ContainerClass VolumeButton-instance WidgetClass VolumeButton-instance GObjectClass VolumeButton where-  toGObject = GObject . castForeignPtr . unVolumeButton-  unsafeCastGObject = VolumeButton . castForeignPtr . unGObject--castToVolumeButton :: GObjectClass obj => obj -> VolumeButton-castToVolumeButton = castTo gTypeVolumeButton "VolumeButton"--gTypeVolumeButton :: GType-gTypeVolumeButton =-  {# call fun unsafe gtk_volume_button_get_type #}---- ***************************************************************** LinkButton--{#pointer *GtkLinkButton as LinkButton foreign newtype #} deriving (Eq,Ord)--mkLinkButton = (LinkButton, objectUnrefFromMainloop)-unLinkButton (LinkButton o) = o--class ButtonClass o => LinkButtonClass o-toLinkButton :: LinkButtonClass o => o -> LinkButton-toLinkButton = unsafeCastGObject . toGObject--instance LinkButtonClass LinkButton-instance ButtonClass LinkButton-instance BinClass LinkButton-instance ContainerClass LinkButton-instance WidgetClass LinkButton-instance GObjectClass LinkButton where-  toGObject = GObject . castForeignPtr . unLinkButton-  unsafeCastGObject = LinkButton . castForeignPtr . unGObject--castToLinkButton :: GObjectClass obj => obj -> LinkButton-castToLinkButton = castTo gTypeLinkButton "LinkButton"--gTypeLinkButton :: GType-gTypeLinkButton =-  {# call fun unsafe gtk_link_button_get_type #}---- *************************************************************** ToggleButton--{#pointer *GtkToggleButton as ToggleButton foreign newtype #} deriving (Eq,Ord)--mkToggleButton = (ToggleButton, objectUnrefFromMainloop)-unToggleButton (ToggleButton o) = o--class ButtonClass o => ToggleButtonClass o-toToggleButton :: ToggleButtonClass o => o -> ToggleButton-toToggleButton = unsafeCastGObject . toGObject--instance ToggleButtonClass ToggleButton-instance ButtonClass ToggleButton-instance BinClass ToggleButton-instance ContainerClass ToggleButton-instance WidgetClass ToggleButton-instance GObjectClass ToggleButton where-  toGObject = GObject . castForeignPtr . unToggleButton-  unsafeCastGObject = ToggleButton . castForeignPtr . unGObject--castToToggleButton :: GObjectClass obj => obj -> ToggleButton-castToToggleButton = castTo gTypeToggleButton "ToggleButton"--gTypeToggleButton :: GType-gTypeToggleButton =-  {# call fun unsafe gtk_toggle_button_get_type #}---- **************************************************************** CheckButton--{#pointer *GtkCheckButton as CheckButton foreign newtype #} deriving (Eq,Ord)--mkCheckButton = (CheckButton, objectUnrefFromMainloop)-unCheckButton (CheckButton o) = o--class ToggleButtonClass o => CheckButtonClass o-toCheckButton :: CheckButtonClass o => o -> CheckButton-toCheckButton = unsafeCastGObject . toGObject--instance CheckButtonClass CheckButton-instance ToggleButtonClass CheckButton-instance ButtonClass CheckButton-instance BinClass CheckButton-instance ContainerClass CheckButton-instance WidgetClass CheckButton-instance GObjectClass CheckButton where-  toGObject = GObject . castForeignPtr . unCheckButton-  unsafeCastGObject = CheckButton . castForeignPtr . unGObject--castToCheckButton :: GObjectClass obj => obj -> CheckButton-castToCheckButton = castTo gTypeCheckButton "CheckButton"--gTypeCheckButton :: GType-gTypeCheckButton =-  {# call fun unsafe gtk_check_button_get_type #}---- **************************************************************** RadioButton--{#pointer *GtkRadioButton as RadioButton foreign newtype #} deriving (Eq,Ord)--mkRadioButton = (RadioButton, objectUnrefFromMainloop)-unRadioButton (RadioButton o) = o--class CheckButtonClass o => RadioButtonClass o-toRadioButton :: RadioButtonClass o => o -> RadioButton-toRadioButton = unsafeCastGObject . toGObject--instance RadioButtonClass RadioButton-instance CheckButtonClass RadioButton-instance ToggleButtonClass RadioButton-instance ButtonClass RadioButton-instance BinClass RadioButton-instance ContainerClass RadioButton-instance WidgetClass RadioButton-instance GObjectClass RadioButton where-  toGObject = GObject . castForeignPtr . unRadioButton-  unsafeCastGObject = RadioButton . castForeignPtr . unGObject--castToRadioButton :: GObjectClass obj => obj -> RadioButton-castToRadioButton = castTo gTypeRadioButton "RadioButton"--gTypeRadioButton :: GType-gTypeRadioButton =-  {# call fun unsafe gtk_radio_button_get_type #}---- **************************************************************** ColorButton--{#pointer *GtkColorButton as ColorButton foreign newtype #} deriving (Eq,Ord)--mkColorButton = (ColorButton, objectUnrefFromMainloop)-unColorButton (ColorButton o) = o--class ButtonClass o => ColorButtonClass o-toColorButton :: ColorButtonClass o => o -> ColorButton-toColorButton = unsafeCastGObject . toGObject--instance ColorButtonClass ColorButton-instance ButtonClass ColorButton-instance BinClass ColorButton-instance ContainerClass ColorButton-instance WidgetClass ColorButton-instance GObjectClass ColorButton where-  toGObject = GObject . castForeignPtr . unColorButton-  unsafeCastGObject = ColorButton . castForeignPtr . unGObject--castToColorButton :: GObjectClass obj => obj -> ColorButton-castToColorButton = castTo gTypeColorButton "ColorButton"--gTypeColorButton :: GType-gTypeColorButton =-  {# call fun unsafe gtk_color_button_get_type #}---- ***************************************************************** FontButton--{#pointer *GtkFontButton as FontButton foreign newtype #} deriving (Eq,Ord)--mkFontButton = (FontButton, objectUnrefFromMainloop)-unFontButton (FontButton o) = o--class ButtonClass o => FontButtonClass o-toFontButton :: FontButtonClass o => o -> FontButton-toFontButton = unsafeCastGObject . toGObject--instance FontButtonClass FontButton-instance ButtonClass FontButton-instance BinClass FontButton-instance ContainerClass FontButton-instance WidgetClass FontButton-instance GObjectClass FontButton where-  toGObject = GObject . castForeignPtr . unFontButton-  unsafeCastGObject = FontButton . castForeignPtr . unGObject--castToFontButton :: GObjectClass obj => obj -> FontButton-castToFontButton = castTo gTypeFontButton "FontButton"--gTypeFontButton :: GType-gTypeFontButton =-  {# call fun unsafe gtk_font_button_get_type #}---- ******************************************************************* MenuItem--{#pointer *GtkMenuItem as MenuItem foreign newtype #} deriving (Eq,Ord)--mkMenuItem = (MenuItem, objectUnrefFromMainloop)-unMenuItem (MenuItem o) = o--class BinClass o => MenuItemClass o-toMenuItem :: MenuItemClass o => o -> MenuItem-toMenuItem = unsafeCastGObject . toGObject--instance MenuItemClass MenuItem-instance BinClass MenuItem-instance ContainerClass MenuItem-instance WidgetClass MenuItem-instance GObjectClass MenuItem where-  toGObject = GObject . castForeignPtr . unMenuItem-  unsafeCastGObject = MenuItem . castForeignPtr . unGObject--castToMenuItem :: GObjectClass obj => obj -> MenuItem-castToMenuItem = castTo gTypeMenuItem "MenuItem"--gTypeMenuItem :: GType-gTypeMenuItem =-  {# call fun unsafe gtk_menu_item_get_type #}---- ************************************************************** CheckMenuItem--{#pointer *GtkCheckMenuItem as CheckMenuItem foreign newtype #} deriving (Eq,Ord)--mkCheckMenuItem = (CheckMenuItem, objectUnrefFromMainloop)-unCheckMenuItem (CheckMenuItem o) = o--class MenuItemClass o => CheckMenuItemClass o-toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem-toCheckMenuItem = unsafeCastGObject . toGObject--instance CheckMenuItemClass CheckMenuItem-instance MenuItemClass CheckMenuItem-instance BinClass CheckMenuItem-instance ContainerClass CheckMenuItem-instance WidgetClass CheckMenuItem-instance GObjectClass CheckMenuItem where-  toGObject = GObject . castForeignPtr . unCheckMenuItem-  unsafeCastGObject = CheckMenuItem . castForeignPtr . unGObject--castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem-castToCheckMenuItem = castTo gTypeCheckMenuItem "CheckMenuItem"--gTypeCheckMenuItem :: GType-gTypeCheckMenuItem =-  {# call fun unsafe gtk_check_menu_item_get_type #}---- ************************************************************** RadioMenuItem--{#pointer *GtkRadioMenuItem as RadioMenuItem foreign newtype #} deriving (Eq,Ord)--mkRadioMenuItem = (RadioMenuItem, objectUnrefFromMainloop)-unRadioMenuItem (RadioMenuItem o) = o--class CheckMenuItemClass o => RadioMenuItemClass o-toRadioMenuItem :: RadioMenuItemClass o => o -> RadioMenuItem-toRadioMenuItem = unsafeCastGObject . toGObject--instance RadioMenuItemClass RadioMenuItem-instance CheckMenuItemClass RadioMenuItem-instance MenuItemClass RadioMenuItem-instance BinClass RadioMenuItem-instance ContainerClass RadioMenuItem-instance WidgetClass RadioMenuItem-instance GObjectClass RadioMenuItem where-  toGObject = GObject . castForeignPtr . unRadioMenuItem-  unsafeCastGObject = RadioMenuItem . castForeignPtr . unGObject--castToRadioMenuItem :: GObjectClass obj => obj -> RadioMenuItem-castToRadioMenuItem = castTo gTypeRadioMenuItem "RadioMenuItem"--gTypeRadioMenuItem :: GType-gTypeRadioMenuItem =-  {# call fun unsafe gtk_radio_menu_item_get_type #}---- ************************************************************ TearoffMenuItem--{#pointer *GtkTearoffMenuItem as TearoffMenuItem foreign newtype #} deriving (Eq,Ord)--mkTearoffMenuItem = (TearoffMenuItem, objectUnrefFromMainloop)-unTearoffMenuItem (TearoffMenuItem o) = o--class MenuItemClass o => TearoffMenuItemClass o-toTearoffMenuItem :: TearoffMenuItemClass o => o -> TearoffMenuItem-toTearoffMenuItem = unsafeCastGObject . toGObject--instance TearoffMenuItemClass TearoffMenuItem-instance MenuItemClass TearoffMenuItem-instance BinClass TearoffMenuItem-instance ContainerClass TearoffMenuItem-instance WidgetClass TearoffMenuItem-instance GObjectClass TearoffMenuItem where-  toGObject = GObject . castForeignPtr . unTearoffMenuItem-  unsafeCastGObject = TearoffMenuItem . castForeignPtr . unGObject--castToTearoffMenuItem :: GObjectClass obj => obj -> TearoffMenuItem-castToTearoffMenuItem = castTo gTypeTearoffMenuItem "TearoffMenuItem"--gTypeTearoffMenuItem :: GType-gTypeTearoffMenuItem =-  {# call fun unsafe gtk_tearoff_menu_item_get_type #}---- ************************************************************** ImageMenuItem--{#pointer *GtkImageMenuItem as ImageMenuItem foreign newtype #} deriving (Eq,Ord)--mkImageMenuItem = (ImageMenuItem, objectUnrefFromMainloop)-unImageMenuItem (ImageMenuItem o) = o--class MenuItemClass o => ImageMenuItemClass o-toImageMenuItem :: ImageMenuItemClass o => o -> ImageMenuItem-toImageMenuItem = unsafeCastGObject . toGObject--instance ImageMenuItemClass ImageMenuItem-instance MenuItemClass ImageMenuItem-instance BinClass ImageMenuItem-instance ContainerClass ImageMenuItem-instance WidgetClass ImageMenuItem-instance GObjectClass ImageMenuItem where-  toGObject = GObject . castForeignPtr . unImageMenuItem-  unsafeCastGObject = ImageMenuItem . castForeignPtr . unGObject--castToImageMenuItem :: GObjectClass obj => obj -> ImageMenuItem-castToImageMenuItem = castTo gTypeImageMenuItem "ImageMenuItem"--gTypeImageMenuItem :: GType-gTypeImageMenuItem =-  {# call fun unsafe gtk_image_menu_item_get_type #}---- ********************************************************** SeparatorMenuItem--{#pointer *GtkSeparatorMenuItem as SeparatorMenuItem foreign newtype #} deriving (Eq,Ord)--mkSeparatorMenuItem = (SeparatorMenuItem, objectUnrefFromMainloop)-unSeparatorMenuItem (SeparatorMenuItem o) = o--class MenuItemClass o => SeparatorMenuItemClass o-toSeparatorMenuItem :: SeparatorMenuItemClass o => o -> SeparatorMenuItem-toSeparatorMenuItem = unsafeCastGObject . toGObject--instance SeparatorMenuItemClass SeparatorMenuItem-instance MenuItemClass SeparatorMenuItem-instance BinClass SeparatorMenuItem-instance ContainerClass SeparatorMenuItem-instance WidgetClass SeparatorMenuItem-instance GObjectClass SeparatorMenuItem where-  toGObject = GObject . castForeignPtr . unSeparatorMenuItem-  unsafeCastGObject = SeparatorMenuItem . castForeignPtr . unGObject--castToSeparatorMenuItem :: GObjectClass obj => obj -> SeparatorMenuItem-castToSeparatorMenuItem = castTo gTypeSeparatorMenuItem "SeparatorMenuItem"--gTypeSeparatorMenuItem :: GType-gTypeSeparatorMenuItem =-  {# call fun unsafe gtk_separator_menu_item_get_type #}---- ******************************************************************** Overlay--{#pointer *GtkOverlay as Overlay foreign newtype #} deriving (Eq,Ord)--mkOverlay = (Overlay, objectUnrefFromMainloop)-unOverlay (Overlay o) = o--class BinClass o => OverlayClass o-toOverlay :: OverlayClass o => o -> Overlay-toOverlay = unsafeCastGObject . toGObject--instance OverlayClass Overlay-instance BinClass Overlay-instance ContainerClass Overlay-instance WidgetClass Overlay-instance GObjectClass Overlay where-  toGObject = GObject . castForeignPtr . unOverlay-  unsafeCastGObject = Overlay . castForeignPtr . unGObject--castToOverlay :: GObjectClass obj => obj -> Overlay-castToOverlay = castTo gTypeOverlay "Overlay"--gTypeOverlay :: GType-gTypeOverlay =-  {# call fun unsafe gtk_overlay_get_type #}---- ********************************************************************* Window--{#pointer *GtkWindow as Window foreign newtype #} deriving (Eq,Ord)--mkWindow = (Window, objectUnrefFromMainloop)-unWindow (Window o) = o--class BinClass o => WindowClass o-toWindow :: WindowClass o => o -> Window-toWindow = unsafeCastGObject . toGObject--instance WindowClass Window-instance BinClass Window-instance ContainerClass Window-instance WidgetClass Window-instance GObjectClass Window where-  toGObject = GObject . castForeignPtr . unWindow-  unsafeCastGObject = Window . castForeignPtr . unGObject--castToWindow :: GObjectClass obj => obj -> Window-castToWindow = castTo gTypeWindow "Window"--gTypeWindow :: GType-gTypeWindow =-  {# call fun unsafe gtk_window_get_type #}---- ****************************************************************** Assistant--{#pointer *GtkAssistant as Assistant foreign newtype #} deriving (Eq,Ord)--mkAssistant = (Assistant, objectUnrefFromMainloop)-unAssistant (Assistant o) = o--class WindowClass o => AssistantClass o-toAssistant :: AssistantClass o => o -> Assistant-toAssistant = unsafeCastGObject . toGObject--instance AssistantClass Assistant-instance WindowClass Assistant-instance BinClass Assistant-instance ContainerClass Assistant-instance WidgetClass Assistant-instance GObjectClass Assistant where-  toGObject = GObject . castForeignPtr . unAssistant-  unsafeCastGObject = Assistant . castForeignPtr . unGObject--castToAssistant :: GObjectClass obj => obj -> Assistant-castToAssistant = castTo gTypeAssistant "Assistant"--gTypeAssistant :: GType-gTypeAssistant =-  {# call fun unsafe gtk_assistant_get_type #}---- ************************************************************ OffscreenWindow--{#pointer *GtkOffscreenWindow as OffscreenWindow foreign newtype #} deriving (Eq,Ord)--mkOffscreenWindow = (OffscreenWindow, objectUnrefFromMainloop)-unOffscreenWindow (OffscreenWindow o) = o--class WindowClass o => OffscreenWindowClass o-toOffscreenWindow :: OffscreenWindowClass o => o -> OffscreenWindow-toOffscreenWindow = unsafeCastGObject . toGObject--instance OffscreenWindowClass OffscreenWindow-instance WindowClass OffscreenWindow-instance BinClass OffscreenWindow-instance ContainerClass OffscreenWindow-instance WidgetClass OffscreenWindow-instance GObjectClass OffscreenWindow where-  toGObject = GObject . castForeignPtr . unOffscreenWindow-  unsafeCastGObject = OffscreenWindow . castForeignPtr . unGObject--castToOffscreenWindow :: GObjectClass obj => obj -> OffscreenWindow-castToOffscreenWindow = castTo gTypeOffscreenWindow "OffscreenWindow"--gTypeOffscreenWindow :: GType-gTypeOffscreenWindow =-  {# call fun unsafe gtk_offscreen_window_get_type #}---- ********************************************************************* Dialog--{#pointer *GtkDialog as Dialog foreign newtype #} deriving (Eq,Ord)--mkDialog = (Dialog, objectUnrefFromMainloop)-unDialog (Dialog o) = o--class WindowClass o => DialogClass o-toDialog :: DialogClass o => o -> Dialog-toDialog = unsafeCastGObject . toGObject--instance DialogClass Dialog-instance WindowClass Dialog-instance BinClass Dialog-instance ContainerClass Dialog-instance WidgetClass Dialog-instance GObjectClass Dialog where-  toGObject = GObject . castForeignPtr . unDialog-  unsafeCastGObject = Dialog . castForeignPtr . unGObject--castToDialog :: GObjectClass obj => obj -> Dialog-castToDialog = castTo gTypeDialog "Dialog"--gTypeDialog :: GType-gTypeDialog =-  {# call fun unsafe gtk_dialog_get_type #}---- **************************************************************** AboutDialog--{#pointer *GtkAboutDialog as AboutDialog foreign newtype #} deriving (Eq,Ord)--mkAboutDialog = (AboutDialog, objectUnrefFromMainloop)-unAboutDialog (AboutDialog o) = o--class DialogClass o => AboutDialogClass o-toAboutDialog :: AboutDialogClass o => o -> AboutDialog-toAboutDialog = unsafeCastGObject . toGObject--instance AboutDialogClass AboutDialog-instance DialogClass AboutDialog-instance WindowClass AboutDialog-instance BinClass AboutDialog-instance ContainerClass AboutDialog-instance WidgetClass AboutDialog-instance GObjectClass AboutDialog where-  toGObject = GObject . castForeignPtr . unAboutDialog-  unsafeCastGObject = AboutDialog . castForeignPtr . unGObject--castToAboutDialog :: GObjectClass obj => obj -> AboutDialog-castToAboutDialog = castTo gTypeAboutDialog "AboutDialog"--gTypeAboutDialog :: GType-gTypeAboutDialog =-  {# call fun unsafe gtk_about_dialog_get_type #}---- ******************************************************* ColorSelectionDialog--{#pointer *GtkColorSelectionDialog as ColorSelectionDialog foreign newtype #} deriving (Eq,Ord)--mkColorSelectionDialog = (ColorSelectionDialog, objectUnrefFromMainloop)-unColorSelectionDialog (ColorSelectionDialog o) = o--class DialogClass o => ColorSelectionDialogClass o-toColorSelectionDialog :: ColorSelectionDialogClass o => o -> ColorSelectionDialog-toColorSelectionDialog = unsafeCastGObject . toGObject--instance ColorSelectionDialogClass ColorSelectionDialog-instance DialogClass ColorSelectionDialog-instance WindowClass ColorSelectionDialog-instance BinClass ColorSelectionDialog-instance ContainerClass ColorSelectionDialog-instance WidgetClass ColorSelectionDialog-instance GObjectClass ColorSelectionDialog where-  toGObject = GObject . castForeignPtr . unColorSelectionDialog-  unsafeCastGObject = ColorSelectionDialog . castForeignPtr . unGObject--castToColorSelectionDialog :: GObjectClass obj => obj -> ColorSelectionDialog-castToColorSelectionDialog = castTo gTypeColorSelectionDialog "ColorSelectionDialog"--gTypeColorSelectionDialog :: GType-gTypeColorSelectionDialog =-  {# call fun unsafe gtk_color_selection_dialog_get_type #}---- ********************************************************** FileChooserDialog--{#pointer *GtkFileChooserDialog as FileChooserDialog foreign newtype #} deriving (Eq,Ord)--mkFileChooserDialog = (FileChooserDialog, objectUnrefFromMainloop)-unFileChooserDialog (FileChooserDialog o) = o--class DialogClass o => FileChooserDialogClass o-toFileChooserDialog :: FileChooserDialogClass o => o -> FileChooserDialog-toFileChooserDialog = unsafeCastGObject . toGObject--instance FileChooserDialogClass FileChooserDialog-instance DialogClass FileChooserDialog-instance WindowClass FileChooserDialog-instance BinClass FileChooserDialog-instance ContainerClass FileChooserDialog-instance WidgetClass FileChooserDialog-instance GObjectClass FileChooserDialog where-  toGObject = GObject . castForeignPtr . unFileChooserDialog-  unsafeCastGObject = FileChooserDialog . castForeignPtr . unGObject--castToFileChooserDialog :: GObjectClass obj => obj -> FileChooserDialog-castToFileChooserDialog = castTo gTypeFileChooserDialog "FileChooserDialog"--gTypeFileChooserDialog :: GType-gTypeFileChooserDialog =-  {# call fun unsafe gtk_file_chooser_dialog_get_type #}---- ******************************************************** FontSelectionDialog--{#pointer *GtkFontSelectionDialog as FontSelectionDialog foreign newtype #} deriving (Eq,Ord)--mkFontSelectionDialog = (FontSelectionDialog, objectUnrefFromMainloop)-unFontSelectionDialog (FontSelectionDialog o) = o--class DialogClass o => FontSelectionDialogClass o-toFontSelectionDialog :: FontSelectionDialogClass o => o -> FontSelectionDialog-toFontSelectionDialog = unsafeCastGObject . toGObject--instance FontSelectionDialogClass FontSelectionDialog-instance DialogClass FontSelectionDialog-instance WindowClass FontSelectionDialog-instance BinClass FontSelectionDialog-instance ContainerClass FontSelectionDialog-instance WidgetClass FontSelectionDialog-instance GObjectClass FontSelectionDialog where-  toGObject = GObject . castForeignPtr . unFontSelectionDialog-  unsafeCastGObject = FontSelectionDialog . castForeignPtr . unGObject--castToFontSelectionDialog :: GObjectClass obj => obj -> FontSelectionDialog-castToFontSelectionDialog = castTo gTypeFontSelectionDialog "FontSelectionDialog"--gTypeFontSelectionDialog :: GType-gTypeFontSelectionDialog =-  {# call fun unsafe gtk_font_selection_dialog_get_type #}---- ************************************************************** MessageDialog--{#pointer *GtkMessageDialog as MessageDialog foreign newtype #} deriving (Eq,Ord)--mkMessageDialog = (MessageDialog, objectUnrefFromMainloop)-unMessageDialog (MessageDialog o) = o--class DialogClass o => MessageDialogClass o-toMessageDialog :: MessageDialogClass o => o -> MessageDialog-toMessageDialog = unsafeCastGObject . toGObject--instance MessageDialogClass MessageDialog-instance DialogClass MessageDialog-instance WindowClass MessageDialog-instance BinClass MessageDialog-instance ContainerClass MessageDialog-instance WidgetClass MessageDialog-instance GObjectClass MessageDialog where-  toGObject = GObject . castForeignPtr . unMessageDialog-  unsafeCastGObject = MessageDialog . castForeignPtr . unGObject--castToMessageDialog :: GObjectClass obj => obj -> MessageDialog-castToMessageDialog = castTo gTypeMessageDialog "MessageDialog"--gTypeMessageDialog :: GType-gTypeMessageDialog =-  {# call fun unsafe gtk_message_dialog_get_type #}---- ******************************************************************* EventBox--{#pointer *GtkEventBox as EventBox foreign newtype #} deriving (Eq,Ord)--mkEventBox = (EventBox, objectUnrefFromMainloop)-unEventBox (EventBox o) = o--class BinClass o => EventBoxClass o-toEventBox :: EventBoxClass o => o -> EventBox-toEventBox = unsafeCastGObject . toGObject--instance EventBoxClass EventBox-instance BinClass EventBox-instance ContainerClass EventBox-instance WidgetClass EventBox-instance GObjectClass EventBox where-  toGObject = GObject . castForeignPtr . unEventBox-  unsafeCastGObject = EventBox . castForeignPtr . unGObject--castToEventBox :: GObjectClass obj => obj -> EventBox-castToEventBox = castTo gTypeEventBox "EventBox"--gTypeEventBox :: GType-gTypeEventBox =-  {# call fun unsafe gtk_event_box_get_type #}---- ****************************************************************** HandleBox--{#pointer *GtkHandleBox as HandleBox foreign newtype #} deriving (Eq,Ord)--mkHandleBox = (HandleBox, objectUnrefFromMainloop)-unHandleBox (HandleBox o) = o--class BinClass o => HandleBoxClass o-toHandleBox :: HandleBoxClass o => o -> HandleBox-toHandleBox = unsafeCastGObject . toGObject--instance HandleBoxClass HandleBox-instance BinClass HandleBox-instance ContainerClass HandleBox-instance WidgetClass HandleBox-instance GObjectClass HandleBox where-  toGObject = GObject . castForeignPtr . unHandleBox-  unsafeCastGObject = HandleBox . castForeignPtr . unGObject--castToHandleBox :: GObjectClass obj => obj -> HandleBox-castToHandleBox = castTo gTypeHandleBox "HandleBox"--gTypeHandleBox :: GType-gTypeHandleBox =-  {# call fun unsafe gtk_handle_box_get_type #}---- ************************************************************* ScrolledWindow--{#pointer *GtkScrolledWindow as ScrolledWindow foreign newtype #} deriving (Eq,Ord)--mkScrolledWindow = (ScrolledWindow, objectUnrefFromMainloop)-unScrolledWindow (ScrolledWindow o) = o--class BinClass o => ScrolledWindowClass o-toScrolledWindow :: ScrolledWindowClass o => o -> ScrolledWindow-toScrolledWindow = unsafeCastGObject . toGObject--instance ScrolledWindowClass ScrolledWindow-instance BinClass ScrolledWindow-instance ContainerClass ScrolledWindow-instance WidgetClass ScrolledWindow-instance GObjectClass ScrolledWindow where-  toGObject = GObject . castForeignPtr . unScrolledWindow-  unsafeCastGObject = ScrolledWindow . castForeignPtr . unGObject--castToScrolledWindow :: GObjectClass obj => obj -> ScrolledWindow-castToScrolledWindow = castTo gTypeScrolledWindow "ScrolledWindow"--gTypeScrolledWindow :: GType-gTypeScrolledWindow =-  {# call fun unsafe gtk_scrolled_window_get_type #}---- ******************************************************************* Viewport--{#pointer *GtkViewport as Viewport foreign newtype #} deriving (Eq,Ord)--mkViewport = (Viewport, objectUnrefFromMainloop)-unViewport (Viewport o) = o--class BinClass o => ViewportClass o-toViewport :: ViewportClass o => o -> Viewport-toViewport = unsafeCastGObject . toGObject--instance ViewportClass Viewport-instance BinClass Viewport-instance ContainerClass Viewport-instance WidgetClass Viewport-instance GObjectClass Viewport where-  toGObject = GObject . castForeignPtr . unViewport-  unsafeCastGObject = Viewport . castForeignPtr . unGObject--castToViewport :: GObjectClass obj => obj -> Viewport-castToViewport = castTo gTypeViewport "Viewport"--gTypeViewport :: GType-gTypeViewport =-  {# call fun unsafe gtk_viewport_get_type #}---- ******************************************************************* Expander--{#pointer *GtkExpander as Expander foreign newtype #} deriving (Eq,Ord)--mkExpander = (Expander, objectUnrefFromMainloop)-unExpander (Expander o) = o--class BinClass o => ExpanderClass o-toExpander :: ExpanderClass o => o -> Expander-toExpander = unsafeCastGObject . toGObject--instance ExpanderClass Expander-instance BinClass Expander-instance ContainerClass Expander-instance WidgetClass Expander-instance GObjectClass Expander where-  toGObject = GObject . castForeignPtr . unExpander-  unsafeCastGObject = Expander . castForeignPtr . unGObject--castToExpander :: GObjectClass obj => obj -> Expander-castToExpander = castTo gTypeExpander "Expander"--gTypeExpander :: GType-gTypeExpander =-  {# call fun unsafe gtk_expander_get_type #}---- ******************************************************************* ComboBox--{#pointer *GtkComboBox as ComboBox foreign newtype #} deriving (Eq,Ord)--mkComboBox = (ComboBox, objectUnrefFromMainloop)-unComboBox (ComboBox o) = o--class BinClass o => ComboBoxClass o-toComboBox :: ComboBoxClass o => o -> ComboBox-toComboBox = unsafeCastGObject . toGObject--instance ComboBoxClass ComboBox-instance BinClass ComboBox-instance ContainerClass ComboBox-instance WidgetClass ComboBox-instance GObjectClass ComboBox where-  toGObject = GObject . castForeignPtr . unComboBox-  unsafeCastGObject = ComboBox . castForeignPtr . unGObject--castToComboBox :: GObjectClass obj => obj -> ComboBox-castToComboBox = castTo gTypeComboBox "ComboBox"--gTypeComboBox :: GType-gTypeComboBox =-  {# call fun unsafe gtk_combo_box_get_type #}---- ******************************************************************* ToolItem--{#pointer *GtkToolItem as ToolItem foreign newtype #} deriving (Eq,Ord)--mkToolItem = (ToolItem, objectUnrefFromMainloop)-unToolItem (ToolItem o) = o--class BinClass o => ToolItemClass o-toToolItem :: ToolItemClass o => o -> ToolItem-toToolItem = unsafeCastGObject . toGObject--instance ToolItemClass ToolItem-instance BinClass ToolItem-instance ContainerClass ToolItem-instance WidgetClass ToolItem-instance GObjectClass ToolItem where-  toGObject = GObject . castForeignPtr . unToolItem-  unsafeCastGObject = ToolItem . castForeignPtr . unGObject--castToToolItem :: GObjectClass obj => obj -> ToolItem-castToToolItem = castTo gTypeToolItem "ToolItem"--gTypeToolItem :: GType-gTypeToolItem =-  {# call fun unsafe gtk_tool_item_get_type #}---- ***************************************************************** ToolButton--{#pointer *GtkToolButton as ToolButton foreign newtype #} deriving (Eq,Ord)--mkToolButton = (ToolButton, objectUnrefFromMainloop)-unToolButton (ToolButton o) = o--class ToolItemClass o => ToolButtonClass o-toToolButton :: ToolButtonClass o => o -> ToolButton-toToolButton = unsafeCastGObject . toGObject--instance ToolButtonClass ToolButton-instance ToolItemClass ToolButton-instance BinClass ToolButton-instance ContainerClass ToolButton-instance WidgetClass ToolButton-instance GObjectClass ToolButton where-  toGObject = GObject . castForeignPtr . unToolButton-  unsafeCastGObject = ToolButton . castForeignPtr . unGObject--castToToolButton :: GObjectClass obj => obj -> ToolButton-castToToolButton = castTo gTypeToolButton "ToolButton"--gTypeToolButton :: GType-gTypeToolButton =-  {# call fun unsafe gtk_tool_button_get_type #}---- ************************************************************* MenuToolButton--{#pointer *GtkMenuToolButton as MenuToolButton foreign newtype #} deriving (Eq,Ord)--mkMenuToolButton = (MenuToolButton, objectUnrefFromMainloop)-unMenuToolButton (MenuToolButton o) = o--class ToolButtonClass o => MenuToolButtonClass o-toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButton-toMenuToolButton = unsafeCastGObject . toGObject--instance MenuToolButtonClass MenuToolButton-instance ToolButtonClass MenuToolButton-instance ToolItemClass MenuToolButton-instance BinClass MenuToolButton-instance ContainerClass MenuToolButton-instance WidgetClass MenuToolButton-instance GObjectClass MenuToolButton where-  toGObject = GObject . castForeignPtr . unMenuToolButton-  unsafeCastGObject = MenuToolButton . castForeignPtr . unGObject--castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButton-castToMenuToolButton = castTo gTypeMenuToolButton "MenuToolButton"--gTypeMenuToolButton :: GType-gTypeMenuToolButton =-  {# call fun unsafe gtk_menu_tool_button_get_type #}---- *********************************************************** ToggleToolButton--{#pointer *GtkToggleToolButton as ToggleToolButton foreign newtype #} deriving (Eq,Ord)--mkToggleToolButton = (ToggleToolButton, objectUnrefFromMainloop)-unToggleToolButton (ToggleToolButton o) = o--class ToolButtonClass o => ToggleToolButtonClass o-toToggleToolButton :: ToggleToolButtonClass o => o -> ToggleToolButton-toToggleToolButton = unsafeCastGObject . toGObject--instance ToggleToolButtonClass ToggleToolButton-instance ToolButtonClass ToggleToolButton-instance ToolItemClass ToggleToolButton-instance BinClass ToggleToolButton-instance ContainerClass ToggleToolButton-instance WidgetClass ToggleToolButton-instance GObjectClass ToggleToolButton where-  toGObject = GObject . castForeignPtr . unToggleToolButton-  unsafeCastGObject = ToggleToolButton . castForeignPtr . unGObject--castToToggleToolButton :: GObjectClass obj => obj -> ToggleToolButton-castToToggleToolButton = castTo gTypeToggleToolButton "ToggleToolButton"--gTypeToggleToolButton :: GType-gTypeToggleToolButton =-  {# call fun unsafe gtk_toggle_tool_button_get_type #}---- ************************************************************ RadioToolButton--{#pointer *GtkRadioToolButton as RadioToolButton foreign newtype #} deriving (Eq,Ord)--mkRadioToolButton = (RadioToolButton, objectUnrefFromMainloop)-unRadioToolButton (RadioToolButton o) = o--class ToggleToolButtonClass o => RadioToolButtonClass o-toRadioToolButton :: RadioToolButtonClass o => o -> RadioToolButton-toRadioToolButton = unsafeCastGObject . toGObject--instance RadioToolButtonClass RadioToolButton-instance ToggleToolButtonClass RadioToolButton-instance ToolButtonClass RadioToolButton-instance ToolItemClass RadioToolButton-instance BinClass RadioToolButton-instance ContainerClass RadioToolButton-instance WidgetClass RadioToolButton-instance GObjectClass RadioToolButton where-  toGObject = GObject . castForeignPtr . unRadioToolButton-  unsafeCastGObject = RadioToolButton . castForeignPtr . unGObject--castToRadioToolButton :: GObjectClass obj => obj -> RadioToolButton-castToRadioToolButton = castTo gTypeRadioToolButton "RadioToolButton"--gTypeRadioToolButton :: GType-gTypeRadioToolButton =-  {# call fun unsafe gtk_radio_tool_button_get_type #}---- ********************************************************** SeparatorToolItem--{#pointer *GtkSeparatorToolItem as SeparatorToolItem foreign newtype #} deriving (Eq,Ord)--mkSeparatorToolItem = (SeparatorToolItem, objectUnrefFromMainloop)-unSeparatorToolItem (SeparatorToolItem o) = o--class ToolItemClass o => SeparatorToolItemClass o-toSeparatorToolItem :: SeparatorToolItemClass o => o -> SeparatorToolItem-toSeparatorToolItem = unsafeCastGObject . toGObject--instance SeparatorToolItemClass SeparatorToolItem-instance ToolItemClass SeparatorToolItem-instance BinClass SeparatorToolItem-instance ContainerClass SeparatorToolItem-instance WidgetClass SeparatorToolItem-instance GObjectClass SeparatorToolItem where-  toGObject = GObject . castForeignPtr . unSeparatorToolItem-  unsafeCastGObject = SeparatorToolItem . castForeignPtr . unGObject--castToSeparatorToolItem :: GObjectClass obj => obj -> SeparatorToolItem-castToSeparatorToolItem = castTo gTypeSeparatorToolItem "SeparatorToolItem"--gTypeSeparatorToolItem :: GType-gTypeSeparatorToolItem =-  {# call fun unsafe gtk_separator_tool_item_get_type #}---- ************************************************************************ Box--{#pointer *GtkBox as Box foreign newtype #} deriving (Eq,Ord)--mkBox = (Box, objectUnrefFromMainloop)-unBox (Box o) = o--class ContainerClass o => BoxClass o-toBox :: BoxClass o => o -> Box-toBox = unsafeCastGObject . toGObject--instance BoxClass Box-instance ContainerClass Box-instance WidgetClass Box-instance GObjectClass Box where-  toGObject = GObject . castForeignPtr . unBox-  unsafeCastGObject = Box . castForeignPtr . unGObject--castToBox :: GObjectClass obj => obj -> Box-castToBox = castTo gTypeBox "Box"--gTypeBox :: GType-gTypeBox =-  {# call fun unsafe gtk_box_get_type #}---- ****************************************************************** ButtonBox--{#pointer *GtkButtonBox as ButtonBox foreign newtype #} deriving (Eq,Ord)--mkButtonBox = (ButtonBox, objectUnrefFromMainloop)-unButtonBox (ButtonBox o) = o--class BoxClass o => ButtonBoxClass o-toButtonBox :: ButtonBoxClass o => o -> ButtonBox-toButtonBox = unsafeCastGObject . toGObject--instance ButtonBoxClass ButtonBox-instance BoxClass ButtonBox-instance ContainerClass ButtonBox-instance WidgetClass ButtonBox-instance GObjectClass ButtonBox where-  toGObject = GObject . castForeignPtr . unButtonBox-  unsafeCastGObject = ButtonBox . castForeignPtr . unGObject--castToButtonBox :: GObjectClass obj => obj -> ButtonBox-castToButtonBox = castTo gTypeButtonBox "ButtonBox"--gTypeButtonBox :: GType-gTypeButtonBox =-  {# call fun unsafe gtk_button_box_get_type #}---- ***************************************************************** HButtonBox--{#pointer *GtkHButtonBox as HButtonBox foreign newtype #} deriving (Eq,Ord)--mkHButtonBox = (HButtonBox, objectUnrefFromMainloop)-unHButtonBox (HButtonBox o) = o--class ButtonBoxClass o => HButtonBoxClass o-toHButtonBox :: HButtonBoxClass o => o -> HButtonBox-toHButtonBox = unsafeCastGObject . toGObject--instance HButtonBoxClass HButtonBox-instance ButtonBoxClass HButtonBox-instance BoxClass HButtonBox-instance ContainerClass HButtonBox-instance WidgetClass HButtonBox-instance GObjectClass HButtonBox where-  toGObject = GObject . castForeignPtr . unHButtonBox-  unsafeCastGObject = HButtonBox . castForeignPtr . unGObject--castToHButtonBox :: GObjectClass obj => obj -> HButtonBox-castToHButtonBox = castTo gTypeHButtonBox "HButtonBox"--gTypeHButtonBox :: GType-gTypeHButtonBox =-  {# call fun unsafe gtk_hbutton_box_get_type #}---- ***************************************************************** VButtonBox--{#pointer *GtkVButtonBox as VButtonBox foreign newtype #} deriving (Eq,Ord)--mkVButtonBox = (VButtonBox, objectUnrefFromMainloop)-unVButtonBox (VButtonBox o) = o--class ButtonBoxClass o => VButtonBoxClass o-toVButtonBox :: VButtonBoxClass o => o -> VButtonBox-toVButtonBox = unsafeCastGObject . toGObject--instance VButtonBoxClass VButtonBox-instance ButtonBoxClass VButtonBox-instance BoxClass VButtonBox-instance ContainerClass VButtonBox-instance WidgetClass VButtonBox-instance GObjectClass VButtonBox where-  toGObject = GObject . castForeignPtr . unVButtonBox-  unsafeCastGObject = VButtonBox . castForeignPtr . unGObject--castToVButtonBox :: GObjectClass obj => obj -> VButtonBox-castToVButtonBox = castTo gTypeVButtonBox "VButtonBox"--gTypeVButtonBox :: GType-gTypeVButtonBox =-  {# call fun unsafe gtk_vbutton_box_get_type #}---- *********************************************************************** VBox--{#pointer *GtkVBox as VBox foreign newtype #} deriving (Eq,Ord)--mkVBox = (VBox, objectUnrefFromMainloop)-unVBox (VBox o) = o--class BoxClass o => VBoxClass o-toVBox :: VBoxClass o => o -> VBox-toVBox = unsafeCastGObject . toGObject--instance VBoxClass VBox-instance BoxClass VBox-instance ContainerClass VBox-instance WidgetClass VBox-instance GObjectClass VBox where-  toGObject = GObject . castForeignPtr . unVBox-  unsafeCastGObject = VBox . castForeignPtr . unGObject--castToVBox :: GObjectClass obj => obj -> VBox-castToVBox = castTo gTypeVBox "VBox"--gTypeVBox :: GType-gTypeVBox =-  {# call fun unsafe gtk_vbox_get_type #}---- ******************************************************** RecentChooserWidget--{#pointer *GtkRecentChooserWidget as RecentChooserWidget foreign newtype #} deriving (Eq,Ord)--mkRecentChooserWidget = (RecentChooserWidget, objectUnrefFromMainloop)-unRecentChooserWidget (RecentChooserWidget o) = o--class VBoxClass o => RecentChooserWidgetClass o-toRecentChooserWidget :: RecentChooserWidgetClass o => o -> RecentChooserWidget-toRecentChooserWidget = unsafeCastGObject . toGObject--instance RecentChooserWidgetClass RecentChooserWidget-instance VBoxClass RecentChooserWidget-instance BoxClass RecentChooserWidget-instance ContainerClass RecentChooserWidget-instance WidgetClass RecentChooserWidget-instance GObjectClass RecentChooserWidget where-  toGObject = GObject . castForeignPtr . unRecentChooserWidget-  unsafeCastGObject = RecentChooserWidget . castForeignPtr . unGObject--castToRecentChooserWidget :: GObjectClass obj => obj -> RecentChooserWidget-castToRecentChooserWidget = castTo gTypeRecentChooserWidget "RecentChooserWidget"--gTypeRecentChooserWidget :: GType-gTypeRecentChooserWidget =-  {# call fun unsafe gtk_recent_chooser_widget_get_type #}---- ************************************************************* ColorSelection--{#pointer *GtkColorSelection as ColorSelection foreign newtype #} deriving (Eq,Ord)--mkColorSelection = (ColorSelection, objectUnrefFromMainloop)-unColorSelection (ColorSelection o) = o--class VBoxClass o => ColorSelectionClass o-toColorSelection :: ColorSelectionClass o => o -> ColorSelection-toColorSelection = unsafeCastGObject . toGObject--instance ColorSelectionClass ColorSelection-instance VBoxClass ColorSelection-instance BoxClass ColorSelection-instance ContainerClass ColorSelection-instance WidgetClass ColorSelection-instance GObjectClass ColorSelection where-  toGObject = GObject . castForeignPtr . unColorSelection-  unsafeCastGObject = ColorSelection . castForeignPtr . unGObject--castToColorSelection :: GObjectClass obj => obj -> ColorSelection-castToColorSelection = castTo gTypeColorSelection "ColorSelection"--gTypeColorSelection :: GType-gTypeColorSelection =-  {# call fun unsafe gtk_color_selection_get_type #}---- ************************************************************** FontSelection--{#pointer *GtkFontSelection as FontSelection foreign newtype #} deriving (Eq,Ord)--mkFontSelection = (FontSelection, objectUnrefFromMainloop)-unFontSelection (FontSelection o) = o--class VBoxClass o => FontSelectionClass o-toFontSelection :: FontSelectionClass o => o -> FontSelection-toFontSelection = unsafeCastGObject . toGObject--instance FontSelectionClass FontSelection-instance VBoxClass FontSelection-instance BoxClass FontSelection-instance ContainerClass FontSelection-instance WidgetClass FontSelection-instance GObjectClass FontSelection where-  toGObject = GObject . castForeignPtr . unFontSelection-  unsafeCastGObject = FontSelection . castForeignPtr . unGObject--castToFontSelection :: GObjectClass obj => obj -> FontSelection-castToFontSelection = castTo gTypeFontSelection "FontSelection"--gTypeFontSelection :: GType-gTypeFontSelection =-  {# call fun unsafe gtk_font_selection_get_type #}---- ********************************************************** FileChooserWidget--{#pointer *GtkFileChooserWidget as FileChooserWidget foreign newtype #} deriving (Eq,Ord)--mkFileChooserWidget = (FileChooserWidget, objectUnrefFromMainloop)-unFileChooserWidget (FileChooserWidget o) = o--class VBoxClass o => FileChooserWidgetClass o-toFileChooserWidget :: FileChooserWidgetClass o => o -> FileChooserWidget-toFileChooserWidget = unsafeCastGObject . toGObject--instance FileChooserWidgetClass FileChooserWidget-instance VBoxClass FileChooserWidget-instance BoxClass FileChooserWidget-instance ContainerClass FileChooserWidget-instance WidgetClass FileChooserWidget-instance GObjectClass FileChooserWidget where-  toGObject = GObject . castForeignPtr . unFileChooserWidget-  unsafeCastGObject = FileChooserWidget . castForeignPtr . unGObject--castToFileChooserWidget :: GObjectClass obj => obj -> FileChooserWidget-castToFileChooserWidget = castTo gTypeFileChooserWidget "FileChooserWidget"--gTypeFileChooserWidget :: GType-gTypeFileChooserWidget =-  {# call fun unsafe gtk_file_chooser_widget_get_type #}---- *********************************************************************** HBox--{#pointer *GtkHBox as HBox foreign newtype #} deriving (Eq,Ord)--mkHBox = (HBox, objectUnrefFromMainloop)-unHBox (HBox o) = o--class BoxClass o => HBoxClass o-toHBox :: HBoxClass o => o -> HBox-toHBox = unsafeCastGObject . toGObject--instance HBoxClass HBox-instance BoxClass HBox-instance ContainerClass HBox-instance WidgetClass HBox-instance GObjectClass HBox where-  toGObject = GObject . castForeignPtr . unHBox-  unsafeCastGObject = HBox . castForeignPtr . unGObject--castToHBox :: GObjectClass obj => obj -> HBox-castToHBox = castTo gTypeHBox "HBox"--gTypeHBox :: GType-gTypeHBox =-  {# call fun unsafe gtk_hbox_get_type #}---- ******************************************************************** InfoBar--{#pointer *GtkInfoBar as InfoBar foreign newtype #} deriving (Eq,Ord)--mkInfoBar = (InfoBar, objectUnrefFromMainloop)-unInfoBar (InfoBar o) = o--class HBoxClass o => InfoBarClass o-toInfoBar :: InfoBarClass o => o -> InfoBar-toInfoBar = unsafeCastGObject . toGObject--instance InfoBarClass InfoBar-instance HBoxClass InfoBar-instance BoxClass InfoBar-instance ContainerClass InfoBar-instance WidgetClass InfoBar-instance GObjectClass InfoBar where-  toGObject = GObject . castForeignPtr . unInfoBar-  unsafeCastGObject = InfoBar . castForeignPtr . unGObject--castToInfoBar :: GObjectClass obj => obj -> InfoBar-castToInfoBar = castTo gTypeInfoBar "InfoBar"--gTypeInfoBar :: GType-gTypeInfoBar =-  {# call fun unsafe gtk_info_bar_get_type #}---- ********************************************************** FileChooserButton--{#pointer *GtkFileChooserButton as FileChooserButton foreign newtype #} deriving (Eq,Ord)--mkFileChooserButton = (FileChooserButton, objectUnrefFromMainloop)-unFileChooserButton (FileChooserButton o) = o--class HBoxClass o => FileChooserButtonClass o-toFileChooserButton :: FileChooserButtonClass o => o -> FileChooserButton-toFileChooserButton = unsafeCastGObject . toGObject--instance FileChooserButtonClass FileChooserButton-instance HBoxClass FileChooserButton-instance BoxClass FileChooserButton-instance ContainerClass FileChooserButton-instance WidgetClass FileChooserButton-instance GObjectClass FileChooserButton where-  toGObject = GObject . castForeignPtr . unFileChooserButton-  unsafeCastGObject = FileChooserButton . castForeignPtr . unGObject--castToFileChooserButton :: GObjectClass obj => obj -> FileChooserButton-castToFileChooserButton = castTo gTypeFileChooserButton "FileChooserButton"--gTypeFileChooserButton :: GType-gTypeFileChooserButton =-  {# call fun unsafe gtk_file_chooser_button_get_type #}---- ****************************************************************** Statusbar--{#pointer *GtkStatusbar as Statusbar foreign newtype #} deriving (Eq,Ord)--mkStatusbar = (Statusbar, objectUnrefFromMainloop)-unStatusbar (Statusbar o) = o--class HBoxClass o => StatusbarClass o-toStatusbar :: StatusbarClass o => o -> Statusbar-toStatusbar = unsafeCastGObject . toGObject--instance StatusbarClass Statusbar-instance HBoxClass Statusbar-instance BoxClass Statusbar-instance ContainerClass Statusbar-instance WidgetClass Statusbar-instance GObjectClass Statusbar where-  toGObject = GObject . castForeignPtr . unStatusbar-  unsafeCastGObject = Statusbar . castForeignPtr . unGObject--castToStatusbar :: GObjectClass obj => obj -> Statusbar-castToStatusbar = castTo gTypeStatusbar "Statusbar"--gTypeStatusbar :: GType-gTypeStatusbar =-  {# call fun unsafe gtk_statusbar_get_type #}---- ********************************************************************** Fixed--{#pointer *GtkFixed as Fixed foreign newtype #} deriving (Eq,Ord)--mkFixed = (Fixed, objectUnrefFromMainloop)-unFixed (Fixed o) = o--class ContainerClass o => FixedClass o-toFixed :: FixedClass o => o -> Fixed-toFixed = unsafeCastGObject . toGObject--instance FixedClass Fixed-instance ContainerClass Fixed-instance WidgetClass Fixed-instance GObjectClass Fixed where-  toGObject = GObject . castForeignPtr . unFixed-  unsafeCastGObject = Fixed . castForeignPtr . unGObject--castToFixed :: GObjectClass obj => obj -> Fixed-castToFixed = castTo gTypeFixed "Fixed"--gTypeFixed :: GType-gTypeFixed =-  {# call fun unsafe gtk_fixed_get_type #}---- ********************************************************************** Paned--{#pointer *GtkPaned as Paned foreign newtype #} deriving (Eq,Ord)--mkPaned = (Paned, objectUnrefFromMainloop)-unPaned (Paned o) = o--class ContainerClass o => PanedClass o-toPaned :: PanedClass o => o -> Paned-toPaned = unsafeCastGObject . toGObject--instance PanedClass Paned-instance ContainerClass Paned-instance WidgetClass Paned-instance GObjectClass Paned where-  toGObject = GObject . castForeignPtr . unPaned-  unsafeCastGObject = Paned . castForeignPtr . unGObject--castToPaned :: GObjectClass obj => obj -> Paned-castToPaned = castTo gTypePaned "Paned"--gTypePaned :: GType-gTypePaned =-  {# call fun unsafe gtk_paned_get_type #}---- ********************************************************************* HPaned--{#pointer *GtkHPaned as HPaned foreign newtype #} deriving (Eq,Ord)--mkHPaned = (HPaned, objectUnrefFromMainloop)-unHPaned (HPaned o) = o--class PanedClass o => HPanedClass o-toHPaned :: HPanedClass o => o -> HPaned-toHPaned = unsafeCastGObject . toGObject--instance HPanedClass HPaned-instance PanedClass HPaned-instance ContainerClass HPaned-instance WidgetClass HPaned-instance GObjectClass HPaned where-  toGObject = GObject . castForeignPtr . unHPaned-  unsafeCastGObject = HPaned . castForeignPtr . unGObject--castToHPaned :: GObjectClass obj => obj -> HPaned-castToHPaned = castTo gTypeHPaned "HPaned"--gTypeHPaned :: GType-gTypeHPaned =-  {# call fun unsafe gtk_hpaned_get_type #}---- ********************************************************************* VPaned--{#pointer *GtkVPaned as VPaned foreign newtype #} deriving (Eq,Ord)--mkVPaned = (VPaned, objectUnrefFromMainloop)-unVPaned (VPaned o) = o--class PanedClass o => VPanedClass o-toVPaned :: VPanedClass o => o -> VPaned-toVPaned = unsafeCastGObject . toGObject--instance VPanedClass VPaned-instance PanedClass VPaned-instance ContainerClass VPaned-instance WidgetClass VPaned-instance GObjectClass VPaned where-  toGObject = GObject . castForeignPtr . unVPaned-  unsafeCastGObject = VPaned . castForeignPtr . unGObject--castToVPaned :: GObjectClass obj => obj -> VPaned-castToVPaned = castTo gTypeVPaned "VPaned"--gTypeVPaned :: GType-gTypeVPaned =-  {# call fun unsafe gtk_vpaned_get_type #}---- ******************************************************************* IconView--{#pointer *GtkIconView as IconView foreign newtype #} deriving (Eq,Ord)--mkIconView = (IconView, objectUnrefFromMainloop)-unIconView (IconView o) = o--class ContainerClass o => IconViewClass o-toIconView :: IconViewClass o => o -> IconView-toIconView = unsafeCastGObject . toGObject--instance IconViewClass IconView-instance ContainerClass IconView-instance WidgetClass IconView-instance GObjectClass IconView where-  toGObject = GObject . castForeignPtr . unIconView-  unsafeCastGObject = IconView . castForeignPtr . unGObject--castToIconView :: GObjectClass obj => obj -> IconView-castToIconView = castTo gTypeIconView "IconView"--gTypeIconView :: GType-gTypeIconView =-  {# call fun unsafe gtk_icon_view_get_type #}---- ********************************************************************* Layout--{#pointer *GtkLayout as Layout foreign newtype #} deriving (Eq,Ord)--mkLayout = (Layout, objectUnrefFromMainloop)-unLayout (Layout o) = o--class ContainerClass o => LayoutClass o-toLayout :: LayoutClass o => o -> Layout-toLayout = unsafeCastGObject . toGObject--instance LayoutClass Layout-instance ContainerClass Layout-instance WidgetClass Layout-instance GObjectClass Layout where-  toGObject = GObject . castForeignPtr . unLayout-  unsafeCastGObject = Layout . castForeignPtr . unGObject--castToLayout :: GObjectClass obj => obj -> Layout-castToLayout = castTo gTypeLayout "Layout"--gTypeLayout :: GType-gTypeLayout =-  {# call fun unsafe gtk_layout_get_type #}---- ****************************************************************** MenuShell--{#pointer *GtkMenuShell as MenuShell foreign newtype #} deriving (Eq,Ord)--mkMenuShell = (MenuShell, objectUnrefFromMainloop)-unMenuShell (MenuShell o) = o--class ContainerClass o => MenuShellClass o-toMenuShell :: MenuShellClass o => o -> MenuShell-toMenuShell = unsafeCastGObject . toGObject--instance MenuShellClass MenuShell-instance ContainerClass MenuShell-instance WidgetClass MenuShell-instance GObjectClass MenuShell where-  toGObject = GObject . castForeignPtr . unMenuShell-  unsafeCastGObject = MenuShell . castForeignPtr . unGObject--castToMenuShell :: GObjectClass obj => obj -> MenuShell-castToMenuShell = castTo gTypeMenuShell "MenuShell"--gTypeMenuShell :: GType-gTypeMenuShell =-  {# call fun unsafe gtk_menu_shell_get_type #}---- *********************************************************************** Menu--{#pointer *GtkMenu as Menu foreign newtype #} deriving (Eq,Ord)--mkMenu = (Menu, objectUnrefFromMainloop)-unMenu (Menu o) = o--class MenuShellClass o => MenuClass o-toMenu :: MenuClass o => o -> Menu-toMenu = unsafeCastGObject . toGObject--instance MenuClass Menu-instance MenuShellClass Menu-instance ContainerClass Menu-instance WidgetClass Menu-instance GObjectClass Menu where-  toGObject = GObject . castForeignPtr . unMenu-  unsafeCastGObject = Menu . castForeignPtr . unGObject--castToMenu :: GObjectClass obj => obj -> Menu-castToMenu = castTo gTypeMenu "Menu"--gTypeMenu :: GType-gTypeMenu =-  {# call fun unsafe gtk_menu_get_type #}---- ********************************************************** RecentChooserMenu--{#pointer *GtkRecentChooserMenu as RecentChooserMenu foreign newtype #} deriving (Eq,Ord)--mkRecentChooserMenu = (RecentChooserMenu, objectUnrefFromMainloop)-unRecentChooserMenu (RecentChooserMenu o) = o--class MenuClass o => RecentChooserMenuClass o-toRecentChooserMenu :: RecentChooserMenuClass o => o -> RecentChooserMenu-toRecentChooserMenu = unsafeCastGObject . toGObject--instance RecentChooserMenuClass RecentChooserMenu-instance MenuClass RecentChooserMenu-instance MenuShellClass RecentChooserMenu-instance ContainerClass RecentChooserMenu-instance WidgetClass RecentChooserMenu-instance GObjectClass RecentChooserMenu where-  toGObject = GObject . castForeignPtr . unRecentChooserMenu-  unsafeCastGObject = RecentChooserMenu . castForeignPtr . unGObject--castToRecentChooserMenu :: GObjectClass obj => obj -> RecentChooserMenu-castToRecentChooserMenu = castTo gTypeRecentChooserMenu "RecentChooserMenu"--gTypeRecentChooserMenu :: GType-gTypeRecentChooserMenu =-  {# call fun unsafe gtk_recent_chooser_menu_get_type #}---- ******************************************************************** MenuBar--{#pointer *GtkMenuBar as MenuBar foreign newtype #} deriving (Eq,Ord)--mkMenuBar = (MenuBar, objectUnrefFromMainloop)-unMenuBar (MenuBar o) = o--class MenuShellClass o => MenuBarClass o-toMenuBar :: MenuBarClass o => o -> MenuBar-toMenuBar = unsafeCastGObject . toGObject--instance MenuBarClass MenuBar-instance MenuShellClass MenuBar-instance ContainerClass MenuBar-instance WidgetClass MenuBar-instance GObjectClass MenuBar where-  toGObject = GObject . castForeignPtr . unMenuBar-  unsafeCastGObject = MenuBar . castForeignPtr . unGObject--castToMenuBar :: GObjectClass obj => obj -> MenuBar-castToMenuBar = castTo gTypeMenuBar "MenuBar"--gTypeMenuBar :: GType-gTypeMenuBar =-  {# call fun unsafe gtk_menu_bar_get_type #}---- ******************************************************************* Notebook--{#pointer *GtkNotebook as Notebook foreign newtype #} deriving (Eq,Ord)--mkNotebook = (Notebook, objectUnrefFromMainloop)-unNotebook (Notebook o) = o--class ContainerClass o => NotebookClass o-toNotebook :: NotebookClass o => o -> Notebook-toNotebook = unsafeCastGObject . toGObject--instance NotebookClass Notebook-instance ContainerClass Notebook-instance WidgetClass Notebook-instance GObjectClass Notebook where-  toGObject = GObject . castForeignPtr . unNotebook-  unsafeCastGObject = Notebook . castForeignPtr . unGObject--castToNotebook :: GObjectClass obj => obj -> Notebook-castToNotebook = castTo gTypeNotebook "Notebook"--gTypeNotebook :: GType-gTypeNotebook =-  {# call fun unsafe gtk_notebook_get_type #}---- ********************************************************************** Table--{#pointer *GtkTable as Table foreign newtype #} deriving (Eq,Ord)--mkTable = (Table, objectUnrefFromMainloop)-unTable (Table o) = o--class ContainerClass o => TableClass o-toTable :: TableClass o => o -> Table-toTable = unsafeCastGObject . toGObject--instance TableClass Table-instance ContainerClass Table-instance WidgetClass Table-instance GObjectClass Table where-  toGObject = GObject . castForeignPtr . unTable-  unsafeCastGObject = Table . castForeignPtr . unGObject--castToTable :: GObjectClass obj => obj -> Table-castToTable = castTo gTypeTable "Table"--gTypeTable :: GType-gTypeTable =-  {# call fun unsafe gtk_table_get_type #}---- ******************************************************************* TextView--{#pointer *GtkTextView as TextView foreign newtype #} deriving (Eq,Ord)--mkTextView = (TextView, objectUnrefFromMainloop)-unTextView (TextView o) = o--class ContainerClass o => TextViewClass o-toTextView :: TextViewClass o => o -> TextView-toTextView = unsafeCastGObject . toGObject--instance TextViewClass TextView-instance ContainerClass TextView-instance WidgetClass TextView-instance GObjectClass TextView where-  toGObject = GObject . castForeignPtr . unTextView-  unsafeCastGObject = TextView . castForeignPtr . unGObject--castToTextView :: GObjectClass obj => obj -> TextView-castToTextView = castTo gTypeTextView "TextView"--gTypeTextView :: GType-gTypeTextView =-  {# call fun unsafe gtk_text_view_get_type #}---- ******************************************************************** Toolbar--{#pointer *GtkToolbar as Toolbar foreign newtype #} deriving (Eq,Ord)--mkToolbar = (Toolbar, objectUnrefFromMainloop)-unToolbar (Toolbar o) = o--class ContainerClass o => ToolbarClass o-toToolbar :: ToolbarClass o => o -> Toolbar-toToolbar = unsafeCastGObject . toGObject--instance ToolbarClass Toolbar-instance ContainerClass Toolbar-instance WidgetClass Toolbar-instance GObjectClass Toolbar where-  toGObject = GObject . castForeignPtr . unToolbar-  unsafeCastGObject = Toolbar . castForeignPtr . unGObject--castToToolbar :: GObjectClass obj => obj -> Toolbar-castToToolbar = castTo gTypeToolbar "Toolbar"--gTypeToolbar :: GType-gTypeToolbar =-  {# call fun unsafe gtk_toolbar_get_type #}---- ******************************************************************* TreeView--{#pointer *GtkTreeView as TreeView foreign newtype #} deriving (Eq,Ord)--mkTreeView = (TreeView, objectUnrefFromMainloop)-unTreeView (TreeView o) = o--class ContainerClass o => TreeViewClass o-toTreeView :: TreeViewClass o => o -> TreeView-toTreeView = unsafeCastGObject . toGObject--instance TreeViewClass TreeView-instance ContainerClass TreeView-instance WidgetClass TreeView-instance GObjectClass TreeView where-  toGObject = GObject . castForeignPtr . unTreeView-  unsafeCastGObject = TreeView . castForeignPtr . unGObject--castToTreeView :: GObjectClass obj => obj -> TreeView-castToTreeView = castTo gTypeTreeView "TreeView"--gTypeTreeView :: GType-gTypeTreeView =-  {# call fun unsafe gtk_tree_view_get_type #}---- ******************************************************************* Calendar--{#pointer *GtkCalendar as Calendar foreign newtype #} deriving (Eq,Ord)--mkCalendar = (Calendar, objectUnrefFromMainloop)-unCalendar (Calendar o) = o--class WidgetClass o => CalendarClass o-toCalendar :: CalendarClass o => o -> Calendar-toCalendar = unsafeCastGObject . toGObject--instance CalendarClass Calendar-instance WidgetClass Calendar-instance GObjectClass Calendar where-  toGObject = GObject . castForeignPtr . unCalendar-  unsafeCastGObject = Calendar . castForeignPtr . unGObject--castToCalendar :: GObjectClass obj => obj -> Calendar-castToCalendar = castTo gTypeCalendar "Calendar"--gTypeCalendar :: GType-gTypeCalendar =-  {# call fun unsafe gtk_calendar_get_type #}---- ******************************************************************* CellView--{#pointer *GtkCellView as CellView foreign newtype #} deriving (Eq,Ord)--mkCellView = (CellView, objectUnrefFromMainloop)-unCellView (CellView o) = o--class WidgetClass o => CellViewClass o-toCellView :: CellViewClass o => o -> CellView-toCellView = unsafeCastGObject . toGObject--instance CellViewClass CellView-instance WidgetClass CellView-instance GObjectClass CellView where-  toGObject = GObject . castForeignPtr . unCellView-  unsafeCastGObject = CellView . castForeignPtr . unGObject--castToCellView :: GObjectClass obj => obj -> CellView-castToCellView = castTo gTypeCellView "CellView"--gTypeCellView :: GType-gTypeCellView =-  {# call fun unsafe gtk_cell_view_get_type #}---- **************************************************************** DrawingArea--{#pointer *GtkDrawingArea as DrawingArea foreign newtype #} deriving (Eq,Ord)--mkDrawingArea = (DrawingArea, objectUnrefFromMainloop)-unDrawingArea (DrawingArea o) = o--class WidgetClass o => DrawingAreaClass o-toDrawingArea :: DrawingAreaClass o => o -> DrawingArea-toDrawingArea = unsafeCastGObject . toGObject--instance DrawingAreaClass DrawingArea-instance WidgetClass DrawingArea-instance GObjectClass DrawingArea where-  toGObject = GObject . castForeignPtr . unDrawingArea-  unsafeCastGObject = DrawingArea . castForeignPtr . unGObject--castToDrawingArea :: GObjectClass obj => obj -> DrawingArea-castToDrawingArea = castTo gTypeDrawingArea "DrawingArea"--gTypeDrawingArea :: GType-gTypeDrawingArea =-  {# call fun unsafe gtk_drawing_area_get_type #}---- ******************************************************************** Spinner--{#pointer *GtkSpinner as Spinner foreign newtype #} deriving (Eq,Ord)--mkSpinner = (Spinner, objectUnrefFromMainloop)-unSpinner (Spinner o) = o--class DrawingAreaClass o => SpinnerClass o-toSpinner :: SpinnerClass o => o -> Spinner-toSpinner = unsafeCastGObject . toGObject--instance SpinnerClass Spinner-instance DrawingAreaClass Spinner-instance WidgetClass Spinner-instance GObjectClass Spinner where-  toGObject = GObject . castForeignPtr . unSpinner-  unsafeCastGObject = Spinner . castForeignPtr . unGObject--castToSpinner :: GObjectClass obj => obj -> Spinner-castToSpinner = castTo gTypeSpinner "Spinner"--gTypeSpinner :: GType-gTypeSpinner =-  {# call fun unsafe gtk_spinner_get_type #}---- ********************************************************************** Entry--{#pointer *GtkEntry as Entry foreign newtype #} deriving (Eq,Ord)--mkEntry = (Entry, objectUnrefFromMainloop)-unEntry (Entry o) = o--class WidgetClass o => EntryClass o-toEntry :: EntryClass o => o -> Entry-toEntry = unsafeCastGObject . toGObject--instance EntryClass Entry-instance WidgetClass Entry-instance GObjectClass Entry where-  toGObject = GObject . castForeignPtr . unEntry-  unsafeCastGObject = Entry . castForeignPtr . unGObject--castToEntry :: GObjectClass obj => obj -> Entry-castToEntry = castTo gTypeEntry "Entry"--gTypeEntry :: GType-gTypeEntry =-  {# call fun unsafe gtk_entry_get_type #}---- ***************************************************************** SpinButton--{#pointer *GtkSpinButton as SpinButton foreign newtype #} deriving (Eq,Ord)--mkSpinButton = (SpinButton, objectUnrefFromMainloop)-unSpinButton (SpinButton o) = o--class EntryClass o => SpinButtonClass o-toSpinButton :: SpinButtonClass o => o -> SpinButton-toSpinButton = unsafeCastGObject . toGObject--instance SpinButtonClass SpinButton-instance EntryClass SpinButton-instance WidgetClass SpinButton-instance GObjectClass SpinButton where-  toGObject = GObject . castForeignPtr . unSpinButton-  unsafeCastGObject = SpinButton . castForeignPtr . unGObject--castToSpinButton :: GObjectClass obj => obj -> SpinButton-castToSpinButton = castTo gTypeSpinButton "SpinButton"--gTypeSpinButton :: GType-gTypeSpinButton =-  {# call fun unsafe gtk_spin_button_get_type #}---- ********************************************************************** Range--{#pointer *GtkRange as Range foreign newtype #} deriving (Eq,Ord)--mkRange = (Range, objectUnrefFromMainloop)-unRange (Range o) = o--class WidgetClass o => RangeClass o-toRange :: RangeClass o => o -> Range-toRange = unsafeCastGObject . toGObject--instance RangeClass Range-instance WidgetClass Range-instance GObjectClass Range where-  toGObject = GObject . castForeignPtr . unRange-  unsafeCastGObject = Range . castForeignPtr . unGObject--castToRange :: GObjectClass obj => obj -> Range-castToRange = castTo gTypeRange "Range"--gTypeRange :: GType-gTypeRange =-  {# call fun unsafe gtk_range_get_type #}---- ********************************************************************** Scale--{#pointer *GtkScale as Scale foreign newtype #} deriving (Eq,Ord)--mkScale = (Scale, objectUnrefFromMainloop)-unScale (Scale o) = o--class RangeClass o => ScaleClass o-toScale :: ScaleClass o => o -> Scale-toScale = unsafeCastGObject . toGObject--instance ScaleClass Scale-instance RangeClass Scale-instance WidgetClass Scale-instance GObjectClass Scale where-  toGObject = GObject . castForeignPtr . unScale-  unsafeCastGObject = Scale . castForeignPtr . unGObject--castToScale :: GObjectClass obj => obj -> Scale-castToScale = castTo gTypeScale "Scale"--gTypeScale :: GType-gTypeScale =-  {# call fun unsafe gtk_scale_get_type #}---- ********************************************************************* HScale--{#pointer *GtkHScale as HScale foreign newtype #} deriving (Eq,Ord)--mkHScale = (HScale, objectUnrefFromMainloop)-unHScale (HScale o) = o--class ScaleClass o => HScaleClass o-toHScale :: HScaleClass o => o -> HScale-toHScale = unsafeCastGObject . toGObject--instance HScaleClass HScale-instance ScaleClass HScale-instance RangeClass HScale-instance WidgetClass HScale-instance GObjectClass HScale where-  toGObject = GObject . castForeignPtr . unHScale-  unsafeCastGObject = HScale . castForeignPtr . unGObject--castToHScale :: GObjectClass obj => obj -> HScale-castToHScale = castTo gTypeHScale "HScale"--gTypeHScale :: GType-gTypeHScale =-  {# call fun unsafe gtk_hscale_get_type #}---- ********************************************************************* VScale--{#pointer *GtkVScale as VScale foreign newtype #} deriving (Eq,Ord)--mkVScale = (VScale, objectUnrefFromMainloop)-unVScale (VScale o) = o--class ScaleClass o => VScaleClass o-toVScale :: VScaleClass o => o -> VScale-toVScale = unsafeCastGObject . toGObject--instance VScaleClass VScale-instance ScaleClass VScale-instance RangeClass VScale-instance WidgetClass VScale-instance GObjectClass VScale where-  toGObject = GObject . castForeignPtr . unVScale-  unsafeCastGObject = VScale . castForeignPtr . unGObject--castToVScale :: GObjectClass obj => obj -> VScale-castToVScale = castTo gTypeVScale "VScale"--gTypeVScale :: GType-gTypeVScale =-  {# call fun unsafe gtk_vscale_get_type #}---- ****************************************************************** Scrollbar--{#pointer *GtkScrollbar as Scrollbar foreign newtype #} deriving (Eq,Ord)--mkScrollbar = (Scrollbar, objectUnrefFromMainloop)-unScrollbar (Scrollbar o) = o--class RangeClass o => ScrollbarClass o-toScrollbar :: ScrollbarClass o => o -> Scrollbar-toScrollbar = unsafeCastGObject . toGObject--instance ScrollbarClass Scrollbar-instance RangeClass Scrollbar-instance WidgetClass Scrollbar-instance GObjectClass Scrollbar where-  toGObject = GObject . castForeignPtr . unScrollbar-  unsafeCastGObject = Scrollbar . castForeignPtr . unGObject--castToScrollbar :: GObjectClass obj => obj -> Scrollbar-castToScrollbar = castTo gTypeScrollbar "Scrollbar"--gTypeScrollbar :: GType-gTypeScrollbar =-  {# call fun unsafe gtk_scrollbar_get_type #}---- ***************************************************************** HScrollbar--{#pointer *GtkHScrollbar as HScrollbar foreign newtype #} deriving (Eq,Ord)--mkHScrollbar = (HScrollbar, objectUnrefFromMainloop)-unHScrollbar (HScrollbar o) = o--class ScrollbarClass o => HScrollbarClass o-toHScrollbar :: HScrollbarClass o => o -> HScrollbar-toHScrollbar = unsafeCastGObject . toGObject--instance HScrollbarClass HScrollbar-instance ScrollbarClass HScrollbar-instance RangeClass HScrollbar-instance WidgetClass HScrollbar-instance GObjectClass HScrollbar where-  toGObject = GObject . castForeignPtr . unHScrollbar-  unsafeCastGObject = HScrollbar . castForeignPtr . unGObject--castToHScrollbar :: GObjectClass obj => obj -> HScrollbar-castToHScrollbar = castTo gTypeHScrollbar "HScrollbar"--gTypeHScrollbar :: GType-gTypeHScrollbar =-  {# call fun unsafe gtk_hscrollbar_get_type #}---- ***************************************************************** VScrollbar--{#pointer *GtkVScrollbar as VScrollbar foreign newtype #} deriving (Eq,Ord)--mkVScrollbar = (VScrollbar, objectUnrefFromMainloop)-unVScrollbar (VScrollbar o) = o--class ScrollbarClass o => VScrollbarClass o-toVScrollbar :: VScrollbarClass o => o -> VScrollbar-toVScrollbar = unsafeCastGObject . toGObject--instance VScrollbarClass VScrollbar-instance ScrollbarClass VScrollbar-instance RangeClass VScrollbar-instance WidgetClass VScrollbar-instance GObjectClass VScrollbar where-  toGObject = GObject . castForeignPtr . unVScrollbar-  unsafeCastGObject = VScrollbar . castForeignPtr . unGObject--castToVScrollbar :: GObjectClass obj => obj -> VScrollbar-castToVScrollbar = castTo gTypeVScrollbar "VScrollbar"--gTypeVScrollbar :: GType-gTypeVScrollbar =-  {# call fun unsafe gtk_vscrollbar_get_type #}---- ****************************************************************** Separator--{#pointer *GtkSeparator as Separator foreign newtype #} deriving (Eq,Ord)--mkSeparator = (Separator, objectUnrefFromMainloop)-unSeparator (Separator o) = o--class WidgetClass o => SeparatorClass o-toSeparator :: SeparatorClass o => o -> Separator-toSeparator = unsafeCastGObject . toGObject--instance SeparatorClass Separator-instance WidgetClass Separator-instance GObjectClass Separator where-  toGObject = GObject . castForeignPtr . unSeparator-  unsafeCastGObject = Separator . castForeignPtr . unGObject--castToSeparator :: GObjectClass obj => obj -> Separator-castToSeparator = castTo gTypeSeparator "Separator"--gTypeSeparator :: GType-gTypeSeparator =-  {# call fun unsafe gtk_separator_get_type #}---- ***************************************************************** HSeparator--{#pointer *GtkHSeparator as HSeparator foreign newtype #} deriving (Eq,Ord)--mkHSeparator = (HSeparator, objectUnrefFromMainloop)-unHSeparator (HSeparator o) = o--class SeparatorClass o => HSeparatorClass o-toHSeparator :: HSeparatorClass o => o -> HSeparator-toHSeparator = unsafeCastGObject . toGObject--instance HSeparatorClass HSeparator-instance SeparatorClass HSeparator-instance WidgetClass HSeparator-instance GObjectClass HSeparator where-  toGObject = GObject . castForeignPtr . unHSeparator-  unsafeCastGObject = HSeparator . castForeignPtr . unGObject--castToHSeparator :: GObjectClass obj => obj -> HSeparator-castToHSeparator = castTo gTypeHSeparator "HSeparator"--gTypeHSeparator :: GType-gTypeHSeparator =-  {# call fun unsafe gtk_hseparator_get_type #}---- ***************************************************************** VSeparator--{#pointer *GtkVSeparator as VSeparator foreign newtype #} deriving (Eq,Ord)--mkVSeparator = (VSeparator, objectUnrefFromMainloop)-unVSeparator (VSeparator o) = o--class SeparatorClass o => VSeparatorClass o-toVSeparator :: VSeparatorClass o => o -> VSeparator-toVSeparator = unsafeCastGObject . toGObject--instance VSeparatorClass VSeparator-instance SeparatorClass VSeparator-instance WidgetClass VSeparator-instance GObjectClass VSeparator where-  toGObject = GObject . castForeignPtr . unVSeparator-  unsafeCastGObject = VSeparator . castForeignPtr . unGObject--castToVSeparator :: GObjectClass obj => obj -> VSeparator-castToVSeparator = castTo gTypeVSeparator "VSeparator"--gTypeVSeparator :: GType-gTypeVSeparator =-  {# call fun unsafe gtk_vseparator_get_type #}---- ****************************************************************** Invisible--{#pointer *GtkInvisible as Invisible foreign newtype #} deriving (Eq,Ord)--mkInvisible = (Invisible, objectUnrefFromMainloop)-unInvisible (Invisible o) = o--class WidgetClass o => InvisibleClass o-toInvisible :: InvisibleClass o => o -> Invisible-toInvisible = unsafeCastGObject . toGObject--instance InvisibleClass Invisible-instance WidgetClass Invisible-instance GObjectClass Invisible where-  toGObject = GObject . castForeignPtr . unInvisible-  unsafeCastGObject = Invisible . castForeignPtr . unGObject--castToInvisible :: GObjectClass obj => obj -> Invisible-castToInvisible = castTo gTypeInvisible "Invisible"--gTypeInvisible :: GType-gTypeInvisible =-  {# call fun unsafe gtk_invisible_get_type #}---- **************************************************************** ProgressBar--{#pointer *GtkProgressBar as ProgressBar foreign newtype #} deriving (Eq,Ord)--mkProgressBar = (ProgressBar, objectUnrefFromMainloop)-unProgressBar (ProgressBar o) = o--class WidgetClass o => ProgressBarClass o-toProgressBar :: ProgressBarClass o => o -> ProgressBar-toProgressBar = unsafeCastGObject . toGObject--instance ProgressBarClass ProgressBar-instance WidgetClass ProgressBar-instance GObjectClass ProgressBar where-  toGObject = GObject . castForeignPtr . unProgressBar-  unsafeCastGObject = ProgressBar . castForeignPtr . unGObject--castToProgressBar :: GObjectClass obj => obj -> ProgressBar-castToProgressBar = castTo gTypeProgressBar "ProgressBar"--gTypeProgressBar :: GType-gTypeProgressBar =-  {# call fun unsafe gtk_progress_bar_get_type #}---- ***************************************************************** Adjustment--{#pointer *GtkAdjustment as Adjustment foreign newtype #} deriving (Eq,Ord)--mkAdjustment = (Adjustment, objectUnrefFromMainloop)-unAdjustment (Adjustment o) = o--class GObjectClass o => AdjustmentClass o-toAdjustment :: AdjustmentClass o => o -> Adjustment-toAdjustment = unsafeCastGObject . toGObject--instance AdjustmentClass Adjustment-instance GObjectClass Adjustment where-  toGObject = GObject . castForeignPtr . unAdjustment-  unsafeCastGObject = Adjustment . castForeignPtr . unGObject--castToAdjustment :: GObjectClass obj => obj -> Adjustment-castToAdjustment = castTo gTypeAdjustment "Adjustment"--gTypeAdjustment :: GType-gTypeAdjustment =-  {# call fun unsafe gtk_adjustment_get_type #}---- ****************************************************************** IMContext--{#pointer *GtkIMContext as IMContext foreign newtype #} deriving (Eq,Ord)--mkIMContext = (IMContext, objectUnrefFromMainloop)-unIMContext (IMContext o) = o--class GObjectClass o => IMContextClass o-toIMContext :: IMContextClass o => o -> IMContext-toIMContext = unsafeCastGObject . toGObject--instance IMContextClass IMContext-instance GObjectClass IMContext where-  toGObject = GObject . castForeignPtr . unIMContext-  unsafeCastGObject = IMContext . castForeignPtr . unGObject--castToIMContext :: GObjectClass obj => obj -> IMContext-castToIMContext = castTo gTypeIMContext "IMContext"--gTypeIMContext :: GType-gTypeIMContext =-  {# call fun unsafe gtk_im_context_get_type #}---- ************************************************************* IMMulticontext--{#pointer *GtkIMMulticontext as IMMulticontext foreign newtype #} deriving (Eq,Ord)--mkIMMulticontext = (IMMulticontext, objectUnrefFromMainloop)-unIMMulticontext (IMMulticontext o) = o--class IMContextClass o => IMMulticontextClass o-toIMMulticontext :: IMMulticontextClass o => o -> IMMulticontext-toIMMulticontext = unsafeCastGObject . toGObject--instance IMMulticontextClass IMMulticontext-instance IMContextClass IMMulticontext-instance GObjectClass IMMulticontext where-  toGObject = GObject . castForeignPtr . unIMMulticontext-  unsafeCastGObject = IMMulticontext . castForeignPtr . unGObject--castToIMMulticontext :: GObjectClass obj => obj -> IMMulticontext-castToIMMulticontext = castTo gTypeIMMulticontext "IMMulticontext"--gTypeIMMulticontext :: GType-gTypeIMMulticontext =-  {# call fun unsafe gtk_im_multicontext_get_type #}---- ************************************************************ IMContextSimple--{#pointer *GtkIMContextSimple as IMContextSimple foreign newtype #} deriving (Eq,Ord)--mkIMContextSimple = (IMContextSimple, objectUnrefFromMainloop)-unIMContextSimple (IMContextSimple o) = o--class IMContextClass o => IMContextSimpleClass o-toIMContextSimple :: IMContextSimpleClass o => o -> IMContextSimple-toIMContextSimple = unsafeCastGObject . toGObject--instance IMContextSimpleClass IMContextSimple-instance IMContextClass IMContextSimple-instance GObjectClass IMContextSimple where-  toGObject = GObject . castForeignPtr . unIMContextSimple-  unsafeCastGObject = IMContextSimple . castForeignPtr . unGObject--castToIMContextSimple :: GObjectClass obj => obj -> IMContextSimple-castToIMContextSimple = castTo gTypeIMContextSimple "IMContextSimple"--gTypeIMContextSimple :: GType-gTypeIMContextSimple =-  {# call fun unsafe gtk_im_context_simple_get_type #}---- ************************************************************* TreeViewColumn--{#pointer *GtkTreeViewColumn as TreeViewColumn foreign newtype #} deriving (Eq,Ord)--mkTreeViewColumn = (TreeViewColumn, objectUnrefFromMainloop)-unTreeViewColumn (TreeViewColumn o) = o--class GObjectClass o => TreeViewColumnClass o-toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn-toTreeViewColumn = unsafeCastGObject . toGObject--instance TreeViewColumnClass TreeViewColumn-instance GObjectClass TreeViewColumn where-  toGObject = GObject . castForeignPtr . unTreeViewColumn-  unsafeCastGObject = TreeViewColumn . castForeignPtr . unGObject--castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn-castToTreeViewColumn = castTo gTypeTreeViewColumn "TreeViewColumn"--gTypeTreeViewColumn :: GType-gTypeTreeViewColumn =-  {# call fun unsafe gtk_tree_view_column_get_type #}---- *************************************************************** CellRenderer--{#pointer *GtkCellRenderer as CellRenderer foreign newtype #} deriving (Eq,Ord)--mkCellRenderer = (CellRenderer, objectUnrefFromMainloop)-unCellRenderer (CellRenderer o) = o--class GObjectClass o => CellRendererClass o-toCellRenderer :: CellRendererClass o => o -> CellRenderer-toCellRenderer = unsafeCastGObject . toGObject--instance CellRendererClass CellRenderer-instance GObjectClass CellRenderer where-  toGObject = GObject . castForeignPtr . unCellRenderer-  unsafeCastGObject = CellRenderer . castForeignPtr . unGObject--castToCellRenderer :: GObjectClass obj => obj -> CellRenderer-castToCellRenderer = castTo gTypeCellRenderer "CellRenderer"--gTypeCellRenderer :: GType-gTypeCellRenderer =-  {# call fun unsafe gtk_cell_renderer_get_type #}---- ******************************************************** CellRendererSpinner--{#pointer *GtkCellRendererSpinner as CellRendererSpinner foreign newtype #} deriving (Eq,Ord)--mkCellRendererSpinner = (CellRendererSpinner, objectUnrefFromMainloop)-unCellRendererSpinner (CellRendererSpinner o) = o--class CellRendererClass o => CellRendererSpinnerClass o-toCellRendererSpinner :: CellRendererSpinnerClass o => o -> CellRendererSpinner-toCellRendererSpinner = unsafeCastGObject . toGObject--instance CellRendererSpinnerClass CellRendererSpinner-instance CellRendererClass CellRendererSpinner-instance GObjectClass CellRendererSpinner where-  toGObject = GObject . castForeignPtr . unCellRendererSpinner-  unsafeCastGObject = CellRendererSpinner . castForeignPtr . unGObject--castToCellRendererSpinner :: GObjectClass obj => obj -> CellRendererSpinner-castToCellRendererSpinner = castTo gTypeCellRendererSpinner "CellRendererSpinner"--gTypeCellRendererSpinner :: GType-gTypeCellRendererSpinner =-  {# call fun unsafe gtk_cell_renderer_spinner_get_type #}---- ********************************************************* CellRendererPixbuf--{#pointer *GtkCellRendererPixbuf as CellRendererPixbuf foreign newtype #} deriving (Eq,Ord)--mkCellRendererPixbuf = (CellRendererPixbuf, objectUnrefFromMainloop)-unCellRendererPixbuf (CellRendererPixbuf o) = o--class CellRendererClass o => CellRendererPixbufClass o-toCellRendererPixbuf :: CellRendererPixbufClass o => o -> CellRendererPixbuf-toCellRendererPixbuf = unsafeCastGObject . toGObject--instance CellRendererPixbufClass CellRendererPixbuf-instance CellRendererClass CellRendererPixbuf-instance GObjectClass CellRendererPixbuf where-  toGObject = GObject . castForeignPtr . unCellRendererPixbuf-  unsafeCastGObject = CellRendererPixbuf . castForeignPtr . unGObject--castToCellRendererPixbuf :: GObjectClass obj => obj -> CellRendererPixbuf-castToCellRendererPixbuf = castTo gTypeCellRendererPixbuf "CellRendererPixbuf"--gTypeCellRendererPixbuf :: GType-gTypeCellRendererPixbuf =-  {# call fun unsafe gtk_cell_renderer_pixbuf_get_type #}---- *********************************************************** CellRendererText--{#pointer *GtkCellRendererText as CellRendererText foreign newtype #} deriving (Eq,Ord)--mkCellRendererText = (CellRendererText, objectUnrefFromMainloop)-unCellRendererText (CellRendererText o) = o--class CellRendererClass o => CellRendererTextClass o-toCellRendererText :: CellRendererTextClass o => o -> CellRendererText-toCellRendererText = unsafeCastGObject . toGObject--instance CellRendererTextClass CellRendererText-instance CellRendererClass CellRendererText-instance GObjectClass CellRendererText where-  toGObject = GObject . castForeignPtr . unCellRendererText-  unsafeCastGObject = CellRendererText . castForeignPtr . unGObject--castToCellRendererText :: GObjectClass obj => obj -> CellRendererText-castToCellRendererText = castTo gTypeCellRendererText "CellRendererText"--gTypeCellRendererText :: GType-gTypeCellRendererText =-  {# call fun unsafe gtk_cell_renderer_text_get_type #}---- ********************************************************** CellRendererAccel--{#pointer *GtkCellRendererAccel as CellRendererAccel foreign newtype #} deriving (Eq,Ord)--mkCellRendererAccel = (CellRendererAccel, objectUnrefFromMainloop)-unCellRendererAccel (CellRendererAccel o) = o--class CellRendererTextClass o => CellRendererAccelClass o-toCellRendererAccel :: CellRendererAccelClass o => o -> CellRendererAccel-toCellRendererAccel = unsafeCastGObject . toGObject--instance CellRendererAccelClass CellRendererAccel-instance CellRendererTextClass CellRendererAccel-instance CellRendererClass CellRendererAccel-instance GObjectClass CellRendererAccel where-  toGObject = GObject . castForeignPtr . unCellRendererAccel-  unsafeCastGObject = CellRendererAccel . castForeignPtr . unGObject--castToCellRendererAccel :: GObjectClass obj => obj -> CellRendererAccel-castToCellRendererAccel = castTo gTypeCellRendererAccel "CellRendererAccel"--gTypeCellRendererAccel :: GType-gTypeCellRendererAccel =-  {# call fun unsafe gtk_cell_renderer_accel_get_type #}---- *********************************************************** CellRendererSpin--{#pointer *GtkCellRendererSpin as CellRendererSpin foreign newtype #} deriving (Eq,Ord)--mkCellRendererSpin = (CellRendererSpin, objectUnrefFromMainloop)-unCellRendererSpin (CellRendererSpin o) = o--class CellRendererTextClass o => CellRendererSpinClass o-toCellRendererSpin :: CellRendererSpinClass o => o -> CellRendererSpin-toCellRendererSpin = unsafeCastGObject . toGObject--instance CellRendererSpinClass CellRendererSpin-instance CellRendererTextClass CellRendererSpin-instance CellRendererClass CellRendererSpin-instance GObjectClass CellRendererSpin where-  toGObject = GObject . castForeignPtr . unCellRendererSpin-  unsafeCastGObject = CellRendererSpin . castForeignPtr . unGObject--castToCellRendererSpin :: GObjectClass obj => obj -> CellRendererSpin-castToCellRendererSpin = castTo gTypeCellRendererSpin "CellRendererSpin"--gTypeCellRendererSpin :: GType-gTypeCellRendererSpin =-  {# call fun unsafe gtk_cell_renderer_spin_get_type #}---- ********************************************************** CellRendererCombo--{#pointer *GtkCellRendererCombo as CellRendererCombo foreign newtype #} deriving (Eq,Ord)--mkCellRendererCombo = (CellRendererCombo, objectUnrefFromMainloop)-unCellRendererCombo (CellRendererCombo o) = o--class CellRendererTextClass o => CellRendererComboClass o-toCellRendererCombo :: CellRendererComboClass o => o -> CellRendererCombo-toCellRendererCombo = unsafeCastGObject . toGObject--instance CellRendererComboClass CellRendererCombo-instance CellRendererTextClass CellRendererCombo-instance CellRendererClass CellRendererCombo-instance GObjectClass CellRendererCombo where-  toGObject = GObject . castForeignPtr . unCellRendererCombo-  unsafeCastGObject = CellRendererCombo . castForeignPtr . unGObject--castToCellRendererCombo :: GObjectClass obj => obj -> CellRendererCombo-castToCellRendererCombo = castTo gTypeCellRendererCombo "CellRendererCombo"--gTypeCellRendererCombo :: GType-gTypeCellRendererCombo =-  {# call fun unsafe gtk_cell_renderer_combo_get_type #}---- ********************************************************* CellRendererToggle--{#pointer *GtkCellRendererToggle as CellRendererToggle foreign newtype #} deriving (Eq,Ord)--mkCellRendererToggle = (CellRendererToggle, objectUnrefFromMainloop)-unCellRendererToggle (CellRendererToggle o) = o--class CellRendererClass o => CellRendererToggleClass o-toCellRendererToggle :: CellRendererToggleClass o => o -> CellRendererToggle-toCellRendererToggle = unsafeCastGObject . toGObject--instance CellRendererToggleClass CellRendererToggle-instance CellRendererClass CellRendererToggle-instance GObjectClass CellRendererToggle where-  toGObject = GObject . castForeignPtr . unCellRendererToggle-  unsafeCastGObject = CellRendererToggle . castForeignPtr . unGObject--castToCellRendererToggle :: GObjectClass obj => obj -> CellRendererToggle-castToCellRendererToggle = castTo gTypeCellRendererToggle "CellRendererToggle"--gTypeCellRendererToggle :: GType-gTypeCellRendererToggle =-  {# call fun unsafe gtk_cell_renderer_toggle_get_type #}---- ******************************************************* CellRendererProgress--{#pointer *GtkCellRendererProgress as CellRendererProgress foreign newtype #} deriving (Eq,Ord)--mkCellRendererProgress = (CellRendererProgress, objectUnrefFromMainloop)-unCellRendererProgress (CellRendererProgress o) = o--class CellRendererClass o => CellRendererProgressClass o-toCellRendererProgress :: CellRendererProgressClass o => o -> CellRendererProgress-toCellRendererProgress = unsafeCastGObject . toGObject--instance CellRendererProgressClass CellRendererProgress-instance CellRendererClass CellRendererProgress-instance GObjectClass CellRendererProgress where-  toGObject = GObject . castForeignPtr . unCellRendererProgress-  unsafeCastGObject = CellRendererProgress . castForeignPtr . unGObject--castToCellRendererProgress :: GObjectClass obj => obj -> CellRendererProgress-castToCellRendererProgress = castTo gTypeCellRendererProgress "CellRendererProgress"--gTypeCellRendererProgress :: GType-gTypeCellRendererProgress =-  {# call fun unsafe gtk_cell_renderer_progress_get_type #}---- ***************************************************************** FileFilter--{#pointer *GtkFileFilter as FileFilter foreign newtype #} deriving (Eq,Ord)--mkFileFilter = (FileFilter, objectUnrefFromMainloop)-unFileFilter (FileFilter o) = o--class GObjectClass o => FileFilterClass o-toFileFilter :: FileFilterClass o => o -> FileFilter-toFileFilter = unsafeCastGObject . toGObject--instance FileFilterClass FileFilter-instance GObjectClass FileFilter where-  toGObject = GObject . castForeignPtr . unFileFilter-  unsafeCastGObject = FileFilter . castForeignPtr . unGObject--castToFileFilter :: GObjectClass obj => obj -> FileFilter-castToFileFilter = castTo gTypeFileFilter "FileFilter"--gTypeFileFilter :: GType-gTypeFileFilter =-  {# call fun unsafe gtk_file_filter_get_type #}---- ******************************************************************** Builder--{#pointer *GtkBuilder as Builder foreign newtype #} deriving (Eq,Ord)--mkBuilder = (Builder, objectUnrefFromMainloop)-unBuilder (Builder o) = o--class GObjectClass o => BuilderClass o-toBuilder :: BuilderClass o => o -> Builder-toBuilder = unsafeCastGObject . toGObject--instance BuilderClass Builder-instance GObjectClass Builder where-  toGObject = GObject . castForeignPtr . unBuilder-  unsafeCastGObject = Builder . castForeignPtr . unGObject--castToBuilder :: GObjectClass obj => obj -> Builder-castToBuilder = castTo gTypeBuilder "Builder"--gTypeBuilder :: GType-gTypeBuilder =-  {# call fun unsafe gtk_builder_get_type #}---- *************************************************************** StyleContext--{#pointer *GtkStyleContext as StyleContext foreign newtype #} deriving (Eq,Ord)--mkStyleContext = (StyleContext, objectUnrefFromMainloop)-unStyleContext (StyleContext o) = o--class GObjectClass o => StyleContextClass o-toStyleContext :: StyleContextClass o => o -> StyleContext-toStyleContext = unsafeCastGObject . toGObject--instance StyleContextClass StyleContext-instance GObjectClass StyleContext where-  toGObject = GObject . castForeignPtr . unStyleContext-  unsafeCastGObject = StyleContext . castForeignPtr . unGObject--castToStyleContext :: GObjectClass obj => obj -> StyleContext-castToStyleContext = castTo gTypeStyleContext "StyleContext"--gTypeStyleContext :: GType-gTypeStyleContext =-  {# call fun unsafe gtk_style_context_get_type #}---- ************************************************************** StyleProvider--{#pointer *GtkStyleProvider as StyleProvider foreign newtype #} deriving (Eq,Ord)--mkStyleProvider = (StyleProvider, objectUnrefFromMainloop)-unStyleProvider (StyleProvider o) = o--class GObjectClass o => StyleProviderClass o-toStyleProvider :: StyleProviderClass o => o -> StyleProvider-toStyleProvider = unsafeCastGObject . toGObject--instance StyleProviderClass StyleProvider-instance GObjectClass StyleProvider where-  toGObject = GObject . castForeignPtr . unStyleProvider-  unsafeCastGObject = StyleProvider . castForeignPtr . unGObject--castToStyleProvider :: GObjectClass obj => obj -> StyleProvider-castToStyleProvider = castTo gTypeStyleProvider "StyleProvider"--gTypeStyleProvider :: GType-gTypeStyleProvider =-  {# call fun unsafe gtk_style_provider_get_type #}---- **************************************************************** CssProvider--{#pointer *GtkCssProvider as CssProvider foreign newtype #} deriving (Eq,Ord)--mkCssProvider = (CssProvider, objectUnrefFromMainloop)-unCssProvider (CssProvider o) = o--class GObjectClass o => CssProviderClass o-toCssProvider :: CssProviderClass o => o -> CssProvider-toCssProvider = unsafeCastGObject . toGObject--instance CssProviderClass CssProvider-instance GObjectClass CssProvider where-  toGObject = GObject . castForeignPtr . unCssProvider-  unsafeCastGObject = CssProvider . castForeignPtr . unGObject--castToCssProvider :: GObjectClass obj => obj -> CssProvider-castToCssProvider = castTo gTypeCssProvider "CssProvider"--gTypeCssProvider :: GType-gTypeCssProvider =-  {# call fun unsafe gtk_css_provider_get_type #}---- ***************************************************************** CellLayout--{#pointer *GtkCellLayout as CellLayout foreign newtype #} deriving (Eq,Ord)--mkCellLayout = (CellLayout, objectUnrefFromMainloop)-unCellLayout (CellLayout o) = o--class GObjectClass o => CellLayoutClass o-toCellLayout :: CellLayoutClass o => o -> CellLayout-toCellLayout = unsafeCastGObject . toGObject--instance CellLayoutClass CellLayout-instance GObjectClass CellLayout where-  toGObject = GObject . castForeignPtr . unCellLayout-  unsafeCastGObject = CellLayout . castForeignPtr . unGObject--castToCellLayout :: GObjectClass obj => obj -> CellLayout-castToCellLayout = castTo gTypeCellLayout "CellLayout"--gTypeCellLayout :: GType-gTypeCellLayout =-  {# call fun unsafe gtk_cell_layout_get_type #}---- *************************************************************** TreeSortable--{#pointer *GtkTreeSortable as TreeSortable foreign newtype #} deriving (Eq,Ord)--mkTreeSortable = (TreeSortable, objectUnrefFromMainloop)-unTreeSortable (TreeSortable o) = o--class GObjectClass o => TreeSortableClass o-toTreeSortable :: TreeSortableClass o => o -> TreeSortable-toTreeSortable = unsafeCastGObject . toGObject--instance TreeSortableClass TreeSortable-instance GObjectClass TreeSortable where-  toGObject = GObject . castForeignPtr . unTreeSortable-  unsafeCastGObject = TreeSortable . castForeignPtr . unGObject--castToTreeSortable :: GObjectClass obj => obj -> TreeSortable-castToTreeSortable = castTo gTypeTreeSortable "TreeSortable"--gTypeTreeSortable :: GType-gTypeTreeSortable =-  {# call fun unsafe gtk_tree_sortable_get_type #}---- ******************************************************************** Tooltip--{#pointer *GtkTooltip as Tooltip foreign newtype #} deriving (Eq,Ord)--mkTooltip = (Tooltip, objectUnrefFromMainloop)-unTooltip (Tooltip o) = o--class GObjectClass o => TooltipClass o-toTooltip :: TooltipClass o => o -> Tooltip-toTooltip = unsafeCastGObject . toGObject--instance TooltipClass Tooltip-instance GObjectClass Tooltip where-  toGObject = GObject . castForeignPtr . unTooltip-  unsafeCastGObject = Tooltip . castForeignPtr . unGObject--castToTooltip :: GObjectClass obj => obj -> Tooltip-castToTooltip = castTo gTypeTooltip "Tooltip"--gTypeTooltip :: GType-gTypeTooltip =-  {# call fun unsafe gtk_tooltip_get_type #}---- ***************************************************************** StatusIcon--{#pointer *GtkStatusIcon as StatusIcon foreign newtype #} deriving (Eq,Ord)--mkStatusIcon = (StatusIcon, objectUnrefFromMainloop)-unStatusIcon (StatusIcon o) = o--class TooltipClass o => StatusIconClass o-toStatusIcon :: StatusIconClass o => o -> StatusIcon-toStatusIcon = unsafeCastGObject . toGObject--instance StatusIconClass StatusIcon-instance TooltipClass StatusIcon-instance GObjectClass StatusIcon where-  toGObject = GObject . castForeignPtr . unStatusIcon-  unsafeCastGObject = StatusIcon . castForeignPtr . unGObject--castToStatusIcon :: GObjectClass obj => obj -> StatusIcon-castToStatusIcon = castTo gTypeStatusIcon "StatusIcon"--gTypeStatusIcon :: GType-gTypeStatusIcon =-  {# call fun unsafe gtk_status_icon_get_type #}---- ************************************************************** TreeSelection--{#pointer *GtkTreeSelection as TreeSelection foreign newtype #} deriving (Eq,Ord)--mkTreeSelection = (TreeSelection, objectUnrefFromMainloop)-unTreeSelection (TreeSelection o) = o--class GObjectClass o => TreeSelectionClass o-toTreeSelection :: TreeSelectionClass o => o -> TreeSelection-toTreeSelection = unsafeCastGObject . toGObject--instance TreeSelectionClass TreeSelection-instance GObjectClass TreeSelection where-  toGObject = GObject . castForeignPtr . unTreeSelection-  unsafeCastGObject = TreeSelection . castForeignPtr . unGObject--castToTreeSelection :: GObjectClass obj => obj -> TreeSelection-castToTreeSelection = castTo gTypeTreeSelection "TreeSelection"--gTypeTreeSelection :: GType-gTypeTreeSelection =-  {# call fun unsafe gtk_tree_selection_get_type #}---- ****************************************************************** TreeModel--{#pointer *GtkTreeModel as TreeModel foreign newtype #} deriving (Eq,Ord)--mkTreeModel = (TreeModel, objectUnrefFromMainloop)-unTreeModel (TreeModel o) = o--class GObjectClass o => TreeModelClass o-toTreeModel :: TreeModelClass o => o -> TreeModel-toTreeModel = unsafeCastGObject . toGObject--instance TreeModelClass TreeModel-instance GObjectClass TreeModel where-  toGObject = GObject . castForeignPtr . unTreeModel-  unsafeCastGObject = TreeModel . castForeignPtr . unGObject--castToTreeModel :: GObjectClass obj => obj -> TreeModel-castToTreeModel = castTo gTypeTreeModel "TreeModel"--gTypeTreeModel :: GType-gTypeTreeModel =-  {# call fun unsafe gtk_tree_model_get_type #}---- ****************************************************************** TreeStore--{#pointer *GtkTreeStore as TreeStore foreign newtype #} deriving (Eq,Ord)--mkTreeStore = (TreeStore, objectUnrefFromMainloop)-unTreeStore (TreeStore o) = o--class TreeModelClass o => TreeStoreClass o-toTreeStore :: TreeStoreClass o => o -> TreeStore-toTreeStore = unsafeCastGObject . toGObject--instance TreeStoreClass TreeStore-instance TreeModelClass TreeStore-instance GObjectClass TreeStore where-  toGObject = GObject . castForeignPtr . unTreeStore-  unsafeCastGObject = TreeStore . castForeignPtr . unGObject--castToTreeStore :: GObjectClass obj => obj -> TreeStore-castToTreeStore = castTo gTypeTreeStore "TreeStore"--gTypeTreeStore :: GType-gTypeTreeStore =-  {# call fun unsafe gtk_tree_store_get_type #}---- ****************************************************************** ListStore--{#pointer *GtkListStore as ListStore foreign newtype #} deriving (Eq,Ord)--mkListStore = (ListStore, objectUnrefFromMainloop)-unListStore (ListStore o) = o--class TreeModelClass o => ListStoreClass o-toListStore :: ListStoreClass o => o -> ListStore-toListStore = unsafeCastGObject . toGObject--instance ListStoreClass ListStore-instance TreeModelClass ListStore-instance GObjectClass ListStore where-  toGObject = GObject . castForeignPtr . unListStore-  unsafeCastGObject = ListStore . castForeignPtr . unGObject--castToListStore :: GObjectClass obj => obj -> ListStore-castToListStore = castTo gTypeListStore "ListStore"--gTypeListStore :: GType-gTypeListStore =-  {# call fun unsafe gtk_list_store_get_type #}---- ************************************************************** TreeModelSort--{#pointer *GtkTreeModelSort as TreeModelSort foreign newtype #} deriving (Eq,Ord)--mkTreeModelSort = (TreeModelSort, objectUnrefFromMainloop)-unTreeModelSort (TreeModelSort o) = o--class GObjectClass o => TreeModelSortClass o-toTreeModelSort :: TreeModelSortClass o => o -> TreeModelSort-toTreeModelSort = unsafeCastGObject . toGObject--instance TreeModelSortClass TreeModelSort-instance GObjectClass TreeModelSort where-  toGObject = GObject . castForeignPtr . unTreeModelSort-  unsafeCastGObject = TreeModelSort . castForeignPtr . unGObject--castToTreeModelSort :: GObjectClass obj => obj -> TreeModelSort-castToTreeModelSort = castTo gTypeTreeModelSort "TreeModelSort"--gTypeTreeModelSort :: GType-gTypeTreeModelSort =-  {# call fun unsafe gtk_tree_model_sort_get_type #}---- ************************************************************ TreeModelFilter--{#pointer *GtkTreeModelFilter as TreeModelFilter foreign newtype #} deriving (Eq,Ord)--mkTreeModelFilter = (TreeModelFilter, objectUnrefFromMainloop)-unTreeModelFilter (TreeModelFilter o) = o--class GObjectClass o => TreeModelFilterClass o-toTreeModelFilter :: TreeModelFilterClass o => o -> TreeModelFilter-toTreeModelFilter = unsafeCastGObject . toGObject--instance TreeModelFilterClass TreeModelFilter-instance GObjectClass TreeModelFilter where-  toGObject = GObject . castForeignPtr . unTreeModelFilter-  unsafeCastGObject = TreeModelFilter . castForeignPtr . unGObject--castToTreeModelFilter :: GObjectClass obj => obj -> TreeModelFilter-castToTreeModelFilter = castTo gTypeTreeModelFilter "TreeModelFilter"--gTypeTreeModelFilter :: GType-gTypeTreeModelFilter =-  {# call fun unsafe gtk_tree_model_filter_get_type #}---- **************************************************************** IconFactory--{#pointer *GtkIconFactory as IconFactory foreign newtype #} deriving (Eq,Ord)--mkIconFactory = (IconFactory, objectUnrefFromMainloop)-unIconFactory (IconFactory o) = o--class GObjectClass o => IconFactoryClass o-toIconFactory :: IconFactoryClass o => o -> IconFactory-toIconFactory = unsafeCastGObject . toGObject--instance IconFactoryClass IconFactory-instance GObjectClass IconFactory where-  toGObject = GObject . castForeignPtr . unIconFactory-  unsafeCastGObject = IconFactory . castForeignPtr . unGObject--castToIconFactory :: GObjectClass obj => obj -> IconFactory-castToIconFactory = castTo gTypeIconFactory "IconFactory"--gTypeIconFactory :: GType-gTypeIconFactory =-  {# call fun unsafe gtk_icon_factory_get_type #}---- ****************************************************************** IconTheme--{#pointer *GtkIconTheme as IconTheme foreign newtype #} deriving (Eq,Ord)--mkIconTheme = (IconTheme, objectUnrefFromMainloop)-unIconTheme (IconTheme o) = o--class GObjectClass o => IconThemeClass o-toIconTheme :: IconThemeClass o => o -> IconTheme-toIconTheme = unsafeCastGObject . toGObject--instance IconThemeClass IconTheme-instance GObjectClass IconTheme where-  toGObject = GObject . castForeignPtr . unIconTheme-  unsafeCastGObject = IconTheme . castForeignPtr . unGObject--castToIconTheme :: GObjectClass obj => obj -> IconTheme-castToIconTheme = castTo gTypeIconTheme "IconTheme"--gTypeIconTheme :: GType-gTypeIconTheme =-  {# call fun unsafe gtk_icon_theme_get_type #}---- ****************************************************************** SizeGroup--{#pointer *GtkSizeGroup as SizeGroup foreign newtype #} deriving (Eq,Ord)--mkSizeGroup = (SizeGroup, objectUnrefFromMainloop)-unSizeGroup (SizeGroup o) = o--class GObjectClass o => SizeGroupClass o-toSizeGroup :: SizeGroupClass o => o -> SizeGroup-toSizeGroup = unsafeCastGObject . toGObject--instance SizeGroupClass SizeGroup-instance GObjectClass SizeGroup where-  toGObject = GObject . castForeignPtr . unSizeGroup-  unsafeCastGObject = SizeGroup . castForeignPtr . unGObject--castToSizeGroup :: GObjectClass obj => obj -> SizeGroup-castToSizeGroup = castTo gTypeSizeGroup "SizeGroup"--gTypeSizeGroup :: GType-gTypeSizeGroup =-  {# call fun unsafe gtk_size_group_get_type #}---- ****************************************************************** Clipboard--{#pointer *GtkClipboard as Clipboard foreign newtype #} deriving (Eq,Ord)--mkClipboard = (Clipboard, objectUnrefFromMainloop)-unClipboard (Clipboard o) = o--class GObjectClass o => ClipboardClass o-toClipboard :: ClipboardClass o => o -> Clipboard-toClipboard = unsafeCastGObject . toGObject--instance ClipboardClass Clipboard-instance GObjectClass Clipboard where-  toGObject = GObject . castForeignPtr . unClipboard-  unsafeCastGObject = Clipboard . castForeignPtr . unGObject--castToClipboard :: GObjectClass obj => obj -> Clipboard-castToClipboard = castTo gTypeClipboard "Clipboard"--gTypeClipboard :: GType-gTypeClipboard =-  {# call fun unsafe gtk_clipboard_get_type #}---- ***************************************************************** AccelGroup--{#pointer *GtkAccelGroup as AccelGroup foreign newtype #} deriving (Eq,Ord)--mkAccelGroup = (AccelGroup, objectUnrefFromMainloop)-unAccelGroup (AccelGroup o) = o--class GObjectClass o => AccelGroupClass o-toAccelGroup :: AccelGroupClass o => o -> AccelGroup-toAccelGroup = unsafeCastGObject . toGObject--instance AccelGroupClass AccelGroup-instance GObjectClass AccelGroup where-  toGObject = GObject . castForeignPtr . unAccelGroup-  unsafeCastGObject = AccelGroup . castForeignPtr . unGObject--castToAccelGroup :: GObjectClass obj => obj -> AccelGroup-castToAccelGroup = castTo gTypeAccelGroup "AccelGroup"--gTypeAccelGroup :: GType-gTypeAccelGroup =-  {# call fun unsafe gtk_accel_group_get_type #}---- ******************************************************************* AccelMap--{#pointer *GtkAccelMap as AccelMap foreign newtype #} deriving (Eq,Ord)--mkAccelMap = (AccelMap, objectUnrefFromMainloop)-unAccelMap (AccelMap o) = o--class GObjectClass o => AccelMapClass o-toAccelMap :: AccelMapClass o => o -> AccelMap-toAccelMap = unsafeCastGObject . toGObject--instance AccelMapClass AccelMap-instance GObjectClass AccelMap where-  toGObject = GObject . castForeignPtr . unAccelMap-  unsafeCastGObject = AccelMap . castForeignPtr . unGObject--castToAccelMap :: GObjectClass obj => obj -> AccelMap-castToAccelMap = castTo gTypeAccelMap "AccelMap"--gTypeAccelMap :: GType-gTypeAccelMap =-  {# call fun unsafe gtk_accel_map_get_type #}---- ************************************************************ EntryCompletion--{#pointer *GtkEntryCompletion as EntryCompletion foreign newtype #} deriving (Eq,Ord)--mkEntryCompletion = (EntryCompletion, objectUnrefFromMainloop)-unEntryCompletion (EntryCompletion o) = o--class GObjectClass o => EntryCompletionClass o-toEntryCompletion :: EntryCompletionClass o => o -> EntryCompletion-toEntryCompletion = unsafeCastGObject . toGObject--instance EntryCompletionClass EntryCompletion-instance GObjectClass EntryCompletion where-  toGObject = GObject . castForeignPtr . unEntryCompletion-  unsafeCastGObject = EntryCompletion . castForeignPtr . unGObject--castToEntryCompletion :: GObjectClass obj => obj -> EntryCompletion-castToEntryCompletion = castTo gTypeEntryCompletion "EntryCompletion"--gTypeEntryCompletion :: GType-gTypeEntryCompletion =-  {# call fun unsafe gtk_entry_completion_get_type #}---- **************************************************************** EntryBuffer--{#pointer *GtkEntryBuffer as EntryBuffer foreign newtype #} deriving (Eq,Ord)--mkEntryBuffer = (EntryBuffer, objectUnrefFromMainloop)-unEntryBuffer (EntryBuffer o) = o--class GObjectClass o => EntryBufferClass o-toEntryBuffer :: EntryBufferClass o => o -> EntryBuffer-toEntryBuffer = unsafeCastGObject . toGObject--instance EntryBufferClass EntryBuffer-instance GObjectClass EntryBuffer where-  toGObject = GObject . castForeignPtr . unEntryBuffer-  unsafeCastGObject = EntryBuffer . castForeignPtr . unGObject--castToEntryBuffer :: GObjectClass obj => obj -> EntryBuffer-castToEntryBuffer = castTo gTypeEntryBuffer "EntryBuffer"--gTypeEntryBuffer :: GType-gTypeEntryBuffer =-  {# call fun unsafe gtk_entry_buffer_get_type #}---- ********************************************************************* Action--{#pointer *GtkAction as Action foreign newtype #} deriving (Eq,Ord)--mkAction = (Action, objectUnrefFromMainloop)-unAction (Action o) = o--class GObjectClass o => ActionClass o-toAction :: ActionClass o => o -> Action-toAction = unsafeCastGObject . toGObject--instance ActionClass Action-instance GObjectClass Action where-  toGObject = GObject . castForeignPtr . unAction-  unsafeCastGObject = Action . castForeignPtr . unGObject--castToAction :: GObjectClass obj => obj -> Action-castToAction = castTo gTypeAction "Action"--gTypeAction :: GType-gTypeAction =-  {# call fun unsafe gtk_action_get_type #}---- *************************************************************** RecentAction--{#pointer *GtkRecentAction as RecentAction foreign newtype #} deriving (Eq,Ord)--mkRecentAction = (RecentAction, objectUnrefFromMainloop)-unRecentAction (RecentAction o) = o--class ActionClass o => RecentActionClass o-toRecentAction :: RecentActionClass o => o -> RecentAction-toRecentAction = unsafeCastGObject . toGObject--instance RecentActionClass RecentAction-instance ActionClass RecentAction-instance GObjectClass RecentAction where-  toGObject = GObject . castForeignPtr . unRecentAction-  unsafeCastGObject = RecentAction . castForeignPtr . unGObject--castToRecentAction :: GObjectClass obj => obj -> RecentAction-castToRecentAction = castTo gTypeRecentAction "RecentAction"--gTypeRecentAction :: GType-gTypeRecentAction =-  {# call fun unsafe gtk_recent_action_get_type #}---- *************************************************************** ToggleAction--{#pointer *GtkToggleAction as ToggleAction foreign newtype #} deriving (Eq,Ord)--mkToggleAction = (ToggleAction, objectUnrefFromMainloop)-unToggleAction (ToggleAction o) = o--class ActionClass o => ToggleActionClass o-toToggleAction :: ToggleActionClass o => o -> ToggleAction-toToggleAction = unsafeCastGObject . toGObject--instance ToggleActionClass ToggleAction-instance ActionClass ToggleAction-instance GObjectClass ToggleAction where-  toGObject = GObject . castForeignPtr . unToggleAction-  unsafeCastGObject = ToggleAction . castForeignPtr . unGObject--castToToggleAction :: GObjectClass obj => obj -> ToggleAction-castToToggleAction = castTo gTypeToggleAction "ToggleAction"--gTypeToggleAction :: GType-gTypeToggleAction =-  {# call fun unsafe gtk_toggle_action_get_type #}---- **************************************************************** RadioAction--{#pointer *GtkRadioAction as RadioAction foreign newtype #} deriving (Eq,Ord)--mkRadioAction = (RadioAction, objectUnrefFromMainloop)-unRadioAction (RadioAction o) = o--class ToggleActionClass o => RadioActionClass o-toRadioAction :: RadioActionClass o => o -> RadioAction-toRadioAction = unsafeCastGObject . toGObject--instance RadioActionClass RadioAction-instance ToggleActionClass RadioAction-instance ActionClass RadioAction-instance GObjectClass RadioAction where-  toGObject = GObject . castForeignPtr . unRadioAction-  unsafeCastGObject = RadioAction . castForeignPtr . unGObject--castToRadioAction :: GObjectClass obj => obj -> RadioAction-castToRadioAction = castTo gTypeRadioAction "RadioAction"--gTypeRadioAction :: GType-gTypeRadioAction =-  {# call fun unsafe gtk_radio_action_get_type #}---- **************************************************************** ActionGroup--{#pointer *GtkActionGroup as ActionGroup foreign newtype #} deriving (Eq,Ord)--mkActionGroup = (ActionGroup, objectUnrefFromMainloop)-unActionGroup (ActionGroup o) = o--class GObjectClass o => ActionGroupClass o-toActionGroup :: ActionGroupClass o => o -> ActionGroup-toActionGroup = unsafeCastGObject . toGObject--instance ActionGroupClass ActionGroup-instance GObjectClass ActionGroup where-  toGObject = GObject . castForeignPtr . unActionGroup-  unsafeCastGObject = ActionGroup . castForeignPtr . unGObject--castToActionGroup :: GObjectClass obj => obj -> ActionGroup-castToActionGroup = castTo gTypeActionGroup "ActionGroup"--gTypeActionGroup :: GType-gTypeActionGroup =-  {# call fun unsafe gtk_action_group_get_type #}---- ****************************************************************** UIManager--{#pointer *GtkUIManager as UIManager foreign newtype #} deriving (Eq,Ord)--mkUIManager = (UIManager, objectUnrefFromMainloop)-unUIManager (UIManager o) = o--class GObjectClass o => UIManagerClass o-toUIManager :: UIManagerClass o => o -> UIManager-toUIManager = unsafeCastGObject . toGObject--instance UIManagerClass UIManager-instance GObjectClass UIManager where-  toGObject = GObject . castForeignPtr . unUIManager-  unsafeCastGObject = UIManager . castForeignPtr . unGObject--castToUIManager :: GObjectClass obj => obj -> UIManager-castToUIManager = castTo gTypeUIManager "UIManager"--gTypeUIManager :: GType-gTypeUIManager =-  {# call fun unsafe gtk_ui_manager_get_type #}---- **************************************************************** WindowGroup--{#pointer *GtkWindowGroup as WindowGroup foreign newtype #} deriving (Eq,Ord)--mkWindowGroup = (WindowGroup, objectUnrefFromMainloop)-unWindowGroup (WindowGroup o) = o--class GObjectClass o => WindowGroupClass o-toWindowGroup :: WindowGroupClass o => o -> WindowGroup-toWindowGroup = unsafeCastGObject . toGObject--instance WindowGroupClass WindowGroup-instance GObjectClass WindowGroup where-  toGObject = GObject . castForeignPtr . unWindowGroup-  unsafeCastGObject = WindowGroup . castForeignPtr . unGObject--castToWindowGroup :: GObjectClass obj => obj -> WindowGroup-castToWindowGroup = castTo gTypeWindowGroup "WindowGroup"--gTypeWindowGroup :: GType-gTypeWindowGroup =-  {# call fun unsafe gtk_window_group_get_type #}---- *************************************************************** CellEditable--{#pointer *GtkCellEditable as CellEditable foreign newtype #} deriving (Eq,Ord)--mkCellEditable = (CellEditable, objectUnrefFromMainloop)-unCellEditable (CellEditable o) = o--class GObjectClass o => CellEditableClass o-toCellEditable :: CellEditableClass o => o -> CellEditable-toCellEditable = unsafeCastGObject . toGObject--instance CellEditableClass CellEditable-instance GObjectClass CellEditable where-  toGObject = GObject . castForeignPtr . unCellEditable-  unsafeCastGObject = CellEditable . castForeignPtr . unGObject--castToCellEditable :: GObjectClass obj => obj -> CellEditable-castToCellEditable = castTo gTypeCellEditable "CellEditable"--gTypeCellEditable :: GType-gTypeCellEditable =-  {# call fun unsafe gtk_cell_editable_get_type #}---- ******************************************************************* Editable--{#pointer *GtkEditable as Editable foreign newtype #} deriving (Eq,Ord)--mkEditable = (Editable, objectUnrefFromMainloop)-unEditable (Editable o) = o--class GObjectClass o => EditableClass o-toEditable :: EditableClass o => o -> Editable-toEditable = unsafeCastGObject . toGObject--instance EditableClass Editable-instance GObjectClass Editable where-  toGObject = GObject . castForeignPtr . unEditable-  unsafeCastGObject = Editable . castForeignPtr . unGObject--castToEditable :: GObjectClass obj => obj -> Editable-castToEditable = castTo gTypeEditable "Editable"--gTypeEditable :: GType-gTypeEditable =-  {# call fun unsafe gtk_editable_get_type #}---- **************************************************************** FileChooser--{#pointer *GtkFileChooser as FileChooser foreign newtype #} deriving (Eq,Ord)--mkFileChooser = (FileChooser, objectUnrefFromMainloop)-unFileChooser (FileChooser o) = o--class GObjectClass o => FileChooserClass o-toFileChooser :: FileChooserClass o => o -> FileChooser-toFileChooser = unsafeCastGObject . toGObject--instance FileChooserClass FileChooser-instance GObjectClass FileChooser where-  toGObject = GObject . castForeignPtr . unFileChooser-  unsafeCastGObject = FileChooser . castForeignPtr . unGObject--castToFileChooser :: GObjectClass obj => obj -> FileChooser-castToFileChooser = castTo gTypeFileChooser "FileChooser"--gTypeFileChooser :: GType-gTypeFileChooser =-  {# call fun unsafe gtk_file_chooser_get_type #}-
Graphics/UI/Gtk/Windows/AboutDialog.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.Windows.AboutDialog ( -- * Detail--- +-- -- | The 'AboutDialog' offers a simple way to display information about a -- program like its logo, name, copyright, website and license. It is also -- possible to give credits to the authors, documenters, translators and@@ -140,15 +140,14 @@ #endif   ) where -import Control.Monad	(liftM)-import Data.Maybe	(fromMaybe)+import Control.Monad    (liftM)+import Data.Maybe       (fromMaybe)  import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject      	(makeNewGObject, destroyFunPtr)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#}  {# context lib="gtk" prefix="gtk" #}@@ -168,10 +167,11 @@ -------------------- -- Methods +#ifndef DISABLE_DEPRECATED -- | Returns the program name displayed in the about dialog. ---aboutDialogGetName :: AboutDialogClass self => self- -> IO String -- ^ returns The program name.+aboutDialogGetName :: (AboutDialogClass self, GlibString string) => self+ -> IO string -- ^ returns The program name. aboutDialogGetName self = #if GTK_CHECK_VERSION(2,12,0)   {# call gtk_about_dialog_get_program_name #}@@ -184,8 +184,8 @@ -- | Sets the name to display in the about dialog. If this is not set, it -- defaults to the program executable name. ---aboutDialogSetName :: AboutDialogClass self => self- -> String -- ^ @name@ - the program name+aboutDialogSetName :: (AboutDialogClass self, GlibString string) => self+ -> string -- ^ @name@ - the program name  -> IO () aboutDialogSetName self name =   withUTFString name $ \namePtr ->@@ -199,7 +199,7 @@  -- | Returns the version string. ---aboutDialogGetVersion :: AboutDialogClass self => self -> IO String+aboutDialogGetVersion :: (AboutDialogClass self, GlibString string) => self -> IO string aboutDialogGetVersion self =   {# call gtk_about_dialog_get_version #}     (toAboutDialog self)@@ -207,7 +207,7 @@  -- | Sets the version string to display in the about dialog. ---aboutDialogSetVersion :: AboutDialogClass self => self -> String -> IO ()+aboutDialogSetVersion :: (AboutDialogClass self, GlibString string) => self -> string -> IO () aboutDialogSetVersion self version =   withUTFString version $ \versionPtr ->   {# call gtk_about_dialog_set_version #}@@ -216,7 +216,7 @@  -- | Returns the copyright string. ---aboutDialogGetCopyright :: AboutDialogClass self => self -> IO String+aboutDialogGetCopyright :: (AboutDialogClass self, GlibString string) => self -> IO string aboutDialogGetCopyright self =   {# call gtk_about_dialog_get_copyright #}     (toAboutDialog self)@@ -225,7 +225,7 @@ -- | Sets the copyright string to display in the about dialog. This should be -- a short string of one or two lines. ---aboutDialogSetCopyright :: AboutDialogClass self => self -> String -> IO ()+aboutDialogSetCopyright :: (AboutDialogClass self, GlibString string) => self -> string -> IO () aboutDialogSetCopyright self copyright =   withUTFString copyright $ \copyrightPtr ->   {# call gtk_about_dialog_set_copyright #}@@ -234,7 +234,7 @@  -- | Returns the comments string. ---aboutDialogGetComments :: AboutDialogClass self => self -> IO String+aboutDialogGetComments :: (AboutDialogClass self, GlibString string) => self -> IO string aboutDialogGetComments self =   {# call gtk_about_dialog_get_comments #}     (toAboutDialog self)@@ -243,7 +243,7 @@ -- | Sets the comments string to display in the about dialog. This should be a -- short string of one or two lines. ---aboutDialogSetComments :: AboutDialogClass self => self -> String -> IO ()+aboutDialogSetComments :: (AboutDialogClass self, GlibString string) => self -> string -> IO () aboutDialogSetComments self comments =   withUTFString comments $ \commentsPtr ->   {# call gtk_about_dialog_set_comments #}@@ -252,7 +252,7 @@  -- | Returns the license information. ---aboutDialogGetLicense :: AboutDialogClass self => self -> IO (Maybe String)+aboutDialogGetLicense :: (AboutDialogClass self, GlibString string) => self -> IO (Maybe string) aboutDialogGetLicense self =   {# call gtk_about_dialog_get_license #}     (toAboutDialog self)@@ -261,8 +261,8 @@ -- | Sets the license information to be displayed in the secondary license -- dialog. If @license@ is @Nothing@, the license button is hidden. ---aboutDialogSetLicense :: AboutDialogClass self => self- -> Maybe String -- ^ @license@ - the license information or @Nothing@+aboutDialogSetLicense :: (AboutDialogClass self, GlibString string) => self+ -> Maybe string -- ^ @license@ - the license information or @Nothing@  -> IO () aboutDialogSetLicense self license =   maybeWith withUTFString license $ \licensePtr ->@@ -272,7 +272,7 @@  -- | Returns the website URL. ---aboutDialogGetWebsite :: AboutDialogClass self => self -> IO String+aboutDialogGetWebsite :: (AboutDialogClass self, GlibString string) => self -> IO string aboutDialogGetWebsite self =   {# call gtk_about_dialog_get_website #}     (toAboutDialog self)@@ -280,8 +280,8 @@  -- | Sets the URL to use for the website link. ---aboutDialogSetWebsite :: AboutDialogClass self => self- -> String -- ^ @website@ - a URL string starting with \"http:\/\/\"+aboutDialogSetWebsite :: (AboutDialogClass self, GlibString string) => self+ -> string -- ^ @website@ - a URL string starting with \"http:\/\/\"  -> IO () aboutDialogSetWebsite self website =   withUTFString website $ \websitePtr ->@@ -291,7 +291,7 @@  -- | Returns the label used for the website link. ---aboutDialogGetWebsiteLabel :: AboutDialogClass self => self -> IO String+aboutDialogGetWebsiteLabel :: (AboutDialogClass self, GlibString string) => self -> IO string aboutDialogGetWebsiteLabel self =   {# call gtk_about_dialog_get_website_label #}     (toAboutDialog self)@@ -300,18 +300,19 @@ -- | Sets the label to be used for the website link. It defaults to the -- website URL. ---aboutDialogSetWebsiteLabel :: AboutDialogClass self => self -> String -> IO ()+aboutDialogSetWebsiteLabel :: (AboutDialogClass self, GlibString string) => self -> string -> IO () aboutDialogSetWebsiteLabel self websiteLabel =   withUTFString websiteLabel $ \websiteLabelPtr ->   {# call gtk_about_dialog_set_website_label #}     (toAboutDialog self)     websiteLabelPtr+#endif  -- | Sets the strings which are displayed in the authors tab of the secondary -- credits dialog. ---aboutDialogSetAuthors :: AboutDialogClass self => self- -> [String] -- ^ @authors@ - a list of author names+aboutDialogSetAuthors :: (AboutDialogClass self, GlibString string) => self+ -> [string] -- ^ @authors@ - a list of author names  -> IO () aboutDialogSetAuthors self authors =   withUTFStringArray0 authors $ \authorsPtr ->@@ -322,7 +323,7 @@ -- | Returns the string which are displayed in the authors tab of the -- secondary credits dialog. ---aboutDialogGetAuthors :: AboutDialogClass self => self -> IO [String]+aboutDialogGetAuthors :: (AboutDialogClass self, GlibString string) => self -> IO [string] aboutDialogGetAuthors self =   {# call gtk_about_dialog_get_authors #}     (toAboutDialog self)@@ -331,8 +332,8 @@ -- | Sets the strings which are displayed in the artists tab of the secondary -- credits dialog. ---aboutDialogSetArtists :: AboutDialogClass self => self- -> [String] -- ^ @artists@ - a list of artist names+aboutDialogSetArtists :: (AboutDialogClass self, GlibString string) => self+ -> [string] -- ^ @artists@ - a list of artist names  -> IO () aboutDialogSetArtists self artists =   withUTFStringArray0 artists $ \artistsPtr ->@@ -343,7 +344,7 @@ -- | Returns the string which are displayed in the artists tab of the -- secondary credits dialog. ---aboutDialogGetArtists :: AboutDialogClass self => self -> IO [String]+aboutDialogGetArtists :: (AboutDialogClass self, GlibString string) => self -> IO [string] aboutDialogGetArtists self =   {# call gtk_about_dialog_get_artists #}     (toAboutDialog self)@@ -352,8 +353,8 @@ -- | Sets the strings which are displayed in the documenters tab of the -- secondary credits dialog. ---aboutDialogSetDocumenters :: AboutDialogClass self => self- -> [String] -- ^ @artists@ - a list of documenter names+aboutDialogSetDocumenters :: (AboutDialogClass self, GlibString string) => self+ -> [string] -- ^ @artists@ - a list of documenter names  -> IO () aboutDialogSetDocumenters self documenters =   withUTFStringArray0 documenters $ \documentersPtr ->@@ -364,16 +365,17 @@ -- | Returns the string which are displayed in the documenters tab of the -- secondary credits dialog. ---aboutDialogGetDocumenters :: AboutDialogClass self => self -> IO [String]+aboutDialogGetDocumenters :: (AboutDialogClass self, GlibString string) => self -> IO [string] aboutDialogGetDocumenters self =   {# call gtk_about_dialog_get_documenters #}     (toAboutDialog self)   >>= peekUTFStringArray0 +#ifndef DISABLE_DEPRECATED -- | Returns the translator credits string which is displayed in the -- translators tab of the secondary credits dialog. ---aboutDialogGetTranslatorCredits :: AboutDialogClass self => self -> IO String+aboutDialogGetTranslatorCredits :: (AboutDialogClass self, GlibString string) => self -> IO string aboutDialogGetTranslatorCredits self =   {# call gtk_about_dialog_get_translator_credits #}     (toAboutDialog self)@@ -385,12 +387,13 @@ -- The intended use for this string is to display the translator of the -- language which is currently used in the user interface. ---aboutDialogSetTranslatorCredits :: AboutDialogClass self => self -> String -> IO ()+aboutDialogSetTranslatorCredits :: (AboutDialogClass self, GlibString string) => self -> string -> IO () aboutDialogSetTranslatorCredits self translatorCredits =   withUTFString translatorCredits $ \translatorCreditsPtr ->   {# call gtk_about_dialog_set_translator_credits #}     (toAboutDialog self)     translatorCreditsPtr+#endif  -- | Returns the pixbuf displayed as logo in the about dialog. --@@ -414,7 +417,7 @@  -- | Returns the icon name displayed as logo in the about dialog. ---aboutDialogGetLogoIconName :: AboutDialogClass self => self -> IO String+aboutDialogGetLogoIconName :: (AboutDialogClass self, GlibString string) => self -> IO string aboutDialogGetLogoIconName self =   {# call gtk_about_dialog_get_logo_icon_name #}     (toAboutDialog self)@@ -424,8 +427,8 @@ -- @Nothing@, the default window icon set with 'windowSetDefaultIcon' will be -- used. ---aboutDialogSetLogoIconName :: AboutDialogClass self => self- -> Maybe String -- ^ @iconName@ - an icon name, or @Nothing@+aboutDialogSetLogoIconName :: (AboutDialogClass self, GlibString string) => self+ -> Maybe string -- ^ @iconName@ - an icon name, or @Nothing@  -> IO () aboutDialogSetLogoIconName self iconName =   maybeWith withUTFString iconName $ \iconNamePtr ->@@ -438,8 +441,8 @@ -- email link in an about dialog. -- -- Removed in Gtk3.-aboutDialogSetEmailHook :: -    (String -> IO ()) -- ^ @(\url -> ...)@ - a function to call when an email+aboutDialogSetEmailHook :: GlibString string+ => (string -> IO ()) -- ^ @(\url -> ...)@ - a function to call when an email                       -- link is activated.  -> IO () aboutDialogSetEmailHook func = do@@ -457,8 +460,8 @@ -- link in an about dialog. -- -- Removed in Gtk3.-aboutDialogSetUrlHook :: -    (String -> IO ()) -- ^ @(\url -> ...)@ - a function to call when a URL link+aboutDialogSetUrlHook ::GlibString string+ => (string -> IO ()) -- ^ @(\url -> ...)@ - a function to call when a URL link                       -- is activated.  -> IO () aboutDialogSetUrlHook func = do@@ -478,6 +481,7 @@   (Ptr AboutDialog -> CString -> Ptr () -> IO ()) -> IO AboutDialogActivateLinkFunc #endif +#ifndef DISABLE_DEPRECATED #if GTK_CHECK_VERSION(2,8,0) -- | Returns whether the license text in @about@ is automatically wrapped. --@@ -502,6 +506,7 @@     (toAboutDialog self)     (fromBool wrapLicense) #endif+#endif  -------------------- -- Attributes@@ -509,35 +514,35 @@ -- | The name of the program. If this is not set, it defaults to -- 'gGetApplicationName'. ---aboutDialogName :: AboutDialogClass self => Attr self String+aboutDialogName :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogName = newAttrFromStringProperty "name"  -- | The name of the program. If this is not set, it defaults to -- 'gGetApplicationName'. -- #if GTK_CHECK_VERSION(2,12,0)-aboutDialogProgramName :: AboutDialogClass self => Attr self String+aboutDialogProgramName :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogProgramName = newAttrFromStringProperty "program-name" #else-aboutDialogProgramName :: AboutDialogClass self => Attr self String+aboutDialogProgramName :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogProgramName = newAttrFromStringProperty "name" #endif  -- | The version of the program. ---aboutDialogVersion :: AboutDialogClass self => Attr self String+aboutDialogVersion :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogVersion = newAttrFromStringProperty "version"  -- | Copyright information for the program. ---aboutDialogCopyright :: AboutDialogClass self => Attr self String+aboutDialogCopyright :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogCopyright = newAttrFromStringProperty "copyright"  -- | Comments about the program. This string is displayed in a label in the -- main dialog, thus it should be a short explanation of the main purpose of -- the program, not a detailed list of features. ---aboutDialogComments :: AboutDialogClass self => Attr self String+aboutDialogComments :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogComments = newAttrFromStringProperty "comments"  -- | The license of the program. This string is displayed in a text view in a@@ -548,26 +553,26 @@ -- -- Default value: @Nothing@ ---aboutDialogLicense :: AboutDialogClass self => Attr self (Maybe String)+aboutDialogLicense :: (AboutDialogClass self, GlibString string) => Attr self (Maybe string) aboutDialogLicense = newAttrFromMaybeStringProperty "license"  -- | The URL for the link to the website of the program. This should be a -- string starting with \"http:\/\/. ---aboutDialogWebsite :: AboutDialogClass self => Attr self String+aboutDialogWebsite :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogWebsite = newAttrFromStringProperty "website"  -- | The label for the link to the website of the program. If this is not set, -- it defaults to the URL specified in the website property. ---aboutDialogWebsiteLabel :: AboutDialogClass self => Attr self String+aboutDialogWebsiteLabel :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogWebsiteLabel = newAttrFromStringProperty "website-label"  -- | The authors of the program. Each string may -- contain email addresses and URLs, which will be displayed as links, see the -- introduction for more details. ---aboutDialogAuthors :: AboutDialogClass self => Attr self [String]+aboutDialogAuthors :: (AboutDialogClass self, GlibString string) => Attr self [string] aboutDialogAuthors = newAttr   aboutDialogGetAuthors   aboutDialogSetAuthors@@ -576,7 +581,7 @@ -- Each string may contain email addresses and URLs, which will be displayed as -- links, see the introduction for more details. ---aboutDialogDocumenters :: AboutDialogClass self => Attr self [String]+aboutDialogDocumenters :: (AboutDialogClass self, GlibString string) => Attr self [string] aboutDialogDocumenters = newAttr   aboutDialogGetDocumenters   aboutDialogSetDocumenters@@ -585,7 +590,7 @@ -- Each string may contain email addresses and URLs, which will be -- displayed as links, see the introduction for more details. ---aboutDialogArtists :: AboutDialogClass self => Attr self [String]+aboutDialogArtists :: (AboutDialogClass self, GlibString string) => Attr self [string] aboutDialogArtists = newAttr   aboutDialogGetArtists   aboutDialogSetArtists@@ -594,7 +599,7 @@ -- The string may contain email addresses and URLs, which will be displayed as -- links, see the introduction for more details. ---aboutDialogTranslatorCredits :: AboutDialogClass self => Attr self String+aboutDialogTranslatorCredits :: (AboutDialogClass self, GlibString string) => Attr self string aboutDialogTranslatorCredits = newAttrFromStringProperty "translator-credits"  -- | A logo for the about box. If this is not set, it defaults to@@ -610,7 +615,7 @@ -- -- Default value: @Nothing@ ---aboutDialogLogoIconName :: AboutDialogClass self => ReadWriteAttr self String (Maybe String)+aboutDialogLogoIconName :: (AboutDialogClass self, GlibString string) => ReadWriteAttr self string (Maybe string) aboutDialogLogoIconName = newAttr   aboutDialogGetLogoIconName   aboutDialogSetLogoIconName
Graphics/UI/Gtk/Windows/Assistant.chs view
@@ -32,7 +32,7 @@ -- * Detail -- -- | A 'Assistant' is a widget used to represent a generally complex operation--- splitted in several steps, guiding the user through its pages and+-- split in several steps, guiding the user through its pages and -- controlling the page flow to collect the necessary data.  -- ** GtkAssistant as GtkBuildable@@ -111,13 +111,13 @@ #endif   ) where -import Control.Monad	(liftM, unless)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -191,7 +191,7 @@ assistantGetNthPage :: AssistantClass self => self  -> Int       -- ^ @pageNum@ - The index of a page in the @assistant@, or -1               -- to get the last page;- -> IO (Maybe Widget)            -- ^ returns The child widget, or 'Nothing' if @pageNum@ is out of bounds.          + -> IO (Maybe Widget)            -- ^ returns The child widget, or 'Nothing' if @pageNum@ is out of bounds. assistantGetNthPage self pageNum =   maybeNull (makeNewObject mkWidget) $   {# call gtk_assistant_get_nth_page #}@@ -252,7 +252,7 @@ -- * Available since Gtk+ version 2.10 -- assistantSetForwardPageFunc :: AssistantClass self => self- -> Maybe (Int -> IO Int)             -- ^ @pageFunc@ - the 'AssistantPage', or 'Nothing' to use the default one. + -> Maybe (Int -> IO Int)             -- ^ @pageFunc@ - the 'AssistantPage', or 'Nothing' to use the default one.  -> IO () assistantSetForwardPageFunc self Nothing = do   {# call gtk_assistant_set_forward_page_func #}@@ -313,9 +313,9 @@ -- -- * Available since Gtk+ version 2.10 ---assistantSetPageTitle :: (AssistantClass self, WidgetClass page) => self+assistantSetPageTitle :: (AssistantClass self, WidgetClass page, GlibString string) => self  -> page   -- ^ @page@ - a page of @assistant@- -> String -- ^ @title@ - the new title for @page@+ -> string -- ^ @title@ - the new title for @page@  -> IO () assistantSetPageTitle self page title =   withUTFString title $ \titlePtr ->@@ -329,9 +329,9 @@ -- -- * Available since Gtk+ version 2.10 ---assistantGetPageTitle :: (AssistantClass self, WidgetClass page) => self+assistantGetPageTitle :: (AssistantClass self, WidgetClass page, GlibString string) => self  -> page      -- ^ @page@ - a page of @assistant@- -> IO String -- ^ returns the title for @page@.+ -> IO string -- ^ returns the title for @page@. assistantGetPageTitle self page =   {# call gtk_assistant_get_page_title #}     (toAssistant self)@@ -431,7 +431,7 @@ #if GTK_CHECK_VERSION(2,22,0) -- | Erases the visited page history so the back button is not shown on the current page, and removes the -- cancel button from subsequent pages.--- +-- -- Use this when the information provided up to the current page is hereafter deemed permanent and -- cannot be modified or undone. For example, showing a progress page to track a long-running, -- unreversible operation after the user has clicked apply on a confirmation page.@@ -515,7 +515,7 @@ -- * Available since Gtk+ version 2.10 -- assistantChildPageType :: AssistantClass self => Attr self AssistantPageType-assistantChildPageType = +assistantChildPageType =     newAttrFromEnumProperty "page-type" {#call pure unsafe assistant_page_type_get_type#}  -- | The title that is displayed in the page header.@@ -525,7 +525,7 @@ -- -- * Available since Gtk+ version 2.10 ---assistantChildTitle :: AssistantClass self => Attr self String+assistantChildTitle :: (AssistantClass self, GlibString string) => Attr self string assistantChildTitle = newAttrFromStringProperty "title"  -- | The image that is displayed next to the page.
Graphics/UI/Gtk/Windows/Dialog.chs view
@@ -25,13 +25,13 @@ -- Portability : portable (depends on GHC) -- -- Create popup windows--- --- NOTE: +--+-- NOTE: --     Now FFI haven't support variadic function `gtk_dialog_set_alternative_button_order` -- module Graphics.UI.Gtk.Windows.Dialog ( -- * Detail--- +-- -- | Dialog boxes are a convenient way to prompt the user for a small amount -- of input, e.g. to display a message, ask a question, or anything else that -- does not require extensive effort on the user's part.@@ -56,7 +56,7 @@ -- pass the 'DialogModal' flag to make a dialog modal. -- -- If you add buttons to 'Dialog' using 'dialogNewWithButtons',--- 'dialogAddButton', 'dialogAddButtons', or 'dialogAddActionWidget', clicking+-- 'dialogAddButton', or 'dialogAddActionWidget', clicking -- the button will emit a signal called \"response\" with a response ID that -- you specified. Gtk+ will never assign a meaning to positive response IDs; -- these are entirely user-defined. But for convenience, you can use the@@ -69,7 +69,7 @@ -- recursive main loop and waits for the user to respond to the dialog, -- returning the response ID corresponding to the button the user clicked. ----- For a simple message box, you probably want to use +-- For a simple message box, you probably want to use -- 'Graphics.UI.Gtk.Windows.MessageDialog.MessageDialog' which provides -- convenience functions -- for creating standard dialogs containing simple messages to inform@@ -148,20 +148,20 @@ #endif   ) where -import Control.Monad	(liftM)+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.Abstract.Object  (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.Structs ( #if GTK_MAJOR_VERSION < 3                     dialogGetUpper, dialogGetActionArea, #endif-					ResponseId(..), fromResponse, toResponse)+                                        ResponseId(..), fromResponse, toResponse)  {# context lib="gtk" prefix="gtk" #} @@ -235,8 +235,8 @@ -- the end of the dialog's action area. The button widget is returned, but -- usually you don't need it. ---dialogAddButton :: DialogClass self => self- -> String     -- ^ @buttonText@ - text of button, or stock ID+dialogAddButton :: (DialogClass self, GlibString string) => self+ -> string     -- ^ @buttonText@ - text of button, or stock ID  -> ResponseId -- ^ @responseId@ - response ID for the button  -> IO Button  -- ^ returns the button widget that was added dialogAddButton self buttonText responseId =@@ -316,30 +316,30 @@  -- | Gets the response id of a widget in the action area of a dialog. dialogGetResponseForWidget :: (DialogClass self, WidgetClass widget) => self- -> widget  -- ^ @widget@ - a widget in the action area of dialog                                                     - -> IO ResponseId  -- ^ return the response id of widget, or 'ResponseNone' if widget doesn't have a response id set. + -> widget  -- ^ @widget@ - a widget in the action area of dialog+ -> IO ResponseId  -- ^ return the response id of widget, or 'ResponseNone' if widget doesn't have a response id set. dialogGetResponseForWidget self widget = liftM toResponse $   {# call dialog_get_response_for_widget #}     (toDialog self)     (toWidget widget) --- | Returns @True@ if dialogs are expected to use an alternative button order on the screen screen. +-- | Returns @True@ if dialogs are expected to use an alternative button order on the screen screen. -- See 'dialogSetAlternativeButtonOrder' for more details about alternative button order. -- -- If you need to use this function, you should probably connect to the 'alternativeButtonOrder' signal on the GtkSettings object associated to  screen, in order to be notified if the button order setting changes. -- -- * Available since Gtk+ version 2.6 ---dialogAlternativeDialogButtonOrder :: -   Maybe Screen  -- ^ @screen@ - a 'Screen', or @Nothing@ to use the default screen      - -> IO Bool   -- ^ returns whether the alternative button order should be used +dialogAlternativeDialogButtonOrder ::+   Maybe Screen  -- ^ @screen@ - a 'Screen', or @Nothing@ to use the default screen+ -> IO Bool   -- ^ returns whether the alternative button order should be used dialogAlternativeDialogButtonOrder (Just screen) = liftM toBool $   {# call alternative_dialog_button_order #} screen dialogAlternativeDialogButtonOrder Nothing = liftM toBool $   {# call alternative_dialog_button_order #} (Screen nullForeignPtr)  -- | Sets an alternative button order.---  +-- -- If the 'alternativeButtonOrder' setting is set to @True@, the dialog -- buttons are reordered according to the order of the response ids in -- @newOrder@.@@ -351,9 +351,9 @@ -- * Available since Gtk+ version 2.6 -- dialogSetAlternativeButtonOrderFromArray :: DialogClass self => self- -> [ResponseId]  -- ^ @newOrder@ - an array of response ids of dialog's buttons + -> [ResponseId]  -- ^ @newOrder@ - an array of response ids of dialog's buttons  -> IO ()-dialogSetAlternativeButtonOrderFromArray self newOrder = +dialogSetAlternativeButtonOrderFromArray self newOrder =   withArray (map fromResponse newOrder) $ \newOrderPtr ->   {# call dialog_set_alternative_button_order_from_array #}     (toDialog self)@@ -362,9 +362,9 @@  #if GTK_CHECK_VERSION(2,20,0) -- | Gets the widget button that uses the given response ID in the action area of a dialog.-dialogGetWidgetForResponse :: DialogClass self => self -                           -> ResponseId -- ^ @responseId@ the response ID used by the dialog widget                   -                           -> IO (Maybe Widget) -- ^ returns     the widget button that uses the given @responseId@, or 'Nothing'. +dialogGetWidgetForResponse :: DialogClass self => self+                           -> ResponseId -- ^ @responseId@ the response ID used by the dialog widget+                           -> IO (Maybe Widget) -- ^ returns     the widget button that uses the given @responseId@, or 'Nothing'. dialogGetWidgetForResponse self responseId =     maybeNull (makeNewObject mkWidget) $     {#call gtk_dialog_get_widget_for_response #}@@ -435,7 +435,7 @@ dialogContentAreaBorder :: DialogClass self => ReadAttr self Int dialogContentAreaBorder = readAttrFromIntProperty "content-area-border" --- | The default spacing used between elements of the content area of the dialog, +-- | The default spacing used between elements of the content area of the dialog, -- as returned by 'dialogSetContentArea', unless 'boxSetSpacing' was called on that widget directly. -- -- Allowed values: >= 0
Graphics/UI/Gtk/Windows/Invisible.chs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Window --@@ -23,7 +22,7 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) ----- A widget which is not displayed                                                                                                              +-- A widget which is not displayed -- The 'Invisible' widget is used internally in GTK+, and is probably not very useful for application developers. -- It is used for reliable pointer grabs and selection handling in the code for drag-and-drop. --@@ -42,7 +41,7 @@   Invisible,  -- * Constructors-  invisibleNew,  +  invisibleNew,   invisibleNewForScreen,  -- * Methods@@ -50,19 +49,12 @@   invisibleGetScreen,   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI-import System.Glib.UTFString-import System.Glib.GError-import System.Glib.Attributes-import System.Glib.Properties-import System.Glib.GObject		(makeNewGObject)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)-import Graphics.UI.Gtk.General.Enums+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject) import Graphics.UI.Gtk.Gdk.Screen {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Gdk.Enums#}    (Modifier(..))  {# context lib="gtk" prefix="gtk" #} @@ -80,31 +72,31 @@ -- -- * Available since Gdk version 2.2 ---invisibleNewForScreen :: -   Screen   -- ^ @screen@ - a 'Screen' which identifies on which the new 'Invisible' will be created. +invisibleNewForScreen ::+   Screen   -- ^ @screen@ - a 'Screen' which identifies on which the new 'Invisible' will be created.  -> IO Invisible invisibleNewForScreen screen =   makeNewObject mkInvisible $   liftM (castPtr :: Ptr Widget -> Ptr Invisible) $   {# call invisible_new_for_screen #} screen-  + -- | Sets the 'Screen' where the 'Invisible' object will be displayed. -- -- * Available since Gdk version 2.2 ---invisibleSetScreen :: Invisible +invisibleSetScreen :: Invisible  -> Screen  -- ^ @screen@ - the 'Screen' to set  -> IO () invisibleSetScreen invisible screen =   {# call invisible_set_screen #} invisible screen-  --- | Returns the 'Screen' object associated with invisible  ++-- | Returns the 'Screen' object associated with invisible -- -- * Available since Gdk version 2.2 -- invisibleGetScreen :: Invisible  -> IO Screen-invisibleGetScreen invisible = +invisibleGetScreen invisible =   makeNewGObject mkScreen $   {# call invisible_get_screen #} invisible 
Graphics/UI/Gtk/Windows/MessageDialog.chs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Widget MessageDialog --@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Windows.MessageDialog ( -- * Detail--- +-- -- | 'MessageDialog' presents a dialog with an image representing the type of -- message (Error, Question, etc.) alongside some message text. It's simply a -- convenience widget; you could construct the equivalent of 'MessageDialog'@@ -60,13 +60,13 @@   MessageType(..),   ButtonsType(..),   DialogFlags(..),-  + -- * Constructors   messageDialogNew, #if GTK_CHECK_VERSION(2,4,0)   messageDialogNewWithMarkup, #endif-  + -- * Methods #if GTK_CHECK_VERSION(2,4,0)   messageDialogSetMarkup,@@ -94,16 +94,15 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI {#import Graphics.UI.Gtk.Types#} import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.Flags	(Flags, fromFlags)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)-import Graphics.Rendering.Pango.Markup (Markup)+import System.Glib.Flags        (Flags, fromFlags)+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)  {# context lib="gtk" prefix="gtk" #} @@ -123,7 +122,7 @@ -- | Specify what buttons this dialog should show. -- -- * Prebuilt sets of buttons for the dialog. If none of these choices---   are appropriate, simply use 'ButtonsNone' then call 'dialogAddButtons'.+--   are appropriate, simply use 'ButtonsNone' then call 'dialogAddButton'. -- {#enum ButtonsType {underscoreToCase} deriving(Show,Eq)#} @@ -144,29 +143,30 @@ -------------------- -- Constructors --- | Create a new message dialog, which is a simple dialog with an icon ---   indicating the dialog type (error, warning, etc.) and some text the +-- | Create a new message dialog, which is a simple dialog with an icon+--   indicating the dialog type (error, warning, etc.) and some text the --   user may want to see. When the user clicks a button a \"response\" signal --   is emitted with response IDs from 'ResponseType'. See 'Dialog' for more --   details.--- +-- messageDialogNew-  :: Maybe Window  -- ^ Transient parent of the dialog (or none)+  :: GlibString string+  => Maybe Window  -- ^ Transient parent of the dialog (or none)   -> [DialogFlags]   -> MessageType   -> ButtonsType-  -> String        -- ^ The text of the message+  -> string        -- ^ The text of the message   -> IO MessageDialog messageDialogNew mWindow flags mType bType msg =   withUTFString (unPrintf msg) $ \msgPtr ->   makeNewObject mkMessageDialog $   liftM (castPtr :: Ptr Widget -> Ptr MessageDialog) $   call_message_dialog_new mWindow flags mType bType msgPtr-	  			 -	  			 +                                +                                 call_message_dialog_new :: Maybe Window -> [DialogFlags] ->-			   MessageType -> ButtonsType -> Ptr CChar ->-			   IO (Ptr Widget)+                           MessageType -> ButtonsType -> Ptr CChar ->+                           IO (Ptr Widget) call_message_dialog_new (Just (Window fPtr)) flags mType bType msgPtr =   withForeignPtr fPtr $ \ptr ->     message_dialog_new ptr (fromIntegral (fromFlags flags))@@ -179,7 +179,7 @@  foreign import ccall unsafe "gtk_message_dialog_new"   message_dialog_new :: Ptr Window -> CInt -> CInt -> CInt ->-		        Ptr CChar -> IO (Ptr Widget)+                        Ptr CChar -> IO (Ptr Widget)  #if GTK_CHECK_VERSION(2,4,0) -- | Creates a new message dialog, which is a simple dialog with an icon@@ -191,11 +191,12 @@ -- * Available since Gtk+ version 2.4 -- messageDialogNewWithMarkup-  :: Maybe Window  -- ^ Transient parent of the dialog (or none)+  :: GlibString string+  => Maybe Window  -- ^ Transient parent of the dialog (or none)   -> [DialogFlags]   -> MessageType   -> ButtonsType-  -> Markup        -- ^ The text of the message+  -> string        -- ^ The text of the message   -> IO MessageDialog messageDialogNewWithMarkup mWindow flags mType bType msg = do   md <- makeNewObject mkMessageDialog $@@ -204,7 +205,7 @@   messageDialogSetMarkup md msg   return md #endif-  + -------------------- -- Methods @@ -214,8 +215,8 @@ -- -- * Available since Gtk+ version 2.4 ---messageDialogSetMarkup :: MessageDialogClass self => self- -> Markup -- ^ @str@ - markup string (see Pango markup format)+messageDialogSetMarkup :: (MessageDialogClass self, GlibString string) => self+ -> string -- ^ @str@ - markup string (see Pango markup format)  -> IO () messageDialogSetMarkup self str =   withUTFString (unPrintf str) $ \strPtr ->@@ -225,8 +226,8 @@ #endif  #if GTK_CHECK_VERSION(2,6,0)-messageDialogSetSecondaryMarkup :: MessageDialogClass self => self- -> String -- ^ @str@ - markup string (see Pango markup format)+messageDialogSetSecondaryMarkup :: (MessageDialogClass self, GlibString string) => self+ -> string -- ^ @str@ - markup string (see Pango markup format)  -> IO () messageDialogSetSecondaryMarkup self str =   withUTFString (unPrintf str) $ \strPtr ->@@ -235,11 +236,11 @@   message_dialog_format_secondary_markup ptr strPtr  foreign import ccall unsafe "gtk_message_dialog_format_secondary_markup"-  message_dialog_format_secondary_markup :: Ptr MessageDialog -> -  					   Ptr CChar -> IO ()-  					-messageDialogSetSecondaryText :: MessageDialogClass self => self- -> String -- ^ @str@ - text to be shown as second line+  message_dialog_format_secondary_markup :: Ptr MessageDialog ->+                                           Ptr CChar -> IO ()+                                        +messageDialogSetSecondaryText :: (MessageDialogClass self, GlibString string) => self+ -> string -- ^ @str@ - text to be shown as second line  -> IO () messageDialogSetSecondaryText self str =   withUTFString str $ \strPtr ->@@ -248,8 +249,8 @@   message_dialog_format_secondary_text ptr strPtr  foreign import ccall unsafe "gtk_message_dialog_format_secondary_text"-  message_dialog_format_secondary_text :: Ptr MessageDialog -> - 					 Ptr CChar -> IO ()+  message_dialog_format_secondary_text :: Ptr MessageDialog ->+                                         Ptr CChar -> IO ()  #if GTK_CHECK_VERSION(2,10,0) -- %hash c:6cb7 d:ebdd@@ -288,7 +289,7 @@ -- -- * Available since Gtk+ version 2.10 ---messageDialogText :: MessageDialogClass self => Attr self (Maybe String)+messageDialogText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string) messageDialogText = newAttrFromMaybeStringProperty "text"  -- %hash c:e1dd d:ca3@@ -308,7 +309,7 @@ -- -- * Available since Gtk+ version 2.10 ---messageDialogSecondaryText :: MessageDialogClass self => Attr self (Maybe String)+messageDialogSecondaryText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string) messageDialogSecondaryText = newAttrFromMaybeStringProperty "secondary-text"  -- %hash c:1ce2 d:ca3@@ -338,7 +339,7 @@   {#call pure unsafe gtk_buttons_type_get_type #}  #if GTK_CHECK_VERSION(2,22,0)--- | The 'VBox' that corresponds to the message area of this dialog. +-- | The 'VBox' that corresponds to the message area of this dialog. -- -- * Available since Gtk+ version 2.22 --@@ -347,11 +348,3 @@   {# call pure unsafe gtk_vbox_get_type #} #endif ------------------------ helpers---- Escape percent signs-unPrintf :: String -> String-unPrintf [] = []-unPrintf ('%':xs) = '%':'%':unPrintf xs-unPrintf (x:xs) = x:unPrintf xs
Graphics/UI/Gtk/Windows/OffscreenWindow.chs view
@@ -23,7 +23,7 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) ----- A toplevel container widget used to manage offscreen rendering of child widgets.                       +-- A toplevel container widget used to manage offscreen rendering of child widgets. -- -- * Module available since Gtk+ version 2.20 --@@ -34,16 +34,16 @@ -- 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 -- | -- @@@ -74,11 +74,9 @@ #endif ) where -import Control.Monad	(liftM)+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#} @@ -93,7 +91,7 @@ -- offscreenWindowNew :: IO OffscreenWindow offscreenWindowNew =-  makeNewObject mkOffscreenWindow $ +  makeNewObject mkOffscreenWindow $   liftM (castPtr :: Ptr Widget -> Ptr OffscreenWindow) $   {#call gtk_offscreen_window_new #} @@ -103,9 +101,9 @@ -- -- * 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 :: 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 #}@@ -116,9 +114,9 @@ -- -- * 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 :: OffscreenWindowClass self+                           => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget.+                           -> IO (Maybe Pixbuf) -- ^ returns   A 'Pixbuf' pointer to the offscreen pixbuf, or 'Nothing'. offscreenWindowGetPixbuf offscreen =   maybeNull (wrapNewGObject mkPixbuf) $   {#call gtk_offscreen_window_get_pixbuf #}
Graphics/UI/Gtk/Windows/Window.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Window --@@ -276,7 +277,7 @@ #endif   ) where -import Control.Monad	(liftM)+import Control.Monad    (liftM)  import System.Glib.FFI import System.Glib.UTFString@@ -285,9 +286,8 @@ import System.Glib.Attributes import System.Glib.Properties import System.Glib.GList                (fromGList, withGList)-import System.Glib.GObject		(makeNewGObject)-import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)-import Graphics.UI.Gtk.General.Enums	(WindowType(..), WindowPosition(..))+import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)+import Graphics.UI.Gtk.General.Enums    (WindowType(..), WindowPosition(..)) #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.General.Structs  (windowGetFrame) #endif@@ -295,11 +295,11 @@ {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Gdk.Enums#}    (Modifier(..)) {#import Graphics.UI.Gtk.Gdk.Keys#}     (KeyVal)-import Graphics.UI.Gtk.Gdk.EventM	(EventM, EAny, EKey, MouseButton, TimeStamp)+import Graphics.UI.Gtk.Gdk.EventM       (EventM, EAny, EKey, MouseButton, TimeStamp) import Control.Monad.Reader             ( runReaderT, ask ) import Control.Monad.Trans              ( liftIO )-import Graphics.UI.Gtk.Gdk.Enums	(WindowEdge(..), WindowTypeHint(..),-					Gravity(..))+import Graphics.UI.Gtk.Gdk.Enums        (WindowEdge(..), WindowTypeHint(..),+                                        Gravity(..))  {# context lib="gtk" prefix="gtk" #} @@ -334,7 +334,7 @@ -- this window from other windows they may have open. A good title might -- include the application name and current document filename, for example. ---windowSetTitle :: WindowClass self => self -> String -> IO ()+windowSetTitle :: (WindowClass self, GlibString string) => self -> string -> IO () windowSetTitle self title =   withUTFString title $ \titlePtr ->   {# call gtk_window_set_title #}@@ -343,7 +343,7 @@  -- | Retrieves the title of the window. See 'windowSetTitle'. ---windowGetTitle :: WindowClass self => self -> IO String+windowGetTitle :: (WindowClass self, GlibString string) => self -> IO string windowGetTitle self =   {# call gtk_window_get_title #}     (toWindow self)@@ -493,7 +493,7 @@ -- windowAddMnemonic :: (WindowClass self, WidgetClass widget) => self  -> KeyVal  -- ^ @keyval@ - the mnemonic- -> widget  -- ^ @target@ - the widget that gets activated by the mnemonic + -> widget  -- ^ @target@ - the widget that gets activated by the mnemonic  -> IO () windowAddMnemonic self keyval target =   {# call window_add_mnemonic #}@@ -504,21 +504,21 @@ -- | Removes a mnemonic from this window. -- windowRemoveMnemonic :: (WindowClass self, WidgetClass widget) => self- -> KeyVal -- ^ @keyval@ - the mnemonic                                   - -> widget  -- ^ @target@ - the widget that gets activated by the mnemonic + -> KeyVal -- ^ @keyval@ - the mnemonic+ -> widget  -- ^ @target@ - the widget that gets activated by the mnemonic  -> IO () windowRemoveMnemonic self keyval target =-  {# call window_remove_mnemonic #} +  {# call window_remove_mnemonic #}     (toWindow self)     (fromIntegral keyval)     (toWidget target)  -- | Activates the targets associated with the mnemonic. windowMnemonicActivate :: WindowClass self => self- -> KeyVal  -- ^ @keyval@ - the mnemonic                    - -> [Modifier]  -- ^ @modifier@ - the modifiers                   - -> IO Bool  -- ^ return @True@ if the activation is done. -windowMnemonicActivate self keyval modifier = liftM toBool $  + -> KeyVal  -- ^ @keyval@ - the mnemonic+ -> [Modifier]  -- ^ @modifier@ - the modifiers+ -> IO Bool  -- ^ return @True@ if the activation is done.+windowMnemonicActivate self keyval modifier = liftM toBool $   {# call window_mnemonic_activate #}     (toWindow self)     (fromIntegral keyval)@@ -526,7 +526,7 @@  -- | Sets the mnemonic modifier for this window. windowSetMnemonicModifier :: WindowClass self => self- -> [Modifier]  -- ^ @modifier@ - the modifier mask used to activate mnemonics on this window. + -> [Modifier]  -- ^ @modifier@ - the modifier mask used to activate mnemonics on this window.  -> IO () windowSetMnemonicModifier self modifier =   {# call window_set_mnemonic_modifier #}@@ -535,17 +535,17 @@  -- | Returns the mnemonic modifier for this window. See 'windowSetMnemonicModifier'. windowGetMnemonicModifier :: WindowClass self => self- -> IO [Modifier]  -- ^ return the modifier mask used to activate mnemonics on this window. + -> IO [Modifier]  -- ^ return the modifier mask used to activate mnemonics on this window. windowGetMnemonicModifier self = liftM (toFlags . fromIntegral) $-  {# call window_get_mnemonic_modifier #} +  {# call window_get_mnemonic_modifier #}     (toWindow self) --- | Activates mnemonics and accelerators for this 'Window'. --- This is normally called by the default 'keyPressEvent' handler for toplevel windows, +-- | Activates mnemonics and accelerators for this 'Window'.+-- This is normally called by the default 'keyPressEvent' handler for toplevel windows, -- however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window.--- +-- windowActivateKey :: WindowClass self => self -> EventM EKey Bool-  -- ^ return @True@ if a mnemonic or accelerator was found and activated. +  -- ^ return @True@ if a mnemonic or accelerator was found and activated. windowActivateKey self = do   ptr <- ask   liftIO $ liftM toBool $@@ -553,13 +553,13 @@       (toWindow self)       (castPtr ptr) --- | Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles event. --- This is normally called by the default 'keyPressEvent' and 'keyReleaseEvent' handlers for toplevel windows, +-- | Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles event.+-- This is normally called by the default 'keyPressEvent' and 'keyReleaseEvent' handlers for toplevel windows, -- however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window. -- windowPropagateKeyEvent :: WindowClass self => self   -> EventM EKey Bool-  -- ^ return @True@ if a widget in the focus chain handled the event. +  -- ^ return @True@ if a widget in the focus chain handled the event. windowPropagateKeyEvent self = do   ptr <- ask   liftIO $ liftM toBool $@@ -604,7 +604,7 @@ -- parent, much as the window manager would have done on X. -- -- Note that if you want to show a window @self@ on top of a full-screen window @parent@, you need to--- turn the @self@ window into a dialog (using 'windowSetTypeHint' with 'WindowTypeHintDialog'). +-- turn the @self@ window into a dialog (using 'windowSetTypeHint' with 'WindowTypeHintDialog'). -- Otherwise the @parent@ window will always cover the @self@ window. -- windowSetTransientFor :: (WindowClass self, WindowClass parent) => self@@ -715,12 +715,12 @@  #if GTK_CHECK_VERSION(2,14,0) -- | Returns the default widget for window. See 'windowSetDefault' for more details.--- +-- -- * Available since Gtk+ version 2.14 -- windowGetDefaultWidget :: WindowClass self => self  -> IO (Maybe Widget)-windowGetDefaultWidget self = +windowGetDefaultWidget self =   maybeNull (makeNewObject mkWidget) $   {# call window_get_default_widget #}     (toWindow self)@@ -1020,16 +1020,16 @@ #endif  #if GTK_CHECK_VERSION(2,12,0)--- | Startup notification identifiers are used by desktop environment to track application startup, --- to provide user feedback and other features. This function changes the corresponding property on the underlying GdkWindow. +-- | Startup notification identifiers are used by desktop environment to track application startup,+-- to provide user feedback and other features. This function changes the corresponding property on the underlying GdkWindow. -- Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling 'windowPresent' or any equivalent function generating a window map event. -- -- This function is only useful on X11, not with other GTK+ targets. -- -- * Available since Gtk+ version 2.12 ---windowSetStartupId :: WindowClass self => self- -> String+windowSetStartupId :: (WindowClass self, GlibString string) => self+ -> string  -> IO () windowSetStartupId self startupId =   withUTFString startupId $ \idPtr ->@@ -1066,10 +1066,11 @@     (toWindow self)  #if GTK_CHECK_VERSION(2,10,0)--- | By default, windows have a close button in the window frame. --- Some window managers allow GTK+ to disable this button. --- If you set the deletable property to  @False@ using this function, GTK+ will do its best to convince the window manager not to show a close button. --- Depending on the system, this function may not have any effect when called on a window that is already visible, +#ifndef DISABLE_DEPRECATED+-- | By default, windows have a close button in the window frame.+-- Some window managers allow GTK+ to disable this button.+-- If you set the deletable property to  @False@ using this function, GTK+ will do its best to convince the window manager not to show a close button.+-- Depending on the system, this function may not have any effect when called on a window that is already visible, -- so you should call it before calling 'windowShow'. -- -- On Windows, this function always works, since there's no window manager policy involved.@@ -1077,7 +1078,7 @@ -- * Available since Gtk+ version 2.10 -- windowSetDeletable :: WindowClass self => self- -> Bool  -- ^ @setting@ - @True@ to decorate the window as deletable + -> Bool  -- ^ @setting@ - @True@ to decorate the window as deletable  -> IO () windowSetDeletable self setting =   {# call window_set_deletable #}@@ -1089,11 +1090,12 @@ -- * Available since Gtk+ version 2.10 -- windowGetDeletable :: WindowClass self => self- -> IO Bool  -- ^ return @True@ if the window has been set to have a close button -windowGetDeletable self = liftM toBool $  + -> IO Bool  -- ^ return @True@ if the window has been set to have a close button+windowGetDeletable self = liftM toBool $   {# call window_get_deletable #}     (toWindow self) #endif+#endif  #if GTK_MAJOR_VERSION < 3 -- | (Note: this is a special-purpose function intended for the framebuffer@@ -1119,13 +1121,13 @@     (fromIntegral right)     (fromIntegral bottom) --- |  Retrieves the dimensions of the frame window for this toplevel. See +-- |  Retrieves the dimensions of the frame window for this toplevel. See --    'windowSetHasFrame', 'windowSetFrameDimensions'. -- -- (Note: this is a special-purpose function intended for the framebuffer port;--- see 'windowSetHasFrame'. --- It will not return the size of the window border drawn by the window manager, --- which is the normal case when using a windowing system. +-- see 'windowSetHasFrame'.+-- It will not return the size of the window border drawn by the window manager,+-- which is the normal case when using a windowing system. -- See 'drawWindowGetFrameExtents' to get the standard window border extents.) -- -- Removed in Gtk3.@@ -1134,7 +1136,7 @@  -- ^ returns @(left, top, right, bottom)@. @left@ is the  -- width of the frame at the left, @top@ is the height of the frame at the top, @right@  -- is the width of the frame at the right, @bottom@ is the height of the frame at the bottom.-windowGetFrameDimensions self = +windowGetFrameDimensions self =   alloca $ \lPtr -> alloca $ \tPtr -> alloca $ \rPtr -> alloca $ \bPtr -> do     {# call window_get_frame_dimensions #} (toWindow self) lPtr tPtr rPtr bPtr     lv <- peek lPtr@@ -1148,16 +1150,16 @@ -- accessible using 'windowGetFrame'. Using the signal 'windowFrameEvent' you can -- receive all events targeted at the frame. ----- (Note: this is a special-purpose function for the framebuffer port, that causes GTK+ to draw its own window border. +-- (Note: this is a special-purpose function for the framebuffer port, that causes GTK+ to draw its own window border. -- For most applications, you want  'windowSetDecorated' instead, which tells the window manager whether to draw the window border.) ----- This function is used by the linux-fb port to implement managed windows, +-- This function is used by the linux-fb port to implement managed windows, -- but it could conceivably be used by X-programs that want to do their own window -- decorations. -- -- Removed in Gtk3.-windowSetHasFrame :: WindowClass self => self - -> Bool  -- ^ @setting@ - a boolean   +windowSetHasFrame :: WindowClass self => self+ -> Bool  -- ^ @setting@ - a boolean  -> IO () windowSetHasFrame self setting =   {# call window_set_has_frame #}@@ -1174,6 +1176,7 @@     (toWindow self) #endif +#ifndef DISABLE_DEPRECATED -- | This function is only useful on X11, not with other Gtk+ targets. -- -- In combination with the window title, the window role allows a window@@ -1186,8 +1189,8 @@ -- since the WM can use the title to identify the window when restoring the -- session. ---windowSetRole :: WindowClass self => self- -> String -- ^ @role@ - unique identifier for the window to be used when+windowSetRole :: (WindowClass self, GlibString string) => self+ -> string -- ^ @role@ - unique identifier for the window to be used when            -- restoring a session  -> IO () windowSetRole self role =@@ -1199,13 +1202,14 @@ -- | Returns the role of the window. See 'windowSetRole' for further -- explanation. ---windowGetRole :: WindowClass self => self- -> IO (Maybe String) -- ^ returns the role of the window if set, or+windowGetRole :: (WindowClass self, GlibString string) => self+ -> IO (Maybe string) -- ^ returns the role of the window if set, or                       -- @Nothing@. windowGetRole self =   {# call gtk_window_get_role #}     (toWindow self)   >>= maybePeek peekUTFString+#endif  -- | Asks to stick @window@, which means that it will appear on all user -- desktops. Note that you shouldn't assume the window is definitely stuck@@ -1301,11 +1305,11 @@   {# call gtk_window_get_icon #}     (toWindow self) --- | Sets up the icon representing a 'Window'. The icon is used when the window is minimized (also known as iconified). +-- | Sets up the icon representing a 'Window'. The icon is used when the window is minimized (also known as iconified). -- Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. ----- 'windowSetIconList' allows you to pass in the same icon in several hand-drawn sizes. --- The list should contain the natural sizes your icon is available in; that is, don't scale the image before passing it to GTK+. +-- 'windowSetIconList' allows you to pass in the same icon in several hand-drawn sizes.+-- The list should contain the natural sizes your icon is available in; that is, don't scale the image before passing it to GTK+. -- Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. -- -- By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling.@@ -1315,7 +1319,7 @@ -- See also 'windowSetDefaultIconList' to set the icon for all windows in your application in one go. -- -- Note that transient windows (those who have been set transient for another window using 'windowSetTransientFor' will inherit their icon from their--- transient parent. +-- transient parent. -- So there's no need to explicitly set the icon on transient windows. -- windowSetIconList :: WindowClass self => self@@ -1327,28 +1331,28 @@   {# call window_set_icon_list #}      (toWindow self)      glist-    --- | Retrieves the list of icons set by 'windowSetIconList'. ++-- | Retrieves the list of icons set by 'windowSetIconList'. ---windowGetIconList :: WindowClass self => self  +windowGetIconList :: WindowClass self => self  -> IO [Pixbuf] windowGetIconList self = do   glist <- {# call window_get_icon_list #} (toWindow self)   ptrList <- fromGList glist   mapM (makeNewGObject mkPixbuf . return) ptrList --- | Sets an icon list to be used as fallback for windows that haven't had 'windowSetIconList' called on them to set up a window-specific icon list. +-- | Sets an icon list to be used as fallback for windows that haven't had 'windowSetIconList' called on them to set up a window-specific icon list. -- This function allows you to set up the icon for all windows in your app at once. -- -- See 'windowSetIconList' for more details. -- windowSetDefaultIconList :: [Pixbuf] -> IO ()-windowSetDefaultIconList list = +windowSetDefaultIconList list =   withForeignPtrs (map unPixbuf list) $ \ptrList ->   withGList ptrList $ \glist ->   {# call window_set_default_icon_list #} glist --- | Gets the value set by 'windowSetDefaultIconList'. +-- | Gets the value set by 'windowSetDefaultIconList'. -- windowGetDefaultIconList :: IO [Pixbuf] windowGetDefaultIconList = do@@ -1357,6 +1361,7 @@   mapM (makeNewGObject mkPixbuf . return) ptrList  #if GTK_CHECK_VERSION(2,6,0)+#ifndef DISABLE_DEPRECATED -- | Sets the icon for the window from a named themed icon. See the docs for -- 'IconTheme' for more details. --@@ -1365,8 +1370,8 @@ -- -- * Available since Gtk+ version 2.6 ---windowSetIconName :: WindowClass self => self- -> String -- ^ @name@ - the name of the themed icon+windowSetIconName :: (WindowClass self, GlibString string) => self+ -> string -- ^ @name@ - the name of the themed icon  -> IO () windowSetIconName self name =   withUTFString name $ \namePtr ->@@ -1379,8 +1384,8 @@ -- -- * Available since Gtk+ version 2.6 ---windowGetIconName :: WindowClass self => self- -> IO String -- ^ returns the icon name or @\"\"@ if the window has no themed+windowGetIconName :: (WindowClass self, GlibString string) => self+ -> IO string -- ^ returns the icon name or @\"\"@ if the window has no themed               -- icon. windowGetIconName self =   {# call gtk_window_get_icon_name #}@@ -1388,6 +1393,7 @@   >>= \strPtr -> if strPtr == nullPtr                 then return ""                 else peekUTFString strPtr+#endif  -- | Sets an icon to be used as fallback for windows that haven't had -- 'windowSetIconList' called on them from a named themed icon, see@@ -1395,8 +1401,8 @@ -- -- * Available since Gtk+ version 2.6 ---windowSetDefaultIconName :: -    String -- ^ @name@ - the name of the themed icon+windowSetDefaultIconName :: GlibString string+ => string -- ^ @name@ - the name of the themed icon  -> IO () windowSetDefaultIconName name =   withUTFString name $ \namePtr ->@@ -1423,8 +1429,8 @@ -- -- * Available since Gtk+ version 2.2 ---windowSetDefaultIconFromFile ::-    String  -- ^ @filename@ - location of icon file+windowSetDefaultIconFromFile :: GlibString string+ => string  -- ^ @filename@ - location of icon file  -> IO Bool -- ^ returns @True@ if setting the icon succeeded. windowSetDefaultIconFromFile filename =   liftM toBool $@@ -1441,8 +1447,8 @@ -- -- * Available since Gtk+ version 2.16 ---windowGetDefaultIconName ::-    IO String -- ^ returns the fallback icon name for windows+windowGetDefaultIconName :: GlibString string+ => IO string -- ^ returns the fallback icon name for windows windowGetDefaultIconName =   {# call window_get_default_icon_name #}   >>= peekUTFString@@ -1482,12 +1488,12 @@ -- -- * Available since Gtk+ version 2.2 ---windowSetIconFromFile :: WindowClass self => self- -> FilePath  -- ^ @filename@ - location of icon file+windowSetIconFromFile :: (WindowClass self, GlibFilePath fp) => self+ -> fp  -- ^ @filename@ - location of icon file  -> IO () windowSetIconFromFile self filename =   propagateGError $ \errPtr ->-  withUTFString filename $ \filenamePtr -> do+  withUTFFilePath filename $ \filenamePtr -> do #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3   {# call gtk_window_set_icon_from_file_utf8 #} #else@@ -1510,7 +1516,7 @@ -- -- * Available since Gtk+ version 2.2 ---windowSetAutoStartupNotification :: +windowSetAutoStartupNotification ::     Bool  -- ^ @setting@ - @True@ to automatically do startup notification  -> IO () windowSetAutoStartupNotification setting =@@ -1582,24 +1588,24 @@     (fromIntegral x)     (fromIntegral y) --- | Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this. +-- | Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this. -- 'windowParseGeometry' does work on all GTK+ ports including Win32 but is primarily intended for an X environment. ----- If either a size or a position can be extracted from the geometry string, +-- If either a size or a position can be extracted from the geometry string, -- 'windowParseGeometry' returns @True@ and calls gtk_window_set_default_size() and/or gtk_window_move() to resize/move the window. ----- If 'windowParseGeometry' returns @True@, +-- If 'windowParseGeometry' returns @True@, -- it will also set the 'HintUserPos' and/or 'HintUserSize' hints indicating to the window manager that the size/position of the window was user-specified -- This causes most window managers to honor the geometry. ----- Note that for 'windowParseGeometry' to work as expected, it has to be called when the window has its "final" size, i.e. +-- Note that for 'windowParseGeometry' to work as expected, it has to be called when the window has its "final" size, i.e. -- after calling 'widgetShowAll' on the contents and 'windowSetGeometryHints' on the window. ---windowParseGeometry :: WindowClass self => self- -> String+windowParseGeometry :: (WindowClass self, GlibString string) => self+ -> string  -> IO Bool windowParseGeometry self geometry = liftM toBool $-  withUTFString geometry $ \geometryPtr -> +  withUTFString geometry $ \geometryPtr ->   {# call window_parse_geometry #}      (toWindow self)      geometryPtr@@ -1873,7 +1879,7 @@ -- windowSetGeometryHints :: (WindowClass self, WidgetClass widget) =>     self             -- ^ @window@ - the top level window- -> Maybe widget     -- ^ @geometryWidget@ - optionall a widget the geometry+ -> Maybe widget     -- ^ @geometryWidget@ - optional a widget the geometry                      -- hints will be applied to rather than directly to the                      -- top level window  -> Maybe (Int, Int) -- ^ @(minWidth, minHeight)@ - minimum width and height@@ -1934,18 +1940,19 @@ {# enum GdkWindowHints {underscoreToCase} #}  #if GTK_CHECK_VERSION(2,12,0)--- | Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque. --- (Values of the opacity parameter are clamped to the [0,1] range.) +#ifndef DISABLE_DEPRECATED+-- | Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque.+-- (Values of the opacity parameter are clamped to the [0,1] range.) -- On X11 this has any effect only on X screens with a compositing manager running. -- See 'widgetIsComposited'. On Windows it should work always. -- -- Note that setting a window's opacity after the window has been shown causes it to -- flicker once on Windows.--- +-- -- * Available since Gtk+ version 2.12 -- windowSetOpacity :: WindowClass self => self- -> Double  -- ^ @opacity@ - desired opacity, between 0 and 1 + -> Double  -- ^ @opacity@ - desired opacity, between 0 and 1  -> IO () windowSetOpacity self opacity =   {#call window_set_opacity #} (toWindow self) (realToFrac opacity)@@ -1954,23 +1961,24 @@ -- -- * Available since Gtk+ version 2.12 ---windowGetOpacity :: WindowClass self => self - -> IO Double  -- ^ return the requested opacity for this window. +windowGetOpacity :: WindowClass self => self+ -> IO Double  -- ^ return the requested opacity for this window. windowGetOpacity self = liftM realToFrac $  {#call window_get_opacity#} (toWindow self) #endif+#endif  #if GTK_CHECK_VERSION(2,10,0) -- | Returns the group for window or the default group, if window is @Nothing@ or if window does not have an explicit window group.--- +-- -- * Available since Gtk+ version 2.10 -- windowGetGroup :: WindowClass self => Maybe self- -> IO WindowGroup  -- ^ return the 'WindowGroup' for a window or the default group -windowGetGroup self = + -> IO WindowGroup  -- ^ return the 'WindowGroup' for a window or the default group+windowGetGroup self =   makeNewGObject mkWindowGroup $   {# call window_get_group #} (maybe (Window nullForeignPtr) toWindow self)-#endif  +#endif  #if GTK_CHECK_VERSION(2,20,0) -- | Gets the type of the window. See 'WindowType'.@@ -1978,7 +1986,7 @@ -- * Available since Gtk version 2.20 -- windowGetWindowType :: WindowClass self => self-                    -> IO WindowType  -- ^ returns the type of the window +                    -> IO WindowType  -- ^ returns the type of the window windowGetWindowType self =   liftM (toEnum . fromIntegral) $   {#call gtk_window_get_window_type #}@@ -1990,7 +1998,7 @@  -- | The title of the window. ---windowTitle :: WindowClass self => Attr self String+windowTitle :: (WindowClass self, GlibString string) => Attr self string windowTitle = newAttr   windowGetTitle   windowSetTitle@@ -2003,7 +2011,7 @@ windowType = readAttrFromEnumProperty "type"   {# call pure unsafe gtk_window_type_get_type #} --- | If @True@, the window has no mimimum size. Setting this to @True@ is 99%+-- | If @True@, the window has no minimum size. Setting this to @True@ is 99% -- of the time a bad idea. -- -- Default value: @False@@@ -2133,7 +2141,7 @@ -- -- Default value: "\\" ---windowRole :: WindowClass self => Attr self String+windowRole :: (WindowClass self, GlibString string) => Attr self string windowRole = newAttrFromStringProperty "role"  #if GTK_CHECK_VERSION(2,12,0)@@ -2143,7 +2151,7 @@ -- -- * Available since Gtk+ version 2.12 ---windowStartupId :: WindowClass self => Attr self String+windowStartupId :: (WindowClass self, GlibString string) => Attr self string windowStartupId = newAttrFromStringProperty "startup-id" #endif @@ -2205,7 +2213,7 @@ -- * Available since Gtk+ version 2.6 -- ---windowIconName :: WindowClass self => Attr self String+windowIconName :: (WindowClass self, GlibString string) => Attr self string windowIconName = newAttrFromStringProperty "icon-name"  #if GTK_CHECK_VERSION(2,2,0)@@ -2304,7 +2312,7 @@ -- | Whether the input focus is within this GtkWindow. -- -- Note: If add `window` before `HasToplevelFocus` (has-toplevel-focus attribute)--- will conflicts with fucntion `windowHasToplevelFocus`, so we named this attribute +-- will conflicts with function `windowHasToplevelFocus`, so we named this attribute -- to `windowToplevelFocus`. -- -- Default values: @False@@@ -2324,7 +2332,7 @@ -- Signals  -- | Observe events that are emitted on the frame of this window.--- +-- frameEvent :: WindowClass self => Signal self (EventM EAny Bool) frameEvent = Signal (\after obj fun ->                      connect_PTR__BOOL "frame-event" after obj (runReaderT fun))
Graphics/UI/Gtk/Windows/WindowGroup.chs view
@@ -52,7 +52,6 @@   ) where  import System.Glib.FFI-import System.Glib.GObject              (wrapNewGObject) import System.Glib.GList                (fromGList) {#import Graphics.UI.Gtk.Types#} @@ -95,7 +94,7 @@  #if GTK_CHECK_VERSION(2,14,0) -- | Returns a list of the 'Window's that belong to @windowGroup@.--- +-- -- * Available since Gtk+ version 2.14 -- windowGroupListWindows :: WindowGroupClass self
Graphics/UI/GtkInternals.chs view
@@ -34,4 +34,4 @@  {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#} (mkTargetList)-{#import Graphics.UI.Gtk.Multiline.Types#} +{#import Graphics.UI.Gtk.Multiline.Types#}
− Gtk2HsSetup.hs
@@ -1,464 +0,0 @@-{-# LANGUAGE CPP, ViewPatterns #-}--#ifndef CABAL_VERSION_CHECK-#error This module has to be compiled via the Setup.hs program which generates the gtk2hs-macros.h file-#endif---- | Build a Gtk2hs package.----module Gtk2HsSetup ( -  gtk2hsUserHooks, -  getPkgConfigPackages, -  checkGtk2hsBuildtools,-  typeGenProgram,-  signalGenProgram,-  c2hsLocal-  ) where--import Distribution.Simple-import Distribution.Simple.PreProcess-import Distribution.InstalledPackageInfo ( importDirs,-                                           showInstalledPackageInfo,-                                           libraryDirs,-                                           extraLibraries,-                                           extraGHCiLibraries )-import Distribution.Simple.PackageIndex ( lookupInstalledPackageId )-import Distribution.PackageDescription as PD ( PackageDescription(..),-                                               updatePackageDescription,-                                               BuildInfo(..),-                                               emptyBuildInfo, allBuildInfo,-                                               Library(..),-                                               libModules, hasLibs)-import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(withPackageDB, buildDir, localPkgDescr, installedPkgs, withPrograms),-                                           InstallDirs(..),-                                           componentPackageDeps,-                                           absoluteInstallDirs)-import Distribution.Simple.Compiler  ( Compiler(..) )-import Distribution.Simple.Program (-  Program(..), ConfiguredProgram(..),-  rawSystemProgramConf, rawSystemProgramStdoutConf, programName, programPath,-  c2hsProgram, pkgConfigProgram, gccProgram, requireProgram, ghcPkgProgram,-  simpleProgram, lookupProgram, rawSystemProgramStdout, ProgArg)-import Distribution.ModuleName ( ModuleName, components, toFilePath )-import Distribution.Simple.Utils-import Distribution.Simple.Setup (CopyFlags(..), InstallFlags(..), CopyDest(..),-                                  defaultCopyFlags, ConfigFlags(configVerbosity),-                                  fromFlag, toFlag, RegisterFlags(..), flagToMaybe,-                                  fromFlagOrDefault, defaultRegisterFlags)-import Distribution.Simple.BuildPaths ( autogenModulesDir )-import Distribution.Simple.Install ( install )-import Distribution.Simple.Register ( generateRegistrationInfo, registerPackage )-import Distribution.Text ( simpleParse, display )-import System.FilePath-import System.Exit (exitFailure)-import System.Directory ( doesFileExist, getDirectoryContents, doesDirectoryExist )-import Distribution.Version (Version(..))-import Distribution.Verbosity-import Control.Monad (when, unless, filterM, liftM, forM, forM_)-import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList, catMaybes )-import Data.List (isPrefixOf, isSuffixOf, stripPrefix, nub, tails )-import Data.Char (isAlpha, isNumber)-import qualified Data.Map as M-import qualified Data.Set as S-import qualified Distribution.Simple.LocalBuildInfo as LBI-import Distribution.Simple.Compiler (compilerVersion)--import Control.Applicative ((<$>))--#if CABAL_VERSION_CHECK(1,17,0)-import Distribution.Simple.Program.Find ( defaultProgramSearchPath )-onDefaultSearchPath f a b = f a b defaultProgramSearchPath-libraryConfig lbi = case [clbi | (LBI.CLibName, clbi, _) <- LBI.componentsConfigs lbi] of-  [clbi] -> Just clbi-  _ -> Nothing-#else-onDefaultSearchPath = id-libraryConfig = LBI.libraryConfig-#endif---- the name of the c2hs pre-compiled header file-precompFile = "precompchs.bin"--gtk2hsUserHooks = simpleUserHooks {-    hookedPrograms = [typeGenProgram, signalGenProgram, c2hsLocal],-    hookedPreProcessors = [("chs", ourC2hs)],-    confHook = \pd cf ->-      (fmap adjustLocalBuildInfo (confHook simpleUserHooks pd cf)),-    postConf = \args cf pd lbi -> do-      genSynthezisedFiles (fromFlag (configVerbosity cf)) pd lbi-      postConf simpleUserHooks args cf pd lbi,-    buildHook = \pd lbi uh bf -> fixDeps pd >>= \pd ->-                                 buildHook simpleUserHooks pd lbi uh bf,-    copyHook = \pd lbi uh flags -> copyHook simpleUserHooks pd lbi uh flags >>-      installCHI pd lbi (fromFlag (copyVerbosity flags)) (fromFlag (copyDest flags)),-    instHook = \pd lbi uh flags ->-#if defined(mingw32_HOST_OS) || defined(__MINGW32__)-      installHook pd lbi uh flags >>-      installCHI pd lbi (fromFlag (installVerbosity flags)) NoCopyDest,-    regHook = registerHook-#else-      instHook simpleUserHooks pd lbi uh flags >>-      installCHI pd lbi (fromFlag (installVerbosity flags)) NoCopyDest-#endif-  }----------------------------------------------------------------------------------- Lots of stuff for windows ghci support---------------------------------------------------------------------------------getDlls :: [FilePath] -> IO [FilePath]-getDlls dirs = filter ((== ".dll") . takeExtension) . concat <$>-    mapM getDirectoryContents dirs--fixLibs :: [FilePath] -> [String] -> [String]-fixLibs dlls = concatMap $ \ lib ->-    case filter (isLib lib) dlls of-                dll:_ -> [dropExtension dll]-                _     -> if lib == "z" then [] else [lib]-  where-    isLib lib dll =-        case stripPrefix ("lib"++lib) dll of-            Just ('.':_)                -> True-            Just ('-':n:_) | isNumber n -> True-            _                           -> False-        --- The following code is a big copy-and-paste job from the sources of--- Cabal 1.8 just to be able to fix a field in the package file. Yuck.--installHook :: PackageDescription -> LocalBuildInfo-                   -> UserHooks -> InstallFlags -> IO ()-installHook pkg_descr localbuildinfo _ flags = do-  let copyFlags = defaultCopyFlags {-                      copyDistPref   = installDistPref flags,-                      copyDest       = toFlag NoCopyDest,-                      copyVerbosity  = installVerbosity flags-                  }-  install pkg_descr localbuildinfo copyFlags-  let registerFlags = defaultRegisterFlags {-                          regDistPref  = installDistPref flags,-                          regInPlace   = installInPlace flags,-                          regPackageDB = installPackageDB flags,-                          regVerbosity = installVerbosity flags-                      }-  when (hasLibs pkg_descr) $ register pkg_descr localbuildinfo registerFlags--registerHook :: PackageDescription -> LocalBuildInfo-        -> UserHooks -> RegisterFlags -> IO ()-registerHook pkg_descr localbuildinfo _ flags =-    if hasLibs pkg_descr-    then register pkg_descr localbuildinfo flags-    else setupMessage verbosity-           "Package contains no library to register:" (packageId pkg_descr)-  where verbosity = fromFlag (regVerbosity flags)--register :: PackageDescription -> LocalBuildInfo-         -> RegisterFlags -- ^Install in the user's database?; verbose-         -> IO ()-register pkg@(library       -> Just lib )-         lbi@(libraryConfig -> Just clbi) regFlags-  = do--    installedPkgInfoRaw <- generateRegistrationInfo-                           verbosity pkg lib lbi clbi inplace distPref--    dllsInScope <- getSearchPath >>= (filterM doesDirectoryExist) >>= getDlls-    let libs = fixLibs dllsInScope (extraLibraries installedPkgInfoRaw)-        installedPkgInfo = installedPkgInfoRaw {-                                extraGHCiLibraries = libs }--     -- Three different modes:-    case () of-     _ | modeGenerateRegFile   -> die "Generate Reg File not supported"-       | modeGenerateRegScript -> die "Generate Reg Script not supported"-       | otherwise             -> registerPackage verbosity-                                    installedPkgInfo pkg lbi inplace-#if CABAL_VERSION_CHECK(1,10,0)-                                    packageDbs-#else-                                    packageDb-#endif--  where-    modeGenerateRegFile = isJust (flagToMaybe (regGenPkgConf regFlags))-    modeGenerateRegScript = fromFlag (regGenScript regFlags)-    inplace   = fromFlag (regInPlace regFlags)-    packageDbs = nub $ withPackageDB lbi-                    ++ maybeToList (flagToMaybe  (regPackageDB regFlags))-    packageDb = registrationPackageDB packageDbs-    distPref  = fromFlag (regDistPref regFlags)-    verbosity = fromFlag (regVerbosity regFlags)--register _ _ regFlags = notice verbosity "No package to register"-  where-    verbosity = fromFlag (regVerbosity regFlags)------------------------------------------------------------------------------------ This is a hack for Cabal-1.8, It is not needed in Cabal-1.9.1 or later---------------------------------------------------------------------------------adjustLocalBuildInfo :: LocalBuildInfo -> LocalBuildInfo-adjustLocalBuildInfo lbi =-  let extra = (Just libBi, [])-      libBi = emptyBuildInfo { includeDirs = [ autogenModulesDir lbi-                                             , buildDir lbi ] }-   in lbi { localPkgDescr = updatePackageDescription extra (localPkgDescr lbi) }----------------------------------------------------------------------------------- Processing .chs files with our local c2hs.---------------------------------------------------------------------------------ourC2hs :: BuildInfo -> LocalBuildInfo -> PreProcessor-ourC2hs bi lbi = PreProcessor {-  platformIndependent = False,-  runPreProcessor = runC2HS bi lbi-}--runC2HS :: BuildInfo -> LocalBuildInfo ->-           (FilePath, FilePath) -> (FilePath, FilePath) -> Verbosity -> IO ()-runC2HS bi lbi (inDir, inFile)  (outDir, outFile) verbosity = do-  -- have the header file name if we don't have the precompiled header yet-  header <- case lookup "x-c2hs-header" (customFieldsBI bi) of-    Just h -> return h-    Nothing -> die ("Need x-c2hs-Header definition in the .cabal Library section "++-                    "that sets the C header file to process .chs.pp files.")--  -- c2hs will output files in out dir, removing any leading path of the input file.-  -- Thus, append the dir of the input file to the output dir.-  let (outFileDir, newOutFile) = splitFileName outFile-  let newOutDir = outDir </> outFileDir-  -- additional .chi files might be needed that other packages have installed;-  -- we assume that these are installed in the same place as .hi files-  let chiDirs = [ dir |-                  ipi <- maybe [] (map fst . componentPackageDeps) (libraryConfig lbi),-                  dir <- maybe [] importDirs (lookupInstalledPackageId (installedPkgs lbi) ipi) ]-  (gccProg, _) <- requireProgram verbosity gccProgram (withPrograms lbi)-  rawSystemProgramConf verbosity c2hsLocal (withPrograms lbi) $-       map ("--include=" ++) (outDir:chiDirs)-    ++ [ "--cpp=" ++ programPath gccProg, "--cppopts=-E" ]-    ++ ["--cppopts=" ++ opt | opt <- getCppOptions bi lbi]-    ++ ["--output-dir=" ++ newOutDir,-        "--output=" ++ newOutFile,-        "--precomp=" ++ buildDir lbi </> precompFile,-        header, inDir </> inFile]--getCppOptions :: BuildInfo -> LocalBuildInfo -> [String]-getCppOptions bi lbi-    = nub $-      ["-I" ++ dir | dir <- PD.includeDirs bi]-   ++ [opt | opt@('-':c:_) <- PD.cppOptions bi ++ PD.ccOptions bi, c `elem` "DIU"]-   ++ ["-D__GLASGOW_HASKELL__="++show (ghcDefine . ghcVersion . compilerId $ LBI.compiler lbi)]- where-  ghcDefine (v1:v2:_) = v1 * 100 + v2-  ghcDefine _ = __GLASGOW_HASKELL__--  ghcVersion :: CompilerId -> [Int]--- This version is nicer, but we need to know the Cabal version that includes the new CompilerId--- #if CABAL_VERSION_CHECK(1,19,2)---   ghcVersion (CompilerId GHC v _) = versionBranch v---   ghcVersion (CompilerId _ _ (Just c)) = ghcVersion c--- #else---   ghcVersion (CompilerId GHC v) = versionBranch v--- #endif---   ghcVersion _ = []--- This version should work fine for now-  ghcVersion = concat . take 1 . map (read . (++"]") . takeWhile (/=']')) . catMaybes-               . map (stripPrefix "CompilerId GHC (Version {versionBranch = ") . tails . show--installCHI :: PackageDescription -- ^information from the .cabal file-        -> LocalBuildInfo -- ^information from the configure step-        -> Verbosity -> CopyDest -- ^flags sent to copy or install-        -> IO ()-installCHI pkg@PD.PackageDescription { library = Just lib } lbi verbosity copydest = do-  let InstallDirs { libdir = libPref } = absoluteInstallDirs pkg lbi copydest-  -- cannot use the recommended 'findModuleFiles' since it fails if there exists-  -- a modules that does not have a .chi file-  mFiles <- mapM (findFileWithExtension' ["chi"] [buildDir lbi] . toFilePath)-                   (PD.libModules lib)-                 -  let files = [ f | Just f <- mFiles ]-  installOrdinaryFiles verbosity libPref files--  -installCHI _ _ _ _ = return ()----------------------------------------------------------------------------------- Generating the type hierarchy and signal callback .hs files.---------------------------------------------------------------------------------typeGenProgram :: Program-typeGenProgram = simpleProgram "gtk2hsTypeGen"--signalGenProgram :: Program-signalGenProgram = simpleProgram "gtk2hsHookGenerator"--c2hsLocal :: Program-c2hsLocal = (simpleProgram "gtk2hsC2hs") {-    programFindVersion = findProgramVersion "--version" $ \str ->-      -- Invoking "gtk2hsC2hs --version" gives a string like:-      -- C->Haskell Compiler, version 0.13.4 (gtk2hs branch) "Bin IO", 13 Nov 2004-      case words str of-        (_:_:_:ver:_) -> ver-        _             -> ""-  }---genSynthezisedFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO ()-genSynthezisedFiles verb pd lbi = do--  cPkgs <- getPkgConfigPackages verb lbi pd--  let xList = maybe [] (customFieldsBI . libBuildInfo) (library pd)-              ++customFieldsPD pd-      typeOpts :: String -> [ProgArg]-      typeOpts tag = concat [ map (\val -> '-':'-':drop (length tag) field++'=':val) (words content)-                            | (field,content) <- xList,-                              tag `isPrefixOf` field,-                              field /= (tag++"file")]-              ++ [ "--tag=" ++ tag-                 | PackageIdentifier name (Version (major:minor:_) _) <- cPkgs-                 , let name' = filter isAlpha (display name)-                 , tag <- name'-                        : [ name' ++ "-" ++ show major ++ "." ++ show digit-                          | digit <- [0,2..minor] ]-                 ]--      signalsOpts :: [ProgArg]-      signalsOpts = concat [ map (\val -> '-':'-':drop 10 field++'=':val) (words content)-                        | (field,content) <- xList,-                          "x-signals-" `isPrefixOf` field,-                          field /= "x-signals-file"]--      genFile :: Program -> [ProgArg] -> FilePath -> IO ()-      genFile prog args outFile = do-         res <- rawSystemProgramStdoutConf verb prog (withPrograms lbi) args-         rewriteFile outFile res--  forM_ (filter (\(tag,_) -> "x-types-" `isPrefixOf` tag && "file" `isSuffixOf` tag) xList) $-    \(fileTag, f) -> do-      let tag = reverse (drop 4 (reverse fileTag))-      info verb ("Ensuring that class hierarchy in "++f++" is up-to-date.")-      genFile typeGenProgram (typeOpts tag) f--  case lookup "x-signals-file" xList of-    Nothing -> return ()-    Just f -> do-      info verb ("Ensuring that callback hooks in "++f++" are up-to-date.")-      genFile signalGenProgram signalsOpts f----FIXME: Cabal should tell us the selected pkg-config package versions in the---       LocalBuildInfo or equivalent.---       In the mean time, ask pkg-config again.--getPkgConfigPackages :: Verbosity -> LocalBuildInfo -> PackageDescription -> IO [PackageId]-getPkgConfigPackages verbosity lbi pkg =-  sequence-    [ do version <- pkgconfig ["--modversion", display pkgname]-         case simpleParse version of-           Nothing -> die "parsing output of pkg-config --modversion failed"-           Just v  -> return (PackageIdentifier pkgname v)-    | Dependency pkgname _ <- concatMap pkgconfigDepends (allBuildInfo pkg) ]-  where-    pkgconfig = rawSystemProgramStdoutConf verbosity-                  pkgConfigProgram (withPrograms lbi)----------------------------------------------------------------------------------- Dependency calculation amongst .chs files.----------------------------------------------------------------------------------- Given all files of the package, find those that end in .chs and extract the--- .chs files they depend upon. Then return the PackageDescription with these--- files rearranged so that they are built in a sequence that files that are--- needed by other files are built first.-fixDeps :: PackageDescription -> IO PackageDescription-fixDeps pd@PD.PackageDescription {-          PD.library = Just lib@PD.Library {-            PD.exposedModules = expMods,-            PD.libBuildInfo = bi@PD.BuildInfo {-              PD.hsSourceDirs = srcDirs,-              PD.otherModules = othMods-            }}} = do-  let findModule m = findFileWithExtension [".chs.pp",".chs"] srcDirs-                       (joinPath (components m))-  mExpFiles <- mapM findModule expMods-  mOthFiles <- mapM findModule othMods--  -- tag all exposed files with True so we throw an error if we need to build-  -- an exposed module before an internal modules (we cannot express this)-  let modDeps = zipWith (ModDep True []) expMods mExpFiles++-                zipWith (ModDep False []) othMods mOthFiles-  modDeps <- mapM extractDeps modDeps-  let (expMods, othMods) = span mdExposed $ sortTopological modDeps-      badOther = map (fromMaybe "<no file>" . mdLocation) $-                 filter (not . mdExposed) expMods-  unless (null badOther) $-    die ("internal chs modules "++intercalate "," badOther++-         " depend on exposed chs modules; cabal needs to build internal modules first")-  return pd { PD.library = Just lib {-    PD.exposedModules = map mdOriginal expMods,-    PD.libBuildInfo = bi { PD.otherModules = map mdOriginal othMods }-  }}--data ModDep = ModDep {-  mdExposed :: Bool,-  mdRequires :: [ModuleName],-  mdOriginal :: ModuleName,-  mdLocation :: Maybe FilePath-}--instance Show ModDep where-  show x = show (mdLocation x)--instance Eq ModDep where-  ModDep { mdOriginal = m1 } == ModDep { mdOriginal = m2 } = m1==m2-instance Ord ModDep where-  compare ModDep { mdOriginal = m1 } ModDep { mdOriginal = m2 } = compare m1 m2---- Extract the dependencies of this file. This is intentionally rather naive as it--- ignores CPP conditionals. We just require everything which means that the--- existance of a .chs module may not depend on some CPP condition.  -extractDeps :: ModDep -> IO ModDep-extractDeps md@ModDep { mdLocation = Nothing } = return md-extractDeps md@ModDep { mdLocation = Just f } = withUTF8FileContents f $ \con -> do-  let findImports acc (('{':'#':xs):xxs) = case (dropWhile (' ' ==) xs) of-        ('i':'m':'p':'o':'r':'t':' ':ys) ->-          case simpleParse (takeWhile ('#' /=) ys) of-            Just m -> findImports (m:acc) xxs -            Nothing -> die ("cannot parse chs import in "++f++":\n"++-                            "offending line is {#"++xs)-         -- no more imports after the first non-import hook-        _ -> return acc-      findImports acc (_:xxs) = findImports acc xxs-      findImports acc [] = return acc-  mods <- findImports [] (lines con)-  return md { mdRequires = mods }---- Find a total order of the set of modules that are partially sorted by their--- dependencies on each other. The function returns the sorted list of modules--- together with a list of modules that are required but not supplied by this--- in the input set of modules.-sortTopological :: [ModDep] -> [ModDep]-sortTopological ms = reverse $ fst $ foldl visit ([], S.empty) (map mdOriginal ms)-  where-  set = M.fromList (map (\m -> (mdOriginal m, m)) ms)-  visit (out,visited) m-    | m `S.member` visited = (out,visited)-    | otherwise = case m `M.lookup` set of-        Nothing -> (out, m `S.insert` visited)-        Just md -> (md:out', visited')-          where-            (out',visited') = foldl visit (out, m `S.insert` visited) (mdRequires md)---- Check user whether install gtk2hs-buildtools correctly.-checkGtk2hsBuildtools :: [Program] -> IO ()-checkGtk2hsBuildtools programs = do-  programInfos <- mapM (\ prog -> do-                         location <- onDefaultSearchPath programFindLocation prog normal-                         return (programName prog, location)-                      ) programs-  let printError name = do-        putStrLn $ "Cannot find " ++ name ++ "\n" -                 ++ "Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin)."-        exitFailure-  forM_ programInfos $ \ (name, location) ->-    when (isNothing location) (printError name) 
Setup.hs view
@@ -1,10 +1,8 @@--- Standard setup file for a Gtk2Hs module.+-- Adjustments specific to this package,+-- all Gtk2Hs-specific boilerplate is kept in+-- gtk2hs-buildtools:Gtk2HsSetup ----- See also:---  * SetupMain.hs    : the real Setup script for this package---  * Gtk2HsSetup.hs  : Gtk2Hs-specific boilerplate---  * SetupWrapper.hs : wrapper for compat with various ghc/cabal versions--import SetupWrapper ( setupWrapper )+import Gtk2HsSetup ( gtk2hsUserHooks )+import Distribution.Simple ( defaultMainWithHooks ) -main = setupWrapper "SetupMain.hs"+main = defaultMainWithHooks gtk2hsUserHooks
− SetupMain.hs
@@ -1,13 +0,0 @@--- The real Setup file for a Gtk2Hs package (invoked via the SetupWrapper).--- It contains only adjustments specific to this package,--- all Gtk2Hs-specific boilerplate is kept in Gtk2HsSetup.hs--- which should be kept identical across all packages.----import Gtk2HsSetup ( gtk2hsUserHooks, checkGtk2hsBuildtools,-                     typeGenProgram, signalGenProgram, c2hsLocal)-import Distribution.Simple ( defaultMainWithHooks )--main = do-  checkGtk2hsBuildtools [typeGenProgram, signalGenProgram, c2hsLocal]-  defaultMainWithHooks gtk2hsUserHooks-  
− SetupWrapper.hs
@@ -1,164 +0,0 @@--- A wrapper script for Cabal Setup.hs scripts. Allows compiling the real Setup--- conditionally depending on the Cabal version.--module SetupWrapper (setupWrapper) where--import Distribution.Package-import Distribution.Compiler-import Distribution.Simple.Utils-import Distribution.Simple.Program-import Distribution.Simple.Compiler-import Distribution.Simple.BuildPaths (exeExtension)-import Distribution.Simple.Configure (configCompiler)-import Distribution.Simple.GHC (getInstalledPackages)-import qualified Distribution.Simple.PackageIndex as PackageIndex-import Distribution.Version-import Distribution.Verbosity-import Distribution.Text--import System.Environment-import System.Process-import System.Exit-import System.FilePath-import System.Directory-import qualified Control.Exception as Exception-import System.IO.Error (isDoesNotExistError)--import Data.List-import Data.Char-import Control.Monad----- moreRecentFile is implemented in Distribution.Simple.Utils, but only in--- Cabal >= 1.18. For backwards-compatibility, we implement a copy with a new--- name here. Some desirable alternate strategies don't work:--- * We can't use CPP to check which version of Cabal we're up against because---   this is the file that's generating the macros for doing that.--- * We can't use the name moreRecentFiles and use---   import D.S.U hiding (moreRecentFiles)---   because on old GHC's (and according to the Report) hiding a name that---   doesn't exist is an error.-moreRecentFile' :: FilePath -> FilePath -> IO Bool-moreRecentFile' a b = do-  exists <- doesFileExist b-  if not exists-    then return True-    else do tb <- getModificationTime b-            ta <- getModificationTime a-            return (ta > tb)--setupWrapper :: FilePath -> IO ()-setupWrapper setupHsFile = do-  args <- getArgs-  createDirectoryIfMissingVerbose verbosity True setupDir-  compileSetupExecutable-  invokeSetupScript args--  where-    setupDir         = "dist/setup-wrapper"-    setupVersionFile = setupDir </> "setup" <.> "version"-    setupProgFile    = setupDir </> "setup" <.> exeExtension-    setupMacroFile   = setupDir </> "wrapper-macros.h"--    useCabalVersion  = Version [1,8] []-    usePackageDB     = [GlobalPackageDB, UserPackageDB]-    verbosity        = normal--    cabalLibVersionToUse comp conf = do-      savedVersion <- savedCabalVersion-      case savedVersion of-        Just version-          -> return version-        _ -> do version <- installedCabalVersion comp conf-                writeFile setupVersionFile (show version ++ "\n")-                return version--    savedCabalVersion = do-      versionString <- readFile setupVersionFile-                         `Exception.catch` \e -> if isDoesNotExistError e-                                                   then return ""-                                                   else Exception.throwIO e-      case reads versionString of-        [(version,s)] | all isSpace s -> return (Just version)-        _                             -> return Nothing--    installedCabalVersion comp conf = do-      index <- getInstalledPackages verbosity usePackageDB conf--      let cabalDep = Dependency (PackageName "Cabal")-                                (orLaterVersion useCabalVersion)-      case PackageIndex.lookupDependency index cabalDep of-        []   -> die $ "The package requires Cabal library version "-                   ++ display useCabalVersion-                   ++ " but no suitable version is installed."-        pkgs -> return $ bestVersion (map fst pkgs)-      where-        bestVersion          = maximumBy (comparing preference)-        preference version   = (sameVersion, sameMajorVersion-                               ,stableVersion, latestVersion)-          where-            sameVersion      = version == cabalVersion-            sameMajorVersion = majorVersion version == majorVersion cabalVersion-            majorVersion     = take 2 . versionBranch-            stableVersion    = case versionBranch version of-                                 (_:x:_) -> even x-                                 _       -> False-            latestVersion    = version--    -- | If the Setup.hs is out of date wrt the executable then recompile it.-    -- Currently this is GHC only. It should really be generalised.-    ---    compileSetupExecutable = do-      setupHsNewer      <- setupHsFile      `moreRecentFile'` setupProgFile-      cabalVersionNewer <- setupVersionFile `moreRecentFile'` setupProgFile-      let outOfDate = setupHsNewer || cabalVersionNewer-      when outOfDate $ do-        debug verbosity "Setup script is out of date, compiling..."--        (comp, conf)    <- configCompiler (Just GHC) Nothing Nothing-                             defaultProgramConfiguration verbosity-        cabalLibVersion <- cabalLibVersionToUse comp conf-        let cabalPkgid = PackageIdentifier (PackageName "Cabal") cabalLibVersion-        debug verbosity $ "Using Cabal library version " ++ display cabalLibVersion--        writeFile setupMacroFile (generateVersionMacro cabalLibVersion)--        rawSystemProgramConf verbosity ghcProgram conf $-            ["--make", setupHsFile, "-o", setupProgFile]-         ++ ghcPackageDbOptions usePackageDB-         ++ ["-package", display cabalPkgid-            ,"-cpp", "-optP-include", "-optP" ++ setupMacroFile-            ,"-odir", setupDir, "-hidir", setupDir]-      where--        ghcPackageDbOptions dbstack = case dbstack of-          (GlobalPackageDB:UserPackageDB:dbs) -> concatMap specific dbs-          (GlobalPackageDB:dbs)               -> "-no-user-package-conf"-                                               : concatMap specific dbs-          _                                   -> ierror-          where-            specific (SpecificPackageDB db) = [ "-package-conf", db ]-            specific _ = ierror-            ierror     = error "internal error: unexpected package db stack"--        generateVersionMacro :: Version -> String-        generateVersionMacro version =-          concat-            ["/* DO NOT EDIT: This file is automatically generated by Cabal */\n\n"-            ,"#define CABAL_VERSION_CHECK(major1,major2,minor) (\\\n"-            ,"  (major1) <  ",major1," || \\\n"-            ,"  (major1) == ",major1," && (major2) <  ",major2," || \\\n"-            ,"  (major1) == ",major1," && (major2) == ",major2," && (minor) <= ",minor,")"-            ,"\n\n"-            ]-          where-            (major1:major2:minor:_) = map show (versionBranch version ++ repeat 0)--    invokeSetupScript :: [String] -> IO ()-    invokeSetupScript args = do-      info verbosity $ unwords (setupProgFile : args)-      process <- runProcess (currentDir </> setupProgFile) args-                   Nothing Nothing-                   Nothing Nothing Nothing-      exitCode <- waitForProcess process-      unless (exitCode == ExitSuccess) $ exitWith exitCode
demo/actionMenu/ActionMenu.hs view
@@ -1,6 +1,13 @@+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverloadedStrings #-} import Graphics.UI.Gtk-import Control.Monad.IO.Class (liftIO)+import Data.Text (Text) +-- A function like this can be used to tag string literals for i18n.+-- It also avoids a lot of type annotations.+__ :: Text -> Text+__ = id -- Replace with getText from the hgettext package in localised versions+ uiDef =   "<ui>\   \  <menubar>\@@ -35,52 +42,52 @@   \      <separator/>\   \    </placeholder>\   \  </toolbar>\-  \</ui>"+  \</ui>" :: Text  main = do   initGUI    -- Create the menus-  fileAct <- actionNew "FileAction" "File" Nothing Nothing-  editAct <- actionNew "EditAction" "Edit" Nothing Nothing+  fileAct <- actionNew "FileAction" (__"File") Nothing Nothing+  editAct <- actionNew "EditAction" (__"Edit") Nothing Nothing    -- Create menu items-  newAct <- actionNew "NewAction" "New"-            (Just "Clear the spreadsheet area.")+  newAct <- actionNew "NewAction" (__"New")+            (Just (__"Clear the spreadsheet area."))             (Just stockNew)   on newAct actionActivated $ putStrLn "New activated."-  openAct <- actionNew "OpenAction" "Open"-            (Just "Open an existing spreadsheet.")+  openAct <- actionNew "OpenAction" (__"Open")+            (Just (__"Open an existing spreadsheet."))             (Just stockOpen)   on openAct actionActivated $ putStrLn "Open activated."-  saveAct <- actionNew "SaveAction" "Save"-            (Just "Save the current spreadsheet.")+  saveAct <- actionNew "SaveAction" (__"Save")+            (Just (__"Save the current spreadsheet."))             (Just stockSave)   on saveAct actionActivated $ putStrLn "Save activated."-  saveAsAct <- actionNew "SaveAsAction" "SaveAs"-            (Just "Save spreadsheet under new name.")+  saveAsAct <- actionNew "SaveAsAction" (__"SaveAs")+            (Just (__"Save spreadsheet under new name."))             (Just stockSaveAs)   on saveAsAct actionActivated $ putStrLn "SaveAs activated."-  exitAct <- actionNew "ExitAction" "Exit"-            (Just "Exit this application.")+  exitAct <- actionNew "ExitAction" (__"Exit")+            (Just (__"Exit this application."))             (Just stockSaveAs)   on exitAct actionActivated $ mainQuit-  cutAct <- actionNew "CutAction" "Cut"-            (Just "Cut out the current selection.")+  cutAct <- actionNew "CutAction" (__"Cut")+            (Just (__"Cut out the current selection."))             (Just stockCut)   on cutAct actionActivated $ putStrLn "Cut activated."-  copyAct <- actionNew "CopyAction" "Copy"-            (Just "Copy the current selection.")+  copyAct <- actionNew "CopyAction" (__"Copy")+            (Just (__"Copy the current selection."))             (Just stockCopy)   on copyAct actionActivated $ putStrLn "Copy activated."-  pasteAct <- actionNew "PasteAction" "Paste"-            (Just "Paste the current selection.")+  pasteAct <- actionNew "PasteAction" (__"Paste")+            (Just (__"Paste the current selection."))             (Just stockPaste)   on pasteAct actionActivated $ putStrLn "Paste activated." -  standardGroup <- actionGroupNew "standard"+  standardGroup <- actionGroupNew ("standard"::Text)   mapM_ (actionGroupAddAction standardGroup) [fileAct, editAct]-  mapM_ (\act -> actionGroupAddActionWithAccel standardGroup act Nothing)+  mapM_ (\act -> actionGroupAddActionWithAccel standardGroup act (Nothing::Maybe Text))     [newAct, openAct, saveAct, saveAsAct, exitAct, cutAct, copyAct, pasteAct]    ui <- uiManagerNew@@ -90,8 +97,8 @@   win <- windowNew   on win objectDestroy mainQuit   on win sizeRequest $ return (Requisition 200 100)-  (Just menuBar) <- uiManagerGetWidget ui "/ui/menubar"-  (Just toolBar) <- uiManagerGetWidget ui "/ui/toolbar"+  (Just menuBar) <- uiManagerGetWidget ui ("/ui/menubar"::Text)+  (Just toolBar) <- uiManagerGetWidget ui ("/ui/toolbar"::Text)    edit <- textViewNew   vBox <- vBoxNew False 0
demo/buttonbox/ButtonBox.hs view
@@ -1,7 +1,6 @@ module Main (main) where  import Graphics.UI.Gtk-import Control.Monad.IO.Class (liftIO)  main :: IO () main = do@@ -29,8 +28,8 @@                  | button <- [button1, button2, button3] ]    -- This sets button3 to be a so called 'secondary child'. When the layout-  -- stlye is ButtonboxStart or ButtonboxEnd, the secondary children are-  -- grouped seperately from the others. Resize the window to see the effect.+  -- style is ButtonboxStart or ButtonboxEnd, the secondary children are+  -- grouped separately from the others. Resize the window to see the effect.   --   -- This is not interesting in itself but shows how to set child attributes.   -- Note that the child attribute 'buttonBoxChildSecondary' takes the
demo/carsim/CarSim.hs view
@@ -4,6 +4,10 @@ -- license: public domain  module Main where++import Control.Applicative+import Prelude+ import Data.Maybe import Graphics.UI.Gtk import Graphics.Rendering.Cairo@@ -12,7 +16,6 @@ import Data.List import Data.Time import Data.Complex-import Control.Applicative ((<$>))  -- Constants @@ -133,7 +136,7 @@      -- If 'resume' is called, 'step' will be called at small     -- timesteps to update car data. If 'pause' is called, 'step'-    -- calls are stoped.  'resume' is called at program startup,+    -- calls are stopped.  'resume' is called at program startup,     -- and then the pause button alternates 'resume' and 'pause'.      let step = do
demo/concurrent/Progress.hs view
@@ -8,8 +8,9 @@  import Graphics.UI.Gtk +import Control.Applicative+import Prelude import Control.Concurrent-import Control.Applicative ((<$>))  main :: IO () main = do
demo/concurrent/ProgressThreadedRTS.hs view
@@ -10,13 +10,14 @@  import Graphics.UI.Gtk +import Control.Applicative+import Prelude import Control.Concurrent-import Control.Applicative ((<$>))  main :: IO () main = do -  -- It is marked unsafe becuase it is your obligation to ensure you+  -- It is marked unsafe because it is your obligation to ensure you   -- only call Gtk+ from one OS thread, or 'bad things' will happen.   unsafeInitGUIForThreadedRTS 
demo/embedded/Embedded.hs view
@@ -12,6 +12,7 @@ import Control.Monad import Control.Monad.Trans import Control.Concurrent+import Data.Text (unpack)  import Graphics.UI.Gtk import Graphics.UI.Gtk.Gdk.DrawWindow@@ -38,8 +39,8 @@   window <- windowNew   windowSetPosition window WinPosCenter   windowSetDefaultSize window 600 400-  windowSetTitle window "Press `m` to new tab, press `q` exit."-  window `onDestroy` mainQuit+  set window [windowTitle := "Press `m` to new tab, press `q` exit."]+  on window objectDestroy mainQuit    -- Create notebook to contain GtkSocekt.   notebook <- notebookNew@@ -49,7 +50,7 @@   window `on` keyPressEvent $ tryEvent $ do     keyName <- eventKeyName     liftIO $-      case keyName of+      case unpack keyName of         "m" -> do                -- Create new GtkSocket.                socket <- socketNew@@ -73,13 +74,13 @@   initGUI    plug <- plugNew $ Just id-  plug `onDestroy` mainQuit+  on plug objectDestroy $ mainQuit    button <- buttonNewWithLabel "Click me to hang."   plug `containerAdd` button    -- Simulate a plugin hanging to see if it blocks the outer process.-  button `onClicked` threadDelay 5000000+  on button buttonActivated $ threadDelay 5000000    widgetShowAll plug 
demo/fastdraw/FastDraw.hs view
@@ -4,21 +4,14 @@ -- Example of an drawing graphics onto a canvas. import Graphics.UI.Gtk -import Data.Array.MArray-import Data.Word+import Control.Applicative+import Prelude import Data.IORef-import Control.Monad ( when )-import Control.Monad.IO.Class ( liftIO )-import Data.Array.Base ( unsafeWrite ) import Graphics.Rendering.Cairo import Foreign (allocaArray) import Graphics.Rendering.Cairo.Types (PixelData) import Foreign.Storable (Storable(..))-import Control.Monad.Trans.Reader (ask, runReaderT)-import Graphics.Rendering.Cairo.Internal (runRender)-import Control.Monad.Trans.Class (MonadTrans(..)) import Foreign.C (CUChar)-import Control.Applicative ((<$>))   main = do
demo/filechooser/FileChooserDemo.glade view
@@ -1,28 +1,24 @@-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">--<glade-interface>--<widget class="GtkWindow" id="mainWindow">-  <property name="border_width">10</property>-  <property name="visible">True</property>-  <property name="title" translatable="yes">File Chooser Demo</property>-  <property name="type">GTK_WINDOW_TOPLEVEL</property>-  <property name="window_position">GTK_WIN_POS_NONE</property>-  <property name="modal">False</property>-  <property name="resizable">True</property>-  <property name="destroy_with_parent">False</property>--  <child>-    <widget class="GtkVBox" id="vbox1">-      <property name="visible">True</property>-      <property name="homogeneous">False</property>-      <property name="spacing">0</property>--      <child>-	<widget class="GtkLabel" id="label1">-	  <property name="visible">True</property>-	  <property name="label" translatable="yes">This is a demo of the GtkFileChooser that was intoduced in Gtk+ 2.4+<?xml version="1.0"?>+<!--*- mode: xml -*-->+<interface>+  <object class="GtkWindow" id="mainWindow">+    <property name="border_width">10</property>+    <property name="visible">True</property>+    <property name="title" translatable="yes">File Chooser Demo</property>+    <property name="type">GTK_WINDOW_TOPLEVEL</property>+    <property name="window_position">GTK_WIN_POS_NONE</property>+    <property name="modal">False</property>+    <property name="resizable">True</property>+    <property name="destroy_with_parent">False</property>+    <child>+      <object class="GtkVBox" id="vbox1">+        <property name="visible">True</property>+        <property name="homogeneous">False</property>+        <property name="spacing">0</property>+        <child>+          <object class="GtkLabel" id="label1">+            <property name="visible">True</property>+            <property name="label" translatable="yes">This is a demo of the GtkFileChooser that was intoduced in Gtk+ 2.4  The dialog has four modes: * open file (selects existing file)@@ -31,386 +27,357 @@ * create folder (selects existing or bew folder)  The last demo show how you can install extra widgets or a preview widget in the file open dialog</property>-	  <property name="use_underline">False</property>-	  <property name="use_markup">False</property>-	  <property name="justify">GTK_JUSTIFY_LEFT</property>-	  <property name="wrap">True</property>-	  <property name="selectable">False</property>-	  <property name="xalign">0</property>-	  <property name="yalign">0</property>-	  <property name="xpad">10</property>-	  <property name="ypad">10</property>-	</widget>-	<packing>-	  <property name="padding">0</property>-	  <property name="expand">True</property>-	  <property name="fill">False</property>-	</packing>-      </child>--      <child>-	<widget class="GtkHButtonBox" id="hbuttonbox1">-	  <property name="visible">True</property>-	  <property name="layout_style">GTK_BUTTONBOX_EDGE</property>-	  <property name="spacing">5</property>--	  <child>-	    <widget class="GtkButton" id="openFileButton">-	      <property name="visible">True</property>-	      <property name="can_default">True</property>-	      <property name="can_focus">True</property>-	      <property name="relief">GTK_RELIEF_NORMAL</property>--	      <child>-		<widget class="GtkAlignment" id="alignment2">-		  <property name="visible">True</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xscale">0</property>-		  <property name="yscale">0</property>--		  <child>-		    <widget class="GtkHBox" id="hbox2">-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkImage" id="image2">-			  <property name="visible">True</property>-			  <property name="stock">gtk-open</property>-			  <property name="icon_size">4</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label3">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">Open File</property>-			  <property name="use_underline">True</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>-		    </widget>-		  </child>-		</widget>-	      </child>-	    </widget>-	  </child>--	  <child>-	    <widget class="GtkButton" id="saveFileButton">-	      <property name="visible">True</property>-	      <property name="can_default">True</property>-	      <property name="can_focus">True</property>-	      <property name="relief">GTK_RELIEF_NORMAL</property>--	      <child>-		<widget class="GtkAlignment" id="alignment1">-		  <property name="visible">True</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xscale">0</property>-		  <property name="yscale">0</property>--		  <child>-		    <widget class="GtkHBox" id="hbox1">-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkImage" id="image1">-			  <property name="visible">True</property>-			  <property name="stock">gtk-save-as</property>-			  <property name="icon_size">4</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label2">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">Save File</property>-			  <property name="use_underline">True</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>-		    </widget>-		  </child>-		</widget>-	      </child>-	    </widget>-	  </child>--	  <child>-	    <widget class="GtkButton" id="selectFolderButton">-	      <property name="visible">True</property>-	      <property name="can_default">True</property>-	      <property name="can_focus">True</property>-	      <property name="relief">GTK_RELIEF_NORMAL</property>--	      <child>-		<widget class="GtkAlignment" id="alignment4">-		  <property name="visible">True</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xscale">0</property>-		  <property name="yscale">0</property>--		  <child>-		    <widget class="GtkHBox" id="hbox4">-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkImage" id="image4">-			  <property name="visible">True</property>-			  <property name="stock">gtk-open</property>-			  <property name="icon_size">4</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label5">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">Select Folder</property>-			  <property name="use_underline">True</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>-		    </widget>-		  </child>-		</widget>-	      </child>-	    </widget>-	  </child>--	  <child>-	    <widget class="GtkButton" id="createFolderButton">-	      <property name="visible">True</property>-	      <property name="can_default">True</property>-	      <property name="can_focus">True</property>-	      <property name="relief">GTK_RELIEF_NORMAL</property>--	      <child>-		<widget class="GtkAlignment" id="alignment3">-		  <property name="visible">True</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xscale">0</property>-		  <property name="yscale">0</property>--		  <child>-		    <widget class="GtkHBox" id="hbox3">-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkImage" id="image3">-			  <property name="visible">True</property>-			  <property name="stock">gtk-open</property>-			  <property name="icon_size">4</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label4">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">Create Folder</property>-			  <property name="use_underline">True</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>-		    </widget>-		  </child>-		</widget>-	      </child>-	    </widget>-	  </child>-	</widget>-	<packing>-	  <property name="padding">5</property>-	  <property name="expand">False</property>-	  <property name="fill">True</property>-	</packing>-      </child>--      <child>-	<widget class="GtkHButtonBox" id="hbuttonbox2">-	  <property name="visible">True</property>-	  <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>-	  <property name="spacing">5</property>--	  <child>-	    <widget class="GtkButton" id="openFilePreviewButton">-	      <property name="visible">True</property>-	      <property name="can_default">True</property>-	      <property name="can_focus">True</property>-	      <property name="relief">GTK_RELIEF_NORMAL</property>--	      <child>-		<widget class="GtkAlignment" id="alignment5">-		  <property name="visible">True</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xscale">0</property>-		  <property name="yscale">0</property>--		  <child>-		    <widget class="GtkHBox" id="hbox5">-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkImage" id="image5">-			  <property name="visible">True</property>-			  <property name="stock">gtk-open</property>-			  <property name="icon_size">4</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label6">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">Open File (with preview)</property>-			  <property name="use_underline">True</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">0.5</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>-		    </widget>-		  </child>-		</widget>-	      </child>-	    </widget>-	  </child>--	  <child>-	    <widget class="GtkButton" id="quitButton">-	      <property name="visible">True</property>-	      <property name="can_default">True</property>-	      <property name="can_focus">True</property>-	      <property name="label">gtk-quit</property>-	      <property name="use_stock">True</property>-	      <property name="relief">GTK_RELIEF_NORMAL</property>-	    </widget>-	  </child>-	</widget>-	<packing>-	  <property name="padding">0</property>-	  <property name="expand">True</property>-	  <property name="fill">True</property>-	</packing>-      </child>-    </widget>-  </child>-</widget>--</glade-interface>+            <property name="use_underline">False</property>+            <property name="use_markup">False</property>+            <property name="justify">GTK_JUSTIFY_LEFT</property>+            <property name="wrap">True</property>+            <property name="selectable">False</property>+            <property name="xalign">0</property>+            <property name="yalign">0</property>+            <property name="xpad">10</property>+            <property name="ypad">10</property>+          </object>+          <packing>+            <property name="padding">0</property>+            <property name="expand">True</property>+            <property name="fill">False</property>+          </packing>+        </child>+        <child>+          <object class="GtkHButtonBox" id="hbuttonbox1">+            <property name="visible">True</property>+            <property name="layout_style">GTK_BUTTONBOX_EDGE</property>+            <property name="spacing">5</property>+            <child>+              <object class="GtkButton" id="openFileButton">+                <property name="visible">True</property>+                <property name="can_default">True</property>+                <property name="can_focus">True</property>+                <property name="relief">GTK_RELIEF_NORMAL</property>+                <child>+                  <object class="GtkAlignment" id="alignment2">+                    <property name="visible">True</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xscale">0</property>+                    <property name="yscale">0</property>+                    <child>+                      <object class="GtkHBox" id="hbox2">+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkImage" id="image2">+                            <property name="visible">True</property>+                            <property name="stock">gtk-open</property>+                            <property name="icon_size">4</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label3">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">Open File</property>+                            <property name="use_underline">True</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                  </object>+                </child>+              </object>+            </child>+            <child>+              <object class="GtkButton" id="saveFileButton">+                <property name="visible">True</property>+                <property name="can_default">True</property>+                <property name="can_focus">True</property>+                <property name="relief">GTK_RELIEF_NORMAL</property>+                <child>+                  <object class="GtkAlignment" id="alignment1">+                    <property name="visible">True</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xscale">0</property>+                    <property name="yscale">0</property>+                    <child>+                      <object class="GtkHBox" id="hbox1">+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkImage" id="image1">+                            <property name="visible">True</property>+                            <property name="stock">gtk-save-as</property>+                            <property name="icon_size">4</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label2">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">Save File</property>+                            <property name="use_underline">True</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                  </object>+                </child>+              </object>+            </child>+            <child>+              <object class="GtkButton" id="selectFolderButton">+                <property name="visible">True</property>+                <property name="can_default">True</property>+                <property name="can_focus">True</property>+                <property name="relief">GTK_RELIEF_NORMAL</property>+                <child>+                  <object class="GtkAlignment" id="alignment4">+                    <property name="visible">True</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xscale">0</property>+                    <property name="yscale">0</property>+                    <child>+                      <object class="GtkHBox" id="hbox4">+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkImage" id="image4">+                            <property name="visible">True</property>+                            <property name="stock">gtk-open</property>+                            <property name="icon_size">4</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label5">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">Select Folder</property>+                            <property name="use_underline">True</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                  </object>+                </child>+              </object>+            </child>+            <child>+              <object class="GtkButton" id="createFolderButton">+                <property name="visible">True</property>+                <property name="can_default">True</property>+                <property name="can_focus">True</property>+                <property name="relief">GTK_RELIEF_NORMAL</property>+                <child>+                  <object class="GtkAlignment" id="alignment3">+                    <property name="visible">True</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xscale">0</property>+                    <property name="yscale">0</property>+                    <child>+                      <object class="GtkHBox" id="hbox3">+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkImage" id="image3">+                            <property name="visible">True</property>+                            <property name="stock">gtk-open</property>+                            <property name="icon_size">4</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label4">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">Create Folder</property>+                            <property name="use_underline">True</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                  </object>+                </child>+              </object>+            </child>+          </object>+          <packing>+            <property name="padding">5</property>+            <property name="expand">False</property>+            <property name="fill">True</property>+          </packing>+        </child>+        <child>+          <object class="GtkHButtonBox" id="hbuttonbox2">+            <property name="visible">True</property>+            <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>+            <property name="spacing">5</property>+            <child>+              <object class="GtkButton" id="openFilePreviewButton">+                <property name="visible">True</property>+                <property name="can_default">True</property>+                <property name="can_focus">True</property>+                <property name="relief">GTK_RELIEF_NORMAL</property>+                <child>+                  <object class="GtkAlignment" id="alignment5">+                    <property name="visible">True</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xscale">0</property>+                    <property name="yscale">0</property>+                    <child>+                      <object class="GtkHBox" id="hbox5">+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkImage" id="image5">+                            <property name="visible">True</property>+                            <property name="stock">gtk-open</property>+                            <property name="icon_size">4</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label6">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">Open File (with preview)</property>+                            <property name="use_underline">True</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">0.5</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                  </object>+                </child>+              </object>+            </child>+            <child>+              <object class="GtkButton" id="quitButton">+                <property name="visible">True</property>+                <property name="can_default">True</property>+                <property name="can_focus">True</property>+                <property name="label">gtk-quit</property>+                <property name="use_stock">True</property>+                <property name="relief">GTK_RELIEF_NORMAL</property>+              </object>+            </child>+          </object>+          <packing>+            <property name="padding">0</property>+            <property name="expand">True</property>+            <property name="fill">True</property>+          </packing>+        </child>+      </object>+    </child>+  </object>+</interface>
demo/filechooser/FileChooserDemo.hs view
@@ -1,40 +1,39 @@ module Main where -import Graphics.UI.Gtk-import Graphics.UI.Gtk.Glade+import Graphics.UI.Gtk hiding (response)  main :: IO () main = do   initGUI    -- load up our main window-  dialogXmlM <- xmlNew "FileChooserDemo.glade"-  let dialogXml = case dialogXmlM of-        (Just dialogXml) -> dialogXml-        Nothing -> error $ "can't find the glade file \"FileChooserDemo.glade\""-                        ++ "in the current directory"+  gui <- builderNew+  builderAddFromFile gui "FileChooserDemo.glade" +  mainWindow <- builderGetObject gui castToWindow "mainWindow"+   -- get a handle on a various objects from the glade file-  mainWindow <- xmlGetWidget dialogXml castToWindow "mainWindow"-  mainWindow `onDestroy` mainQuit+  on mainWindow objectDestroy mainQuit -  -- and associate actions with the buttons-  selectFolderButton <- xmlGetWidget dialogXml castToButton "selectFolderButton"+  let onClicked obj = on obj buttonActivated++  -- -- and associate actions with the buttons+  selectFolderButton <- builderGetObject gui castToButton "selectFolderButton"   selectFolderButton `onClicked` openSelectFolderDialog mainWindow -  createFolderButton <- xmlGetWidget dialogXml castToButton "createFolderButton"+  createFolderButton <- builderGetObject gui castToButton "createFolderButton"   createFolderButton `onClicked` openCreateFolderDialog mainWindow -  openFileButton <- xmlGetWidget dialogXml castToButton "openFileButton"+  openFileButton <- builderGetObject gui castToButton "openFileButton"   openFileButton `onClicked` openOpenFileDialog mainWindow -  saveFileButton <- xmlGetWidget dialogXml castToButton "saveFileButton"+  saveFileButton <- builderGetObject gui castToButton "saveFileButton"   saveFileButton `onClicked` openSaveFileDialog mainWindow -  openFilePreviewButton <- xmlGetWidget dialogXml castToButton "openFilePreviewButton"+  openFilePreviewButton <- builderGetObject gui castToButton "openFilePreviewButton"   openFilePreviewButton `onClicked` openFilePreviewDialog mainWindow -  quitButton <- xmlGetWidget dialogXml castToButton "quitButton"+  quitButton <- builderGetObject gui castToButton "quitButton"   quitButton `onClicked` (do                            widgetDestroy mainWindow                            mainQuit)@@ -145,7 +144,7 @@   previewLabel <- labelNew $ Just "Preview appears here"   previewLabel `labelSetLineWrap` True   dialog `fileChooserSetPreviewWidget` previewLabel-  dialog `onUpdatePreview` do+  on dialog updatePreview $ do     previewFile <- fileChooserGetPreviewFilename dialog     previewLabel `labelSetText` case previewFile of       Nothing -> "Preview appears here"
demo/gtkbuilder/GtkBuilderTest.hs view
@@ -1,7 +1,6 @@ module Main where  import Graphics.UI.Gtk-import Control.Monad.IO.Class (MonadIO(..))  main = do         initGUI@@ -14,7 +13,7 @@         window <- builderGetObject builder castToWindow "window1"         button <- builderGetObject builder castToButton "button1" -        -- Basic user interation+        -- Basic user interaction         on button buttonActivated $ putStrLn "button pressed!"         on window objectDestroy mainQuit 
demo/hello/World.hs view
@@ -2,7 +2,6 @@ module Main (Main.main) where  import Graphics.UI.Gtk-import Control.Monad.IO.Class (MonadIO(..))  main :: IO () main = do
demo/inputmethod/Layout.hs view
@@ -1,6 +1,9 @@+{-# LANGUAGE OverloadedStrings #-} -- Example of using a PangoLayout  import Data.IORef+import Data.Monoid ((<>))+import qualified Data.Text as T  import Graphics.UI.Gtk import Graphics.Rendering.Cairo@@ -14,30 +17,30 @@         \ Excepteur sint occaecat cupidatat non proident, sunt in culpa\         \ qui officia deserunt mollit anim id est laborum." -data Buffer = Buffer String Int+data Buffer = Buffer T.Text Int -defaultBuffer = Buffer loremIpsum (length loremIpsum)+defaultBuffer = Buffer loremIpsum (T.length loremIpsum)  displayBuffer (Buffer str pos) =-  before ++ "<CURSOR>" ++ after-  where (before,after) = splitAt pos str+  before <> "<CURSOR>" <> after+  where (before,after) = T.splitAt pos str  displayBufferPreedit (Buffer str pos) preeditStr preeditPos =-  before ++ "[" ++ prebefore ++ "<CURSOR>" ++ preafter ++ "]" ++ after-  where (before,after) = splitAt pos str-        (prebefore, preafter) = splitAt preeditPos preeditStr+  before <> "[" <> prebefore <> "<CURSOR>" <> preafter <> "]" <> after+  where (before,after) = T.splitAt pos str+        (prebefore, preafter) = T.splitAt preeditPos preeditStr -insertStr new (Buffer str pos) = Buffer (before++new++after) (pos+length new)-  where (before,after) = splitAt pos str+insertStr new (Buffer str pos) = Buffer (before<>new<>after) (pos+T.length new)+  where (before,after) = T.splitAt pos str  deleteChar b@(Buffer str 0) = b-deleteChar (Buffer str pos) = Buffer (init before ++ after) (pos-1)-  where (before,after) = splitAt pos str+deleteChar (Buffer str pos) = Buffer (T.init before <> after) (pos-1)+  where (before,after) = T.splitAt pos str  moveLeft b@(Buffer str pos) | pos==0 = b                             | otherwise = Buffer str (pos-1) -moveRight b@(Buffer str pos) | pos==length str = b+moveRight b@(Buffer str pos) | pos==T.length str = b                              | otherwise = Buffer str (pos+1)  main = do@@ -139,7 +142,7 @@                 -- This does not appear to get called; the IM handles                 -- unmodified keypresses.                 liftIO $ putStrLn "Literal character not handled by IM"-                returnJust (insertStr [ch])+                returnJust (insertStr $ T.singleton ch)             Nothing -> do                 case keyName of                     "Left" -> returnJust moveLeft
demo/menu/ComboDemo.hs view
@@ -1,12 +1,10 @@+{-# LANGUAGE OverloadedStrings #-} module Main where  import Graphics.UI.Gtk-import Control.Concurrent.MVar-import Control.Monad ( liftM )-import Data.Maybe ( fromMaybe ) import Data.List ( findIndex ) import Control.Monad.IO.Class (MonadIO(..))-+import qualified Data.Text as T  main = do   initGUI@@ -18,7 +16,7 @@   comboBoxSetModelText combo    mapM_ (comboBoxAppendText combo)-    (words "ice-cream turkey pasta sandwich steak")+    (T.words "ice-cream turkey pasta sandwich steak")    -- select the first item   comboBoxSetActive combo 0
demo/menu/Makefile view
@@ -13,6 +13,6 @@ HC_RULE = $(HC) --make $< -o $@ $(HCFLAGS)  clean:-	rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROG)+	rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROGS)  HC=ghc
demo/menu/MenuDemo.hs view
@@ -1,7 +1,6 @@ module Main (main) where  import Graphics.UI.Gtk-import Control.Monad.IO.Class (MonadIO(..))  {-   widgets that go into making a menubar and submenus:
demo/notebook/Notebook.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} -- | Notebook demo (include Spinner animation). --  Author      :  Andy Stewart --  Copyright   :  (c) 2010 Andy Stewart <lazycat.manatee@gmail.com>@@ -7,7 +8,10 @@ import Control.Monad import Control.Monad.IO.Class import Data.Maybe+import Data.Text (Text)+import Data.Monoid ((<>)) import Graphics.UI.Gtk+import qualified Data.Text as T (unpack)  data NotebookTab =     NotebookTab {ntBox          :: HBox@@ -29,7 +33,7 @@   -- Set window.   windowSetDefaultSize window 800 600   windowSetPosition window WinPosCenter-  set window [windowTitle := "Press Ctrl + n to create new tab."]+  set window [windowTitle := ("Press Ctrl + n to create new tab."::Text)]    -- Handle key press action.   window `on` keyPressEvent $ tryEvent $ do@@ -45,7 +49,7 @@           -- Create notebook tab.          tab <- notebookTabNew (Just "Cool tab") Nothing-         menuLabel <- labelNew Nothing+         menuLabel <- labelNew (Nothing :: Maybe Text)           -- Add widgets in notebook.          notebookAppendPageMenu notebook textView (ntBox tab) menuLabel@@ -70,7 +74,7 @@   mainGUI  -- | Create notebook tab.-notebookTabNew :: Maybe String -> Maybe Int -> IO NotebookTab+notebookTabNew :: Maybe Text -> Maybe Int -> IO NotebookTab notebookTabNew name size = do   -- Init.   let iconSize = fromMaybe 12 size@@ -78,7 +82,7 @@   spinner <- spinnerNew   label <- labelNew name   image <- imageNewFromIcon "window-close" iconSize-  closeButton <- toolButtonNew (Just image) Nothing+  closeButton <- toolButtonNew (Just image) (Nothing::Maybe Text)    -- Show.   boxPackStart box label PackNatural 0@@ -88,7 +92,7 @@   return $ NotebookTab box spinner label closeButton iconSize  -- | Set tab name.-notebookTabSetName :: NotebookTab -> String -> IO ()+notebookTabSetName :: NotebookTab -> Text -> IO () notebookTabSetName tab =   labelSetText (ntLabel tab) @@ -109,7 +113,7 @@   spinnerStop spinner  -- | Create image widget with given icon name and size.-imageNewFromIcon :: String -> Int -> IO Image+imageNewFromIcon :: Text -> Int -> IO Image imageNewFromIcon iconName size = do   iconTheme <- iconThemeGetDefault   pixbuf <- do@@ -117,7 +121,7 @@     pixbuf <- iconThemeLoadIcon iconTheme iconName size IconLookupUseBuiltin     case pixbuf of       Just p  -> return p-      Nothing -> error $ "imageNewFromIcon : search icon " ++ iconName ++ " failed."+      Nothing -> error $ "imageNewFromIcon : search icon " <> T.unpack iconName <> " failed."   imageNewFromPixbuf pixbuf  -- | Try to packing widget in box.
demo/overlay/Overlay.hs view
@@ -1,7 +1,6 @@ module Main (main) where  import Graphics.UI.Gtk-import Control.Monad.IO.Class (liftIO)  main :: IO () main = do@@ -21,7 +20,7 @@   set window [ containerChild := overlay ]    vbox <- vBoxNew True 3-  label1 <- labelNew (Just "This is an overlayed label")+  label1 <- labelNew (Just "This is an overlaid label")   button <- buttonNewWithLabel ("another one")   label3 <- labelNew (Just "and a final one")   boxPackStart vbox label1 PackNatural 3@@ -45,8 +44,8 @@                  | button <- [button1, button2, button3] ]    -- This sets button3 to be a so called 'secondary child'. When the layout-  -- stlye is ButtonboxStart or ButtonboxEnd, the secondary children are-  -- grouped seperately from the others. Resize the window to see the effect.+  -- style is ButtonboxStart or ButtonboxEnd, the secondary children are+  -- grouped separately from the others. Resize the window to see the effect.   --   -- This is not interesting in itself but shows how to set child attributes.   -- Note that the child attribute 'buttonBoxChildSecondary' takes the
demo/treelist/Completion.hs view
@@ -66,7 +66,7 @@         return True       set window [containerChild := entry]       widgetShowAll window-      onDestroy window mainQuit+      on window objectDestroy mainQuit       mainGUI  matchFunc :: ListStore ColorDesc -> String -> TreeIter -> IO Bool
demo/treelist/DirList.hs view
@@ -9,18 +9,18 @@ import System.Directory import System.IO import System.Locale-import System.Time+import Data.Time  data FileInfo = FileInfo {   fName :: String,   fSize :: Integer,-  fTime :: ClockTime+  fTime :: UTCTime }  main = do   initGUI   win <- windowNew-  win `onDestroy` mainQuit+  on win objectDestroy mainQuit    curDir <- getCurrentDirectory   files <- getDirectoryContents curDir@@ -73,9 +73,8 @@   time <- New.cellRendererTextNew   New.treeViewColumnPackStart tvc time True   New.cellLayoutSetAttributes tvc time store $ \FileInfo { fTime = time } ->-    [ New.cellText :=> do-        calTime <- toCalendarTime time-        return (formatCalendarTime defaultTimeLocale "%D %T" calTime)+    [ New.cellText :=>+        return (formatTime defaultTimeLocale "%D %T" time)     ]    widgetShowAll win
demo/treelist/FilterDemo.hs view
@@ -16,7 +16,7 @@   initGUI    win <- windowNew-  onDestroy win mainQuit+  on win objectDestroy mainQuit    content <- readFile "FilterDemo.hs" 
demo/treelist/ListDND.hs view
@@ -47,7 +47,7 @@   initGUI    win <- windowNew-  onDestroy win mainQuit+  on win objectDestroy mainQuit    -- create a tag that we use as selection, target and selection type   compTypeTag <- atomNew "_CompType"
demo/treelist/ListTest.glade view
@@ -1,1404 +1,1389 @@-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">--<glade-interface>--<widget class="GtkWindow" id="window">-  <property name="visible">True</property>-  <property name="title" translatable="yes">List Test</property>-  <property name="type">GTK_WINDOW_TOPLEVEL</property>-  <property name="window_position">GTK_WIN_POS_NONE</property>-  <property name="modal">False</property>-  <property name="resizable">True</property>-  <property name="destroy_with_parent">False</property>-  <property name="decorated">True</property>-  <property name="skip_taskbar_hint">False</property>-  <property name="skip_pager_hint">False</property>-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>-  <property name="focus_on_map">True</property>--  <child>-    <widget class="GtkVBox" id="vbox1">-      <property name="visible">True</property>-      <property name="homogeneous">False</property>-      <property name="spacing">0</property>--      <child>-	<widget class="GtkScrolledWindow" id="scrolledwindow1">-	  <property name="visible">True</property>-	  <property name="can_focus">True</property>-	  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>-	  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>-	  <property name="shadow_type">GTK_SHADOW_IN</property>-	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>--	  <child>-	    <widget class="GtkTreeView" id="view">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="headers_visible">True</property>-	      <property name="rules_hint">False</property>-	      <property name="reorderable">False</property>-	      <property name="enable_search">True</property>-	      <property name="fixed_height_mode">False</property>-	      <property name="hover_selection">False</property>-	      <property name="hover_expand">False</property>-	    </widget>-	  </child>-	</widget>-	<packing>-	  <property name="padding">0</property>-	  <property name="expand">True</property>-	  <property name="fill">True</property>-	</packing>-      </child>--      <child>-	<widget class="GtkHBox" id="hbox1">-	  <property name="visible">True</property>-	  <property name="homogeneous">False</property>-	  <property name="spacing">0</property>--	  <child>-	    <widget class="GtkVBox" id="vbox2">-	      <property name="border_width">8</property>-	      <property name="visible">True</property>-	      <property name="homogeneous">False</property>-	      <property name="spacing">12</property>--	      <child>-		<widget class="GtkExpander" id="expander6">-		  <property name="visible">True</property>-		  <property name="can_focus">True</property>-		  <property name="expanded">True</property>-		  <property name="spacing">0</property>--		  <child>-		    <widget class="GtkTable" id="table1">-		      <property name="border_width">2</property>-		      <property name="visible">True</property>-		      <property name="n_rows">3</property>-		      <property name="n_columns">2</property>-		      <property name="homogeneous">False</property>-		      <property name="row_spacing">2</property>-		      <property name="column_spacing">18</property>--		      <child>-			<widget class="GtkSpinButton" id="intValue">-			  <property name="visible">True</property>-			  <property name="can_focus">True</property>-			  <property name="climb_rate">1</property>-			  <property name="digits">0</property>-			  <property name="numeric">True</property>-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			  <property name="snap_to_ticks">True</property>-			  <property name="wrap">False</property>-			  <property name="adjustment">1 0 100 1 10 10</property>-			</widget>-			<packing>-			  <property name="left_attach">1</property>-			  <property name="right_attach">2</property>-			  <property name="top_attach">1</property>-			  <property name="bottom_attach">2</property>-			  <property name="y_options"></property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkCheckButton" id="boolValue">-			  <property name="visible">True</property>-			  <property name="can_focus">True</property>-			  <property name="relief">GTK_RELIEF_NORMAL</property>-			  <property name="focus_on_click">True</property>-			  <property name="active">False</property>-			  <property name="inconsistent">False</property>-			  <property name="draw_indicator">True</property>-			</widget>-			<packing>-			  <property name="left_attach">1</property>-			  <property name="right_attach">2</property>-			  <property name="top_attach">2</property>-			  <property name="bottom_attach">3</property>-			  <property name="x_options">fill</property>-			  <property name="y_options"></property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label2">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">String value:</property>-			  <property name="use_underline">False</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">1</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			  <property name="width_chars">-1</property>-			  <property name="single_line_mode">False</property>-			  <property name="angle">0</property>-			</widget>-			<packing>-			  <property name="left_attach">0</property>-			  <property name="right_attach">1</property>-			  <property name="top_attach">0</property>-			  <property name="bottom_attach">1</property>-			  <property name="y_options"></property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label3">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">Number value:</property>-			  <property name="use_underline">False</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">1</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			  <property name="width_chars">-1</property>-			  <property name="single_line_mode">False</property>-			  <property name="angle">0</property>-			</widget>-			<packing>-			  <property name="left_attach">0</property>-			  <property name="right_attach">1</property>-			  <property name="top_attach">1</property>-			  <property name="bottom_attach">2</property>-			  <property name="y_options"></property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label4">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">Boolean value:</property>-			  <property name="use_underline">False</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">1</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">0</property>-			  <property name="ypad">0</property>-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			  <property name="width_chars">-1</property>-			  <property name="single_line_mode">False</property>-			  <property name="angle">0</property>-			</widget>-			<packing>-			  <property name="left_attach">0</property>-			  <property name="right_attach">1</property>-			  <property name="top_attach">2</property>-			  <property name="bottom_attach">3</property>-			  <property name="y_options"></property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkEntry" id="stringValue">-			  <property name="visible">True</property>-			  <property name="can_focus">True</property>-			  <property name="editable">True</property>-			  <property name="visibility">True</property>-			  <property name="max_length">0</property>-			  <property name="text" translatable="yes"></property>-			  <property name="has_frame">True</property>-			  <property name="invisible_char">*</property>-			  <property name="activates_default">False</property>-			</widget>-			<packing>-			  <property name="left_attach">1</property>-			  <property name="right_attach">2</property>-			  <property name="top_attach">0</property>-			  <property name="bottom_attach">1</property>-			  <property name="x_options">expand|shrink|fill</property>-			  <property name="y_options"></property>-			</packing>-		      </child>-		    </widget>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label29">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">&lt;b&gt;Value&lt;/b&gt;</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">True</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0.5</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="type">label_item</property>-		    </packing>-		  </child>-		</widget>-		<packing>-		  <property name="padding">0</property>-		  <property name="expand">False</property>-		  <property name="fill">False</property>-		</packing>-	      </child>--	      <child>-		<widget class="GtkExpander" id="expander5">-		  <property name="visible">True</property>-		  <property name="can_focus">True</property>-		  <property name="expanded">True</property>-		  <property name="spacing">0</property>--		  <child>-		    <widget class="GtkVBox" id="vbox7">-		      <property name="border_width">4</property>-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkHBox" id="hbox9">-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="insert">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">insert</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label23">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">new entry at</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkSpinButton" id="newIndex">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="climb_rate">1</property>-			      <property name="digits">0</property>-			      <property name="numeric">False</property>-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			      <property name="snap_to_ticks">False</property>-			      <property name="wrap">False</property>-			      <property name="adjustment">1 0 100 1 10 10</property>-			    </widget>-			    <packing>-			      <property name="padding">4</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">True</property>-			  <property name="fill">True</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkHBox" id="hbox7">-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="prepend">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">prepend</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label21">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">new entry</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label30">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes"></property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0.5</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">0</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">True</property>-			  <property name="fill">True</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkHBox" id="hbox8">-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="append">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">append</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label22">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">new entry</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label31">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes"></property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0.5</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">0</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">True</property>-			  <property name="fill">True</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkHBox" id="hbox6">-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="update">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">update</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label20">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">entry</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkSpinButton" id="updateIndex">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="climb_rate">1</property>-			      <property name="digits">0</property>-			      <property name="numeric">False</property>-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			      <property name="snap_to_ticks">False</property>-			      <property name="wrap">False</property>-			      <property name="adjustment">1 0 100 1 10 10</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">True</property>-			  <property name="fill">True</property>-			</packing>-		      </child>-		    </widget>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label28">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">&lt;b&gt;Insert and Update&lt;/b&gt;</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">True</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0.5</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="type">label_item</property>-		    </packing>-		  </child>-		</widget>-		<packing>-		  <property name="padding">0</property>-		  <property name="expand">False</property>-		  <property name="fill">False</property>-		</packing>-	      </child>--	      <child>-		<widget class="GtkExpander" id="expander1">-		  <property name="visible">True</property>-		  <property name="can_focus">True</property>-		  <property name="expanded">True</property>-		  <property name="spacing">0</property>--		  <child>-		    <widget class="GtkVBox" id="vbox8">-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkHBox" id="hbox5">-			  <property name="border_width">4</property>-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="remove">-			      <property name="width_request">54</property>-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">delete</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label19">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">entry</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkSpinButton" id="removeIndex">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="climb_rate">1</property>-			      <property name="digits">0</property>-			      <property name="numeric">False</property>-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			      <property name="snap_to_ticks">False</property>-			      <property name="wrap">False</property>-			      <property name="adjustment">1 0 100 1 10 10</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label32">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes"></property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0.5</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">0</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label33">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes"></property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0.5</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">0</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">True</property>-			  <property name="fill">True</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkHBox" id="hbox10">-			  <property name="border_width">4</property>-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="clear">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">clear</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label34">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">all</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label35">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes"></property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0.5</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">0</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label36">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes"></property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0.5</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">0</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label37">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes"></property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0.5</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">0</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">True</property>-			  <property name="fill">True</property>-			</packing>-		      </child>-		    </widget>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label24">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">&lt;b&gt;Delete&lt;/b&gt;</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">True</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0.5</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="type">label_item</property>-		    </packing>-		  </child>-		</widget>-		<packing>-		  <property name="padding">0</property>-		  <property name="expand">False</property>-		  <property name="fill">False</property>-		</packing>-	      </child>--	      <child>-		<widget class="GtkExpander" id="expander2">-		  <property name="visible">True</property>-		  <property name="can_focus">True</property>-		  <property name="expanded">False</property>-		  <property name="spacing">0</property>--		  <child>-		    <widget class="GtkVBox" id="vbox4">-		      <property name="border_width">4</property>-		      <property name="visible">True</property>-		      <property name="homogeneous">False</property>-		      <property name="spacing">2</property>--		      <child>-			<widget class="GtkHBox" id="hbox3">-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="button18">-			      <property name="width_request">54</property>-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">move</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label15">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">entry</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkSpinButton" id="spinbutton6">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="climb_rate">1</property>-			      <property name="digits">0</property>-			      <property name="numeric">False</property>-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			      <property name="snap_to_ticks">False</property>-			      <property name="wrap">False</property>-			      <property name="adjustment">1 0 100 1 10 10</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label17">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">before</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkSpinButton" id="spinbutton7">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="climb_rate">1</property>-			      <property name="digits">0</property>-			      <property name="numeric">False</property>-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			      <property name="snap_to_ticks">False</property>-			      <property name="wrap">False</property>-			      <property name="adjustment">1 0 100 1 10 10</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkHBox" id="hbox4">-			  <property name="visible">True</property>-			  <property name="homogeneous">True</property>-			  <property name="spacing">0</property>--			  <child>-			    <widget class="GtkButton" id="button19">-			      <property name="width_request">54</property>-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="label" translatable="yes">move</property>-			      <property name="use_underline">True</property>-			      <property name="relief">GTK_RELIEF_NORMAL</property>-			      <property name="focus_on_click">True</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label16">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">entry</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkSpinButton" id="spinbutton5">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="climb_rate">1</property>-			      <property name="digits">0</property>-			      <property name="numeric">False</property>-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			      <property name="snap_to_ticks">False</property>-			      <property name="wrap">False</property>-			      <property name="adjustment">1 0 100 1 10 10</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkLabel" id="label18">-			      <property name="visible">True</property>-			      <property name="label" translatable="yes">after</property>-			      <property name="use_underline">False</property>-			      <property name="use_markup">False</property>-			      <property name="justify">GTK_JUSTIFY_LEFT</property>-			      <property name="wrap">False</property>-			      <property name="selectable">False</property>-			      <property name="xalign">0</property>-			      <property name="yalign">0.5</property>-			      <property name="xpad">4</property>-			      <property name="ypad">0</property>-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			      <property name="width_chars">-1</property>-			      <property name="single_line_mode">False</property>-			      <property name="angle">0</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">False</property>-			      <property name="fill">True</property>-			    </packing>-			  </child>--			  <child>-			    <widget class="GtkSpinButton" id="spinbutton8">-			      <property name="visible">True</property>-			      <property name="can_focus">True</property>-			      <property name="climb_rate">1</property>-			      <property name="digits">0</property>-			      <property name="numeric">False</property>-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			      <property name="snap_to_ticks">False</property>-			      <property name="wrap">False</property>-			      <property name="adjustment">1 0 100 1 10 10</property>-			    </widget>-			    <packing>-			      <property name="padding">0</property>-			      <property name="expand">True</property>-			      <property name="fill">False</property>-			    </packing>-			  </child>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>-		    </widget>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label25">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">&lt;b&gt;Move&lt;/b&gt;</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">True</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0.5</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="type">label_item</property>-		    </packing>-		  </child>-		</widget>-		<packing>-		  <property name="padding">0</property>-		  <property name="expand">False</property>-		  <property name="fill">False</property>-		</packing>-	      </child>--	      <child>-		<widget class="GtkExpander" id="expander3">-		  <property name="visible">True</property>-		  <property name="can_focus">True</property>-		  <property name="expanded">False</property>-		  <property name="spacing">0</property>--		  <child>-		    <widget class="GtkHBox" id="hbox2">-		      <property name="border_width">4</property>-		      <property name="visible">True</property>-		      <property name="homogeneous">True</property>-		      <property name="spacing">0</property>--		      <child>-			<widget class="GtkButton" id="button17">-			  <property name="width_request">54</property>-			  <property name="visible">True</property>-			  <property name="can_focus">True</property>-			  <property name="label" translatable="yes">swap</property>-			  <property name="use_underline">True</property>-			  <property name="relief">GTK_RELIEF_NORMAL</property>-			  <property name="focus_on_click">True</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label14">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">entry</property>-			  <property name="use_underline">False</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">0</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">4</property>-			  <property name="ypad">0</property>-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			  <property name="width_chars">-1</property>-			  <property name="single_line_mode">False</property>-			  <property name="angle">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">True</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkSpinButton" id="spinbutton3">-			  <property name="visible">True</property>-			  <property name="can_focus">True</property>-			  <property name="climb_rate">1</property>-			  <property name="digits">0</property>-			  <property name="numeric">False</property>-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			  <property name="snap_to_ticks">False</property>-			  <property name="wrap">False</property>-			  <property name="adjustment">1 0 100 1 10 10</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkLabel" id="label13">-			  <property name="visible">True</property>-			  <property name="label" translatable="yes">with</property>-			  <property name="use_underline">False</property>-			  <property name="use_markup">False</property>-			  <property name="justify">GTK_JUSTIFY_LEFT</property>-			  <property name="wrap">False</property>-			  <property name="selectable">False</property>-			  <property name="xalign">0</property>-			  <property name="yalign">0.5</property>-			  <property name="xpad">4</property>-			  <property name="ypad">0</property>-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-			  <property name="width_chars">-1</property>-			  <property name="single_line_mode">False</property>-			  <property name="angle">0</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">True</property>-			</packing>-		      </child>--		      <child>-			<widget class="GtkSpinButton" id="spinbutton4">-			  <property name="visible">True</property>-			  <property name="can_focus">True</property>-			  <property name="climb_rate">1</property>-			  <property name="digits">0</property>-			  <property name="numeric">False</property>-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>-			  <property name="snap_to_ticks">False</property>-			  <property name="wrap">False</property>-			  <property name="adjustment">1 0 100 1 10 10</property>-			</widget>-			<packing>-			  <property name="padding">0</property>-			  <property name="expand">False</property>-			  <property name="fill">False</property>-			</packing>-		      </child>-		    </widget>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label26">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">&lt;b&gt;Swap&lt;/b&gt;</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">True</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0.5</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="type">label_item</property>-		    </packing>-		  </child>-		</widget>-		<packing>-		  <property name="padding">0</property>-		  <property name="expand">False</property>-		  <property name="fill">False</property>-		</packing>-	      </child>--	      <child>-		<widget class="GtkExpander" id="expander4">-		  <property name="visible">True</property>-		  <property name="can_focus">True</property>-		  <property name="expanded">False</property>-		  <property name="spacing">0</property>--		  <child>-		    <placeholder/>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label27">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">&lt;b&gt;Reorder&lt;/b&gt;</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">True</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0.5</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="type">label_item</property>-		    </packing>-		  </child>-		</widget>-		<packing>-		  <property name="padding">0</property>-		  <property name="expand">False</property>-		  <property name="fill">False</property>-		</packing>-	      </child>-	    </widget>-	    <packing>-	      <property name="padding">0</property>-	      <property name="expand">False</property>-	      <property name="fill">False</property>-	    </packing>-	  </child>-	</widget>-	<packing>-	  <property name="padding">0</property>-	  <property name="expand">False</property>-	  <property name="fill">True</property>-	</packing>-      </child>-    </widget>-  </child>-</widget>--</glade-interface>+<?xml version="1.0"?>+<!--*- mode: xml -*-->+<interface>+  <object class="GtkAdjustment" id="adjustment1">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment10">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment2">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment3">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment4">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment5">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment6">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment7">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment8">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkAdjustment" id="adjustment9">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkWindow" id="window">+    <property name="visible">True</property>+    <property name="title" translatable="yes">List Test</property>+    <property name="type">GTK_WINDOW_TOPLEVEL</property>+    <property name="window_position">GTK_WIN_POS_NONE</property>+    <property name="modal">False</property>+    <property name="resizable">True</property>+    <property name="destroy_with_parent">False</property>+    <property name="decorated">True</property>+    <property name="skip_taskbar_hint">False</property>+    <property name="skip_pager_hint">False</property>+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>+    <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>+    <property name="focus_on_map">True</property>+    <child>+      <object class="GtkVBox" id="vbox1">+        <property name="visible">True</property>+        <property name="homogeneous">False</property>+        <property name="spacing">0</property>+        <child>+          <object class="GtkScrolledWindow" id="scrolledwindow1">+            <property name="visible">True</property>+            <property name="can_focus">True</property>+            <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>+            <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>+            <property name="shadow_type">GTK_SHADOW_IN</property>+            <property name="window_placement">GTK_CORNER_TOP_LEFT</property>+            <child>+              <object class="GtkTreeView" id="view">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="headers_visible">True</property>+                <property name="rules_hint">False</property>+                <property name="reorderable">False</property>+                <property name="enable_search">True</property>+                <property name="fixed_height_mode">False</property>+                <property name="hover_selection">False</property>+                <property name="hover_expand">False</property>+              </object>+            </child>+          </object>+          <packing>+            <property name="padding">0</property>+            <property name="expand">True</property>+            <property name="fill">True</property>+          </packing>+        </child>+        <child>+          <object class="GtkHBox" id="hbox1">+            <property name="visible">True</property>+            <property name="homogeneous">False</property>+            <property name="spacing">0</property>+            <child>+              <object class="GtkVBox" id="vbox2">+                <property name="border_width">8</property>+                <property name="visible">True</property>+                <property name="homogeneous">False</property>+                <property name="spacing">12</property>+                <child>+                  <object class="GtkExpander" id="expander6">+                    <property name="visible">True</property>+                    <property name="can_focus">True</property>+                    <property name="expanded">True</property>+                    <property name="spacing">0</property>+                    <child>+                      <object class="GtkTable" id="table1">+                        <property name="border_width">2</property>+                        <property name="visible">True</property>+                        <property name="n_rows">3</property>+                        <property name="n_columns">2</property>+                        <property name="homogeneous">False</property>+                        <property name="row_spacing">2</property>+                        <property name="column_spacing">18</property>+                        <child>+                          <object class="GtkSpinButton" id="intValue">+                            <property name="visible">True</property>+                            <property name="can_focus">True</property>+                            <property name="climb_rate">1</property>+                            <property name="digits">0</property>+                            <property name="numeric">True</property>+                            <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                            <property name="snap_to_ticks">True</property>+                            <property name="wrap">False</property>+                            <property name="adjustment">adjustment1</property>+                          </object>+                          <packing>+                            <property name="left_attach">1</property>+                            <property name="right_attach">2</property>+                            <property name="top_attach">1</property>+                            <property name="bottom_attach">2</property>+                            <property name="y_options"/>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkCheckButton" id="boolValue">+                            <property name="visible">True</property>+                            <property name="can_focus">True</property>+                            <property name="relief">GTK_RELIEF_NORMAL</property>+                            <property name="focus_on_click">True</property>+                            <property name="active">False</property>+                            <property name="inconsistent">False</property>+                            <property name="draw_indicator">True</property>+                          </object>+                          <packing>+                            <property name="left_attach">1</property>+                            <property name="right_attach">2</property>+                            <property name="top_attach">2</property>+                            <property name="bottom_attach">3</property>+                            <property name="x_options">fill</property>+                            <property name="y_options"/>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label2">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">String value:</property>+                            <property name="use_underline">False</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">1</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                            <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                            <property name="width_chars">-1</property>+                            <property name="single_line_mode">False</property>+                            <property name="angle">0</property>+                          </object>+                          <packing>+                            <property name="left_attach">0</property>+                            <property name="right_attach">1</property>+                            <property name="top_attach">0</property>+                            <property name="bottom_attach">1</property>+                            <property name="y_options"/>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label3">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">Number value:</property>+                            <property name="use_underline">False</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">1</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                            <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                            <property name="width_chars">-1</property>+                            <property name="single_line_mode">False</property>+                            <property name="angle">0</property>+                          </object>+                          <packing>+                            <property name="left_attach">0</property>+                            <property name="right_attach">1</property>+                            <property name="top_attach">1</property>+                            <property name="bottom_attach">2</property>+                            <property name="y_options"/>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label4">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">Boolean value:</property>+                            <property name="use_underline">False</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">1</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">0</property>+                            <property name="ypad">0</property>+                            <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                            <property name="width_chars">-1</property>+                            <property name="single_line_mode">False</property>+                            <property name="angle">0</property>+                          </object>+                          <packing>+                            <property name="left_attach">0</property>+                            <property name="right_attach">1</property>+                            <property name="top_attach">2</property>+                            <property name="bottom_attach">3</property>+                            <property name="y_options"/>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkEntry" id="stringValue">+                            <property name="visible">True</property>+                            <property name="can_focus">True</property>+                            <property name="editable">True</property>+                            <property name="visibility">True</property>+                            <property name="max_length">0</property>+                            <property name="text" translatable="yes"/>+                            <property name="has_frame">True</property>+                            <property name="invisible_char">*</property>+                            <property name="activates_default">False</property>+                          </object>+                          <packing>+                            <property name="left_attach">1</property>+                            <property name="right_attach">2</property>+                            <property name="top_attach">0</property>+                            <property name="bottom_attach">1</property>+                            <property name="x_options">expand|shrink|fill</property>+                            <property name="y_options"/>+                          </packing>+                        </child>+                      </object>+                    </child>+                    <child type="label">+                      <object class="GtkLabel" id="label29">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">&lt;b&gt;Value&lt;/b&gt;</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">True</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0.5</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                    </child>+                  </object>+                  <packing>+                    <property name="padding">0</property>+                    <property name="expand">False</property>+                    <property name="fill">False</property>+                  </packing>+                </child>+                <child>+                  <object class="GtkExpander" id="expander5">+                    <property name="visible">True</property>+                    <property name="can_focus">True</property>+                    <property name="expanded">True</property>+                    <property name="spacing">0</property>+                    <child>+                      <object class="GtkVBox" id="vbox7">+                        <property name="border_width">4</property>+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkHBox" id="hbox9">+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="insert">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">insert</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label23">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">new entry at</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkSpinButton" id="newIndex">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="climb_rate">1</property>+                                <property name="digits">0</property>+                                <property name="numeric">False</property>+                                <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                                <property name="snap_to_ticks">False</property>+                                <property name="wrap">False</property>+                                <property name="adjustment">adjustment2</property>+                              </object>+                              <packing>+                                <property name="padding">4</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">True</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkHBox" id="hbox7">+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="prepend">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">prepend</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label21">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">new entry</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label30">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes"/>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0.5</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">0</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">True</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkHBox" id="hbox8">+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="append">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">append</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label22">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">new entry</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label31">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes"/>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0.5</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">0</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">True</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkHBox" id="hbox6">+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="update">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">update</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label20">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">entry</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkSpinButton" id="updateIndex">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="climb_rate">1</property>+                                <property name="digits">0</property>+                                <property name="numeric">False</property>+                                <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                                <property name="snap_to_ticks">False</property>+                                <property name="wrap">False</property>+                                <property name="adjustment">adjustment3</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">True</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                    <child type="label">+                      <object class="GtkLabel" id="label28">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">&lt;b&gt;Insert and Update&lt;/b&gt;</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">True</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0.5</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                    </child>+                  </object>+                  <packing>+                    <property name="padding">0</property>+                    <property name="expand">False</property>+                    <property name="fill">False</property>+                  </packing>+                </child>+                <child>+                  <object class="GtkExpander" id="expander1">+                    <property name="visible">True</property>+                    <property name="can_focus">True</property>+                    <property name="expanded">True</property>+                    <property name="spacing">0</property>+                    <child>+                      <object class="GtkVBox" id="vbox8">+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkHBox" id="hbox5">+                            <property name="border_width">4</property>+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="remove">+                                <property name="width_request">54</property>+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">delete</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label19">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">entry</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkSpinButton" id="removeIndex">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="climb_rate">1</property>+                                <property name="digits">0</property>+                                <property name="numeric">False</property>+                                <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                                <property name="snap_to_ticks">False</property>+                                <property name="wrap">False</property>+                                <property name="adjustment">adjustment4</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label32">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes"/>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0.5</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">0</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label33">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes"/>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0.5</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">0</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">True</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkHBox" id="hbox10">+                            <property name="border_width">4</property>+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="clear">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">clear</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label34">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">all</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label35">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes"/>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0.5</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">0</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label36">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes"/>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0.5</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">0</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label37">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes"/>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0.5</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">0</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">True</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                    <child type="label">+                      <object class="GtkLabel" id="label24">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">&lt;b&gt;Delete&lt;/b&gt;</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">True</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0.5</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                    </child>+                  </object>+                  <packing>+                    <property name="padding">0</property>+                    <property name="expand">False</property>+                    <property name="fill">False</property>+                  </packing>+                </child>+                <child>+                  <object class="GtkExpander" id="expander2">+                    <property name="visible">True</property>+                    <property name="can_focus">True</property>+                    <property name="expanded">False</property>+                    <property name="spacing">0</property>+                    <child>+                      <object class="GtkVBox" id="vbox4">+                        <property name="border_width">4</property>+                        <property name="visible">True</property>+                        <property name="homogeneous">False</property>+                        <property name="spacing">2</property>+                        <child>+                          <object class="GtkHBox" id="hbox3">+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="button18">+                                <property name="width_request">54</property>+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">move</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label15">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">entry</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkSpinButton" id="spinbutton6">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="climb_rate">1</property>+                                <property name="digits">0</property>+                                <property name="numeric">False</property>+                                <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                                <property name="snap_to_ticks">False</property>+                                <property name="wrap">False</property>+                                <property name="adjustment">adjustment5</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label17">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">before</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkSpinButton" id="spinbutton7">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="climb_rate">1</property>+                                <property name="digits">0</property>+                                <property name="numeric">False</property>+                                <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                                <property name="snap_to_ticks">False</property>+                                <property name="wrap">False</property>+                                <property name="adjustment">adjustment6</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkHBox" id="hbox4">+                            <property name="visible">True</property>+                            <property name="homogeneous">True</property>+                            <property name="spacing">0</property>+                            <child>+                              <object class="GtkButton" id="button19">+                                <property name="width_request">54</property>+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="label" translatable="yes">move</property>+                                <property name="use_underline">True</property>+                                <property name="relief">GTK_RELIEF_NORMAL</property>+                                <property name="focus_on_click">True</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label16">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">entry</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkSpinButton" id="spinbutton5">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="climb_rate">1</property>+                                <property name="digits">0</property>+                                <property name="numeric">False</property>+                                <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                                <property name="snap_to_ticks">False</property>+                                <property name="wrap">False</property>+                                <property name="adjustment">adjustment7</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkLabel" id="label18">+                                <property name="visible">True</property>+                                <property name="label" translatable="yes">after</property>+                                <property name="use_underline">False</property>+                                <property name="use_markup">False</property>+                                <property name="justify">GTK_JUSTIFY_LEFT</property>+                                <property name="wrap">False</property>+                                <property name="selectable">False</property>+                                <property name="xalign">0</property>+                                <property name="yalign">0.5</property>+                                <property name="xpad">4</property>+                                <property name="ypad">0</property>+                                <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                                <property name="width_chars">-1</property>+                                <property name="single_line_mode">False</property>+                                <property name="angle">0</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">False</property>+                                <property name="fill">True</property>+                              </packing>+                            </child>+                            <child>+                              <object class="GtkSpinButton" id="spinbutton8">+                                <property name="visible">True</property>+                                <property name="can_focus">True</property>+                                <property name="climb_rate">1</property>+                                <property name="digits">0</property>+                                <property name="numeric">False</property>+                                <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                                <property name="snap_to_ticks">False</property>+                                <property name="wrap">False</property>+                                <property name="adjustment">adjustment8</property>+                              </object>+                              <packing>+                                <property name="padding">0</property>+                                <property name="expand">True</property>+                                <property name="fill">False</property>+                              </packing>+                            </child>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                    <child type="label">+                      <object class="GtkLabel" id="label25">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">&lt;b&gt;Move&lt;/b&gt;</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">True</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0.5</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                    </child>+                  </object>+                  <packing>+                    <property name="padding">0</property>+                    <property name="expand">False</property>+                    <property name="fill">False</property>+                  </packing>+                </child>+                <child>+                  <object class="GtkExpander" id="expander3">+                    <property name="visible">True</property>+                    <property name="can_focus">True</property>+                    <property name="expanded">False</property>+                    <property name="spacing">0</property>+                    <child>+                      <object class="GtkHBox" id="hbox2">+                        <property name="border_width">4</property>+                        <property name="visible">True</property>+                        <property name="homogeneous">True</property>+                        <property name="spacing">0</property>+                        <child>+                          <object class="GtkButton" id="button17">+                            <property name="width_request">54</property>+                            <property name="visible">True</property>+                            <property name="can_focus">True</property>+                            <property name="label" translatable="yes">swap</property>+                            <property name="use_underline">True</property>+                            <property name="relief">GTK_RELIEF_NORMAL</property>+                            <property name="focus_on_click">True</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label14">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">entry</property>+                            <property name="use_underline">False</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">0</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">4</property>+                            <property name="ypad">0</property>+                            <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                            <property name="width_chars">-1</property>+                            <property name="single_line_mode">False</property>+                            <property name="angle">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkSpinButton" id="spinbutton3">+                            <property name="visible">True</property>+                            <property name="can_focus">True</property>+                            <property name="climb_rate">1</property>+                            <property name="digits">0</property>+                            <property name="numeric">False</property>+                            <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                            <property name="snap_to_ticks">False</property>+                            <property name="wrap">False</property>+                            <property name="adjustment">adjustment9</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkLabel" id="label13">+                            <property name="visible">True</property>+                            <property name="label" translatable="yes">with</property>+                            <property name="use_underline">False</property>+                            <property name="use_markup">False</property>+                            <property name="justify">GTK_JUSTIFY_LEFT</property>+                            <property name="wrap">False</property>+                            <property name="selectable">False</property>+                            <property name="xalign">0</property>+                            <property name="yalign">0.5</property>+                            <property name="xpad">4</property>+                            <property name="ypad">0</property>+                            <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                            <property name="width_chars">-1</property>+                            <property name="single_line_mode">False</property>+                            <property name="angle">0</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">True</property>+                          </packing>+                        </child>+                        <child>+                          <object class="GtkSpinButton" id="spinbutton4">+                            <property name="visible">True</property>+                            <property name="can_focus">True</property>+                            <property name="climb_rate">1</property>+                            <property name="digits">0</property>+                            <property name="numeric">False</property>+                            <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                            <property name="snap_to_ticks">False</property>+                            <property name="wrap">False</property>+                            <property name="adjustment">adjustment10</property>+                          </object>+                          <packing>+                            <property name="padding">0</property>+                            <property name="expand">False</property>+                            <property name="fill">False</property>+                          </packing>+                        </child>+                      </object>+                    </child>+                    <child type="label">+                      <object class="GtkLabel" id="label26">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">&lt;b&gt;Swap&lt;/b&gt;</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">True</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0.5</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                    </child>+                  </object>+                  <packing>+                    <property name="padding">0</property>+                    <property name="expand">False</property>+                    <property name="fill">False</property>+                  </packing>+                </child>+                <child>+                  <object class="GtkExpander" id="expander4">+                    <property name="visible">True</property>+                    <property name="can_focus">True</property>+                    <property name="expanded">False</property>+                    <property name="spacing">0</property>+                    <child>+                      <placeholder/>+                    </child>+                    <child type="label">+                      <object class="GtkLabel" id="label27">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">&lt;b&gt;Reorder&lt;/b&gt;</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">True</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0.5</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                    </child>+                  </object>+                  <packing>+                    <property name="padding">0</property>+                    <property name="expand">False</property>+                    <property name="fill">False</property>+                  </packing>+                </child>+              </object>+              <packing>+                <property name="padding">0</property>+                <property name="expand">False</property>+                <property name="fill">False</property>+              </packing>+            </child>+          </object>+          <packing>+            <property name="padding">0</property>+            <property name="expand">False</property>+            <property name="fill">True</property>+          </packing>+        </child>+      </object>+    </child>+  </object>+</interface>
demo/treelist/ListTest.hs view
@@ -1,35 +1,36 @@ module Main where  import Graphics.UI.Gtk-import Graphics.UI.Gtk.Glade import Graphics.UI.Gtk.ModelView as New  data Phone = Phone { name :: String, number :: Int, marked :: Bool }  main = do   initGUI-  Just xml <- xmlNew "ListTest.glade" -  win <- xmlGetWidget xml castToWindow "window"-  onDestroy win mainQuit+  gui <- builderNew+  builderAddFromFile gui "ListTest.glade" -  view <- xmlGetWidget xml castToTreeView "view"+  win <- builderGetObject gui castToWindow "window"+  on win objectDestroy mainQuit -  stringValue <- xmlGetWidget xml castToEntry "stringValue"-  intValue    <- xmlGetWidget xml castToSpinButton "intValue"-  boolValue   <- xmlGetWidget xml castToCheckButton "boolValue"+  view <- builderGetObject gui castToTreeView "view" -  insertButton  <- xmlGetWidget xml castToButton "insert"-  prependButton <- xmlGetWidget xml castToButton "prepend"-  appendButton  <- xmlGetWidget xml castToButton "append"-  updateButton  <- xmlGetWidget xml castToButton "update"-  newIndex      <- xmlGetWidget xml castToSpinButton "newIndex"-  updateIndex   <- xmlGetWidget xml castToSpinButton "updateIndex"+  stringValue <- builderGetObject gui castToEntry "stringValue"+  intValue    <- builderGetObject gui castToSpinButton "intValue"+  boolValue   <- builderGetObject gui castToCheckButton "boolValue" -  removeButton  <- xmlGetWidget xml castToButton "remove"-  clearButton   <- xmlGetWidget xml castToButton "clear"-  removeIndex   <- xmlGetWidget xml castToSpinButton "removeIndex"+  insertButton  <- builderGetObject gui castToButton "insert"+  prependButton <- builderGetObject gui castToButton "prepend"+  appendButton  <- builderGetObject gui castToButton "append"+  updateButton  <- builderGetObject gui castToButton "update"+  newIndex      <- builderGetObject gui castToSpinButton "newIndex"+  updateIndex   <- builderGetObject gui castToSpinButton "updateIndex" +  removeButton  <- builderGetObject gui castToButton "remove"+  clearButton   <- builderGetObject gui castToButton "clear"+  removeIndex   <- builderGetObject gui castToSpinButton "removeIndex"+   -- create a new list store   store <- storeImpl   New.treeViewSetModel view store@@ -44,6 +45,8 @@           number = floor number,           marked = marked         }++  let onClicked obj act = on obj buttonActivated $ act    onClicked prependButton $ getValues >>= New.listStorePrepend store   onClicked appendButton $ getValues >>= New.listStoreAppend store >> return ()
demo/treelist/TreeSort.hs view
@@ -57,7 +57,7 @@   -- Create a button that shows information on the current state of the sorting   -- settings.   button <- buttonNewWithLabel "Dump Info"-  button `onClicked` do+  on button buttonActivated $ do     sId <- New.treeViewColumnGetSortColumnId col     putStrLn ("tvc1 sort id is "++show sId)     sId <- New.treeViewColumnGetSortColumnId col'@@ -77,9 +77,10 @@    -- Put it all together.   vBox <- vBoxNew False 3-  boxPackStartDefaults vBox view+  -- boxPackStartDefaults vBox view+  boxPackStart vBox view PackRepel 0   boxPackEnd vBox button PackNatural 0   containerAdd win vBox   widgetShowAll win-  win `onDestroy` mainQuit+  on win objectDestroy mainQuit   mainGUI
demo/treelist/TreeTest.glade view
@@ -1,1108 +1,1040 @@-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">--<glade-interface>--<widget class="GtkWindow" id="window">-  <property name="visible">True</property>-  <property name="title" translatable="yes">Tree Test</property>-  <property name="type">GTK_WINDOW_TOPLEVEL</property>-  <property name="window_position">GTK_WIN_POS_NONE</property>-  <property name="modal">False</property>-  <property name="resizable">True</property>-  <property name="destroy_with_parent">False</property>-  <property name="decorated">True</property>-  <property name="skip_taskbar_hint">False</property>-  <property name="skip_pager_hint">False</property>-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>-  <property name="focus_on_map">True</property>-  <property name="urgency_hint">False</property>--  <child>-    <widget class="GtkVBox" id="vbox1">-      <property name="visible">True</property>-      <property name="homogeneous">False</property>-      <property name="spacing">0</property>--      <child>-	<widget class="GtkScrolledWindow" id="scrolledwindow1">-	  <property name="visible">True</property>-	  <property name="can_focus">True</property>-	  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>-	  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>-	  <property name="shadow_type">GTK_SHADOW_IN</property>-	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>--	  <child>-	    <widget class="GtkTreeView" id="view">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="headers_visible">True</property>-	      <property name="rules_hint">False</property>-	      <property name="reorderable">False</property>-	      <property name="enable_search">True</property>-	      <property name="fixed_height_mode">False</property>-	      <property name="hover_selection">False</property>-	      <property name="hover_expand">False</property>-	    </widget>-	  </child>-	</widget>-	<packing>-	  <property name="padding">0</property>-	  <property name="expand">True</property>-	  <property name="fill">True</property>-	</packing>-      </child>--      <child>-	<widget class="GtkVBox" id="vbox2">-	  <property name="border_width">8</property>-	  <property name="visible">True</property>-	  <property name="homogeneous">False</property>-	  <property name="spacing">12</property>--	  <child>-	    <widget class="GtkExpander" id="expander6">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="expanded">True</property>-	      <property name="spacing">0</property>--	      <child>-		<widget class="GtkTable" id="table1">-		  <property name="border_width">2</property>-		  <property name="visible">True</property>-		  <property name="n_rows">3</property>-		  <property name="n_columns">2</property>-		  <property name="homogeneous">False</property>-		  <property name="row_spacing">4</property>-		  <property name="column_spacing">18</property>--		  <child>-		    <widget class="GtkSpinButton" id="intValue">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="climb_rate">1</property>-		      <property name="digits">0</property>-		      <property name="numeric">True</property>-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>-		      <property name="snap_to_ticks">True</property>-		      <property name="wrap">False</property>-		      <property name="adjustment">1 0 100 1 10 10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkCheckButton" id="boolValue">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		      <property name="active">False</property>-		      <property name="inconsistent">False</property>-		      <property name="draw_indicator">True</property>--		      <child>-			<placeholder/>-		      </child>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">2</property>-		      <property name="bottom_attach">3</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="stringValue">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">expand|shrink|fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label3">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">Number value:</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">1</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options"></property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label2">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">String value:</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">1</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options"></property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label4">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">Boolean value:</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">1</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">0</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">2</property>-		      <property name="bottom_attach">3</property>-		      <property name="x_options"></property>-		      <property name="y_options"></property>-		    </packing>-		  </child>-		</widget>-	      </child>--	      <child>-		<widget class="GtkLabel" id="label29">-		  <property name="visible">True</property>-		  <property name="label" translatable="yes">&lt;b&gt;Value&lt;/b&gt;</property>-		  <property name="use_underline">False</property>-		  <property name="use_markup">True</property>-		  <property name="justify">GTK_JUSTIFY_LEFT</property>-		  <property name="wrap">False</property>-		  <property name="selectable">False</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xpad">0</property>-		  <property name="ypad">0</property>-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		  <property name="width_chars">-1</property>-		  <property name="single_line_mode">False</property>-		  <property name="angle">0</property>-		</widget>-		<packing>-		  <property name="type">label_item</property>-		</packing>-	      </child>-	    </widget>-	    <packing>-	      <property name="padding">0</property>-	      <property name="expand">False</property>-	      <property name="fill">False</property>-	    </packing>-	  </child>--	  <child>-	    <widget class="GtkExpander" id="expander5">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="expanded">True</property>-	      <property name="spacing">0</property>--	      <child>-		<widget class="GtkTable" id="table3">-		  <property name="visible">True</property>-		  <property name="n_rows">2</property>-		  <property name="n_columns">3</property>-		  <property name="homogeneous">False</property>-		  <property name="row_spacing">4</property>-		  <property name="column_spacing">2</property>--		  <child>-		    <widget class="GtkButton" id="insert">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="label" translatable="yes">insert</property>-		      <property name="use_underline">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label23">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">new entry at</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="newPath">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">2</property>-		      <property name="right_attach">3</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkButton" id="update">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="label" translatable="yes">update</property>-		      <property name="use_underline">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label20">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">entry at</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="updatePath">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">2</property>-		      <property name="right_attach">3</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>-		</widget>-	      </child>--	      <child>-		<widget class="GtkLabel" id="label28">-		  <property name="visible">True</property>-		  <property name="label" translatable="yes">&lt;b&gt;Insert and Update&lt;/b&gt;</property>-		  <property name="use_underline">False</property>-		  <property name="use_markup">True</property>-		  <property name="justify">GTK_JUSTIFY_LEFT</property>-		  <property name="wrap">False</property>-		  <property name="selectable">False</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xpad">0</property>-		  <property name="ypad">0</property>-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		  <property name="width_chars">-1</property>-		  <property name="single_line_mode">False</property>-		  <property name="angle">0</property>-		</widget>-		<packing>-		  <property name="type">label_item</property>-		</packing>-	      </child>-	    </widget>-	    <packing>-	      <property name="padding">0</property>-	      <property name="expand">False</property>-	      <property name="fill">False</property>-	    </packing>-	  </child>--	  <child>-	    <widget class="GtkExpander" id="expander1">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="expanded">True</property>-	      <property name="spacing">0</property>--	      <child>-		<widget class="GtkTable" id="table2">-		  <property name="visible">True</property>-		  <property name="n_rows">2</property>-		  <property name="n_columns">3</property>-		  <property name="homogeneous">False</property>-		  <property name="row_spacing">4</property>-		  <property name="column_spacing">2</property>--		  <child>-		    <widget class="GtkButton" id="remove">-		      <property name="width_request">54</property>-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="label" translatable="yes">delete</property>-		      <property name="use_underline">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkButton" id="clear">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="label" translatable="yes">clear</property>-		      <property name="use_underline">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label19">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">entry</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label34">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">all</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="removePath">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">2</property>-		      <property name="right_attach">3</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>-		</widget>-	      </child>--	      <child>-		<widget class="GtkLabel" id="label24">-		  <property name="visible">True</property>-		  <property name="label" translatable="yes">&lt;b&gt;Delete&lt;/b&gt;</property>-		  <property name="use_underline">False</property>-		  <property name="use_markup">True</property>-		  <property name="justify">GTK_JUSTIFY_LEFT</property>-		  <property name="wrap">False</property>-		  <property name="selectable">False</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xpad">0</property>-		  <property name="ypad">0</property>-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		  <property name="width_chars">-1</property>-		  <property name="single_line_mode">False</property>-		  <property name="angle">0</property>-		</widget>-		<packing>-		  <property name="type">label_item</property>-		</packing>-	      </child>-	    </widget>-	    <packing>-	      <property name="padding">0</property>-	      <property name="expand">False</property>-	      <property name="fill">False</property>-	    </packing>-	  </child>--	  <child>-	    <widget class="GtkExpander" id="expander2">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="expanded">False</property>-	      <property name="spacing">0</property>--	      <child>-		<widget class="GtkTable" id="table4">-		  <property name="visible">True</property>-		  <property name="n_rows">2</property>-		  <property name="n_columns">5</property>-		  <property name="homogeneous">False</property>-		  <property name="row_spacing">4</property>-		  <property name="column_spacing">2</property>--		  <child>-		    <widget class="GtkButton" id="button18">-		      <property name="width_request">54</property>-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="label" translatable="yes">move</property>-		      <property name="use_underline">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkButton" id="button19">-		      <property name="width_request">54</property>-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="label" translatable="yes">move</property>-		      <property name="use_underline">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		    </widget>-		    <packing>-		      <property name="left_attach">0</property>-		      <property name="right_attach">1</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label15">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">entry</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label16">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">entry</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">1</property>-		      <property name="right_attach">2</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label17">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">before</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">3</property>-		      <property name="right_attach">4</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label18">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">after</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="left_attach">3</property>-		      <property name="right_attach">4</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="x_options">fill</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="entry4">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">2</property>-		      <property name="right_attach">3</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="entry5">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">4</property>-		      <property name="right_attach">5</property>-		      <property name="top_attach">0</property>-		      <property name="bottom_attach">1</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="entry6">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">2</property>-		      <property name="right_attach">3</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="entry7">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="left_attach">4</property>-		      <property name="right_attach">5</property>-		      <property name="top_attach">1</property>-		      <property name="bottom_attach">2</property>-		      <property name="y_options"></property>-		    </packing>-		  </child>-		</widget>-	      </child>--	      <child>-		<widget class="GtkLabel" id="label25">-		  <property name="visible">True</property>-		  <property name="label" translatable="yes">&lt;b&gt;Move&lt;/b&gt;</property>-		  <property name="use_underline">False</property>-		  <property name="use_markup">True</property>-		  <property name="justify">GTK_JUSTIFY_LEFT</property>-		  <property name="wrap">False</property>-		  <property name="selectable">False</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xpad">0</property>-		  <property name="ypad">0</property>-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		  <property name="width_chars">-1</property>-		  <property name="single_line_mode">False</property>-		  <property name="angle">0</property>-		</widget>-		<packing>-		  <property name="type">label_item</property>-		</packing>-	      </child>-	    </widget>-	    <packing>-	      <property name="padding">0</property>-	      <property name="expand">False</property>-	      <property name="fill">False</property>-	    </packing>-	  </child>--	  <child>-	    <widget class="GtkExpander" id="expander3">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="expanded">False</property>-	      <property name="spacing">0</property>--	      <child>-		<widget class="GtkHBox" id="hbox2">-		  <property name="border_width">4</property>-		  <property name="visible">True</property>-		  <property name="homogeneous">False</property>-		  <property name="spacing">2</property>--		  <child>-		    <widget class="GtkButton" id="button17">-		      <property name="width_request">54</property>-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="label" translatable="yes">swap</property>-		      <property name="use_underline">True</property>-		      <property name="relief">GTK_RELIEF_NORMAL</property>-		      <property name="focus_on_click">True</property>-		    </widget>-		    <packing>-		      <property name="padding">0</property>-		      <property name="expand">False</property>-		      <property name="fill">False</property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label14">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">entry</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="padding">0</property>-		      <property name="expand">False</property>-		      <property name="fill">True</property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="entry8">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="padding">0</property>-		      <property name="expand">True</property>-		      <property name="fill">True</property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkLabel" id="label13">-		      <property name="visible">True</property>-		      <property name="label" translatable="yes">with</property>-		      <property name="use_underline">False</property>-		      <property name="use_markup">False</property>-		      <property name="justify">GTK_JUSTIFY_LEFT</property>-		      <property name="wrap">False</property>-		      <property name="selectable">False</property>-		      <property name="xalign">0</property>-		      <property name="yalign">0.5</property>-		      <property name="xpad">4</property>-		      <property name="ypad">0</property>-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		      <property name="width_chars">-1</property>-		      <property name="single_line_mode">False</property>-		      <property name="angle">0</property>-		    </widget>-		    <packing>-		      <property name="padding">0</property>-		      <property name="expand">False</property>-		      <property name="fill">True</property>-		    </packing>-		  </child>--		  <child>-		    <widget class="GtkEntry" id="entry9">-		      <property name="visible">True</property>-		      <property name="can_focus">True</property>-		      <property name="editable">True</property>-		      <property name="visibility">True</property>-		      <property name="max_length">0</property>-		      <property name="text" translatable="yes"></property>-		      <property name="has_frame">True</property>-		      <property name="invisible_char">*</property>-		      <property name="activates_default">False</property>-		      <property name="width_chars">10</property>-		    </widget>-		    <packing>-		      <property name="padding">0</property>-		      <property name="expand">True</property>-		      <property name="fill">True</property>-		    </packing>-		  </child>-		</widget>-	      </child>--	      <child>-		<widget class="GtkLabel" id="label26">-		  <property name="visible">True</property>-		  <property name="label" translatable="yes">&lt;b&gt;Swap&lt;/b&gt;</property>-		  <property name="use_underline">False</property>-		  <property name="use_markup">True</property>-		  <property name="justify">GTK_JUSTIFY_LEFT</property>-		  <property name="wrap">False</property>-		  <property name="selectable">False</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xpad">0</property>-		  <property name="ypad">0</property>-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		  <property name="width_chars">-1</property>-		  <property name="single_line_mode">False</property>-		  <property name="angle">0</property>-		</widget>-		<packing>-		  <property name="type">label_item</property>-		</packing>-	      </child>-	    </widget>-	    <packing>-	      <property name="padding">0</property>-	      <property name="expand">False</property>-	      <property name="fill">False</property>-	    </packing>-	  </child>--	  <child>-	    <widget class="GtkExpander" id="expander4">-	      <property name="visible">True</property>-	      <property name="can_focus">True</property>-	      <property name="expanded">False</property>-	      <property name="spacing">0</property>--	      <child>-		<placeholder/>-	      </child>--	      <child>-		<widget class="GtkLabel" id="label27">-		  <property name="visible">True</property>-		  <property name="label" translatable="yes">&lt;b&gt;Reorder&lt;/b&gt;</property>-		  <property name="use_underline">False</property>-		  <property name="use_markup">True</property>-		  <property name="justify">GTK_JUSTIFY_LEFT</property>-		  <property name="wrap">False</property>-		  <property name="selectable">False</property>-		  <property name="xalign">0.5</property>-		  <property name="yalign">0.5</property>-		  <property name="xpad">0</property>-		  <property name="ypad">0</property>-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>-		  <property name="width_chars">-1</property>-		  <property name="single_line_mode">False</property>-		  <property name="angle">0</property>-		</widget>-		<packing>-		  <property name="type">label_item</property>-		</packing>-	      </child>-	    </widget>-	    <packing>-	      <property name="padding">0</property>-	      <property name="expand">False</property>-	      <property name="fill">False</property>-	    </packing>-	  </child>-	</widget>-	<packing>-	  <property name="padding">0</property>-	  <property name="expand">False</property>-	  <property name="fill">True</property>-	</packing>-      </child>-    </widget>-  </child>-</widget>--</glade-interface>+<?xml version="1.0"?>+<!--*- mode: xml -*-->+<interface>+  <object class="GtkAdjustment" id="adjustment1">+    <property name="upper">100</property>+    <property name="lower">0</property>+    <property name="page_increment">10</property>+    <property name="step_increment">1</property>+    <property name="page_size">10</property>+    <property name="value">1</property>+  </object>+  <object class="GtkWindow" id="window">+    <property name="visible">True</property>+    <property name="title" translatable="yes">Tree Test</property>+    <property name="type">GTK_WINDOW_TOPLEVEL</property>+    <property name="window_position">GTK_WIN_POS_NONE</property>+    <property name="modal">False</property>+    <property name="resizable">True</property>+    <property name="destroy_with_parent">False</property>+    <property name="decorated">True</property>+    <property name="skip_taskbar_hint">False</property>+    <property name="skip_pager_hint">False</property>+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>+    <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>+    <property name="focus_on_map">True</property>+    <property name="urgency_hint">False</property>+    <child>+      <object class="GtkVBox" id="vbox1">+        <property name="visible">True</property>+        <property name="homogeneous">False</property>+        <property name="spacing">0</property>+        <child>+          <object class="GtkScrolledWindow" id="scrolledwindow1">+            <property name="visible">True</property>+            <property name="can_focus">True</property>+            <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>+            <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>+            <property name="shadow_type">GTK_SHADOW_IN</property>+            <property name="window_placement">GTK_CORNER_TOP_LEFT</property>+            <child>+              <object class="GtkTreeView" id="view">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="headers_visible">True</property>+                <property name="rules_hint">False</property>+                <property name="reorderable">False</property>+                <property name="enable_search">True</property>+                <property name="fixed_height_mode">False</property>+                <property name="hover_selection">False</property>+                <property name="hover_expand">False</property>+              </object>+            </child>+          </object>+          <packing>+            <property name="padding">0</property>+            <property name="expand">True</property>+            <property name="fill">True</property>+          </packing>+        </child>+        <child>+          <object class="GtkVBox" id="vbox2">+            <property name="border_width">8</property>+            <property name="visible">True</property>+            <property name="homogeneous">False</property>+            <property name="spacing">12</property>+            <child>+              <object class="GtkExpander" id="expander6">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="expanded">True</property>+                <property name="spacing">0</property>+                <child>+                  <object class="GtkTable" id="table1">+                    <property name="border_width">2</property>+                    <property name="visible">True</property>+                    <property name="n_rows">3</property>+                    <property name="n_columns">2</property>+                    <property name="homogeneous">False</property>+                    <property name="row_spacing">4</property>+                    <property name="column_spacing">18</property>+                    <child>+                      <object class="GtkSpinButton" id="intValue">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="climb_rate">1</property>+                        <property name="digits">0</property>+                        <property name="numeric">True</property>+                        <property name="update_policy">GTK_UPDATE_ALWAYS</property>+                        <property name="snap_to_ticks">True</property>+                        <property name="wrap">False</property>+                        <property name="adjustment">adjustment1</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkCheckButton" id="boolValue">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                        <property name="active">False</property>+                        <property name="inconsistent">False</property>+                        <property name="draw_indicator">True</property>+                        <child>+                          <placeholder/>+                        </child>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">2</property>+                        <property name="bottom_attach">3</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="stringValue">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">expand|shrink|fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label3">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">Number value:</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">1</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options"/>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label2">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">String value:</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">1</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options"/>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label4">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">Boolean value:</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">1</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">0</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">2</property>+                        <property name="bottom_attach">3</property>+                        <property name="x_options"/>+                        <property name="y_options"/>+                      </packing>+                    </child>+                  </object>+                </child>+                <child type="label">+                  <object class="GtkLabel" id="label29">+                    <property name="visible">True</property>+                    <property name="label" translatable="yes">&lt;b&gt;Value&lt;/b&gt;</property>+                    <property name="use_underline">False</property>+                    <property name="use_markup">True</property>+                    <property name="justify">GTK_JUSTIFY_LEFT</property>+                    <property name="wrap">False</property>+                    <property name="selectable">False</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xpad">0</property>+                    <property name="ypad">0</property>+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                    <property name="width_chars">-1</property>+                    <property name="single_line_mode">False</property>+                    <property name="angle">0</property>+                  </object>+                </child>+              </object>+              <packing>+                <property name="padding">0</property>+                <property name="expand">False</property>+                <property name="fill">False</property>+              </packing>+            </child>+            <child>+              <object class="GtkExpander" id="expander5">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="expanded">True</property>+                <property name="spacing">0</property>+                <child>+                  <object class="GtkTable" id="table3">+                    <property name="visible">True</property>+                    <property name="n_rows">2</property>+                    <property name="n_columns">3</property>+                    <property name="homogeneous">False</property>+                    <property name="row_spacing">4</property>+                    <property name="column_spacing">2</property>+                    <child>+                      <object class="GtkButton" id="insert">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="label" translatable="yes">insert</property>+                        <property name="use_underline">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label23">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">new entry at</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="newPath">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="left_attach">2</property>+                        <property name="right_attach">3</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkButton" id="update">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="label" translatable="yes">update</property>+                        <property name="use_underline">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label20">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">entry at</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="updatePath">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="left_attach">2</property>+                        <property name="right_attach">3</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                  </object>+                </child>+                <child type="label">+                  <object class="GtkLabel" id="label28">+                    <property name="visible">True</property>+                    <property name="label" translatable="yes">&lt;b&gt;Insert and Update&lt;/b&gt;</property>+                    <property name="use_underline">False</property>+                    <property name="use_markup">True</property>+                    <property name="justify">GTK_JUSTIFY_LEFT</property>+                    <property name="wrap">False</property>+                    <property name="selectable">False</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xpad">0</property>+                    <property name="ypad">0</property>+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                    <property name="width_chars">-1</property>+                    <property name="single_line_mode">False</property>+                    <property name="angle">0</property>+                  </object>+                </child>+              </object>+              <packing>+                <property name="padding">0</property>+                <property name="expand">False</property>+                <property name="fill">False</property>+              </packing>+            </child>+            <child>+              <object class="GtkExpander" id="expander1">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="expanded">True</property>+                <property name="spacing">0</property>+                <child>+                  <object class="GtkTable" id="table2">+                    <property name="visible">True</property>+                    <property name="n_rows">2</property>+                    <property name="n_columns">3</property>+                    <property name="homogeneous">False</property>+                    <property name="row_spacing">4</property>+                    <property name="column_spacing">2</property>+                    <child>+                      <object class="GtkButton" id="remove">+                        <property name="width_request">54</property>+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="label" translatable="yes">delete</property>+                        <property name="use_underline">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkButton" id="clear">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="label" translatable="yes">clear</property>+                        <property name="use_underline">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label19">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">entry</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label34">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">all</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="removePath">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="left_attach">2</property>+                        <property name="right_attach">3</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                  </object>+                </child>+                <child type="label">+                  <object class="GtkLabel" id="label24">+                    <property name="visible">True</property>+                    <property name="label" translatable="yes">&lt;b&gt;Delete&lt;/b&gt;</property>+                    <property name="use_underline">False</property>+                    <property name="use_markup">True</property>+                    <property name="justify">GTK_JUSTIFY_LEFT</property>+                    <property name="wrap">False</property>+                    <property name="selectable">False</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xpad">0</property>+                    <property name="ypad">0</property>+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                    <property name="width_chars">-1</property>+                    <property name="single_line_mode">False</property>+                    <property name="angle">0</property>+                  </object>+                </child>+              </object>+              <packing>+                <property name="padding">0</property>+                <property name="expand">False</property>+                <property name="fill">False</property>+              </packing>+            </child>+            <child>+              <object class="GtkExpander" id="expander2">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="expanded">False</property>+                <property name="spacing">0</property>+                <child>+                  <object class="GtkTable" id="table4">+                    <property name="visible">True</property>+                    <property name="n_rows">2</property>+                    <property name="n_columns">5</property>+                    <property name="homogeneous">False</property>+                    <property name="row_spacing">4</property>+                    <property name="column_spacing">2</property>+                    <child>+                      <object class="GtkButton" id="button18">+                        <property name="width_request">54</property>+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="label" translatable="yes">move</property>+                        <property name="use_underline">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkButton" id="button19">+                        <property name="width_request">54</property>+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="label" translatable="yes">move</property>+                        <property name="use_underline">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                      </object>+                      <packing>+                        <property name="left_attach">0</property>+                        <property name="right_attach">1</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label15">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">entry</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label16">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">entry</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">1</property>+                        <property name="right_attach">2</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label17">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">before</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">3</property>+                        <property name="right_attach">4</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label18">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">after</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="left_attach">3</property>+                        <property name="right_attach">4</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="x_options">fill</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="entry4">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="left_attach">2</property>+                        <property name="right_attach">3</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="entry5">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="left_attach">4</property>+                        <property name="right_attach">5</property>+                        <property name="top_attach">0</property>+                        <property name="bottom_attach">1</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="entry6">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="left_attach">2</property>+                        <property name="right_attach">3</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="entry7">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="left_attach">4</property>+                        <property name="right_attach">5</property>+                        <property name="top_attach">1</property>+                        <property name="bottom_attach">2</property>+                        <property name="y_options"/>+                      </packing>+                    </child>+                  </object>+                </child>+                <child type="label">+                  <object class="GtkLabel" id="label25">+                    <property name="visible">True</property>+                    <property name="label" translatable="yes">&lt;b&gt;Move&lt;/b&gt;</property>+                    <property name="use_underline">False</property>+                    <property name="use_markup">True</property>+                    <property name="justify">GTK_JUSTIFY_LEFT</property>+                    <property name="wrap">False</property>+                    <property name="selectable">False</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xpad">0</property>+                    <property name="ypad">0</property>+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                    <property name="width_chars">-1</property>+                    <property name="single_line_mode">False</property>+                    <property name="angle">0</property>+                  </object>+                </child>+              </object>+              <packing>+                <property name="padding">0</property>+                <property name="expand">False</property>+                <property name="fill">False</property>+              </packing>+            </child>+            <child>+              <object class="GtkExpander" id="expander3">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="expanded">False</property>+                <property name="spacing">0</property>+                <child>+                  <object class="GtkHBox" id="hbox2">+                    <property name="border_width">4</property>+                    <property name="visible">True</property>+                    <property name="homogeneous">False</property>+                    <property name="spacing">2</property>+                    <child>+                      <object class="GtkButton" id="button17">+                        <property name="width_request">54</property>+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="label" translatable="yes">swap</property>+                        <property name="use_underline">True</property>+                        <property name="relief">GTK_RELIEF_NORMAL</property>+                        <property name="focus_on_click">True</property>+                      </object>+                      <packing>+                        <property name="padding">0</property>+                        <property name="expand">False</property>+                        <property name="fill">False</property>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label14">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">entry</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="padding">0</property>+                        <property name="expand">False</property>+                        <property name="fill">True</property>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="entry8">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="padding">0</property>+                        <property name="expand">True</property>+                        <property name="fill">True</property>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkLabel" id="label13">+                        <property name="visible">True</property>+                        <property name="label" translatable="yes">with</property>+                        <property name="use_underline">False</property>+                        <property name="use_markup">False</property>+                        <property name="justify">GTK_JUSTIFY_LEFT</property>+                        <property name="wrap">False</property>+                        <property name="selectable">False</property>+                        <property name="xalign">0</property>+                        <property name="yalign">0.5</property>+                        <property name="xpad">4</property>+                        <property name="ypad">0</property>+                        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                        <property name="width_chars">-1</property>+                        <property name="single_line_mode">False</property>+                        <property name="angle">0</property>+                      </object>+                      <packing>+                        <property name="padding">0</property>+                        <property name="expand">False</property>+                        <property name="fill">True</property>+                      </packing>+                    </child>+                    <child>+                      <object class="GtkEntry" id="entry9">+                        <property name="visible">True</property>+                        <property name="can_focus">True</property>+                        <property name="editable">True</property>+                        <property name="visibility">True</property>+                        <property name="max_length">0</property>+                        <property name="text" translatable="yes"/>+                        <property name="has_frame">True</property>+                        <property name="invisible_char">*</property>+                        <property name="activates_default">False</property>+                        <property name="width_chars">10</property>+                      </object>+                      <packing>+                        <property name="padding">0</property>+                        <property name="expand">True</property>+                        <property name="fill">True</property>+                      </packing>+                    </child>+                  </object>+                </child>+                <child type="label">+                  <object class="GtkLabel" id="label26">+                    <property name="visible">True</property>+                    <property name="label" translatable="yes">&lt;b&gt;Swap&lt;/b&gt;</property>+                    <property name="use_underline">False</property>+                    <property name="use_markup">True</property>+                    <property name="justify">GTK_JUSTIFY_LEFT</property>+                    <property name="wrap">False</property>+                    <property name="selectable">False</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xpad">0</property>+                    <property name="ypad">0</property>+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                    <property name="width_chars">-1</property>+                    <property name="single_line_mode">False</property>+                    <property name="angle">0</property>+                  </object>+                </child>+              </object>+              <packing>+                <property name="padding">0</property>+                <property name="expand">False</property>+                <property name="fill">False</property>+              </packing>+            </child>+            <child>+              <object class="GtkExpander" id="expander4">+                <property name="visible">True</property>+                <property name="can_focus">True</property>+                <property name="expanded">False</property>+                <property name="spacing">0</property>+                <child>+                  <placeholder/>+                </child>+                <child type="label">+                  <object class="GtkLabel" id="label27">+                    <property name="visible">True</property>+                    <property name="label" translatable="yes">&lt;b&gt;Reorder&lt;/b&gt;</property>+                    <property name="use_underline">False</property>+                    <property name="use_markup">True</property>+                    <property name="justify">GTK_JUSTIFY_LEFT</property>+                    <property name="wrap">False</property>+                    <property name="selectable">False</property>+                    <property name="xalign">0.5</property>+                    <property name="yalign">0.5</property>+                    <property name="xpad">0</property>+                    <property name="ypad">0</property>+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>+                    <property name="width_chars">-1</property>+                    <property name="single_line_mode">False</property>+                    <property name="angle">0</property>+                  </object>+                </child>+              </object>+              <packing>+                <property name="padding">0</property>+                <property name="expand">False</property>+                <property name="fill">False</property>+              </packing>+            </child>+          </object>+          <packing>+            <property name="padding">0</property>+            <property name="expand">False</property>+            <property name="fill">True</property>+          </packing>+        </child>+      </object>+    </child>+  </object>+</interface>
demo/treelist/TreeTest.hs view
@@ -1,7 +1,6 @@ module Main where  import Graphics.UI.Gtk-import Graphics.UI.Gtk.Glade import Graphics.UI.Gtk.ModelView as New  import qualified Data.Tree as Tree@@ -10,26 +9,28 @@  main = do   initGUI-  Just xml <- xmlNew "TreeTest.glade" -  win <- xmlGetWidget xml castToWindow "window"-  onDestroy win mainQuit+  gui <- builderNew+  builderAddFromFile gui "TreeTest.glade" -  view <- xmlGetWidget xml castToTreeView "view"+  win <- builderGetObject gui castToWindow "window"+  on win objectDestroy mainQuit -  stringValue <- xmlGetWidget xml castToEntry "stringValue"-  intValue    <- xmlGetWidget xml castToSpinButton "intValue"-  boolValue   <- xmlGetWidget xml castToCheckButton "boolValue"+  view <- builderGetObject gui castToTreeView "view" -  insertButton  <- xmlGetWidget xml castToButton "insert"-  updateButton  <- xmlGetWidget xml castToButton "update"-  newPath       <- xmlGetWidget xml castToEntry "newPath"-  updatePath    <- xmlGetWidget xml castToEntry "updatePath"+  stringValue <- builderGetObject gui castToEntry "stringValue"+  intValue    <- builderGetObject gui castToSpinButton "intValue"+  boolValue   <- builderGetObject gui castToCheckButton "boolValue" -  removeButton  <- xmlGetWidget xml castToButton "remove"-  clearButton   <- xmlGetWidget xml castToButton "clear"-  removePath    <- xmlGetWidget xml castToEntry "removePath"+  insertButton  <- builderGetObject gui castToButton "insert"+  updateButton  <- builderGetObject gui castToButton "update"+  newPath       <- builderGetObject gui castToEntry "newPath"+  updatePath    <- builderGetObject gui castToEntry "updatePath" +  removeButton  <- builderGetObject gui castToButton "remove"+  clearButton   <- builderGetObject gui castToButton "clear"+  removePath    <- builderGetObject gui castToEntry "removePath"+   -- create a new list store   store <- storeImpl   New.treeViewSetModel view store@@ -45,22 +46,22 @@           marked = marked         } -  onClicked insertButton $ do+  on insertButton buttonActivated $ do     value <- getValues     path <- fmap read $ get newPath entryText     New.treeStoreInsert store (init path) (last path) value -  onClicked updateButton $ do+  on updateButton buttonActivated $ do     value <- getValues     path <- fmap read $ get updatePath entryText     New.treeStoreSetValue store path value -  onClicked removeButton $ do+  on removeButton buttonActivated $ do     path <- fmap read $ get removePath entryText     New.treeStoreRemove store path     return () -  onClicked clearButton $ New.treeStoreClear store+  on clearButton buttonActivated $ New.treeStoreClear store    New.treeViewSetReorderable view True 
demo/unicode/Arabic.hs view
@@ -1,9 +1,11 @@ -- Example of an international dialog box. import Graphics.UI.Gtk -import Data.Char-import Control.Exception import Control.Applicative+import Prelude+import Data.Char+import qualified Data.Text as T+import Data.Text (Text)  main :: IO () main = do@@ -12,8 +14,8 @@   dialogAddButton dia stockYes ResponseYes   dialogAddButton dia stockNo ResponseNo   contain <- castToBox <$> dialogGetContentArea dia-  theText <- labelNew Nothing-  labelSetMarkup theText arabic+  theText <- labelNew (Nothing :: Maybe Text)+  labelSetMarkup theText (T.pack arabic)   boxPackStart contain theText PackNatural 0   widgetShowAll dia   res <- dialogRun dia@@ -21,7 +23,7 @@     ResponseNo -> yell     _ -> return () -arabic :: Markup+arabic :: String arabic = markSpan [FontSize (SizePoint 36)]  $  --"Is Haskell a "++markSpan [FontForeground "red"] "fantastic"++" language?"++  -- Do you find Haskell a fantastic language? (language has a grammatical
gtk3.cabal view
@@ -1,26 +1,25 @@+cabal-version:  2.2 Name:           gtk3-Version:        0.12.5.7-License:        LGPL-2.1+Version:        0.15.10+License:        LGPL-2.1-only License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team Author:         Axel Simon, Duncan Coutts and many others Maintainer:     gtk2hs-users@lists.sourceforge.net Build-Type:     Custom-Cabal-Version:  >= 1.8 Stability:      provisional homepage:       http://projects.haskell.org/gtk2hs/-bug-reports:    http://hackage.haskell.org/trac/gtk2hs/-Synopsis:       Binding to the Gtk+ graphical user interface library.+bug-reports:    https://github.com/gtk2hs/gtk2hs/issues+Synopsis:       Binding to the Gtk+ 3 graphical user interface library Description: This is the core library of the Gtk2Hs suite of libraries for Haskell              based on Gtk+. Gtk+ is an extensive and mature multi-platform toolkit              for creating graphical user interfaces. Category:       Graphics-Tested-With:    GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.1+Tested-With:    GHC == 9.12.2, GHC == 9.10.1, GHC == 9.8.4, GHC == 9.6.6, GHC == 9.4.8, GHC == 9.2.8, GHC==9.0.2, GHC==8.10.7 Extra-Source-Files: hsgtk.h                     Graphics/UI/Gtk/ModelView/Gtk2HsStore.h                     Graphics/UI/Gtk/General/hsgthread.h                     template-hsc-gtk2hs.h-                    SetupWrapper.hs SetupMain.hs Gtk2HsSetup.hs                     marshal.list                     hierarchy3.list @@ -118,36 +117,36 @@   Description: Depend on GIO package, thereby enabling certain features.   Default:  True -Flag have-quartz-gtk-  Description: Assume that the installed GTK is the version for OS X backend by Quartz, and hence does not provide gdk_x11_drawable_get_xid-  Default:  False- Flag build-demos   Description: Build the demo executables   Default: False  Flag fmode-binary   Description: Set the default file translation mode for file I/O operations to _O_BINARY.-               Some GTK libraries open image files without specifing binary mode.+               Some GTK libraries open image files without specifying binary mode.                If you have trouble loading gtk in ghci, then it may help to turn this                option off.   Default: True +custom-setup+  setup-depends: base >= 4.6 && < 5,+                 Cabal >= 3.0 && < 3.15,+                 gtk2hs-buildtools >= 0.13.2.0 && < 0.14+ Library         build-depends:  base >= 4 && < 5,-                        array, containers, mtl, bytestring,-                        glib  >= 0.12.5.4 && < 0.13,-                        pango >= 0.12.5.3 && < 0.13,-                        cairo >= 0.12.5.3 && < 0.13+                        array < 0.6,+                        bytestring < 0.13,+                        containers < 0.8,+                        mtl < 2.4,+                        text >= 0.11.0.6 && < 2.2,+                        glib  >= 0.13.0.0 && < 0.14,+                        pango >= 0.13.0.0 && < 0.14,+                        cairo >= 0.13.0.0 && < 0.14         if flag(have-gio)-          build-depends: gio >= 0.12.5 && < 0.13+          build-depends: gio >= 0.13.0 && < 0.14           cpp-options:    -DHAVE_GIO-        if flag(have-quartz-gtk)-          cpp-options:    -DHAVE_QUARTZ_GTK -        build-tools:    gtk2hsC2hs >= 0.13.8,-                        gtk2hsHookGenerator, gtk2hsTypeGen-         exposed-modules:           Graphics.UI.Gtk           Graphics.UI.GtkInternals@@ -183,12 +182,14 @@           Graphics.UI.Gtk.Display.Image           Graphics.UI.Gtk.Display.Label           Graphics.UI.Gtk.Display.ProgressBar+          Graphics.UI.Gtk.Display.LevelBar           Graphics.UI.Gtk.Display.Spinner           Graphics.UI.Gtk.Display.Statusbar           Graphics.UI.Gtk.Display.StatusIcon           Graphics.UI.Gtk.Display.InfoBar           Graphics.UI.Gtk.Embedding.Plug           Graphics.UI.Gtk.Embedding.Socket+          Graphics.UI.Gtk.Embedding.Types           Graphics.UI.Gtk.Entry.Editable           Graphics.UI.Gtk.Entry.Entry           Graphics.UI.Gtk.Entry.EntryBuffer@@ -205,6 +206,7 @@           Graphics.UI.Gtk.Gdk.EventM           Graphics.UI.Gtk.Gdk.Events           Graphics.UI.Gtk.Gdk.Gdk+          Graphics.UI.Gtk.Gdk.GLContext           Graphics.UI.Gtk.Gdk.Keys           Graphics.UI.Gtk.Gdk.Pixbuf           Graphics.UI.Gtk.Gdk.PixbufAnimation@@ -226,6 +228,7 @@           Graphics.UI.Gtk.Layout.AspectFrame           Graphics.UI.Gtk.Layout.Expander           Graphics.UI.Gtk.Layout.Fixed+          Graphics.UI.Gtk.Layout.Grid           Graphics.UI.Gtk.Layout.HBox           Graphics.UI.Gtk.Layout.HButtonBox           Graphics.UI.Gtk.Layout.HPaned@@ -236,6 +239,8 @@           Graphics.UI.Gtk.Layout.VBox           Graphics.UI.Gtk.Layout.VButtonBox           Graphics.UI.Gtk.Layout.VPaned+          Graphics.UI.Gtk.Layout.Stack+          Graphics.UI.Gtk.Layout.StackSwitcher           Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem           Graphics.UI.Gtk.MenuComboToolbar.ComboBox           Graphics.UI.Gtk.MenuComboToolbar.ImageMenuItem@@ -260,11 +265,13 @@           Graphics.UI.Gtk.Misc.Arrow           Graphics.UI.Gtk.Misc.Calendar           Graphics.UI.Gtk.Misc.DrawingArea+          Graphics.UI.Gtk.Misc.GLArea           Graphics.UI.Gtk.Misc.EventBox           Graphics.UI.Gtk.Misc.HandleBox           Graphics.UI.Gtk.Misc.IMMulticontext           Graphics.UI.Gtk.Misc.IMContextSimple           Graphics.UI.Gtk.Misc.SizeGroup+          Graphics.UI.Gtk.Misc.Switch           Graphics.UI.Gtk.Misc.Tooltip           Graphics.UI.Gtk.Misc.Viewport           Graphics.UI.Gtk.ModelView@@ -337,6 +344,7 @@           Graphics.UI.Gtk.Windows.OffscreenWindow           Graphics.UI.Gtk.Windows.WindowGroup           Graphics.UI.Gtk.General.Enums+          Graphics.UI.Gtk.Types         other-modules:           Graphics.UI.Gtk.Gdk.Enums           Graphics.UI.Gtk.Gdk.PixbufData@@ -347,10 +355,13 @@           Graphics.UI.Gtk.Abstract.ContainerChildProperties           Graphics.UI.Gtk.General.DNDTypes           Graphics.UI.Gtk.General.Threading-          Graphics.UI.Gtk.Types           Graphics.UI.Gtk.Signals+        autogen-modules:+          Graphics.UI.Gtk.Signals+          Graphics.UI.Gtk.Types -        extensions:     ForeignFunctionInterface+        default-language:   Haskell98+        default-extensions: ForeignFunctionInterface         c-sources: Graphics/UI/Gtk/ModelView/Gtk2HsStore.c                    Graphics/UI/Gtk/General/hsgthread.c           -- Due to http://hackage.haskell.org/trac/ghc/ticket/781@@ -367,20 +378,21 @@         -- needs to be imported from this module:         x-Signals-Import: Graphics.UI.Gtk.General.Threading         include-dirs:   .-        cpp-options: -DDISABLE_DEPRECATED+        cpp-options: -DDISABLE_DEPRECATED -U__BLOCKS__ -DGLIB_DISABLE_DEPRECATION_WARNINGS+        if os(darwin) || os(freebsd)+          cpp-options: -D_Nullable= -D_Nonnull= -D_Noreturn= -D__attribute__(x)=         if os(windows)-          cpp-options:    -DWIN32 -fno-exceptions+          cpp-options:    -DWIN32           cc-options:     -fno-exceptions           extra-libraries: kernel32 +        if os(windows)+          cpp-options: -D__USE_MINGW_ANSI_STDIO=1+         x-c2hs-Header:  hsgtk.h         x-Types-Hierarchy:  hierarchy3.list -        if os(windows) || flag(have-quartz-gtk)-          x-Types-Tag: default-        else-          x-Types-Tag: default plugNsocket-          cpp-options: -DHAVE_PLUG_AND_SOCKET+        x-Types-Tag: default          if os(windows) && flag(fmode-binary)           cc-options: -DGTK2HS_SET_FMODE_BINARY@@ -388,114 +400,130 @@         pkgconfig-depends: gthread-2.0, gtk+-3.0  Executable gtk2hs-demo-actionMenu+    default-language: Haskell98     hs-source-dirs: demo/actionMenu     main-is: ActionMenu.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers, text  Executable gtk2hs-demo-buttonBox+    default-language: Haskell98     hs-source-dirs: demo/buttonbox     main-is: ButtonBox.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers  Executable gtk2hs-demo-carsim+    default-language: Haskell98     hs-source-dirs: demo/carsim     main-is: CarSim.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers, time, cairo+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers, time, cairo  Executable gtk2hs-demo-progress+    default-language: Haskell98     hs-source-dirs: demo/concurrent     main-is: Progress.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers  Executable gtk2hs-demo-progressThreadedRTS+    default-language: Haskell98     hs-source-dirs: demo/concurrent     main-is: ProgressThreadedRTS.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers     ghc-options: -threaded  Executable gtk2hs-demo-fastDraw+    default-language: Haskell98     hs-source-dirs: demo/fastdraw     main-is: FastDraw.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers, array, cairo+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers, array, cairo  Executable gtk2hs-demo-fonts+    default-language: Haskell98     hs-source-dirs: demo/fonts     main-is: Fonts.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base  Executable gtk2hs-demo-builder+    default-language: Haskell98     hs-source-dirs: demo/gtkbuilder     main-is: GtkBuilderTest.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers  Executable gtk2hs-demo-helloworld+    default-language: Haskell98     hs-source-dirs: demo/hello     main-is: World.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers  Executable gtk2hs-demo-layout+    default-language: Haskell98     hs-source-dirs: demo/inputmethod     main-is: Layout.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers, cairo+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers, cairo, text  Executable gtk2hs-demo-menudemo+    default-language: Haskell98     hs-source-dirs: demo/menu     main-is: MenuDemo.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers, text  Executable gtk2hs-demo-combodemo+    default-language: Haskell98     hs-source-dirs: demo/menu     main-is: ComboDemo.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, text, base, transformers  Executable gtk2hs-demo-notebook+    default-language: Haskell98     hs-source-dirs: demo/notebook     main-is: Notebook.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers, text  Executable gtk2hs-demo-statusIcon+    default-language: Haskell98     hs-source-dirs: demo/statusicon     main-is: StatusIcon.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers  Executable gtk2hs-demo-arabic+    default-language: Haskell98     hs-source-dirs: demo/unicode     main-is: Arabic.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers, text  Executable gtk2hs-demo-overlay+    default-language: Haskell98     hs-source-dirs: demo/overlay     main-is: Overlay.hs-    if flag(build-demos)-      buildable: True-    build-depends: gtk3==0.12.5.7, base, transformers+    if !flag(build-demos)+      buildable: False+    build-depends: gtk3, base, transformers
hierarchy3.list view
@@ -10,7 +10,7 @@ # function is not specified, the <name> is converted to # gtk_<name'>_get_type where <name'> is <name> where each upperscore # letter is converted to an underscore and lowerletter. The underscore-# is omitted if an upperscore letter preceeded: GtkHButtonBox ->+# is omitted if an upperscore letter preceded: GtkHButtonBox -> # gtk_hbutton_box_get_type. The generation of a type can be # conditional by appending 'if <tag>'. Such types are only produces if # --tag=<tag> is given on the command line of TypeGenerator.@@ -21,7 +21,7 @@ # * noEq	: do not make this type an instance of Eq; used #		  if a different equality instance is manually #		  defined later-    GObject +    GObject 	    AtkObject 		    GtkAccessible		 	    GdkKeymap				@@ -29,18 +29,20 @@ 	    GdkAppLaunchContext		 	    GtkPrintSettings		 	    GtkPrintOperation		-	    GtkPrintOperationPreview +	    GtkPrintOperationPreview 	    GtkPageSetup			 	    GtkPrintContext			 	    GtkRecentChooser		-	    GtkRecentManager	    +	    GtkRecentManager	         GdkWindow as DrawWindow, gdk_window_get_type         GdkGLPixmap		if gtkglext         GdkGLWindow		if gtkglext+        GdkGLContext    if gtk-3.16 	GdkScreen		 	GdkDisplay		 	GdkVisual 	GdkDevice+	GdkFrameClock           if gtk-3.8         GtkSettings         GtkTextBuffer             GtkSourceBuffer	if sourceview@@ -62,16 +64,18 @@             GtkSourceMark       if gtksourceview2         GtkRecentFilter		         GtkWidget-				GtkHSV as HSV, gtk_hsv_get_type  +				GtkHSV as HSV, gtk_hsv_get_type                 GtkMisc                     GtkLabel                         GtkAccelLabel                     GtkArrow                     GtkImage+                GtkSwitch                 GtkContainer 				    GtkToolPalette		 				    GtkToolItemGroup	-                    WebKitWebView as WebView, webkit_web_view_get_type            if webkit +                    GtkStack                            if gtk-3.10+                    WebKitWebView as WebView, webkit_web_view_get_type            if webkit                     GtkBin                         GtkAlignment                         GtkFrame@@ -101,7 +105,6 @@ 				GtkFileChooserDialog	                                 GtkFontSelectionDialog                                 GtkMessageDialog-                            GtkPlug	if plugNsocket                         GtkEventBox                         GtkHandleBox                         GtkScrolledWindow@@ -116,6 +119,7 @@ 			    GtkSeparatorToolItem	 			GtkMozEmbed		if mozembed 			VteTerminal as Terminal if vte+                        GtkStackSwitcher        if gtk-3.10                     GtkBox                         GtkButtonBox                             GtkHButtonBox@@ -126,9 +130,10 @@                             GtkFontSelection 			    GtkFileChooserWidget	                         GtkHBox-						    GtkInfoBar +						    GtkInfoBar                             GtkFileChooserButton	                             GtkStatusbar+                    GtkGrid                     GtkFixed                     GtkPaned                         GtkHPaned@@ -140,7 +145,6 @@ 						    GtkRecentChooserMenu		                         GtkMenuBar                     GtkNotebook-                    GtkSocket		if plugNsocket                     GtkTable                     GtkTextView                         GtkSourceView	if sourceview@@ -149,6 +153,7 @@                     GtkTreeView                 GtkCalendar                 GtkCellView		+		GtkGLArea if gtk-3.16 		GtkDrawingArea 				GtkSpinner		                 GtkEntry@@ -165,6 +170,7 @@                     GtkVSeparator                 GtkInvisible                 GtkProgressBar+                GtkLevelBar if gtk-3.6         GtkAdjustment         GtkIMContext                 GtkIMMulticontext@@ -178,8 +184,8 @@ 		    GtkCellRendererSpinner		 		GtkCellRendererPixbuf 		GtkCellRendererText-		    GtkCellRendererAccel    -		    GtkCellRendererSpin     +		    GtkCellRendererAccel+		    GtkCellRendererSpin 		    GtkCellRendererCombo	 		GtkCellRendererToggle 		GtkCellRendererProgress	@@ -194,7 +200,7 @@ 	GtkTreeSortable			 	GtkTooltip				 # These are derived from GObject:-  	GtkStatusIcon                   +  	GtkStatusIcon         GtkTreeSelection         GtkTreeModel             GtkTreeStore@@ -222,7 +228,7 @@         GtkSourceLanguageManager	if gtksourceview2 	GladeXML			as GladeXML, glade_xml_get_type if libglade 	GConfClient			as GConf if gconf-# These ones are actualy interfaces, but interface implementations are GObjects+# These ones are actually interfaces, but interface implementations are GObjects 	GtkCellEditable 	GtkEditable 	GtkSourceStyle			as SourceStyleObject if gtksourceview2@@ -331,7 +337,7 @@         GstAdapter                      as Adapter,             gst_adapter_get_type                    if gstreamer         GstController                   as Controller,          gst_controller_get_type                 if gstreamer -        WebKitWebFrame as WebFrame, webkit_web_frame_get_type          if webkit +        WebKitWebFrame as WebFrame, webkit_web_frame_get_type          if webkit         WebKitWebSettings as WebSettings, webkit_web_settings_get_type    if webkit         WebKitNetworkRequest as NetworkRequest, webkit_network_request_get_type  if webkit         WebKitNetworkResponse as NetworkResponse, webkit_network_response_get_type    if webkit
hsgtk.h view
@@ -1,5 +1,5 @@ #include <gtk/gtk.h>-/* these are necessary on Win32 to circumvent the strcuture size check */+/* these are necessary on Win32 to circumvent the structure size check */ #undef gtk_init_check #undef gtk_init @@ -70,3 +70,15 @@ #undef ColormapChangeMask #undef OwnerGrabButtonMask +#undef Status+#undef Expose+#undef Below+#undef GrabSuccess+#undef GrabAlreadyGrabbed+#undef GrabInvalidTime+#undef GrabNotViewable+#undef GrabFrozen+#undef OwnerChangeNewOwner+#undef OwnerChangeDestroy+#undef OwnerChangeClose+#undef NULL
marshal.list view
@@ -14,7 +14,7 @@ #   FLAGS       for flag enumeration types (guint) #   FLOAT       for single-precision float types (gfloat) #   DOUBLE      for double-precision float types (gdouble)-#   STRING      for string types (gchar*)+#   GLIBSTRING  for string types (gchar*) #   BOXED       for boxed (anonymous but reference counted) types (GBoxed*) #   POINTER     for anonymous pointer types (gpointer) #   NONE        deprecated alias for VOID@@ -41,7 +41,7 @@  # If you add a new signal type, please check that it actually works! # If it is a Boxed type check that the reference counting is right.- + BOOLEAN:BOXED BOOLEAN:POINTER BOOLEAN:BOXED,BOXED@@ -51,10 +51,10 @@ #BOOLEAN:ENUM,INT #BOOLEAN:TOBJECT,UINT,FLAGS #BOOLEAN:TOBJECT,INT,INT,UINT-#BOOLEAN:TOBJECT,STRING,STRING,BOXED+#BOOLEAN:TOBJECT,GLIBSTRING,GLIBSTRING,BOXED BOOLEAN:TOBJECT,BOXED #BOOLEAN:TOBJECT,BOXED,BOXED-#BOOLEAN:TOBJECT,STRING,STRING+#BOOLEAN:TOBJECT,GLIBSTRING,GLIBSTRING BOOLEAN:INT,INT BOOLEAN:INT,INT,INT BOOLEAN:UINT@@ -70,15 +70,15 @@ #VOID:INT,BOOLEAN VOID:INT,INT VOID:VOID-#VOID:STRING,INT,POINTER-#STRING:DOUBLE+#VOID:GLIBSTRING,INT,POINTER+#GLIBSTRING:DOUBLE VOID:DOUBLE #VOID:BOOLEAN,BOOLEAN,BOOLEAN VOID:BOXED VOID:BOXED,BOXED VOID:BOXED,BOXED,POINTER VOID:BOXED,TOBJECT-#VOID:BOXED,STRING,INT+#VOID:BOXED,GLIBSTRING,INT VOID:BOXED,UINT #VOID:BOXED,UINT,FLAGS #VOID:BOXED,UINT,UINT@@ -101,7 +101,7 @@ #VOID:TOBJECT,INT,INT #VOID:TOBJECT,INT,INT,BOXED,UINT,UINT VOID:TOBJECT,TOBJECT-#VOID:TOBJECT,STRING,STRING+#VOID:TOBJECT,GLIBSTRING,GLIBSTRING #VOID:TOBJECT,UINT #VOID:TOBJECT,UINT,FLAGS VOID:POINTER@@ -109,14 +109,14 @@ #VOID:POINTER,BOOLEAN #VOID:POINTER,POINTER,POINTER VOID:POINTER,UINT-VOID:STRING+VOID:GLIBSTRING # This is for the "edited" signal in CellRendererText:-VOID:STRING,STRING-#VOID:STRING,INT,POINTER-#VOID:STRING,UINT,FLAGS+VOID:GLIBSTRING,GLIBSTRING+#VOID:GLIBSTRING,INT,POINTER+#VOID:GLIBSTRING,UINT,FLAGS #VOID:UINT,FLAGS,BOXED VOID:UINT,UINT-VOID:UINT,STRING+VOID:UINT,GLIBSTRING #VOID:UINT,BOXED,UINT,FLAGS,FLAGS #VOID:UINT,TOBJECT,UINT,FLAGS,FLAGS @@ -126,9 +126,9 @@ # This one is needed in TextView: VOID:INT,BOOLEAN # This is for the "editing-started" in CellRenderer-VOID:TOBJECT,STRING+VOID:TOBJECT,GLIBSTRING # This is for GtkMozEmbed-BOOLEAN:STRING+BOOLEAN:GLIBSTRING # This makes it possible to catch events on TextTags BOOLEAN:TOBJECT,POINTER,BOXED BOOLEAN:POINTER,BOXED,BOXED@@ -146,19 +146,19 @@ # for Drag.dragFailed BOOLEAN:TOBJECT,ENUM # for TextBuffer-NONE:BOXED,STRING+NONE:BOXED,GLIBSTRING # for Notebook NONE:TOBJECT,INT BOOLEAN:ENUM,BOOLEAN NONE:BOXED,INT # for TextBuffer-NONE:BOXED,STRING+NONE:BOXED,GLIBSTRING # For queryTooltip BOOLEAN:TOBJECT,INT,INT,BOOLEAN,TOBJECT # For EntryBuffer-NONE:INT,STRING,INT+NONE:INT,GLIBSTRING,INT # For CellRendererAccel-NONE:STRING,INT,ENUM,INT+NONE:GLIBSTRING,INT,ENUM,INT # For PrintOperation BOOLEAN:OBJECT NONE:OBJECT,INT,OBJECT