From: Andy S. <And...@co...> - 2010-03-22 00:57:41
|
Sun Mar 21 20:37:58 EDT 2010 Andy Stewart <laz...@gm...> * Update all `Abstract` modules to Gtk+ 2.18.3 (except Container and Widget). Details see ApiUpdateTodoList.txt Ignore-this: 856ff1073fff1653c9e8da2e8c308cb3 hunk ./ApiUpdateTodoList.txt 180 -*** TODO Bin.chs -*** TODO Box.chs -*** TODO ButtonBox.chs.pp +*** DONE Bin.chs +*** DONE Box.chs +*** DONE ButtonBox.chs.pp hunk ./ApiUpdateTodoList.txt 184 -*** TODO IMContext.chs.pp -*** TODO Misc.chs -*** TODO Object.chs.pp -*** TODO Paned.chs.pp -*** TODO Range.chs.pp -*** TODO Scale.chs -*** TODO Scrollbar.hs -*** TODO Separator.hs +*** DONE IMContext.chs.pp +*** DONE Misc.chs +*** DONE Object.chs.pp +*** DONE Paned.chs.pp +*** DONE Range.chs.pp +*** DONE Scale.chs +*** DONE Scrollbar.hs +*** DONE Separator.hs hunk ./glib/System/Glib/Properties.chs 69 + readAttrFromFloatProperty, hunk ./glib/System/Glib/Properties.chs 266 +readAttrFromFloatProperty :: GObjectClass gobj => String -> ReadAttr gobj Float +readAttrFromFloatProperty propName = + readNamedAttr propName (objectGetPropertyFloat propName) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 8 --- Copyright (C) 2004-2005 Duncan Coutts +-- Copyright (C) 2004-2009 Duncan Coutts hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 28 + hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 30 --- [_$_] +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Bin.chs 39 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 28 + hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 89 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 112 - boxPackStartDefaults, - boxPackEndDefaults, hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 129 + +-- * Deprecated + boxPackStartDefaults, + boxPackEndDefaults, hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 202 --- | Like 'boxPackStart' but uses the default parameters 'PackRepel' and 0 for --- padding. --- -boxPackStartDefaults :: (BoxClass self, WidgetClass widget) => self - -> widget -- ^ @widget@ - the 'Widget' to be added to the box. - -> IO () -boxPackStartDefaults self widget = - {# call box_pack_start_defaults #} - (toBox self) - (toWidget widget) - --- | Like 'boxPackEnd' but uses the default parameters 'PackRepel' and 0 for --- padding. --- -boxPackEndDefaults :: (BoxClass self, WidgetClass widget) => self - -> widget -- ^ @widget@ - the 'Widget' to be added to the box. - -> IO () -boxPackEndDefaults self widget = - {# call box_pack_end_defaults #} - (toBox self) - (toWidget widget) - hunk ./gtk/Graphics/UI/Gtk/Abstract/Box.chs 380 + +-- * Deprecated + +-- | Like 'boxPackStart' but uses the default parameters 'PackRepel' and 0 for +-- padding. +-- +boxPackStartDefaults :: (BoxClass self, WidgetClass widget) => self + -> widget -- ^ @widget@ - the 'Widget' to be added to the box. + -> IO () +boxPackStartDefaults self widget = + {# call box_pack_start_defaults #} + (toBox self) + (toWidget widget) + +-- | Like 'boxPackEnd' but uses the default parameters 'PackRepel' and 0 for +-- padding. +-- +boxPackEndDefaults :: (BoxClass self, WidgetClass widget) => self + -> widget -- ^ @widget@ - the 'Widget' to be added to the box. + -> IO () +boxPackEndDefaults self widget = + {# call box_pack_end_defaults #} + (toBox self) + (toWidget widget) hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 8 --- Copyright (C) 2004-2005 Matthew Walton +-- Copyright (C) 2004-2009 Matthew Walton hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 28 + hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 30 --- [_$_] +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/ButtonBox.chs.pp 54 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 20 +-- NOTE: the following varargs functions were not bound +-- gtk_container_add_with_properties +-- gtk_container_child_get +-- gtk_container_child_set +-- gtk_container_child_get_valist +-- gtk_container_child_set_valist +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 35 + hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 37 --- [_$_] +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 128 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 166 + containerSetReallocateRedraws, hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 176 + containerChildType, + containerChildGetProperty, + containerChildSetProperty, hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 183 +#if GTK_CHECK_VERSION(2,14,0) + containerGetFocusChild, +#endif hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 217 +import System.Glib.UTFString hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 224 +{#import System.Glib.GType#} +{#import System.Glib.GValue#} hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 312 +-- | Sets the @reallocateRedraws@ flag of the container to the given value. +-- [_$_] +-- Containers requesting reallocation redraws get automatically redrawn if any of their children +-- changed allocation. +containerSetReallocateRedraws :: ContainerClass self => self + -> Bool -- ^ @needsRedraws@ - the new value for the container's + -- @reallocateRedraws@ flag + -> IO () +containerSetReallocateRedraws self needsRedraws = + {# call gtk_container_set_reallocate_redraws #} + (toContainer self) + (fromBool needsRedraws) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 442 +-- | Returns the type of the children supported by the container. +-- [_$_] +-- Note that this may return 'GTypeNone' to indicate that no more children can be added, e.g. for a +-- 'Paned' which already has two children. +containerChildType :: ContainerClass self => self -> IO (Maybe GType) +containerChildType self = do + gtype <- {# call container_child_type #} (toContainer self) + return $ if gtype == 0 + then Just $ fromIntegral gtype + else Nothing + +-- | Gets the value of a child property for @child@ and @container@. +-- +containerChildGetProperty :: (ContainerClass self, WidgetClass child) => self + -> child -- ^ @child@ - a widget which is a child of @container@ + -> String -- ^ @propertyName@ - the name of the property to get + -> GValue -- ^ @value@ - a location to return the value + -> IO () +containerChildGetProperty self child propertyName value = + withUTFString propertyName $ \propertyNamePtr -> + {# call gtk_container_child_get_property #} + (toContainer self) + (toWidget child) + propertyNamePtr + value + +-- | Sets a child property for @child@ and @container@. +-- +containerChildSetProperty :: (ContainerClass self, WidgetClass child) => self + -> child -- ^ @child@ - a widget which is a child of @container@ + -> String -- ^ @propertyName@ - the name of the property to set + -> GValue -- ^ @value@ - the value to set the property to + -> IO () +containerChildSetProperty self child propertyName value = + withUTFString propertyName $ \propertyNamePtr -> + {# call gtk_container_child_set_property #} + (toContainer self) + (toWidget child) + propertyNamePtr + value + hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 535 +#if GTK_CHECK_VERSION(2,14,0) +-- | Returns the current focus child widget inside container. +containerGetFocusChild :: ContainerClass self => self + -> IO Widget -- ^ returns The child widget which has the focus inside + -- @container@, or {@NULL@, FIXME: this should probably be + -- converted to a Maybe data type} if none is set. +containerGetFocusChild self = + makeNewObject mkWidget $ + {# call gtk_container_get_focus_child #} + (toContainer self) +#endif + hunk ./gtk/Graphics/UI/Gtk/Abstract/Misc.chs 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Misc.chs 28 + hunk ./gtk/Graphics/UI/Gtk/Abstract/Misc.chs 43 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 8 --- Copyright (C) 2001-2005 Axel Simon +-- Copyright (C) 2001-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 32 --- * Detail --- [_$_] + +-- ** Description +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 42 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs.pp 54 +-- | +----'RecentFilter' hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 28 + hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 30 --- [_$_] +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 57 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 101 +-- * Signals + cycleChildFocus, + toggleHandleFocus, + moveHandle, + cycleHandleFocus, + acceptPosition, + cancelPosition, hunk ./gtk/Graphics/UI/Gtk/Abstract/Paned.chs.pp 304 +-------------------- +-- Signals +-- | The 'cycleChildFocus' signal is a keybinding signal which gets emitted to cycle the focus between +-- the children of the paned. +-- [_$_] +-- The default binding is f6. +cycleChildFocus :: PanedClass self => Signal self (Bool -> IO Bool) +cycleChildFocus = Signal (connect_BOOL__BOOL "cycle_child_focus") + +-- | The 'toggleHandleFocus' is a keybinding signal which gets emitted to accept the current position +-- of the handle and then move focus to the next widget in the focus chain. +-- [_$_] +-- The default binding is Tab. +toggleHandleFocus :: PanedClass self => Signal self (IO Bool) +toggleHandleFocus = Signal (connect_NONE__BOOL "toggle_handle_focus") + +-- | The 'moveHandle' signal is a keybinding signal which gets emitted to move the handle when the user +-- is using key bindings to move it. +moveHandle :: PanedClass self => Signal self (ScrollType -> IO Bool) +moveHandle = Signal (connect_ENUM__BOOL "move_handle") + +-- | The 'cycleHandleFocus' signal is a keybinding signal which gets emitted to cycle whether the paned +-- should grab focus to allow the user to change position of the handle by using key bindings. +-- [_$_] +-- The default binding for this signal is f8. +cycleHandleFocus :: PanedClass self => Signal self (Bool -> IO Bool) +cycleHandleFocus = Signal (connect_BOOL__BOOL "cycle_handle_focus") + +-- | The 'acceptPosition' signal is a keybinding signal which gets emitted to accept the current +-- position of the handle when moving it using key bindings. +-- [_$_] +-- The default binding for this signal is Return or Space. +acceptPosition :: PanedClass self => Signal self (IO Bool) +acceptPosition = Signal (connect_NONE__BOOL "accept_position") + +-- | The 'cancelPosition' signal is a keybinding signal which gets emitted to cancel moving the position +-- of the handle using key bindings. The position of the handle will be reset to the value prior to +-- moving it. +-- [_$_] +-- The default binding for this signal is Escape. +cancelPosition :: PanedClass self => Signal self (IO Bool) +cancelPosition = Signal (connect_NONE__BOOL "cancel_position") + hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 27 +-- Note: below function can use attributes instead, so don't bind it for simple: +-- gtk_range_get_fill_level +-- gtk_range_set_fill_level +-- gtk_range_get_restrict_to_fill_level +-- gtk_range_set_restrict_to_fill_level +-- gtk_range_get_show_fill_level +-- gtk_range_set_show_fill_level +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 36 --- * Description + +-- * Detail +-- +-- | 'Range' is the common base class for widgets which visualize an +-- adjustment, e.g scales or scrollbars. hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 46 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 83 +#if GTK_CHECK_VERSION(2,18,0) + rangeGetFlippable, + rangeSetFlippable, +#endif hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 92 + rangeFillLevel, + rangeRestrictToFillLevel, + rangeShowFillLevel, hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 101 + rangeActivateSlider, + rangeArrowDisplacementX, + rangeArrowDisplacementY, + rangeArrowScaling, + rangeSliderWidth, + rangeStepperSize, + rangeStepperSpacing, + rangeTroughBorder, + rangeTroughSideDetails, + rangeTroughUnderSteppers, + hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 115 + moveSlider, hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 340 +#if GTK_CHECK_VERSION(2,18,0) +-- | Gets the value set by 'rangeSetFlippable'. +rangeGetFlippable :: RangeClass self => self + -> IO Bool -- ^ returns @True@ if the range is flippable +rangeGetFlippable self = + liftM toBool $ + {# call gtk_range_get_flippable #} + (toRange self) + +-- | If a range is flippable, it will switch its direction if it is horizontal and its direction is +-- ''TextDirRtl''. +-- [_$_] +-- See 'widgetGetDirection'. +rangeSetFlippable :: RangeClass self => self + -> Bool -- ^ @flippable@ - @True@ to make the range flippable + -> IO () +rangeSetFlippable self flippable = + {# call gtk_range_set_flippable #} + (toRange self) + (fromBool flippable) +#endif + hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 390 +-- | The fill level (e.g. prebuffering of a network stream). See 'rangeSetFillLevel'. +-- [_$_] +-- Default value: 1.79769e+308 +-- [_$_] +-- Since 2.12 +rangeFillLevel :: RangeClass self => Attr self Double +rangeFillLevel = newAttrFromDoubleProperty "fill-level" + +-- | The restrict-to-fill-level property controls whether slider movement is restricted to an upper +-- boundary set by the fill level. See 'rangeSetRestrictToFillLevel'. +-- [_$_] +-- Default value: 'True' +-- [_$_] +-- Since 2.12 +rangeRestrictToFillLevel :: RangeClass self => Attr self Bool +rangeRestrictToFillLevel = newAttrFromBoolProperty "restrict-to-fill-level" + +-- | The show-fill-level property controls whether fill level indicator graphics are displayed on the +-- trough. See 'rangeSetShowFillLevel '. +-- [_$_] +-- Default value: 'False' +-- [_$_] +-- Since 2.12 +rangeShowFillLevel :: RangeClass self => Attr self Bool +rangeShowFillLevel = newAttrFromBoolProperty "show-fill-level" + hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 446 +-- | With this option set to 'True', sliders will be drawn ACTIVE and with shadow IN while they are +-- dragged. +-- [_$_] +-- Default value: 'False' +rangeActivateSlider :: RangeClass self => ReadAttr self Bool +rangeActivateSlider = readAttrFromBoolProperty "activate-slider" + +-- | How far in the x direction to move the arrow when the button is depressed. +-- [_$_] +-- Default value: 0 +rangeArrowDisplacementX :: RangeClass self => ReadAttr self Int +rangeArrowDisplacementX = readAttrFromIntProperty "arrow-displacement-x" + +-- | How far in the y direction to move the arrow when the button is depressed. +-- [_$_] +-- Default value: 0 +rangeArrowDisplacementY :: RangeClass self => ReadAttr self Int +rangeArrowDisplacementY = readAttrFromIntProperty "arrow-displacement-y" + [_$_] + [_$_] +-- | The arrow size proportion relative to the scroll button size. +-- [_$_] +-- Allowed values: [0,1] +-- [_$_] +-- Default value: 0.5 +-- [_$_] +-- Since 2.14 +rangeArrowScaling :: RangeClass self => ReadAttr self Float +rangeArrowScaling = readAttrFromFloatProperty "arrow-scaling" + +-- | Width of scrollbar or scale thumb. +-- [_$_] +-- Allowed values: >= 0 +-- [_$_] +-- Default value: 14 +rangeSliderWidth :: RangeClass self => ReadAttr self Int +rangeSliderWidth = readAttrFromIntProperty "slider-width" + +-- | Length of step buttons at ends. +-- [_$_] +-- Allowed values: >= 0 +-- [_$_] +-- Default value: 14 +rangeStepperSize :: RangeClass self => ReadAttr self Int +rangeStepperSize = readAttrFromIntProperty "stepper-size" + [_$_] +-- | The spacing between the stepper buttons and thumb. Note that setting this value to anything > 0 will +-- automatically set the trough-under-steppers style property to 'True' as well. Also, stepper-spacing +-- won't have any effect if there are no steppers. +-- [_$_] +-- Allowed values: >= 0 +-- [_$_] +-- Default value: 0 +rangeStepperSpacing :: RangeClass self => ReadAttr self Int +rangeStepperSpacing = readAttrFromIntProperty "stepper-spacing" + [_$_] +-- | Spacing between thumb/steppers and outer trough bevel. +-- [_$_] +-- Allowed values: >= 0 +-- [_$_] +-- Default value: 1 +rangeTroughBorder :: RangeClass self => ReadAttr self Int +rangeTroughBorder = readAttrFromIntProperty "trough-border" + [_$_] +-- | When 'True', the parts of the trough on the two sides of the slider are drawn with different details. +-- [_$_] +-- Default value: 'False' +-- [_$_] +-- Since 2.10 +rangeTroughSideDetails :: RangeClass self => ReadAttr self Bool +rangeTroughSideDetails = readAttrFromBoolProperty "trough-side-details" + [_$_] +-- | Whether to draw the trough across the full length of the range or to exclude the steppers and their +-- spacing. Note that setting the 'stepperSpacing' style property to any value > 0 will automatically +-- enable trough-under-steppers too. +-- [_$_] +-- Default value: 'True' +-- [_$_] +-- Since 2.10 +rangeTroughUnderSteppers :: RangeClass self => ReadAttr self Bool +rangeTroughUnderSteppers = readAttrFromBoolProperty "trough-under-steppers" + hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs.pp 537 +-- | Virtual function that moves the slider. Used for keybindings. +moveSlider :: RangeClass self => Signal self (ScrollType -> IO ()) +moveSlider = Signal (connect_ENUM__NONE "move-slider") + hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 28 + hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 45 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 72 + scaleGetLayout, + scaleGetLayoutOffsets, + + scaleAddMark, + scaleClearMarks, hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 85 +import Data.IORef ( newIORef ) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 89 +import System.Glib.UTFString +{#import Graphics.UI.Gtk.Pango.Types#} hunk ./gtk/Graphics/UI/Gtk/Abstract/Scale.chs 163 +-- | Gets the 'PangoLayout' used to display the scale. The returned object is +-- owned by the scale so does not need to be freed by the caller. +-- +-- * Available since Gtk+ version 2.4 +-- +scaleGetLayout :: ScaleClass self => self + -> IO (Maybe PangoLayout) -- ^ returns the 'PangoLayout' for this scale, or + -- @Nothing@ if the 'drawValue' property is @False@. +scaleGetLayout self = do + pl <- {# call gtk_scale_get_layout #} + (toScale self) + if pl == nullPtr + then return Nothing + else do + ps <- makeNewPangoString "" + psRef <- newIORef ps + raw <- constructNewGObject mkPangoLayoutRaw $ return pl + return $ Just (PangoLayout psRef raw) + +-- | Obtains the coordinates where the scale will draw the PangoLayout representing the text in the +-- scale. Remember when using the PangoLayout function you need to convert to and from pixels using +-- 'PIXELS' or 'PangoScale'. +-- [_$_] +-- If the 'drawValue' property is 'False', the return values are undefined. +-- representing the text in the scale. Remember when using the 'PangoLayout' +-- function you need to convert to and from pixels using 'pangopixels' or +-- 'PangoPixels' or `PangoScale' +-- +-- * Available since Gtk+ version 2.4 +-- +scaleGetLayoutOffsets :: ScaleClass self => self + -> IO (Int, Int) -- ^ @(x, y)@ [_$_] + -- @x@ - location to store X offset of layout + -- @y@ - location to store Y offset of layout +scaleGetLayoutOffsets self = + alloca $ \xPtr -> + alloca $ \yPtr -> + {# call gtk_scale_get_layout_offsets #} + (toScale self) + xPtr + yPtr + >> + peek xPtr >>= \x -> + peek yPtr >>= \y -> + return (fromIntegral x, fromIntegral y) + +-- | Adds a mark at @value@. +-- +-- A mark is indicated visually by drawing a tick mark next to the scale, +-- and Gtk+ makes it easy for the user to position the scale exactly at the +-- marks value. +-- +-- To remove marks from a scale, use 'scaleClearMarks'. +-- +-- * Available since Gtk+ version 2.16 +-- +scaleAddMark :: ScaleClass self => self + -> Double -- ^ @value@ - the value at which the mark is placed, must be + -- between the lower and upper limits of the scales\' + -- adjustment + -> PositionType -- ^ @position@ - where to draw the mark. For a horizontal + -- scale, 'PosTop' is drawn above the scale, anything else + -- below. For a vertical scale, 'PosLeft' is drawn to the left + -- of the scale, anything else to the right. + -> String -- ^ @markup@ - Text to be shown at the mark, using Pango + -- markup + -> IO () +scaleAddMark self value position markup = + withUTFString markup $ \markupPtr -> + {# call gtk_scale_add_mark #} + (toScale self) + (realToFrac value) + ((fromIntegral . fromEnum) position) + markupPtr + +-- | Removes any marks that have been added with 'scaleAddMark'. +-- +-- * Available since Gtk+ version 2.16 +-- +scaleClearMarks :: ScaleClass self => self -> IO () +scaleClearMarks self = + {# call gtk_scale_clear_marks #} + (toScale self) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 25 --- Base class for 'Graphics.UI.Gtk.Scrolling.HScrollbar' and --- 'Graphics.UI.Gtk.Scrolling.VScrollbar' +-- Base class for 'HScrollbar' and 'VScrollbar' hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 28 + hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 30 --- [_$_] --- | 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. +-- +-- | The 'Scrollbar' widget is an abstract base class for 'HScrollbar' and +-- 'VScrollbar'. It is not very useful in itself. hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 35 --- adjustments. See 'Graphics.UI.Gtk.Misc.Adjustment' for the fields in an --- adjustment - for +-- adjustments. See 'Adjustment' for the fields in an adjustment - for hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 44 +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 47 --- | 'System.Glib.GObject' --- | +----'Graphics.UI.Gtk.Abstract.Object' --- | +----'Graphics.UI.Gtk.Abstract.Widget' --- | +----'Graphics.UI.Gtk.Abstract.Range' +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Range' hunk ./gtk/Graphics/UI/Gtk/Abstract/Scrollbar.hs 52 --- | +----'Graphics.UI.Gtk.Scrolling.HScrollbar' --- | +----'Graphics.UI.Gtk.Scrolling.VScrollbar' +-- | +----'HScrollbar' +-- | +----'VScrollbar' hunk ./gtk/Graphics/UI/Gtk/Abstract/Separator.hs 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 8 --- Copyright (C) 2001-2008 Axel Simon +-- Copyright (C) 2001-2009 Axel Simon +-- Copyright (C) 2001-2010 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 27 +-- Note: +-- +-- Below function not useful or rarely-used or just for widget implementations, +-- don't bind those functoins to avoid confuse: +-- `gtk_widget_send_expose` +-- `gtk_widget_get_allocation` +-- `gtk_widget_set_allocation` +-- `gtk_widget_set_has_window' +-- `gtk_widget_set_window` +-- `gtk_requisition_copy` +-- `gtk_requisition_free` +-- [_$_] +-- FFI don't support vararg functions, so below funtion don't bind: +-- `gtk_widget_style_get_valist` +-- +-- Below function just need corresponding attributes, function is not necessary. +-- `gtk_widget_get_tooltip_markup` +-- `gtk_widget_set_tooltip_markup` +-- `gtk_widget_get_tooltip_text` +-- `gtk_widget_set_tooltip_text` +-- `gtk_widget_get_has_tooltip` +-- `gtk_widget_set_has_tooltip ` +-- `gtk_widget_get_double_buffered` +-- `gtk_widget_set_receives_default` +-- `gtk_widget_get_receives_default` +-- hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 114 + widgetRealize, hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 148 + widgetGetVisual, + widgetGetDefaultVisual, +#if GTK_CHECK_VERSION(2,12,0) + widgetModifyCursor, + widgetErrorBell, + widgetKeynavFailed, + widgetGetTooltipWindow, + widgetSetTooltipWindow, + widgetTriggerTooltipQuery, +#endif +#if GTK_CHECK_VERSION(2,14,0) + widgetGetSnapshot, +#endif +#if GTK_CHECK_VERSION(2,18,0) + widgetGetHasWindow, + widgetIsSensitive, + widgetHasGrab, + widgetIsDrawable, + widgetIsToplevel, +#endif + widgetPopCompositeChild, + widgetPushCompositeChild, + widgetMnemonicActivate, + widgetStyleGetProperty, + widgetChildNotify, + widgetFreezeChildNotify, hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 181 + widgetHideOnDelete, hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 184 + widgetEnsureStyle, hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 226 - --widgetGetClipboard, + -- widgetGetClipboard, + widgetThawChildNotify, hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 277 - + widgetTooltipMark, + widgetTooltipText, + widgetHasTooltip, + widgetDoubleBuffered, + [_$_] hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 302 + compositedChanged, +#if GTK_CHECK_VERSION(2,14,0) + damageEvent, +#endif hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 332 + grabFocus, + mnemonicActivate, + widgetMoveFocus, +#if GTK_CHECK_VERSION(2,12,0) + keynavFailed, + queryTooltip, +#endif hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 430 +import Graphics.UI.Gtk.General.DNDTypes (Atom(..)) +{#import System.Glib.GValue#} hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 440 + ,Rectangle hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 545 +-- | Creates the GDK (windowing system) resources associated with a widget. For example, widget->window +-- will be created when a widget is realized. Normally realization happens implicitly; if you show a +-- widget and all its parent containers, then the widget will be realized and mapped automatically. +-- [_$_] +-- Realizing a widget requires all the widget's parent widgets to be realized; calling +-- 'widgetRealize' realizes the widget's parents in addition to widget itself. If a widget is not +-- yet inside a toplevel window when you realize it, bad things will happen. +-- [_$_] +-- This function is primarily used in widget implementations, and isn't very useful otherwise. Many +-- times when you think you might need it, a better approach is to connect to a signal that will be +-- called after the widget is realized automatically, such as 'expose'-event. Or simply +-- 'signalConnect' to the 'realize' signal. +widgetRealize :: WidgetClass self => self -> IO () +widgetRealize self = + {#call widget_realize #} (toWidget self) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 975 +-- | Gets the visual that will be used to render widget. +widgetGetVisual :: WidgetClass self => self [_$_] + -> IO Visual +widgetGetVisual self = + makeNewGObject mkVisual $ {# call widget_get_visual #} (toWidget self) [_$_] + +-- | Obtains the visual of the default colormap. Not really useful; used to be +-- useful before 'colormapGetVisual' existed. +-- +widgetGetDefaultVisual :: + IO Visual -- ^ returns visual of the default colormap +widgetGetDefaultVisual = + makeNewGObject mkVisual $ + {# call gtk_widget_get_default_visual #} + +#if GTK_CHECK_VERSION(2,12,0) +-- | Sets the cursor color to use in a widget, overriding the "cursor-color" and "secondary-cursor-color" +-- style properties. All other style values are left untouched. See also 'widgetModifyStyle'. +-- +-- * Available since Gtk+ version 2.12 +-- +widgetModifyCursor :: WidgetClass self => self + -> Color -- ^ @primary@ - the color to use for primary cursor (does not need + -- to be allocated) + -> Color -- ^ @secondary@ - the color to use for secondary cursor (does not + -- need to be allocated) + -> IO () +widgetModifyCursor self primary secondary = + with secondary $ \secondaryPtr -> + with primary $ \primaryPtr -> + {# call gtk_widget_modify_cursor #} + (toWidget self) + (castPtr primaryPtr) + (castPtr secondaryPtr) + +-- | Notifies the user about an input-related error on this widget. If the 'gtkErrorBell' setting is +-- 'True', it calls 'windowBeep', otherwise it does nothing. +-- [_$_] +-- Note that the effect of 'windowBeep' can be configured in many ways, depending on the windowing +-- backend and the desktop environment or window manager that is used. +-- [_$_] +widgetErrorBell :: WidgetClass self => self -> IO () +widgetErrorBell self = + {# call gtk_widget_error_bell #} + (toWidget self) + +-- | This function should be called whenever keyboard navigation within a single widget hits a +-- boundary. The function emits the 'keynavFailed' signal on the widget and its return value should be +-- interpreted in a way similar to the return value of 'widgetChildFocus': +-- [_$_] +-- When 'True' is returned, stay in the widget, the failed keyboard navigation is Ok and/or there is +-- nowhere we can/should move the focus to. +-- [_$_] +-- When 'False' is returned, the caller should continue with keyboard navigation outside the widget, +-- e.g. by calling 'widgetChildFocus' on the widget's toplevel. +-- [_$_] +-- The default 'keynavFailed' handler returns 'True' for ''DirTabForward'' and +-- ''DirTabBackward''. For the other values of 'DirectionType', it looks at the +-- 'gtkKeynavCursorOnly' setting and returns 'False' if the setting is 'True'. This way the entire user +-- interface becomes cursor-navigatable on input devices such as mobile phones which only have cursor +-- keys but no tab key. +-- [_$_] +-- Whenever the default handler returns 'True', it also calls 'widgetErrorBell' to notify the user +-- of the failed keyboard navigation. +-- [_$_] +-- A use case for providing an own implementation of 'keynavFailed' (either by connecting to it or by +-- overriding it) would be a row of 'Entry' widgets where the user should be able to navigate the +-- entire row with the cursor keys, as e.g. known from user interfaces that require entering license +-- keys. +-- [_$_] +widgetKeynavFailed :: WidgetClass self => self + -> DirectionType -- ^ @direction@ - direction of focus movement + -> IO Bool -- ^ returns @True@ if stopping keyboard navigation is fine, + -- @False@ if the emitting widget should try to handle the + -- keyboard navigation attempt in its parent container(s). +widgetKeynavFailed self direction = + liftM toBool $ + {# call gtk_widget_keynav_failed #} + (toWidget self) + ((fromIntegral . fromEnum) direction) + +-- | Returns the 'Window' of the current tooltip. This can be the 'Window' created by default, or the +-- custom tooltip window set using 'widgetSetTooltipWindow'. +-- [_$_] +widgetGetTooltipWindow :: WidgetClass self => self + -> IO Window -- ^ returns The 'Window' of the current tooltip. +widgetGetTooltipWindow self = + makeNewObject mkWindow $ + {# call gtk_widget_get_tooltip_window #} + (toWidget self) + +-- | Replaces the default, usually yellow, window used for displaying tooltips with @customWindow@. GTK+ +-- will take care of showing and hiding @customWindow@ at the right moment, to behave likewise as the +-- default tooltip window. If @customWindow@ is 'Nothing', the default tooltip window will be used. +-- [_$_] +-- If the custom window should have the default theming it needs to have the name 'gtkTooltip', see +-- 'widgetSetName'. +-- [_$_] +widgetSetTooltipWindow :: (WidgetClass self, WindowClass customWindow) => self + -> Maybe customWindow -- ^ @customWindow@ - a 'Window + -> IO () +widgetSetTooltipWindow self customWindow = + {# call gtk_widget_set_tooltip_window #} + (toWidget self) + $ case customWindow of + Just win -> toWindow win + Nothing -> Window nullForeignPtr + +-- | Triggers a tooltip query on the display where the toplevel of @widget@ is +-- located. See 'tooltipTriggerTooltipQuery' for more information. +-- +-- * Available since Gtk+ version 2.12 +-- +widgetTriggerTooltipQuery :: WidgetClass self => self -> IO () +widgetTriggerTooltipQuery self = + {# call gtk_widget_trigger_tooltip_query #} + (toWidget self) + +#endif + +#if GTK_CHECK_VERSION(2,14,0) +-- | Create a GdkPixmap of the contents of the widget and its children. +-- [_$_] +-- Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on +-- the widget being snapshot and likely differs from those of a target widget displaying the +-- pixmap. The function 'pixbufGetFromDrawable' can be used to convert the pixmap to a visual +-- independant representation. +-- [_$_] +-- The snapshot area used by this function is the widget's allocation plus any extra space occupied by +-- additional windows belonging to this widget (such as the arrows of a spin button). Thus, the +-- resulting snapshot pixmap is possibly larger than the allocation. +-- [_$_] +-- The resulting pixmap is shrunken to match the specified @clipRect@. The +-- (x,y) coordinates of @clipRect@ are interpreted widget relative. If width or height of @clipRect@ are +-- 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective +-- amount. For instance a @clipRect@ { +5, +5, -10, -10 } will chop off 5 pixels at each side of the +-- snapshot pixmap. @clipRect@ will contain the exact widget-relative snapshot coordinates +-- upon return. A @clipRect@ of { -1, -1, 0, 0 } can be used to preserve the auto-grown snapshot area +-- and use @clipRect@ as a pure output parameter. +-- [_$_] +-- The returned pixmap can be 'Nothing', if the resulting @clipArea@ was empty. +-- [_$_] +widgetGetSnapshot :: WidgetClass self => self + -> Rectangle -- ^ @clipRect@ - [_$_] + -> IO (Maybe Pixmap) -- ^ returns 'Pixmap' snapshot of the widget +widgetGetSnapshot self clipRect = + with clipRect $ \clipRectPtr -> do + pixmapPtr <- {# call gtk_widget_get_snapshot #} + (toWidget self) + (castPtr clipRectPtr) + if pixmapPtr == nullPtr + then return Nothing + else liftM Just $ makeNewGObject mkPixmap (return pixmapPtr) +#endif + +#if GTK_CHECK_VERSION(2,18,0) +-- | Determines whether widget has a GdkWindow of its own. See 'widgetSetHasWindow'. +-- | [_$_] +widgetGetHasWindow :: WidgetClass self => self + -> IO Bool -- ^ returns @True@ if @widget@ has a window, @False@ otherwise +widgetGetHasWindow self = + liftM toBool $ + {# call gtk_widget_get_has_window #} + (toWidget self) +-- | Returns the widget's effective sensitivity, which means it is sensitive +-- itself and also its parent widget is sensntive +-- +-- * Available since Gtk+ version 2.18 +-- +widgetIsSensitive :: WidgetClass self => self + -> IO Bool -- ^ returns @True@ if the widget is effectively sensitive +widgetIsSensitive self = + liftM toBool $ + {# call gtk_widget_is_sensitive #} + (toWidget self) + +-- | Determines whether the widget is currently grabbing events, so it is the +-- only widget receiving input events (keyboard and mouse). +-- +-- See also 'grabAdd'. +-- +-- * Available since Gtk+ version 2.18 +-- +widgetHasGrab :: WidgetClass self => self + -> IO Bool -- ^ returns @True@ if the widget is in the grab_widgets stack +widgetHasGrab self = + liftM toBool $ + {# call gtk_widget_has_grab #} + (toWidget self) + +-- | Determines whether @widget@ can be drawn to. A widget can be drawn to if +-- it is mapped and visible. +-- +-- * Available since Gtk+ version 2.18 +-- +widgetIsDrawable :: WidgetClass self => self + -> IO Bool -- ^ returns @True@ if @widget@ is drawable, @False@ otherwise +widgetIsDrawable self = + liftM toBool $ + {# call gtk_widget_is_drawable #} + (toWidget self) +-- | Determines whether @widget@ is a toplevel widget. Currently only 'Window' +-- and 'Invisible' are toplevel widgets. Toplevel widgets have no parent +-- widget. +-- +-- * Available since Gtk+ version 2.18 +-- +widgetIsToplevel :: WidgetClass self => self + -> IO Bool -- ^ returns @True@ if @widget@ is a toplevel, @False@ otherwise +widgetIsToplevel self = + liftM toBool $ + {# call gtk_widget_is_toplevel #} + (toWidget self) + +#endif + +-- | Cancels the effect of a previous call to 'widgetPushCompositeChild'. +-- +widgetPopCompositeChild :: IO () +widgetPopCompositeChild = + {# call gtk_widget_pop_composite_child #} + +-- | Makes all newly-created widgets as composite children until the +-- corresponding 'widgetPopCompositeChild' call. +-- +-- A composite child is a child that's an implementation detail of the +-- container it's inside and should not be visible to people using the +-- container. Composite children aren't treated differently by Gtk+ (but see +-- 'containerForeach' vs. 'containerForall'), but e.g. GUI builders might want +-- to treat them in a different way. +-- +widgetPushCompositeChild :: IO () +widgetPushCompositeChild = + {# call gtk_widget_push_composite_child #} + +-- | Emits the 'mnemonicActivate' signal. +-- [_$_] +-- The default handler for this signal activates the widget if @groupCycling@ is 'False', and just grabs +-- the focus if @groupCycling@ is 'True'. +-- [_$_] +widgetMnemonicActivate :: WidgetClass self => self + -> Bool -- ^ @groupCycling@ - @True@ if there are other widgets with the + -- same mnemonic + -> IO Bool -- ^ returns @True@ if the signal has been handled +widgetMnemonicActivate self groupCycling = + liftM toBool $ + {# call gtk_widget_mnemonic_activate #} + (toWidget self) + (fromBool groupCycling) + +-- | Gets the value of a style property of @widget@. +-- +widgetStyleGetProperty :: WidgetClass self => self + -> String -- ^ @propertyName@ - the name of a style property + -> GValue -- ^ @value@ - location to return the property value + -> IO () +widgetStyleGetProperty self propertyName value = + withUTFString propertyName $ \propertyNamePtr -> + {# call gtk_widget_style_get_property #} + (toWidget self) + propertyNamePtr + value + +-- | Emits a 'childNotify' signal for the child property @childProperty@ on widget. +-- [_$_] +-- This is the analogue of 'objectNotify' for child properties. +-- [_$_] +widgetChildNotify :: WidgetClass self => self + -> String -- ^ @childProperty@ - the name of a child property installed on + -- the class of @widget@'s parent + -> IO () +widgetChildNotify self childProperty = + withUTFString childProperty $ \childPropertyPtr -> + {# call gtk_widget_child_notify #} + (toWidget self) + childPropertyPtr + +-- | Stops emission of 'childNotify' signals on widget. The signals are queued until +-- 'widgetThawChildNotify' is called on widget. +-- [_$_] +-- This is the analogue of 'objectFreezeNotify' for child properties. +-- [_$_] +widgetFreezeChildNotify :: WidgetClass self => self -> IO () +widgetFreezeChildNotify self = + {# call gtk_widget_freeze_child_notify #} + (toWidget self) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 1385 +-- | Utility function; intended to be connected to the "delete-event" signal on a GtkWindow. The function +-- calls 'widgetHide' on its argument, then returns 'True'. If connected to 'delete-event', the +-- result is that clicking the close button for a window (on the window frame, top right corner +-- usually) will hide but not destroy the window. By default, GTK+ destroys windows when 'delete-event' +-- is received. +widgetHideOnDelete :: [_$_] + WidgetClass self => self [_$_] + -> IO Bool +widgetHideOnDelete self = [_$_] + liftM toBool $ + {# call widget_hide_on_delete #} (toWidget self) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 1415 - {# call gtk_widget_ensure_style #} (toWidget widget) hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 1417 +-- | Ensures that widget has a style (widget->style). Not a very useful function; most of the time, if +-- you want the style, the widget is realized, and realized widgets are guaranteed to have a style +-- already. +widgetEnsureStyle :: WidgetClass self => self -> IO () +widgetEnsureStyle self = {# call widget_ensure_style #} (toWidget self) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2123 +-- | Returns the clipboard object for the given selection to be used with widget. widget must have a +-- GdkDisplay associated with it, so must be attached to a toplevel window. +-- [_$_] +-- widgetGetClipboard :: WidgetClass self => self +-- -> Atom -- ^ @selection@ - a {GdkAtom, FIXME: struct type} which +-- -- identifies the clipboard to use. @GDK_SELECTION_CLIPBOARD@ +-- -- gives the default clipboard. Another common value is +-- -- @GDK_SELECTION_PRIMARY@, which gives the primary X +-- -- selection. +-- -> IO Clipboard -- ^ returns the appropriate clipboard object. If no +-- -- clipboard already exists, a new one will be created. Once a +-- -- clipboard object has been created, it is persistent for all +-- -- time. +-- widgetGetClipboard self selection = +-- makeNewGObject mkClipboard $ +-- with selection $ \selectionPtr -> +-- {# call gtk_widget_get_clipboard #} +-- (toWidget self) +-- (castPtr selectionPtr) -- need write Stroable isntance for GdkAtom + +-- | Reverts the effect of a previous call to 'widgetFreezeChildNotify'. This causes all queued +-- 'childNotify' signals on widget to be emitted. +-- [_$_] +widgetThawChildNotify :: WidgetClass self => self -> IO () +widgetThawChildNotify self = + {# call gtk_widget_thaw_child_notify #} + (toWidget self) + hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2633 +-- | Sets the text of tooltip to be the given string, which is marked up with the Pango text markup +-- language. Also see 'tooltipSetMarkup' . +-- [_$_] +-- This is a convenience property which will take care of getting the tooltip shown if the given string +-- is not NULL: 'hasTooltip' will automatically be set to 'True' and there will be taken care of +-- 'queryTooltip' in the default signal handler. +-- [_$_] +widgetTooltipMark :: WidgetClass self => Attr self (Maybe String) +widgetTooltipMark = newAttrFromMaybeStringProperty "tooltip-markup" + +-- | Sets the text of tooltip to be the given string. +-- [_$_] +-- Also see 'tooltipSetText'. +-- [_$_] +-- This is a convenience property which will take care of getting the tooltip shown if the given string +-- is not 'Nothing': 'hasTooltip' will automatically be set to 'True' and there will be taken care of +-- 'queryTooltip' in the default signal handler. +-- [_$_] +widgetTooltipText :: WidgetClass self => Attr self (Maybe String) +widgetTooltipText = newAttrFromMaybeStringProperty "tooltip-textup" + +-- | Enables or disables the emission of 'queryTooltip' on widget. A value of 'True' indicates that widget +-- can have a tooltip, in this case the widget will be queried using 'queryTooltip' to determine +-- whether it will provide a tooltip or not. +-- [_$_] +-- Note that setting this property to 'True' for the first time will change the event masks of the +-- GdkWindows of this widget to include leave-notify and motion-notify events. This cannot and will not +-- be undone when the property is set to 'False' again. +-- [_$_] +widgetHasTooltip :: WidgetClass self => Attr self Bool +widgetHasTooltip = newAttrFromBoolProperty "has-tooltip" + +-- | Whether or not the widget is double buffered. +-- | [_$_] +widgetDoubleBuffered :: WidgetClass self => Attr self Bool +widgetDoubleBuffered = newAttrFromBoolProperty "double-buffered" + hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2822 +-- | The 'compositedChanged' signal is emitted when the composited status of widgets screen changes. See +-- 'screenIsComposited'. +-- [_$_] +compositedChanged :: WidgetClass self => Signal self (IO ()) +compositedChanged = Signal (connect_NONE__NONE "composited-changed") + +-- | +grabFocus :: WidgetClass self => Signal self (IO ()) +grabFocus = Signal (connect_NONE__NONE "grab-focus") + +-- | [_$_] +mnemonicActivate :: WidgetClass self => Signal self (Bool -> IO Bool) +mnemonicActivate = Signal (connect_BOOL__BOOL "mnemonic-activate") + +-- | [_$_] +widgetMoveFocus :: WidgetClass self => Signal self (DirectionType -> IO ()) +widgetMoveFocus = Signal (connect_ENUM__NONE "move-focus") + +#if GTK_CHECK_VERSION(2,12,0) +-- | Gets emitted if keyboard navigation fails. See 'widgetKeynavFailed' for +-- details. +-- +-- * Available since Gtk+ version 2.12 +-- +keynavFailed :: WidgetClass self => Signal self (DirectionType -> IO Bool) +keynavFailed = Signal (connect_ENUM__BOOL "keynav-failed") + +-- | Emitted when 'hasTooltip' is 'True' and the 'gtkTooltipTimeout' has expired with the cursor +-- hovering "above" widget; or emitted when widget got focus in keyboard mode. +-- [_$_] +-- Using the given coordinates, the signal handler should determine whether a tooltip should be shown +-- for widget. If this is the case 'True' should be returned, 'False' otherwise. Note that if @keyboardMode@ +-- is 'True', the values of x and y are undefined and should not be used. +-- [_$_] +-- The signal handler is free to manipulate tooltip with the therefore destined function calls. +-- [_$_] +-- * Available since Gtk+ version 2.12 +-- +queryTooltip :: WidgetClass self => Signal self (Int -> Int -> Bool -> Tooltips -> IO Bool) +queryTooltip = Signal (connect_INT_INT_BOOL_OBJECT__BOOL "query-tooltip") +#endif + +#if GTK_CHECK_VERSION(2,14,0) +-- | Emitted when a redirected window belonging to @widget@ gets drawn into. +-- The region\/area members of the event shows what area of the redirected +-- drawable was drawn into. +-- +-- * Available since Gtk+ version 2.14 +-- +damageEvent :: WidgetClass self => Signal self (EventM EAny Bool) +damageEvent = Signal (eventM "damage-event" []) +#endif + [_$_] hunk ./tools/callbackGen/gtkmarshal.list 151 +# for widget +BOOLEAN:INT,INT,BOOLEAN,OBJECT |