gtk 0.13.0.3 → 0.13.1
raw patch · 172 files changed
+977/−813 lines, 172 files
Files
- Graphics/UI/Gtk.chs +6/−2
- Graphics/UI/Gtk/Abstract/Bin.chs +1/−1
- Graphics/UI/Gtk/Abstract/Box.chs +4/−4
- Graphics/UI/Gtk/Abstract/Container.chs +5/−5
- Graphics/UI/Gtk/Abstract/Misc.chs +1/−1
- Graphics/UI/Gtk/Abstract/Object.chs +6/−12
- Graphics/UI/Gtk/Abstract/Paned.chs +9/−7
- Graphics/UI/Gtk/Abstract/Range.chs +14/−14
- Graphics/UI/Gtk/Abstract/Scale.chs +1/−1
- Graphics/UI/Gtk/Abstract/Scrollbar.hs +2/−2
- Graphics/UI/Gtk/Abstract/Separator.hs +1/−1
- Graphics/UI/Gtk/Abstract/Widget.chs +328/−29
- Graphics/UI/Gtk/ActionMenuToolbar/Action.chs +0/−1
- Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs +0/−2
- Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs +0/−1
- Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs +0/−2
- Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs +0/−1
- Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs +0/−1
- Graphics/UI/Gtk/Builder.chs +0/−1
- Graphics/UI/Gtk/Buttons/Button.chs +0/−30
- Graphics/UI/Gtk/Buttons/LinkButton.chs +1/−2
- Graphics/UI/Gtk/Cairo.chs +2/−2
- Graphics/UI/Gtk/Display/Image.chs +0/−1
- Graphics/UI/Gtk/Display/Label.chs +7/−5
- Graphics/UI/Gtk/Display/Spinner.chs +6/−8
- Graphics/UI/Gtk/Display/StatusIcon.chs +0/−1
- Graphics/UI/Gtk/Display/Statusbar.chs +2/−0
- Graphics/UI/Gtk/Embedding/Embedding.hsc +2/−2
- Graphics/UI/Gtk/Embedding/Plug.chs +6/−6
- Graphics/UI/Gtk/Embedding/Socket.chs +5/−5
- Graphics/UI/Gtk/Entry/Entry.chs +0/−17
- Graphics/UI/Gtk/Entry/EntryCompletion.chs +0/−2
- Graphics/UI/Gtk/Entry/HScale.chs +3/−3
- Graphics/UI/Gtk/Entry/SpinButton.chs +3/−3
- Graphics/UI/Gtk/Entry/VScale.chs +3/−3
- Graphics/UI/Gtk/Gdk/AppLaunchContext.chs +0/−3
- Graphics/UI/Gtk/Gdk/Cursor.chs +2/−6
- Graphics/UI/Gtk/Gdk/Display.chs +0/−1
- Graphics/UI/Gtk/Gdk/DisplayManager.chs +1/−4
- Graphics/UI/Gtk/Gdk/DrawWindow.chs +30/−36
- Graphics/UI/Gtk/Gdk/Drawable.chs +10/−10
- Graphics/UI/Gtk/Gdk/EventM.hsc +17/−18
- Graphics/UI/Gtk/Gdk/Events.hsc +7/−13
- Graphics/UI/Gtk/Gdk/GC.chs +3/−4
- Graphics/UI/Gtk/Gdk/Keymap.chs +19/−21
- Graphics/UI/Gtk/Gdk/Pixbuf.chs +7/−6
- Graphics/UI/Gtk/Gdk/PixbufAnimation.chs +1/−3
- Graphics/UI/Gtk/Gdk/PixbufData.hs +1/−2
- Graphics/UI/Gtk/Gdk/Pixmap.chs +3/−5
- Graphics/UI/Gtk/Gdk/Region.chs +8/−8
- Graphics/UI/Gtk/Gdk/Screen.chs +1/−1
- Graphics/UI/Gtk/General/Clipboard.chs +8/−9
- Graphics/UI/Gtk/General/DNDTypes.chs +0/−1
- Graphics/UI/Gtk/General/Drag.chs +3/−4
- Graphics/UI/Gtk/General/Enums.chs +25/−3
- Graphics/UI/Gtk/General/General.chs +1/−2
- Graphics/UI/Gtk/General/IconFactory.chs +0/−1
- Graphics/UI/Gtk/General/IconTheme.chs +1/−6
- Graphics/UI/Gtk/General/RcStyle.chs +0/−1
- Graphics/UI/Gtk/General/Selection.chs +4/−3
- Graphics/UI/Gtk/General/Settings.chs +0/−12
- Graphics/UI/Gtk/General/StockItems.hsc +22/−22
- Graphics/UI/Gtk/General/Structs.hsc +45/−44
- Graphics/UI/Gtk/General/Style.chs +8/−6
- Graphics/UI/Gtk/Layout/Alignment.chs +2/−2
- Graphics/UI/Gtk/Layout/AspectFrame.chs +2/−2
- Graphics/UI/Gtk/Layout/Fixed.chs +1/−1
- Graphics/UI/Gtk/Layout/HBox.chs +2/−2
- Graphics/UI/Gtk/Layout/HButtonBox.chs +1/−1
- Graphics/UI/Gtk/Layout/HPaned.chs +1/−1
- Graphics/UI/Gtk/Layout/Layout.chs +2/−2
- Graphics/UI/Gtk/Layout/Notebook.chs +2/−2
- Graphics/UI/Gtk/Layout/Table.chs +3/−3
- Graphics/UI/Gtk/Layout/VBox.chs +2/−2
- Graphics/UI/Gtk/Layout/VButtonBox.chs +1/−1
- Graphics/UI/Gtk/Layout/VPaned.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/Combo.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs +1/−6
- Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs +0/−2
- Graphics/UI/Gtk/MenuComboToolbar/Menu.chs +0/−1
- Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs +0/−1
- Graphics/UI/Gtk/MenuComboToolbar/OptionMenu.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/RadioToolButton.chs +5/−5
- Graphics/UI/Gtk/MenuComboToolbar/SeparatorMenuItem.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs +1/−1
- Graphics/UI/Gtk/MenuComboToolbar/ToggleToolButton.chs +2/−2
- Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs +0/−2
- Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs +28/−30
- Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs +11/−8
- Graphics/UI/Gtk/Misc/Accessible.chs +6/−10
- Graphics/UI/Gtk/Misc/Adjustment.chs +3/−3
- Graphics/UI/Gtk/Misc/Arrow.chs +1/−1
- Graphics/UI/Gtk/Misc/Calendar.chs +3/−3
- Graphics/UI/Gtk/Misc/DrawingArea.chs +1/−3
- Graphics/UI/Gtk/Misc/EventBox.chs +1/−1
- Graphics/UI/Gtk/Misc/HandleBox.chs +1/−1
- Graphics/UI/Gtk/Misc/IMMulticontext.chs +0/−2
- Graphics/UI/Gtk/Misc/SizeGroup.chs +2/−3
- Graphics/UI/Gtk/Misc/Tooltip.chs +2/−4
- Graphics/UI/Gtk/Misc/Tooltips.chs +0/−2
- Graphics/UI/Gtk/Misc/Viewport.chs +1/−1
- Graphics/UI/Gtk/ModelView.chs +1/−1
- Graphics/UI/Gtk/ModelView/CellEditable.chs +5/−7
- Graphics/UI/Gtk/ModelView/CellLayout.chs +7/−8
- Graphics/UI/Gtk/ModelView/CellRendererCombo.chs +0/−1
- Graphics/UI/Gtk/ModelView/CellRendererSpin.chs +5/−5
- Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs +8/−8
- Graphics/UI/Gtk/ModelView/CellRendererText.chs +1/−1
- Graphics/UI/Gtk/ModelView/CellView.chs +2/−0
- Graphics/UI/Gtk/ModelView/CustomStore.chs +6/−14
- Graphics/UI/Gtk/ModelView/IconView.chs +0/−2
- Graphics/UI/Gtk/ModelView/ListStore.hs +23/−23
- Graphics/UI/Gtk/ModelView/TreeDrag.chs +2/−2
- Graphics/UI/Gtk/ModelView/TreeModel.chs +1/−4
- Graphics/UI/Gtk/ModelView/TreeModelFilter.chs +5/−7
- Graphics/UI/Gtk/ModelView/TreeModelSort.chs +2/−3
- Graphics/UI/Gtk/ModelView/TreeRowReference.chs +1/−1
- Graphics/UI/Gtk/ModelView/TreeSelection.chs +1/−2
- Graphics/UI/Gtk/ModelView/TreeSortable.chs +4/−7
- Graphics/UI/Gtk/ModelView/TreeStore.hs +17/−18
- Graphics/UI/Gtk/ModelView/TreeView.chs +2/−5
- Graphics/UI/Gtk/ModelView/TreeViewColumn.chs +2/−0
- Graphics/UI/Gtk/ModelView/Types.chs +1/−0
- Graphics/UI/Gtk/Multiline/TextBuffer.chs +2/−4
- Graphics/UI/Gtk/Multiline/TextIter.chs +0/−5
- Graphics/UI/Gtk/Multiline/TextMark.chs +4/−3
- Graphics/UI/Gtk/Multiline/TextTag.chs +2/−1
- Graphics/UI/Gtk/Multiline/TextTagTable.chs +0/−1
- Graphics/UI/Gtk/Multiline/TextView.chs +0/−2
- Graphics/UI/Gtk/Ornaments/HSeparator.chs +1/−1
- Graphics/UI/Gtk/Ornaments/VSeparator.chs +1/−1
- Graphics/UI/Gtk/Printing/PageSetup.chs +0/−1
- Graphics/UI/Gtk/Printing/PaperSize.chs +0/−1
- Graphics/UI/Gtk/Printing/PrintContext.chs +6/−6
- Graphics/UI/Gtk/Printing/PrintOperation.chs +9/−0
- Graphics/UI/Gtk/Printing/PrintSettings.chs +0/−1
- Graphics/UI/Gtk/Recent/RecentChooser.chs +3/−3
- Graphics/UI/Gtk/Recent/RecentChooserMenu.chs +3/−3
- Graphics/UI/Gtk/Recent/RecentChooserWidget.chs +4/−6
- Graphics/UI/Gtk/Recent/RecentFilter.chs +1/−3
- Graphics/UI/Gtk/Recent/RecentInfo.chs +2/−3
- Graphics/UI/Gtk/Recent/RecentManager.chs +3/−4
- Graphics/UI/Gtk/Scrolling/HScrollbar.chs +2/−2
- Graphics/UI/Gtk/Scrolling/VScrollbar.chs +2/−2
- Graphics/UI/Gtk/Selectors/ColorSelection.chs +1/−1
- Graphics/UI/Gtk/Selectors/FileChooserDialog.chs +0/−1
- Graphics/UI/Gtk/Selectors/FileFilter.chs +0/−3
- Graphics/UI/Gtk/Selectors/HSV.chs +17/−18
- Graphics/UI/Gtk/Signals.chs +1/−0
- Graphics/UI/Gtk/Special/Ruler.chs +7/−9
- Graphics/UI/Gtk/Types.chs +28/−0
- Graphics/UI/Gtk/Windows/AboutDialog.chs +6/−1
- Graphics/UI/Gtk/Windows/Assistant.chs +1/−1
- Graphics/UI/Gtk/Windows/Invisible.chs +9/−17
- Graphics/UI/Gtk/Windows/OffscreenWindow.chs +12/−14
- Graphics/UI/Gtk/Windows/Window.chs +8/−1
- Graphics/UI/Gtk/Windows/WindowGroup.chs +1/−2
- Graphics/UI/GtkInternals.chs +1/−1
- Gtk2HsSetup.hs +1/−1
- SetupMain.hs +1/−1
- demo/actionMenu/ActionMenu.hs +0/−1
- demo/buttonbox/ButtonBox.hs +0/−1
- demo/fastdraw/FastDraw.hs +0/−8
- demo/gtkbuilder/GtkBuilderTest.hs +0/−1
- demo/hello/World.hs +0/−1
- demo/menu/ComboDemo.hs +0/−3
- demo/menu/MenuDemo.hs +0/−1
- demo/unicode/Arabic.hs +0/−1
- gtk.cabal +2/−2
Graphics/UI/Gtk.chs view
@@ -26,7 +26,7 @@ -- DialogMessage : has only one variadic function which cannot be bound. -- The same functionality can be simulated with Dialog. -- Item : The only child of this abstract class is MenuItem. The--- three signals Item defines are therefore bound in +-- three signals Item defines are therefore bound in -- MenuItem. -- -- TODO@@ -279,9 +279,11 @@ module Graphics.UI.Gtk.Abstract.Scrollbar, module Graphics.UI.Gtk.Abstract.Separator, module Graphics.UI.Gtk.Abstract.Widget,+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) -- * Cross-process embedding module Graphics.UI.Gtk.Embedding.Plug, module Graphics.UI.Gtk.Embedding.Socket,+#endif -- * Non-widgets module System.Glib.Signals, module System.Glib.Attributes,@@ -553,8 +555,10 @@ import Graphics.UI.Gtk.Abstract.Separator import Graphics.UI.Gtk.Abstract.Widget -- cross-process embedding+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) import Graphics.UI.Gtk.Embedding.Plug import Graphics.UI.Gtk.Embedding.Socket+#endif -- non widgets import System.Glib.Signals@@ -577,7 +581,7 @@ isA ) import Graphics.UI.Gtk.Builder- + -- pango modules import Graphics.Rendering.Pango.Context import Graphics.Rendering.Pango.Markup
Graphics/UI/Gtk/Abstract/Bin.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Bin ( -- * Detail--- +-- -- | The 'Bin' widget is a container with just one child. It is not very -- useful itself, but it is useful for deriving subclasses, since it provides -- common code needed for handling a single child widget.
Graphics/UI/Gtk/Abstract/Box.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Box ( -- * Detail--- +-- -- | 'Box' is an abstract widget which encapsulates functionality for a -- particular kind of container, one that organizes a variable number of -- widgets into a rectangular area. 'Box' currently has two derived classes,@@ -167,12 +167,12 @@ (fromIntegral padding) where (expand, fill) = fromPacking packing --- | Adds the @child@ widget to the box, packed with reference to the end of +-- | Adds the @child@ widget to the box, packed with reference to the end of -- the box. The -- @child@ is packed after (away from end of) any other child packed with -- reference to the end of the box. ----- Note that +-- Note that -- for 'boxPackEnd' the 'PackNatural' option will move a child to the right in -- an 'HBox' or to the bottom in an 'VBox' if there is more space availble. --@@ -278,7 +278,7 @@ -- | Returns information about how @child@ is packed into the box. ----- Returns information on the behaviour if free space is available +-- Returns information on the behaviour if free space is available -- (in 'Packing'), the additional padding for this widget and if the widget -- was inserted at the start or end of the container ('PackType'). --
Graphics/UI/Gtk/Abstract/Container.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Container ( -- * Detail--- +-- -- | A Gtk+ user interface is constructed by nesting widgets inside widgets. -- Container widgets are the inner nodes in the resulting tree of widgets: they -- contain other widgets. So, for example, you might have a 'Window' containing@@ -55,7 +55,7 @@ -- out in two phases, size requisition and size allocation. -- ** Size Requisition--- +-- -- | The size requisition of a widget is it's desired width and height. This -- is represented by a 'Requisition'. --@@ -72,7 +72,7 @@ -- will get a requisition back from its child. -- ** Size Allocation--- +-- -- | When the top-level widget has determined how much space its child would -- like to have, the second phase of the size negotiation, size allocation, -- begins. Depending on its configuration (see 'windowSetResizable'), the@@ -94,7 +94,7 @@ -- request is only a request, and widgets must be able to cope with any size. -- ** Child attributes--- +-- -- | 'Container' introduces child attributes - these are object attributes -- that are not specific to either the container or the contained widget, but -- rather to their relation. Typical examples of child attributes are the@@ -111,7 +111,7 @@ -- Whereas child attributes take the child object as a parameter: -- -- > set container [ attr child := value ]--- +-- -- And similarily for getting a child attribute's value: -- -- > value <- get container (attr child)
Graphics/UI/Gtk/Abstract/Misc.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Misc ( -- * Detail--- +-- -- | The 'Misc' widget is an abstract widget which is not useful itself, but -- is used to derive subclasses which have alignment and padding attributes. --
Graphics/UI/Gtk/Abstract/Object.chs view
@@ -25,13 +25,13 @@ -- -- The base class of the Gtk+ type hierarchy. ----- * Each widget is a represented as a purely abstract data type. It can only +-- * Each widget is a represented as a purely abstract data type. It can only -- be accessed through and the special access functions that are defined -- in each widget file. -- module Graphics.UI.Gtk.Abstract.Object ( -- * Detail--- +-- -- | 'Object' is the base class for all widgets, and for a few non-widget -- objects such as 'Adjustment'. 'Object' predates 'GObject'; non-widgets that -- derive from 'Object' rather than 'GObject' do so for backward compatibility@@ -77,12 +77,6 @@ import System.Glib.FFI import System.Glib.Attributes (ReadWriteAttr)-import System.Glib.GObject (objectUnref)-#if GLIB_CHECK_VERSION(2,10,0)-import System.Glib.GObject (objectRefSink)-#else-import System.Glib.GObject (objectRef)-#endif {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Data.IORef@@ -95,7 +89,7 @@ -- turn the initial floating state to sunk -- -- * The floating\/sunk concept of a GTK object is not very useful to us.--- The following procedure circumvents the whole subject and ensures +-- The following procedure circumvents the whole subject and ensures -- proper cleanup: -- on creation: objectRef, objectSink -- on finalization: objectUnref@@ -112,9 +106,9 @@ -- * The constr argument is the contructor of the specific object. -- #if GTK_MAJOR_VERSION < 3-makeNewObject :: ObjectClass obj => +makeNewObject :: ObjectClass obj => #else-makeNewObject :: GObjectClass obj => +makeNewObject :: GObjectClass obj => #endif (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj makeNewObject (constr, objectUnref) generator = do@@ -159,7 +153,7 @@ #else objectWeakunref :: GObjectClass o => o -> GWeakNotify -> IO () #endif-objectWeakunref obj fun = +objectWeakunref obj fun = {#call unsafe g_object_weak_unref#} (toGObject obj) fun nullPtr
Graphics/UI/Gtk/Abstract/Paned.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Paned ( -- * Detail--- +-- -- | 'Paned' is the base class for widgets with two panes, arranged either -- horizontally ('HPaned') or vertically ('VPaned'). Child widgets are added to -- the panes of the widget with 'panedPack1' and 'panedPack2'. The division@@ -125,8 +125,10 @@ import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#}+#ifndef DISABLE_DEPRECATED {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.Enums (ScrollType)+#endif import Graphics.UI.Gtk.Abstract.ContainerChildProperties {# context lib="gtk" prefix="gtk" #}@@ -312,7 +314,7 @@ -- Deprecated Signals #ifndef DISABLE_DEPRECATED--- | +-- | -- onCycleChildFocus, afterCycleChildFocus :: PanedClass self => self -> (Bool -> IO Bool)@@ -320,7 +322,7 @@ onCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" False afterCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" True --- | +-- | -- onToggleHandleFocus, afterToggleHandleFocus :: PanedClass self => self -> IO Bool@@ -328,7 +330,7 @@ onToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" False afterToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" True --- | +-- | -- onMoveHandle, afterMoveHandle :: PanedClass self => self -> (ScrollType -> IO Bool)@@ -336,7 +338,7 @@ onMoveHandle = connect_ENUM__BOOL "move_handle" False afterMoveHandle = connect_ENUM__BOOL "move_handle" True --- | +-- | -- onCycleHandleFocus, afterCycleHandleFocus :: PanedClass self => self -> (Bool -> IO Bool)@@ -344,7 +346,7 @@ onCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" False afterCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" True --- | +-- | -- onAcceptPosition, afterAcceptPosition :: PanedClass self => self -> IO Bool@@ -352,7 +354,7 @@ onAcceptPosition = connect_NONE__BOOL "accept_position" False afterAcceptPosition = connect_NONE__BOOL "accept_position" True --- | +-- | -- onCancelPosition, afterCancelPosition :: PanedClass self => self -> IO Bool
Graphics/UI/Gtk/Abstract/Range.chs view
@@ -331,10 +331,10 @@ #endif #if GTK_CHECK_VERSION(2,20,0) -- | This function is useful mainly for 'Range' subclasses.--- +-- -- See 'rangeSetMinSliderSize'. rangeGetMinSliderSize :: RangeClass self => self- -> IO Int -- ^ returns The minimum size of the range's slider. + -> IO Int -- ^ returns The minimum size of the range's slider. rangeGetMinSliderSize range = liftM fromIntegral $ {#call gtk_range_get_min_slider_size #}@@ -342,7 +342,7 @@ -- | This function returns the area that contains the range's trough and its steppers, in 'DrawWindow' -- coordinates.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeGetRangeRect :: RangeClass self => self -> IO Rectangle@@ -354,12 +354,12 @@ peek rPtr -- | This function returns sliders range along the long dimension, in 'DrawWindow' coordinates.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeGetSliderRange :: RangeClass self => self -> IO (Maybe (Int, Int)) rangeGetSliderRange range =- alloca $ \ startPtr -> + alloca $ \ startPtr -> alloca $ \ endPtr -> do {#call gtk_range_get_slider_range #} (toRange range)@@ -373,17 +373,17 @@ else return Nothing -- | This function is useful mainly for 'Range' subclasses.--- +-- -- See 'rangeSetSliderSizeFixed'. rangeGetSliderSizeFixed :: RangeClass self => self- -> IO Bool -- ^ returns whether the range's slider has a fixed size. -rangeGetSliderSizeFixed self = + -> IO Bool -- ^ returns whether the range's slider has a fixed size.+rangeGetSliderSizeFixed self = liftM toBool $ {#call gtk_range_get_slider_size_fixed #} (toRange self) -- | Sets the minimum size of the range's slider.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeSetMinSliderSize :: RangeClass self => self -> Bool@@ -395,10 +395,10 @@ -- | Sets whether the range's slider has a fixed size, or a size that depends on it's adjustment's page -- size.--- +-- -- This function is useful mainly for 'Range' subclasses. rangeSetSliderSizeFixed :: RangeClass self => self- -> Bool -- ^ @sizeFixed@ 'True' to make the slider size constant + -> Bool -- ^ @sizeFixed@ 'True' to make the slider size constant -> IO () rangeSetSliderSizeFixed self sizeFixed = {#call gtk_range_set_slider_size_fixed #}@@ -413,7 +413,7 @@ -- | How the range should be updated on the screen. -- -- Default value: 'UpdateContinuous'--- +-- -- Removed in Gtk3. rangeUpdatePolicy :: RangeClass self => Attr self UpdateType rangeUpdatePolicy = newAttr@@ -530,9 +530,9 @@ -- the event itself and return 'True' to prevent further -- processing. Or, by returning 'False', it can pass the event to -- other handlers until the default GTK+ handler is reached.--- +-- -- * Since Gtk 2.6--- +-- onRangeChangeValue, afterRangeChangeValue :: RangeClass self => self -> (ScrollType -> Double -> IO Bool) -> IO (ConnectId self)
Graphics/UI/Gtk/Abstract/Scale.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Scale ( -- * Detail--- +-- -- | A 'Scale' is a slider control used to select a numeric value. To use it, -- you'll probably want to investigate the methods on its base class, 'Range', -- in addition to the methods for 'Scale' itself. To set the value of a scale,
Graphics/UI/Gtk/Abstract/Scrollbar.hs view
@@ -27,8 +27,8 @@ -- module Graphics.UI.Gtk.Abstract.Scrollbar ( -- * Detail--- --- | The 'Scrollbar' widget is an abstract base class for +--+-- | The 'Scrollbar' widget is an abstract base class for -- 'Graphics.UI.Gtk.Scrolling.HScrollbar' and -- 'Graphics.UI.Gtk.Scrolling.VScrollbar'. It is not very useful in itself. --
Graphics/UI/Gtk/Abstract/Separator.hs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Abstract.Separator ( -- * Detail--- +-- -- | The 'Separator' widget is an abstract class, used only for deriving the -- subclasses 'Graphics.UI.Gtk.Ornaments.HSeparator' and -- 'Graphics.UI.Gtk.Ornaments.VSeparator'.
Graphics/UI/Gtk/Abstract/Widget.chs view
@@ -82,6 +82,7 @@ DirectionType(..), StockId, WidgetHelpType(..),+ Allocation, -- * Methods widgetShow,@@ -92,14 +93,26 @@ widgetHideAll, #endif widgetDestroy,+#if GTK_CHECK_VERSION(3,0,0)+ widgetDraw,+#endif widgetQueueDraw, widgetQueueResize, #if GTK_CHECK_VERSION(2,4,0) widgetQueueResizeNoRedraw, #endif+#if GTK_CHECK_VERSION(3,8,0)+ widgetGetFrameClock,+#endif+#if GTK_CHECK_VERSION(3,10,0)+ widgetGetScaleFactor,+#endif widgetSizeRequest, widgetGetChildRequisition, widgetSizeAllocate,+#if GTK_CHECK_VERSION(3,10,0)+ widgetSizeAllocateWithBaseline,+#endif widgetAddAccelerator, widgetRemoveAccelerator, widgetSetAccelPath,@@ -157,6 +170,10 @@ widgetInputShapeCombineMask, #endif #endif+#if GTK_CHECK_VERSION(3,0,0)+ widgetShapeCombineRegion,+ widgetInputShapeCombineRegion,+#endif #if GTK_CHECK_VERSION(2,12,0) widgetGetTooltipWindow, widgetSetTooltipWindow,@@ -186,6 +203,9 @@ widgetCreateLayout, widgetRenderIcon, widgetQueueDrawArea,+#if GTK_CHECK_VERSION(3,0,0)+ widgetQueueDrawRegion,+#endif #if GTK_MAJOR_VERSION < 3 widgetResetShapes, #endif@@ -235,6 +255,13 @@ widgetGetAllocatedWidth, widgetGetAllocatedHeight, #endif+#if GTK_CHECK_VERSION(3,10,0)+ widgetGetAllocatedBaseline,+#endif+#if GTK_CHECK_VERSION(3,14,0)+ widgetGetClip,+ widgetSetClip,+#endif widgetGetState, widgetSetState, #if GTK_MAJOR_VERSION < 3@@ -242,6 +269,15 @@ widgetGetSize, #endif widgetEvent,+#if GTK_CHECK_VERSION(3,0,0)+ widgetGetHAlign,+ widgetSetHAlign,+ widgetGetVAlign,+#if GTK_CHECK_VERSION(3,10,0)+ widgetGetVAlignWithBaseline,+#endif+ widgetSetVAlign,+#endif -- * Attributes widgetName,@@ -269,6 +305,8 @@ #if GTK_MAJOR_VERSION < 3 widgetExtensionEvents, #endif+ widgetExpand,+ widgetHExpand, widgetNoShowAll, widgetChildVisible, #if GTK_MAJOR_VERSION < 3@@ -284,7 +322,7 @@ widgetGetRealized, widgetGetMapped, #endif-#if GTK_MAJOR_VERSION >= 3+#if GTK_CHECK_VERSION(3,0,0) widgetGetStyleContext, #endif @@ -299,6 +337,9 @@ hideSignal, focus, stateChanged,+#if GTK_CHECK_VERSION(3,0,0)+ stateFlagsChanged,+#endif parentSet, hierarchyChanged, styleSet,@@ -420,15 +461,17 @@ import Data.Maybe (fromMaybe) import Control.Monad.Reader (ask) import Control.Monad.Trans (liftIO)-import Data.Bits ((.&.), complement) import System.Glib.FFI-import System.Glib.Flags (fromFlags, toFlags)+import System.Glib.Flags (fromFlags, toFlags)+#if GTK_CHECK_VERSION(3,0,0)+import System.Glib.GError (failOnGError)+import System.Glib.Flags (Flags)+#endif import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject, makeNewGObject) import System.Glib.GType (GType)-import System.Glib.GList (GList, fromGList)+import System.Glib.GList (fromGList) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.General.DNDTypes (Atom (Atom), SelectionTag) {#import Graphics.UI.Gtk.Types#}@@ -454,21 +497,9 @@ ,widgetGetDrawWindow, widgetGetSize #endif )-import Graphics.UI.Gtk.Gdk.Events (Event(..), marshalEvent,- marshExposeRect,- EventButton,- EventScroll,- EventMotion,- EventExpose,- EventKey,- EventConfigure,- EventCrossing,- EventFocus,- EventProperty,- EventProximity,- EventVisibility,- EventWindowState,- EventGrabBroken)+#ifndef DISABLE_DEPRECATED+import Graphics.UI.Gtk.Gdk.Events (Event(..), marshalEvent, marshExposeRect)+#endif import Graphics.UI.Gtk.Gdk.EventM (EventM, EventM, EAny,@@ -484,15 +515,16 @@ EProperty, EProximity, EWindowState,-#if GTK_CHECK_VERSION(2,6,0)- EOwnerChange,-#endif #if GTK_CHECK_VERSION(2,8,0) EGrabBroken, #endif ) import Graphics.UI.Gtk.General.Enums (StateType(..), TextDirection(..),- AccelFlags(..), DirectionType(..), Modifier)+ AccelFlags(..), DirectionType(..), Modifier+#if GTK_CHECK_VERSION(3,0,0)+ ,StateFlags(..), Align(..)+#endif+ ) {#import Graphics.Rendering.Pango.Types#} {#import Graphics.Rendering.Pango.BasicTypes#} (FontDescription(FontDescription), PangoLayout(PangoLayout), makeNewPangoString )@@ -500,13 +532,12 @@ import Data.IORef ( newIORef ) import Control.Monad.Reader ( runReaderT ) #if GTK_CHECK_VERSION(3,0,0)-import Graphics.Rendering.Cairo.Types (Cairo(..))+import Graphics.Rendering.Cairo.Types (Cairo(..), unCairo, Region(..), withRegion) import Graphics.Rendering.Cairo.Internal (Render(..)) #endif {# context lib="gtk" prefix="gtk" #} - -------------------- -- Methods @@ -581,6 +612,36 @@ {# call widget_destroy #} (toWidget self) +#if GTK_CHECK_VERSION(3,0,0)+-- | Draws widget to @cr@. The top left corner of the widget will be drawn+-- to the currently set origin point of @cr@.+--+-- You should pass a cairo context as cr argument that is in an original+-- state. Otherwise the resulting drawing is undefined. For example changing+-- the operator using 'Graphics.Rendering.Cairo.setOperator' or the line+-- width using 'Graphics.Rendering.Cairo.setLineWidth' might have unwanted+-- side effects. You may however change the context’s transform matrix - like+-- with 'Graphics.Rendering.Cairo.scale', 'Graphics.Rendering.Cairo.translate'+-- or 'Graphics.Rendering.Cairo.setMatrix' and clip region with+-- 'Graphics.Rendering.Cairo.clip' prior to calling this function. Also, it+-- is fine to modify the context with 'Graphics.Rendering.Cairo.save' and+-- 'Graphics.Rendering.Cairo.pushGroup prior to calling this function.+--+-- Note that special-purpose widgets may contain special code for rendering+-- to the screen and might appear differently on screen and when rendered+-- using 'widgetDraw'.+--+widgetDraw :: WidgetClass self+ => self -- ^ the widget to draw. It must be drawable (see 'widgetIsDrawable')+ -- and a size must have been allocated.+ -> Cairo -- ^ a cairo context to draw to+ -> IO ()+widgetDraw self cr =+ {# call widget_draw #}+ (toWidget self)+ (castPtr $ unCairo cr)+#endif+ -- * Functions to be used with 'Graphics.UI.Gtk.Misc.DrawingArea' or -- container implementations. @@ -616,6 +677,48 @@ (toWidget self) #endif +#if GTK_CHECK_VERSION(3,8,0)+-- | Obtains the frame clock for a widget. The frame clock is a global “ticker”+-- that can be used to drive animations and repaints. The most common reason to+-- get the frame clock is to call 'frameClockGetFrameTime', in order to get a+-- time to use for animating. For example you might record the start of the+-- animation with an initial value from 'frameClockGetFrameTime', and then+-- update the animation by calling 'frameClockGetFrameTime' again during each+-- repaint.+--+-- 'frameClockRequestPhase' will result in a new frame on the clock, but won’t+-- necessarily repaint any widgets. To repaint a widget, you have to use+-- 'widgetQueueDraw' which invalidates the widget (thus scheduling it to+-- receive a draw on the next frame). 'widgetQueueDraw' will also end up+-- requesting a frame on the appropriate frame clock.+--+-- A widget’s frame clock will not change while the widget is mapped.+-- Reparenting a widget (which implies a temporary unmap) can change the+-- widget’s frame clock.+--+-- Unrealized widgets do not have a frame clock.+--+widgetGetFrameClock :: WidgetClass self => self -> IO FrameClock+widgetGetFrameClock self =+ makeNewGObject mkFrameClock $+ {# call widget_get_frame_clock #}+ (toWidget self)+#endif++#if GTK_CHECK_VERSION(3,10,0)+-- | Retrieves the internal scale factor that maps from window coordinates to+-- the actual device pixels. On traditional systems this is 1, on high density+-- outputs, it can be a higher value (typically 2).+--+-- See 'drawWindowGetScaleFactor'.+--+widgetGetScaleFactor :: WidgetClass self => self -> IO Int+widgetGetScaleFactor self =+ liftM fromIntegral $+ {# call widget_get_scale_factor #}+ (toWidget self)+#endif+ -- | This function is typically used when implementing a -- 'Graphics.UI.Gtk.Abstract.Container.Container' subclass. Obtains the preferred size -- of a widget. The container uses this information to arrange its child@@ -668,6 +771,31 @@ widgetSizeAllocate self rect = with rect $ \rectPtr -> {#call widget_size_allocate#} (toWidget self) (castPtr rectPtr) +#if GTK_CHECK_VERSION(3,10,0)+-- | This function is only used by+-- 'Graphics.UI.Gtk.Abstract.Container.Container' subclasses, to assign a+-- size, position and (optionally) baseline to their child widgets.+--+-- In this function, the allocation and baseline may be adjusted. It will+-- be forced to a 1x1 minimum size, and the adjust_size_allocation virtual+-- and adjust_baseline_allocation methods on the child will be used to adjust+-- the allocation and baseline. Standard adjustments include removing the+-- widget's margins, and applying the widget’s 'widgetHAlign' and+-- 'widgetVAlign' properties.+--+-- If the child widget does not have a valign of AlignBaseline the baseline+-- argument is ignored and -1 is used instead.+--+widgetSizeAllocateWithBaseline :: WidgetClass self => self+ -> Allocation -- ^ The @x@ and @y@ values of the rectangle determine the+ -- the position of the widget's area relative to its parent+ -- allocation.+ -> Int -- ^ The baseline of the child, or -1+ -> IO ()+widgetSizeAllocateWithBaseline self rect baseline = with rect $ \rectPtr ->+ {#call widget_size_allocate_with_baseline#} (toWidget self) (castPtr rectPtr) (fromIntegral baseline)+#endif+ -- %hash c:1e14 d:53c5 -- | Installs an accelerator for this @widget@ in @accelGroup@ that causes -- @accelSignal@ to be emitted if the accelerator is activated. The@@ -1272,6 +1400,31 @@ #endif #endif +#if GTK_CHECK_VERSION(3,0,0)+-- | Sets a shape for this widget’s GDK window. This allows for transparent+-- windows etc., see 'drawWindowShapeCombineRegion' for more information.+widgetShapeCombineRegion :: WidgetClass self => self+ -> Maybe Region+ -> IO ()+widgetShapeCombineRegion self region =+ withRegion (fromMaybe (Region nullForeignPtr) region) $ \ptrRegion ->+ {# call gtk_widget_shape_combine_region #}+ (toWidget self)+ (castPtr ptrRegion)++-- | Sets an input shape for this widget’s GDK window. This allows for windows+-- which react to mouse click in a nonrectangular region,+-- see 'drawWindowInputShapeCombineRegion' for more information.+widgetInputShapeCombineRegion :: WidgetClass self => self+ -> Maybe Region+ -> IO ()+widgetInputShapeCombineRegion self region =+ withRegion (fromMaybe (Region nullForeignPtr) region) $ \ptrRegion ->+ {# call gtk_widget_input_shape_combine_region #}+ (toWidget self)+ (castPtr ptrRegion)+#endif+ #if GTK_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'.@@ -1743,6 +1896,26 @@ (fromIntegral width) (fromIntegral height) +#if GTK_CHECK_VERSION(3,0,0)+-- | Invalidates the area of widget defined by @region@ by calling+-- 'drawWindowInvalidateRegion' on the widget’s window and all its child+-- windows. Once the main loop becomes idle (after the current batch of+-- events has been processed, roughly), the window will receive expose events+-- for the union of all regions that have been invalidated.+--+-- Normally you would only use this function in widget implementations. You+-- might also use it to schedule a redraw of a DrawingArea or some portion+-- thereof.+widgetQueueDrawRegion :: WidgetClass self => self+ -> Region+ -> IO ()+widgetQueueDrawRegion self region =+ withRegion region $ \regionPtr ->+ {# call gtk_widget_queue_draw_region #}+ (toWidget self)+ (castPtr regionPtr)+#endif+ #if GTK_MAJOR_VERSION < 3 -- %hash c:5ffb d:3e1a -- | Recursively resets the shape on this widget and its descendants.@@ -2324,6 +2497,50 @@ liftM fromIntegral $ {#call widget_get_allocated_height#} (toWidget widget) #endif +#if GTK_CHECK_VERSION(3,10,0)+-- | Returns the baseline that has currently been allocated to widget . This function is intended+-- to be used when implementing handlers for the “draw” function, and when allocating child+-- widgets in “size_allocate”.+widgetGetAllocatedBaseline :: WidgetClass self => self -> IO Int+widgetGetAllocatedBaseline widget =+ liftM fromIntegral $ {#call widget_get_allocated_baseline#} (toWidget widget)+#endif++#if GTK_CHECK_VERSION(3,14,0)+-- | Retrieves the widget’s clip area.+--+-- The clip area is the area in which all of widget's drawing will happen. Other+-- toolkits call it the bounding box.+--+-- Historically, in GTK+ the clip area has been equal to the allocation retrieved+-- via widgetGetAllocation.+widgetGetClip :: WidgetClass self => self -> IO Allocation+widgetGetClip widget =+ alloca $ \ allocationPtr -> do+ {#call widget_get_clip#} (toWidget widget) (castPtr allocationPtr)+ peek allocationPtr++-- | Sets the widget’s clip. This must not be used directly, but from within a widget’s 'sizeAllocate' method.+--+-- The clip set should be the area that widget draws on. If widget is a GtkContainer, the area+-- must contain all children's clips.+--+-- If this function is not called by widget during a 'sizeAllocate' handler, it is assumed to be+-- equal to the allocation. However, if the function is not called, certain features that might extend+-- a widget's allocation will not be available:+--+-- * The “draw” signal will be clipped to the widget's allocation to avoid overdraw.+--+-- * Calling gtk_render_background() will not draw outset shadows.+--+-- It is therefore suggested that you always call widgetSetClip during a 'sizeAllocate' handler.+widgetSetClip :: WidgetClass self => self+ -> Allocation+ -> IO ()+widgetSetClip self clip = with clip $ \clipPtr ->+ {#call widget_set_clip#} (toWidget self) (castPtr clipPtr)+#endif+ #if GTK_CHECK_VERSION(2,18,0) -- | Retrieve the current state of the widget. --@@ -2532,6 +2749,20 @@ widgetSetExtensionEvents #endif +-- | Whether to expand in both directions. Setting this sets both 'widgetHExpand' and 'widgetVExpand'+--+-- Default value: @False@+--+widgetExpand :: WidgetClass self => Attr self Bool+widgetExpand = newAttrFromBoolProperty "expand"++-- | Whether to expand in both directions. Setting this sets both 'widgetHExpand' and 'widgetVExpand'+--+-- Default value: @False@+--+widgetHExpand :: WidgetClass self => Attr self Bool+widgetHExpand = newAttrFromBoolProperty "hexpand"+ -- %hash c:1605 d:48ea -- | Whether 'widgetShowAll' should not affect this widget. --@@ -2648,7 +2879,7 @@ #endif -#if GTK_MAJOR_VERSION >= 3+#if GTK_CHECK_VERSION(3,0,0) -- | Returns the style context associated to @widget@. widgetGetStyleContext :: WidgetClass widget => widget -- ^ @widget@ : a @Widget@@@ -2657,8 +2888,56 @@ makeNewGObject mkStyleContext $ {# call gtk_widget_get_style_context #} (toWidget widget)++-- | Gets the value of the `widgetHAlign` property.+--+-- For backwards compatibility reasons this method will never return AlignBaseline,+-- but instead it will convert it to AlignFill. Baselines are not supported for+-- horizontal alignment.+--+widgetGetHAlign :: WidgetClass self => self -> IO Align+widgetGetHAlign self =+ liftM (toEnum . fromIntegral) $+ {# call gtk_widget_get_halign #}+ (toWidget self)++-- | Sets the horizontal alignment of widget. See the 'widgetHAlign' property.+--+widgetSetHAlign :: WidgetClass self => self -> Align -> IO ()+widgetSetHAlign self align =+ {# call gtk_widget_set_halign #}+ (toWidget self)+ (fromIntegral $ fromEnum align)++-- | Gets the value of the 'widgetVAlign' property.+--+-- For backwards compatibility reasons this method will never return AlignBaseline,+-- but instead it will convert it to AlignFill. If your widget want to support+-- baseline aligned children it must use 'widgetGetVAlignWithBaseline', or+-- 'widgetVAlign', which will also report the true value.+widgetGetVAlign :: WidgetClass self => self -> IO Align+widgetGetVAlign self =+ liftM (toEnum . fromIntegral) $+ {# call gtk_widget_get_valign #}+ (toWidget self)++#if GTK_CHECK_VERSION(3,10,0)+-- | Gets the value of the 'widgetVAlign' property, including AlignBaseline.+widgetGetVAlignWithBaseline :: WidgetClass self => self -> IO Align+widgetGetVAlignWithBaseline self =+ liftM (toEnum . fromIntegral) $+ {# call gtk_widget_get_valign_with_baseline #}+ (toWidget self) #endif +-- | Sets the vertical alignment of widget . See the 'widgetVAlign' property.+widgetSetVAlign :: WidgetClass self => self -> Align -> IO ()+widgetSetVAlign self align =+ {# call gtk_widget_set_valign #}+ (toWidget self)+ (fromIntegral $ fromEnum align)+#endif+ -------------------- -- Signals @@ -2738,6 +3017,25 @@ stateChanged :: WidgetClass self => Signal self (StateType -> IO ()) stateChanged = Signal (connect_ENUM__NONE "state-changed") +#if GTK_CHECK_VERSION(3,0,0)+connect_FLAGS__NONE ::+ (Flags a, GObjectClass obj) => SignalName ->+ ConnectAfter -> obj ->+ ([a] -> IO ()) ->+ IO (ConnectId obj)+connect_FLAGS__NONE signal after obj user =+ connectGeneric signal after obj action+ where action :: Ptr GObject -> Int -> IO ()+ action _ flags1 =+ failOnGError $+ user (toFlags flags1)++-- | The state of the widget (input focus, insensitive, etc.) has changed.+--+stateFlagsChanged :: WidgetClass self => Signal self ([StateFlags] -> IO ())+stateFlagsChanged = Signal (connect_FLAGS__NONE "state-flags-changed")+#endif+ -- %hash c:bef2 d:1d66 -- | The 'parentSet' signal is emitted when a new parent has been set on a -- widget. The parameter is the new parent.@@ -3027,8 +3325,9 @@ -- identified by a 'PropertyTag'. This event is triggered if a property is -- changed or deleted. Sets the widget's 'PropertyChangeMask' flag. ---propertyNotifyEvent :: WidgetClass self => Signal self (EventM EProperty Bool)-propertyNotifyEvent = Signal (eventM "property_notify_event" [PropertyChangeMask])+_propertyNotifyEvent :: WidgetClass self => Signal self (EventM EProperty Bool)+_propertyNotifyEvent = Signal (eventM "property_notify_event" [PropertyChangeMask])+ {- not sure if these are useful -- %hash c:58cc d:af3f -- |
Graphics/UI/Gtk/ActionMenuToolbar/Action.chs view
@@ -153,7 +153,6 @@ import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}
Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs view
@@ -113,8 +113,6 @@ import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject,- makeNewGObject, destroyFunPtr) {#import Graphics.UI.Gtk.Types#} import System.Glib.Signals (on)
Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs view
@@ -88,7 +88,6 @@ import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems
Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs view
@@ -65,13 +65,11 @@ ) where import Control.Monad (liftM)-import Data.Maybe (fromMaybe) import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties import System.Glib.UTFString-import System.Glib.GObject (wrapNewGObject) {#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs view
@@ -83,7 +83,6 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems
Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs view
@@ -262,7 +262,6 @@ import System.Glib.GError import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject, makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}
Graphics/UI/Gtk/Builder.chs view
@@ -100,7 +100,6 @@ import System.Glib.GError import System.Glib.GList import System.Glib.UTFString-import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Buttons/Button.chs view
@@ -269,36 +269,6 @@ {# call unsafe button_get_relief #} (toButton self) -#if GTK_CHECK_VERSION(2,4,0)--- %hash c:d8cb d:1e7d--- | If the child of the button is a 'Misc' or 'Alignment', this property can--- be used to control it's horizontal alignment. 0.0 is left aligned, 1.0 is--- right aligned.------ Allowed values: [0,1]------ Default value: 0.5------ * Available since Gtk+ version 2.4----buttonXAlign :: ButtonClass self => Attr self Float-buttonXAlign = newAttrFromFloatProperty "xalign"---- %hash c:ce4e d:4fec--- | If the child of the button is a 'Misc' or 'Alignment', this property can--- be used to control it's vertical alignment. 0.0 is top aligned, 1.0 is--- bottom aligned.------ Allowed values: [0,1]------ Default value: 0.5------ * Available since Gtk+ version 2.4----buttonYAlign :: ButtonClass self => Attr self Float-buttonYAlign = newAttrFromFloatProperty "yalign"-#endif- -- | Sets the text of the label of the button. This text is also used -- to select the stock item if 'buttonSetUseStock' is used. --
Graphics/UI/Gtk/Buttons/LinkButton.chs view
@@ -84,7 +84,7 @@ #endif ) where -import Control.Monad (liftM, unless)+import Control.Monad (liftM) import System.Glib.FFI import System.Glib.UTFString@@ -92,7 +92,6 @@ import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#} {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Cairo.chs view
@@ -25,7 +25,7 @@ -- Stability : provisional -- Portability : portable (depends on GHC) ----- +-- -- Gtk specific functions to for redering with Cairo. -- -- Cairo is a graphics library that supports vector graphics and image@@ -58,6 +58,7 @@ #endif setSourceColor, setSourcePixbuf,+ rectangle, updateContext, createLayout, updateLayout,@@ -86,7 +87,6 @@ {#import Graphics.Rendering.Cairo.Types#} as Cairo #endif import qualified Graphics.Rendering.Cairo.Internal as Cairo.Internal-import qualified Graphics.Rendering.Cairo as Cairo import Graphics.Rendering.Cairo.Internal (Render(Render)) import Control.Monad.Reader import Graphics.UI.Gtk.General.Structs (Rectangle(..))
Graphics/UI/Gtk/Display/Image.chs view
@@ -148,7 +148,6 @@ import System.Glib.Attributes import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject)-import System.Glib.GObject (makeNewGObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.StockItems import Graphics.UI.Gtk.General.Structs (IconSize(..))
Graphics/UI/Gtk/Display/Label.chs view
@@ -190,6 +190,13 @@ #endif labelLineWrap, labelText,++-- * Signals+ labelActiveCurrentLink,+ labelActiveLink,+ labelCopyClipboard,+ labelMoveCursor,+ labelPopulatePopup ) where import Control.Monad (liftM)@@ -200,21 +207,16 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (makeNewGObject) {#import Graphics.Rendering.Pango.Layout#} import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.Rendering.Pango.Attributes ( withAttrList, fromAttrList) import Graphics.UI.Gtk.Gdk.Keys (KeyVal) import Graphics.UI.Gtk.General.Enums (Justification(..), MovementStep (..))-import Graphics.Rendering.Pango.Markup {#import Graphics.Rendering.Pango.BasicTypes#} (PangoLayout(PangoLayout), makeNewPangoString, PangoString(..) ) import Graphics.Rendering.Pango.Types (mkPangoLayoutRaw, PangoLayoutRaw) import Graphics.Rendering.Pango.Enums (PangoAttribute)-#if GTK_CHECK_VERSION(2,6,0)-import Graphics.Rendering.Pango.Enums (EllipsizeMode(..))-#endif import Data.IORef ( newIORef ) {#import Graphics.UI.Gtk.Signals#}
Graphics/UI/Gtk/Display/Spinner.chs view
@@ -28,10 +28,10 @@ module Graphics.UI.Gtk.Display.Spinner ( #if GTK_CHECK_VERSION(2,20,0) -- * Detail--- +-- -- | A 'Spinner' widget displays an icon-size spinning animation. It is often used as an alternative to -- a 'ProgressBar' for displaying indefinite activity, instead of actual progress.--- +-- -- To start the animation, use 'spinnerStart'. -- * Types@@ -44,8 +44,8 @@ -- * Methods spinnerStart, spinnerStop,- --- * Attributes ++-- * Attributes spinnerActive, #endif ) where@@ -53,12 +53,10 @@ import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#} {# context lib="gtk" prefix="gtk" #} @@ -68,7 +66,7 @@ -- | Returns a new spinner widget. Not yet started. spinnerNew :: IO Spinner-spinnerNew = +spinnerNew = makeNewObject mkSpinner $ liftM (castPtr :: Ptr Widget -> Ptr Spinner) $ {# call unsafe spinner_new #}@@ -92,7 +90,7 @@ -- Attributes -- | Whether the spinner is active.--- +-- -- Default value: 'False' spinnerActive :: SpinnerClass spinner => Attr spinner Bool spinnerActive = newAttrFromBoolProperty "active"
Graphics/UI/Gtk/Display/StatusIcon.chs view
@@ -165,7 +165,6 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject,makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.Enums#} import Graphics.UI.Gtk.General.Structs
Graphics/UI/Gtk/Display/Statusbar.chs view
@@ -116,7 +116,9 @@ import System.Glib.FFI import System.Glib.UTFString+#if GTK_MAJOR_VERSION < 3 import System.Glib.Attributes+#endif import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}
Graphics/UI/Gtk/Embedding/Embedding.hsc view
@@ -32,12 +32,12 @@ #endif ) where +#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) && GTK_MAJOR_VERSION < 3 import System.Glib.FFI import Graphics.UI.Gtk.Types -#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) && GTK_MAJOR_VERSION < 3 -- | Test if a Plug is connected to the socket.--- +-- socketHasPlug :: SocketClass s => s -> IO Bool socketHasPlug socket = do plugPtr <- withForeignPtr (unSocket (toSocket socket))
Graphics/UI/Gtk/Embedding/Plug.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Embedding.Plug ( -- * Detail--- +-- -- | Together with 'Socket', 'Plug' provides the ability to embed widgets from -- one process into another process in a fashion that is transparent to the -- user. One process creates a 'Socket' widget and, passes the ID of that@@ -78,6 +78,8 @@ #endif ) where +#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))+ import Control.Monad (liftM) import Data.Maybe (fromMaybe) @@ -94,8 +96,6 @@ {# context lib="gtk" prefix="gtk" #} -#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))- -------------------- -- Constructors @@ -108,7 +108,7 @@ -- then a 'NativeWindowId' can be extracted from this 'Plug' using 'plugGetId' -- and be passed to the application which is to be embedded. ---plugNew :: +plugNew :: Maybe NativeWindowId -- ^ @socketId@ - the window ID of the socket, or -- @Nothing@. -> IO Plug@@ -180,7 +180,7 @@ -- | @True@ if the plug is embedded in a socket. -- -- Default value: @False@--- +-- -- * Available since Gtk+ version 2.12 -- plugAttrEmbedded :: PlugClass self => ReadAttr self Bool@@ -189,7 +189,7 @@ -- | The window of the socket the plug is embedded in. -- -- * Available since Gtk+ version 2.14--- +-- plugAttrSocketWindow :: PlugClass self => ReadAttr self (Maybe DrawWindow) plugAttrSocketWindow = readAttrFromMaybeObjectProperty "socket-window" #if GTK_MAJOR_VERSION < 3
Graphics/UI/Gtk/Embedding/Socket.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Embedding.Socket ( -- * Detail--- +-- -- | Together with 'Plug', 'Socket' provides the ability to embed widgets from -- one process into another process in a fashion that is transparent to the -- user. One process creates a 'Socket' widget and, passes the that widget's@@ -41,11 +41,11 @@ -- added to its parent. -- -- * Obtaining the window ID of a socket.--- +-- -- > socket <- socketNew -- > widgetShow socket -- > containerAdd parent socket--- > +-- > -- > -- The following call is only necessary if one of -- > -- the ancestors of the socket is not yet visible. -- > --@@ -115,6 +115,8 @@ #endif ) where +#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))+ import Control.Monad (liftM) import Data.Maybe (isJust) @@ -130,8 +132,6 @@ import Graphics.UI.Gtk.General.Structs {# context lib="gtk" prefix="gtk" #}--#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) -------------------- -- Constructors
Graphics/UI/Gtk/Entry/Entry.chs view
@@ -162,7 +162,6 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.General.Enums (DeleteType (..), MovementStep (..) #if GTK_CHECK_VERSION(2,16,0)@@ -812,14 +811,6 @@ onEntryActivate = connect_NONE__NONE "activate" False afterEntryActivate = connect_NONE__NONE "activate" True --- | Emitted when the settings of the--- 'Entry' widget changes.----onEntryChanged, afterEntryChanged :: EntryClass ec => ec -> IO () ->- IO (ConnectId ec)-onEntryChanged = connect_NONE__NONE "changed" False-afterEntryChanged = connect_NONE__NONE "changed" True- -- | Emitted when the current selection has been -- copied to the clipboard. --@@ -843,14 +834,6 @@ IO (ConnectId ec) onPasteClipboard = connect_NONE__NONE "paste_clipboard" False afterPasteClipboard = connect_NONE__NONE "paste_clipboard" True---- | Emitted when a piece of text is deleted from--- the 'Entry'.----onDeleteText, afterDeleteText :: EntryClass ec => ec ->- (Int -> Int -> IO ()) -> IO (ConnectId ec)-onDeleteText = connect_INT_INT__NONE "delete_text" False-afterDeleteText = connect_INT_INT__NONE "delete_text" True -- | Emitted when the user changes from -- overwriting to inserting.
Graphics/UI/Gtk/Entry/EntryCompletion.chs view
@@ -141,8 +141,6 @@ import System.Glib.FFI import System.Glib.UTFString import System.Glib.Attributes-import System.Glib.GObject (wrapNewGObject,- makeNewGObject, destroyFunPtr) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}
Graphics/UI/Gtk/Entry/HScale.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Entry.HScale ( -- * Detail--- +-- -- | The 'HScale' widget is used to allow the user to select a value using a -- horizontal slider. To create one, use 'hScaleNewWithRange'. --@@ -69,7 +69,7 @@ -- | Creates a new 'HScale'. ---hScaleNew :: +hScaleNew :: Adjustment -- ^ @adjustment@ - the 'Adjustment' which sets the range of -- the scale. -> IO HScale@@ -88,7 +88,7 @@ -- is a power of ten. If the resulting precision is not suitable for your -- needs, use 'Graphics.UI.Gtk.Abstract.Scale.scaleSetDigits' to correct it. ---hScaleNewWithRange :: +hScaleNewWithRange :: Double -- ^ @min@ - minimum value -> Double -- ^ @max@ - maximum value -> Double -- ^ @step@ - step increment (tick size) used with keyboard
Graphics/UI/Gtk/Entry/SpinButton.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Entry.SpinButton ( -- * Detail--- +-- -- | A 'SpinButton' is an ideal way to allow the user to set the value of some -- attribute. Rather than having to directly type a number into a 'Entry', -- 'SpinButton' allows the user to click on one of two arrows to increment or@@ -125,7 +125,7 @@ -- | Creates a new 'SpinButton'. ---spinButtonNew :: +spinButtonNew :: Adjustment -- ^ @adjustment@ - the 'Adjustment' object that this spin -- button should use. -> Double -- ^ @climbRate@ - specifies how much the spin button@@ -149,7 +149,7 @@ -- is a power of ten. If the resulting precision is not suitable for your -- needs, use 'spinButtonSetDigits' to correct it. ---spinButtonNewWithRange :: +spinButtonNewWithRange :: Double -- ^ @min@ - Minimum allowable value -> Double -- ^ @max@ - Maximum allowable value -> Double -- ^ @step@ - Increment added or subtracted by spinning the
Graphics/UI/Gtk/Entry/VScale.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Entry.VScale ( -- * Detail--- +-- -- | The 'VScale' widget is used to allow the user to select a value using a -- vertical slider. To create one, use 'vScaleNewWithRange'. --@@ -69,7 +69,7 @@ -- | Creates a new 'VScale'. ---vScaleNew :: +vScaleNew :: Adjustment -- ^ @adjustment@ - the 'Adjustment' which sets the range of -- the scale. -> IO VScale@@ -88,7 +88,7 @@ -- is a power of ten. If the resulting precision is not suitable for your -- needs, use 'Graphics.UI.Gtk.Abstract.Scale.scaleSetDigits' to correct it. ---vScaleNewWithRange :: +vScaleNewWithRange :: Double -- ^ @min@ - minimum value -> Double -- ^ @max@ - maximum value -> Double -- ^ @step@ - step increment (tick size) used with keyboard
Graphics/UI/Gtk/Gdk/AppLaunchContext.chs view
@@ -48,11 +48,8 @@ #endif ) where -import Control.Monad (liftM)- import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GObject (wrapNewGObject) import Graphics.UI.Gtk.Gdk.EventM (TimeStamp) {#import Graphics.UI.Gtk.Types#} #ifdef HAVE_GIO
Graphics/UI/Gtk/Gdk/Cursor.chs view
@@ -52,13 +52,9 @@ import System.Glib.FFI import System.Glib.UTFString-import Foreign.ForeignPtr (ForeignPtr, castForeignPtr)-#if __GLASGOW_HASKELL__ >= 707-import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)-#else-import Foreign.ForeignPtr (unsafeForeignPtrToPtr)+#if GTK_MAJOR_VERSION < 3+import Graphics.UI.Gtk.General.Structs (Color) #endif-import Graphics.UI.Gtk.General.Structs {#import Graphics.UI.Gtk.Types#} hiding (Arrow)
Graphics/UI/Gtk/Gdk/Display.chs view
@@ -121,7 +121,6 @@ {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Signals import Graphics.UI.Gtk.Gdk.EventM-import Graphics.UI.Gtk.Gdk.Enums (Modifier(..)) import Graphics.UI.Gtk.General.DNDTypes (SelectionTag, TargetTag, Atom(..)) {# context lib="gdk" prefix="gdk" #}
Graphics/UI/Gtk/Gdk/DisplayManager.chs view
@@ -62,13 +62,10 @@ #endif ) where -import Control.Monad (liftM)- import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties import System.Glib.GList-import System.Glib.GObject (constructNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -89,7 +86,7 @@ -- | List all currently open displays. -- displayManagerListDisplays :: DisplayManagerClass self => self- -> IO [Display] -- ^ returns a newly allocated list of 'Display' objects. + -> IO [Display] -- ^ returns a newly allocated list of 'Display' objects. displayManagerListDisplays self = {# call gdk_display_manager_list_displays #} (toDisplayManager self)
Graphics/UI/Gtk/Gdk/DrawWindow.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Gdk.DrawWindow ( -- A 'DrawWindow' is used to implement high-level objects such as 'Widget' and--- 'Window' on the Gtk+ level. +-- 'Window' on the Gtk+ level. -- -- Most widgets draws its content into a 'DrawWindow', in particular -- 'DrawingArea' is nothing but a widget that contains a 'DrawWindow'.@@ -61,6 +61,7 @@ #endif drawWindowRaise, drawWindowLower,+ drawWindowRegisterDnd, drawWindowBeginPaintRect, #if GTK_MAJOR_VERSION < 3 drawWindowBeginPaintRegion,@@ -102,26 +103,19 @@ import System.Glib.FFI import System.Glib.Flags (toFlags)-import System.Glib.GObject (wrapNewGObject,makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Gdk.Enums#} #if GTK_MAJOR_VERSION < 3 {#import Graphics.UI.Gtk.Gdk.Region#} #endif {#import Graphics.UI.Gtk.Gdk.Cursor#}-import Graphics.UI.Gtk.Gdk.EventM (Modifier,-#if GTK_MAJOR_VERSION < 3- eventRegion,-#endif- ) import Graphics.UI.Gtk.General.Structs-import Graphics.UI.Gtk.Abstract.Widget (widgetSetDoubleBuffered) {# context lib="gdk" prefix="gdk" #} -- | Gets the bitwise OR of the currently active drawWindow state flags, from -- the 'WindowState' enumeration.--- +-- drawWindowGetState :: DrawWindowClass self => self -> IO [WindowState] -- ^ returns @DrawWindow@ flags drawWindowGetState self =@@ -139,7 +133,7 @@ -- if the edges of the window's parent do not extend beyond the edges of the -- drawWindow. In other cases, a multi-step process is used to scroll the window -- which may produce temporary visual artifacts and unnecessary invalidations.)--- +-- drawWindowScroll :: DrawWindowClass self => self -> Int -- ^ @dx@ - Amount to scroll in the X direction -> Int -- ^ @dy@ - Amount to scroll in the Y direction@@ -152,7 +146,7 @@ #if GTK_MAJOR_VERSION < 3 -- | Clears an entire @DrawWindow@ to the background color or background pixmap.--- +-- -- Removed in Gtk3. drawWindowClear :: DrawWindowClass self => self -> IO () drawWindowClear self =@@ -160,8 +154,8 @@ (toDrawWindow self) -- | Clears an area of @DrawWindow@ to the background color or background pixmap.--- --- Removed in Gtk3. +--+-- Removed in Gtk3. drawWindowClearArea :: DrawWindowClass self => self -> Int -- ^ @x@ - x coordinate of rectangle to clear -> Int -- ^ @y@ - y coordinate of rectangle to clear@@ -178,7 +172,7 @@ -- | Like 'drawWindowClearArea', but also generates an expose event for the -- cleared area.--- +-- -- Removed in Gtk3. drawWindowClearAreaExpose :: DrawWindowClass self => self -> Int -- ^ @x@ - x coordinate of rectangle to clear@@ -202,7 +196,7 @@ -- If @DrawWindow@ is a toplevel, the window manager may choose to deny the -- request to move the drawWindow in the Z-order, 'drawWindowRaise' only requests the -- restack, does not guarantee it.--- +-- drawWindowRaise :: DrawWindowClass self => self -> IO () drawWindowRaise self = {# call gdk_window_raise #}@@ -227,7 +221,7 @@ (toDrawWindow self) -- | Registers a drawWindow as a potential drop destination.--- +-- drawWindowRegisterDnd :: DrawWindowClass self => self -> IO () drawWindowRegisterDnd self = {# call gdk_window_register_dnd #}@@ -237,7 +231,7 @@ -- rectangular region for you. -- -- * See 'drawWindowBeginPaintRegion' for details.--- +-- drawWindowBeginPaintRect :: DrawWindowClass self => self -> Rectangle -- ^ @rectangle@ - rectangle you intend to draw to -> IO ()@@ -281,7 +275,7 @@ -- drawing operations affect only the topmost backing store in the stack. One -- matching call to 'drawWindowEndPaint' is required for each call to -- 'drawWindowBeginPaintRegion'.--- +-- -- Removed in Gtk3. drawWindowBeginPaintRegion :: DrawWindowClass self => self -> Region -- ^ @region@ - region you intend to draw to@@ -299,7 +293,7 @@ -- next-most-recent backing store or no backing store at all as the active -- paint region. See 'drawWindowBeginPaintRegion' for full details. It is an error -- to call this function without a matching 'drawWindowBeginPaintRegion' first.--- +-- drawWindowEndPaint :: DrawWindowClass self => self -> IO () drawWindowEndPaint self = {# call gdk_window_end_paint #}@@ -307,7 +301,7 @@ -- | A convenience wrapper around 'drawWindowInvalidateRegion' which invalidates a -- rectangular region. See 'drawWindowInvalidateRegion' for details.--- +-- drawWindowInvalidateRect :: DrawWindowClass self => self -> Rectangle -- ^ @rect@ - rectangle to invalidate -> Bool -- ^ @invalidateChildren@ - whether to also invalidate@@ -330,7 +324,7 @@ -- The @invalidateChildren@ parameter controls whether the region of each -- child drawWindow that intersects @region@ will also be invalidated. If @False@, -- then the update area for child drawWindows will remain unaffected.--- +-- drawWindowInvalidateRegion :: DrawWindowClass self => self -> Region -- ^ @region@ - a "Region" -> Bool -- ^ @invalidateChildren@ - @True@ to also invalidate child@@ -350,7 +344,7 @@ -- function. That is, after calling this function, @DrawWindow@ will no longer have -- an invalid\/dirty region; the update area is removed from @DrawWindow@ and -- handed to you. If this window has no update area, 'drawWindowGetUpdateArea' returns 'Nothing'.--- +-- -- Removed in Gtk3. drawWindowGetUpdateArea :: DrawWindowClass self => self -> IO (Maybe Region) -- ^ returns the update area for @DrawWindow@@@ -360,19 +354,19 @@ #endif -- | Temporarily freezes a drawWindow such that it won\'t receive expose events.--- * The drawWindow will begin receiving expose events again when +-- * The drawWindow will begin receiving expose events again when -- 'drawWindowThawUpdates' -- is called. If 'drawWindowFreezeUpdates' has been called more than once, -- 'drawWindowThawUpdates' must be called an equal number of times to begin -- processing exposes.--- +-- drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO () drawWindowFreezeUpdates self = {# call gdk_window_freeze_updates #} (toDrawWindow self) -- | Thaws a drawWindow frozen with 'drawWindowFreezeUpdates'.--- +-- drawWindowThawUpdates :: DrawWindowClass self => self -> IO () drawWindowThawUpdates self = {# call gdk_window_thaw_updates #}@@ -388,7 +382,7 @@ -- and synchronously (vs. the usual case, where Gtk delivers them in an idle -- handler). Occasionally this is useful to produce nicer scrolling behavior, -- for example.--- +-- drawWindowProcessUpdates :: DrawWindowClass self => self -> Bool -- ^ @updateChildren@ - whether to also process updates for child -- drawWindows@@ -406,7 +400,7 @@ -- hint. ICCCM-compliant drawWindow manager usually respect it. -- -- * Available since Gdk version 2.4--- +-- drawWindowSetAcceptFocus :: DrawWindowClass self => self -> Bool -- ^ @acceptFocus@ - @True@ if the drawWindow should receive input focus -> IO ()@@ -428,7 +422,7 @@ -- -- * On the X11 platform, this uses an X server extension which is widely -- available on most common platforms, but not available on very old--- X servers, and occasionally the implementation will be buggy. +-- X servers, and occasionally the implementation will be buggy. -- On servers without the shape extension, this function will do nothing. -- On the Win32 platform the functionality is always present. --@@ -472,7 +466,7 @@ -- shape extension, this function will do nothing. -- -- This function works on both toplevel and child drawWindows.--- +-- drawWindowShapeCombineRegion :: DrawWindowClass self => self -> Maybe Region -- ^ @shapeRegion@ - region of drawWindow to be non-transparent -> Int -- ^ @offsetX@ - X position of @shapeRegion@ in @DrawWindow@@@ -498,7 +492,7 @@ -- children of @DrawWindow@, ignoring the shape mask of @DrawWindow@ itself. Contrast -- with 'drawWindowMergeChildShapes' which includes the shape mask of @DrawWindow@ in -- the masks to be merged.--- +-- drawWindowSetChildShapes :: DrawWindowClass self => self -> IO () drawWindowSetChildShapes self = {# call gdk_window_set_child_shapes #}@@ -510,7 +504,7 @@ -- -- This function is distinct from 'drawWindowSetChildShapes' because it includes -- @DrawWindow@'s shape mask in the set of shapes to be merged.--- +-- drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO () drawWindowMergeChildShapes self = {# call gdk_window_merge_child_shapes #}@@ -521,7 +515,7 @@ -- -- * The position is -- given in coordinates relative to the given window.--- +-- -- * The return value is @Just (same, x, y, mod)@ where @same@ is @True@ -- if the passed in window is the window over which the mouse currently -- resides.@@ -548,12 +542,12 @@ -- -- * The position is -- given in coordinates relative to the given window.--- +-- -- * The return value is @(Just win, x, y, mod)@ where @win@ is the -- window over which the mouse currently resides and @mod@ denotes -- the keyboard modifiers currently being depressed. ----- * The return value is @Nothing@ for the window if the mouse cursor is +-- * The return value is @Nothing@ for the window if the mouse cursor is -- not over a known window. -- drawWindowGetPointerPos :: DrawWindowClass self => self@@ -613,8 +607,8 @@ #endif -- | Obtains the root window (parent all other windows are inside) for the default display and screen.-drawWindowGetDefaultRootWindow :: - IO DrawWindow -- ^ returns the default root window +drawWindowGetDefaultRootWindow ::+ IO DrawWindow -- ^ returns the default root window drawWindowGetDefaultRootWindow = makeNewGObject mkDrawWindow $ {#call gdk_get_default_root_window #}
Graphics/UI/Gtk/Gdk/Drawable.chs view
@@ -73,7 +73,7 @@ import Control.Monad (liftM) import System.Glib.FFI-import Graphics.UI.Gtk.General.Structs (Point, Color, drawableGetID)+import Graphics.UI.Gtk.General.Structs (Point, drawableGetID) import Graphics.Rendering.Pango.Structs {#import Graphics.Rendering.Pango.Types#} {#import Graphics.Rendering.Pango.BasicTypes#}@@ -93,7 +93,7 @@ -- pixels in this 'Drawable'. -- drawableGetDepth :: DrawableClass d => d -> IO Int-drawableGetDepth d = liftM fromIntegral $ +drawableGetDepth d = liftM fromIntegral $ {#call unsafe drawable_get_depth#} (toDrawable d) -- | Retrieve the size of the 'Drawable'.@@ -146,7 +146,7 @@ -- drawPoints :: DrawableClass d => d -> GC -> [Point] -> IO () drawPoints d gc [] = return ()-drawPoints d gc points = +drawPoints d gc points = withArray (concatMap (\(x,y) -> [fromIntegral x, fromIntegral y]) points) $ \(aPtr :: Ptr {#type gint#}) -> {#call unsafe draw_points#} (toDrawable d) (toGC gc) (castPtr aPtr) (fromIntegral (length points))@@ -160,7 +160,7 @@ -- drawLine :: DrawableClass d => d -> GC -> Point -> Point -> IO () drawLine d gc (x1,y1) (x2,y2) = {#call unsafe draw_line#} (toDrawable d)- (toGC gc) (fromIntegral x1) (fromIntegral y1) (fromIntegral x2) + (toGC gc) (fromIntegral x1) (fromIntegral y1) (fromIntegral x2) (fromIntegral y2) -- | Draw several lines.@@ -210,7 +210,7 @@ -- drawSegments :: DrawableClass d => d -> GC -> [(Point,Point)] -> IO () drawSegments d gc [] = return ()-drawSegments d gc pps = withArray (concatMap (\((x1,y1),(x2,y2)) -> +drawSegments d gc pps = withArray (concatMap (\((x1,y1),(x2,y2)) -> [fromIntegral x1, fromIntegral y1, fromIntegral x2, fromIntegral y2]) pps) $ \(aPtr :: Ptr {#type gint#}) -> {#call unsafe draw_segments#} (toDrawable d) (toGC gc)@@ -264,7 +264,7 @@ -- drawPolygon :: DrawableClass d => d -> GC -> Bool -> [Point] -> IO () drawPolygon _ _ _ [] = return ()-drawPolygon d gc filled points = +drawPolygon d gc filled points = withArray (concatMap (\(x,y) -> [fromIntegral x, fromIntegral y]) points) $ \(aPtr::Ptr {#type gint#}) -> {#call unsafe draw_polygon#} (toDrawable d) (toGC gc) (fromBool filled) (castPtr aPtr) (fromIntegral (length points))@@ -286,7 +286,7 @@ {#call unsafe draw_glyphs#} (toDrawable d) (toGC gc) font (fromIntegral x) (fromIntegral y) gs --- +-- -- | Draw a single line of text. -- -- * The @x@ coordinate specifies the start of the string,@@ -322,7 +322,7 @@ -- | Draw a paragraph of text. -- -- * The @x@ and @y@ values specify the upper left--- point of the layout. +-- point of the layout. -- drawLayout :: DrawableClass d => d -> GC -> Int -> Int -> PangoLayout -> IO () drawLayout d gc x y (PangoLayout _ pl) =@@ -332,7 +332,7 @@ -- | Draw a paragraph of text. -- -- * The @x@ and @y@ values specify the upper left--- point of the layout. +-- point of the layout. -- -- * If both colors are @Nothing@ this function will behave like -- 'drawLayout' in that it uses the default colors from@@ -365,7 +365,7 @@ -- in a BadMatch error from the X server.) A common cause of this -- problem is an attempt to draw a bitmap to a color drawable. The way to -- draw a bitmap is to set the bitmap as a clip mask on your--- 'GC', then use 'drawRectangle' to draw a +-- 'GC', then use 'drawRectangle' to draw a -- rectangle clipped to the bitmap. -- drawDrawable :: (DrawableClass src, DrawableClass dest)
Graphics/UI/Gtk/Gdk/EventM.hsc view
@@ -1,4 +1,5 @@ {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE EmptyDataDecls #-} -- -*-haskell-*- #include <gtk/gtk.h>@@ -197,8 +198,6 @@ import Graphics.UI.Gtk.General.DNDTypes (Atom(..), SelectionTag) import Graphics.UI.Gtk.Types ( DrawWindow, mkDrawWindow ) -import Data.Bits ((.|.), (.&.), testBit, shiftL, shiftR)-import Data.Maybe (catMaybes) import Data.List (isPrefixOf) import Control.Monad.Reader ( ReaderT, ask, runReaderT ) import Control.Monad.Trans ( liftIO )@@ -216,56 +215,56 @@ -- | A monad providing access to data in an event. ---type EventM t a = ReaderT (Ptr t) IO a+type EventM t = ReaderT (Ptr t) IO -- | A tag for events that do not carry any event-specific information.-data EAny = EAny+data EAny -- | A tag for /key/ events.-data EKey = EKey+data EKey -- | A tag for /Button/ events.-data EButton = EButton+data EButton -- | A tag for /Scroll/ events.-data EScroll = EScroll+data EScroll -- | A tag for /Motion/ events.-data EMotion = EMotion+data EMotion -- | A tag for /Expose/ events.-data EExpose = EExpose+data EExpose -- | A tag for /Visibility/ events.-data EVisibility = EVisibility+data EVisibility -- | A tag for /Crossing/ events.-data ECrossing = ECrossing+data ECrossing -- | A tag for /Focus/ events.-data EFocus = EFocus+data EFocus -- | A tag for /Configure/ events.-data EConfigure = EConfigure+data EConfigure -- | A tag for /Property/ events.-data EProperty = EProperty+data EProperty -- | A tag for /Proximity/ events.-data EProximity = EProximity+data EProximity -- | A tag for /WindowState/ event.-data EWindowState = EWindowState+data EWindowState #if GTK_CHECK_VERSION(2,6,0) -- | A tag for /OwnerChange/ events.-data EOwnerChange = EOwnerChange+data EOwnerChange #endif #if GTK_CHECK_VERSION(2,8,0) -- | A tag for /GrabBroken/ events.-data EGrabBroken = EGrabBroken+data EGrabBroken #endif -- | Retrieve the 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawWindow' that this
Graphics/UI/Gtk/Gdk/Events.hsc view
@@ -70,7 +70,6 @@ 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) #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.Gdk.Region (Region, makeNewRegion)@@ -83,12 +82,7 @@ ScrollDirection(..)) import Graphics.UI.Gtk.General.Enums (MouseButton(..), Click(..)) import Graphics.UI.Gtk.General.Structs (Rectangle(..))-import Graphics.UI.Gtk.Types ( DrawWindow, mkDrawWindow ) -import Data.Bits ((.|.), (.&.), testBit, shiftL, shiftR)-import Data.Maybe (catMaybes)-- -- | The time (in milliseconds) when an event happened. This is used mostly -- for ordering events and responses to events. --@@ -209,7 +203,7 @@ #endif -- | The number of contiguous 'Expose' events following this- -- one. The only use for this is \"exposure compression\", i.e. + -- one. The only use for this is \"exposure compression\", i.e. -- handling all contiguous 'Expose' events in one go, though Gdk -- performs some exposure compression so this is not normally needed. eventCount :: Int }@@ -233,7 +227,7 @@ -- eventIsHint :: Bool, eventXRoot,- eventYRoot :: Double } + eventYRoot :: Double } -- | A mouse button was pressed or released. -- -- * This event is triggered if the mouse button was pressed or released@@ -382,7 +376,7 @@ -- | The mask indicates which flags have changed. eventWindowMask :: [WindowState], -- | The state indicates the current state of the window.- eventWindowState :: [WindowState]} + eventWindowState :: [WindowState]} -- | The state of the pen of a graphics tablet pen or touchscreen device. | Proximity { eventSent :: Bool,@@ -410,7 +404,7 @@ #{const GDK_FOCUS_CHANGE} -> marshFocus #{const GDK_CONFIGURE} -> marshConfigure #{const GDK_MAP} -> marshAny- #{const GDK_UNMAP} -> marshAny + #{const GDK_UNMAP} -> marshAny -- #{const GDK_PROPERTY_NOTIFY}-> marshProperty #{const GDK_PROXIMITY_IN} -> marshProximity True #{const GDK_PROXIMITY_OUT} -> marshProximity False@@ -502,7 +496,7 @@ (time_ ::#gtk2hs_type guint32) <- #{peek GdkEventKey, time} ptr (modif_ ::#gtk2hs_type guint) <- #{peek GdkEventKey, state} ptr (keyval_ ::#gtk2hs_type guint) <- #{peek GdkEventKey, keyval} ptr- + (length_ ::#gtk2hs_type gint) <- #{peek GdkEventKey, length} ptr keyChar <- keyvalToChar keyval_ keyName <- unsafeInterleaveIO $ keyvalName keyval_@@ -526,10 +520,10 @@ (modif_ ::#gtk2hs_type guint) <- #{peek GdkEventCrossing, state} ptr (xRoot_ ::#gtk2hs_type gdouble) <- #{peek GdkEventCrossing, x_root} ptr (yRoot_ ::#gtk2hs_type gdouble) <- #{peek GdkEventCrossing, y_root} ptr- (cMode_ ::#gtk2hs_type GdkCrossingMode) + (cMode_ ::#gtk2hs_type GdkCrossingMode) <- #{peek GdkEventCrossing, mode} ptr (nType_ ::#gtk2hs_type GdkNotifyType)- <- #{peek GdkEventCrossing, detail} ptr + <- #{peek GdkEventCrossing, detail} ptr (modif_ ::#gtk2hs_type guint) <- #{peek GdkEventCrossing, state} ptr return $ Crossing { eventSent = toBool sent_,
Graphics/UI/Gtk/Gdk/GC.chs view
@@ -87,10 +87,9 @@ import Control.Exception (handle, ErrorCall(..)) import System.Glib.FFI-import System.Glib.GObject (wrapNewGObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.Structs-import Graphics.UI.Gtk.General.Enums (Function(..), Fill(..), SubwindowMode(..), LineStyle(..), +import Graphics.UI.Gtk.General.Enums (Function(..), Fill(..), SubwindowMode(..), LineStyle(..), CapStyle(..), JoinStyle(..)) #if GTK_MAJOR_VERSION < 3 {#import Graphics.UI.Gtk.Gdk.Region#} (Region(Region))@@ -112,7 +111,7 @@ gcNewWithValues :: DrawableClass d => d -> GCValues -> IO GC gcNewWithValues d gcv = allocaBytes (sizeOf gcv) $ \vPtr -> do mask <- pokeGCValues vPtr gcv- gc <- wrapNewGObject mkGC $ {#call unsafe gc_new_with_values#} + gc <- wrapNewGObject mkGC $ {#call unsafe gc_new_with_values#} (toDrawable d) (castPtr vPtr) mask handle (\(ErrorCall _) -> return ()) $ when (isJust (tile gcv)) $ touchForeignPtr ((unPixmap.fromJust.tile) gcv)@@ -171,7 +170,7 @@ gcSetDashes :: GC -> Int -> [(Int,Int)] -> IO () gcSetDashes gc phase onOffList = do let onOff :: [{#type gint8#}]- onOff = concatMap (\(on,off) -> [fromIntegral on, fromIntegral off]) + onOff = concatMap (\(on,off) -> [fromIntegral on, fromIntegral off]) onOffList withArray onOff $ \aPtr -> {#call unsafe gc_set_dashes#} gc (fromIntegral phase) aPtr
Graphics/UI/Gtk/Gdk/Keymap.chs view
@@ -28,24 +28,24 @@ module Graphics.UI.Gtk.Gdk.Keymap ( -- * Details--- +-- -- | Key values are the codes which are sent whenever a key is pressed or released. They appear in the -- keyval field of the 'EventKey' structure, which is passed to signal handlers for the--- 'keyPressEvent' and 'keyReleaseEvent' signals. --- +-- 'keyPressEvent' and 'keyReleaseEvent' signals.+-- -- Key values are regularly updated from the upstream X.org X11 implementation, so new values are added -- regularly. They will be prefixed with GDK_ rather than XF86XK_ or ' (for older symbols)'.--- +-- -- Key values can be converted into a string representation using 'keyvalName'. The reverse -- function, converting a string to a key value, is provided by 'keyvalFromName'.--- +-- -- The case of key values can be determined using 'keyvalIsUpper'. Key -- values can be converted to upper or lower case using 'keyvalToUpper' and -- 'keyvalToLower'.--- +-- -- When it makes sense, key values can be converted to and from Unicode characters with -- 'keyvalToUnicode'.--- +-- -- One 'Keymap' object exists for each user display. 'keymapGetDefault' returns the 'Keymap' -- for the default display; to obtain keymaps for other displays, use 'keymapGetForDisplay'. A -- keymap is a mapping from 'KeymapKey' to key values. You can think of a 'KeymapKey' as a@@ -61,7 +61,7 @@ -- movement in a horizontal direction. Usually groups are used for two different languages. In group 0, -- a key might have two English characters, and in group 1 it might have two Hebrew characters. The -- Hebrew characters will be printed on the key next to the English characters.--- +-- -- In order to use a keymap to interpret a key event, it's necessary to first convert the keyboard -- state into an effective group and level. This is done via a set of rules that varies widely -- according to type of keyboard and user configuration. The function@@ -71,7 +71,7 @@ -- and level. i.e. it returns "unconsumed modifiers." The keyboard group may differ from the effective -- group used for keymap lookups because some keys don't have multiple groups - e.g. the Enter key is -- always in group 0 regardless of keyboard state.--- +-- -- Note that 'keymapTranslateKeyboardState' also returns the keyval, i.e. it goes ahead and -- performs the keymap lookup in addition to telling you which effective group/level values were used -- for the lookup. 'EventKey' already contains this keyval, however, so you don't normally need to@@ -122,9 +122,7 @@ ) where import Control.Monad (liftM)-import Data.Maybe (fromMaybe) import System.Glib.FFI-import System.Glib.UTFString import Graphics.UI.Gtk.Gdk.Enums (Modifier(..)) import Graphics.UI.Gtk.Gdk.Keys (KeyVal (..)) {#import Graphics.Rendering.Pango.Enums#}@@ -164,26 +162,26 @@ -- 'keymapTranslateKeyboardState' instead of this function, since the effective -- group\/level may not be the same as the current keyboard state. ---keymapLookupKey :: KeymapClass self - => (Maybe self) -- ^ @keymap@ a 'Keymap' or 'Nothing' to use the default keymap +keymapLookupKey :: KeymapClass self+ => (Maybe self) -- ^ @keymap@ a 'Keymap' or 'Nothing' to use the default keymap -> KeymapKey -- ^ @key@ - a 'KeymapKey' -- with keycode, group, and level initialized -> IO Int -- ^ returns a keyval, or 0 if none was mapped to -- the given @key@-keymapLookupKey Nothing key = +keymapLookupKey Nothing key = liftM fromIntegral $ allocaBytes {# sizeof GdkKeymapKey #} $ \ keyPtr -> do poke keyPtr key {# call gdk_keymap_lookup_key #} (Keymap nullForeignPtr)- (castPtr keyPtr) + (castPtr keyPtr) keymapLookupKey (Just self) key = liftM fromIntegral $ allocaBytes {# sizeof GdkKeymapKey #} $ \ keyPtr -> do poke keyPtr key {# call gdk_keymap_lookup_key #} (toKeymap self)- (castPtr keyPtr) + (castPtr keyPtr) -- | Translates the contents of a 'EventKey' into a -- keyval, effective group, and level. Modifiers that affected the translation@@ -203,7 +201,7 @@ keymapTranslateKeyboardState self hardwareKeycode state group = alloca $ \keyvalPtr -> alloca $ \effectiveGroupPtr ->- alloca $ \levelPtr -> + alloca $ \levelPtr -> alloca $ \modifierPtr -> do success <- liftM toBool $ {# call gdk_keymap_translate_keyboard_state #}@@ -215,7 +213,7 @@ effectiveGroupPtr levelPtr modifierPtr- if success + if success then do keyval <- peek keyvalPtr effectiveGroup <- peek effectiveGroupPtr@@ -235,7 +233,7 @@ -- switch key might convert a keyboard between Hebrew to English modes, for -- example. 'EventKey' contains a @group@ field that -- indicates the active keyboard group. The level is computed from the modifier--- mask. +-- mask. -- keymapGetEntriesForKeyval :: KeymapClass self => self -> KeyVal -- ^ @keyval@ - a keyval, such as @GDK_a@, @GDK_Up@,@@ -260,7 +258,7 @@ else return Nothing -- | Returns the keyvals bound to @hardwareKeycode@. The Nth 'KeymapKey'--- in @keys@ is bound to the Nth keyval in @keyvals@. +-- in @keys@ is bound to the Nth keyval in @keyvals@. -- When a keycode is pressed by the user, the -- keyval from this list of entries is selected by considering the effective -- keyboard group and level. See 'keymapTranslateKeyboardState'.@@ -270,7 +268,7 @@ -> IO (Maybe ([KeymapKey], [KeyVal])) keymapGetEntriesForKeycode self hardwareKeycode = alloca $ \nEntriesPtr ->- allocaArray 0 $ \ keysPtr -> + allocaArray 0 $ \ keysPtr -> allocaArray 0 $ \ keyvalsPtr -> do success <- liftM toBool $ {# call gdk_keymap_get_entries_for_keycode #}
Graphics/UI/Gtk/Gdk/Pixbuf.chs view
@@ -1,5 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE EmptyDataDecls #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) Pixbuf --@@ -124,21 +125,22 @@ ) where import Control.Monad (liftM)-import Data.Ix import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GDateTime import System.Glib.GObject {#import Graphics.UI.Gtk.Types#}+#if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.General.Structs (Rectangle(..))+#endif import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain, propagateGError) import Graphics.UI.Gtk.Gdk.PixbufData ( PixbufData, mkPixbufData ) #if GTK_MAJOR_VERSION < 3-import Graphics.UI.Gtk.Gdk.Pixmap (Bitmap, Pixmap)-#endif+import Graphics.UI.Gtk.Gdk.Pixmap (Bitmap)+#else import Graphics.Rendering.Cairo import Graphics.Rendering.Cairo.Types+#endif {# context prefix="gdk" #} @@ -399,7 +401,6 @@ IO () pixbufSave pb fname iType options = let (keys, values) = unzip options in- let optLen = length keys in propagateGError $ \errPtrPtr -> withUTFFilePath fname $ \fnPtr -> withUTFString iType $ \tyPtr ->@@ -458,7 +459,7 @@ -- that is embedded in the executable. See -- 'pixbufNewFromInline' for an example. ---data InlineImage = InlineImage+data InlineImage -- | Create a new image from a static pointer. --
Graphics/UI/Gtk/Gdk/PixbufAnimation.chs view
@@ -80,9 +80,7 @@ import System.Glib.GDateTime import System.Glib.GObject {#import Graphics.UI.Gtk.Types#}-import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain,- propagateGError)-{# import Graphics.UI.Gtk.Gdk.Pixbuf #}+import System.Glib.GError (propagateGError) {# context prefix="gdk" #}
Graphics/UI/Gtk/Gdk/PixbufData.hs view
@@ -35,9 +35,8 @@ import System.Glib.FFI import Graphics.UI.Gtk.Types-import Data.Ix -- internal module of GHC-import Data.Array.Base ( MArray, newArray, newArray_, unsafeRead, unsafeWrite,+import Data.Array.Base ( MArray(..), newArray_, unsafeRead, unsafeWrite, getBounds, getNumElements ) -- | An array that stored the raw pixel data of a 'Pixbuf'.
Graphics/UI/Gtk/Gdk/Pixmap.chs view
@@ -27,14 +27,14 @@ -- Stability : provisional -- Portability : portable (depends on GHC) ----- Pixmaps -- Offscreen drawables +-- Pixmaps -- Offscreen drawables -- -- This module is empty when built with Gtk3 because Pixmap has been -- removed. module Graphics.UI.Gtk.Gdk.Pixmap ( -- * Detail -- Pixmaps are offscreen drawables. They can be drawn upon with the--- standard drawing primitives, then copied to another drawable +-- standard drawing primitives, then copied to another drawable -- with 'drawDrawable'. -- * Class Hierarchy@@ -46,7 +46,7 @@ -- @ #if GTK_MAJOR_VERSION < 3 -- * Types- Pixmap, PixmapClass, + Pixmap, PixmapClass, Bitmap, -- * Constructors@@ -58,9 +58,7 @@ import Data.Maybe import System.Glib.FFI-import System.Glib.GObject (wrapNewGObject) {#import Graphics.UI.Gtk.Types#}-import Graphics.UI.Gtk.Gdk.Drawable (Drawable, DrawableClass(..)) {# context lib="gdk" prefix="gdk" #}
Graphics/UI/Gtk/Gdk/Region.chs view
@@ -74,7 +74,7 @@ instance Show Region where show r = show (unsafePerformIO (regionGetRectangles r))- + -- Construct a region from a pointer. -- makeNewRegion :: Ptr Region -> IO Region@@ -108,7 +108,7 @@ regionPolygon points rule = withArray (concatMap (\(x,y) -> [fromIntegral x, fromIntegral y]) points) $ \(aPtr :: Ptr {#type gint#}) -> do- rPtr <- {#call unsafe region_polygon#} (castPtr aPtr) + rPtr <- {#call unsafe region_polygon#} (castPtr aPtr) (fromIntegral (length points)) ((fromIntegral.fromEnum) rule) makeNewRegion rPtr @@ -126,7 +126,7 @@ regPtr <- {#call unsafe region_rectangle#} (castPtr rectPtr) makeNewRegion regPtr --- | Smallest rectangle including the +-- | Smallest rectangle including the -- 'Region'. -- regionGetClipbox :: Region -> IO Rectangle@@ -140,8 +140,8 @@ -- rectangles of the same height. No rectangles in a band touch. -- regionGetRectangles :: Region -> IO [Rectangle]-regionGetRectangles region = - alloca $ \(rectPtrPtr :: Ptr (Ptr Rectangle)) -> +regionGetRectangles region =+ alloca $ \(rectPtrPtr :: Ptr (Ptr Rectangle)) -> alloca $ \(iPtr :: Ptr {#type gint#}) -> do {#call unsafe region_get_rectangles#} region (castPtr rectPtrPtr) iPtr size <- peek iPtr@@ -163,7 +163,7 @@ -- | Checks if a point it is within a region. -- regionPointIn :: Region -> Point -> IO Bool-regionPointIn r (x,y) = liftM toBool $ +regionPointIn r (x,y) = liftM toBool $ {#call unsafe region_point_in#} r (fromIntegral x) (fromIntegral y) -- | Check if a rectangle is within a region.@@ -175,7 +175,7 @@ -- | Move a region. -- regionOffset :: Region -> Int -> Int -> IO ()-regionOffset r dx dy = +regionOffset r dx dy = {#call unsafe region_offset#} r (fromIntegral dx) (fromIntegral dy) -- | Move a region.@@ -183,7 +183,7 @@ -- * Positive values shrink the region, negative values expand it. -- regionShrink :: Region -> Int -> Int -> IO ()-regionShrink r dx dy = +regionShrink r dx dy = {#call unsafe region_shrink#} r (fromIntegral dx) (fromIntegral dy) -- | Updates the region to include the rectangle.
Graphics/UI/Gtk/Gdk/Screen.chs view
@@ -68,7 +68,7 @@ #endif #endif --- screenGetSystemVisual,+ screenGetSystemVisual, #if GTK_CHECK_VERSION(2,10,0) screenIsComposited, #endif
Graphics/UI/Gtk/General/Clipboard.chs view
@@ -140,7 +140,7 @@ import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#} (SelectionTag, TargetTag,- atomNew, Atom(..))+ Atom(..)) {#import Graphics.UI.Gtk.General.Selection#} (InfoId, SelectionDataM) import Graphics.UI.Gtk.General.Structs ( selectionPrimary,@@ -148,8 +148,7 @@ selectionClipboard, withTargetEntries) import Control.Monad ( liftM )-import Control.Monad.Trans ( liftIO )-import Control.Monad.Reader (runReaderT, ask)+import Control.Monad.Reader (runReaderT) import Data.IORef ( newIORef, readIORef, writeIORef ) {# context lib="gtk" prefix="gtk" #}@@ -296,7 +295,7 @@ -- The difference between this function and 'clipboardSetWithData' is that -- a 'GObject' is passed in. ---clipboardSetWithOwner :: (ClipboardClass self, GObjectClass owner) => self+_clipboardSetWithOwner :: (ClipboardClass self, GObjectClass owner) => self -> [(TargetTag, InfoId)] -- ^ @targets@ - a list containing information -- about the available forms for the clipboard -- data@@ -312,7 +311,7 @@ -- data succeeded. If setting the clipboard data -- failed the provided callback functions will be -- ignored.-clipboardSetWithOwner self targets getFunc clearFunc owner = do+_clipboardSetWithOwner self targets getFunc clearFunc owner = do gFunPtr <- mkClipboardGetFunc (\_ sPtr info _ -> runReaderT (getFunc info) sPtr >> return ()) cFunPtr <- mkClipboardClearFunc@@ -338,10 +337,10 @@ -- has not subsequently called, returns the owner set by -- 'clipboardSetWithOwner'. ---clipboardGetOwner :: ClipboardClass self => self+_clipboardGetOwner :: ClipboardClass self => self -> IO (Maybe GObject) -- ^ returns the owner of the clipboard, if any; otherwise -- @Nothing@.-clipboardGetOwner self =+_clipboardGetOwner self = maybeNull (makeNewGObject mkGObject) $ {# call gtk_clipboard_get_owner #} (toClipboard self)@@ -352,8 +351,8 @@ -- 'clipboardSetWithData', and when the @clearFunc@ you supplied is called. -- Otherwise, the clipboard may be owned by someone else. ---clipboardClear :: ClipboardClass self => self -> IO ()-clipboardClear self =+_clipboardClear :: ClipboardClass self => self -> IO ()+_clipboardClear self = {# call gtk_clipboard_clear #} (toClipboard self)
Graphics/UI/Gtk/General/DNDTypes.chs view
@@ -46,7 +46,6 @@ import System.Glib.FFI import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} ()-import System.Glib.UTFString ( readUTFString, withUTFString ) import Control.Monad ( liftM ) import Control.Monad.Reader ( ReaderT )
Graphics/UI/Gtk/General/Drag.chs view
@@ -137,13 +137,9 @@ import System.Glib.FFI import System.Glib.UTFString import System.Glib.Flags-import System.Glib.UTFString ( withUTFString )-import System.Glib.GObject (makeNewGObject)-import System.Glib.Attributes ( Attr, newAttr ) import Graphics.UI.Gtk.General.StockItems ( StockId ) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#}-{#import Graphics.UI.Gtk.General.Selection#} ( TargetList ) import Graphics.UI.Gtk.Gdk.Enums ( DragAction(..) ) import Graphics.UI.Gtk.General.Enums ( DestDefaults(..), DragProtocol(..) #if GTK_CHECK_VERSION(2,12,0)@@ -161,6 +157,9 @@ ) import Graphics.UI.Gtk.Signals import Control.Monad.Reader (runReaderT)+#if GTK_MAJOR_VERSION < 3+import System.Glib.Attributes ( Attr, newAttr )+#endif {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/General/Enums.chs view
@@ -27,6 +27,9 @@ -- module Graphics.UI.Gtk.General.Enums ( AccelFlags(..),+#if GTK_CHECK_VERSION(3,0,0)+ Align(..),+#endif ArrowType(..), AttachOptions(..), MouseButton(..),@@ -72,6 +75,9 @@ ScrollStep (..), SelectionMode(..), ShadowType(..),+#if GTK_CHECK_VERSION(3,0,0)+ StateFlags(..),+#endif SortType(..), StateType(..), #if GTK_MAJOR_VERSION < 3@@ -95,7 +101,7 @@ #endif WindowPosition(..), WindowType(..),- WrapMode(..), + WrapMode(..), #if GTK_CHECK_VERSION(2,16,0) EntryIconPosition(..), #endif@@ -118,6 +124,12 @@ instance Flags AccelFlags +#if GTK_CHECK_VERSION(3,0,0)+-- | State of an accelerator+--+{#enum Align {underscoreToCase} deriving(Bounded,Eq,Show)#}+#endif+ -- | Arrow directions for the arrow widget -- {#enum ArrowType {underscoreToCase} deriving (Eq,Show)#}@@ -264,7 +276,7 @@ -- * The 'Packing' parameter determines how the child behaves in the horizontal -- or vertical way in an 'Graphics.UI.Gtk.Layout.HBox' or -- 'Graphics.UI.Gtk.Layout.VBox', respectively. 'PackNatural'--- means the child is as big as it requests. It will stay at the start or +-- means the child is as big as it requests. It will stay at the start or -- end of a 'Graphics.UI.Gtk.Layout.Box' if there is more space available. -- All children packed with 'PackRepel' will be padded on both sides with -- additional space. 'PackGrow' will increase the size of a widget so that it@@ -278,7 +290,7 @@ -- it is irrelevant whether the main area is inserted at the start or -- the end of a box. Finally 'PackRepel' is most useful in a window -- where no widget can make use of excess space. Examples include a--- dialog box without list boxes or text fields. +-- dialog box without list boxes or text fields. -- data Packing = PackRepel | PackGrow@@ -364,6 +376,16 @@ -- | Shadow types -- {#enum ShadowType {underscoreToCase} deriving (Eq,Show)#}++#if GTK_CHECK_VERSION(3,0,0)+-- | Describes a widget state. Widget states are used to match the widget against+-- CSS pseudo-classes. Note that GTK extends the regular CSS classes and+-- sometimes uses different names.+--+{#enum StateFlags {underscoreToCase} deriving (Bounded,Eq,Show)#}++instance Flags StateFlags+#endif -- Sort a 'Graphics.UI.Gtk.ModelView.TreeViewColumn' in ascending or descending -- order.
Graphics/UI/Gtk/General/General.chs view
@@ -80,11 +80,10 @@ ) where import System.Environment (getProgName, getArgs)-import Control.Monad (liftM, mapM, when)+import Control.Monad (liftM, when) import Control.Applicative ((<$>)) import Control.Concurrent (rtsSupportsBoundThreads, newEmptyMVar, putMVar, takeMVar)-import Data.IORef (IORef, newIORef, readIORef, writeIORef) import System.Glib.FFI import System.Glib.UTFString
Graphics/UI/Gtk/General/IconFactory.chs view
@@ -108,7 +108,6 @@ import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GObject (wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.Enums (TextDirection(..), StateType(..)) import Graphics.UI.Gtk.General.StockItems
Graphics/UI/Gtk/General/IconTheme.chs view
@@ -140,16 +140,11 @@ ) where import Control.Monad (liftM)-import Control.Applicative ((<$>)) import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString import System.Glib.GList-import System.Glib.Flags-import System.Glib.GObject (wrapNewGObject, makeNewGObject, Quark)-import System.Glib.GError (GErrorDomain, GErrorClass(..), propagateGError)+import System.Glib.GError (propagateGError) import Graphics.UI.Gtk.General.Structs (Rectangle, Point) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}
Graphics/UI/Gtk/General/RcStyle.chs view
@@ -460,7 +460,6 @@ import System.Glib.FFI import System.Glib.UTFString import System.Glib.GType (GType)-import System.Glib.GTypeConstants (none) {#import Graphics.UI.Gtk.Types#}
Graphics/UI/Gtk/General/Selection.chs view
@@ -120,12 +120,9 @@ ) import Graphics.UI.Gtk.Signals-import System.Glib.UTFString ( peekUTFString, withUTFStringLen,- withUTFStringArray0, peekUTFStringArray0 ) import Control.Monad ( liftM ) import Control.Monad.Trans ( liftIO ) import Control.Monad.Reader (runReaderT, ask)-import Data.Word ( Word32 ) {# context lib="gtk" prefix="gtk" #} @@ -269,9 +266,13 @@ -- The GtkSelectionData struct was made opaque in Gtk3, but the accessor routines -- where introduced in 2.14. #if GTK_CHECK_VERSION(2,14,0)+#if GTK_MAJOR_VERSION < 3 selectionDataGet_format selPtr = {#call gtk_selection_data_get_format#} selPtr+#endif selectionDataGet_length selPtr = {#call gtk_selection_data_get_length#} selPtr+#if GTK_MAJOR_VERSION < 3 selectionDataGet_data selPtr = {#call gtk_selection_data_get_data#} selPtr+#endif selectionDataGet_target selPtr = {#call gtk_selection_data_get_target#} selPtr #else selectionDataGet_format selPtr = {#get SelectionData -> format#} selPtr
Graphics/UI/Gtk/General/Settings.chs view
@@ -57,18 +57,6 @@ import System.Glib.FFI import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.General.DNDTypes#} (SelectionTag, TargetTag,- atomNew, Atom(..))-{#import Graphics.UI.Gtk.General.Selection#} (InfoId, SelectionDataM)-import Graphics.UI.Gtk.General.Structs (- selectionPrimary,- selectionSecondary,- selectionClipboard,- withTargetEntries)-import Control.Monad ( liftM )-import Control.Monad.Trans ( liftIO )-import Control.Monad.Reader (runReaderT, ask)-import Data.IORef ( newIORef, readIORef, writeIORef ) {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/General/StockItems.hsc view
@@ -55,7 +55,7 @@ stockCancel, #if GTK_CHECK_VERSION(2,16,0) stockCapsLockWarning,-#endif +#endif stockCDROM, stockClear, stockClose,@@ -73,7 +73,7 @@ stockDirectory, #if GTK_CHECK_VERSION(2,12,0) stockDiscard,-#endif +#endif stockDisconnect, stockDnd, stockDndMultiple,@@ -124,10 +124,10 @@ stockOrientationReverseLandscape, stockOrientationPortrait, stockOrientationReversePortrait,-#endif +#endif #if GTK_CHECK_VERSION(2,14,0) stockPageSetup,-#endif +#endif stockPaste, stockPreferences, stockPrint,@@ -136,7 +136,7 @@ stockPrintPaused, stockPrintReport, stockPrintWarning,-#endif +#endif stockPrintPreview, stockProperties, stockQuit,@@ -148,7 +148,7 @@ stockSaveAs, #if GTK_CHECK_VERSION(2,10,0) stockSelectAll,-#endif +#endif stockSelectColor, stockSelectFont, stockSortAscending,@@ -167,7 +167,7 @@ stockZoomOut ) where --- The StockItem structure is completely marshaled to Haskell. It is +-- The StockItem structure is completely marshaled to Haskell. It is -- possible to marshal all strings lazily because the string pointers are -- valid throughout the lifetime of the application. The only drawback it -- that a stock item that is replaced by the another item with the same@@ -236,7 +236,7 @@ #{poke GtkStockItem, stock_id} siPtr stockIdPtr labelPtr <- newUTFString label #{poke GtkStockItem, label} siPtr labelPtr- #{poke GtkStockItem, modifier} siPtr + #{poke GtkStockItem, modifier} siPtr ((fromIntegral (fromFlags modifier))::#{gtk2hs_type GdkModifierType}) #{poke GtkStockItem, keyval} siPtr ((fromIntegral keyval)::#{gtk2hs_type guint}) transDomPtr<- newUTFString transDom@@ -259,7 +259,7 @@ -- | Lookup an item in stock. -- stockLookupItem :: StockId -> IO (Maybe StockItem)-stockLookupItem stockId = +stockLookupItem stockId = alloca $ \siPtr -> withUTFString stockId $ \strPtr -> do res <- stock_lookup strPtr siPtr@@ -313,12 +313,12 @@ -- | <<http://library.gnome.org/devel/gtk/stable/gtk-cancel.png>> stockCancel :: StockId stockCancel = #{const_str GTK_STOCK_CANCEL}- + #if GTK_CHECK_VERSION(2,16,0)--- | <<http://library.gnome.org/devel/gtk/stable/gtk-caps-lock-warning.png>> +-- | <<http://library.gnome.org/devel/gtk/stable/gtk-caps-lock-warning.png>> stockCapsLockWarning :: StockId stockCapsLockWarning = #{const_str GTK_STOCK_CAPS_LOCK_WARNING}-#endif +#endif -- | <<http://library.gnome.org/devel/gtk/stable/gtk-cdrom.png>> stockCDROM :: StockId@@ -397,10 +397,10 @@ #endif #if GTK_CHECK_VERSION(2,12,0)--- | +-- | stockDiscard :: StockId stockDiscard = #{const_str GTK_STOCK_DISCARD}-#endif +#endif #if GTK_CHECK_VERSION(2,6,0) @@ -556,8 +556,8 @@ -- | <<http://library.gnome.org/devel/gtk/stable/gtk-justify-right.png>> stockJustifyRight :: StockId stockJustifyRight = #{const_str GTK_STOCK_JUSTIFY_RIGHT}- --- | <<http://library.gnome.org/devel/gtk/stable/gtk-leave-fullscreen.png>> ++-- | <<http://library.gnome.org/devel/gtk/stable/gtk-leave-fullscreen.png>> stockLeaveFullscreen :: StockId stockLeaveFullscreen = #{const_str GTK_STOCK_LEAVE_FULLSCREEN} @@ -679,22 +679,22 @@ stockPrint = #{const_str GTK_STOCK_PRINT} #if GTK_CHECK_VERSION(2,14,0)--- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-error.png>> +-- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-error.png>> stockPrintError :: StockId stockPrintError = #{const_str GTK_STOCK_PRINT_ERROR}- + -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-paused.png>> stockPrintPaused :: StockId stockPrintPaused = #{const_str GTK_STOCK_PRINT_PAUSED}- + -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-report.png>> stockPrintReport :: StockId stockPrintReport = #{const_str GTK_STOCK_PRINT_REPORT}- + -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-warning.png>> stockPrintWarning :: StockId stockPrintWarning = #{const_str GTK_STOCK_PRINT_WARNING}-#endif +#endif -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-preview.png>> stockPrintPreview :: StockId@@ -786,7 +786,7 @@ #if GTK_CHECK_VERSION(2,4,0) -- | <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-ltr.png>>--- <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-rtl.png>> +-- <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-rtl.png>> stockUnindent :: StockId stockUnindent = #{const_str GTK_STOCK_UNINDENT} #else
Graphics/UI/Gtk/General/Structs.hsc view
@@ -1,5 +1,6 @@ {-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-} {-# OPTIONS_HADDOCK hide #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- -*-haskell-*- #include <gtk/gtk.h>@@ -141,14 +142,14 @@ -- | Represents the x and y coordinate of a point. -- type Point = (Int, Int)- -instance Storable Point where ++instance Storable Point where sizeOf _ = #{const sizeof(GdkPoint)} alignment _ = alignment (undefined:: #gtk2hs_type gint) peek ptr = do (x_ ::#gtk2hs_type gint) <- #{peek GdkPoint, x} ptr (y_ ::#gtk2hs_type gint) <- #{peek GdkPoint, y} ptr- return $ (fromIntegral x_, fromIntegral y_) + return $ (fromIntegral x_, fromIntegral y_) poke ptr (x, y) = do #{poke GdkPoint, x} ptr ((fromIntegral x)::#gtk2hs_type gint) #{poke GdkPoint, y} ptr ((fromIntegral y)::#gtk2hs_type gint)@@ -161,7 +162,7 @@ (y_ ::#gtk2hs_type gint) <- #{peek GdkRectangle, y} ptr (width_ ::#gtk2hs_type gint) <- #{peek GdkRectangle, width} ptr (height_ ::#gtk2hs_type gint) <- #{peek GdkRectangle, height} ptr- return $ Rectangle (fromIntegral x_) (fromIntegral y_) + return $ Rectangle (fromIntegral x_) (fromIntegral y_) (fromIntegral width_) (fromIntegral height_) poke ptr (Rectangle x y width height) = do #{poke GdkRectangle, x} ptr ((fromIntegral x)::#gtk2hs_type gint)@@ -240,7 +241,7 @@ backgroundPtr = #{ptr GdkGCValues, background} ptr (foregroundPixelPtr :: CULong) <- #{peek GdkColor, pixel} foregroundPtr (backgroundPixelPtr :: CULong) <- #{peek GdkColor, pixel} backgroundPtr- colormapPtr <- gdkColormapGetSystem + colormapPtr <- gdkColormapGetSystem gdkColormapQueryColor colormapPtr foregroundPixelPtr foregroundPtr gdkColormapQueryColor colormapPtr backgroundPixelPtr backgroundPtr @@ -260,25 +261,25 @@ pPtr <- #{peek GdkGCValues, clip_mask} ptr if (pPtr==nullPtr) then return Nothing else liftM Just $ makeNewGObject mkPixmap $ return pPtr- (subwindow_ :: #{gtk2hs_type GdkSubwindowMode}) + (subwindow_ :: #{gtk2hs_type GdkSubwindowMode}) <- #{peek GdkGCValues, subwindow_mode} ptr- (tsXOrigin_ :: #{gtk2hs_type gint}) + (tsXOrigin_ :: #{gtk2hs_type gint}) <- #{peek GdkGCValues, ts_x_origin} ptr- (tsYOrigin_ :: #{gtk2hs_type gint}) + (tsYOrigin_ :: #{gtk2hs_type gint}) <- #{peek GdkGCValues, ts_y_origin} ptr- (clipXOrigin_:: #{gtk2hs_type gint}) + (clipXOrigin_:: #{gtk2hs_type gint}) <- #{peek GdkGCValues, clip_x_origin} ptr- (clipYOrigin_:: #{gtk2hs_type gint}) + (clipYOrigin_:: #{gtk2hs_type gint}) <- #{peek GdkGCValues, clip_y_origin} ptr (graphics_ :: #{gtk2hs_type gint}) <- #{peek GdkGCValues, graphics_exposures} ptr (lineWidth_ :: #{gtk2hs_type gint}) <- #{peek GdkGCValues, line_width} ptr- (lineStyle_ :: #{gtk2hs_type GdkLineStyle}) + (lineStyle_ :: #{gtk2hs_type GdkLineStyle}) <- #{peek GdkGCValues, line_style} ptr- (capStyle_ :: #{gtk2hs_type GdkCapStyle}) + (capStyle_ :: #{gtk2hs_type GdkCapStyle}) <- #{peek GdkGCValues, cap_style} ptr- (joinStyle_ :: #{gtk2hs_type GdkJoinStyle}) + (joinStyle_ :: #{gtk2hs_type GdkJoinStyle}) <- #{peek GdkGCValues, join_style} ptr return $ GCValues { foreground = foreground_,@@ -299,6 +300,7 @@ capStyle = (toEnum.fromIntegral) capStyle_, joinStyle = (toEnum.fromIntegral) joinStyle_ }+ poke = error "GCValues poke undefined (not sure why)" pokeGCValues :: Ptr GCValues -> GCValues -> IO CInt pokeGCValues ptr (GCValues {@@ -321,17 +323,17 @@ joinStyle = joinStyle_ }) = do r <- newIORef 0- add r #{const GDK_GC_FOREGROUND } $ + add r #{const GDK_GC_FOREGROUND } $ poke (#{ptr GdkGCValues, foreground} ptr) foreground_- add r #{const GDK_GC_BACKGROUND } $ + add r #{const GDK_GC_BACKGROUND } $ poke (#{ptr GdkGCValues, background} ptr) background_- add r #{const GDK_GC_FUNCTION } $ - #{poke GdkGCValues, function} ptr + add r #{const GDK_GC_FUNCTION } $+ #{poke GdkGCValues, function} ptr (fromIntegral (fromEnum function_):: #{gtk2hs_type GdkFunction}) add r #{const GDK_GC_FILL } $- #{poke GdkGCValues, fill} ptr + #{poke GdkGCValues, fill} ptr (fromIntegral (fromEnum fill_):: #{gtk2hs_type GdkFill})- case tile_ of + case tile_ of Nothing -> return () Just tile_ -> add r #{const GDK_GC_TILE} $ withForeignPtr (unPixmap tile_) $@@ -355,7 +357,7 @@ add r #{const GDK_GC_TS_Y_ORIGIN } $ #{poke GdkGCValues, ts_y_origin } ptr (fromIntegral tsYOrigin_:: #{gtk2hs_type gint})- add r #{const GDK_GC_CLIP_X_ORIGIN } $ + add r #{const GDK_GC_CLIP_X_ORIGIN } $ #{poke GdkGCValues, clip_x_origin } ptr (fromIntegral clipXOrigin_:: #{gtk2hs_type gint}) add r #{const GDK_GC_CLIP_Y_ORIGIN } $@@ -370,10 +372,10 @@ add r #{const GDK_GC_LINE_STYLE } $ #{poke GdkGCValues, line_style } ptr (fromIntegral (fromEnum lineStyle_):: #{gtk2hs_type GdkLineStyle})- add r #{const GDK_GC_CAP_STYLE } $ + add r #{const GDK_GC_CAP_STYLE } $ #{poke GdkGCValues, cap_style } ptr (fromIntegral (fromEnum capStyle_):: #{gtk2hs_type GdkCapStyle})- add r #{const GDK_GC_JOIN_STYLE } $ + add r #{const GDK_GC_JOIN_STYLE } $ #{poke GdkGCValues, join_style } ptr (fromIntegral (fromEnum joinStyle_):: #{gtk2hs_type GdkJoinStyle}) readIORef r@@ -503,7 +505,7 @@ -- dialogGetActionArea :: DialogClass dc => dc -> IO HBox dialogGetActionArea dc = makeNewObject mkHBox $ liftM castPtr $- withForeignPtr ((unDialog.toDialog) dc) #{peek GtkDialog, action_area} + withForeignPtr ((unDialog.toDialog) dc) #{peek GtkDialog, action_area} #endif -- | Some constructors that can be used as response@@ -635,15 +637,15 @@ #if GTK_MAJOR_VERSION < 3 #if defined(WIN32)-foreign import ccall unsafe "gdk_win32_drawable_get_handle" +foreign import ccall unsafe "gdk_win32_drawable_get_handle" gdk_win32_drawable_get_handle :: (Ptr Drawable) -> IO (Ptr a) #elif !defined(HAVE_QUARTZ_GTK)-foreign import ccall unsafe "gdk_x11_drawable_get_xid" +foreign import ccall unsafe "gdk_x11_drawable_get_xid" gdk_x11_drawable_get_xid :: (Ptr Drawable) -> IO CInt #endif #else #if !defined(HAVE_QUARTZ_GTK) && !defined(WIN32)-foreign import ccall unsafe "gdk_x11_window_get_xid" +foreign import ccall unsafe "gdk_x11_window_get_xid" gdk_x11_drawable_get_xid :: (Ptr DrawWindow) -> IO CInt #endif #endif@@ -726,7 +728,7 @@ -- | Icon size for icons next to dialog text. | IconSizeDialog- + | IconSizeUser Int deriving (Eq) @@ -740,14 +742,14 @@ toEnum #{const GTK_ICON_SIZE_DIALOG} = IconSizeDialog toEnum n = IconSizeUser n fromEnum IconSizeInvalid = #{const GTK_ICON_SIZE_INVALID}- fromEnum IconSizeMenu = #{const GTK_ICON_SIZE_MENU} + fromEnum IconSizeMenu = #{const GTK_ICON_SIZE_MENU} fromEnum IconSizeSmallToolbar = #{const GTK_ICON_SIZE_SMALL_TOOLBAR} fromEnum IconSizeLargeToolbar = #{const GTK_ICON_SIZE_LARGE_TOOLBAR} fromEnum IconSizeButton = #{const GTK_ICON_SIZE_BUTTON} fromEnum IconSizeDnd = #{const GTK_ICON_SIZE_DND} fromEnum IconSizeDialog = #{const GTK_ICON_SIZE_DIALOG} fromEnum (IconSizeUser n) = n- + -- entry Widget Combo #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED@@ -764,7 +766,7 @@ #if GTK_MAJOR_VERSION < 3 -- | Extract the buttons of a fileselection. ---fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> +fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> IO (Button, Button) fileSelectionGetButtons fsel = do@@ -804,7 +806,7 @@ -- Removed in Gtk3. widgetGetSize :: WidgetClass widget => widget -> IO (Int, Int) widgetGetSize da = withForeignPtr (unWidget.toWidget $ da) $ \wPtr -> do- (width :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, width} + (width :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, width} (#{ptr GtkWidget, allocation} wPtr) (height :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, height} (#{ptr GtkWidget, allocation} wPtr)@@ -1062,7 +1064,6 @@ withTargetEntries tags fun = do ptrsInfo <- mapM (\(Atom tag, info) -> gdk_atom_name tag >>= \strPtr -> return (TargetEntry strPtr info)) tags- let len = length tags res <- withArrayLen ptrsInfo (\len ptr -> fun len (castPtr ptr)) mapM_ (\(TargetEntry ptr _) -> g_free ptr) ptrsInfo return res@@ -1085,20 +1086,20 @@ -- | A 'KeymapKey' is a hardware key that can be mapped to a keyval. data KeymapKey = KeymapKey { keycode :: Int -- ^ @keycode@ the hardware keycode. This is an identifying number for a physical key.- ,group :: Int -- ^ @group@ indicates movement in a horizontal direction. - -- Usually groups are used for two different languages. - -- In group 0, a key might have two English characters, - -- and in group 1 it might have two Hebrew characters. - -- The Hebrew characters will be printed on the key next to the English characters. - -- indicates which symbol on the key will be used, - -- in a vertical direction. So on a standard US keyboard, the - ,level :: Int -- ^ @level@ key with the number "1" on it also has the exclamation + ,group :: Int -- ^ @group@ indicates movement in a horizontal direction.+ -- Usually groups are used for two different languages.+ -- In group 0, a key might have two English characters,+ -- and in group 1 it might have two Hebrew characters.+ -- The Hebrew characters will be printed on the key next to the English characters.+ -- indicates which symbol on the key will be used,+ -- in a vertical direction. So on a standard US keyboard, the+ ,level :: Int -- ^ @level@ key with the number "1" on it also has the exclamation -- point ("!") character on it. The level -- indicates whether to use the "1" or the "!" symbol. The letter keys are considered to -- have a lowercase letter at level 0, and an uppercase letter at level 1, though only -- the uppercase letter is printed.- } deriving (Eq, Show) - + } deriving (Eq, Show)+ instance Storable KeymapKey where sizeOf _ = #{const sizeof(GdkKeymapKey)} alignment _ = alignment (undefined::#gtk2hs_type gint)@@ -1111,5 +1112,5 @@ #{poke GdkKeymapKey, keycode} ptr ((fromIntegral keycode)::#gtk2hs_type guint) #{poke GdkKeymapKey, group} ptr ((fromIntegral group)::#gtk2hs_type gint) #{poke GdkKeymapKey, level} ptr ((fromIntegral level)::#gtk2hs_type gint)- - ++
Graphics/UI/Gtk/General/Style.chs view
@@ -35,7 +35,7 @@ -- module Graphics.UI.Gtk.General.Style ( -- * Description--- +-- -- | Styles are attached to widgets and determine how particular parts are -- drawn and with what color. Thus they are should be seen as mandatory when -- one implements a new custom widgets via 'DrawingArea'. Although the@@ -70,11 +70,15 @@ {# context prefix ="gtk" #} +#if GTK_MAJOR_VERSION < 3 import System.Glib.FFI--{#import Graphics.UI.Gtk.Types#} {#import Graphics.Rendering.Pango.Types#} import Graphics.Rendering.Pango.BasicTypes+import Graphics.UI.Gtk.General.Structs (Rectangle)+import Graphics.UI.Gtk.General.Enums (StateType, ShadowType)+#endif++{#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.Structs (styleGetForeground, styleGetBackground, styleGetLight,@@ -82,9 +86,7 @@ styleGetDark, styleGetText, styleGetBase,- styleGetAntiAliasing,- Rectangle)-import Graphics.UI.Gtk.General.Enums (StateType, ShadowType)+ styleGetAntiAliasing) #if GTK_MAJOR_VERSION < 3 stylePaintFlatBox :: WidgetClass widget
Graphics/UI/Gtk/Layout/Alignment.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Alignment ( -- * Detail--- +-- -- | The 'Alignment' widget controls the alignment and size of its child -- widget. It has four settings: xscale, yscale, xalign, and yalign. --@@ -96,7 +96,7 @@ -- | Creates a new 'Alignment'. ---alignmentNew :: +alignmentNew :: Float -- ^ @xalign@ - the horizontal alignment of the child widget, -- from 0 (left) to 1 (right). -> Float -- ^ @yalign@ - the vertical alignment of the child widget,
Graphics/UI/Gtk/Layout/AspectFrame.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.AspectFrame ( -- * Detail--- +-- -- | The 'AspectFrame' is useful when you want pack a widget so that it can -- resize but always retains the same aspect ratio. For instance, one might be -- drawing a small preview of a larger image. 'AspectFrame' derives from@@ -83,7 +83,7 @@ -- -- The frame may be augmented with a label which can be set by @frameSetLabel@. ---aspectFrameNew :: +aspectFrameNew :: Float -- ^ @xalign@ - Horizontal alignment of the child within -- the allocation of the 'AspectFrame'. This ranges from 0.0 -- (left aligned) to 1.0 (right aligned)
Graphics/UI/Gtk/Layout/Fixed.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Fixed ( -- * Detail--- +-- -- | The 'Fixed' widget is a container which can place child widgets at fixed -- positions and with fixed sizes, given in pixels. 'Fixed' performs no -- automatic layout management.
Graphics/UI/Gtk/Layout/HBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.HBox ( -- * Detail--- +-- -- | 'HBox' is a container that organizes child widgets into a single row. -- -- Use the 'Box' packing interface to determine the arrangement, spacing,@@ -72,7 +72,7 @@ -- | Creates a new 'HBox'. ---hBoxNew :: +hBoxNew :: Bool -- ^ @homogeneous@ - @True@ if all children are to be given equal -- space allotments. -> Int -- ^ @spacing@ - the number of pixels to place by default between
Graphics/UI/Gtk/Layout/HButtonBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.HButtonBox ( -- * Detail--- +-- -- | A button box should be used to provide a consistent layout of buttons -- throughout your application. The layout\/spacing can be altered by the -- programmer, or if desired, by the user to alter the \'feel\' of a program to
Graphics/UI/Gtk/Layout/HPaned.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.HPaned ( -- * Detail--- +-- -- | The HPaned widget is a container widget with two children arranged -- horizontally. The division between the two panes is adjustable by the user -- by dragging a handle. See 'Paned' for details.
Graphics/UI/Gtk/Layout/Layout.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Layout ( -- * Detail--- +-- -- | 'Layout' is similar to 'DrawingArea' in that it's a \"blank slate\" and -- doesn't do anything but paint a blank background by default. It's different -- in that it supports scrolling natively (you can add it to a@@ -100,7 +100,7 @@ -- the layout to use for scrolling, pass @Nothing@ for @hadjustment@ and -- @vadjustment@. ---layoutNew :: +layoutNew :: Maybe Adjustment -- ^ @hadjustment@ - horizontal scroll adjustment, or -- @Nothing@ -> Maybe Adjustment -- ^ @vadjustment@ - vertical scroll adjustment, or
Graphics/UI/Gtk/Layout/Notebook.chs view
@@ -189,7 +189,6 @@ ) where import Control.Monad (liftM)-import Data.Maybe (maybe) import System.Glib.FFI import System.Glib.UTFString@@ -201,12 +200,13 @@ import Graphics.UI.Gtk.Abstract.ContainerChildProperties import Graphics.UI.Gtk.Display.Label (labelNew) import Graphics.UI.Gtk.General.Enums (Packing(..), toPacking, fromPacking,- PackType(..), PositionType(..), DirectionType(..))+ PackType(..), PositionType(..)) {# context lib="gtk" prefix="gtk" #} #if GTK_MAJOR_VERSION < 3 {#pointer *GtkNotebookPage as NotebookPage foreign newtype #}+_ignoreNotebookPage = NotebookPage #endif --------------------
Graphics/UI/Gtk/Layout/Table.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.Table ( -- * Detail--- +-- -- | The 'Table' functions allow the programmer to arrange widgets in rows and -- columns, making it easy to align many widgets next to each other, -- horizontally and vertically.@@ -124,7 +124,7 @@ -- can be changed later with 'tableResize'. @rows@ and @columns@ must both be -- in the range 0 .. 65535. ---tableNew :: +tableNew :: Int -- ^ @rows@ - The number of rows the new table should have. -> Int -- ^ @columns@ - The number of columns the new table should have. -> Bool -- ^ @homogeneous@ - If set to @True@, all table cells are@@ -349,7 +349,7 @@ rows <- peek rowsPtr columns <- peek columnsPtr return (fromIntegral rows, fromIntegral columns)- + #endif --------------------
Graphics/UI/Gtk/Layout/VBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.VBox ( -- * Detail--- +-- -- | 'VBox' is a container that organizes child widgets into a single column. -- -- Use the 'Box' packing interface to determine the arrangement, spacing,@@ -72,7 +72,7 @@ -- | Creates a new 'VBox'. ---vBoxNew :: +vBoxNew :: Bool -- ^ @homogeneous@ - @True@ if all children are to be given equal -- space allotments. -> Int -- ^ @spacing@ - the number of pixels to place by default between
Graphics/UI/Gtk/Layout/VButtonBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.VButtonBox ( -- * Detail--- +-- -- | A button box should be used to provide a consistent layout of buttons -- throughout your application. The layout\/spacing can be altered by the -- programmer, or if desired, by the user to alter the \'feel\' of a program to
Graphics/UI/Gtk/Layout/VPaned.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Layout.VPaned ( -- * Detail--- +-- -- | The VPaned widget is a container widget with two children arranged -- vertically. The division between the two panes is adjustable by the user by -- dragging a handle. See 'Paned' for details.
Graphics/UI/Gtk/MenuComboToolbar/Combo.chs view
@@ -94,7 +94,7 @@ ) where #if GTK_MAJOR_VERSION < 3-import Control.Monad (liftM, mapM_)+import Control.Monad (liftM) import System.Glib.FFI import System.Glib.UTFString
Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs view
@@ -169,13 +169,8 @@ import System.Glib.Attributes import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject)-import System.Glib.GObject (makeNewGObject,- destroyFunPtr,- Quark, objectSetAttribute, objectGetAttributeUnsafe ) {#import Graphics.UI.Gtk.Types#} hiding (ListStore)-{#import Graphics.UI.Gtk.ModelView.Types#} (TypedTreeModelClass,- TreeIter,- receiveTreeIter,+{#import Graphics.UI.Gtk.ModelView.Types#} (receiveTreeIter, comboQuark) {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.ModelView.CustomStore#}
Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs view
@@ -102,8 +102,6 @@ {#import Graphics.UI.Gtk.Types#} hiding ( ListStore ) import Graphics.UI.Gtk.ModelView.Types import Graphics.UI.Gtk.MenuComboToolbar.ComboBox-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.ListStore ( ListStore, listStoreNew )
Graphics/UI/Gtk/MenuComboToolbar/Menu.chs view
@@ -122,7 +122,6 @@ import System.Glib.GList import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Abstract.ContainerChildProperties
Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.MenuBar ( -- * Detail--- +-- -- | The 'MenuBar' is a subclass of 'MenuShell' which contains one to many -- 'MenuItem'. The result is a standard menu bar which can hold many menu -- items.
Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.MenuShell ( -- * Detail--- +-- -- | A 'MenuShell' is the abstract base class used to derive the 'Menu' and -- 'MenuBar' subclasses. --
Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs view
@@ -91,7 +91,6 @@ {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.General.StockItems-import Graphics.Rendering.Pango.Markup {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/MenuComboToolbar/OptionMenu.chs view
@@ -30,7 +30,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.OptionMenu ( -- * Detail--- +-- -- | A 'OptionMenu' is a widget that allows the user to choose from a list of -- valid choices. The 'OptionMenu' displays the selected choice. When activated -- the 'OptionMenu' displays a popup 'Menu' which allows the user to make a new
Graphics/UI/Gtk/MenuComboToolbar/RadioToolButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.RadioToolButton ( -- * Detail--- +-- -- | A 'RadioToolButton' is a 'ToolItem' that contains a radio button, that -- is, a button that is part of a group of toggle buttons where only one button -- can be active at a time.@@ -105,7 +105,7 @@ -- 'RadioToolButton' will contain an icon and label from the stock item -- indicated by @stockId@. ---radioToolButtonNewFromStock :: +radioToolButtonNewFromStock :: StockId -- ^ @stockId@ - the name of a stock item -> IO RadioToolButton radioToolButtonNewFromStock stockId =@@ -116,10 +116,10 @@ nullPtr stockIdPtr --- | Creates a new 'RadioToolButton' adding it to the same group as +-- | Creates a new 'RadioToolButton' adding it to the same group as -- the group to which @groupMember@ belongs. ---radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember => +radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember => groupMember -- ^ @groupMember@ - a member of an existing radio group, -- to which the new radio tool button will be added. -> IO RadioToolButton@@ -133,7 +133,7 @@ -- to which @groupMember@ belongs. The new 'RadioToolButton' will contain an -- icon and label from the stock item indicated by @stockId@. ---radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember => +radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember => groupMember -- ^ @groupMember@ - a member of an existing radio group, -- to which the new radio tool button will be added. -> StockId -- ^ @stockId@ - the name of a stock item
Graphics/UI/Gtk/MenuComboToolbar/SeparatorMenuItem.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.SeparatorMenuItem ( -- * Detail--- +-- -- | The 'SeparatorMenuItem' is a separator used to group items within a menu. -- It displays a horizontal line with a shadow to make it appear sunken into -- the interface.
Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.SeparatorToolItem ( -- * Detail--- +-- -- | A 'SeparatorToolItem' is a 'ToolItem' that separates groups of other -- 'ToolItem's. Depending on the theme, a 'SeparatorToolItem' will often look -- like a vertical line on horizontally docked toolbars.
Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.TearoffMenuItem ( -- * Detail--- +-- -- | A 'TearoffMenuItem' is a special 'MenuItem' which is used to tear off and -- reattach its menu. --
Graphics/UI/Gtk/MenuComboToolbar/ToggleToolButton.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.MenuComboToolbar.ToggleToolButton ( -- * Detail--- +-- -- | A 'ToggleToolButton' is a 'ToolItem' that contains a toggle button. -- -- Use 'toggleToolButtonNew' to create a new 'ToggleToolButton'. Use@@ -105,7 +105,7 @@ -- -- It is an error if @stockId@ is not a name of a stock item. ---toggleToolButtonNewFromStock :: +toggleToolButtonNewFromStock :: StockId -- ^ @stockId@ - the name of the stock item -> IO ToggleToolButton toggleToolButtonNewFromStock stockId =
Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs view
@@ -82,13 +82,11 @@ import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GList import System.Glib.UTFString import Graphics.Rendering.Pango.Enums (EllipsizeMode (..)) import Graphics.UI.Gtk.General.Enums (ReliefStyle(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#} {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs view
@@ -23,7 +23,7 @@ -- Stability : provisional -- Portability : portable (depends on GHC) ----- A tool palette with categories +-- A tool palette with categories -- -- * Module available since Gtk+ version 2.20 --@@ -41,9 +41,9 @@ -- * Detail -- | A 'ToolPalette' allows you to add 'ToolItems' to a palette-like container with different -- categories and drag and drop support.--- +-- -- A 'ToolPalette' is created with a call to 'toolPaletteNew'.--- +-- -- 'ToolItems' cannot be added directly to a 'ToolPalette' - instead they are added to a -- 'ToolItemGroup' which can than be added to a 'ToolPalette'. To add a 'ToolItemGroup' to a -- 'ToolPalette', use 'containerAdd'.@@ -64,7 +64,7 @@ -- @ #if GTK_CHECK_VERSION(2,20,0)--- * Types +-- * Types ToolPalette, ToolPaletteClass, castToToolPalette,@@ -92,8 +92,8 @@ -- * Child Attributes toolPaletteChildExclusive, toolPaletteChildExpand,- --- * Signals ++-- * Signals toolPaletteSetScrollAdjustments, #endif ) where@@ -103,8 +103,6 @@ import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GList-import System.Glib.UTFString import Graphics.UI.Gtk.General.Structs (IconSize (..)) import Graphics.UI.Gtk.General.Enums (ToolbarStyle (..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject)@@ -120,7 +118,7 @@ -- | Creates a new tool palette. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteNew :: IO ToolPalette toolPaletteNew =@@ -131,7 +129,7 @@ -- | Unsets the tool palette icon size set with 'toolPaletteSetIconSize', so that user -- preferences will be used to determine the icon size. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteUnsetIconSize :: ToolPaletteClass self => self -> IO () toolPaletteUnsetIconSize palette =@@ -141,7 +139,7 @@ -- | Unsets a toolbar style set with 'toolPaletteSetStyle', so that user preferences will be used -- to determine the toolbar style. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteUnsetStyle :: ToolPaletteClass self => self -> IO () toolPaletteUnsetStyle palette =@@ -150,7 +148,7 @@ -- | Gets the horizontal adjustment of the tool palette. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteGetHAdjustment :: ToolPaletteClass self => self -> IO Adjustment@@ -161,7 +159,7 @@ -- | Gets the vertical adjustment of the tool palette. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteGetVAdjustment :: ToolPaletteClass self => self -> IO Adjustment@@ -172,12 +170,12 @@ -- | Gets the position of group in palette as index. See 'toolPaletteSetGroupPosition'. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 ---toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) +toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) => palette -> group- -> IO Int -- ^ returns the index of group or -1 if group is not a child of palette + -> IO Int -- ^ returns the index of group or -1 if group is not a child of palette toolPaletteGetGroupPosition palette group = liftM fromIntegral $ {#call gtk_tool_palette_get_group_position #}@@ -187,9 +185,9 @@ -- | Sets the position of the group as an index of the tool palette. If position is 0 the group will -- become the first child, if position is -1 it will become the last child. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 ---toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) +toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) => palette -> group -> Int@@ -202,13 +200,13 @@ -- | The size of the icons in a tool palette is normally determined by the 'toolbarIconSize' -- setting. When this property is set, it overrides the setting.--- +-- -- This should only be used for special-purpose tool palettes, normal application tool palettes should -- respect the user preferences for the size of icons.--- +-- -- Default value: 'IconSizeSmallToolbar' ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteIconSize :: ToolPaletteClass self => Attr self IconSize toolPaletteIconSize =@@ -216,20 +214,20 @@ {# call pure unsafe gtk_icon_size_get_type #} -- | Is 'True' if the 'iconSize' property has been set.--- +-- -- Default value: 'False' ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteIconSizeSet :: ToolPaletteClass self => Attr self Bool toolPaletteIconSizeSet = newAttrFromBoolProperty "icon-size-set" -- | The style of items in the tool palette.--- +-- -- Default value: 'ToolbarIcons' ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteToolbarStyle :: ToolPaletteClass self => Attr self ToolbarStyle toolPaletteToolbarStyle =@@ -237,20 +235,20 @@ {# call pure unsafe gtk_toolbar_style_get_type #} -- | Whether the item group should be the only one that is expanded at a given time.--- +-- -- Default value: 'False' ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteChildExclusive :: ToolPaletteClass self => Attr self Bool toolPaletteChildExclusive = newAttrFromBoolProperty "exclusive" -- | Whether the item group should receive extra space when the palette grows. at a given time.--- +-- -- Default value: 'False' ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteChildExpand :: ToolPaletteClass self => Attr self Bool toolPaletteChildExpand =@@ -260,7 +258,7 @@ -- emit this signal to connect two instances of 'Scrollbar' to the scroll directions of the -- 'Toolpalette'. ----- * Available since Gtk+ version 2.20 +-- * Available since Gtk+ version 2.20 -- toolPaletteSetScrollAdjustments :: ToolPaletteClass self => Signal self (Adjustment -> Adjustment -> IO ()) toolPaletteSetScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments")
Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs view
@@ -162,10 +162,16 @@ ) where import Control.Monad (liftM)+#if GTK_MAJOR_VERSION < 3+#ifndef DISABLE_DEPRECATED import Data.Maybe (fromJust) import qualified Data.Text as T (filter)-import System.Glib.FFI+import Graphics.UI.Gtk.General.StockItems+import Graphics.UI.Gtk.Display.Image (imageNewFromStock) import System.Glib.UTFString+#endif+#endif+import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject)@@ -174,7 +180,6 @@ import Graphics.UI.Gtk.Abstract.ContainerChildProperties import Graphics.UI.Gtk.General.Enums (Orientation(..), ToolbarStyle(..), ReliefStyle(..))-import Graphics.UI.Gtk.General.StockItems import Graphics.UI.Gtk.General.Structs ( #if GTK_MAJOR_VERSION < 3 #ifndef DISABLE_DEPRECATED@@ -183,8 +188,6 @@ #endif #endif IconSize(..))-import Graphics.UI.Gtk.General.StockItems (stockLookupItem, siLabel, stockMissingImage)-import Graphics.UI.Gtk.Display.Image (imageNewFromStock) {# context lib="gtk" prefix="gtk" #} @@ -199,6 +202,10 @@ liftM (castPtr :: Ptr Widget -> Ptr Toolbar) $ {# call unsafe toolbar_new #} +--------------------+-- Methods+#if GTK_MAJOR_VERSION < 3+#ifndef DISABLE_DEPRECATED -- Make tooltips or not? -- mkToolText :: GlibString string => Maybe (string,string) -> (CString -> CString -> IO a) -> IO a@@ -206,10 +213,6 @@ mkToolText (Just (text,private)) fun = withUTFString text $ \txtPtr -> withUTFString private $ \prvPtr -> fun txtPtr prvPtr ------------------------ Methods-#if GTK_MAJOR_VERSION < 3-#ifndef DISABLE_DEPRECATED -- | Insert a new 'Button' into the 'Toolbar'. -- -- The new 'Button' is created at position @pos@, counting from 0.
Graphics/UI/Gtk/Misc/Accessible.chs view
@@ -29,7 +29,7 @@ -- * Detail -- -- | Accessible accessibility support for widgets.--- +-- -- * Class Hierarchy -- |@@ -52,18 +52,14 @@ #endif ) where -import Control.Monad (liftM)+#if GTK_CHECK_VERSION(2,22,0) import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Signals#} {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,22,0) -------------------- -- Methods @@ -82,11 +78,11 @@ -- -- * Available since Gtk+ version 2.22 ---accessibleSetWidget :: (AccessibleClass self, WidgetClass widget) - => self -- ^ @accessible@ a 'Accessible' - -> widget -- ^ @widget@ a 'Widget' +accessibleSetWidget :: (AccessibleClass self, WidgetClass widget)+ => self -- ^ @accessible@ a 'Accessible'+ -> widget -- ^ @widget@ a 'Widget' -> IO ()-accessibleSetWidget self widget = +accessibleSetWidget self widget = {#call accessible_set_widget #} (toAccessible self) (toWidget widget)
Graphics/UI/Gtk/Misc/Adjustment.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.Adjustment ( -- * Detail--- +-- -- | The 'Adjustment' object represents a value which has an associated lower -- and upper bound, together with step and page increments, and a page size. It -- is used within several Gtk+ widgets, including 'SpinButton', 'Viewport', and@@ -116,7 +116,7 @@ -- @pageSize@ is needed to determine if the end of the slider is still in the -- range. ---adjustmentNew :: +adjustmentNew :: Double -- ^ @value@ - the initial value. -> Double -- ^ @lower@ - the minimum value. -> Double -- ^ @upper@ - the maximum value.@@ -199,7 +199,7 @@ self -- | Updates the 'Adjustment' @value@ to ensure that the range between @lower@--- and @upper@ is in the current page (i.e. between @value@ and @value + +-- and @upper@ is in the current page (i.e. between @value@ and @value + -- pageSize@). If the range is larger than the page size, then only the start -- of it will be in the current page. A \"changed\" signal will be emitted if -- the value is changed.
Graphics/UI/Gtk/Misc/Arrow.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.Arrow ( -- * Detail--- +-- -- | 'Arrow' should be used to draw simple arrows that need to point in one of -- the four cardinal directions (up, down, left, or right). The style of the -- arrow can be one of shadow in, shadow out, etched in, or etched out. Note
Graphics/UI/Gtk/Misc/Calendar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.Calendar ( -- * Detail--- +-- -- | 'Calendar' is a widget that displays a calendar, one month at a time. It -- can be created with 'calendarNew'. --@@ -364,9 +364,9 @@ onDaySelectedDoubleClick, afterDaySelectedDoubleClick :: CalendarClass self => self -> IO () -> IO (ConnectId self)-onDaySelectedDoubleClick = +onDaySelectedDoubleClick = connect_NONE__NONE "day-selected-double-click" False-afterDaySelectedDoubleClick = +afterDaySelectedDoubleClick = connect_NONE__NONE "day-selected-double-click" True -- | The month changed.
Graphics/UI/Gtk/Misc/DrawingArea.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.DrawingArea ( -- * Detail--- +-- -- | The 'DrawingArea' widget is used for creating custom user interface -- elements. It's essentially a blank widget; you can draw on -- the 'Drawable' returned by 'drawingAreaGetDrawWindow'.@@ -94,8 +94,6 @@ #if GTK_MAJOR_VERSION < 3 import Graphics.UI.Gtk.General.Structs (widgetGetDrawWindow, widgetGetSize) #endif--- to make haddock happy:-import Graphics.UI.Gtk.Abstract.Widget {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Misc/EventBox.chs view
@@ -28,7 +28,7 @@ -- module Graphics.UI.Gtk.Misc.EventBox ( -- * Detail--- +-- -- | The 'EventBox' widget is a subclass of 'Bin' which also has its own -- window. It is useful since it allows you to catch events for widgets which -- do not have their own window.
Graphics/UI/Gtk/Misc/HandleBox.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.HandleBox ( -- * Detail--- +-- -- | The 'HandleBox' widget allows a portion of a window to be \"torn off\". -- It is a bin widget which displays its child and a handle that the user can -- drag to tear off a separate window (the float window) containing the child
Graphics/UI/Gtk/Misc/IMMulticontext.chs view
@@ -49,8 +49,6 @@ imMulticontextAppendMenuitems, ) where -import Control.Monad (liftM)- import System.Glib.FFI {#import Graphics.UI.Gtk.Types#}
Graphics/UI/Gtk/Misc/SizeGroup.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Misc.SizeGroup ( -- * Detail--- +-- -- | 'SizeGroup' provides a mechanism for grouping a number of widgets -- together so they all request the same amount of space. This is typically -- useful when you want a column of widgets to have the same size, but you@@ -91,7 +91,6 @@ import System.Glib.FFI import System.Glib.Attributes-import System.Glib.GObject (wrapNewGObject) {#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #}@@ -103,7 +102,7 @@ -- | Create a new 'SizeGroup'. ---sizeGroupNew :: +sizeGroupNew :: SizeGroupMode -- ^ @mode@ - the mode for the new size group. -> IO SizeGroup sizeGroupNew mode =
Graphics/UI/Gtk/Misc/Tooltip.chs view
@@ -99,14 +99,13 @@ #endif ) where -import Control.Monad (liftM)+#if GTK_CHECK_VERSION(2,12,0)+ import Data.Maybe (fromMaybe) import System.Glib.FFI import System.Glib.UTFString-import System.Glib.GObject (constructNewGObject,makeNewGObject) import Graphics.UI.Gtk.General.Structs (IconSize(..), Rectangle)-import Graphics.Rendering.Pango.Markup {#import Graphics.UI.Gtk.Types#} #ifdef HAVE_GIO {#import System.GIO.Types#}@@ -114,7 +113,6 @@ {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,12,0) -------------------- -- Methods
Graphics/UI/Gtk/Misc/Tooltips.chs view
@@ -155,8 +155,6 @@ tipTextPtr tipPrivatePtr -{#pointer * TooltipsData#}- -- | Retrieves any 'Tooltips' previously associated with the given widget. -- tooltipsDataGet :: (WidgetClass w, GlibString string) => w -> IO (Maybe (Tooltips, string, string))
Graphics/UI/Gtk/Misc/Viewport.chs view
@@ -96,7 +96,7 @@ -- | Creates a new 'Viewport' with the given adjustments. ---viewportNew :: +viewportNew :: Adjustment -- ^ @hadjustment@ - horizontal adjustment. -> Adjustment -- ^ @vadjustment@ - vertical adjustment. -> IO Viewport
Graphics/UI/Gtk/ModelView.chs view
@@ -24,7 +24,7 @@ -- Portability : portable (depends on GHC) -- -- New model-based tree\/list widget system.--- +-- -- This just re-exports the Graphics.UI.Gtk.ModelView.* modules. -- -- * Note: From this version of Gtk2Hs this system will be the default
Graphics/UI/Gtk/ModelView/CellEditable.chs view
@@ -54,14 +54,13 @@ -- * Attributes #if GTK_CHECK_VERSION(2,20,0) cellEditableEditingCanceled,-#endif +#endif -- * Signals cellEditableEditingDone, cellEditableRemoveWidget, ) where -import Control.Monad (liftM) import Control.Monad.Reader.Class (ask) import Control.Monad.Trans (liftIO) @@ -70,15 +69,14 @@ import System.Glib.Properties {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-import Graphics.UI.Gtk.Gdk.EventM (EventM, EKey, EAny)-import Graphics.UI.Gtk.Gdk.Events (Event, EventKey, marshalEvent)+import Graphics.UI.Gtk.Gdk.EventM (EventM, EAny) {# context lib="gtk" prefix="gtk" #} -------------------- -- Methods --- | Begins editing on a @cellEditable@. @event@ is the 'Event' that began the editing process. +-- | Begins editing on a @cellEditable@. @event@ is the 'Event' that began the editing process. -- cellEditableStartEditing :: CellEditableClass self => self -> EventM EAny () cellEditableStartEditing self = do@@ -105,9 +103,9 @@ -- Attributes #if GTK_CHECK_VERSION(2,20,0) -- | Indicates whether editing on the cell has been canceled.--- +-- -- Default value: 'False'--- +-- -- * Available since Gtk+ version 2.20 -- cellEditableEditingCanceled :: CellEditableClass self => Attr self Bool
Graphics/UI/Gtk/ModelView/CellLayout.chs view
@@ -29,7 +29,7 @@ -- module Graphics.UI.Gtk.ModelView.CellLayout ( -- * Detail--- +-- -- | 'CellLayout' is an interface which is implemented by all objects which -- provide a 'TreeViewColumn' API for packing cells, setting attributes and data funcs. @@ -68,7 +68,6 @@ import System.Glib.FFI import System.Glib.GList import System.Glib.Attributes-import System.Glib.GObject (destroyFunPtr) import System.Glib.GType {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#}@@ -171,7 +170,7 @@ cellLayoutAddColumnAttribute :: (CellLayoutClass self, CellRendererClass cell) => self -> cell -- ^ @cell@ - A 'CellRenderer'. -> ReadWriteAttr cell a v -- ^ @attribute@ - An attribute of a renderer.- -> ColumnId row v -- ^ @column@ - The virtual column of the model from which to + -> ColumnId row v -- ^ @column@ - The virtual column of the model from which to -- retrieve the attribute. -> IO () cellLayoutAddColumnAttribute self cell attr column =@@ -208,7 +207,7 @@ -> model row -- ^ @model@ - A model containing rows of type @row@. -> (row -> [AttrOp cell]) -- ^ Function to set attributes on the cell renderer. -> IO ()-cellLayoutSetAttributes self cell model attributes = +cellLayoutSetAttributes self cell model attributes = cellLayoutSetAttributeFunc self cell model $ \iter -> do row <- treeModelGetRow model iter set cell (attributes row)@@ -226,7 +225,7 @@ -> IO () cellLayoutSetAttributeFunc self cell model func = do fPtr <- mkSetAttributeFunc $ \_ cellPtr' modelPtr' iterPtr _ -> do- iter <- convertIterFromParentToChildModel iterPtr modelPtr' + iter <- convertIterFromParentToChildModel iterPtr modelPtr' (toTreeModel model) let (CellRenderer cellPtr) = toCellRenderer cell if unsafeForeignPtrToPtr cellPtr /= cellPtr' then@@ -286,14 +285,14 @@ foreign import ccall safe "gtk_tree_model_filter_convert_iter_to_child_iter" treeModelFilterConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter ->- Ptr TreeIter -> IO () + Ptr TreeIter -> IO () foreign import ccall unsafe "gtk_tree_model_sort_get_model" treeModelSortGetModel :: Ptr TreeModel -> IO (Ptr TreeModel)- + foreign import ccall safe "gtk_tree_model_sort_convert_iter_to_child_iter" treeModelSortConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter ->- Ptr TreeIter -> IO () + Ptr TreeIter -> IO () -- | Clears all existing attributes previously set with -- 'cellLayoutSetAttributes'.
Graphics/UI/Gtk/ModelView/CellRendererCombo.chs view
@@ -76,7 +76,6 @@ import System.Glib.UTFString import System.Glib.Attributes (Attr, WriteAttr, writeAttr) import System.Glib.Properties-import System.Glib.GObject (constructNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#}
Graphics/UI/Gtk/ModelView/CellRendererSpin.chs view
@@ -99,7 +99,7 @@ -------------------- -- Attributes --- | The adjustment that holds the value of the spinbutton. +-- | The adjustment that holds the value of the spinbutton. -- -- * Available since Gtk+ version 2.10 --@@ -108,9 +108,9 @@ {# call pure unsafe gtk_adjustment_get_type #} -- | The acceleration rate when you hold down a button.--- +-- -- Allowed values: >= 0--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.10@@ -119,9 +119,9 @@ cellRendererSpinClimbRate = newAttrFromDoubleProperty "climb-rate" -- | The number of decimal places to display.--- +-- -- Allowed values: <= 20--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.10
Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs view
@@ -23,7 +23,7 @@ -- Stability : provisional -- Portability : portable (depends on GHC) ----- Renders a spinning animation in a cell +-- Renders a spinning animation in a cell -- -- * Module available since Gtk+ version 2.20 --@@ -32,7 +32,7 @@ -- | 'CellRendererSpinner' renders a spinning animation in a cell, very similar to 'Spinner'. It can -- often be used as an alternative to a 'CellRendererProgress' for displaying indefinite activity, -- instead of actual progress.--- +-- -- To start the animation in a cell, set the "active" property to 'True' and increment the "pulse" -- property at regular intervals. The usual way to set the cell renderer properties for each cell is -- to bind them to columns in your tree model using e.g. 'treeViewColumnAddAttribute'.@@ -46,9 +46,9 @@ -- | +----'CellRenderer' -- | +----'CellRendererSpinner' -- @- + #if GTK_CHECK_VERSION(2,20,0)--- * Types +-- * Types CellRendererSpinner, CellRendererSpinnerClass, castToCellRendererSpinner,@@ -86,7 +86,7 @@ {#call gtk_cell_renderer_spinner_new #} -- | Whether the spinner is active (ie. shown) in the cell.--- +-- -- Default value: 'False' -- -- * Available since Gtk+ version 2.20@@ -97,11 +97,11 @@ -- | Pulse of the spinner. Increment this value to draw the next frame of the spinner animation. Usually, -- you would update this value in a timeout.--- +-- -- The 'Spinner' widget draws one full cycle of the animation per second by default. You can learn -- about the number of frames used by the theme by looking at the 'numSteps' style property and the -- duration of the cycle by looking at 'cycleDuration'.--- +-- -- Default value: 0 -- -- * Available since Gtk+ version 2.20@@ -111,7 +111,7 @@ newAttrFromIntProperty "pulse" -- | The 'IconSize' value that specifies the size of the rendered spinner.--- +-- -- Default value: 'IconSizeMenu' -- -- * Available since Gtk+ version 2.20
Graphics/UI/Gtk/ModelView/CellRendererText.chs view
@@ -128,7 +128,7 @@ {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.ModelView.Types#}-import Graphics.UI.Gtk.General.Structs (Color(..))+import Graphics.UI.Gtk.General.Structs () import Graphics.Rendering.Pango.Enums {#import Graphics.Rendering.Pango.BasicTypes#} ( FontDescription(..), makeNewFontDescription )
Graphics/UI/Gtk/ModelView/CellView.chs view
@@ -74,7 +74,9 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties (writeAttrFromStringProperty)+#if GTK_MAJOR_VERSION < 3 {#import System.Glib.GList#}+#endif {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.ModelView.Types#}
Graphics/UI/Gtk/ModelView/CustomStore.chs view
@@ -33,7 +33,7 @@ -- 'customStoreGetRow' functions. -- module Graphics.UI.Gtk.ModelView.CustomStore (- -- * The definition of a row-based store. + -- * The definition of a row-based store. CustomStore, TreeModelFlags(..), TreeModelIface(..),@@ -50,22 +50,18 @@ treeModelSetColumn, ) where -import Control.Monad (liftM, when)+import Control.Monad (liftM) import Control.Monad.Reader (runReaderT) import Data.IORef (IORef, newIORef, readIORef, writeIORef) import Data.Maybe (fromMaybe) import System.Glib.FFI hiding (maybeNull) import System.Glib.Flags (Flags, fromFlags)-{#import System.Glib.GObject#} (GObjectClass(..), GObject(..), unGObject,- makeNewGObject, objectUnref) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#} import Graphics.UI.Gtk.General.DNDTypes (SelectionDataM, SelectionData) -import System.Glib.StoreValue (TMType(..), GenericValue(..), valueSetGenericValue)-{#import System.Glib.GValue#} (GValue(GValue), allocaGValue)+{#import System.Glib.GValue#} (GValue(GValue)) {#import System.Glib.GType#} (GType)-import System.Glib.GValueTypes (valueSetString) import qualified System.Glib.GTypeConstants as GConst {#import System.Glib.GValueTypes#} {#import System.Glib.GValue#} (valueInit)@@ -212,7 +208,7 @@ -- its information be used to insert a new row at the given path. treeDragDestDragDataReceived:: model row -> TreePath -> SelectionDataM Bool -- insert row from selection object }- + -- | Create a new store that implements the 'TreeModelIface' interface and -- optionally the 'DragSourceIface' and the 'DragDestIface'. If the latter two -- are set to @Nothing@ a dummy interface is substituted that rejects every@@ -250,7 +246,7 @@ -- | Extract a row of the given model at the given 'TreeIter'. -- customStoreGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row-customStoreGetRow model iter = +customStoreGetRow model iter = case toTypedTreeModel model of TypedTreeModel model -> do impl <- withForeignPtr model gtk2hs_store_get_impl >>= deRefStablePtr@@ -377,7 +373,7 @@ (CAPixbuf ca) -> valueInit gVal {#call fun unsafe gdk_pixbuf_get_type#} >> valueSetGObject gVal (ca row) CAInvalid -> valueInit gVal GConst.int >> valueSetInt gVal 0- + foreign export ccall "gtk2hs_store_get_value_impl" treeModelIfaceGetValue_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> CInt -> Ptr GValue -> IO () @@ -531,7 +527,3 @@ maybeNull marshal ptr | ptr == nullPtr = return Nothing | otherwise = liftM Just (marshal ptr)--iterSetStamp :: CInt -> TreeIter -> TreeIter-iterSetStamp t (TreeIter _ a b c) = (TreeIter t a b c)-
Graphics/UI/Gtk/ModelView/IconView.chs view
@@ -150,7 +150,6 @@ import System.Glib.Properties import System.Glib.GList (fromGList) import System.Glib.Flags-import System.Glib.GObject (makeNewGObject, constructNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.Gdk.Enums (DragAction(..)) import Graphics.UI.Gtk.Gdk.Events (Modifier(..))@@ -158,7 +157,6 @@ {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.General.Enums#} (Orientation, SelectionMode) {#import Graphics.UI.Gtk.ModelView.TreeModel#}-{#import Graphics.UI.Gtk.ModelView.CustomStore#} {#import Graphics.UI.Gtk.ModelView.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#} (TargetList(..))
Graphics/UI/Gtk/ModelView/ListStore.hs view
@@ -65,8 +65,8 @@ import Graphics.UI.Gtk.ModelView.Sequence (Seq) #endif -import Graphics.UI.Gtk.Types (GObjectClass(..), TreeModelClass)-import Graphics.UI.Gtk.ModelView.Types (TypedTreeModelClass, TreeIter(..))+import Graphics.UI.Gtk.Types (GObjectClass(..))+-- import Graphics.UI.Gtk.ModelView.Types () import Graphics.UI.Gtk.ModelView.CustomStore import Graphics.UI.Gtk.ModelView.TreeModel import Graphics.UI.Gtk.ModelView.TreeDrag@@ -234,10 +234,10 @@ stamp <- customStoreGetStamp model treeModelRowInserted model [0] (TreeIter stamp 0 0 0) --- | Prepend a list to the store. Not implemented yet.-listStorePrependList :: ListStore a -> [a] -> IO ()-listStorePrependList store list =- mapM_ (listStoreInsert store 0) (reverse list)+---- | Prepend a list to the store. Not implemented yet.+--listStorePrependList :: ListStore a -> [a] -> IO ()+--listStorePrependList store list =+-- mapM_ (listStoreInsert store 0) (reverse list) -- | Append an element to the store. Returns the index of the inserted -- element.@@ -294,21 +294,21 @@ in do seq <- readIORef (customStoreGetPrivate model) loop (Seq.length seq - 1) (Seq.viewr seq) --- | Permute the rows of the store. Not yet implemented.-listStoreReorder :: ListStore a -> [Int] -> IO ()-listStoreReorder store = undefined---- | Swap two rows of the store. Not yet implemented.-listStoreSwap :: ListStore a -> Int -> Int -> IO ()-listStoreSwap store = undefined---- | Move the element at the first index in front of the element denoted by--- the second index. Not yet implemented.-listStoreMoveBefore :: ListStore a -> Int -> Int -> IO ()-listStoreMoveBefore store = undefined---- | Move the element at the first index past the element denoted by the--- second index. Not yet implemented.-listStoreMoveAfter :: ListStore a -> Int -> Int -> IO ()-listStoreMoveAfter store = undefined+---- | Permute the rows of the store. Not yet implemented.+--listStoreReorder :: ListStore a -> [Int] -> IO ()+--listStoreReorder store = undefined+--+---- | Swap two rows of the store. Not yet implemented.+--listStoreSwap :: ListStore a -> Int -> Int -> IO ()+--listStoreSwap store = undefined+--+---- | Move the element at the first index in front of the element denoted by+---- the second index. Not yet implemented.+--listStoreMoveBefore :: ListStore a -> Int -> Int -> IO ()+--listStoreMoveBefore store = undefined+--+---- | Move the element at the first index past the element denoted by the+---- second index. Not yet implemented.+--listStoreMoveAfter :: ListStore a -> Int -> Int -> IO ()+--listStoreMoveAfter store = undefined
Graphics/UI/Gtk/ModelView/TreeDrag.chs view
@@ -62,7 +62,7 @@ {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.Types#} (TreePath, fromTreePath, withTreePath, NativeTreePath(..))-import Graphics.UI.Gtk.General.DNDTypes (SelectionDataM, SelectionData,+import Graphics.UI.Gtk.General.DNDTypes (SelectionDataM, TargetTag, atomNew) import Control.Monad (liftM) import Control.Monad.Trans (liftIO)@@ -114,6 +114,6 @@ treeSetRowDragData treeModel path = do selPtr <- ask liftM toBool $ liftIO $ withTreePath path $ \path ->- {# call unsafe gtk_tree_set_row_drag_data #} selPtr + {# call unsafe gtk_tree_set_row_drag_data #} selPtr (toTreeModel treeModel) path
Graphics/UI/Gtk/ModelView/TreeModel.chs view
@@ -162,11 +162,8 @@ import System.Glib.UTFString {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Types#}-import System.Glib.StoreValue (TMType, GenericValue,- valueGetGenericValue) {#import System.Glib.GValue#} (GValue(GValue), allocaGValue)-{#import Graphics.UI.Gtk.ModelView.CustomStore#} (TreeModelFlags(..),- treeModelGetRow)+{#import Graphics.UI.Gtk.ModelView.CustomStore#} (TreeModelFlags(..)) {#import Graphics.UI.Gtk.ModelView.Types#} (TypedTreeModel, TypedTreeModelClass, toTypedTreeModel,
Graphics/UI/Gtk/ModelView/TreeModelFilter.chs view
@@ -84,12 +84,10 @@ import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.GObject (wrapNewGObject) import System.Glib.Attributes import System.Glib.Properties {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.TreeModel#}-{#import Graphics.UI.Gtk.ModelView.CustomStore#} {#import Graphics.UI.Gtk.ModelView.Types#} {# context lib="gtk" prefix="gtk" #}@@ -118,14 +116,14 @@ -> IO (TypedTreeModelFilter row) treeModelFilterNew childModel [] = liftM unsafeTreeModelFilterToGeneric $- wrapNewGObject mkTreeModelFilter $ + wrapNewGObject mkTreeModelFilter $ liftM (castPtr :: Ptr TreeModel -> Ptr TreeModelFilter) $ {# call gtk_tree_model_filter_new #} (toTreeModel childModel) (NativeTreePath nullPtr) treeModelFilterNew childModel root = liftM unsafeTreeModelFilterToGeneric $- wrapNewGObject mkTreeModelFilter $ + wrapNewGObject mkTreeModelFilter $ liftM (castPtr :: Ptr TreeModel -> Ptr TreeModelFilter) $ withTreePath root $ \root -> {# call gtk_tree_model_filter_new #}@@ -170,7 +168,7 @@ -- should look for visibility information. A row containing @True@ means -- that this row should be shown. ---treeModelFilterSetVisibleColumn :: +treeModelFilterSetVisibleColumn :: (TreeModelFilterClass (self row), TypedTreeModelClass self) => self row@@ -200,7 +198,7 @@ -> TreeIter -> IO TreeIter treeModelFilterConvertChildIterToIter self childIter =- with childIter $ \childIterPtr -> + with childIter $ \childIterPtr -> alloca $ \filterIterPtr -> do {# call tree_model_filter_convert_child_iter_to_iter #} (toTreeModelFilter self)@@ -296,6 +294,6 @@ -- treeModelFilterVirtualRoot :: TreeModelFilterClass self => ReadAttr self TreePath treeModelFilterVirtualRoot = readAttrFromBoxedOpaqueProperty (peekTreePath . castPtr)- "virtual-root" + "virtual-root" {#call pure unsafe gtk_tree_path_get_type#} #endif
Graphics/UI/Gtk/ModelView/TreeModelSort.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.TreeModelSort ( -- * Detail--- +-- -- | The 'TreeModelSort' is a model which implements the 'TreeSortable' -- interface. It does not hold any data itself, but rather is created with a -- child model and proxies its data. It has identical rows to its@@ -69,7 +69,6 @@ import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.GObject (wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.ModelView.TreeModel#} {#import Graphics.UI.Gtk.ModelView.Types#}@@ -149,7 +148,7 @@ -> TreeIter -> IO TreeIter treeModelSortConvertChildIterToIter self childIter =- with childIter $ \childIterPtr -> + with childIter $ \childIterPtr -> alloca $ \sortIterPtr -> do {# call tree_model_sort_convert_child_iter_to_iter #} (toTreeModelSort self)
Graphics/UI/Gtk/ModelView/TreeRowReference.chs view
@@ -68,7 +68,7 @@ -> TreePath -> IO (Maybe TreeRowReference) treeRowReferenceNew self path = withTreePath path $ \path -> do- rowRefPtr <- + rowRefPtr <- {#call gtk_tree_row_reference_new#} (toTreeModel self) path if rowRefPtr==nullPtr then return Nothing else liftM (Just . TreeRowReference) $
Graphics/UI/Gtk/ModelView/TreeSelection.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.ModelView.TreeSelection ( -- * Detail--- +-- -- | The 'TreeSelection' object is a helper object to manage the selection for -- a 'TreeView' widget. The 'TreeSelection' object is automatically created -- when a new 'TreeView' widget is created, and cannot exist independentally of@@ -109,7 +109,6 @@ import System.Glib.FFI import System.Glib.GList (fromGList) import System.Glib.Attributes-import System.Glib.GObject (destroyFunPtr) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}
Graphics/UI/Gtk/ModelView/TreeSortable.chs view
@@ -44,7 +44,7 @@ -- 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' or -- 'Graphics.UI.Gtk.ModelView.TreeStore.TreeStore' model in a -- 'Graphics.UI.Gtk.ModelView.TreeModelSort.TreeModelSort'.--- +-- -- A 'Graphics.UI.Gtk.ModelView.TreeViewColumn' can be sorted by the user -- though clicking into the column's header. The rows in the view will then be -- sorted by the sorting function set for that column. Specifically, a set of@@ -88,12 +88,9 @@ sortColumnChanged ) where -import Control.Monad (liftM, when)+import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.Flags (Flags, toFlags)-import System.Glib.UTFString-import System.Glib.GObject (destroyFunPtr) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.Enums#} (SortType(..)) {#import Graphics.UI.Gtk.Signals#}@@ -112,7 +109,7 @@ -- the returned Boolean flag is @False@. -- treeSortableGetSortColumnId :: TreeSortableClass self => self- -> IO (SortType, Bool, SortColumnId) -- ^ @(type, columnSet, sortColumnId)@ + -> IO (SortType, Bool, SortColumnId) -- ^ @(type, columnSet, sortColumnId)@ -- returns @True@ in @columnSet@ if @sortColumnId@ is not -- 'treeSortableDefaultSortColumnId'. The @type@ value indicates increasing -- or decreasing ordering.@@ -183,7 +180,7 @@ -- 'treeSortableDefaultSortColumnId' then the model will sort using -- this function. ----- | If @sortFunc@ is 'Nothing', then there will be no default comparison function. +-- | If @sortFunc@ is 'Nothing', then there will be no default comparison function. -- This means that once the -- model has been sorted, it can't go back to the default state. In this case, when the current sort -- column id of sortable is 'TreeSortableDefaultSortColumnId', the model will be unsorted.
Graphics/UI/Gtk/ModelView/TreeStore.hs view
@@ -60,11 +60,11 @@ import Data.Word (Word) import Data.Maybe ( fromMaybe, isJust ) import Data.Tree-import Control.Monad ( liftM, when )+import Control.Monad ( when ) import Control.Exception (assert) import Data.IORef import Graphics.UI.Gtk.ModelView.Types-import Graphics.UI.Gtk.Types (GObjectClass(..), TreeModelClass)+import Graphics.UI.Gtk.Types (GObjectClass(..)) import Graphics.UI.Gtk.ModelView.CustomStore import Graphics.UI.Gtk.ModelView.TreeModel import Graphics.UI.Gtk.ModelView.TreeDrag@@ -108,7 +108,7 @@ -- * Additionally, a cache is used to achieve higher performance if operating on -- recently used TreePaths. ----- * __Note:__ due to the limited amount of bits available in TreeIter storage, only +-- * __Note:__ due to the limited amount of bits available in TreeIter storage, only -- limited depth forests can be used with this implementation, the result of too deep -- Forests is an undefined behaviour while trying to retrieve the deeply nested nodes. -- For example: assuming the average requiement is 8 bits per tree level (max number of@@ -262,24 +262,24 @@ in (word .&. complement mask) .|. (value `shiftL` off) -iterPrefixEqual :: TreeIter -> TreeIter -> Int -> Bool-iterPrefixEqual (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) pos- | pos>64 = let mask = 1 `shiftL` (pos-64) - 1 in- a1==a2 && b1==b2 && (c1 .&. mask) == (c2 .&. mask)- | pos>32 = let mask = 1 `shiftL` (pos-32) - 1 in- a1==a2 && (b1 .&. mask) == (b2 .&. mask)- | otherwise = let mask = 1 `shiftL` pos - 1 in- (a1 .&. mask) == (a2 .&. mask)+--iterPrefixEqual :: TreeIter -> TreeIter -> Int -> Bool+--iterPrefixEqual (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) pos+-- | pos>64 = let mask = 1 `shiftL` (pos-64) - 1 in+-- a1==a2 && b1==b2 && (c1 .&. mask) == (c2 .&. mask)+-- | pos>32 = let mask = 1 `shiftL` (pos-32) - 1 in+-- a1==a2 && (b1 .&. mask) == (b2 .&. mask)+-- | otherwise = let mask = 1 `shiftL` pos - 1 in+-- (a1 .&. mask) == (a2 .&. mask) -- | The invalid tree iterator. -- invalidIter :: TreeIter invalidIter = TreeIter 0 0 0 0 -showIterBits (TreeIter _ a b c) = [showBits a, showBits b, showBits c]--showBits :: Bits a => a -> String-showBits a = [ if testBit a i then '1' else '0' | i <- [0..bitSize a - 1] ]+--showIterBits (TreeIter _ a b c) = [showBits a, showBits b, showBits c]+--+--showBits :: Bits a => a -> String+--showBits a = [ if testBit a i then '1' else '0' | i <- [0..bitSize a - 1] ] -- | Calculate the maximum number of nodes on a per-level basis. --@@ -402,7 +402,6 @@ where cmp (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) = a1==a2 && b1==b2 && c2==c2- cache'@((cur,sibs):_) = advanceCache depth iter cache -- | Get the leaf index of this iterator. --@@ -424,7 +423,7 @@ -- iterNext :: Depth -> TreeIter -> Cache a -> (Maybe TreeIter, Cache a) iterNext depth iter cache = let- (pos,leaf,child) = getTreeIterLeaf depth iter+ (pos,leaf,_child) = getTreeIterLeaf depth iter curIdx = getBitSlice iter pos leaf nextIdx = curIdx+1 nextIter = setBitSlice iter pos leaf nextIdx@@ -460,7 +459,7 @@ -- iterParent :: Depth -> TreeIter -> Maybe TreeIter iterParent depth iter = let- (pos,leaf,child) = getTreeIterLeaf depth iter+ (pos,leaf,_child) = getTreeIterLeaf depth iter in if pos==0 then Nothing else if getBitSlice iter pos leaf==0 then Nothing else Just (setBitSlice iter pos leaf 0)
Graphics/UI/Gtk/ModelView/TreeView.chs view
@@ -260,7 +260,7 @@ #endif ) where -import Control.Monad (liftM, mapM)+import Control.Monad (liftM,) import Data.Maybe (fromMaybe) import System.Glib.FFI@@ -269,16 +269,13 @@ import System.Glib.Flags import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (makeNewGObject, wrapNewGObject,- destroyFunPtr) import Graphics.UI.Gtk.Gdk.Enums (DragAction(..)) import Graphics.UI.Gtk.Gdk.Events (Modifier(..)) import Graphics.UI.Gtk.General.Structs (Point, Rectangle) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#}-{#import Graphics.UI.Gtk.ModelView.TreeViewColumn#}-import Graphics.UI.Gtk.ModelView.TreeModel (ColumnId, columnIdToNumber,+import Graphics.UI.Gtk.ModelView.TreeModel (columnIdToNumber, makeColumnIdString) {#import Graphics.UI.Gtk.ModelView.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#} (TargetList(..))
Graphics/UI/Gtk/ModelView/TreeViewColumn.chs view
@@ -132,7 +132,9 @@ import System.Glib.FFI import System.Glib.UTFString+#if GTK_MAJOR_VERSION < 3 {#import System.Glib.GList#} (fromGList)+#endif import System.Glib.Attributes import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
Graphics/UI/Gtk/ModelView/Types.chs view
@@ -3,6 +3,7 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK hide #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) CustomStore TreeModel --
Graphics/UI/Gtk/Multiline/TextBuffer.chs view
@@ -201,15 +201,13 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject,- makeNewGObject) import Data.ByteString (ByteString) import Data.ByteString.Unsafe (unsafeUseAsCStringLen, unsafePackCStringFinalizer) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Multiline.Types#}-import Graphics.UI.Gtk.Multiline.TextMark (TextMark, MarkName)-import Graphics.UI.Gtk.Multiline.TextTag (TextTag, TagName)+import Graphics.UI.Gtk.Multiline.TextMark (MarkName)+import Graphics.UI.Gtk.Multiline.TextTag (TagName) {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Multiline/TextIter.chs view
@@ -146,7 +146,6 @@ import System.Glib.Flags (fromFlags) import System.Glib.UTFString import System.Glib.Attributes-import System.Glib.GObject (makeNewGObject) import System.Glib.GList {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.General.Enums (TextSearchFlags(..))@@ -789,10 +788,6 @@ textIterBackwardToTagToggle ti tt = liftM toBool $ {#call unsafe text_iter_backward_to_tag_toggle#} ti (fromMaybe (TextTag nullForeignPtr) tt)---- Setup a callback for a predicate function.----type TextCharPredicateCB = Char -> Bool {#pointer TextCharPredicate#}
Graphics/UI/Gtk/Multiline/TextMark.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Multiline.TextMark ( -- * Detail--- +-- -- | You may wish to begin by reading the text widget conceptual overview -- which gives an overview of all the objects and data types related to the -- text widget and how they work together.@@ -80,7 +80,9 @@ textMarkGetLeftGravity, -- * Attributes+ textMarkName, textMarkVisible,+ textMarkLeftGravity ) where import Control.Monad (liftM)@@ -89,7 +91,6 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (makeNewGObject, wrapNewGObject) {#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #}@@ -113,7 +114,7 @@ -- -- * Available since Gtk+ version 2.12 ---textMarkNew :: +textMarkNew :: Maybe MarkName -- ^ @markName@ - name for mark, or @Nothing@ -> Bool -- ^ @leftGravity@ - whether the mark has left gravity -> IO TextMark
Graphics/UI/Gtk/Multiline/TextTag.chs view
@@ -160,7 +160,6 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (wrapNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.Rendering.Pango.Font@@ -171,7 +170,9 @@ Justification(..), WrapMode(..)) import Graphics.UI.Gtk.General.Structs (Color(..)) import Graphics.UI.Gtk.Multiline.Types ( TextIter, mkTextIterCopy )+#ifndef DISABLE_DEPRECATED import Graphics.UI.Gtk.Gdk.Events (Event, marshalEvent)+#endif import Graphics.UI.Gtk.Gdk.EventM (EventM, EAny) import Control.Monad.Reader ( runReaderT )
Graphics/UI/Gtk/Multiline/TextTagTable.chs view
@@ -60,7 +60,6 @@ import System.Glib.FFI (withForeignPtr, nullPtr, Ptr(..), CInt(..), CChar(..), FunPtr(..), maybeNull) import System.Glib.UTFString-import System.Glib.GObject (wrapNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Multiline/TextView.chs view
@@ -195,14 +195,12 @@ import System.Glib.Attributes import System.Glib.Properties (newAttrFromStringProperty) import Graphics.UI.Gtk.Abstract.Object (makeNewObject)-import System.Glib.GObject (wrapNewGObject, makeNewGObject) import Graphics.UI.Gtk.Gdk.EventM (EventM, EKey) import Control.Monad.Reader ( ask ) import Control.Monad.Trans ( liftIO ) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Multiline.Types#}-{#import Graphics.UI.Gtk.Multiline.TextIter#} {#import Graphics.UI.Gtk.Multiline.TextTag#} import Graphics.UI.Gtk.General.Enums (TextWindowType(..), DeleteType(..), DirectionType(..), Justification(..),
Graphics/UI/Gtk/Ornaments/HSeparator.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Ornaments.HSeparator ( -- * Detail--- +-- -- | The 'HSeparator' widget is a horizontal separator, used to group the -- widgets within a window. It displays a horizontal line with a shadow to make -- it appear sunken into the interface.
Graphics/UI/Gtk/Ornaments/VSeparator.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Ornaments.VSeparator ( -- * Detail--- +-- -- | The 'VSeparator' widget is a vertical separator, used to group the -- widgets within a window. It displays a vertical line with a shadow to make -- it appear sunken into the interface.
Graphics/UI/Gtk/Printing/PageSetup.chs view
@@ -103,7 +103,6 @@ import System.Glib.FFI import System.Glib.GError import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Printing.PaperSize#} (PaperSize(..), mkPaperSize, Unit(..))
Graphics/UI/Gtk/Printing/PaperSize.chs view
@@ -80,7 +80,6 @@ import System.Glib.FFI import System.Glib.UTFString import System.Glib.GList-{#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #}
Graphics/UI/Gtk/Printing/PrintContext.chs view
@@ -94,7 +94,7 @@ -- printContextGetCairoContext :: PrintContextClass self => self -> IO Cairo -- ^ returns the cairo context of @context@-printContextGetCairoContext self = +printContextGetCairoContext self = liftM Cairo $ {# call gtk_print_context_get_cairo_context #} (toPrintContext self) @@ -197,11 +197,11 @@ #if GTK_CHECK_VERSION(2,20,0) printContextGetHardMargins :: PrintContextClass self => self -> IO (Maybe (Double, Double, Double, Double))- -- ^ returns @(top, bottom, left, right)@ - -- @top@ top hardware printer margin - -- @bottom@ bottom hardware printer margin - -- @left@ left hardware printer margin - -- @right@ right hardware printer margin + -- ^ returns @(top, bottom, left, right)@+ -- @top@ top hardware printer margin+ -- @bottom@ bottom hardware printer margin+ -- @left@ left hardware printer margin+ -- @right@ right hardware printer margin printContextGetHardMargins self = alloca $ \ topPtr -> alloca $ \ bottomPtr ->
Graphics/UI/Gtk/Printing/PrintOperation.chs view
@@ -91,9 +91,18 @@ -- * Methods printOperationSetAllowAsync, printOperationGetError,+ printOperationSetJobName,+ printOperationSetNPages, #if GTK_CHECK_VERSION(2,18,0) printOperationGetNPagesToPrint, #endif+ printOperationSetCurrentPage,+ printOperationSetUseFullPage,+ printOperationSetUnit,+ printOperationSetExportFilename,+ printOperationSetShowProgress,+ printOperationSetTrackPrintStatus,+ printOperationSetCustomTabLabel, printOperationRun, printOperationCancel, #if GTK_CHECK_VERSION(2,16,0)
Graphics/UI/Gtk/Printing/PrintSettings.chs view
@@ -146,7 +146,6 @@ import System.Glib.FFI import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString import System.Glib.GError {#import Graphics.UI.Gtk.Types#}
Graphics/UI/Gtk/Recent/RecentChooser.chs view
@@ -89,6 +89,8 @@ #endif ) where +#if GTK_CHECK_VERSION(2,10,0)+ import Control.Monad (liftM) import System.Glib.FFI@@ -96,8 +98,7 @@ import System.Glib.Attributes import System.Glib.Properties import System.Glib.GList-import System.Glib.GObject (Quark, quarkFromString)-import System.Glib.GError (GErrorDomain, GErrorClass(..), propagateGError, checkGError)+import System.Glib.GError (checkGError) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Recent.RecentInfo#} (RecentInfo, mkRecentInfo) {#import Graphics.UI.Gtk.Types#}@@ -105,7 +106,6 @@ {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0) -------------------- -- Enums -- | These identify the various errors that can occur while calling 'RecentChooser' functions.
Graphics/UI/Gtk/Recent/RecentChooserMenu.chs view
@@ -126,9 +126,9 @@ -- -- * Available since Gtk+ version 2.10 ---recentChooserMenuNewForManager :: RecentManagerClass manager +recentChooserMenuNewForManager :: RecentManagerClass manager => manager -- ^ @manager@ - a 'RecentManager'- -> IO RecentChooserMenu -- ^ returns a new 'RecentChooserMenu', bound to manager. + -> IO RecentChooserMenu -- ^ returns a new 'RecentChooserMenu', bound to manager. recentChooserMenuNewForManager manager = makeNewObject mkRecentChooserMenu $ liftM (castPtr :: Ptr Widget -> Ptr RecentChooserMenu) $@@ -139,7 +139,7 @@ -- Attributes -- | Whether the first ten items in the menu should be prepended by a number acting as a unique mnemonic.--- +-- -- Default value: 'False' -- -- * Available since Gtk+ version 2.10
Graphics/UI/Gtk/Recent/RecentChooserWidget.chs view
@@ -67,18 +67,16 @@ #endif ) where +#if GTK_CHECK_VERSION(2,10,0)+ import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0)- -------------------- -- Constructors @@ -96,9 +94,9 @@ -- This is useful if you have implemented your own recent manager, or if you -- have a customized instance of a 'RecentManager' object. ---recentChooserWidgetNewForManager :: RecentManagerClass manager +recentChooserWidgetNewForManager :: RecentManagerClass manager => manager -- ^ @manager@ - a 'RecentManager'- -> IO RecentChooserWidget -- ^ returns a new 'RecentChooserWidget' + -> IO RecentChooserWidget -- ^ returns a new 'RecentChooserWidget' recentChooserWidgetNewForManager manager = makeNewObject mkRecentChooserWidget $ liftM (castPtr :: Ptr Widget -> Ptr RecentChooserWidget) $
Graphics/UI/Gtk/Recent/RecentFilter.chs view
@@ -84,17 +84,15 @@ #endif ) where -import Control.Monad (liftM)+#if GTK_CHECK_VERSION(2,10,0) import System.Glib.FFI import System.Glib.UTFString-import System.Glib.Flags (Flags, toFlags, fromFlags) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0) --------------------- -- Enums -- | These flags indicate what parts of a 'RecentFilterInfo' struct are filled or need to be filled.
Graphics/UI/Gtk/Recent/RecentInfo.chs view
@@ -56,17 +56,16 @@ #endif ) where +#if GTK_CHECK_VERSION(2,10,0)+ import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {# context lib="gtk" prefix="gtk" #} -#if GTK_CHECK_VERSION(2,10,0) -------------------- -- Types {#pointer *RecentInfo foreign newtype#}
Graphics/UI/Gtk/Recent/RecentManager.chs view
@@ -89,6 +89,8 @@ #endif ) where +#if GTK_CHECK_VERSION(2,10,0)+ import Control.Monad (liftM) import System.Glib.FFI@@ -96,15 +98,12 @@ import System.Glib.Properties import System.Glib.GList import System.Glib.UTFString-import System.Glib.GObject (Quark, quarkFromString)-import System.Glib.GError (GErrorDomain, GErrorClass(..), propagateGError, checkGError)+import System.Glib.GError (propagateGError, checkGError) {#import Graphics.UI.Gtk.Recent.RecentInfo#} (RecentInfo, mkRecentInfo) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {# context lib="gtk" prefix="gtk" #}--#if GTK_CHECK_VERSION(2,10,0) -------------------- -- Constructors
Graphics/UI/Gtk/Scrolling/HScrollbar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Scrolling.HScrollbar ( -- * Detail--- +-- -- | The 'HScrollbar' widget is a widget arranged horizontally creating a -- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment' -- may be added to handle the adjustment of the scrollbar using@@ -71,7 +71,7 @@ -- | Creates a new horizontal scrollbar. ---hScrollbarNew :: +hScrollbarNew :: Adjustment -- ^ @adjustment@ - the 'Adjustment' to use. -> IO HScrollbar hScrollbarNew adjustment =
Graphics/UI/Gtk/Scrolling/VScrollbar.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Scrolling.VScrollbar ( -- * Detail--- +-- -- | The 'VScrollbar' widget is a widget arranged vertically creating a -- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment' -- may be added to handle the adjustment of the scrollbar using@@ -71,7 +71,7 @@ -- | Creates a new vertical scrollbar. ---vScrollbarNew :: +vScrollbarNew :: Adjustment -- ^ @adjustment@ - the 'Adjustment' to use. -> IO VScrollbar vScrollbarNew adjustment =
Graphics/UI/Gtk/Selectors/ColorSelection.chs view
@@ -27,7 +27,7 @@ -- module Graphics.UI.Gtk.Selectors.ColorSelection ( -- * Detail--- +-- -- | The 'ColorSelection' is a widget that is used to select a color. It -- consists of a color wheel and number of sliders and entry boxes for color -- parameters such as hue, saturation, value, red, green, blue, and opacity. It
Graphics/UI/Gtk/Selectors/FileChooserDialog.chs view
@@ -80,7 +80,6 @@ import System.Glib.UTFString {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Selectors.FileChooser#}-import System.Glib.GObject (objectNew) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.Windows.Window import Graphics.UI.Gtk.Windows.Dialog
Graphics/UI/Gtk/Selectors/FileFilter.chs view
@@ -84,9 +84,6 @@ import System.Glib.Flags (Flags, fromFlags) import System.Glib.UTFString import System.Glib.Attributes--- Back in <X.h> DestroyNotify is defined as 17-#undef DestroyNotify-import System.Glib.GObject (DestroyNotify, destroyFunPtr) {#import Graphics.UI.Gtk.Types#} import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
Graphics/UI/Gtk/Selectors/HSV.chs view
@@ -75,7 +75,6 @@ import System.Glib.FFI import System.Glib.Attributes-import System.Glib.Properties import Graphics.UI.Gtk.General.Enums (DirectionType (..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Signals#}@@ -107,9 +106,9 @@ -- hsvSetColor :: HSVClass self => self -> (Double, Double, Double)- -- ^ @(h, s, v)@ - -- @h@ - value for the hue - -- @s@ value for the saturation + -- ^ @(h, s, v)@+ -- @h@ - value for the hue+ -- @s@ value for the saturation -- @v@ value for the value -> IO () hsvSetColor self (h, s, v) =@@ -144,7 +143,7 @@ -- hsvSetMetrics :: HSVClass self => self -> (Int, Int)- -- ^ @(size, ringWidth)@ + -- ^ @(size, ringWidth)@ -- ^ @size@ - Diameter for the hue ring -- ^ @ringWidth@ - Width of the hue ring -> IO ()@@ -157,7 +156,7 @@ -- | Queries the size and ring width of an 'HSV' color selector. -- hsvGetMetrics :: HSVClass self => self- -> IO (Int, Int) -- ^ @(size, ringWidth)@ + -> IO (Int, Int) -- ^ @(size, ringWidth)@ -- @size@ - Return value for the diameter of the hue ring -- @ringWidth@ - Return value for the width of the hue ring hsvGetMetrics self =@@ -190,9 +189,9 @@ -- hsvToRgb :: (Double, Double, Double)- -- ^ @(h, s, v)@ - -- @h@ - value for the hue - -- @s@ value for the saturation + -- ^ @(h, s, v)@+ -- @h@ - value for the hue+ -- @s@ value for the saturation -- @v@ value for the value -> (Double, Double, Double) -- ^ @(r, g, b)@ @r@ - Return value for the red -- component @g@ - Return value for the green@@ -217,15 +216,15 @@ -- | Converts a color from RGB space to 'HSV'. Input values must be in the [0.0, 1.0] range; output values -- will be in the same range.-rgbToHsv :: - (Double, Double, Double) - -- ^ @(r, g, b)@ @r@ value for the red component - -- @g@ value for the green component +rgbToHsv ::+ (Double, Double, Double)+ -- ^ @(r, g, b)@ @r@ value for the red component+ -- @g@ value for the green component -- @b@ value for the blue component -> (Double, Double, Double)- -- ^ @(h, s, v)@ - -- @h@ - Return value for the hue - -- @s@ - Return value for the saturation + -- ^ @(h, s, v)@+ -- @h@ - Return value for the hue+ -- @s@ - Return value for the saturation -- @v@ - Return value for the value rgbToHsv (r, g, b) = unsafePerformIO $@@ -246,7 +245,7 @@ -------------------- -- Attributes--- | Color in an 'HSV' color selector. +-- | Color in an 'HSV' color selector. -- Color component values must be in the [0.0, 1.0] range. hsvColor :: HSVClass self => Attr self (Double, Double, Double) hsvColor = newAttr@@ -271,5 +270,5 @@ -- hsvMove :: HSVClass self => Signal self (DirectionType -> IO ()) hsvMove = Signal (connect_ENUM__NONE "move")- + #endif
Graphics/UI/Gtk/Signals.chs view
@@ -1,4 +1,5 @@ {-# OPTIONS_HADDOCK hide #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- -*-haskell-*- -- -------------------- automatically generated file - do not edit ------------ -- Callback installers for the GIMP Toolkit (GTK) Binding for Haskell
Graphics/UI/Gtk/Special/Ruler.chs view
@@ -72,8 +72,6 @@ #endif ) where #if GTK_MAJOR_VERSION < 3-import Control.Monad (liftM)- import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties@@ -91,7 +89,7 @@ -> (Double ,Double ,Double- ,Double) + ,Double) -- ^ @lower@ - the lower limit of the ruler -- ^ @upper@ - the upper limit of the ruler -- ^ @position@ - the mark on the ruler@@ -138,28 +136,28 @@ rulerSetRange -- | Lower limit of ruler.--- +-- -- Default value: 0 -- rulerLower :: RulerClass self => Attr self Double rulerLower = newAttrFromDoubleProperty "lower" -- | Upper limit of ruler.--- +-- -- Default value: 0 -- rulerUpper :: RulerClass self => Attr self Double rulerUpper = newAttrFromDoubleProperty "upper" -- | Position of mark on the ruler.--- +-- -- Default value: 0 -- rulerPosition :: RulerClass self => Attr self Double rulerPosition = newAttrFromDoubleProperty "position" -- | Maximum size of the ruler.--- +-- -- Default value: 0 -- rulerMaxSize :: RulerClass self => Attr self Double@@ -167,9 +165,9 @@ #if GTK_CHECK_VERSION(2,8,0) -- | The metric used for the ruler.--- +-- -- Default value: ''Pixels''--- +-- -- Since 2.8 -- rulerMetric :: RulerClass self => Attr self MetricType
Graphics/UI/Gtk/Types.chs view
@@ -1,5 +1,6 @@ {-# LANGUAGE CPP #-} {-# OPTIONS_HADDOCK hide #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- -*-haskell-*- -- -------------------- automatically generated file - do not edit ---------- -- Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell@@ -105,6 +106,10 @@ toDevice, mkDevice, unDevice, castToDevice, gTypeDevice,+ FrameClock(FrameClock), FrameClockClass,+ toFrameClock, + mkFrameClock, unFrameClock,+ castToFrameClock, gTypeFrameClock, Settings(Settings), SettingsClass, toSettings, mkSettings, unSettings,@@ -1160,6 +1165,29 @@ gTypeDevice :: GType gTypeDevice = {# call fun unsafe gdk_device_get_type #}++-- ***************************************************************** FrameClock++{#pointer *GdkFrameClock as FrameClock foreign newtype #} deriving (Eq,Ord)++mkFrameClock = (FrameClock, objectUnrefFromMainloop)+unFrameClock (FrameClock o) = o++class GObjectClass o => FrameClockClass o+toFrameClock :: FrameClockClass o => o -> FrameClock+toFrameClock = unsafeCastGObject . toGObject++instance FrameClockClass FrameClock+instance GObjectClass FrameClock where+ toGObject = GObject . castForeignPtr . unFrameClock+ unsafeCastGObject = FrameClock . castForeignPtr . unGObject++castToFrameClock :: GObjectClass obj => obj -> FrameClock+castToFrameClock = castTo gTypeFrameClock "FrameClock"++gTypeFrameClock :: GType+gTypeFrameClock =+ {# call fun unsafe gdk_frame_clock_get_type #} -- ******************************************************************* Settings
Graphics/UI/Gtk/Windows/AboutDialog.chs view
@@ -147,7 +147,6 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties-import System.Glib.GObject (makeNewGObject, destroyFunPtr) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} @@ -168,6 +167,7 @@ -------------------- -- Methods +#ifndef DISABLE_DEPRECATED -- | Returns the program name displayed in the about dialog. -- aboutDialogGetName :: (AboutDialogClass self, GlibString string) => self@@ -306,6 +306,7 @@ {# call gtk_about_dialog_set_website_label #} (toAboutDialog self) websiteLabelPtr+#endif -- | Sets the strings which are displayed in the authors tab of the secondary -- credits dialog.@@ -370,6 +371,7 @@ (toAboutDialog self) >>= peekUTFStringArray0 +#ifndef DISABLE_DEPRECATED -- | Returns the translator credits string which is displayed in the -- translators tab of the secondary credits dialog. --@@ -391,6 +393,7 @@ {# call gtk_about_dialog_set_translator_credits #} (toAboutDialog self) translatorCreditsPtr+#endif -- | Returns the pixbuf displayed as logo in the about dialog. --@@ -478,6 +481,7 @@ (Ptr AboutDialog -> CString -> Ptr () -> IO ()) -> IO AboutDialogActivateLinkFunc #endif +#ifndef DISABLE_DEPRECATED #if GTK_CHECK_VERSION(2,8,0) -- | Returns whether the license text in @about@ is automatically wrapped. --@@ -501,6 +505,7 @@ {# call gtk_about_dialog_set_wrap_license #} (toAboutDialog self) (fromBool wrapLicense)+#endif #endif --------------------
Graphics/UI/Gtk/Windows/Assistant.chs view
@@ -111,7 +111,7 @@ #endif ) where -import Control.Monad (liftM, unless)+import Control.Monad (liftM) import System.Glib.FFI import System.Glib.UTFString
Graphics/UI/Gtk/Windows/Invisible.chs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) Window --@@ -23,7 +22,7 @@ -- Stability : provisional -- Portability : portable (depends on GHC) ----- A widget which is not displayed +-- A widget which is not displayed -- The 'Invisible' widget is used internally in GTK+, and is probably not very useful for application developers. -- It is used for reliable pointer grabs and selection handling in the code for drag-and-drop. --@@ -42,7 +41,7 @@ Invisible, -- * Constructors- invisibleNew, + invisibleNew, invisibleNewForScreen, -- * Methods@@ -53,16 +52,9 @@ import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.UTFString-import System.Glib.GError-import System.Glib.Attributes-import System.Glib.Properties-import System.Glib.GObject (makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject)-import Graphics.UI.Gtk.General.Enums import Graphics.UI.Gtk.Gdk.Screen {#import Graphics.UI.Gtk.Types#}-{#import Graphics.UI.Gtk.Gdk.Enums#} (Modifier(..)) {# context lib="gtk" prefix="gtk" #} @@ -80,31 +72,31 @@ -- -- * Available since Gdk version 2.2 ---invisibleNewForScreen :: - Screen -- ^ @screen@ - a 'Screen' which identifies on which the new 'Invisible' will be created. +invisibleNewForScreen ::+ Screen -- ^ @screen@ - a 'Screen' which identifies on which the new 'Invisible' will be created. -> IO Invisible invisibleNewForScreen screen = makeNewObject mkInvisible $ liftM (castPtr :: Ptr Widget -> Ptr Invisible) $ {# call invisible_new_for_screen #} screen- + -- | Sets the 'Screen' where the 'Invisible' object will be displayed. -- -- * Available since Gdk version 2.2 ---invisibleSetScreen :: Invisible +invisibleSetScreen :: Invisible -> Screen -- ^ @screen@ - the 'Screen' to set -> IO () invisibleSetScreen invisible screen = {# call invisible_set_screen #} invisible screen- --- | Returns the 'Screen' object associated with invisible ++-- | Returns the 'Screen' object associated with invisible -- -- * Available since Gdk version 2.2 -- invisibleGetScreen :: Invisible -> IO Screen-invisibleGetScreen invisible = +invisibleGetScreen invisible = makeNewGObject mkScreen $ {# call invisible_get_screen #} invisible
Graphics/UI/Gtk/Windows/OffscreenWindow.chs view
@@ -23,7 +23,7 @@ -- Stability : provisional -- Portability : portable (depends on GHC) ----- A toplevel container widget used to manage offscreen rendering of child widgets. +-- A toplevel container widget used to manage offscreen rendering of child widgets. -- -- * Module available since Gtk+ version 2.20 --@@ -34,16 +34,16 @@ -- want to get a snapshot of need not be displayed on the user's screen as a part of a widget -- hierarchy. However, since 'OffscreenWindow' is a toplevel widget you cannot obtain snapshots of a -- full window with it since you cannot pack a toplevel widget in another toplevel.--- +-- -- The idea is to take a widget and manually set the state of it, add it to a 'OffscreenWindow' and -- then retrieve the snapshot as a 'Pixmap' or 'Pixbuf'.--- +-- -- 'OffscreenWindow' derives from 'Window' only as an implementation detail. Applications should not -- use any API specific to 'Window' to operate on this object. It should be treated as a 'Bin' that -- has no parent widget.--- +-- -- When contained offscreen widgets are redrawn, 'OffscreenWindow' will emit a 'damageEvent' signal.- + -- * Class Hierarchy -- | -- @@@ -77,8 +77,6 @@ import Control.Monad (liftM) import System.Glib.FFI-import System.Glib.Attributes-import System.Glib.Properties import Graphics.UI.Gtk.Abstract.Object (makeNewObject) {#import Graphics.UI.Gtk.Types#} @@ -93,7 +91,7 @@ -- offscreenWindowNew :: IO OffscreenWindow offscreenWindowNew =- makeNewObject mkOffscreenWindow $ + makeNewObject mkOffscreenWindow $ liftM (castPtr :: Ptr Widget -> Ptr OffscreenWindow) $ {#call gtk_offscreen_window_new #} @@ -103,9 +101,9 @@ -- -- * Available since Gtk+ version 2.20 ---offscreenWindowGetPixmap :: OffscreenWindowClass self - => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget. - -> IO (Maybe Pixmap) -- ^ returns A 'Pixmap' pointer to the offscreen pixmap, or 'Nothing'. +offscreenWindowGetPixmap :: OffscreenWindowClass self+ => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget.+ -> IO (Maybe Pixmap) -- ^ returns A 'Pixmap' pointer to the offscreen pixmap, or 'Nothing'. offscreenWindowGetPixmap offscreen = maybeNull (makeNewGObject mkPixmap) $ {#call gtk_offscreen_window_get_pixmap #}@@ -116,9 +114,9 @@ -- -- * Available since Gtk+ version 2.20 ---offscreenWindowGetPixbuf :: OffscreenWindowClass self - => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget. - -> IO (Maybe Pixbuf) -- ^ returns A 'Pixbuf' pointer to the offscreen pixbuf, or 'Nothing'. +offscreenWindowGetPixbuf :: OffscreenWindowClass self+ => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget.+ -> IO (Maybe Pixbuf) -- ^ returns A 'Pixbuf' pointer to the offscreen pixbuf, or 'Nothing'. offscreenWindowGetPixbuf offscreen = maybeNull (wrapNewGObject mkPixbuf) $ {#call gtk_offscreen_window_get_pixbuf #}
Graphics/UI/Gtk/Windows/Window.chs view
@@ -286,7 +286,6 @@ import System.Glib.Attributes import System.Glib.Properties import System.Glib.GList (fromGList, withGList)-import System.Glib.GObject (makeNewGObject) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import Graphics.UI.Gtk.General.Enums (WindowType(..), WindowPosition(..)) #if GTK_MAJOR_VERSION < 3@@ -1067,6 +1066,7 @@ (toWindow self) #if GTK_CHECK_VERSION(2,10,0)+#ifndef DISABLE_DEPRECATED -- | By default, windows have a close button in the window frame. -- Some window managers allow GTK+ to disable this button. -- If you set the deletable property to @False@ using this function, GTK+ will do its best to convince the window manager not to show a close button.@@ -1095,6 +1095,7 @@ {# call window_get_deletable #} (toWindow self) #endif+#endif #if GTK_MAJOR_VERSION < 3 -- | (Note: this is a special-purpose function intended for the framebuffer@@ -1175,6 +1176,7 @@ (toWindow self) #endif +#ifndef DISABLE_DEPRECATED -- | This function is only useful on X11, not with other Gtk+ targets. -- -- In combination with the window title, the window role allows a window@@ -1207,6 +1209,7 @@ {# call gtk_window_get_role #} (toWindow self) >>= maybePeek peekUTFString+#endif -- | Asks to stick @window@, which means that it will appear on all user -- desktops. Note that you shouldn't assume the window is definitely stuck@@ -1358,6 +1361,7 @@ mapM (makeNewGObject mkPixbuf . return) ptrList #if GTK_CHECK_VERSION(2,6,0)+#ifndef DISABLE_DEPRECATED -- | Sets the icon for the window from a named themed icon. See the docs for -- 'IconTheme' for more details. --@@ -1389,6 +1393,7 @@ >>= \strPtr -> if strPtr == nullPtr then return "" else peekUTFString strPtr+#endif -- | Sets an icon to be used as fallback for windows that haven't had -- 'windowSetIconList' called on them from a named themed icon, see@@ -1935,6 +1940,7 @@ {# enum GdkWindowHints {underscoreToCase} #} #if GTK_CHECK_VERSION(2,12,0)+#ifndef DISABLE_DEPRECATED -- | Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque. -- (Values of the opacity parameter are clamped to the [0,1] range.) -- On X11 this has any effect only on X screens with a compositing manager running.@@ -1959,6 +1965,7 @@ -> IO Double -- ^ return the requested opacity for this window. windowGetOpacity self = liftM realToFrac $ {#call window_get_opacity#} (toWindow self)+#endif #endif #if GTK_CHECK_VERSION(2,10,0)
Graphics/UI/Gtk/Windows/WindowGroup.chs view
@@ -52,7 +52,6 @@ ) where import System.Glib.FFI-import System.Glib.GObject (wrapNewGObject) import System.Glib.GList (fromGList) {#import Graphics.UI.Gtk.Types#} @@ -95,7 +94,7 @@ #if GTK_CHECK_VERSION(2,14,0) -- | Returns a list of the 'Window's that belong to @windowGroup@.--- +-- -- * Available since Gtk+ version 2.14 -- windowGroupListWindows :: WindowGroupClass self
Graphics/UI/GtkInternals.chs view
@@ -34,4 +34,4 @@ {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.General.DNDTypes#} (mkTargetList)-{#import Graphics.UI.Gtk.Multiline.Types#} +{#import Graphics.UI.Gtk.Multiline.Types#}
Gtk2HsSetup.hs view
@@ -129,7 +129,7 @@ Just ('.':_) -> True Just ('-':n:_) | isNumber n -> True _ -> False- + -- The following code is a big copy-and-paste job from the sources of -- Cabal 1.8 just to be able to fix a field in the package file. Yuck.
SetupMain.hs view
@@ -10,4 +10,4 @@ main = do checkGtk2hsBuildtools [typeGenProgram, signalGenProgram, c2hsLocal] defaultMainWithHooks gtk2hsUserHooks- +
demo/actionMenu/ActionMenu.hs view
@@ -1,7 +1,6 @@ {-# 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.
demo/buttonbox/ButtonBox.hs view
@@ -1,7 +1,6 @@ module Main (main) where import Graphics.UI.Gtk-import Control.Monad.IO.Class (liftIO) main :: IO () main = do
demo/fastdraw/FastDraw.hs view
@@ -4,19 +4,11 @@ -- Example of an drawing graphics onto a canvas. import Graphics.UI.Gtk -import Data.Array.MArray-import Data.Word import Data.IORef-import Control.Monad ( when )-import Control.Monad.IO.Class ( liftIO )-import Data.Array.Base ( unsafeWrite ) import Graphics.Rendering.Cairo import Foreign (allocaArray) import Graphics.Rendering.Cairo.Types (PixelData) import Foreign.Storable (Storable(..))-import Control.Monad.Trans.Reader (ask, runReaderT)-import Graphics.Rendering.Cairo.Internal (runRender)-import Control.Monad.Trans.Class (MonadTrans(..)) import Foreign.C (CUChar) import Control.Applicative ((<$>))
demo/gtkbuilder/GtkBuilderTest.hs view
@@ -1,7 +1,6 @@ module Main where import Graphics.UI.Gtk-import Control.Monad.IO.Class (MonadIO(..)) main = do initGUI
demo/hello/World.hs view
@@ -2,7 +2,6 @@ module Main (Main.main) where import Graphics.UI.Gtk-import Control.Monad.IO.Class (MonadIO(..)) main :: IO () main = do
@@ -2,9 +2,6 @@ module Main where import Graphics.UI.Gtk-import Control.Concurrent.MVar-import Control.Monad ( liftM )-import Data.Maybe ( fromMaybe ) import Data.List ( findIndex ) import Control.Monad.IO.Class (MonadIO(..)) import qualified Data.Text as T
@@ -1,7 +1,6 @@ module Main (main) where import Graphics.UI.Gtk-import Control.Monad.IO.Class (MonadIO(..)) {- widgets that go into making a menubar and submenus:
demo/unicode/Arabic.hs view
@@ -3,7 +3,6 @@ import Data.Char import qualified Data.Text as T-import Control.Exception import Control.Applicative import Data.Text (Text)
gtk.cabal view
@@ -1,5 +1,5 @@ Name: gtk-Version: 0.13.0.3+Version: 0.13.1 License: LGPL-2.1 License-file: COPYING Copyright: (c) 2001-2010 The Gtk2Hs Team@@ -147,7 +147,7 @@ if flag(have-quartz-gtk) cpp-options: -DHAVE_QUARTZ_GTK - build-tools: gtk2hsC2hs >= 0.13.11,+ build-tools: gtk2hsC2hs >= 0.13.12, gtk2hsHookGenerator, gtk2hsTypeGen exposed-modules: