packages feed

gtk 0.12.5.7 → 0.13.0.0

raw patch · 128 files changed

+2448/−2219 lines, 128 filesdep +textdep ~cairodep ~giodep ~glib

Dependencies added: text

Dependency ranges changed: cairo, gio, glib, pango

Files

Graphics/UI/Gtk.chs view
@@ -90,6 +90,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,@@ -342,6 +345,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
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 homogenous 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/ContainerChildProperties.chs view
@@ -42,6 +42,7 @@ 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@@ -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
@@ -72,7 +72,7 @@  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/Widget.chs view
@@ -430,7 +430,6 @@ 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#}@@ -494,7 +493,7 @@   ) import Graphics.UI.Gtk.General.Enums	(StateType(..), TextDirection(..), 					 AccelFlags(..), DirectionType(..), Modifier)-{#import Graphics.Rendering.Pango.Types#} +{#import Graphics.Rendering.Pango.Types#} {#import Graphics.Rendering.Pango.BasicTypes#}	(FontDescription(FontDescription), 					 PangoLayout(PangoLayout), makeNewPangoString ) import Graphics.UI.Gtk.General.StockItems (StockId)@@ -679,8 +678,8 @@ -- user, use 'accelMapAddEntry' and 'widgetSetAccelPath' or -- 'menuItemSetAccelPath' instead. ---widgetAddAccelerator :: WidgetClass self => self- -> String         -- ^ @accelSignal@ - widget signal to emit on accelerator+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@@ -735,8 +734,8 @@ -- accelerators on menu items 'menuItemSetAccelPath' provides a somewhat more -- convenient interface. ---widgetSetAccelPath :: WidgetClass self => self- -> String     -- ^ @accelPath@ - path used to look up the accelerator+widgetSetAccelPath :: (WidgetClass self, GlibString string) => self+ -> string     -- ^ @accelPath@ - path used to look up the accelerator  -> AccelGroup -- ^ @accelGroup@ - a 'AccelGroup'.  -> IO () widgetSetAccelPath self accelPath accelGroup =@@ -801,7 +800,7 @@ widgetHasIntersection :: WidgetClass self => self  -> Rectangle -- ^ @area@ - a rectangle  -> IO Bool   -- ^ returns @True@ if there was an intersection-widgetHasIntersection self area = +widgetHasIntersection self area =   liftM toBool $   with area $ \areaPtr ->   {# call unsafe widget_intersect #}@@ -853,8 +852,8 @@ -- 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+widgetSetName :: (WidgetClass self, GlibString string) => self+ -> string -- ^ @name@ - name for the widget  -> IO () widgetSetName self name =   withUTFString name $ \namePtr ->@@ -865,7 +864,7 @@ -- | Retrieves the name of a widget. See 'widgetSetName' for the significance -- of widget names. ---widgetGetName :: WidgetClass self => self -> IO String+widgetGetName :: (WidgetClass self, GlibString string) => self -> IO string widgetGetName self =   {# call unsafe widget_get_name #}     (toWidget self)@@ -884,7 +883,7 @@   {# call gtk_widget_set_sensitive #}     (toWidget self)     (fromBool sensitive)-                                                        + -- bad spelling backwards compatability definition widgetSetSensitivity :: WidgetClass self => self -> Bool -> IO () widgetSetSensitivity = widgetSetSensitive@@ -985,7 +984,7 @@ -- @widget@ is a part of. If @widget@ has no parent widgets, it will be -- returned as the topmost widget. ---widgetGetToplevel :: WidgetClass self => +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.@@ -1210,7 +1209,7 @@ -- | Sets the default reading direction for widgets where the direction has -- not been explicitly set by 'widgetSetDirection'. ---widgetSetDefaultDirection :: +widgetSetDefaultDirection ::     TextDirection -- ^ @dir@ - the new default direction. This cannot be                   -- 'TextDirNone'.  -> IO ()@@ -1276,7 +1275,7 @@ #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@@ -1289,14 +1288,14 @@ -- | 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. + -> Maybe customWindow -- ^ @customWindow@ a 'Window', or 'Nothing'. allow-none.  -> IO () widgetSetTooltipWindow self customWindow =   {# call gtk_widget_set_tooltip_window #}@@ -1329,16 +1328,16 @@ #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@@ -1346,14 +1345,14 @@ -- 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 = +                  -> IO (Maybe Pixmap) -- ^ returns   'Pixmap' snapshot of the widget+widgetGetSnapshot widget clipRect =   maybeNull (wrapNewGObject mkPixmap) $-  with clipRect $ \ clipRectPtr -> +  with clipRect $ \ clipRectPtr ->   {#call gtk_widget_get_snapshot #}      (toWidget widget)      (castPtr clipRectPtr)@@ -1372,8 +1371,8 @@ -- 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+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 =@@ -1395,8 +1394,8 @@ -- | 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+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 =@@ -1417,8 +1416,8 @@ -- %hash c:769e -- | Obtains the composite name of a widget. ---widgetGetCompositeName :: WidgetClass self => self- -> IO (Maybe String) -- ^ returns the composite name of @widget@, or+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 #}@@ -1661,8 +1660,8 @@ -- > w `onDirectionChanged` update -- > w `onStyleChanged` update ---widgetCreateLayout :: WidgetClass self => self- -> String    -- ^ @text@ - text to set on the layout+widgetCreateLayout :: (WidgetClass self, GlibString string) => self+ -> string    -- ^ @text@ - text to set on the layout  -> IO PangoLayout widgetCreateLayout self text = do   pl <- wrapNewGObject mkPangoLayoutRaw $@@ -1689,10 +1688,10 @@ -- shared with the rest of the -- application and should not be modified. ---widgetRenderIcon :: WidgetClass self => self- -> String            -- ^ @stockId@ - a stock ID+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+ -> 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 =@@ -1832,8 +1831,8 @@ --   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.+widgetSetCompositeName :: (WidgetClass self, GlibString string) => self+ -> string -- ^ @name@ - the name to set.  -> IO () widgetSetCompositeName self name =   withUTFString name $ \namePtr ->@@ -1848,7 +1847,7 @@ -- returns @False@. Widgets that don't support scrolling can be scrolled by -- placing them in a 'Viewport', which does support scrolling. ----- Removed in Gtk3. +-- Removed in Gtk3. widgetSetScrollAdjustments :: WidgetClass self => self  -> Maybe Adjustment -- ^ @hadjustment@ - an adjustment for horizontal scrolling, or                -- @Nothing@@@ -1959,7 +1958,7 @@ -- * Returns the parent container of @widget@ if it has one. -- widgetGetParent :: WidgetClass self => self- -> IO (Maybe Widget) + -> IO (Maybe Widget) widgetGetParent self = do   parentPtr <- {# call gtk_widget_get_parent #} (toWidget self)   if parentPtr==nullPtr then return Nothing else@@ -1991,13 +1990,13 @@                                        -- to use. 'selectionClipboard' gives the                                        -- default clipboard. Another common value                                        -- is 'selectionPrimary', which gives-                                       -- the primary X selection. +                                       -- 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) = +                                   -- be created.+widgetGetClipboard self (Atom tagPtr) =   makeNewGObject mkClipboard $-  {#call gtk_widget_get_clipboard #} +  {#call gtk_widget_get_clipboard #}     (toWidget self)     tagPtr @@ -2306,7 +2305,7 @@ -- widgetGetAllocation :: WidgetClass self => self -> IO Allocation widgetGetAllocation widget =-  alloca $ \ allocationPtr -> do +  alloca $ \ allocationPtr -> do      {#call widget_get_allocation#} (toWidget widget) (castPtr allocationPtr)      peek allocationPtr #endif@@ -2366,7 +2365,7 @@ -- -- Default value: @Nothing@ ---widgetName :: WidgetClass self => Attr self (Maybe String)+widgetName :: (WidgetClass self, GlibString string) => Attr self (Maybe string) widgetName = newAttrFromMaybeStringProperty "name"  widgetMarginLeft :: WidgetClass self => Attr self Int@@ -2565,7 +2564,7 @@ -- | \'compositeName\' property. See 'widgetGetCompositeName' and -- 'widgetSetCompositeName' ---widgetCompositeName :: WidgetClass self => ReadWriteAttr self (Maybe String) String+widgetCompositeName :: (WidgetClass self, GlibString string) => ReadWriteAttr self (Maybe string) string widgetCompositeName = newAttr   widgetGetCompositeName   widgetSetCompositeName@@ -2580,43 +2579,43 @@  -- | 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 :: (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 => Attr self (Maybe String)+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@@ -2624,24 +2623,24 @@  #if GTK_CHECK_VERSION(2,20,0) -- | Determines if the widget style has been looked up through the rc mechanism.-widgetHasRcStyle :: WidgetClass self => self +widgetHasRcStyle :: WidgetClass self => self                  -> IO Bool -- ^ returns 'True' if the widget has been looked up through the rc mechanism, 'False' otherwise.-widgetHasRcStyle self =                 +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 +                  -> 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. +                -> IO Bool  -- ^ returns 'True' if the widget is mapped, 'False' otherwise. widgetGetMapped self =   liftM toBool $   {#call gtk_widget_get_mapped #}@@ -2814,20 +2813,20 @@  -- | 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. +-- 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 -> +  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)@@ -3032,7 +3031,7 @@ 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")@@ -3106,7 +3105,7 @@ grabBrokenEvent :: WidgetClass self => Signal self (EventM EGrabBroken Bool) grabBrokenEvent = Signal (eventM "grab_broken_event" []) #endif-             + -------------------- -- Deprecated Signals and Events @@ -3136,7 +3135,7 @@ 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)@@ -3163,7 +3162,7 @@ -- -- * The widget received a destroy event from the window manager. ---onDestroyEvent, afterDestroyEvent :: WidgetClass w => +onDestroyEvent, afterDestroyEvent :: WidgetClass w => 				     w -> (Event -> IO Bool) -> 				     IO (ConnectId w) onDestroyEvent = event "destroy_event" [] False@@ -3223,7 +3222,7 @@     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" +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.@@ -3302,7 +3301,7 @@ onKeyRelease = event "key_release_event" [KeyReleaseMask] False afterKeyRelease = event "key_release_event" [KeyReleaseMask] True --- | +-- | -- onMnemonicActivate, afterMnemonicActivate :: WidgetClass w => w ->                                              (Bool -> IO Bool) ->@@ -3319,23 +3318,23 @@ --   calling 'Graphics.UI.Gtk.Gdk.DrawWindow.drawWindowGetPointer'. -- onMotionNotify, afterMotionNotify :: WidgetClass w => w -> Bool ->-                                     (Event -> IO Bool) -> +                                     (Event -> IO Bool) ->                                      IO (ConnectId w)-onMotionNotify w hint = event "motion_notify_event" +onMotionNotify w hint = event "motion_notify_event"   (if hint then [PointerMotionMask, PointerMotionHintMask]            else [PointerMotionMask]) False w-afterMotionNotify w hint = event "motion_notify_event" +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@@ -3411,9 +3410,9 @@   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) +  unless (rqPtr==nullPtr) $ poke rqPtr req) --- | +-- | -- onStateChanged, afterStateChanged :: WidgetClass w => w ->                                      (StateType -> IO ()) -> IO (ConnectId w)@@ -3433,17 +3432,17 @@ onUnrealize = connect_NONE__NONE "unrealize" False afterUnrealize = connect_NONE__NONE "unrealize" True --- | +-- | -- onVisibilityNotify, afterVisibilityNotify :: WidgetClass w => w ->                                              (Event -> IO Bool) ->                                              IO (ConnectId w)-onVisibilityNotify = +onVisibilityNotify =   event "visibility_notify_event" [VisibilityNotifyMask] False-afterVisibilityNotify = +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@@ -171,11 +171,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 +196,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 +301,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 +366,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 +379,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 +404,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 +506,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 +515,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, @@ -131,8 +131,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 +145,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 +190,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 +230,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 ()@@ -258,11 +258,11 @@  -- | 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 +284,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 +312,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      } @@ -357,8 +357,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 +382,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 +397,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 +415,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
@@ -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,@@ -103,11 +103,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
@@ -84,15 +84,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 +108,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. @@ -98,11 +98,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,7 +144,7 @@ -- \"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. --@@ -156,14 +156,14 @@ -- @\/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 -- |@@ -375,8 +375,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 +405,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 +422,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 +441,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 +468,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 +506,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 +520,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 +554,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. --@@ -123,10 +123,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 +138,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 +155,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 +176,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 +195,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 +211,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 +235,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.@@ -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 @@ -303,7 +304,7 @@ -- -- 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 +317,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)@@ -497,11 +498,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 +518,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.@@ -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
@@ -103,8 +103,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 +115,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 +145,7 @@       func str   {# call link_button_set_uri_hook #} pfPtr (castFunPtrToPtr pfPtr) destroyFunPtr   freeHaskellFunPtr pfPtr-  + {#pointer LinkButtonUriFunc#}  foreign import ccall "wrapper" mkLinkButtonUriFunc ::@@ -157,19 +157,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.@@ -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
Graphics/UI/Gtk/Buttons/ScaleButton.chs view
@@ -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.@@ -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/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'@@ -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,@@ -185,11 +185,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 +247,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 +290,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 +319,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 +404,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 +443,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@@ -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 -- |@@ -192,6 +193,8 @@   ) where  import Control.Monad    (liftM)+import Data.Text        (Text)+import qualified Data.Text as T (pack)  import System.Glib.FFI import System.Glib.UTFString@@ -203,7 +206,7 @@ {#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.UI.Gtk.General.Enums    (Justification(..), MovementStep (..)) import Graphics.Rendering.Pango.Markup {#import Graphics.Rendering.Pango.BasicTypes#}  (PangoLayout(PangoLayout),                                          makeNewPangoString, PangoString(..) )@@ -213,6 +216,7 @@ import Graphics.Rendering.Pango.Enums   (EllipsizeMode(..)) #endif import Data.IORef ( newIORef )+{#import Graphics.UI.Gtk.Signals#}  {# context lib="gtk" prefix="gtk" #} @@ -222,7 +226,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 +248,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 +267,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 +278,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 +294,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 Emtpy 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 +321,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 +339,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 +353,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 +385,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 +415,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 +434,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 +519,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 +528,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 +621,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 +757,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 +783,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 +799,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 +837,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 +950,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 modifer 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/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@@ -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/StatusIcon.chs view
@@ -209,8 +209,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 +237,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 +265,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 +291,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 +350,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 +376,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 +529,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 +540,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 +555,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 +566,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 +599,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 +610,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 +621,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 +644,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 +652,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 +660,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 +722,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 +736,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 +763,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@@ -142,8 +142,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 +158,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,10 +231,10 @@ -- -- * Available since Gtk+ version 2.22 ---statusbarRemoveAll :: StatusbarClass self => self -                   -> Int -- ^ @contextId@ a context identifier +statusbarRemoveAll :: StatusbarClass self => self+                   -> Int -- ^ @contextId@ a context identifier                    -> IO ()-statusbarRemoveAll self contextId = +statusbarRemoveAll self contextId =   {#call gtk_statusbar_remove_all #}     (toStatusbar self)     (fromIntegral contextId)@@ -261,14 +261,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 +276,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/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)@@ -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@@ -234,7 +234,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 +244,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 +257,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 +270,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 #}@@ -487,26 +487,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 +518,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 +535,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,7 +648,7 @@ -- -- Default value: \"\" ---entryText :: EntryClass self => Attr self String+entryText :: (EntryClass self, GlibString string) => Attr self string entryText = newAttr   entryGetText   entrySetText@@ -695,7 +695,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 +706,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 +738,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 -- 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 +775,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)@@ -798,7 +798,7 @@  -- | 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")
Graphics/UI/Gtk/Entry/EntryBuffer.chs view
@@ -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@@ -205,13 +205,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 +230,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 +252,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 +291,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 +305,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 +334,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 +357,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 +496,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 +560,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 +588,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/Gdk/AppLaunchContext.chs view
@@ -29,7 +29,7 @@ -- * Types   AppLaunchContext,   AppLaunchContextClass,-  castToAppLaunchContext, +  castToAppLaunchContext,   gTypeAppLaunchContext,   toAppLaunchContext, @@ -67,7 +67,7 @@  -- | Creates a new 'AppLaunchContext'. appLaunchContextNew :: IO AppLaunchContext-appLaunchContextNew = +appLaunchContextNew =   wrapNewGObject mkAppLaunchContext $   {# call gdk_app_launch_context_new #} @@ -77,7 +77,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 +96,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 +108,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 +121,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 +132,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,@@ -85,11 +85,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 +122,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'.                                      +--+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
@@ -132,8 +132,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 +156,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
Graphics/UI/Gtk/Gdk/DrawWindow.chs view
@@ -87,7 +87,7 @@   drawWindowGetPointerPos,   drawWindowGetOrigin,   drawWindowSetCursor,-#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK)   drawWindowForeignNew, #endif   drawWindowGetDefaultRootWindow,@@ -601,7 +601,7 @@     self     (fromMaybe (Cursor nullForeignPtr) cursor) -#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK) -- | Get the handle to an exising 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.
Graphics/UI/Gtk/Gdk/EventM.hsc view
@@ -179,6 +179,7 @@  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)@@ -211,11 +212,11 @@ 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 a = ReaderT (Ptr t) IO a  -- | A tag for events that do not carry any event-specific information. data EAny = EAny@@ -242,14 +243,14 @@ data ECrossing = ECrossing  -- | A tag for /Focus/ events.-data EFocus = EFocus      +data EFocus = EFocus  -- | A tag for /Configure/ events. data EConfigure = EConfigure- + -- | A tag for /Property/ events. data EProperty = EProperty-           + -- | A tag for /Proximity/ events. data EProximity = EProximity @@ -478,26 +479,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 +516,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)@@ -569,12 +570,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,7 +590,7 @@  -- | 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.@@ -607,33 +608,33 @@   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 +642,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
@@ -68,6 +68,7 @@  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)@@ -293,7 +294,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.
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,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Pixbuf --@@ -252,7 +253,7 @@ -- * 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 +275,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 +298,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 +331,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 +357,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 =@@ -371,7 +372,7 @@  -- | A string representing an image file format. ---type ImageFormat = String+type ImageFormat = DefaultGlibString  -- constant pixbufGetFormats A list of valid image file formats. --@@ -394,13 +395,13 @@ --   be caught using e.g. 'System.Glib.GError.catchGErrorJust' and one of the --   error codes in 'PixbufError'. ---pixbufSave :: Pixbuf -> FilePath -> ImageFormat -> [(String, String)] ->+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 +443,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@@ -476,7 +477,7 @@ -- > 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` --@@ -502,7 +503,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 +556,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@@ -587,16 +588,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,12 +625,12 @@      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
Graphics/UI/Gtk/Gdk/PixbufAnimation.chs view
@@ -103,12 +103,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/Screen.chs view
@@ -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(..) ) @@ -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 --@@ -232,13 +233,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@@ -361,8 +362,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 +431,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 +543,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/DNDTypes.chs view
@@ -36,14 +36,15 @@   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 )@@ -89,7 +90,7 @@ 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@@ -111,7 +112,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,@@ -68,14 +68,14 @@ #endif   castToDragContext, gTypeDragContext,   toDragContext,-  + -- * Methods #if GTK_MAJOR_VERSION < 3   dragContextActions,   dragContextSuggestedAction,   dragContextAction, #endif-  +   dragDestSet,   dragDestSetProxy,   dragDestUnset,@@ -135,6 +135,7 @@ 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)@@ -151,7 +152,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,@@ -163,7 +164,7 @@  {# context lib="gtk" prefix="gtk" #} -  + -------------------- -- Methods @@ -272,7 +273,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'.@@ -346,9 +347,9 @@ -- implicitely 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 +427,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 +446,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 ()@@ -504,7 +505,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 +529,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 +621,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 +652,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
@@ -41,6 +41,9 @@ #endif   DirectionType(..),   Justification(..),+#if GTK_CHECK_VERSION(3,6,0)+  LevelBarMode(..),+#endif #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED   MatchType(..),@@ -223,6 +226,10 @@ -- | Justification for label and maybe other widgets (text?) -- {#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
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,@@ -81,6 +81,7 @@  import System.Environment (getProgName, getArgs) import Control.Monad      (liftM, mapM, when)+import Control.Applicative ((<$>)) import Control.Concurrent (rtsSupportsBoundThreads, newEmptyMVar,                            putMVar, takeMVar) import Data.IORef         (IORef, newIORef, readIORef, writeIORef)@@ -104,7 +105,7 @@ -- * 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@@ -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	       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. --@@ -104,6 +104,7 @@   ) where  import Control.Monad	(liftM)+import Control.Applicative ((<$>))  import System.Glib.FFI import System.Glib.UTFString@@ -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@@ -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
@@ -37,27 +37,27 @@ -- 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@@ -140,6 +140,7 @@   ) where  import Control.Monad	(liftM)+import Control.Applicative ((<$>))  import System.Glib.FFI import System.Glib.Attributes@@ -186,7 +187,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 +202,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 +233,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 +247,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 +289,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 +300,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 +316,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 +331,7 @@           iconNamePtr           (fromIntegral size)           ((fromIntegral . fromEnum) flags)-  if iiPtr == nullPtr +  if iiPtr == nullPtr      then return Nothing      else liftM Just (mkIconInfo (castPtr iiPtr)) @@ -345,14 +346,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 +361,7 @@           iconNamesPtr           (fromIntegral size)           ((fromIntegral . fromEnum) flags)-  if iiPtr == nullPtr +  if iiPtr == nullPtr      then return Nothing      else liftM Just (mkIconInfo (castPtr iiPtr)) @@ -379,14 +380,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 +406,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 +433,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 +450,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 +460,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 +471,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 +488,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 +519,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 +549,7 @@  -- | Helper function for build 'IconInfo' mkIconInfo :: Ptr IconInfo -> IO IconInfo-mkIconInfo infoPtr = +mkIconInfo infoPtr =   liftM IconInfo $ newForeignPtr infoPtr icon_info_free  --------------------@@ -558,7 +559,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 +572,7 @@ -- | -- iconInfoCopy :: IconInfo -> IO IconInfo-iconInfoCopy self = +iconInfoCopy self =   {# call gtk_icon_info_copy #} self   >>= mkIconInfo @@ -579,14 +580,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 +600,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 +618,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 +645,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 +674,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
@@ -494,7 +494,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 +503,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 +512,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 +540,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 +568,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 +586,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 #}@@ -630,7 +630,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,6 +101,7 @@   ) where  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Flags	(fromFlags) import System.Glib.Signals import System.Glib.GObject@@ -285,7 +286,7 @@ --   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 +305,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 +317,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 +325,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 +334,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 +374,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 +424,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 +432,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 +450,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 +513,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
@@ -100,11 +100,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 +116,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>@@ -184,7 +185,7 @@  -- |  A synonym for a standard button or icon. ---type StockId = String+type StockId = DefaultGlibString   -- Although the structure itself is allocated dynamically, its contents@@ -197,10 +198,10 @@ -- 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)@@ -217,13 +218,13 @@       siStockId  = unsafePerformIO $ peekUTFString' stockId,       siLabel	 = unsafePerformIO $ peekUTFString' label,       -- &%!?$ c2hs and hsc should agree on types-      siModifier = toFlags (fromIntegral modifier), +      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,
Graphics/UI/Gtk/General/Structs.hsc view
@@ -78,7 +78,6 @@ #endif   widgetGetDrawWindow,   widgetGetSize,-  layoutGetDrawWindow,   windowGetFrame, #endif   styleGetForeground,@@ -596,7 +595,8 @@ #if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0) -- | The identifer of a window of the underlying windowing system. ---#ifdef GDK_NATIVE_WINDOW_POINTER+#if defined(GDK_NATIVE_WINDOW_POINTER) && !defined(HAVE_QUARTZ_GTK)+--GDK Quartz also defined GDK_NATIVE_WINDOW_POINTER newtype NativeWindowId = NativeWindowId (Ptr ()) deriving (Eq, Show) unNativeWindowId :: NativeWindowId -> Ptr a unNativeWindowId (NativeWindowId id) = castPtr id@@ -649,14 +649,14 @@ #endif  -- | Get 'NativeWindowId' of 'Drawable'.-#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK) 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)   (\(Drawable drawable) -> #else   (\(DrawWindow drawable) ->@@ -674,7 +674,7 @@ #else      return $ Just (DrawWindow drawable) #endif-#if GTK_MAJOR_VERSION < 3+#if GTK_MAJOR_VERSION < 3 && !defined(HAVE_QUARTZ_GTK)   ) (toDrawable d) #else   ) (toDrawWindow d)@@ -809,16 +809,6 @@     (height :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, height} 				(#{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 
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/Layout.chs view
@@ -63,9 +63,7 @@   layoutGetVAdjustment,   layoutSetHAdjustment,   layoutSetVAdjustment,-#if GTK_MAJOR_VERSION < 3   layoutGetDrawWindow,-#endif  -- * Attributes   layoutHAdjustment,@@ -91,9 +89,6 @@ 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" #}@@ -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. --@@ -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 +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 +afterSwitchPage nb fun = connect_BOXED_WORD__NONE "switch-page"+			 (const $ return ()) True nb 			 (\_ page -> fun (fromIntegral page))  #endif
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.@@ -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 =
Graphics/UI/Gtk/MenuComboToolbar/Combo.chs view
@@ -31,12 +31,12 @@ -- A text entry field with a dropdown list -- -- * Warning: this module is deprecated and should not be used in--- newly-written code. +-- newly-written code. -- -- This module is empty in Gtk3 as Combo has been removed. module Graphics.UI.Gtk.MenuComboToolbar.Combo ( -- * Detail--- +-- -- | The 'Combo' widget consists of a single-line text entry field and a -- drop-down list. The drop-down list is displayed when the user clicks on a -- small arrow button to the right of the entry field.@@ -129,12 +129,12 @@ -- | Insert a set of Strings into the -- 'Combo' drop down list. ---comboSetPopdownStrings :: ComboClass self => self -> [String] -> IO ()+comboSetPopdownStrings :: (ComboClass self, GlibString string) => self -> [string] -> IO () comboSetPopdownStrings self strs = do   list <- comboGetList (toCombo self)   {#call list_clear_items#} list  0 (-1)   mapM_ (\str -> do-    li <- makeNewObject mkWidget $ liftM castPtr $ +    li <- makeNewObject mkWidget $ liftM castPtr $       withUTFString str {#call unsafe list_item_new_with_label#}     widgetShow li     containerAdd list li)
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,6 +162,7 @@   ) where  import Control.Monad    (liftM)+import Data.Text (Text)  import System.Glib.FFI import System.Glib.UTFString@@ -176,14 +178,14 @@                                             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" #} @@ -265,10 +267,12 @@ -- '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 +287,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 +297,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 +309,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 +340,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 +579,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 +594,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 +616,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 +624,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 +637,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 +778,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 +797,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/ComboBoxEntry.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry ( -- * Detail---  +-- -- | A 'ComboBoxEntry' is a widget that allows the user to choose from a list -- of valid choices or enter a different value. It is very similar to a -- 'ComboBox', but it displays the selected value in an entry to allow@@ -85,7 +85,7 @@ #if GTK_CHECK_VERSION(2,6,0)   comboBoxEntryGetActiveText, #endif-  + -- * Attributes   comboBoxEntryTextColumn, #endif@@ -105,7 +105,7 @@ import Graphics.UI.Gtk.ModelView.CellRendererText import Graphics.UI.Gtk.ModelView.CellLayout {#import Graphics.UI.Gtk.ModelView.CustomStore#}-{#import Graphics.UI.Gtk.ModelView.TreeModel#} +{#import Graphics.UI.Gtk.ModelView.TreeModel#} import Graphics.UI.Gtk.ModelView.ListStore ( ListStore, listStoreNew )  {# context lib="gtk" prefix="gtk" #}@@ -132,13 +132,13 @@   combo <- comboBoxEntryNew   comboBoxEntrySetModelText combo   return combo-  + -- | Creates a new 'ComboBoxEntry' which has a 'Entry' as child and a list of -- strings as popup. You can get the 'Entry' from a 'ComboBoxEntry' using -- 'binGetChild'. To add and remove strings from the list, just modify @model@ -- using its data manipulation API. ---comboBoxEntryNewWithModel :: TreeModelClass model => +comboBoxEntryNewWithModel :: TreeModelClass model =>     model        -- ^ @model@ - A 'CustomStore'.  -> IO ComboBoxEntry comboBoxEntryNewWithModel model = do@@ -182,8 +182,8 @@ -- | Sets the model column should be use to get strings from to -- be @textColumn@. ---comboBoxEntrySetTextColumn :: ComboBoxEntryClass self => self- -> ColumnId row String -- ^ @textColumn@ - A column in @model@ to get the strings from.+comboBoxEntrySetTextColumn :: (ComboBoxEntryClass self, GlibString string) => self+ -> ColumnId row string -- ^ @textColumn@ - A column in @model@ to get the strings from.  -> IO () comboBoxEntrySetTextColumn self textColumn =   {# call gtk_combo_box_entry_set_text_column #}@@ -193,8 +193,8 @@ -- %hash c:a3e3 d:6441 -- | Returns the column which is used to get the strings from. ---comboBoxEntryGetTextColumn :: ComboBoxEntryClass self => self- -> IO (ColumnId row String) -- ^ returns A column in the data source model of @entryBox@.+comboBoxEntryGetTextColumn :: (ComboBoxEntryClass self, GlibString string) => self+ -> IO (ColumnId row string) -- ^ returns A column in the data source model of @entryBox@. comboBoxEntryGetTextColumn self =   liftM (makeColumnIdString . fromIntegral) $   {# call gtk_combo_box_entry_get_text_column #}@@ -207,8 +207,8 @@ -- -- * Availabe in Gtk 2.6 or higher. ---comboBoxEntryGetActiveText :: ComboBoxEntryClass self => self-  -> IO (Maybe String)+comboBoxEntryGetActiveText :: (ComboBoxEntryClass self, GlibString string) => self+  -> IO (Maybe string) comboBoxEntryGetActiveText self = do   strPtr <- {# call gtk_combo_box_get_active_text #} (toComboBox self)   if strPtr == nullPtr then return Nothing else liftM Just $@@ -225,7 +225,7 @@ -- -- Default value: 'Graphics.UI.Gtk.ModelView.CustomStore.invalidColumnId' ---comboBoxEntryTextColumn :: ComboBoxEntryClass self => Attr self (ColumnId row String)+comboBoxEntryTextColumn :: (ComboBoxEntryClass self, GlibString string) => Attr self (ColumnId row string) comboBoxEntryTextColumn = newAttr   comboBoxEntryGetTextColumn   comboBoxEntrySetTextColumn
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. --@@ -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
@@ -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.@@ -157,7 +157,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@@ -232,8 +232,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 +244,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 +253,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 +344,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 +412,7 @@ -- -- * Available since Gtk+ version 2.6 ---menuGetForAttachWidget :: WidgetClass widget => +menuGetForAttachWidget :: WidgetClass widget =>     widget                  -- ^ @widget@ - a 'Widget'  -> IO [Menu] menuGetForAttachWidget widget =@@ -430,7 +430,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/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,7 +41,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.MenuItem ( -- * Detail--- +-- -- | The 'MenuItem' widget and the derived widgets are the only valid childs -- for menus. Their function is to correctly handle highlighting, alignment, -- events and submenus.@@ -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)@@ -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/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.@@ -102,10 +102,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 +119,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 +157,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 +179,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 +195,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 +219,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. @@ -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/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@@ -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.@@ -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,@@ -97,12 +97,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 +113,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 +125,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 +139,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 +150,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 +162,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 +183,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.--- +-- -- Default value: 'False' -- -- * Available since Gtk+ version 2.20@@ -200,7 +200,7 @@   newAttrFromBoolProperty "collapsed"  -- | Ellipsize for item group headers.--- +-- -- Default value: EllipsizeNone -- -- * Available since Gtk+ version 2.20@@ -211,7 +211,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 +222,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 +241,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 +251,7 @@   newAttrFromBoolProperty "expand"  -- | Whether the item should fill the available space.--- +-- -- Default value: 'True' -- -- * Available since Gtk+ version 2.20@@ -261,7 +261,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 +271,7 @@   newAttrFromBoolProperty "homogeneous"  -- | Whether the item should start a new row.--- +-- -- Default value: 'False' -- -- * Available since Gtk+ version 2.20@@ -281,9 +281,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/Toolbar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.Toolbar ( -- * Detail--- +-- -- | This widget underwent a signficant overhaul in gtk 2.4 and the -- recommended api changed substantially. The old interface is still supported -- but it is not recommended.@@ -163,7 +163,7 @@  import Control.Monad	(liftM) import Data.Maybe	(fromJust)-+import qualified Data.Text as T (filter) import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes@@ -199,11 +199,11 @@   liftM (castPtr :: Ptr Widget -> Ptr Toolbar) $   {# call unsafe toolbar_new #} --- Make tooltips or not? +-- Make tooltips or not? ---mkToolText :: Maybe (String,String) -> (CString -> CString -> IO a) -> IO a+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 -> +mkToolText (Just (text,private)) fun = withUTFString text $ \txtPtr ->   withUTFString private $ \prvPtr -> fun txtPtr prvPtr  --------------------@@ -221,22 +221,22 @@ -- If you whish 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 +254,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 +268,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 +282,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+  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 +309,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 +323,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,7 +337,7 @@ -- newly-written code. -- -- The @parent@ argument must be set to another--- 'RadioButton' in the group. If @Nothing@ is given, +-- 'RadioButton' in the group. If @Nothing@ is given, -- a new group is generated (which is the desired behavious for the -- first button of a group). --@@ -345,10 +345,10 @@ -- 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@@ -356,13 +356,13 @@   item <- case mItem of     (Just item) -> return item     Nothing	-> liftM fromJust $ stockLookupItem stockMissingImage-  let label = (filter (/= '_')) $ siLabel item+  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 +374,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 +389,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 +406,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 +428,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 +442,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
Graphics/UI/Gtk/Misc/IMContextSimple.chs view
@@ -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/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.@@ -121,8 +121,8 @@ -- | 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 +133,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 +157,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 +175,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 +192,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 +221,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 +231,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/Tooltips.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.Tooltips ( -- * Detail--- +-- -- | Tooltips are the messages that appear next to a widget when the mouse -- pointer is held over it for a short amount of time. They are especially -- helpful for adding more verbose descriptions of things such as buttons in a@@ -140,10 +140,10 @@ -- | Adds a tooltip containing the message @tipText@ to the specified -- 'Widget'. ---tooltipsSetTip :: (TooltipsClass self, WidgetClass widget) => self+tooltipsSetTip :: (TooltipsClass self, WidgetClass widget, GlibString string) => self  -> widget -- ^ @widget@ - the 'Widget' you wish to associate the tip with.- -> String -- ^ @tipText@ - a string containing the tip itself.- -> String -- ^ @tipPrivate@ - a string of any further information that may be+ -> string -- ^ @tipText@ - a string containing the tip itself.+ -> string -- ^ @tipPrivate@ - a string of any further information that may be            -- useful if the user gets stuck.  -> IO () tooltipsSetTip self widget tipText tipPrivate =@@ -159,7 +159,7 @@  -- | Retrieves any 'Tooltips' previously associated with the given widget. ---tooltipsDataGet :: WidgetClass w => w -> IO (Maybe (Tooltips, String, String))+tooltipsDataGet :: (WidgetClass w, GlibString string) => w -> IO (Maybe (Tooltips, string, string)) tooltipsDataGet w = do   tipDataPtr <- {#call unsafe tooltips_data_get#} (toWidget w)   if tipDataPtr == nullPtr
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,6 +114,7 @@   ) where  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes ( Attr, WriteAttr ) import System.Glib.Properties {#import Graphics.UI.Gtk.Types#}@@ -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@@ -328,7 +329,7 @@ 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
@@ -76,6 +76,7 @@ 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,6 +73,7 @@ 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)@@ -88,7 +89,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 +113,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
@@ -75,6 +75,7 @@ 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)@@ -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
@@ -62,6 +62,7 @@ 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)@@ -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/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.@@ -121,6 +121,7 @@ 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)@@ -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'.@@ -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@@ -370,7 +371,7 @@ -- | 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.@@ -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 =>+internalEdited :: (CellRendererTextClass cr, GlibString string) => 		  Bool -> cr ->-                  (TreePath -> String -> IO ()) ->+                  (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.@@ -76,6 +76,7 @@ import Control.Monad	(liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.Attributes                   (Attr) import System.Glib.Properties			(newAttrFromBoolProperty, 						 newAttrFromIntProperty)@@ -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.@@ -98,8 +98,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 +111,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 +123,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 +193,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/IconView.chs view
@@ -145,6 +145,7 @@ 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)@@ -160,7 +161,6 @@ {#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 +222,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 +232,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 +255,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 #}@@ -592,7 +592,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@@ -833,8 +833,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 +847,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 +892,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 +905,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 +1012,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
@@ -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,@@ -101,7 +102,7 @@                                              Just (TreeIter 0 (fromIntegral n) 0 0)),       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",@@ -175,6 +176,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 +209,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 ()@@ -248,7 +258,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) -} 
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,6 +57,7 @@ -- 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,@@ -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
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, @@ -197,7 +198,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 +220,8 @@  instance Show (ColumnId row ty) where   show (ColumnId _ _ i) = show i-   + -------------------- -- Methods @@ -242,8 +243,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 +314,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 +439,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 +583,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/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@@ -296,7 +296,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@@ -471,9 +471,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,7 +609,7 @@  -- | Scroll to a cell. ----- * Scroll to a cell as specified by @path@ and @tvc@. +-- * 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@@ -626,10 +626,10 @@     (toTreeView self)     path     column-    1 +    1     (realToFrac ver)     (realToFrac hor)-treeViewScrollToCell self path column Nothing = +treeViewScrollToCell self path column Nothing =   withTreePath path $ \path ->   {# call tree_view_scroll_to_cell #}     (toTreeView self)@@ -645,7 +645,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@@ -908,7 +908,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 +926,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 +942,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)@@ -970,7 +970,7 @@ -- newly-written code. Due to historial 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. --@@ -995,7 +995,7 @@ -- newly-written code. Due to historial 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 +1021,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 +1038,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 +1056,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 +1073,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 +1090,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 +1107,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 +1168,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 +1187,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 +1204,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@@ -1342,7 +1342,7 @@     startPath <- fromTreePath startTPPtr     endPath <- fromTreePath endTPPtr     return (startPath, endPath)-    + #endif  #if GTK_CHECK_VERSION(2,10,0)@@ -1471,7 +1471,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 +1608,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@@ -1697,7 +1697,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@@ -1829,7 +1829,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,9 +1918,9 @@ onRowActivated, afterRowActivated :: TreeViewClass self => self  -> (TreePath -> TreeViewColumn -> IO ())  -> IO (ConnectId self)-onRowActivated = connect_BOXED_OBJECT__NONE "row_activated" +onRowActivated = connect_BOXED_OBJECT__NONE "row_activated" 		   readNTP False-afterRowActivated = connect_BOXED_OBJECT__NONE "row_activated" +afterRowActivated = connect_BOXED_OBJECT__NONE "row_activated" 		      readNTP True  -- | Children of this node were hidden.@@ -1948,7 +1948,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 +1962,7 @@  onStartInteractiveSearch =   connect_NONE__NONE "start_interactive_search" False-afterStartInteractiveSearch = +afterStartInteractiveSearch =   connect_NONE__NONE "start_interactive_search" True  #endif
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@@ -151,7 +151,7 @@ -- | Generate a new TreeViewColumn widget. -- treeViewColumnNew :: IO TreeViewColumn-treeViewColumnNew  = makeNewObject mkTreeViewColumn +treeViewColumnNew  = makeNewObject mkTreeViewColumn   {# call tree_view_column_new #}  @@ -347,7 +347,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 +356,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 +392,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 +442,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 +666,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,4 +1,7 @@+{-# LANGUAGE GADTs #-} {-# LANGUAGE MagicHash #-}+{-# LANGUAGE Rank2Types #-}+{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK hide #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) CustomStore TreeModel@@ -33,18 +36,18 @@   TypedTreeModelClass,   toTypedTreeModel,   unsafeTreeModelToGeneric,-  +   TypedTreeModelSort(..),   unsafeTreeModelSortToGeneric,   TypedTreeModelFilter(..),   unsafeTreeModelFilterToGeneric,-  +   -- TreeIter   TreeIter(..),   receiveTreeIter,   peekTreeIter,   treeIterSetStamp,-  +   -- TreePath   TreePath,   NativeTreePath(..),@@ -53,18 +56,19 @@   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,@@ -221,10 +225,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 +240,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.@@ -261,9 +261,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 +293,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 +323,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 +359,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 +470,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 +487,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 +509,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 +622,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 +857,7 @@     iter     (fromIntegral charOffset)   return iter-  + -- | Create an iterator at a specific line. -- textBufferGetIterAtLine :: TextBufferClass self => self@@ -1171,7 +1171,7 @@     (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@@ -1185,7 +1185,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 +1204,7 @@ -- -- Default value: \"\" ---textBufferText :: TextBufferClass self => Attr self String+textBufferText :: (TextBufferClass self, GlibString string) => Attr self string textBufferText = newAttrFromStringProperty "text" #endif @@ -1221,7 +1221,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 +1256,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 +1272,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 +1290,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 +1311,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 +1367,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 +1410,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 (@@ -216,7 +216,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 +228,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 +239,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 +250,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 +265,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 +330,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 +375,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 +392,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 +435,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 +467,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,14 +488,14 @@ -- 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.@@ -503,7 +503,7 @@ -- * Retuns 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.@@ -511,7 +511,7 @@ -- * Retuns 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@@ -525,7 +525,7 @@ -- 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@@ -535,7 +535,7 @@ --   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)  @@ -548,7 +548,7 @@ --   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.@@ -560,7 +560,7 @@ --   of the buffer. -- textIterBackwardLine :: TextIter -> IO Bool-textIterBackwardLine ti = liftM toBool $ +textIterBackwardLine ti = liftM toBool $   {#call unsafe text_iter_backward_line#} ti  @@ -576,7 +576,7 @@ -- * @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@@ -591,7 +591,7 @@ -- * @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@@ -600,7 +600,7 @@ -- * Retuns 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@@ -609,7 +609,7 @@ -- * Retuns 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@@ -618,7 +618,7 @@ -- * Retuns 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@@ -627,7 +627,7 @@ -- * Retuns 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@@ -663,7 +663,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,7 +673,7 @@ --   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)  @@ -683,7 +683,7 @@ -- * Retuns 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@@ -692,7 +692,7 @@ -- * Retuns 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@@ -701,7 +701,7 @@ -- * Retuns 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@@ -710,14 +710,14 @@ -- * Retuns 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 +727,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 +738,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 +775,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,7 +787,7 @@ -- 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.@@ -811,7 +811,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 +828,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 +842,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 +862,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 +946,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   -- ^ @couter@ - 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 +957,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   -- ^ @couter@ - 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   -- ^ @couter@ - 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   -- ^ @couter@ - 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 #}@@ -1048,23 +1048,23 @@     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
@@ -95,7 +95,7 @@ {# context lib="gtk" prefix="gtk" #}  -- | The name of a mark.-type MarkName = String+type MarkName = DefaultGlibString  -------------------- -- Constructors
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.@@ -157,6 +157,7 @@ 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)@@ -176,7 +177,7 @@  {# context lib="gtk" prefix="gtk" #} -type TagName = String+type TagName = DefaultGlibString  -------------------- -- Constructors@@ -188,13 +189,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,13 +239,13 @@  -- | 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 =@@ -266,14 +267,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 +295,7 @@ -- | Whether this tag affects background height. -- -- Default value: @False@--- +-- textTagBackgroundFullHeightSet :: TextTagClass self => Attr self Bool textTagBackgroundFullHeightSet = newAttrFromBoolProperty "background-full-height-set" @@ -314,7 +315,7 @@   {# call pure unsafe gdk_pixmap_get_type #}  -- | Whether this tag affects the background stipple.--- +-- -- Default value: @False@ -- -- Removed in Gtk3.@@ -326,11 +327,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 +353,7 @@   {# call pure unsafe gdk_pixmap_get_type #}  -- | Whether this tag affects the foreground stipple.--- +-- -- Default value: @False@ -- -- Removed in Gtk3.@@ -376,7 +377,7 @@ textTagEditable = newAttrFromBoolProperty "editable"  -- | Whether this tag affects text editability.--- +-- -- Default value: @False@ -- textTagEditableSet :: TextTagClass self => Attr self Bool@@ -386,7 +387,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 +401,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 +420,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 +430,7 @@ -- textTagTabs :: TextTagClass self => Attr self TabArray  -- | Whether this tag affects tabs.--- +-- -- Default value: @False@ -- textTagTabsSet :: TextTagClass self => Attr self Bool@@ -444,7 +445,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 +462,7 @@ textTagWeight = newAttrFromIntProperty "weight"  -- | Whether this tag affects the font weight.--- +-- -- Default value: @False@ -- textTagWeightSet :: TextTagClass self => Attr self Bool@@ -489,7 +490,7 @@ textTagSize = newAttrFromIntProperty "size"  -- | Whether this tag affects the font size.--- +-- -- Default value: @False@ -- textTagSizeSet :: TextTagClass self => Attr self Bool@@ -506,7 +507,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 +531,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 +543,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 +563,7 @@ textTagLeftMargin = newAttrFromIntProperty "left-margin"  -- | Whether this tag affects the left margin.--- +-- -- Default value: @False@ -- textTagLeftMarginSet :: TextTagClass self => Attr self Bool@@ -578,7 +579,7 @@ textTagRightMargin = newAttrFromIntProperty "right-margin"  -- | Whether this tag affects the right margin.--- +-- -- Default value: @False@ -- textTagRightMarginSet :: TextTagClass self => Attr self Bool@@ -592,7 +593,7 @@ textTagIndent = newAttrFromIntProperty "indent"  -- | Whether this tag affects indentation.--- +-- -- Default value: @False@ -- textTagIndentSet :: TextTagClass self => Attr self Bool@@ -620,7 +621,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 +637,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 +653,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 +667,7 @@ textTagStrikethrough = newAttrFromBoolProperty "strikethrough"  -- | Whether this tag affects strikethrough.--- +-- -- Default value: @False@ -- textTagStrikethroughSet :: TextTagClass self => Attr self Bool@@ -681,7 +682,7 @@   {# call pure unsafe pango_underline_get_type #}  -- | Whether this tag affects underlining.--- +-- -- Default value: @False@ -- textTagUnderlineSet :: TextTagClass self => Attr self Bool@@ -697,7 +698,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 +717,7 @@ textTagInvisible = newAttrFromBoolProperty "invisible"  -- | Whether this tag affects text visibility.--- +-- -- Default value: @False@ -- textTagInvisibleSet :: TextTagClass self => Attr self Bool@@ -726,11 +727,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 +740,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
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.@@ -59,6 +59,7 @@ import Control.Monad	(liftM)  import System.Glib.FFI+import System.Glib.UTFString import System.Glib.GObject	(wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} @@ -99,13 +100,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,7 +20,7 @@ -- -- TODO ----- If PangoTabArray is bound: +-- If PangoTabArray is bound: --    Fucntions: textViewSetTabs and textViewGetTabs --    Properties: textViewTabs --@@ -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.@@ -191,6 +191,7 @@ 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)@@ -309,7 +310,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)@@ -1046,7 +1047,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 +1063,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 +1122,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 +1230,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 +1266,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 +1280,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 +1311,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 +1330,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 +1343,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 +1360,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 +1370,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/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@@ -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 lable 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/Printing/PageSetup.chs view
@@ -47,7 +47,7 @@ -- resulting page setup. -- -- Printing support was added in Gtk+ 2.10.---   +--  -- * Class Hierarchy --@@ -128,8 +128,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 +137,7 @@   setupPtr <- {# call gtk_page_setup_new_from_file #}              fileNamePtr              errorPtr-  wrapNewGObject mkPageSetup (return setupPtr) +  wrapNewGObject mkPageSetup (return setupPtr)  #endif @@ -350,8 +350,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 +369,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
@@ -111,8 +111,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 +128,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 +149,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 +198,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 +209,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 +220,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 +337,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 --@@ -78,6 +78,7 @@ 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#}@@ -189,7 +190,7 @@   pl <- wrapNewGObject mkPangoLayoutRaw $     {# call gtk_print_context_create_pango_layout #}     (toPrintContext self)-  ps <- makeNewPangoString ""+  ps <- makeNewPangoString (""::DefaultGlibString)   psRef <- newIORef ps   return (PangoLayout psRef pl) 
Graphics/UI/Gtk/Printing/PrintOperation.chs view
@@ -228,8 +228,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 ->@@ -242,7 +242,7 @@ -- This /must/ be set to a positive number before the rendering starts. It -- may be set in a 'beginPrint' signal hander. ----- 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.@@ -325,8 +325,8 @@ -- 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 +363,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 +381,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 +464,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 +490,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 +512,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 +534,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 +556,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 +574,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.--- +-- -- 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 +639,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 +650,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 +717,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 +921,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,@@ -190,13 +190,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 +217,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 +229,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 +241,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 +255,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 +280,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 +301,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 +314,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 +330,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 +344,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 +358,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 +372,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 +387,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 +400,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 +414,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 +426,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 +463,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 +773,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 +791,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 +816,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 +834,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 +852,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 +870,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 +888,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 +911,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 +930,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 +944,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 +1028,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
@@ -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,7 +408,7 @@                           {# 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 --
Graphics/UI/Gtk/Recent/RecentFilter.chs view
@@ -125,8 +125,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 +137,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 +150,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 +164,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 +186,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 +201,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
@@ -88,8 +88,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 +100,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 +111,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 +119,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 +143,7 @@                 execPtr                 countPtr                 timePtr-    if success +    if success        then do          exec <- mapM peekUTFString =<< peekArray 0 execPtr          count <- peek countPtr@@ -155,8 +155,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 +166,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 +177,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 +199,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 +212,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 +223,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 +235,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 +247,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 +258,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 +270,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 +280,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 +291,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 +305,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 +319,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 +331,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 +342,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 --@@ -128,7 +128,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 +146,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 +163,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.@@ -185,14 +185,14 @@ -- -- * 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 +208,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 +226,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 +249,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 +275,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/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.@@ -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/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.@@ -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@@ -44,7 +44,7 @@ -- 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@@ -111,10 +111,10 @@ -- > 		"home-folder-folder" () -- > 	} -- > }--- > +-- > -- > class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" -- > 	--- +--  -- * Class Hierarchy -- |@@ -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@@ -102,8 +102,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 +118,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 +138,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 +153,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 +162,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,12 +205,12 @@ -- -- 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
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,6 +77,7 @@ 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)@@ -101,10 +102,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 +116,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 +131,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'),@@ -117,8 +117,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 +129,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 +139,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 +151,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 +167,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 +205,7 @@   IO CInt  foreign import ccall "wrapper" mkHandler_GtkFileFilterFunc ::-  GtkFileFilterFunc -> +  GtkFileFilterFunc ->   IO (FunPtr GtkFileFilterFunc)  #if GTK_CHECK_VERSION(2,6,0)@@ -220,7 +224,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/FileSelection.chs view
@@ -30,7 +30,7 @@ -- This module is empty in Gtk3. module Graphics.UI.Gtk.Selectors.FileSelection ( -- * Detail--- +-- -- | 'FileSelection' should be used to retrieve file or directory names from -- the user. It will create a new dialog window containing a directory list, -- and a file list corresponding to the current working directory. The@@ -113,8 +113,8 @@ -- listing. Operation buttons that allow the user to create a directory, delete -- files and rename files, are also present. ---fileSelectionNew :: -    String           -- ^ @title@ - a message that will be placed in the file+fileSelectionNew :: GlibString string+ => string           -- ^ @title@ - a message that will be placed in the file                      -- requestor's titlebar.  -> IO FileSelection fileSelectionNew title =@@ -135,8 +135,8 @@ -- working directory and an empty filename, @filename@ must have a trailing -- directory separator. ---fileSelectionSetFilename :: FileSelectionClass self => self- -> String -- ^ @filename@ - a string to set as the default file name.+fileSelectionSetFilename :: (FileSelectionClass self, GlibString string) => self+ -> string -- ^ @filename@ - a string to set as the default file name.  -> IO () fileSelectionSetFilename self filename =   withUTFString filename $ \filenamePtr ->@@ -152,8 +152,8 @@ -- -- If no file is selected then the selected directory path is returned. ---fileSelectionGetFilename :: FileSelectionClass self => self- -> IO String -- ^ returns currently-selected filename+fileSelectionGetFilename :: (FileSelectionClass self, GlibString string) => self+ -> IO string -- ^ returns currently-selected filename fileSelectionGetFilename self = #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)   {# call unsafe gtk_file_selection_get_filename_utf8 #}@@ -187,8 +187,8 @@ -- have been partially matched, and the \"Folders\" list those directories -- which have been partially matched. ---fileSelectionComplete :: FileSelectionClass self => self- -> String -- ^ @pattern@ - a string of characters which may or may not match+fileSelectionComplete :: (FileSelectionClass self, GlibString string) => self+ -> string -- ^ @pattern@ - a string of characters which may or may not match            -- any filenames in the current directory.  -> IO () fileSelectionComplete self pattern =@@ -201,7 +201,7 @@ -- box. This function is intended for use when the user can select multiple -- files in the file list. ---fileSelectionGetSelections :: FileSelectionClass self => self -> IO [String]+fileSelectionGetSelections :: (FileSelectionClass self, GlibString string) => self -> IO [string] fileSelectionGetSelections self = do   cStrArr <- #if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)@@ -244,7 +244,7 @@ -- | The currently selected filename. -- ---fileSelectionFilename :: FileSelectionClass self => Attr self String+fileSelectionFilename :: (FileSelectionClass self, GlibString string) => Attr self string fileSelectionFilename = newAttr   fileSelectionGetFilename   fileSelectionSetFilename
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.@@ -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.@@ -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@@ -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/Signals.chs view
@@ -28,7 +28,7 @@ -- 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 +-- 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@@ -74,14 +74,14 @@   connect_OBJECT_OBJECT__NONE,   connect_PTR__NONE,   connect_PTR_WORD__NONE,-  connect_STRING__NONE,-  connect_STRING_STRING__NONE,+  connect_GLIBSTRING__NONE,+  connect_GLIBSTRING_GLIBSTRING__NONE,   connect_WORD_WORD__NONE,-  connect_WORD_STRING__NONE,+  connect_WORD_GLIBSTRING__NONE,   connect_BOXED_PTR_INT__NONE,   connect_INT_BOOL__NONE,-  connect_OBJECT_STRING__NONE,-  connect_STRING__BOOL,+  connect_OBJECT_GLIBSTRING__NONE,+  connect_GLIBSTRING__BOOL,   connect_OBJECT_PTR_BOXED__BOOL,   connect_PTR_BOXED_BOXED__BOOL,   connect_PTR_INT_PTR__NONE,@@ -91,13 +91,13 @@   connect_OBJECT_INT_INT_WORD__BOOL,   connect_OBJECT_WORD__NONE,   connect_OBJECT_ENUM__BOOL,-  connect_BOXED_STRING__NONE,+  connect_BOXED_GLIBSTRING__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_INT_GLIBSTRING_INT__NONE,+  connect_GLIBSTRING_INT_ENUM_INT__NONE,   connect_OBJECT__BOOL,   connect_OBJECT_INT_OBJECT__NONE,   connect_OBJECT_OBJECT_OBJECT__NONE,@@ -110,9 +110,10 @@  import System.Glib.FFI import System.Glib.UTFString   (peekUTFString,maybePeekUTFString)+import qualified System.Glib.UTFString as Glib import System.Glib.GError      (failOnGError) {#import System.Glib.Signals#}-{#import System.Glib.GObject#} +{#import System.Glib.GObject#} import Graphics.UI.Gtk.General.Threading  @@ -563,12 +564,12 @@           failOnGError $           user (castPtr ptr1) int2 -connect_STRING__NONE :: -  GObjectClass obj => SignalName ->+connect_GLIBSTRING__NONE :: +  (Glib.GlibString a', GObjectClass obj) => SignalName ->   ConnectAfter -> obj ->-  (String -> IO ()) ->+  (a' -> IO ()) ->   IO (ConnectId obj)-connect_STRING__NONE signal after obj user =+connect_GLIBSTRING__NONE signal after obj user =   connectGeneric signal after obj action   where action :: Ptr GObject -> CString -> IO ()         action _ str1 =@@ -576,12 +577,12 @@           peekUTFString str1 >>= \str1' ->           user str1' -connect_STRING_STRING__NONE :: -  GObjectClass obj => SignalName ->+connect_GLIBSTRING_GLIBSTRING__NONE :: +  (Glib.GlibString a', Glib.GlibString b', GObjectClass obj) => SignalName ->   ConnectAfter -> obj ->-  (String -> String -> IO ()) ->+  (a' -> b' -> IO ()) ->   IO (ConnectId obj)-connect_STRING_STRING__NONE signal after obj user =+connect_GLIBSTRING_GLIBSTRING__NONE signal after obj user =   connectGeneric signal after obj action   where action :: Ptr GObject -> CString -> CString -> IO ()         action _ str1 str2 =@@ -602,12 +603,12 @@           failOnGError $           user int1 int2 -connect_WORD_STRING__NONE :: -  GObjectClass obj => SignalName ->+connect_WORD_GLIBSTRING__NONE :: +  (Glib.GlibString b', GObjectClass obj) => SignalName ->   ConnectAfter -> obj ->-  (Word -> String -> IO ()) ->+  (Word -> b' -> IO ()) ->   IO (ConnectId obj)-connect_WORD_STRING__NONE signal after obj user =+connect_WORD_GLIBSTRING__NONE signal after obj user =   connectGeneric signal after obj action   where action :: Ptr GObject -> Word -> CString -> IO ()         action _ int1 str2 =@@ -641,12 +642,12 @@           failOnGError $           user int1 bool2 -connect_OBJECT_STRING__NONE :: -  (GObjectClass a', GObjectClass obj) => SignalName ->+connect_OBJECT_GLIBSTRING__NONE :: +  (GObjectClass a', Glib.GlibString b', GObjectClass obj) => SignalName ->   ConnectAfter -> obj ->-  (a' -> String -> IO ()) ->+  (a' -> b' -> IO ()) ->   IO (ConnectId obj)-connect_OBJECT_STRING__NONE signal after obj user =+connect_OBJECT_GLIBSTRING__NONE signal after obj user =   connectGeneric signal after obj action   where action :: Ptr GObject -> Ptr GObject -> CString -> IO ()         action _ obj1 str2 =@@ -655,12 +656,12 @@           makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->           user (unsafeCastGObject obj1') str2' -connect_STRING__BOOL :: -  GObjectClass obj => SignalName ->+connect_GLIBSTRING__BOOL :: +  (Glib.GlibString a', GObjectClass obj) => SignalName ->   ConnectAfter -> obj ->-  (String -> IO Bool) ->+  (a' -> IO Bool) ->   IO (ConnectId obj)-connect_STRING__BOOL signal after obj user =+connect_GLIBSTRING__BOOL signal after obj user =   connectGeneric signal after obj action   where action :: Ptr GObject -> CString -> IO Bool         action _ str1 =@@ -787,13 +788,13 @@           makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->           user (unsafeCastGObject obj1') (toEnum enum2) -connect_BOXED_STRING__NONE :: -  GObjectClass obj => SignalName ->+connect_BOXED_GLIBSTRING__NONE :: +  (Glib.GlibString b', GObjectClass obj) => SignalName ->   (Ptr a' -> IO a) ->    ConnectAfter -> obj ->-  (a -> String -> IO ()) ->+  (a -> b' -> IO ()) ->   IO (ConnectId obj)-connect_BOXED_STRING__NONE signal boxedPre1 after obj user =+connect_BOXED_GLIBSTRING__NONE signal boxedPre1 after obj user =   connectGeneric signal after obj action   where action :: Ptr GObject -> Ptr () -> CString -> IO ()         action _ box1 str2 =@@ -855,12 +856,12 @@           makeNewGObject (GObject, objectUnrefFromMainloop) (return obj1) >>= \obj1' ->           user (unsafeCastGObject obj1') int2 int3 bool4 (unsafeCastGObject obj5') -connect_INT_STRING_INT__NONE :: -  GObjectClass obj => SignalName ->+connect_INT_GLIBSTRING_INT__NONE :: +  (Glib.GlibString b', GObjectClass obj) => SignalName ->   ConnectAfter -> obj ->-  (Int -> String -> Int -> IO ()) ->+  (Int -> b' -> Int -> IO ()) ->   IO (ConnectId obj)-connect_INT_STRING_INT__NONE signal after obj user =+connect_INT_GLIBSTRING_INT__NONE signal after obj user =   connectGeneric signal after obj action   where action :: Ptr GObject -> Int -> CString -> Int -> IO ()         action _ int1 str2 int3 =@@ -868,12 +869,12 @@           peekUTFString str2 >>= \str2' ->           user int1 str2' int3 -connect_STRING_INT_ENUM_INT__NONE :: -  (Enum c, GObjectClass obj) => SignalName ->+connect_GLIBSTRING_INT_ENUM_INT__NONE :: +  (Glib.GlibString a', Enum c, GObjectClass obj) => SignalName ->   ConnectAfter -> obj ->-  (String -> Int -> c -> Int -> IO ()) ->+  (a' -> Int -> c -> Int -> IO ()) ->   IO (ConnectId obj)-connect_STRING_INT_ENUM_INT__NONE signal after obj user =+connect_GLIBSTRING_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 =
Graphics/UI/Gtk/Types.chs view
@@ -549,6 +549,10 @@   toProgressBar,    mkProgressBar, unProgressBar,   castToProgressBar, gTypeProgressBar,+  LevelBar(LevelBar), LevelBarClass,+  toLevelBar, +  mkLevelBar, unLevelBar,+  castToLevelBar, gTypeLevelBar,   Adjustment(Adjustment), AdjustmentClass,   toAdjustment,    mkAdjustment, unAdjustment,@@ -4004,6 +4008,30 @@ gTypeProgressBar :: GType gTypeProgressBar =   {# call fun unsafe gtk_progress_bar_get_type #}++-- ******************************************************************* LevelBar++{#pointer *GtkLevelBar as LevelBar foreign newtype #} deriving (Eq,Ord)++mkLevelBar = (LevelBar, objectUnrefFromMainloop)+unLevelBar (LevelBar o) = o++class WidgetClass o => LevelBarClass o+toLevelBar :: LevelBarClass o => o -> LevelBar+toLevelBar = unsafeCastGObject . toGObject++instance LevelBarClass LevelBar+instance WidgetClass LevelBar+instance GObjectClass LevelBar where+  toGObject = GObject . castForeignPtr . unLevelBar+  unsafeCastGObject = LevelBar . castForeignPtr . unGObject++castToLevelBar :: GObjectClass obj => obj -> LevelBar+castToLevelBar = castTo gTypeLevelBar "LevelBar"++gTypeLevelBar :: GType+gTypeLevelBar =+  {# call fun unsafe gtk_level_bar_get_type #}  -- ***************************************************************** Adjustment 
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@@ -170,8 +170,8 @@  -- | 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,7 +300,7 @@ -- | 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 #}@@ -310,8 +310,8 @@ -- | 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 +322,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 +331,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 +343,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 +352,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,7 +364,7 @@ -- | 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)@@ -373,7 +373,7 @@ -- | 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,7 +385,7 @@ -- 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 #}@@ -414,7 +414,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 +424,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 +438,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 +457,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@@ -509,35 +509,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 +548,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 +576,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 +585,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 +594,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 +610,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
@@ -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.@@ -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@@ -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/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,@@ -103,7 +103,6 @@ import System.Glib.Properties import System.Glib.Flags	(Flags, fromFlags) import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)-import Graphics.Rendering.Pango.Markup (Markup)  {# context lib="gtk" prefix="gtk" #} @@ -144,26 +143,27 @@ -------------------- -- 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)@@ -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 -> +  message_dialog_format_secondary_markup :: Ptr MessageDialog ->   					   Ptr CChar -> IO ()   					-messageDialogSetSecondaryText :: MessageDialogClass self => self- -> String -- ^ @str@ - text to be shown as second line+messageDialogSetSecondaryText :: (MessageDialogClass self, GlibString string) => self+ -> string -- ^ @str@ - text to be shown as second line  -> IO () messageDialogSetSecondaryText self str =   withUTFString str $ \strPtr ->@@ -248,7 +249,7 @@   message_dialog_format_secondary_text ptr strPtr  foreign import ccall unsafe "gtk_message_dialog_format_secondary_text"-  message_dialog_format_secondary_text :: Ptr MessageDialog -> +  message_dialog_format_secondary_text :: Ptr MessageDialog ->  					 Ptr CChar -> IO ()  #if GTK_CHECK_VERSION(2,10,0)@@ -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/Window.chs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} -- -*-haskell-*- --  GIMP Toolkit (GTK) Window --@@ -334,7 +335,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 +344,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 +494,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 +505,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 +527,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 +536,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 +554,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 +605,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 +716,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 +1021,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 +1067,10 @@     (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, +-- | 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,8 +1090,8 @@ -- * 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@@ -1119,13 +1120,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 +1135,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 +1149,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 #}@@ -1186,8 +1187,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,8 +1200,8 @@ -- | 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 #}@@ -1301,11 +1302,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 +1316,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 +1328,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@@ -1365,8 +1366,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 +1380,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 #}@@ -1395,8 +1396,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 +1424,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 +1442,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 +1483,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 +1511,7 @@ -- -- * Available since Gtk+ version 2.2 ---windowSetAutoStartupNotification :: +windowSetAutoStartupNotification ::     Bool  -- ^ @setting@ - @True@ to automatically do startup notification  -> IO () windowSetAutoStartupNotification setting =@@ -1582,24 +1583,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@@ -1934,18 +1935,18 @@ {# 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.) +-- | 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 +1955,23 @@ -- -- * 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  #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 +1979,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 +1991,7 @@  -- | The title of the window. ---windowTitle :: WindowClass self => Attr self String+windowTitle :: (WindowClass self, GlibString string) => Attr self string windowTitle = newAttr   windowGetTitle   windowSetTitle@@ -2133,7 +2134,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 +2144,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 +2206,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 +2305,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 fucntion `windowHasToplevelFocus`, so we named this attribute -- to `windowToplevelFocus`. -- -- Default values: @False@@@ -2324,7 +2325,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))
Gtk2HsSetup.hs view
@@ -6,9 +6,9 @@  -- | Build a Gtk2hs package. ---module Gtk2HsSetup ( -  gtk2hsUserHooks, -  getPkgConfigPackages, +module Gtk2HsSetup (+  gtk2hsUserHooks,+  getPkgConfigPackages,   checkGtk2hsBuildtools,   typeGenProgram,   signalGenProgram,@@ -56,7 +56,8 @@ 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.List (isPrefixOf, isSuffixOf, nub, minimumBy, stripPrefix, tails )+import Data.Ord as Ord (comparing) import Data.Char (isAlpha, isNumber) import qualified Data.Map as M import qualified Data.Set as S@@ -113,9 +114,16 @@ fixLibs :: [FilePath] -> [String] -> [String] fixLibs dlls = concatMap $ \ lib ->     case filter (isLib lib) dlls of-                dll:_ -> [dropExtension dll]-                _     -> if lib == "z" then [] else [lib]+                dlls@(_:_) -> [dropExtension (pickDll dlls)]+                _          -> if lib == "z" then [] else [lib]   where+    -- If there are several .dll files matching the one we're after then we+    -- just have to guess. For example for recent Windows cairo builds we get+    -- libcairo-2.dll libcairo-gobject-2.dll libcairo-script-interpreter-2.dll+    -- Our heuristic is to pick the one with the shortest name.+    -- Yes this is a hack but the proper solution is hard: we would need to+    -- parse the .a file and see which .dll file(s) it needed to link to.+    pickDll = minimumBy (Ord.comparing length)     isLib lib dll =         case stripPrefix ("lib"++lib) dll of             Just ('.':_)                -> True@@ -154,9 +162,9 @@ register :: PackageDescription -> LocalBuildInfo          -> RegisterFlags -- ^Install in the user's database?; verbose          -> IO ()-register pkg@(library       -> Just lib )-         lbi@(libraryConfig -> Just clbi) regFlags+register pkg@PackageDescription { library       = Just lib  } lbi regFlags   = do+    let clbi = LBI.getComponentLocalBuildInfo lbi LBI.CLibName      installedPkgInfoRaw <- generateRegistrationInfo                            verbosity pkg lib lbi clbi inplace distPref@@ -168,7 +176,7 @@       -- Three different modes:     case () of-     _ | modeGenerateRegFile   -> die "Generate Reg File not supported"+     _ | modeGenerateRegFile   -> writeRegistrationFile installedPkgInfo        | modeGenerateRegScript -> die "Generate Reg Script not supported"        | otherwise             -> registerPackage verbosity                                     installedPkgInfo pkg lbi inplace@@ -180,6 +188,8 @@    where     modeGenerateRegFile = isJust (flagToMaybe (regGenPkgConf regFlags))+    regFile             = fromMaybe (display (packageId pkg) <.> "conf")+                                    (fromFlag (regGenPkgConf regFlags))     modeGenerateRegScript = fromFlag (regGenScript regFlags)     inplace   = fromFlag (regInPlace regFlags)     packageDbs = nub $ withPackageDB lbi@@ -188,6 +198,10 @@     distPref  = fromFlag (regDistPref regFlags)     verbosity = fromFlag (regVerbosity regFlags) +    writeRegistrationFile installedPkgInfo = do+      notice verbosity ("Creating package registration file: " ++ regFile)+      writeUTF8File regFile (showInstalledPackageInfo installedPkgInfo)+ register _ _ regFlags = notice verbosity "No package to register"   where     verbosity = fromFlag (regVerbosity regFlags)@@ -275,11 +289,11 @@   -- 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 ()  ------------------------------------------------------------------------------@@ -305,13 +319,12 @@  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)+      typeOpts tag = concat [ map (\val -> '-':'-':drop (length tag) field ++ '=':val) (words content)                             | (field,content) <- xList,                               tag `isPrefixOf` field,                               field /= (tag++"file")]@@ -319,8 +332,9 @@                  | PackageIdentifier name (Version (major:minor:_) _) <- cPkgs                  , let name' = filter isAlpha (display name)                  , tag <- name'-                        : [ name' ++ "-" ++ show major ++ "." ++ show digit-                          | digit <- [0,2..minor] ]+                        :[ name' ++ "-" ++ show maj ++ "." ++ show d2+                          | (maj, d2) <- [(maj,   d2) | maj <- [0..(major-1)], d2 <- [0,2..20]]+                                      ++ [(major, d2) | d2 <- [0,2..minor]] ]                  ]        signalsOpts :: [ProgArg]@@ -346,6 +360,29 @@       info verb ("Ensuring that callback hooks in "++f++" are up-to-date.")       genFile signalGenProgram signalsOpts f +  writeFile "gtk2hs_macros.h" $ generateMacros cPkgs++-- Based on Cabal/Distribution/Simple/Build/Macros.hs+generateMacros :: [PackageId] -> String+generateMacros cPkgs = concat $+  "/* DO NOT EDIT: This file is automatically generated by Gtk2HsSetup.hs */\n\n" :+  [ concat+    ["/* package ",display pkgid," */\n"+    ,"#define VERSION_",pkgname," ",show (display version),"\n"+    ,"#define MIN_VERSION_",pkgname,"(major1,major2,minor) (\\\n"+    ,"  (major1) <  ",major1," || \\\n"+    ,"  (major1) == ",major1," && (major2) <  ",major2," || \\\n"+    ,"  (major1) == ",major1," && (major2) == ",major2," && (minor) <= ",minor,")"+    ,"\n\n"+    ]+  | pkgid@(PackageIdentifier name version) <- cPkgs+  , let (major1:major2:minor:_) = map show (versionBranch version ++ repeat 0)+        pkgname = map fixchar (display name)+  ]+  where fixchar '-' = '_'+        fixchar '.' = '_'+        fixchar c   = c+ --FIXME: Cabal should tell us the selected pkg-config package versions in the --       LocalBuildInfo or equivalent. --       In the mean time, ask pkg-config again.@@ -416,14 +453,14 @@  -- 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.  +-- 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 +            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@@ -457,8 +494,8 @@                          return (programName prog, location)                       ) programs   let printError name = do-        putStrLn $ "Cannot find " ++ name ++ "\n" +        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) +    when (isNothing location) (printError name)
SetupWrapper.hs view
@@ -9,7 +9,7 @@ import Distribution.Simple.Program import Distribution.Simple.Compiler import Distribution.Simple.BuildPaths (exeExtension)-import Distribution.Simple.Configure (configCompiler)+import Distribution.Simple.Configure (configCompilerEx) import Distribution.Simple.GHC (getInstalledPackages) import qualified Distribution.Simple.PackageIndex as PackageIndex import Distribution.Version@@ -115,7 +115,7 @@       when outOfDate $ do         debug verbosity "Setup script is out of date, compiling..." -        (comp, conf)    <- configCompiler (Just GHC) Nothing Nothing+        (comp, _, conf) <- configCompilerEx (Just GHC) Nothing Nothing                              defaultProgramConfiguration verbosity         cabalLibVersion <- cabalLibVersionToUse comp conf         let cabalPkgid = PackageIdentifier (PackageName "Cabal") cabalLibVersion
demo/actionMenu/ActionMenu.hs view
@@ -1,6 +1,14 @@+{-# 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 +43,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 +98,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/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,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} module Main where  import Graphics.UI.Gtk@@ -6,7 +7,7 @@ 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 +19,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/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/unicode/Arabic.hs view
@@ -2,8 +2,10 @@ import Graphics.UI.Gtk  import Data.Char+import qualified Data.Text as T import Control.Exception import Control.Applicative+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
gtk.cabal view
@@ -1,5 +1,5 @@ Name:           gtk-Version:        0.12.5.7+Version:        0.13.0.0 License:        LGPL-2.1 License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team@@ -9,7 +9,7 @@ Cabal-Version:  >= 1.8 Stability:      provisional homepage:       http://projects.haskell.org/gtk2hs/-bug-reports:    http://hackage.haskell.org/trac/gtk2hs/+bug-reports:    https://github.com/gtk2hs/gtk2hs/issues Synopsis:       Binding to the Gtk+ 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@@ -137,16 +137,17 @@ 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+                        text >= 0.11.0.6 && < 1.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,+        build-tools:    gtk2hsC2hs >= 0.13.11,                         gtk2hsHookGenerator, gtk2hsTypeGen          exposed-modules:@@ -377,6 +378,7 @@         -- needs to be imported from this module:         x-Signals-Import: Graphics.UI.Gtk.General.Threading         include-dirs:   .+        cpp-options: -U__BLOCKS__         if !flag(deprecated)           cpp-options:  -DDISABLE_DEPRECATED         else
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