-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Binding to the Gtk+ graphical user interface library.
--   
--   This is the core library of the Gtk2Hs suite of libraries for Haskell
--   based on Gtk+. Gtk+ is an extensive and mature multi-platform toolkit
--   for creating graphical user interfaces.
@package gtk
@version 0.13.6


-- | General enumeration types.
module Graphics.UI.Gtk.General.Enums

-- | State of an accelerator
data AccelFlags
[AccelVisible] :: AccelFlags
[AccelLocked] :: AccelFlags
[AccelMask] :: AccelFlags

-- | Arrow directions for the arrow widget
data ArrowType
[ArrowUp] :: ArrowType
[ArrowDown] :: ArrowType
[ArrowLeft] :: ArrowType
[ArrowRight] :: ArrowType
[ArrowNone] :: ArrowType

-- | Child widget attach options for table containers
data AttachOptions
[Expand] :: AttachOptions
[Shrink] :: AttachOptions
[Fill] :: AttachOptions
data MouseButton
[LeftButton] :: MouseButton
[MiddleButton] :: MouseButton
[RightButton] :: MouseButton
[OtherButton] :: Int -> MouseButton

-- | Dictate the style that a ButtonBox uses to align it contents
data ButtonBoxStyle
[ButtonboxDefaultStyle] :: ButtonBoxStyle
[ButtonboxSpread] :: ButtonBoxStyle
[ButtonboxEdge] :: ButtonBoxStyle
[ButtonboxStart] :: ButtonBoxStyle
[ButtonboxEnd] :: ButtonBoxStyle
[ButtonboxCenter] :: ButtonBoxStyle

-- | Specify which items of a calendar should be displayed.
data CalendarDisplayOptions
[CalendarShowHeading] :: CalendarDisplayOptions
[CalendarShowDayNames] :: CalendarDisplayOptions
[CalendarNoMonthChange] :: CalendarDisplayOptions
[CalendarShowWeekNumbers] :: CalendarDisplayOptions
[CalendarWeekStartMonday] :: CalendarDisplayOptions
[CalendarShowDetails] :: CalendarDisplayOptions

-- | Type of mouse click
data Click
[SingleClick] :: Click
[DoubleClick] :: Click
[TripleClick] :: Click
[ReleaseClick] :: Click

-- | Specifies in which corner a child widget should be placed
data CornerType
[CornerTopLeft] :: CornerType
[CornerBottomLeft] :: CornerType
[CornerTopRight] :: CornerType
[CornerBottomRight] :: CornerType

-- | Editing option
data DeleteType
[DeleteChars] :: DeleteType
[DeleteWordEnds] :: DeleteType
[DeleteWords] :: DeleteType
[DeleteDisplayLines] :: DeleteType
[DeleteDisplayLineEnds] :: DeleteType
[DeleteParagraphEnds] :: DeleteType
[DeleteParagraphs] :: DeleteType
[DeleteWhitespace] :: DeleteType

-- | The <a>DestDefaults</a> enumeration specifies the various types of
--   action that will be taken on behalf of the user for a drag destination
--   site.
--   
--   <ul>
--   <li><a>DestDefaultMotion</a>: If set for a widget, GTK+, during a drag
--   over this widget will check if the drag matches this widget's list of
--   possible targets and actions. GTK+ will then call <a>dragStatus</a> as
--   appropriate.</li>
--   <li><a>DestDefaultHighlight</a>: If set for a widget, GTK+ will draw a
--   highlight on this widget as long as a drag is over this widget and the
--   widget drag format and action are acceptable.</li>
--   <li><a>DestDefaultDrop</a>: If set for a widget, when a drop occurs,
--   GTK+ will will check if the drag matches this widget's list of
--   possible targets and actions. If so, GTK+ will call <a>dragGetData</a>
--   on behalf of the widget. Whether or not the drop is successful, GTK+
--   will call <a>dragFinish</a>. If the action was a move, then if the
--   drag was successful, then <tt>True</tt> will be passed for the delete
--   parameter to <a>dragFinish</a></li>
--   <li><a>DestDefaultAll</a>: If set, specifies that all default actions
--   should be taken.</li>
--   </ul>
data DestDefaults
[DestDefaultMotion] :: DestDefaults
[DestDefaultHighlight] :: DestDefaults
[DestDefaultDrop] :: DestDefaults
[DestDefaultAll] :: DestDefaults
data DragResult
[DragResultSuccess] :: DragResult
[DragResultNoTarget] :: DragResult
[DragResultUserCancelled] :: DragResult
[DragResultTimeoutExpired] :: DragResult
[DragResultGrabBroken] :: DragResult
[DragResultError] :: DragResult

-- | Editing direction
data DirectionType
[DirTabForward] :: DirectionType
[DirTabBackward] :: DirectionType
[DirUp] :: DirectionType
[DirDown] :: DirectionType
[DirLeft] :: DirectionType
[DirRight] :: DirectionType

-- | Justification for label and maybe other widgets (text?)
data Justification
[JustifyLeft] :: Justification
[JustifyRight] :: Justification
[JustifyCenter] :: Justification
[JustifyFill] :: Justification

-- | Some kind of string search options
--   
--   Removed in Gtk3.
data MatchType
[MatchAll] :: MatchType
[MatchAllTail] :: MatchType
[MatchHead] :: MatchType
[MatchTail] :: MatchType
[MatchExact] :: MatchType
[MatchLast] :: MatchType

-- | From where was a menu item entered?
data MenuDirectionType
[MenuDirParent] :: MenuDirectionType
[MenuDirChild] :: MenuDirectionType
[MenuDirNext] :: MenuDirectionType
[MenuDirPrev] :: MenuDirectionType

-- | Units of measure
--   
--   Removed in Gtk3.
data MetricType
[Pixels] :: MetricType
[Inches] :: MetricType
[Centimeters] :: MetricType

-- | Movement in text widget
data MovementStep
[MovementLogicalPositions] :: MovementStep
[MovementVisualPositions] :: MovementStep
[MovementWords] :: MovementStep
[MovementDisplayLines] :: MovementStep
[MovementDisplayLineEnds] :: MovementStep
[MovementParagraphs] :: MovementStep
[MovementParagraphEnds] :: MovementStep
[MovementPages] :: MovementStep
[MovementBufferEnds] :: MovementStep
[MovementHorizontalPages] :: MovementStep

-- | Orientation is good
data Orientation
[OrientationHorizontal] :: Orientation
[OrientationVertical] :: Orientation

-- | Packing parameters of a widget
--   
--   <ul>
--   <li>The <a>Packing</a> parameter determines how the child behaves in
--   the horizontal or vertical way in an <a>HBox</a> or <a>VBox</a>,
--   respectively. <a>PackNatural</a> means the child is as big as it
--   requests. It will stay at the start or end of a <a>Box</a> if there is
--   more space available. All children packed with <a>PackRepel</a> will
--   be padded on both sides with additional space. <a>PackGrow</a> will
--   increase the size of a widget so that it covers the available space. A
--   menu bar, for instance, should always stay at the top of a window and
--   should only occupy as little space as possible. Hence it should be
--   packed at the start of a <a>VBox</a> with the packing option
--   <a>PackNatural</a>. The working area of a window (e.g. the text area
--   in an editor) should expand when the window is resized. Here the
--   packing option <a>PackGrow</a> is the right choice and it is
--   irrelevant whether the main area is inserted at the start or the end
--   of a box. Finally <a>PackRepel</a> 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.</li>
--   </ul>
data Packing
[PackRepel] :: Packing
[PackGrow] :: Packing
[PackNatural] :: Packing
toPacking :: Bool -> Bool -> Packing
fromPacking :: Packing -> (Bool, Bool)

-- | Packing of widgets at start or end in a box
data PackType
[PackStart] :: PackType
[PackEnd] :: PackType

-- | Priorities
data PathPriorityType
[PathPrioLowest] :: PathPriorityType
[PathPrioGtk] :: PathPriorityType
[PathPrioApplication] :: PathPriorityType
[PathPrioTheme] :: PathPriorityType
[PathPrioRc] :: PathPriorityType
[PathPrioHighest] :: PathPriorityType

-- | Widget identification path
data PathType
[PathWidget] :: PathType
[PathWidgetClass] :: PathType
[PathClass] :: PathType
data PolicyType
[PolicyAlways] :: PolicyType
[PolicyAutomatic] :: PolicyType
[PolicyNever] :: PolicyType

-- | Position a scale's value is drawn relative to the trough
data PositionType
[PosLeft] :: PositionType
[PosRight] :: PositionType
[PosTop] :: PositionType
[PosBottom] :: PositionType

-- | Is the ProgressBar horizontally or vertically directed?
--   
--   Removed in Gtk3.
data ProgressBarOrientation
[ProgressLeftToRight] :: ProgressBarOrientation
[ProgressRightToLeft] :: ProgressBarOrientation
[ProgressBottomToTop] :: ProgressBarOrientation
[ProgressTopToBottom] :: ProgressBarOrientation

-- | I don't have a clue.
data ReliefStyle
[ReliefNormal] :: ReliefStyle
[ReliefHalf] :: ReliefStyle
[ReliefNone] :: ReliefStyle

-- | Resize mode, for containers
--   
--   <ul>
--   <li><a>ResizeParent</a> Pass resize request to the parent</li>
--   <li><a>ResizeQueue</a> Queue resizes on this widget</li>
--   <li><a>ResizeImmediate</a> Perform the resizes now</li>
--   </ul>
data ResizeMode
[ResizeParent] :: ResizeMode
[ResizeQueue] :: ResizeMode
[ResizeImmediate] :: ResizeMode

-- | Scrolling type
data ScrollType
[ScrollNone] :: ScrollType
[ScrollJump] :: ScrollType
[ScrollStepBackward] :: ScrollType
[ScrollStepForward] :: ScrollType
[ScrollPageBackward] :: ScrollType
[ScrollPageForward] :: ScrollType
[ScrollStepUp] :: ScrollType
[ScrollStepDown] :: ScrollType
[ScrollPageUp] :: ScrollType
[ScrollPageDown] :: ScrollType
[ScrollStepLeft] :: ScrollType
[ScrollStepRight] :: ScrollType
[ScrollPageLeft] :: ScrollType
[ScrollPageRight] :: ScrollType
[ScrollStart] :: ScrollType
[ScrollEnd] :: ScrollType

-- | Scrolling step
data ScrollStep
[ScrollSteps] :: ScrollStep
[ScrollPages] :: ScrollStep
[ScrollEnds] :: ScrollStep
[ScrollHorizontalSteps] :: ScrollStep
[ScrollHorizontalPages] :: ScrollStep
[ScrollHorizontalEnds] :: ScrollStep

-- | Mode in which selections can be performed
--   
--   <ul>
--   <li>There is a deprecated entry SelectionExtended which should have
--   the same value as SelectionMultiple. C2HS chokes on that
--   construct.</li>
--   </ul>
data SelectionMode
[SelectionNone] :: SelectionMode
[SelectionSingle] :: SelectionMode
[SelectionBrowse] :: SelectionMode
[SelectionMultiple] :: SelectionMode

-- | Shadow types
data ShadowType
[ShadowNone] :: ShadowType
[ShadowIn] :: ShadowType
[ShadowOut] :: ShadowType
[ShadowEtchedIn] :: ShadowType
[ShadowEtchedOut] :: ShadowType
data SortType
[SortAscending] :: SortType
[SortDescending] :: SortType

-- | Widget states
data StateType
[StateNormal] :: StateType
[StateActive] :: StateType
[StatePrelight] :: StateType
[StateSelected] :: StateType
[StateInsensitive] :: StateType

-- | Submenu direction policies
--   
--   Removed in Gtk3.
data SubmenuDirection
[DirectionLeft] :: SubmenuDirection
[DirectionRight] :: SubmenuDirection

-- | Submenu placement policies
--   
--   Removed in Gtk3.
data SubmenuPlacement
[TopBottom] :: SubmenuPlacement
[LeftRight] :: SubmenuPlacement

-- | Whether to clamp or ignore illegal values.
data SpinButtonUpdatePolicy
[UpdateAlways] :: SpinButtonUpdatePolicy
[UpdateIfValid] :: SpinButtonUpdatePolicy

-- | Spin a SpinButton with the following method.
data SpinType
[SpinStepForward] :: SpinType
[SpinStepBackward] :: SpinType
[SpinPageForward] :: SpinType
[SpinPageBackward] :: SpinType
[SpinHome] :: SpinType
[SpinEnd] :: SpinType
[SpinUserDefined] :: SpinType

-- | The <a>TargetFlags</a> enumeration is used to specify constraints on
--   an entry in a <a>TargetList</a>. These flags are only used for drag
--   and drop.
--   
--   <ul>
--   <li>If the <a>TargetSameApp</a> flag is set, the target will only be
--   selected for drags within a single application.</li>
--   <li>If the <a>TargetSameWidget</a> flag is set, the target will only
--   be selected for drags within a single widget.</li>
--   </ul>
data TargetFlags
[TargetSameApp] :: TargetFlags
[TargetSameWidget] :: TargetFlags
[TargetOtherApp] :: TargetFlags
[TargetOtherWidget] :: TargetFlags
data TextDirection
[TextDirNone] :: TextDirection
[TextDirLtr] :: TextDirection
[TextDirRtl] :: TextDirection

-- | Specify the way the search function for <a>TextBuffer</a> works.
data TextSearchFlags
[TextSearchVisibleOnly] :: TextSearchFlags
[TextSearchTextOnly] :: TextSearchFlags

-- | The window type for coordinate translation.
data TextWindowType
[TextWindowPrivate] :: TextWindowType
[TextWindowWidget] :: TextWindowType
[TextWindowText] :: TextWindowType
[TextWindowLeft] :: TextWindowType
[TextWindowRight] :: TextWindowType
[TextWindowTop] :: TextWindowType
[TextWindowBottom] :: TextWindowType

-- | Where to place the toolbar?
data ToolbarStyle
[ToolbarIcons] :: ToolbarStyle
[ToolbarText] :: ToolbarStyle
[ToolbarBoth] :: ToolbarStyle
[ToolbarBothHoriz] :: ToolbarStyle

-- | Wether columns of a tree or list widget can be resized.
data TreeViewColumnSizing
[TreeViewColumnGrowOnly] :: TreeViewColumnSizing
[TreeViewColumnAutosize] :: TreeViewColumnSizing
[TreeViewColumnFixed] :: TreeViewColumnSizing

-- | Updating types for range widgets (determines when the
--   <tt>"connectToValueChanged"</tt> signal is emitted by the widget)
--   
--   Removed in Gtk3.
data UpdateType
[UpdateContinuous] :: UpdateType
[UpdateDiscontinuous] :: UpdateType
[UpdateDelayed] :: UpdateType

-- | Visibility
--   
--   Removed in Gtk3.
data Visibility
[VisibilityNone] :: Visibility
[VisibilityPartial] :: Visibility
[VisibilityFull] :: Visibility

-- | Window position types
data WindowPosition
[WinPosNone] :: WindowPosition
[WinPosCenter] :: WindowPosition
[WinPosMouse] :: WindowPosition
[WinPosCenterAlways] :: WindowPosition
[WinPosCenterOnParent] :: WindowPosition

-- | Interaction of a window with window manager
data WindowType
[WindowToplevel] :: WindowType
[WindowPopup] :: WindowType

-- | Determine how lines are wrapped in a <a>TextView</a>.
data WrapMode
[WrapNone] :: WrapMode
[WrapChar] :: WrapMode
[WrapWord] :: WrapMode
[WrapWordChar] :: WrapMode

-- | Specifies the side of the entry at which an icon is placed.
data EntryIconPosition
[EntryIconPrimary] :: EntryIconPosition
[EntryIconSecondary] :: EntryIconPosition

-- | Removed in Gtk3.
data AnchorType
[AnchorCenter] :: AnchorType
[AnchorNorth] :: AnchorType
[AnchorNorthWest] :: AnchorType
[AnchorNorthEast] :: AnchorType
[AnchorSouth] :: AnchorType
[AnchorSouthWest] :: AnchorType
[AnchorSouthEast] :: AnchorType
[AnchorWest] :: AnchorType
[AnchorEast] :: AnchorType
[AnchorN] :: AnchorType
[AnchorNw] :: AnchorType
[AnchorNe] :: AnchorType
[AnchorS] :: AnchorType
[AnchorSw] :: AnchorType
[AnchorSe] :: AnchorType
[AnchorW] :: AnchorType
[AnchorE] :: AnchorType

-- | How focus is crossing the widget.
data CrossingMode
[CrossingNormal] :: CrossingMode
[CrossingGrab] :: CrossingMode
[CrossingUngrab] :: CrossingMode
[CrossingGtkGrab] :: CrossingMode
[CrossingGtkUngrab] :: CrossingMode
[CrossingStateChanged] :: CrossingMode

-- | Used in <a>DragContext</a> to indicate the protocol according to which
--   DND is done.
data DragProtocol
[DragProtoMotif] :: DragProtocol
[DragProtoXdnd] :: DragProtocol
[DragProtoRootwin] :: DragProtocol
[DragProtoNone] :: DragProtocol
[DragProtoWin32Dropfiles] :: DragProtocol
[DragProtoOle2] :: DragProtocol
[DragProtoLocal] :: DragProtocol

-- | Used in <a>DragContext</a> to indicate what the destination should do
--   with the dropped data.
--   
--   <ul>
--   <li><a>ActionDefault</a>: Initialisation value, should not be
--   used.</li>
--   <li><a>ActionCopy</a>: Copy the data.</li>
--   <li><a>ActionMove</a>: Move the data, i.e. first copy it, then delete
--   it from the source.</li>
--   <li><a>ActionLink</a>: Add a link to the data. Note that this is only
--   useful if source and destination agree on what it means.</li>
--   <li><a>ActionPrivate</a>: Special action which tells the source that
--   the destination will do something that the source doesn't
--   understand.</li>
--   <li><a>ActionAsk</a>: Ask the user what to do with the data.</li>
--   </ul>
data DragAction
[ActionDefault] :: DragAction
[ActionCopy] :: DragAction
[ActionMove] :: DragAction
[ActionLink] :: DragAction
[ActionPrivate] :: DragAction
[ActionAsk] :: DragAction

-- | Specify which events a widget will emit signals on.
data EventMask
[ExposureMask] :: EventMask
[PointerMotionMask] :: EventMask
[PointerMotionHintMask] :: EventMask
[ButtonMotionMask] :: EventMask
[Button1MotionMask] :: EventMask
[Button2MotionMask] :: EventMask
[Button3MotionMask] :: EventMask
[ButtonPressMask] :: EventMask
[ButtonReleaseMask] :: EventMask
[KeyPressMask] :: EventMask
[KeyReleaseMask] :: EventMask
[EnterNotifyMask] :: EventMask
[LeaveNotifyMask] :: EventMask
[FocusChangeMask] :: EventMask
[StructureMask] :: EventMask
[PropertyChangeMask] :: EventMask
[VisibilityNotifyMask] :: EventMask
[ProximityInMask] :: EventMask
[ProximityOutMask] :: EventMask
[SubstructureMask] :: EventMask
[ScrollMask] :: EventMask
[AllEventsMask] :: EventMask

-- | Keyboard modifiers that are depressed when the user presses a key or a
--   mouse button.
--   
--   <ul>
--   <li>This data type is used to build lists of modifers that were active
--   during an event.</li>
--   <li>The <a>Apple</a> key on Macintoshs is mapped to <a>Alt2</a> and
--   the <a>Meta</a> key (if available).</li>
--   <li>Since Gtk 2.10, there are also <a>Super</a>, <a>Hyper</a> and
--   <a>Meta</a> modifiers which are simply generated from <a>Alt</a> ..
--   <tt>Compose</tt> modifier keys, depending on the mapping used by the
--   windowing system. Due to one key being mapped to e.g. <a>Alt2</a> and
--   <a>Meta</a>, you shouldn't pattern match directly against a certain
--   key but check whether a key is in the list using the <a>elem</a>
--   function, say.</li>
--   </ul>
data Modifier
[Shift] :: Modifier
[Lock] :: Modifier
[Control] :: Modifier
[Alt] :: Modifier
[Alt2] :: Modifier
[Alt3] :: Modifier
[Alt4] :: Modifier
[Alt5] :: Modifier
[Button1] :: Modifier
[Button2] :: Modifier
[Button3] :: Modifier
[Button4] :: Modifier
[Button5] :: Modifier
[Super] :: Modifier
[Hyper] :: Modifier
[Meta] :: Modifier
[Release] :: Modifier
[ModifierMask] :: Modifier

-- | Information on from what level of the widget hierarchy the mouse
--   cursor came.
--   
--   <ul>
--   <li><i><a>NotifyAncestor</a></i> The window is entered from an
--   ancestor or left towards an ancestor.</li>
--   <li><i><a>NotifyVirtual</a></i> The pointer moves between an ancestor
--   and an inferior of the window.</li>
--   <li><i><a>NotifyInferior</a></i> The window is entered from an
--   inferior or left towards an inferior.</li>
--   <li><i><a>NotifyNonlinear</a></i> The window is entered from or left
--   towards a window which is neither an ancestor nor an inferior.</li>
--   <li><i><a>NotifyNonlinearVirtual</a></i> The pointer moves between two
--   windows which are not ancestors of each other and the window is part
--   of the ancestor chain between one of these windows and their least
--   common ancestor.</li>
--   <li><i><a>NotifyUnknown</a></i> The level change does not fit into any
--   of the other categories or could not be determined.</li>
--   </ul>
data NotifyType
[NotifyAncestor] :: NotifyType
[NotifyVirtual] :: NotifyType
[NotifyInferior] :: NotifyType
[NotifyNonlinear] :: NotifyType
[NotifyNonlinearVirtual] :: NotifyType
[NotifyUnknown] :: NotifyType

-- | in which direction was scrolled?
data ScrollDirection
[ScrollUp] :: ScrollDirection
[ScrollDown] :: ScrollDirection
[ScrollLeft] :: ScrollDirection
[ScrollRight] :: ScrollDirection
data VisibilityState
[VisibilityUnobscured] :: VisibilityState
[VisibilityPartialObscured] :: VisibilityState
[VisibilityFullyObscured] :: VisibilityState

-- | The state a <tt>DrawWindow</tt> is in.
data WindowState
[WindowStateWithdrawn] :: WindowState
[WindowStateIconified] :: WindowState
[WindowStateMaximized] :: WindowState
[WindowStateSticky] :: WindowState
[WindowStateFullscreen] :: WindowState
[WindowStateAbove] :: WindowState
[WindowStateBelow] :: WindowState

-- | Determines a window edge or corner.
data WindowEdge
[WindowEdgeNorthWest] :: WindowEdge
[WindowEdgeNorth] :: WindowEdge
[WindowEdgeNorthEast] :: WindowEdge
[WindowEdgeWest] :: WindowEdge
[WindowEdgeEast] :: WindowEdge
[WindowEdgeSouthWest] :: WindowEdge
[WindowEdgeSouth] :: WindowEdge
[WindowEdgeSouthEast] :: WindowEdge
data WindowTypeHint
[WindowTypeHintNormal] :: WindowTypeHint
[WindowTypeHintDialog] :: WindowTypeHint
[WindowTypeHintMenu] :: WindowTypeHint
[WindowTypeHintToolbar] :: WindowTypeHint
[WindowTypeHintSplashscreen] :: WindowTypeHint
[WindowTypeHintUtility] :: WindowTypeHint
[WindowTypeHintDock] :: WindowTypeHint
[WindowTypeHintDesktop] :: WindowTypeHint
[WindowTypeHintDropdownMenu] :: WindowTypeHint
[WindowTypeHintPopupMenu] :: WindowTypeHint
[WindowTypeHintTooltip] :: WindowTypeHint
[WindowTypeHintNotification] :: WindowTypeHint
[WindowTypeHintCombo] :: WindowTypeHint
[WindowTypeHintDnd] :: WindowTypeHint

-- | Defines the reference point of a window and the meaning of coordinates
--   passed to <a>windowMove</a>. See <a>windowMove</a> and the
--   "implementation notes" section of the extended window manager hints
--   specification for more details.
data Gravity
[GravityNorthWest] :: Gravity
[GravityNorth] :: Gravity
[GravityNorthEast] :: Gravity
[GravityWest] :: Gravity
[GravityCenter] :: Gravity
[GravityEast] :: Gravity
[GravitySouthWest] :: Gravity
[GravitySouth] :: Gravity
[GravitySouthEast] :: Gravity
[GravityStatic] :: Gravity
data GrabStatus
[GrabSuccess] :: GrabStatus
[GrabAlreadyGrabbed] :: GrabStatus
[GrabInvalidTime] :: GrabStatus
[GrabNotViewable] :: GrabStatus
[GrabFrozen] :: GrabStatus
data OwnerChange
[OwnerChangeNewOwner] :: OwnerChange
[OwnerChangeDestroy] :: OwnerChange
[OwnerChangeClose] :: OwnerChange

-- | specify which input extension a widget desires
data ExtensionMode
[ExtensionEventsNone] :: ExtensionMode
[ExtensionEventsAll] :: ExtensionMode
[ExtensionEventsCursor] :: ExtensionMode

-- | Specify the how the ends of a line is drawn.
--   
--   Removed in Gtk3.
data CapStyle
[CapNotLast] :: CapStyle
[CapButt] :: CapStyle
[CapRound] :: CapStyle
[CapProjecting] :: CapStyle
data Dither
[RgbDitherNone] :: Dither
[RgbDitherNormal] :: Dither
[RgbDitherMax] :: Dither

-- | How objects are filled.
--   
--   Removed in Gtk3.
data Fill
[Solid] :: Fill
[Tiled] :: Fill
[Stippled] :: Fill
[OpaqueStippled] :: Fill

-- | Determine how bitmap operations are carried out.
--   
--   Removed in Gtk3.
data Function
[Copy] :: Function
[Invert] :: Function
[Xor] :: Function
[Clear] :: Function
[And] :: Function
[AndReverse] :: Function
[AndInvert] :: Function
[Noop] :: Function
[Or] :: Function
[Equiv] :: Function
[OrReverse] :: Function
[CopyInvert] :: Function
[OrInvert] :: Function
[Nand] :: Function
[Nor] :: Function
[Set] :: Function

-- | Specify on what file condition a callback should be done.
--   
--   Removed in Gtk3.
data InputCondition
[InputRead] :: InputCondition
[InputWrite] :: InputCondition
[InputException] :: InputCondition
data JoinStyle
[JoinMiter] :: JoinStyle
[JoinRound] :: JoinStyle
[JoinBevel] :: JoinStyle

-- | Determines if a line is solid or dashed.
--   
--   Removed in Gtk3.
data LineStyle
[LineSolid] :: LineStyle
[LineOnOffDash] :: LineStyle
[LineDoubleDash] :: LineStyle

-- | Determine if child widget may be overdrawn.
--   
--   Removed in Gtk3.
data SubwindowMode
[ClipByChildren] :: SubwindowMode
[IncludeInferiors] :: SubwindowMode
instance Show AnchorType
instance Eq AnchorType
instance Show EntryIconPosition
instance Eq EntryIconPosition
instance Enum EntryIconPosition
instance Show WrapMode
instance Eq WrapMode
instance Enum WrapMode
instance Show WindowType
instance Eq WindowType
instance Enum WindowType
instance Show WindowPosition
instance Eq WindowPosition
instance Enum WindowPosition
instance Show Visibility
instance Eq Visibility
instance Enum Visibility
instance Show UpdateType
instance Eq UpdateType
instance Enum UpdateType
instance Show TreeViewColumnSizing
instance Eq TreeViewColumnSizing
instance Enum TreeViewColumnSizing
instance Show ToolbarStyle
instance Eq ToolbarStyle
instance Enum ToolbarStyle
instance Show TextWindowType
instance Eq TextWindowType
instance Enum TextWindowType
instance Show TextSearchFlags
instance Eq TextSearchFlags
instance Bounded TextSearchFlags
instance Show TextDirection
instance Eq TextDirection
instance Enum TextDirection
instance Show TargetFlags
instance Eq TargetFlags
instance Bounded TargetFlags
instance Show SpinType
instance Eq SpinType
instance Enum SpinType
instance Show SpinButtonUpdatePolicy
instance Eq SpinButtonUpdatePolicy
instance Enum SpinButtonUpdatePolicy
instance Show SubmenuPlacement
instance Eq SubmenuPlacement
instance Enum SubmenuPlacement
instance Show SubmenuDirection
instance Eq SubmenuDirection
instance Enum SubmenuDirection
instance Show StateType
instance Eq StateType
instance Enum StateType
instance Show SortType
instance Eq SortType
instance Enum SortType
instance Show ShadowType
instance Eq ShadowType
instance Enum ShadowType
instance Show SelectionMode
instance Eq SelectionMode
instance Enum SelectionMode
instance Show ScrollStep
instance Eq ScrollStep
instance Enum ScrollStep
instance Show ScrollType
instance Eq ScrollType
instance Enum ScrollType
instance Show ResizeMode
instance Eq ResizeMode
instance Enum ResizeMode
instance Show ReliefStyle
instance Eq ReliefStyle
instance Enum ReliefStyle
instance Show ProgressBarOrientation
instance Eq ProgressBarOrientation
instance Enum ProgressBarOrientation
instance Show PositionType
instance Eq PositionType
instance Enum PositionType
instance Show PolicyType
instance Eq PolicyType
instance Enum PolicyType
instance Show PathType
instance Eq PathType
instance Enum PathType
instance Show PathPriorityType
instance Eq PathPriorityType
instance Show PackType
instance Eq PackType
instance Enum PackType
instance Show Packing
instance Eq Packing
instance Enum Packing
instance Show Orientation
instance Eq Orientation
instance Enum Orientation
instance Show MovementStep
instance Eq MovementStep
instance Enum MovementStep
instance Show MetricType
instance Eq MetricType
instance Enum MetricType
instance Show MenuDirectionType
instance Eq MenuDirectionType
instance Enum MenuDirectionType
instance Show MatchType
instance Eq MatchType
instance Enum MatchType
instance Show Justification
instance Eq Justification
instance Enum Justification
instance Show DirectionType
instance Eq DirectionType
instance Enum DirectionType
instance Show DragResult
instance Eq DragResult
instance Bounded DragResult
instance Enum DragResult
instance Show DestDefaults
instance Eq DestDefaults
instance Bounded DestDefaults
instance Show DeleteType
instance Eq DeleteType
instance Enum DeleteType
instance Show CornerType
instance Eq CornerType
instance Enum CornerType
instance Enum Click
instance Show Click
instance Eq Click
instance Show CalendarDisplayOptions
instance Eq CalendarDisplayOptions
instance Bounded CalendarDisplayOptions
instance Show ButtonBoxStyle
instance Eq ButtonBoxStyle
instance Enum ButtonBoxStyle
instance Show MouseButton
instance Eq MouseButton
instance Show AttachOptions
instance Eq AttachOptions
instance Bounded AttachOptions
instance Show ArrowType
instance Eq ArrowType
instance Enum ArrowType
instance Show AccelFlags
instance Eq AccelFlags
instance Bounded AccelFlags
instance Enum AccelFlags
instance Flags AccelFlags
instance Enum AttachOptions
instance Flags AttachOptions
instance Enum MouseButton
instance Enum CalendarDisplayOptions
instance Flags CalendarDisplayOptions
instance Enum DestDefaults
instance Flags DestDefaults
instance Enum PathPriorityType
instance Enum TargetFlags
instance Flags TargetFlags
instance Enum TextSearchFlags
instance Flags TextSearchFlags
instance Enum AnchorType


module Graphics.UI.Gtk.Embedding.Embedding

-- | Test if a Plug is connected to the socket.
socketHasPlug :: SocketClass s => s -> IO Bool


module Graphics.UI.Gtk.Gdk.PixbufAnimation
data PixbufAnimation
class GObjectClass o => PixbufAnimationClass o
castToPixbufAnimation :: GObjectClass obj => obj -> PixbufAnimation
gTypePixbufAnimation :: GType
toPixbufAnimation :: PixbufAnimationClass o => o -> PixbufAnimation
data PixbufAnimationIter
class GObjectClass o => PixbufAnimationIterClass o
castToPixbufAnimationIter :: GObjectClass obj => obj -> PixbufAnimationIter
gTypePixbufAnimationIter :: GType
toPixbufAnimationIter :: PixbufAnimationIterClass o => o -> PixbufAnimationIter
data PixbufSimpleAnim
class PixbufAnimationClass o => PixbufSimpleAnimClass o
castToPixbufSimpleAnim :: GObjectClass obj => obj -> PixbufSimpleAnim
gTypePixbufSimpleAnim :: GType
toPixbufSimpleAnim :: PixbufSimpleAnimClass o => o -> PixbufSimpleAnim

-- | Creates a new animation by loading it from a file. The file format is
--   detected automatically. If the file's format does not support
--   multi-frame images, then an animation with a single frame will be
--   created. Possible errors are in the <tt>PixbufError</tt> and
--   <tt>GFileError</tt> domains.
--   
--   Any of several error conditions may occur: the file could not be
--   opened, there was no loader for the file's format, there was not
--   enough memory to allocate the image buffer, or the image file
--   contained invalid data.
--   
--   <ul>
--   <li>If an error occurs, the function will throw an exception that can
--   be caught using e.g. <a>catchGErrorJust</a> and one of the error codes
--   in <tt>PixbufError</tt> or <tt>GFileError</tt></li>
--   </ul>
pixbufAnimationNewFromFile :: GlibFilePath fp => fp -> IO PixbufAnimation

-- | Creates a new, empty animation.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
pixbufSimpleAnimNew :: Int -> Int -> Float -> IO PixbufSimpleAnim

-- | Queries the width of the bounding box of a pixbuf animation.
pixbufAnimationGetWidth :: PixbufAnimation -> IO Int

-- | Queries the height of the bounding box of a pixbuf animation.
pixbufAnimationGetHeight :: PixbufAnimation -> IO Int

-- | Get an iterator for displaying an animation. The iterator provides the
--   frames that should be displayed at a given time. The start time would
--   normally come from <a>gGetCurrentTime</a>, and marks the beginning of
--   animation playback. After creating an iterator, you should immediately
--   display the pixbuf returned by <a>pixbufAnimationIterGetPixbuf</a>.
--   Then, you should install a timeout (with <tt>timeoutAdd</tt>) or by
--   some other mechanism ensure that you'll update the image after
--   <a>pixbufAnimationIterGetDelayTime</a> milliseconds. Each time the
--   image is updated, you should reinstall the timeout with the new,
--   possibly-changed delay time.
--   
--   As a shortcut, if start_time is <tt>Nothing</tt>, the result of
--   <a>gGetCurrentTime</a> will be used automatically.
--   
--   To update the image (i.e. possibly change the result of
--   <a>pixbufAnimationIterGetPixbuf</a> to a new frame of the animation),
--   call <a>pixbufAnimationIterAdvance</a>.
--   
--   If you're using <tt>PixbufLoader</tt>, in addition to updating the
--   image after the delay time, you should also update it whenever you
--   receive the area_updated signal and
--   <a>pixbufAnimationIterOnCurrentlyLoadingFrame</a> returns
--   <tt>True</tt>. In this case, the frame currently being fed into the
--   loader has received new data, so needs to be refreshed. The delay time
--   for a frame may also be modified after an area_updated signal, for
--   example if the delay time for a frame is encoded in the data after the
--   frame itself. So your timeout should be reinstalled after any
--   area_updated signal.
--   
--   A delay time of -1 is possible, indicating "infinite."
pixbufAnimationGetIter :: PixbufAnimation -> Maybe GTimeVal -> IO PixbufAnimationIter

-- | If you load a file with <a>pixbufAnimationNewFromFile</a> and it turns
--   out to be a plain, unanimated image, then this function will return
--   <tt>True</tt>. Use <a>pixbufAnimationGetStaticImage</a> to retrieve
--   the image.
pixbufAnimationIsStaticImage :: PixbufAnimation -> IO Bool

-- | If an animation is really just a plain image (has only one frame),
--   this function returns that image. If the animation is an animation,
--   this function returns a reasonable thing to display as a static
--   unanimated image, which might be the first frame, or something more
--   sophisticated. If an animation hasn't loaded any frames yet, this
--   function will return <tt>Nothing</tt>.
pixbufAnimationGetStaticImage :: PixbufAnimation -> IO (Maybe Pixbuf)

-- | Possibly advances an animation to a new frame. Chooses the frame based
--   on the start time passed to <a>pixbufAnimationGetIter</a>.
--   
--   current_time would normally come from <a>gGetCurrentTime</a>, and must
--   be greater than or equal to the time passed to
--   <a>pixbufAnimationGetIter</a>, and must increase or remain unchanged
--   each time <a>pixbufAnimationIterGetPixbuf</a> is called. That is, you
--   can't go backward in time; animations only play forward.
--   
--   As a shortcut, pass <tt>Nothing</tt> for the current time and
--   <a>gGetCurrentTime</a> will be invoked on your behalf. So you only
--   need to explicitly pass current_time if you're doing something odd
--   like playing the animation at double speed.
--   
--   If this function returns <tt>False</tt>, there's no need to update the
--   animation display, assuming the display had been rendered prior to
--   advancing; if <tt>True</tt>, you need to call
--   <tt>animationIterGetPixbuf</tt> and update the display with the new
--   pixbuf.
pixbufAnimationIterAdvance :: PixbufAnimationIter -> Maybe GTimeVal -> IO Bool

-- | Gets the number of milliseconds the current pixbuf should be
--   displayed, or -1 if the current pixbuf should be displayed forever.
--   <tt>timeoutAdd</tt> conveniently takes a timeout in milliseconds, so
--   you can use a timeout to schedule the next update.
pixbufAnimationIterGetDelayTime :: PixbufAnimationIter -> IO Int

-- | Used to determine how to respond to the area_updated signal on
--   <tt>PixbufLoader</tt> when loading an animation. area_updated is
--   emitted for an area of the frame currently streaming in to the loader.
--   So if you're on the currently loading frame, you need to redraw the
--   screen for the updated area.
pixbufAnimationIterOnCurrentlyLoadingFrame :: PixbufAnimationIter -> IO Bool

-- | Gets the current pixbuf which should be displayed; the pixbuf will be
--   the same size as the animation itself (<a>pixbufAnimationGetWidth</a>,
--   <a>pixbufAnimationGetHeight</a>). This pixbuf should be displayed for
--   <a>pixbufAnimationIterGetDelayTime</a> milliseconds. The caller of
--   this function does not own a reference to the returned pixbuf; the
--   returned pixbuf will become invalid when the iterator advances to the
--   next frame, which may happen anytime you call
--   <a>pixbufAnimationIterAdvance</a>. Copy the pixbuf to keep it (don't
--   just add a reference), as it may get recycled as you advance the
--   iterator.
pixbufAnimationIterGetPixbuf :: PixbufAnimationIter -> IO Pixbuf

-- | Adds a new frame to animation. The pixbuf must have the dimensions
--   specified when the animation was constructed.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
pixbufSimpleAnimAddFrame :: PixbufSimpleAnim -> Pixbuf -> IO ()

-- | Sets whether animation should loop indefinitely when it reaches the
--   end.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
pixbufSimpleAnimSetLoop :: PixbufSimpleAnim -> Bool -> IO ()

-- | Gets whether animation should loop indefinitely when it reaches the
--   end.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
pixbufSimpleAnimGetLoop :: PixbufSimpleAnim -> IO Bool


-- | Build an interface from an XML UI definition
--   
--   All functions in this module are only available in Gtk 2.12 or higher.
module Graphics.UI.Gtk.Builder
data Builder
class ObjectClass o => BuilderClass o
castToBuilder :: GObjectClass obj => obj -> Builder
gTypeBuilder :: GType
toBuilder :: BuilderClass o => o -> Builder
data BuilderError
[BuilderErrorInvalidTypeFunction] :: BuilderError
[BuilderErrorUnhandledTag] :: BuilderError
[BuilderErrorMissingAttribute] :: BuilderError
[BuilderErrorInvalidAttribute] :: BuilderError
[BuilderErrorInvalidTag] :: BuilderError
[BuilderErrorMissingPropertyValue] :: BuilderError
[BuilderErrorInvalidValue] :: BuilderError
[BuilderErrorVersionMismatch] :: BuilderError
[BuilderErrorDuplicateId] :: BuilderError

-- | Creates a new <a>Builder</a> object.
builderNew :: IO Builder

-- | Parses a file containing a GtkBuilder UI definition and merges it with
--   the current contents of the <a>Builder</a>.
--   
--   <ul>
--   <li>If an error occurs, the computation will throw an exception that
--   can be caught using e.g. <a>catchGErrorJust</a> and one of the error
--   codes in <a>BuilderError</a>.</li>
--   </ul>
builderAddFromFile :: GlibFilePath fp => Builder -> fp -> IO ()

-- | Parses a string containing a GtkBuilder UI definition and merges it
--   with the current contents of the <a>Builder</a>.
--   
--   <ul>
--   <li>If an error occurs, the computation will throw an exception that
--   can be caught using e.g. <a>catchGErrorJust</a> and one of the error
--   codes in <a>BuilderError</a>.</li>
--   </ul>
builderAddFromString :: GlibString string => Builder -> string -> IO ()

-- | Parses a file containing a GtkBuilder UI definition building only the
--   requested objects and merges them with the current contents of the
--   <a>Builder</a>.
--   
--   <ul>
--   <li>If an error occurs, the computation will throw an exception that
--   can be caught using e.g. <a>catchGErrorJust</a> and one of the error
--   codes in <a>BuilderError</a>.</li>
--   </ul>
builderAddObjectsFromFile :: (GlibString string, GlibFilePath fp) => Builder -> fp -> [string] -> IO ()

-- | Parses a string containing a GtkBuilder UI definition building only
--   the requested objects and merges them with the current contents of the
--   <a>Builder</a>.
--   
--   <ul>
--   <li>If an error occurs, the computation will throw an exception that
--   can be caught using e.g. <a>catchGErrorJust</a> and one of the error
--   codes in <a>BuilderError</a>.</li>
--   </ul>
builderAddObjectsFromString :: GlibString string => Builder -> string -> [string] -> IO ()

-- | Gets the object with the given name, with a conversion function. Note
--   that this computation does not increment the reference count of the
--   returned object.
--   
--   If the object with the given ID is not of the requested type, an
--   exception will be thrown.
builderGetObject :: (GObjectClass cls, GlibString string) => Builder -> (GObject -> cls) -> string -> IO cls

-- | Gets all objects that have been constructed by builder. Note that this
--   computation does not increment the reference counts of the returned
--   objects.
builderGetObjects :: Builder -> IO [GObject]

-- | Gets the object with the given name. Note that this computation does
--   not increment the reference count of the returned object.
builderGetObjectRaw :: GlibString string => Builder -> string -> IO (Maybe GObject)

-- | Sets the translation domain of the <a>Builder</a>.
builderSetTranslationDomain :: GlibString string => Builder -> Maybe string -> IO ()

-- | Gets the translation domain of the <a>Builder</a>.
builderGetTranslationDomain :: GlibString string => Builder -> IO (Maybe string)
instance Eq BuilderError
instance Show BuilderError
instance Enum BuilderError


-- | Base class for <a>HSeparator</a> and <a>VSeparator</a>.
module Graphics.UI.Gtk.Abstract.Separator
data Separator
class WidgetClass o => SeparatorClass o
castToSeparator :: GObjectClass obj => obj -> Separator
gTypeSeparator :: GType
toSeparator :: SeparatorClass o => o -> Separator


-- | Base class for <a>HScrollbar</a> and <a>VScrollbar</a>
module Graphics.UI.Gtk.Abstract.Scrollbar
data Scrollbar
class RangeClass o => ScrollbarClass o
castToScrollbar :: GObjectClass obj => obj -> Scrollbar
gTypeScrollbar :: GType
toScrollbar :: ScrollbarClass o => o -> Scrollbar


-- | Base class for <a>HScale</a> and <a>VScale</a>
module Graphics.UI.Gtk.Abstract.Scale
data Scale
class RangeClass o => ScaleClass o
castToScale :: GObjectClass obj => obj -> Scale
gTypeScale :: GType
toScale :: ScaleClass o => o -> Scale

-- | Sets the number of decimal places that are displayed in the value.
--   Also causes the value of the adjustment to be rounded off to this
--   number of digits, so the retrieved value matches the value the user
--   saw.
scaleSetDigits :: ScaleClass self => self -> Int -> IO ()

-- | Gets the number of decimal places that are displayed in the value.
scaleGetDigits :: ScaleClass self => self -> IO Int

-- | Specifies whether the current value is displayed as a string next to
--   the slider.
scaleSetDrawValue :: ScaleClass self => self -> Bool -> IO ()

-- | Returns whether the current value is displayed as a string next to the
--   slider.
scaleGetDrawValue :: ScaleClass self => self -> IO Bool

-- | Position a scale's value is drawn relative to the trough
data PositionType
[PosLeft] :: PositionType
[PosRight] :: PositionType
[PosTop] :: PositionType
[PosBottom] :: PositionType

-- | Sets the position in which the current value is displayed.
scaleSetValuePos :: ScaleClass self => self -> PositionType -> IO ()

-- | Gets the position in which the current value is displayed.
scaleGetValuePos :: ScaleClass self => self -> IO PositionType

-- | The number of decimal places that are displayed in the value.
--   
--   Allowed values: [-1,64]
--   
--   Default value: 1
scaleDigits :: ScaleClass self => Attr self Int

-- | Whether the current value is displayed as a string next to the slider.
--   
--   Default value: <tt>True</tt>
scaleDrawValue :: ScaleClass self => Attr self Bool

-- | The position in which the current value is displayed.
--   
--   Default value: <a>PosTop</a>
scaleValuePos :: ScaleClass self => Attr self PositionType


-- | The base class of the Gtk+ type hierarchy.
--   
--   <ul>
--   <li>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.</li>
--   </ul>
module Graphics.UI.Gtk.Abstract.Object
data Object
class GObjectClass o => ObjectClass o
castToObject :: GObjectClass obj => obj -> Object
gTypeObject :: GType
toObject :: ObjectClass o => o -> Object
makeNewObject :: ObjectClass obj => (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
type GWeakNotify = FunPtr (((Ptr ()) -> ((Ptr GObject) -> (IO ()))))

-- | Attach a callback that will be called after the destroy hooks have
--   been called
objectWeakref :: ObjectClass o => o -> IO () -> IO GWeakNotify

-- | Detach a weak destroy callback function
objectWeakunref :: ObjectClass o => o -> GWeakNotify -> IO ()

-- | Signals that all holders of a reference to the <a>Object</a> should
--   release the reference that they hold. May result in finalization of
--   the object if all references are released.
objectDestroy :: ObjectClass self => Signal self (IO ())

-- | Register a notify callback that is triggered when the given property
--   has been modified.
--   
--   <ul>
--   <li>Note that this callback is triggered even if the actual value of
--   the property has not changed.</li>
--   <li>Not all attributes are properties. A warning will be generated at
--   runtime if the passed-in attribute is not a property of the class with
--   which it was registered.</li>
--   </ul>
notifyProperty :: ObjectClass self => ReadWriteAttr self a b -> Signal self (IO ())


-- | Base class for widgets with two adjustable panes
module Graphics.UI.Gtk.Abstract.Paned
data Paned
class ContainerClass o => PanedClass o
castToPaned :: GObjectClass obj => obj -> Paned
gTypePaned :: GType
toPaned :: PanedClass o => o -> Paned

-- | Adds a child to the top or left pane with default parameters. This is
--   equivalent to <tt><a>panedPack1</a> paned child False True</tt>.
panedAdd1 :: (PanedClass self, WidgetClass child) => self -> child -> IO ()

-- | Adds a child to the bottom or right pane with default parameters. This
--   is equivalent to <tt><a>panedPack2</a> paned child True True</tt>.
panedAdd2 :: (PanedClass self, WidgetClass child) => self -> child -> IO ()

-- | Adds a child to the top or left pane.
panedPack1 :: (PanedClass self, WidgetClass child) => self -> child -> Bool -> Bool -> IO ()

-- | Adds a child to the bottom or right pane.
panedPack2 :: (PanedClass self, WidgetClass child) => self -> child -> Bool -> Bool -> IO ()

-- | Sets the position of the divider between the two panes.
panedSetPosition :: PanedClass self => self -> Int -> IO ()

-- | Obtains the position of the divider between the two panes.
panedGetPosition :: PanedClass self => self -> IO Int

-- | Obtains the first child of the paned widget.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
panedGetChild1 :: PanedClass self => self -> IO (Maybe Widget)

-- | Obtains the second child of the paned widget.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
panedGetChild2 :: PanedClass self => self -> IO (Maybe Widget)

-- | Returns the <a>Window</a> of the handle. This function is useful when
--   handling button or motion events because it enables the callback to
--   distinguish between the window of the paned, a child and the handle.
panedGetHandleWindow :: PanedClass self => self -> IO DrawWindow

-- | Position of paned separator in pixels (0 means all the way to the
--   left/top).
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
panedPosition :: PanedClass self => Attr self Int

-- | <tt>True</tt> if the Position property should be used.
--   
--   Default value: <tt>False</tt>
panedPositionSet :: PanedClass self => Attr self Bool

-- | The smallest possible value for the position property. This property
--   is derived from the size and shrinkability of the widget's children.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
panedMinPosition :: PanedClass self => ReadAttr self Int

-- | The largest possible value for the position property. This property is
--   derived from the size and shrinkability of the widget's children.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 2147483647
panedMaxPosition :: PanedClass self => ReadAttr self Int

-- | The "resize" child property determines whether the child expands and
--   shrinks along with the paned widget.
--   
--   Default value: <tt>True</tt>
panedChildResize :: (PanedClass self, WidgetClass child) => child -> Attr self Bool

-- | The "shrink" child property determines whether the child can be made
--   smaller than its requisition.
--   
--   Default value: <tt>True</tt>
panedChildShrink :: (PanedClass self, WidgetClass child) => child -> Attr self Bool
onCycleChildFocus :: PanedClass self => self -> (Bool -> IO Bool) -> IO (ConnectId self)
afterCycleChildFocus :: PanedClass self => self -> (Bool -> IO Bool) -> IO (ConnectId self)
onToggleHandleFocus :: PanedClass self => self -> IO Bool -> IO (ConnectId self)
afterToggleHandleFocus :: PanedClass self => self -> IO Bool -> IO (ConnectId self)
onMoveHandle :: PanedClass self => self -> (ScrollType -> IO Bool) -> IO (ConnectId self)
afterMoveHandle :: PanedClass self => self -> (ScrollType -> IO Bool) -> IO (ConnectId self)
onCycleHandleFocus :: PanedClass self => self -> (Bool -> IO Bool) -> IO (ConnectId self)
afterCycleHandleFocus :: PanedClass self => self -> (Bool -> IO Bool) -> IO (ConnectId self)
onAcceptPosition :: PanedClass self => self -> IO Bool -> IO (ConnectId self)
afterAcceptPosition :: PanedClass self => self -> IO Bool -> IO (ConnectId self)
onCancelPosition :: PanedClass self => self -> IO Bool -> IO (ConnectId self)
afterCancelPosition :: PanedClass self => self -> IO Bool -> IO (ConnectId self)


-- | Base class for widgets which visualize an adjustment
module Graphics.UI.Gtk.Abstract.Range
data Range
class WidgetClass o => RangeClass o
castToRange :: GObjectClass obj => obj -> Range
gTypeRange :: GType
toRange :: RangeClass o => o -> Range

-- | Get the <a>Adjustment</a> which is the "model" object for
--   <a>Range</a>. See <a>rangeSetAdjustment</a> for details.
rangeGetAdjustment :: RangeClass self => self -> IO Adjustment

-- | Sets the adjustment to be used as the "model" object for this range
--   widget. The adjustment indicates the current range value, the minimum
--   and maximum range values, the step/page increments used for
--   keybindings and scrolling, and the page size. The page size is
--   normally 0 for <a>Scale</a> and nonzero for <a>Scrollbar</a>, and
--   indicates the size of the visible area of the widget being scrolled.
--   The page size affects the size of the scrollbar slider.
rangeSetAdjustment :: RangeClass self => self -> Adjustment -> IO ()

-- | Gets the update policy of <tt>range</tt>. See
--   <a>rangeSetUpdatePolicy</a>.
--   
--   Removed in Gtk3.
rangeGetUpdatePolicy :: RangeClass self => self -> IO UpdateType

-- | Sets the update policy for the range. <a>UpdateContinuous</a> means
--   that anytime the range slider is moved, the range value will change
--   and the value_changed signal will be emitted. <a>UpdateDelayed</a>
--   means that the value will be updated after a brief timeout where no
--   slider motion occurs, so updates are spaced by a short time rather
--   than continuous. <a>UpdateDiscontinuous</a> means that the value will
--   only be updated when the user releases the button and ends the slider
--   drag operation.
--   
--   Removed in Gtk3.
rangeSetUpdatePolicy :: RangeClass self => self -> UpdateType -> IO ()

-- | Gets the value set by <a>rangeSetInverted</a>.
rangeGetInverted :: RangeClass self => self -> IO Bool

-- | Ranges normally move from lower to higher values as the slider moves
--   from top to bottom or left to right. Inverted ranges have higher
--   values at the top or on the right rather than on the bottom or left.
rangeSetInverted :: RangeClass self => self -> Bool -> IO ()

-- | Gets the current value of the range.
rangeGetValue :: RangeClass self => self -> IO Double

-- | Sets the current value of the range; if the value is outside the
--   minimum or maximum range values, it will be clamped to fit inside
--   them. The range emits the <a>valueChanged</a> signal if the value
--   changes.
rangeSetValue :: RangeClass self => self -> Double -> IO ()

-- | Sets the step and page sizes for the range. The step size is used when
--   the user clicks the <a>Scrollbar</a> arrows or moves <a>Scale</a> via
--   arrow keys. The page size is used for example when moving via Page Up
--   or Page Down keys.
rangeSetIncrements :: RangeClass self => self -> Double -> Double -> IO ()

-- | Sets the allowable values in the <a>Range</a>, and clamps the range
--   value to be between <tt>min</tt> and <tt>max</tt>. (If the range has a
--   non-zero page size, it is clamped between <tt>min</tt> and
--   <tt>max</tt> - page-size.)
rangeSetRange :: RangeClass self => self -> Double -> Double -> IO ()

-- | Scrolling type
data ScrollType
[ScrollNone] :: ScrollType
[ScrollJump] :: ScrollType
[ScrollStepBackward] :: ScrollType
[ScrollStepForward] :: ScrollType
[ScrollPageBackward] :: ScrollType
[ScrollPageForward] :: ScrollType
[ScrollStepUp] :: ScrollType
[ScrollStepDown] :: ScrollType
[ScrollPageUp] :: ScrollType
[ScrollPageDown] :: ScrollType
[ScrollStepLeft] :: ScrollType
[ScrollStepRight] :: ScrollType
[ScrollPageLeft] :: ScrollType
[ScrollPageRight] :: ScrollType
[ScrollStart] :: ScrollType
[ScrollEnd] :: ScrollType

-- | Determines how Gtk+ handles the sensitivity of stepper arrows at the
--   end of range widgets.
--   
--   <ul>
--   <li><a>SensitivityAuto</a>: the arrow is made insensitive if the thumb
--   is at the end</li>
--   <li><a>SensitivityOn</a>: the arrow is alwasy sensitive</li>
--   <li><a>SensitivityOff</a>: the arrow is always insensitive</li>
--   </ul>
data SensitivityType
[SensitivityAuto] :: SensitivityType
[SensitivityOn] :: SensitivityType
[SensitivityOff] :: SensitivityType

-- | Sets the sensitivity policy for the stepper that points to the 'lower'
--   end of the <tt>Range'</tt>s adjustment.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
rangeSetLowerStepperSensitivity :: RangeClass self => self -> SensitivityType -> IO ()

-- | Gets the sensitivity policy for the stepper that points to the 'lower'
--   end of the <tt>Range'</tt>s adjustment.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
rangeGetLowerStepperSensitivity :: RangeClass self => self -> IO SensitivityType

-- | Sets the sensitivity policy for the stepper that points to the 'upper'
--   end of the <tt>Range'</tt>s adjustment.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
rangeSetUpperStepperSensitivity :: RangeClass self => self -> SensitivityType -> IO ()

-- | Gets the sensitivity policy for the stepper that points to the 'upper'
--   end of the <tt>Range'</tt>s adjustment.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
rangeGetUpperStepperSensitivity :: RangeClass self => self -> IO SensitivityType

-- | This function is useful mainly for <a>Range</a> subclasses.
--   
--   See <a>rangeSetMinSliderSize</a>.
rangeGetMinSliderSize :: RangeClass self => self -> IO Int

-- | This function returns the area that contains the range's trough and
--   its steppers, in <a>DrawWindow</a> coordinates.
--   
--   This function is useful mainly for <a>Range</a> subclasses.
rangeGetRangeRect :: RangeClass self => self -> IO Rectangle

-- | This function returns sliders range along the long dimension, in
--   <a>DrawWindow</a> coordinates.
--   
--   This function is useful mainly for <a>Range</a> subclasses.
rangeGetSliderRange :: RangeClass self => self -> IO (Maybe (Int, Int))

-- | This function is useful mainly for <a>Range</a> subclasses.
--   
--   See <a>rangeSetSliderSizeFixed</a>.
rangeGetSliderSizeFixed :: RangeClass self => self -> IO Bool

-- | Sets the minimum size of the range's slider.
--   
--   This function is useful mainly for <a>Range</a> subclasses.
rangeSetMinSliderSize :: RangeClass self => self -> Bool -> IO ()

-- | 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 <a>Range</a> subclasses.
rangeSetSliderSizeFixed :: RangeClass self => self -> Bool -> IO ()

-- | How the range should be updated on the screen.
--   
--   Default value: <a>UpdateContinuous</a>
--   
--   Removed in Gtk3.
rangeUpdatePolicy :: RangeClass self => Attr self UpdateType

-- | The <a>Adjustment</a> that contains the current value of this range
--   object.
rangeAdjustment :: RangeClass self => Attr self Adjustment

-- | Invert direction slider moves to increase range value.
--   
--   Default value: <tt>False</tt>
rangeInverted :: RangeClass self => Attr self Bool

-- | The sensitivity policy for the stepper that points to the adjustment's
--   lower side.
--   
--   Default value: <a>SensitivityAuto</a>
rangeLowerStepperSensitivity :: RangeClass self => Attr self SensitivityType

-- | The sensitivity policy for the stepper that points to the adjustment's
--   upper side.
--   
--   Default value: <a>SensitivityAuto</a>
rangeUpperStepperSensitivity :: RangeClass self => Attr self SensitivityType

-- | 'value' property. See <a>rangeGetValue</a> and <a>rangeSetValue</a>
rangeValue :: RangeClass self => Attr self Double

-- | Wheter range's slikder has a fixed size, or a size that depends on
--   it's adjustment's page size.
rangeSliderSizeFixed :: RangeClass self => Attr self Bool

-- | Get/Set sliders range along the long dimension, in <a>DrawWindow</a>
--   coordinates.
rangeMinSliderSize :: RangeClass self => ReadWriteAttr self Int Bool
adjustBounds :: RangeClass self => Signal self (Double -> IO ())

-- | Emitted when the range value changes.
valueChanged :: RangeClass self => Signal self (IO ())

-- | The <a>changeValue</a> signal is emitted when a scroll action is
--   performed on a range. It allows an application to determine the type
--   of scroll event that occurred and the resultant new value. The
--   application can handle the event itself and return <tt>True</tt> to
--   prevent further processing. Or, by returning <tt>False</tt>, it can
--   pass the event to other handlers until the default Gtk+ handler is
--   reached.
--   
--   The value parameter is unrounded. An application that overrides the
--   <a>changeValue</a> signal is responsible for clamping the value to the
--   desired number of decimal digits.
--   
--   It is not possible to use delayed update policies in an overridden
--   <a>changeValue</a> handler.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
changeValue :: RangeClass self => Signal self (ScrollType -> Double -> IO Bool)

-- | Emitted when the user presses a key (e.g. Page Up, Home, Right Arrow)
--   to move the slider. The <a>ScrollType</a> parameter gives the key that
--   was pressed.
--   
--   Usually you should use <a>onRangeValueChanged</a> /
--   <a>afterRangeValueChanged</a> instead.
onMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)

-- | Emitted when the user presses a key (e.g. Page Up, Home, Right Arrow)
--   to move the slider. The <a>ScrollType</a> parameter gives the key that
--   was pressed.
--   
--   Usually you should use <a>onRangeValueChanged</a> /
--   <a>afterRangeValueChanged</a> instead.
afterMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)

-- | Emitted when the range is adjusted by user action. Note the value can
--   be outside the bounds of the range since it depends on the mouse
--   position.
--   
--   Usually you should use <a>onRangeValueChanged</a> /
--   <a>afterRangeValueChanged</a> instead.
onAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)

-- | Emitted when the range is adjusted by user action. Note the value can
--   be outside the bounds of the range since it depends on the mouse
--   position.
--   
--   Usually you should use <a>onRangeValueChanged</a> /
--   <a>afterRangeValueChanged</a> instead.
afterAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)

-- | Emitted when a scroll action is performed on a range. It allows an
--   application to determine the type of scroll event that occurred and
--   the resultant new value. The application can handle the event itself
--   and return <a>True</a> to prevent further processing. Or, by returning
--   <a>False</a>, it can pass the event to other handlers until the
--   default GTK+ handler is reached.
--   
--   <ul>
--   <li>Since Gtk 2.6</li>
--   </ul>
onRangeChangeValue :: RangeClass self => self -> (ScrollType -> Double -> IO Bool) -> IO (ConnectId self)

-- | Emitted when a scroll action is performed on a range. It allows an
--   application to determine the type of scroll event that occurred and
--   the resultant new value. The application can handle the event itself
--   and return <a>True</a> to prevent further processing. Or, by returning
--   <a>False</a>, it can pass the event to other handlers until the
--   default GTK+ handler is reached.
--   
--   <ul>
--   <li>Since Gtk 2.6</li>
--   </ul>
afterRangeChangeValue :: RangeClass self => self -> (ScrollType -> Double -> IO Bool) -> IO (ConnectId self)

-- | Emitted when the range value is changed either programmatically or by
--   user action.
onRangeValueChanged :: RangeClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted when the range value is changed either programmatically or by
--   user action.
afterRangeValueChanged :: RangeClass self => self -> IO () -> IO (ConnectId self)
instance Show SensitivityType
instance Eq SensitivityType
instance Bounded SensitivityType
instance Enum SensitivityType


-- | Toplevel for embedding into other processes
module Graphics.UI.Gtk.Embedding.Plug
data Plug
class WindowClass o => PlugClass o
castToPlug :: GObjectClass obj => obj -> Plug
gTypePlug :: GType
toPlug :: PlugClass o => o -> Plug

-- | The identifer of a window of the underlying windowing system.
data NativeWindowId

-- | Creates a new plug widget inside the <a>Socket</a> identified by
--   <tt>socketId</tt>. If <tt>socketId</tt> is <tt>Nothing</tt>, the plug
--   is left "unplugged" and can later be plugged into a <a>Socket</a> by
--   <a>socketAddId</a>.
--   
--   If a NativeWindowId is supplied the foreign application window will
--   immediatly appear in this <a>Plug</a> once it is shown. If
--   <tt>Nothing</tt> is passed then a <a>NativeWindowId</a> can be
--   extracted from this <a>Plug</a> using <a>plugGetId</a> and be passed
--   to the application which is to be embedded.
plugNew :: Maybe NativeWindowId -> IO Plug

-- | Create a new plug widget inside the <a>Socket</a> identified by
--   socket_id.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
plugNewForDisplay :: Display -> Maybe NativeWindowId -> IO Plug

-- | Gets the window ID of a <a>Plug</a> widget, which can then be used to
--   embed this window inside another window, for instance with
--   <a>socketAddId</a>.
plugGetId :: PlugClass self => self -> IO NativeWindowId

-- | Determines whether the plug is embedded in a socket.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
plugGetEmbedded :: PlugClass self => self -> IO Bool

-- | Retrieves the socket the plug is embedded in.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
plugGetSocketWindow :: PlugClass self => self -> IO (Maybe DrawWindow)

-- | <tt>True</tt> if the plug is embedded in a socket.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
plugAttrEmbedded :: PlugClass self => ReadAttr self Bool

-- | The window of the socket the plug is embedded in.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
plugAttrSocketWindow :: PlugClass self => ReadAttr self (Maybe DrawWindow)

-- | Gets emitted when the plug becomes embedded in a socket and when the
--   embedding ends.
plugEmbedded :: PlugClass self => Signal self (IO ())


-- | Container for widgets from other processes
module Graphics.UI.Gtk.Embedding.Socket
data Socket
class ContainerClass o => SocketClass o
castToSocket :: GObjectClass obj => obj -> Socket
gTypeSocket :: GType
toSocket :: SocketClass o => o -> Socket

-- | The identifer of a window of the underlying windowing system.
data NativeWindowId

-- | Create a new empty <a>Socket</a>.
--   
--   <a>Socket</a> is a <a>Container</a> for foreign applications that
--   support the XEMBED protocol. To connect two applications the
--   <a>NativeWindowId</a> has to be passed either from this socket to the
--   other application's <a>Plug</a> or vice versa.
socketNew :: IO Socket

-- | Test if a Plug is connected to the socket.
socketHasPlug :: SocketClass s => s -> IO Bool

-- | Adds an XEMBED client, such as a <a>Plug</a>, to the <a>Socket</a>.
--   The client may be in the same process or in a different process.
--   
--   To embed a <a>Plug</a> in a <a>Socket</a>, you can either create the
--   <a>Plug</a> with <tt>Graphics.UI.Gtk.Embedding.Plug.plugNew
--   Nothing</tt>, call <a>plugGetId</a> to get the window ID of the plug,
--   and then pass that to the <a>socketAddId</a>, or you can call
--   <a>socketGetId</a> to get the window ID for the socket, and call
--   <a>plugNew</a> passing in that ID.
--   
--   The <a>Socket</a> must have already be added into a toplevel window
--   before you can make this call.
socketAddId :: SocketClass self => self -> NativeWindowId -> IO ()

-- | Gets the window ID of a <a>Socket</a> widget, which can then be used
--   to create a client embedded inside the socket, for instance with
--   <a>plugNew</a>.
--   
--   The <a>Socket</a> must have already be added into a toplevel window
--   before you can make this call.
socketGetId :: SocketClass self => self -> IO NativeWindowId

-- | Retrieves the window of the plug. Use this to check if the plug has
--   been created inside of the socket.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
socketGetPlugWindow :: SocketClass self => self -> IO (Maybe DrawWindow)

-- | This signal is emitted when a client is successfully added to the
--   socket.
socketPlugAdded :: SocketClass self => Signal self (IO ())

-- | This signal is emitted when a client is removed from the socket. The
--   default action is to destroy the <a>Socket</a> widget, so if you want
--   to reuse it you must add a signal handler that returns <tt>True</tt>.
socketPlugRemoved :: SocketClass self => Signal self (IO Bool)

-- | <i>Deprecated: instead of 'onPlugAdded obj' use 'on obj
--   socketPlugAdded'</i>
onPlugAdded :: SocketClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterPlugAdded obj' use 'after obj
--   socketPlugAdded'</i>
afterPlugAdded :: SocketClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'onPlugRemoved obj' use 'on obj
--   socketPlugRemoved'</i>
onPlugRemoved :: SocketClass self => self -> IO Bool -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterPlugRemoved obj' use 'after obj
--   socketPlugRemoved'</i>
afterPlugRemoved :: SocketClass self => self -> IO Bool -> IO (ConnectId self)


-- | Base class for widgets with alignments and padding
module Graphics.UI.Gtk.Abstract.Misc
data Misc
class WidgetClass o => MiscClass o
castToMisc :: GObjectClass obj => obj -> Misc
gTypeMisc :: GType
toMisc :: MiscClass o => o -> Misc

-- | Sets the alignment of the widget.
miscSetAlignment :: MiscClass self => self -> Float -> Float -> IO ()

-- | Gets the X and Y alignment of the widget within its allocation. See
--   <a>miscSetAlignment</a>.
miscGetAlignment :: MiscClass self => self -> IO (Double, Double)

-- | Sets the amount of space to add around the widget.
miscSetPadding :: MiscClass self => self -> Int -> Int -> IO ()

-- | Gets the padding in the X and Y directions of the widget. See
--   <a>miscSetPadding</a>.
miscGetPadding :: MiscClass self => self -> IO (Int, Int)

-- | The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL
--   layouts.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
miscXalign :: MiscClass self => Attr self Float

-- | The vertical alignment, from 0 (top) to 1 (bottom).
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
miscYalign :: MiscClass self => Attr self Float

-- | The amount of space to add on the left and right of the widget, in
--   pixels.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
miscXpad :: MiscClass self => Attr self Int

-- | The amount of space to add on the top and bottom of the widget, in
--   pixels.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
miscYpad :: MiscClass self => Attr self Int


-- | A container with just one child
module Graphics.UI.Gtk.Abstract.Bin
data Bin
class ContainerClass o => BinClass o
castToBin :: GObjectClass obj => obj -> Bin
gTypeBin :: GType
toBin :: BinClass o => o -> Bin

-- | Gets the child of the <a>Bin</a>, or <tt>Nothing</tt> if the bin
--   contains no child widget.
binGetChild :: BinClass self => self -> IO (Maybe Widget)


-- | Base class for widgets which contain other widgets
module Graphics.UI.Gtk.Abstract.Container
data Container
class WidgetClass o => ContainerClass o
castToContainer :: GObjectClass obj => obj -> Container
gTypeContainer :: GType
toContainer :: ContainerClass o => o -> Container

-- | A function that is invoked for all widgets in a container.
type ContainerForeachCB = Widget -> IO ()

-- | Resize mode, for containers
--   
--   <ul>
--   <li><a>ResizeParent</a> Pass resize request to the parent</li>
--   <li><a>ResizeQueue</a> Queue resizes on this widget</li>
--   <li><a>ResizeImmediate</a> Perform the resizes now</li>
--   </ul>
data ResizeMode
[ResizeParent] :: ResizeMode
[ResizeQueue] :: ResizeMode
[ResizeImmediate] :: ResizeMode

-- | Adds <tt>widget</tt> to the container. Typically used for simple
--   containers such as <a>Window</a>, <a>Frame</a>, or <a>Button</a>; for
--   more complicated layout containers such as <a>Box</a> or <a>Table</a>,
--   this function will pick default packing parameters that may not be
--   correct. So consider functions such as <tt>boxPackStart</tt> and
--   <tt>tableAttach</tt> as an alternative to <a>containerAdd</a> in those
--   cases. A widget may be added to only one container at a time; you
--   can't place the same widget inside two different containers.
containerAdd :: (ContainerClass self, WidgetClass widget) => self -> widget -> IO ()

-- | Removes <tt>widget</tt> from <tt>container</tt>. <tt>widget</tt> must
--   be inside <tt>container</tt>.
containerRemove :: (ContainerClass self, WidgetClass widget) => self -> widget -> IO ()

-- | Maps <tt>callback</tt> over each non-internal child of
--   <tt>container</tt>. See <a>containerForall</a> for details on what
--   constitutes an "internal" child. Most applications should use
--   <a>containerForeach</a>, rather than <a>containerForall</a>.
containerForeach :: ContainerClass self => self -> ContainerForeachCB -> IO ()

-- | Maps <tt>callback</tt> over each child of <tt>container</tt>,
--   including children that are considered "internal" (implementation
--   details of the container). "Internal" children generally weren't added
--   by the user of the container, but were added by the container
--   implementation itself. Most applications should use
--   <a>containerForeach</a>, rather than <a>containerForall</a>.
containerForall :: ContainerClass self => self -> ContainerForeachCB -> IO ()

-- | Returns the container's non-internal children. See
--   <a>containerForall</a> for details on what constitutes an "internal"
--   child.
containerGetChildren :: ContainerClass self => self -> IO [Widget]

-- | Give the focus to a specific child of the container.
containerSetFocusChild :: (ContainerClass self, WidgetClass child) => self -> child -> IO ()

-- | Sets a focus chain, overriding the one computed automatically by Gtk+.
--   
--   In principle each widget in the chain should be a descendant of the
--   container, but this is not enforced by this method, since it's allowed
--   to set the focus chain before you pack the widgets, or have a widget
--   in the chain that isn't always packed. The necessary checks are done
--   when the focus chain is actually traversed.
containerSetFocusChain :: ContainerClass self => self -> [Widget] -> IO ()

-- | Retrieves the focus chain of the container, if one has been set
--   explicitly. If no focus chain has been explicitly set, Gtk+ computes
--   the focus chain based on the positions of the children. In that case
--   the function returns <tt>Nothing</tt>.
containerGetFocusChain :: ContainerClass self => self -> IO (Maybe [Widget])

-- | Removes a focus chain explicitly set with
--   <a>containerSetFocusChain</a>.
containerUnsetFocusChain :: ContainerClass self => self -> IO ()

-- | Hooks up an adjustment to focus handling in a container, so when a
--   child of the container is focused, the adjustment is scrolled to show
--   that widget. This function sets the vertical alignment. See
--   <tt>scrolledWindowGetVAdjustment</tt> for a typical way of obtaining
--   the adjustment and <a>containerSetFocusHAdjustment</a> for setting the
--   horizontal adjustment.
--   
--   The adjustments have to be in pixel units and in the same coordinate
--   system as the allocation for immediate children of the container.
containerSetFocusVAdjustment :: ContainerClass self => self -> Adjustment -> IO ()

-- | Retrieves the vertical focus adjustment for the container. See
--   <a>containerSetFocusVAdjustment</a>.
containerGetFocusVAdjustment :: ContainerClass self => self -> IO (Maybe Adjustment)

-- | Hooks up an adjustment to focus handling in a container, so when a
--   child of the container is focused, the adjustment is scrolled to show
--   that widget. This function sets the horizontal alignment. See
--   <tt>scrolledWindowGetHAdjustment</tt> for a typical way of obtaining
--   the adjustment and <a>containerSetFocusVAdjustment</a> for setting the
--   vertical adjustment.
--   
--   The adjustments have to be in pixel units and in the same coordinate
--   system as the allocation for immediate children of the container.
containerSetFocusHAdjustment :: ContainerClass self => self -> Adjustment -> IO ()

-- | Retrieves the horizontal focus adjustment for the container. See
--   <a>containerSetFocusHAdjustment</a>.
containerGetFocusHAdjustment :: ContainerClass self => self -> IO (Maybe Adjustment)

-- | Make the container resize its children.
containerResizeChildren :: ContainerClass self => self -> IO ()

-- | Sets the border width of the container.
--   
--   The border width of a container is the amount of space to leave around
--   the outside of the container. The only exception to this is
--   <a>Window</a>; because toplevel windows can't leave space outside,
--   they leave the space inside. The border is added on all sides of the
--   container. To add space to only one side, one approach is to create a
--   <a>Alignment</a> widget, call <tt>widgetSetUsize</tt> to give it a
--   size, and place it on the side of the container as a spacer.
containerSetBorderWidth :: ContainerClass self => self -> Int -> IO ()

-- | Retrieves the border width of the container. See
--   <a>containerSetBorderWidth</a>.
containerGetBorderWidth :: ContainerClass self => self -> IO Int

-- | Returns the resize mode for the container. See
--   <a>containerSetResizeMode</a>.
containerGetResizeMode :: ContainerClass self => self -> IO ResizeMode

-- | Sets the resize mode for the container.
--   
--   The resize mode of a container determines whether a resize request
--   will be passed to the container's parent, queued for later execution
--   or executed immediately.
containerSetResizeMode :: ContainerClass self => self -> ResizeMode -> IO ()

-- | Specify how resize events are handled.
--   
--   Default value: <a>ResizeParent</a>
containerResizeMode :: ContainerClass self => Attr self ResizeMode

-- | The width of the empty border outside the containers children.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 0
containerBorderWidth :: ContainerClass self => Attr self Int

-- | Can be used to add a new child to the container.
containerChild :: (ContainerClass self, WidgetClass widget) => WriteAttr self widget

-- | 'focusHadjustment' property. See <a>containerGetFocusHAdjustment</a>
--   and <a>containerSetFocusHAdjustment</a>
containerFocusHAdjustment :: ContainerClass self => ReadWriteAttr self (Maybe Adjustment) Adjustment

-- | 'focusVadjustment' property. See <a>containerGetFocusVAdjustment</a>
--   and <a>containerSetFocusVAdjustment</a>
containerFocusVAdjustment :: ContainerClass self => ReadWriteAttr self (Maybe Adjustment) Adjustment

-- | A widget was added to the container.
add :: ContainerClass self => Signal self (Widget -> IO ())

-- | Emitted when widgets need to be queried again for their preferred
--   size.
checkResize :: ContainerClass self => Signal self (IO ())

-- | A widget was removed from the container.
remove :: ContainerClass self => Signal self (Widget -> IO ())

-- | A widget in the container received or lost the input focus.
setFocusChild :: ContainerClass self => Signal self (Maybe Widget -> IO ())

-- | <i>Deprecated: instead of 'onAdd obj' use 'on obj add'</i>
onAdd :: ContainerClass self => self -> (Widget -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterAdd obj' use 'after obj add'</i>
afterAdd :: ContainerClass self => self -> (Widget -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'onCheckResize obj' use 'on obj
--   checkResize'</i>
onCheckResize :: ContainerClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterCheckResize obj' use 'after obj
--   checkResize'</i>
afterCheckResize :: ContainerClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'onRemove obj' use 'on obj remove'</i>
onRemove :: ContainerClass self => self -> (Widget -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterRemove obj' use 'after obj remove'</i>
afterRemove :: ContainerClass self => self -> (Widget -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'onSetFocusChild obj' use 'on obj
--   setFocusChild'</i>
onSetFocusChild :: ContainerClass self => self -> (Maybe Widget -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterSetFocusChild obj' use 'after obj
--   setFocusChild'</i>
afterSetFocusChild :: ContainerClass self => self -> (Maybe Widget -> IO ()) -> IO (ConnectId self)


-- | Base class for <a>HButtonBox</a> and <a>VButtonBox</a>
module Graphics.UI.Gtk.Abstract.ButtonBox
data ButtonBox
class BoxClass o => ButtonBoxClass o
castToButtonBox :: GObjectClass obj => obj -> ButtonBox
gTypeButtonBox :: GType
toButtonBox :: ButtonBoxClass o => o -> ButtonBox

-- | Dictate the style that a ButtonBox uses to align it contents
data ButtonBoxStyle
[ButtonboxDefaultStyle] :: ButtonBoxStyle
[ButtonboxSpread] :: ButtonBoxStyle
[ButtonboxEdge] :: ButtonBoxStyle
[ButtonboxStart] :: ButtonBoxStyle
[ButtonboxEnd] :: ButtonBoxStyle
[ButtonboxCenter] :: ButtonBoxStyle

-- | Retrieves the method being used to arrange the buttons in the button
--   box.
buttonBoxGetLayout :: ButtonBoxClass self => self -> IO ButtonBoxStyle

-- | Changes the way buttons are arranged in their container.
buttonBoxSetLayout :: ButtonBoxClass self => self -> ButtonBoxStyle -> IO ()

-- | Sets whether <tt>child</tt> should appear in a secondary group of
--   children. A typical use of a secondary child is the help button in a
--   dialog.
--   
--   This group appears after the other children if the style is
--   <a>ButtonboxStart</a>, <a>ButtonboxSpread</a> or <a>ButtonboxEdge</a>,
--   and before the other children if the style is <a>ButtonboxEnd</a>. For
--   horizontal button boxes, the definition of before/after depends on
--   direction of the widget (see <tt>widgetSetDirection</tt>). If the
--   style is <a>ButtonboxStart</a> or <a>ButtonboxEnd</a>, then the
--   secondary children are aligned at the other end of the button box from
--   the main children. For the other styles, they appear immediately next
--   to the main children.
buttonBoxSetChildSecondary :: (ButtonBoxClass self, WidgetClass child) => self -> child -> Bool -> IO ()

-- | Returns whether <tt>child</tt> should appear in a secondary group of
--   children.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
buttonBoxGetChildSecondary :: (ButtonBoxClass self, WidgetClass child) => self -> child -> IO Bool

-- | How to layout the buttons in the box. Possible values are default,
--   spread, edge, start and end.
--   
--   Default value: <a>ButtonboxDefaultStyle</a>
buttonBoxLayoutStyle :: ButtonBoxClass self => Attr self ButtonBoxStyle

-- | If <tt>True</tt>, the child appears in a secondary group of children,
--   suitable for, e.g., help buttons.
--   
--   Default value: <tt>False</tt>
buttonBoxChildSecondary :: (ButtonBoxClass self, WidgetClass child) => child -> Attr self Bool


-- | Base class for box containers
module Graphics.UI.Gtk.Abstract.Box
data Box
class ContainerClass o => BoxClass o
castToBox :: GObjectClass obj => obj -> Box
gTypeBox :: GType
toBox :: BoxClass o => o -> Box

-- | Packing parameters of a widget
--   
--   <ul>
--   <li>The <a>Packing</a> parameter determines how the child behaves in
--   the horizontal or vertical way in an <a>HBox</a> or <a>VBox</a>,
--   respectively. <a>PackNatural</a> means the child is as big as it
--   requests. It will stay at the start or end of a <a>Box</a> if there is
--   more space available. All children packed with <a>PackRepel</a> will
--   be padded on both sides with additional space. <a>PackGrow</a> will
--   increase the size of a widget so that it covers the available space. A
--   menu bar, for instance, should always stay at the top of a window and
--   should only occupy as little space as possible. Hence it should be
--   packed at the start of a <a>VBox</a> with the packing option
--   <a>PackNatural</a>. The working area of a window (e.g. the text area
--   in an editor) should expand when the window is resized. Here the
--   packing option <a>PackGrow</a> is the right choice and it is
--   irrelevant whether the main area is inserted at the start or the end
--   of a box. Finally <a>PackRepel</a> 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.</li>
--   </ul>
data Packing
[PackRepel] :: Packing
[PackGrow] :: Packing
[PackNatural] :: Packing

-- | Adds the <tt>child</tt> widget to the box, packed with reference to
--   the start of the box. The <tt>child</tt> is packed after any other
--   child packed with reference to the start of the box.
boxPackStart :: (BoxClass self, WidgetClass child) => self -> child -> Packing -> Int -> IO ()

-- | Adds the <tt>child</tt> widget to the box, packed with reference to
--   the end of the box. The <tt>child</tt> is packed after (away from end
--   of) any other child packed with reference to the end of the box.
--   
--   Note that for <a>boxPackEnd</a> the <a>PackNatural</a> option will
--   move a child to the right in an <a>HBox</a> or to the bottom in an
--   <a>VBox</a> if there is more space availble.
boxPackEnd :: (BoxClass self, WidgetClass child) => self -> child -> Packing -> Int -> IO ()

-- | Like <a>boxPackStart</a> but uses the default parameters
--   <a>PackRepel</a> and 0 for padding.
--   
--   Removed in Gtk3
boxPackStartDefaults :: (BoxClass self, WidgetClass widget) => self -> widget -> IO ()

-- | Like <a>boxPackEnd</a> but uses the default parameters
--   <a>PackRepel</a> and 0 for padding.
--   
--   Removed in Gtk3
boxPackEndDefaults :: (BoxClass self, WidgetClass widget) => self -> widget -> IO ()

-- | Returns whether the box is homogeneous (all children are the same
--   size). See <a>boxSetHomogeneous</a>.
boxGetHomogeneous :: BoxClass self => self -> IO Bool

-- | Sets the homogeneous property, controlling whether or not all children
--   of the box are given equal space
boxSetHomogeneous :: BoxClass self => self -> Bool -> IO ()

-- | Retrieves the standard spacing between widgets.
boxGetSpacing :: BoxClass self => self -> IO Int

-- | Set the standard spacing between two children.
--   
--   This space is in addition to the padding parameter that is given for
--   each child.
boxSetSpacing :: BoxClass self => self -> Int -> IO ()

-- | Moves <tt>child</tt> to a new <tt>position</tt> in the list of
--   <tt>box</tt> children. The list contains both widgets packed
--   <a>PackStart</a> as well as widgets packed <a>PackEnd</a>, in the
--   order that these widgets were added to the box.
--   
--   A widget's position in the box children list determines where the
--   widget is packed into the box. A child widget at some position in the
--   list will be packed just after all other widgets of the same packing
--   type that appear earlier in the list.
boxReorderChild :: (BoxClass self, WidgetClass child) => self -> child -> Int -> IO ()

-- | Returns information about how <tt>child</tt> is packed into the box.
--   
--   Returns information on the behaviour if free space is available (in
--   <a>Packing</a>), the additional padding for this widget and if the
--   widget was inserted at the start or end of the container
--   (<a>PackType</a>).
boxQueryChildPacking :: (BoxClass self, WidgetClass child) => self -> child -> IO (Packing, Int, PackType)

-- | Sets the way <tt>child</tt> is packed into the box.
boxSetChildPacking :: (BoxClass self, WidgetClass child) => self -> child -> Packing -> Int -> PackType -> IO ()

-- | The amount of space between children.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
boxSpacing :: BoxClass self => Attr self Int

-- | Whether the children should all be the same size.
--   
--   Default value: <tt>False</tt>
boxHomogeneous :: BoxClass self => Attr self Bool

-- | The packing style of the child.
--   
--   Default value: <tt><a>PackGrow</a></tt>
boxChildPacking :: (BoxClass self, WidgetClass child) => child -> Attr self Packing

-- | Extra space to put between the child and its neighbors, in pixels.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 0
boxChildPadding :: (BoxClass self, WidgetClass child) => child -> Attr self Int

-- | A <a>PackType</a> indicating whether the child is packed with
--   reference to the start or end of the parent.
--   
--   Default value: <a>PackStart</a>
boxChildPackType :: (BoxClass self, WidgetClass child) => child -> Attr self PackType

-- | The index of the child in the parent.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: 0
boxChildPosition :: (BoxClass self, WidgetClass child) => child -> Attr self Int


-- | An adapter which makes widgets scrollable
module Graphics.UI.Gtk.Misc.Viewport
data Viewport
class BinClass o => ViewportClass o

-- | Shadow types
data ShadowType
[ShadowNone] :: ShadowType
[ShadowIn] :: ShadowType
[ShadowOut] :: ShadowType
[ShadowEtchedIn] :: ShadowType
[ShadowEtchedOut] :: ShadowType
castToViewport :: GObjectClass obj => obj -> Viewport
gTypeViewport :: GType
toViewport :: ViewportClass o => o -> Viewport

-- | Creates a new <a>Viewport</a> with the given adjustments.
viewportNew :: Adjustment -> Adjustment -> IO Viewport

-- | Returns the horizontal adjustment of the viewport.
viewportGetHAdjustment :: ViewportClass self => self -> IO Adjustment

-- | Returns the vertical adjustment of the viewport.
viewportGetVAdjustment :: ViewportClass self => self -> IO Adjustment

-- | Sets the horizontal adjustment of the viewport.
viewportSetHAdjustment :: ViewportClass self => self -> Adjustment -> IO ()

-- | Sets the vertical adjustment of the viewport.
viewportSetVAdjustment :: ViewportClass self => self -> Adjustment -> IO ()

-- | Sets the shadow type of the viewport.
viewportSetShadowType :: ViewportClass self => self -> ShadowType -> IO ()

-- | Gets the shadow type of the <a>Viewport</a>. See
--   <a>viewportSetShadowType</a>.
viewportGetShadowType :: ViewportClass self => self -> IO ShadowType

-- | Gets the bin window of the <a>Viewport</a>.
--   
--   <ul>
--   <li>Available since Gtk version 2.20</li>
--   </ul>
viewportGetBinWindow :: ViewportClass self => self -> IO DrawWindow

-- | Gets the view window of the <a>Viewport</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
viewportGetViewWindow :: ViewportClass self => self -> IO DrawWindow

-- | The <a>Adjustment</a> that determines the values of the horizontal
--   position for this viewport.
viewportHAdjustment :: ViewportClass self => Attr self Adjustment

-- | The <a>Adjustment</a> that determines the values of the vertical
--   position for this viewport.
viewportVAdjustment :: ViewportClass self => Attr self Adjustment

-- | Determines how the shadowed box around the viewport is drawn.
--   
--   Default value: <a>ShadowIn</a>
viewportShadowType :: ViewportClass self => Attr self ShadowType


-- | Add tips to your widgets
module Graphics.UI.Gtk.Misc.Tooltips
data Tooltips
class ObjectClass o => TooltipsClass o
castToTooltips :: GObjectClass obj => obj -> Tooltips
gTypeTooltips :: GType
toTooltips :: TooltipsClass o => o -> Tooltips

-- | Create a new goup of <a>Tooltips</a>.
tooltipsNew :: IO Tooltips

-- | Allows the user to see your tooltips as they navigate your
--   application.
tooltipsEnable :: TooltipsClass self => self -> IO ()

-- | Causes all tooltips in <tt>tooltips</tt> to become inactive. Any
--   widgets that have tips associated with that group will no longer
--   display their tips until they are enabled again with
--   <a>tooltipsEnable</a>.
tooltipsDisable :: TooltipsClass self => self -> IO ()

-- | Sets the time between the user moving the mouse over a widget and the
--   widget's tooltip appearing.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
tooltipsSetDelay :: TooltipsClass self => self -> Int -> IO ()

-- | Adds a tooltip containing the message <tt>tipText</tt> to the
--   specified <a>Widget</a>.
tooltipsSetTip :: (TooltipsClass self, WidgetClass widget, GlibString string) => self -> widget -> string -> string -> IO ()

-- | Retrieves any <a>Tooltips</a> previously associated with the given
--   widget.
tooltipsDataGet :: (WidgetClass w, GlibString string) => w -> IO (Maybe (Tooltips, string, string))


-- | Add tips to your widgets
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.12</li>
--   </ul>
module Graphics.UI.Gtk.Misc.Tooltip
data Tooltip
class GObjectClass o => TooltipClass o
castToTooltip :: GObjectClass obj => obj -> Tooltip
toTooltip :: TooltipClass o => o -> Tooltip

-- | Sets the text of the tooltip to be <tt>markup</tt>, which is marked up
--   with the Pango text markup language. If <tt>markup</tt> is
--   <a>Nothing</a>, the label will be hidden.
tooltipSetMarkup :: (TooltipClass self, GlibString markup) => self -> Maybe markup -> IO ()

-- | Sets the text of the tooltip to be <tt>text</tt>. If <tt>text</tt> is
--   <a>Nothing</a> the label will be hidden. See also
--   <a>tooltipSetMarkup</a>.
tooltipSetText :: (TooltipClass self, GlibString string) => self -> Maybe string -> IO ()

-- | Sets the icon of the tooltip (which is in front of the text) to be
--   <tt>pixbuf</tt>. If <tt>pixbuf</tt> is <a>Nothing</a> the image will
--   be hidden.
tooltipSetIcon :: TooltipClass self => self -> Maybe Pixbuf -> IO ()

-- | Sets the icon of the tooltip (which is in front of the text) to be the
--   stock item indicated by <tt>stockId</tt> with the size indicated by
--   <tt>size</tt>. If <tt>stockId</tt> is <a>Nothing</a> the image will be
--   hidden.
tooltipSetIconFromStock :: (TooltipClass self, GlibString string) => self -> Maybe string -> IconSize -> IO ()

-- | Sets the icon of the tooltip (which is in front of the text) to be the
--   icon indicated by <tt>iconName</tt> with the size indicated by
--   <tt>size</tt>. If <tt>iconName</tt> is <a>Nothing</a> the image will
--   be hidden.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
tooltipSetIconFromIconName :: (TooltipClass self, GlibString string) => self -> Maybe string -> IconSize -> IO ()

-- | Replaces the widget packed into the tooltip with
--   <tt>customWidget</tt>. <tt>customWidget</tt> does not get destroyed
--   when the tooltip goes away. By default a box with a <a>Image</a> and
--   <a>Label</a> is embedded in the tooltip, which can be configured using
--   <a>tooltipSetMarkup</a> and <a>tooltipSetIcon</a>.
tooltipSetCustom :: (TooltipClass self, WidgetClass widget) => self -> Maybe widget -> IO ()

-- | Triggers a new tooltip query on <tt>display</tt>, in order to update
--   the current visible tooltip, or to show/hide the current tooltip. This
--   function is useful to call when, for example, the state of the widget
--   changed by a key press.
tooltipTriggerTooltipQuery :: Display -> IO ()

-- | Sets the area of the widget, where the contents of this tooltip apply,
--   to be <tt>rect</tt> (in widget coordinates). This is especially useful
--   for properly setting tooltips on <a>TreeView</a> rows and cells,
--   <a>IconView</a>
--   
--   For setting tooltips on <a>TreeView</a>, please refer to the
--   convenience functions for this: <tt>treeViewSetTooltipRow</tt> and
--   <tt>treeViewSetTooltipCell</tt>.
tooltipSetTipArea :: TooltipClass self => self -> Rectangle -> IO ()


-- | Grouping widgets so they request the same size
module Graphics.UI.Gtk.Misc.SizeGroup
data SizeGroup
class GObjectClass o => SizeGroupClass o
castToSizeGroup :: GObjectClass obj => obj -> SizeGroup
gTypeSizeGroup :: GType
toSizeGroup :: SizeGroupClass o => o -> SizeGroup

-- | Create a new <a>SizeGroup</a>.
sizeGroupNew :: SizeGroupMode -> IO SizeGroup
data SizeGroupMode
[SizeGroupNone] :: SizeGroupMode
[SizeGroupHorizontal] :: SizeGroupMode
[SizeGroupVertical] :: SizeGroupMode
[SizeGroupBoth] :: SizeGroupMode

-- | Sets the <a>SizeGroupMode</a> of the size group. The mode of the size
--   group determines whether the widgets in the size group should all have
--   the same horizontal requisition <a>SizeGroupHorizontal</a> all have
--   the same vertical requisition <a>SizeGroupVertical</a>, or should all
--   have the same requisition in both directions <a>SizeGroupBoth</a>.
sizeGroupSetMode :: SizeGroupClass self => self -> SizeGroupMode -> IO ()

-- | Gets the current mode of the size group. See <a>sizeGroupSetMode</a>.
sizeGroupGetMode :: SizeGroupClass self => self -> IO SizeGroupMode

-- | Adds a widget to a <a>SizeGroup</a>. In the future, the requisition of
--   the widget will be determined as the maximum of its requisition and
--   the requisition of the other widgets in the size group. Whether this
--   applies horizontally, vertically, or in both directions depends on the
--   mode of the size group. See <a>sizeGroupSetMode</a>.
sizeGroupAddWidget :: (SizeGroupClass self, WidgetClass widget) => self -> widget -> IO ()

-- | Removes a widget from a <a>SizeGroup</a>.
sizeGroupRemoveWidget :: (SizeGroupClass self, WidgetClass widget) => self -> widget -> IO ()

-- | Sets whether invisible widgets should be ignored when calculating the
--   size.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
sizeGroupSetIgnoreHidden :: SizeGroupClass self => self -> Bool -> IO ()

-- | Returns if invisible widgets are ignored when calculating the size.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
sizeGroupGetIgnoreHidden :: SizeGroupClass self => self -> IO Bool

-- | The directions in which the size group affects the requested sizes of
--   its component widgets.
--   
--   Default value: <a>SizeGroupHorizontal</a>
sizeGroupMode :: SizeGroupClass self => Attr self SizeGroupMode

-- | If <tt>True</tt>, hidden widgets are ignored when determining the size
--   of the group.
--   
--   Default value: <tt>False</tt>
sizeGroupIgnoreHidden :: SizeGroupClass self => Attr self Bool
instance Enum SizeGroupMode


-- | An input method context supporting table-based input methods
module Graphics.UI.Gtk.Misc.IMContextSimple
data IMContextSimple
class IMContextClass o => IMContextSimpleClass o
castToIMContextSimple :: GObjectClass obj => obj -> IMContextSimple
toIMContextSimple :: IMContextSimpleClass o => o -> IMContextSimple

-- | Creates a new <a>IMContextSimple</a>.
imContextSimpleNew :: IO IMContextSimple

-- | Adds an additional table to search to the input context. Each row of
--   the table consists of <tt>maxSeqLen</tt> key symbols followed by two
--   <a>Int</a> interpreted as the high and low words of a gunicode value.
--   Tables are searched starting from the last added.
--   
--   The table must be sorted in dictionary order on the numeric value of
--   the key symbol fields. (Values beyond the length of the sequence
--   should be zero.)
imContextSimpleAddTable :: (IMContextSimpleClass self, GlibString string) => self -> Map string string -> Int -> Int -> IO ()


-- | An input method context supporting multiple, loadable input methods
module Graphics.UI.Gtk.Misc.IMMulticontext
data IMMulticontext
class IMContextClass o => IMMulticontextClass o
castToIMMulticontext :: GObjectClass obj => obj -> IMMulticontext
gTypeIMMulticontext :: GType
toIMMulticontext :: IMMulticontextClass o => o -> IMMulticontext

-- | Creates a new <a>IMMulticontext</a>.
imMulticontextNew :: IO IMContext

-- | Add menuitems for various available input methods to a menu; the
--   menuitems, when selected, will switch the input method for the context
--   and the global default input method.
imMulticontextAppendMenuitems :: (IMMulticontextClass self, MenuShellClass menushell) => self -> menushell -> IO ()


-- | a widget for detachable window portions
module Graphics.UI.Gtk.Misc.HandleBox
data HandleBox
class BinClass o => HandleBoxClass o
castToHandleBox :: GObjectClass obj => obj -> HandleBox
gTypeHandleBox :: GType
toHandleBox :: HandleBoxClass o => o -> HandleBox

-- | Create a new handle box.
handleBoxNew :: IO HandleBox

-- | Shadow types
data ShadowType
[ShadowNone] :: ShadowType
[ShadowIn] :: ShadowType
[ShadowOut] :: ShadowType
[ShadowEtchedIn] :: ShadowType
[ShadowEtchedOut] :: ShadowType

-- | Sets the type of shadow to be drawn around the border of the handle
--   box.
handleBoxSetShadowType :: HandleBoxClass self => self -> ShadowType -> IO ()

-- | Gets the type of shadow drawn around the handle box. See
--   <a>handleBoxSetShadowType</a>.
handleBoxGetShadowType :: HandleBoxClass self => self -> IO ShadowType

-- | Position a scale's value is drawn relative to the trough
data PositionType
[PosLeft] :: PositionType
[PosRight] :: PositionType
[PosTop] :: PositionType
[PosBottom] :: PositionType

-- | Sets the side of the handlebox where the handle is drawn.
handleBoxSetHandlePosition :: HandleBoxClass self => self -> PositionType -> IO ()

-- | Gets the handle position of the handle box. See
--   <a>handleBoxSetHandlePosition</a>.
handleBoxGetHandlePosition :: HandleBoxClass self => self -> IO PositionType

-- | Sets the snap edge of the HandleBox. The snap edge is the edge of the
--   detached child that must be aligned with the corresponding edge of the
--   "ghost" left behind when the child was detached to reattach the
--   torn-off window. Usually, the snap edge should be chosen so that it
--   stays in the same place on the screen when the handlebox is torn off.
--   
--   If the snap edge is not set, then an appropriate value will be guessed
--   from the handle position. If the handle position is <a>PosRight</a> or
--   <a>PosLeft</a>, then the snap edge will be <a>PosTop</a>, otherwise it
--   will be <a>PosLeft</a>.
handleBoxSetSnapEdge :: HandleBoxClass self => self -> PositionType -> IO ()

-- | Gets the edge used for determining reattachment of the handle box. See
--   <a>handleBoxSetSnapEdge</a>.
handleBoxGetSnapEdge :: HandleBoxClass self => self -> IO PositionType

-- | Appearance of the shadow that surrounds the container.
--   
--   Default value: <a>ShadowEtchedOut</a>
handleBoxShadowType :: HandleBoxClass self => Attr self ShadowType

-- | Position of the handle relative to the child widget.
--   
--   Default value: <a>PosLeft</a>
handleBoxHandlePosition :: HandleBoxClass self => Attr self PositionType

-- | Side of the handlebox that's lined up with the docking point to dock
--   the handlebox.
--   
--   Default value: <a>PosTop</a>
handleBoxSnapEdge :: HandleBoxClass self => Attr self PositionType

-- | Whether to use the value from the snap_edge property or a value
--   derived from handle_position.
--   
--   Default value: <tt>False</tt>
handleBoxSnapEdgeSet :: HandleBoxClass self => Attr self Bool

-- | This signal is emitted when the contents of the handlebox are
--   reattached to the main window.
onChildAttached :: HandleBoxClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is emitted when the contents of the handlebox are
--   reattached to the main window.
afterChildAttached :: HandleBoxClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is emitted when the contents of the handlebox are detached
--   from the main window.
onChildDetached :: HandleBoxClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is emitted when the contents of the handlebox are detached
--   from the main window.
afterChildDetached :: HandleBoxClass self => self -> IO () -> IO (ConnectId self)


-- | A widget used to catch events for widgets which do not have their own
--   window
module Graphics.UI.Gtk.Misc.EventBox
data EventBox
class BinClass o => EventBoxClass o
castToEventBox :: GObjectClass obj => obj -> EventBox
gTypeEventBox :: GType
toEventBox :: EventBoxClass o => o -> EventBox

-- | Creates a new <a>EventBox</a>.
eventBoxNew :: IO EventBox

-- | Set whether the event box uses a visible or invisible child window.
--   The default is to use visible windows.
--   
--   In an invisible window event box, the window that that the event box
--   creates is a "input only" window, which means that it is invisible and
--   only serves to receive events.
--   
--   A visible window event box creates a visible ("input output") window
--   that acts as the parent window for all the widgets contained in the
--   event box.
--   
--   You should generally make your event box invisible if you just want to
--   trap events. Creating a visible window may cause artifacts that are
--   visible to the user, especially if the user is using a theme with
--   gradients or pixmaps.
--   
--   The main reason to create a non input-only event box is if you want to
--   set the background to a different color or draw on it.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
eventBoxSetVisibleWindow :: EventBox -> Bool -> IO ()

-- | Returns whether the event box has a visible window. See
--   <a>eventBoxSetVisibleWindow</a> for details.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
eventBoxGetVisibleWindow :: EventBox -> IO Bool

-- | Set whether the event box window is positioned above the windows of
--   its child, as opposed to below it. If the window is above, all events
--   inside the event box will go to the event box. If the window is below,
--   events in windows of child widgets will first got to that widget, and
--   then to its parents.
--   
--   The default is to keep the window below the child.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
eventBoxSetAboveChild :: EventBox -> Bool -> IO ()

-- | Returns whether the event box window is above or below the windows of
--   its child. See <a>eventBoxSetAboveChild</a> for details.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
eventBoxGetAboveChild :: EventBox -> IO Bool

-- | Whether the event box is visible, as opposed to invisible and only
--   used to trap events.
--   
--   Default value: <tt>True</tt>
eventBoxVisibleWindow :: Attr EventBox Bool

-- | Whether the event-trapping window of the eventbox is above the window
--   of the child widget as opposed to below it.
--   
--   Default value: <tt>False</tt>
eventBoxAboveChild :: Attr EventBox Bool


-- | A widget for custom user interface elements
module Graphics.UI.Gtk.Misc.DrawingArea
data DrawingArea
class WidgetClass o => DrawingAreaClass o
castToDrawingArea :: GObjectClass obj => obj -> DrawingArea
gTypeDrawingArea :: GType
toDrawingArea :: DrawingAreaClass o => o -> DrawingArea

-- | Creates a new drawing area.
drawingAreaNew :: IO DrawingArea

-- | See <a>widgetGetDrawWindow</a>
--   
--   Removed in Gtk3.

-- | <i>Deprecated: use widgetGetDrawWindow instead</i>
drawingAreaGetDrawWindow :: DrawingArea -> IO DrawWindow

-- | See <a>widgetGetSize</a>
--   
--   Removed in Gtk3.

-- | <i>Deprecated: use widgetGetSize instead</i>
drawingAreaGetSize :: DrawingArea -> IO (Int, Int)


-- | Displays a calendar and allows the user to select a date
module Graphics.UI.Gtk.Misc.Calendar
data Calendar
class WidgetClass o => CalendarClass o
castToCalendar :: GObjectClass obj => obj -> Calendar
gTypeCalendar :: GType
toCalendar :: CalendarClass o => o -> Calendar

-- | Specify which items of a calendar should be displayed.
data CalendarDisplayOptions
[CalendarShowHeading] :: CalendarDisplayOptions
[CalendarShowDayNames] :: CalendarDisplayOptions
[CalendarNoMonthChange] :: CalendarDisplayOptions
[CalendarShowWeekNumbers] :: CalendarDisplayOptions
[CalendarWeekStartMonday] :: CalendarDisplayOptions
[CalendarShowDetails] :: CalendarDisplayOptions

-- | Creates a new calendar, with the current date being selected.
calendarNew :: IO Calendar

-- | Shifts the calendar to a different month.
calendarSelectMonth :: CalendarClass self => self -> Int -> Int -> IO ()

-- | Selects a day from the current month.
calendarSelectDay :: CalendarClass self => self -> Int -> IO ()

-- | Places a visual marker on a particular day.
calendarMarkDay :: CalendarClass self => self -> Int -> IO ()

-- | Removes the visual marker from a particular day.
calendarUnmarkDay :: CalendarClass self => self -> Int -> IO ()

-- | Remove all visual markers.
calendarClearMarks :: CalendarClass self => self -> IO ()

-- | Sets display options (whether to display the heading and the month
--   headings).
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code. Use <a>calendarSetDisplayOptions</a> instead.</li>
--   </ul>
--   
--   Removed in Gtk3.
calendarDisplayOptions :: CalendarClass self => self -> [CalendarDisplayOptions] -> IO ()

-- | Sets display options (whether to display the heading and the month
--   headings).
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
calendarSetDisplayOptions :: CalendarClass self => self -> [CalendarDisplayOptions] -> IO ()

-- | Returns the current display options for the calendar.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
calendarGetDisplayOptions :: CalendarClass self => self -> IO [CalendarDisplayOptions]

-- | Retrieve the currently selected date.
calendarGetDate :: CalendarClass self => self -> IO (Int, Int, Int)

-- | Does nothing. Previously locked the display of the calendar for
--   several update operations.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
calendarFreeze :: CalendarClass self => self -> IO a -> IO a

-- | The selected year.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
calendarYear :: CalendarClass self => Attr self Int

-- | The selected month (as a number between 0 and 11).
--   
--   Allowed values: [0,11]
--   
--   Default value: 0
calendarMonth :: CalendarClass self => Attr self Int

-- | The selected day (as a number between 1 and 31, or 0 to unselect the
--   currently selected day).
--   
--   Allowed values: [0,31]
--   
--   Default value: 0
calendarDay :: CalendarClass self => Attr self Int

-- | Determines whether a heading is displayed.
--   
--   Default value: <tt>True</tt>
calendarShowHeading :: CalendarClass self => Attr self Bool

-- | Determines whether day names are displayed.
--   
--   Default value: <tt>True</tt>
calendarShowDayNames :: CalendarClass self => Attr self Bool

-- | Determines whether the selected month can be changed.
--   
--   Default value: <tt>False</tt>
calendarNoMonthChange :: CalendarClass self => Attr self Bool

-- | Determines whether week numbers are displayed.
--   
--   Default value: <tt>False</tt>
calendarShowWeekNumbers :: CalendarClass self => Attr self Bool

-- | 'displayOptions' property. See <a>calendarGetDisplayOptions</a> and
--   <a>calendarSetDisplayOptions</a>
--   
--   calendarDisplayOptions :: CalendarClass self =&gt; Attr self
--   [CalendarDisplayOptions] calendarDisplayOptions = newAttr
--   calendarGetDisplayOptions calendarSetDisplayOptions
--   
--   Emitted when a day was selected.
onDaySelected :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | 'displayOptions' property. See <a>calendarGetDisplayOptions</a> and
--   <a>calendarSetDisplayOptions</a>
--   
--   calendarDisplayOptions :: CalendarClass self =&gt; Attr self
--   [CalendarDisplayOptions] calendarDisplayOptions = newAttr
--   calendarGetDisplayOptions calendarSetDisplayOptions
--   
--   Emitted when a day was selected.
afterDaySelected :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted when a day received a double click.
onDaySelectedDoubleClick :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted when a day received a double click.
afterDaySelectedDoubleClick :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The month changed.
onMonthChanged :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The month changed.
afterMonthChanged :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The next month was selected.
onNextMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The next month was selected.
afterNextMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The next year was selected.
onNextYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The next year was selected.
afterNextYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The previous month was selected.
onPrevMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The previous month was selected.
afterPrevMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The previous year was selected.
onPrevYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)

-- | The previous year was selected.
afterPrevYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)


-- | Displays an arrow
module Graphics.UI.Gtk.Misc.Arrow
data Arrow
class MiscClass o => ArrowClass o
castToArrow :: GObjectClass obj => obj -> Arrow
gTypeArrow :: GType
toArrow :: ArrowClass o => o -> Arrow

-- | Arrow directions for the arrow widget
data ArrowType
[ArrowUp] :: ArrowType
[ArrowDown] :: ArrowType
[ArrowLeft] :: ArrowType
[ArrowRight] :: ArrowType
[ArrowNone] :: ArrowType

-- | Shadow types
data ShadowType
[ShadowNone] :: ShadowType
[ShadowIn] :: ShadowType
[ShadowOut] :: ShadowType
[ShadowEtchedIn] :: ShadowType
[ShadowEtchedOut] :: ShadowType

-- | Creates a new arrow widget.
arrowNew :: ArrowType -> ShadowType -> IO Arrow

-- | Sets the direction and style of the <a>Arrow</a>.
arrowSet :: ArrowClass self => self -> ArrowType -> ShadowType -> IO ()

-- | The direction the arrow should point.
--   
--   Default value: <a>ArrowRight</a>
arrowArrowType :: ArrowClass self => Attr self ArrowType

-- | Appearance of the shadow surrounding the arrow.
--   
--   Default value: <a>ShadowOut</a>
arrowShadowType :: ArrowClass self => Attr self ShadowType


-- | A <a>Object</a> representing an adjustable bounded value
module Graphics.UI.Gtk.Misc.Adjustment
data Adjustment
class ObjectClass o => AdjustmentClass o
castToAdjustment :: GObjectClass obj => obj -> Adjustment
gTypeAdjustment :: GType
toAdjustment :: AdjustmentClass o => o -> Adjustment

-- | Creates a new <a>Adjustment</a>.
--   
--   The creation function take every value that is contained in the
--   object: <tt>value</tt> is the initial value and should be between the
--   <tt>upper</tt> and <tt>lower</tt> bounds of the slider. Clicking on
--   the arrows increases this value by <tt>stepIncrement</tt>. Clicking in
--   the slider advances by <tt>pageIncrement</tt>. The <tt>pageSize</tt>
--   is needed to determine if the end of the slider is still in the range.
adjustmentNew :: Double -> Double -> Double -> Double -> Double -> Double -> IO Adjustment

-- | Set the lower value.
adjustmentSetLower :: Adjustment -> Double -> IO ()

-- | Retrieve the lower value.
adjustmentGetLower :: Adjustment -> IO Double

-- | Set the page increment value.
adjustmentSetPageIncrement :: Adjustment -> Double -> IO ()

-- | Retrieve the pageincrement value.
adjustmentGetPageIncrement :: Adjustment -> IO Double

-- | Set the page size value.
adjustmentSetPageSize :: Adjustment -> Double -> IO ()

-- | Retrieve the page size value.
adjustmentGetPageSize :: Adjustment -> IO Double

-- | Set the step-increment value.
adjustmentSetStepIncrement :: Adjustment -> Double -> IO ()

-- | Retrieve the step-increment value.
adjustmentGetStepIncrement :: Adjustment -> IO Double

-- | Set the upper value.
adjustmentSetUpper :: Adjustment -> Double -> IO ()

-- | Retrieve the upper value.
adjustmentGetUpper :: Adjustment -> IO Double

-- | Sets the current value of the Adjustment object. The value is clamped
--   to lie between the adjustment's <tt>lower</tt> and <tt>upper</tt>
--   values. See <a>adjustmentNew</a> for details of these properties.
--   
--   Note that for adjustments which are used in a <a>Scrollbar</a>, the
--   effective range of allowed values goes from <tt>lower</tt> to
--   <tt>upper - page_size</tt>.
adjustmentSetValue :: Adjustment -> Double -> IO ()

-- | Gets the current value of the adjustment. See
--   <a>adjustmentSetValue</a>.
adjustmentGetValue :: Adjustment -> IO Double

-- | Updates the <a>Adjustment</a> <tt>value</tt> to ensure that the range
--   between <tt>lower</tt> and <tt>upper</tt> is in the current page (i.e.
--   between <tt>value</tt> and <tt>value + pageSize</tt>). 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.
adjustmentClampPage :: Adjustment -> Double -> Double -> IO ()

-- | Emit the <a>onAdjChanged</a> signal.
adjustmentAdjChanged :: Adjustment -> IO ()

-- | Emit the <a>onValueChanged</a> signal.
--   
--   <ul>
--   <li>When adjusting the or bounds, this function can be called to
--   enforce a visual update of the containing widget.</li>
--   </ul>
adjustmentValueChanged :: Adjustment -> IO ()

-- | The value of the adjustment.
--   
--   Default value: 0
adjustmentValue :: Attr Adjustment Double

-- | The minimum value of the adjustment.
--   
--   Default value: 0
adjustmentLower :: Attr Adjustment Double

-- | The maximum value of the adjustment. Note that values will be
--   restricted by <tt>upper - page-size</tt> if the page-size property is
--   nonzero.
--   
--   Default value: 0
adjustmentUpper :: Attr Adjustment Double

-- | The step increment of the adjustment.
--   
--   Default value: 0
adjustmentStepIncrement :: Attr Adjustment Double

-- | The page increment of the adjustment.
--   
--   Default value: 0
adjustmentPageIncrement :: Attr Adjustment Double

-- | The page size of the adjustment. Note that the page-size is irrelevant
--   and should be set to zero if the adjustment is used for a simple
--   scalar value, e.g. in a <a>SpinButton</a>.
--   
--   Default value: 0
adjustmentPageSize :: Attr Adjustment Double

-- | Emitted when one or more of the <a>Adjustment</a> fields have been
--   changed, other than the value field.
onAdjChanged :: Adjustment -> IO () -> IO (ConnectId Adjustment)

-- | Emitted when one or more of the <a>Adjustment</a> fields have been
--   changed, other than the value field.
afterAdjChanged :: Adjustment -> IO () -> IO (ConnectId Adjustment)

-- | Emitted when the <a>Adjustment</a> value field has been changed.
onValueChanged :: Adjustment -> IO () -> IO (ConnectId Adjustment)

-- | Emitted when the <a>Adjustment</a> value field has been changed.
afterValueChanged :: Adjustment -> IO () -> IO (ConnectId Adjustment)


-- | A <a>Object</a> representing an adjustable bounded value
module Graphics.UI.Gtk.Misc.Accessible
data Accessible
class AtkObjectClass o => AccessibleClass o
castToAccessible :: GObjectClass obj => obj -> Accessible
gTypeAccessible :: GType
toAccessible :: AccessibleClass o => o -> Accessible

-- | Gets the <a>Widget</a> corresponding to the <a>Accessible</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
accessibleGetWidget :: AccessibleClass self => self -> IO (Maybe Widget)

-- | Sets the <a>Widget</a> corresponding to the <a>Accessible</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
accessibleSetWidget :: (AccessibleClass self, WidgetClass widget) => self -> widget -> IO ()


-- | A vertical scrollbar
module Graphics.UI.Gtk.Scrolling.VScrollbar
data VScrollbar
class ScrollbarClass o => VScrollbarClass o
castToVScrollbar :: GObjectClass obj => obj -> VScrollbar
gTypeVScrollbar :: GType
toVScrollbar :: VScrollbarClass o => o -> VScrollbar

-- | Creates a new vertical scrollbar.
vScrollbarNew :: Adjustment -> IO VScrollbar

-- | Create a new HScrollbar without specifying an existing
--   <a>Adjustment</a>. A new one will be created instead.
vScrollbarNewDefaults :: IO VScrollbar


-- | Adds scrollbars to its child widget
module Graphics.UI.Gtk.Scrolling.ScrolledWindow
data ScrolledWindow
class BinClass o => ScrolledWindowClass o
castToScrolledWindow :: GObjectClass obj => obj -> ScrolledWindow
gTypeScrolledWindow :: GType
toScrolledWindow :: ScrolledWindowClass o => o -> ScrolledWindow

-- | Creates a new scrolled window. The two arguments are the scrolled
--   window's adjustments; these will be shared with the scrollbars and the
--   child widget to keep the bars in sync with the child. Usually you want
--   to pass <tt>Nothing</tt> for the adjustments, which will cause the
--   scrolled window to create them for you.
scrolledWindowNew :: Maybe Adjustment -> Maybe Adjustment -> IO ScrolledWindow

-- | Returns the horizontal scrollbar's adjustment, used to connect the
--   horizontal scrollbar to the child widget's horizontal scroll
--   functionality.
scrolledWindowGetHAdjustment :: ScrolledWindowClass self => self -> IO Adjustment

-- | Returns the vertical scrollbar's adjustment, used to connect the
--   vertical scrollbar to the child widget's vertical scroll
--   functionality.
scrolledWindowGetVAdjustment :: ScrolledWindowClass self => self -> IO Adjustment
data PolicyType
[PolicyAlways] :: PolicyType
[PolicyAutomatic] :: PolicyType
[PolicyNever] :: PolicyType

-- | Sets the scrollbar policy for the horizontal and vertical scrollbars.
--   The policy determines when the scrollbar should appear; it is a value
--   from the <a>PolicyType</a> enumeration. If <a>PolicyAlways</a>, the
--   scrollbar is always present; if <a>PolicyNever</a>, the scrollbar is
--   never present; if <a>PolicyAutomatic</a>, the scrollbar is present
--   only if needed (that is, if the slider part of the bar would be
--   smaller than the trough - the display is larger than the page size).
scrolledWindowSetPolicy :: ScrolledWindowClass self => self -> PolicyType -> PolicyType -> IO ()

-- | Retrieves the current policy values for the horizontal and vertical
--   scrollbars. See <a>scrolledWindowSetPolicy</a>.
scrolledWindowGetPolicy :: ScrolledWindowClass self => self -> IO (PolicyType, PolicyType)

-- | Used to add children without native scrolling capabilities. This is
--   simply a convenience function; it is equivalent to adding the
--   unscrollable child to a viewport, then adding the viewport to the
--   scrolled window. If a child has native scrolling, use
--   <a>containerAdd</a> instead of this function.
--   
--   The viewport scrolls the child by moving its <a>DrawWindow</a>, and
--   takes the size of the child to be the size of its toplevel
--   <a>DrawWindow</a>. This will be very wrong for most widgets that
--   support native scrolling; for example, if you add a widget such as
--   <a>TreeView</a> with a viewport, the whole widget will scroll,
--   including the column headings. Thus, widgets with native scrolling
--   support should not be used with the <a>Viewport</a> proxy.
scrolledWindowAddWithViewport :: (ScrolledWindowClass self, WidgetClass child) => self -> child -> IO ()

-- | Specifies in which corner a child widget should be placed
data CornerType
[CornerTopLeft] :: CornerType
[CornerBottomLeft] :: CornerType
[CornerTopRight] :: CornerType
[CornerBottomRight] :: CornerType

-- | Determines the location of the child widget with respect to the
--   scrollbars. The default is <a>CornerTopLeft</a>, meaning the child is
--   in the top left, with the scrollbars underneath and to the right.
--   Other values in <a>CornerType</a> are <a>CornerTopRight</a>,
--   <a>CornerBottomLeft</a>, and <a>CornerBottomRight</a>.
scrolledWindowSetPlacement :: ScrolledWindowClass self => self -> CornerType -> IO ()

-- | Gets the placement of the scrollbars for the scrolled window. See
--   <a>scrolledWindowSetPlacement</a>.
scrolledWindowGetPlacement :: ScrolledWindowClass self => self -> IO CornerType

-- | Shadow types
data ShadowType
[ShadowNone] :: ShadowType
[ShadowIn] :: ShadowType
[ShadowOut] :: ShadowType
[ShadowEtchedIn] :: ShadowType
[ShadowEtchedOut] :: ShadowType

-- | Changes the type of shadow drawn around the contents of
--   <tt>scrolledWindow</tt>.
scrolledWindowSetShadowType :: ScrolledWindowClass self => self -> ShadowType -> IO ()

-- | Gets the shadow type of the scrolled window. See
--   <a>scrolledWindowSetShadowType</a>.
scrolledWindowGetShadowType :: ScrolledWindowClass self => self -> IO ShadowType

-- | Sets the <a>Adjustment</a> for the horizontal scrollbar.
scrolledWindowSetHAdjustment :: ScrolledWindowClass self => self -> Adjustment -> IO ()

-- | Sets the <a>Adjustment</a> for the vertical scrollbar.
scrolledWindowSetVAdjustment :: ScrolledWindowClass self => self -> Adjustment -> IO ()

-- | Returns the horizontal scrollbar of <tt>scrolledWindow</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
scrolledWindowGetHScrollbar :: ScrolledWindowClass self => self -> IO (Maybe HScrollbar)

-- | Returns the vertical scrollbar of <tt>scrolledWindow</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
scrolledWindowGetVScrollbar :: ScrolledWindowClass self => self -> IO (Maybe VScrollbar)

-- | The <a>Adjustment</a> for the horizontal position.
scrolledWindowHAdjustment :: ScrolledWindowClass self => Attr self Adjustment

-- | The <a>Adjustment</a> for the vertical position.
scrolledWindowVAdjustment :: ScrolledWindowClass self => Attr self Adjustment

-- | When the horizontal scrollbar is displayed.
--   
--   Default value: <a>PolicyAlways</a>
scrolledWindowHscrollbarPolicy :: ScrolledWindowClass self => Attr self PolicyType

-- | When the vertical scrollbar is displayed.
--   
--   Default value: <a>PolicyAlways</a>
scrolledWindowVscrollbarPolicy :: ScrolledWindowClass self => Attr self PolicyType

-- | Where the contents are located with respect to the scrollbars.
--   
--   Default value: <a>CornerTopLeft</a>
scrolledWindowWindowPlacement :: ScrolledWindowClass self => Attr self CornerType

-- | Style of bevel around the contents.
--   
--   Default value: <a>ShadowNone</a>
scrolledWindowShadowType :: ScrolledWindowClass self => Attr self ShadowType

-- | 'placement' property. See <a>scrolledWindowGetPlacement</a> and
--   <a>scrolledWindowSetPlacement</a>
scrolledWindowPlacement :: ScrolledWindowClass self => Attr self CornerType


-- | A horizontal scrollbar
module Graphics.UI.Gtk.Scrolling.HScrollbar
data HScrollbar
class ScrollbarClass o => HScrollbarClass o
castToHScrollbar :: GObjectClass obj => obj -> HScrollbar
gTypeHScrollbar :: GType
toHScrollbar :: HScrollbarClass o => o -> HScrollbar

-- | Creates a new horizontal scrollbar.
hScrollbarNew :: Adjustment -> IO HScrollbar

-- | Create a new HScrollbar without specifying an existing
--   <a>Adjustment</a>. A new one will be created instead.
hScrollbarNewDefaults :: IO HScrollbar


module Graphics.UI.Gtk.Recent.RecentInfo
data RecentInfo

-- | Helper function for build <a>RecentInfo</a>
mkRecentInfo :: Ptr RecentInfo -> IO RecentInfo

-- | Checks whether the resource pointed by info still exists. At the
--   moment this check is done only on resources pointing to local files.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoExists :: RecentInfo -> IO Bool

-- | Gets the timestamp (seconds from system's Epoch) when the resource was
--   added to the recently used resources list.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetAdded :: RecentInfo -> IO Int

-- | Gets the number of days elapsed since the last update of the resource
--   pointed by info.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetAge :: RecentInfo -> IO Int

-- | Gets the data regarding the application that has registered the
--   resource pointed by info.
--   
--   If the command line contains any escape characters defined inside the
--   storage specification, they will be expanded.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetApplicationInfo :: GlibString string => RecentInfo -> string -> IO (Maybe ([string], Int, Int))

-- | Retrieves the list of applications that have registered this resource.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetApplications :: GlibString string => RecentInfo -> IO [string]

-- | Gets the (short) description of the resource.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetDescription :: GlibString string => RecentInfo -> IO string

-- | Gets the name of the resource. If none has been defined, the basename
--   of the resource is obtained.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetDisplayName :: GlibString string => RecentInfo -> IO string

-- | Returns all groups registered for the recently used item info.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetGroups :: GlibString string => RecentInfo -> IO [string]

-- | Retrieves the icon of size size associated to the resource MIME type.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetIcon :: RecentInfo -> Int -> IO (Maybe Pixbuf)

-- | Gets the MIME type of the resource.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetMimeType :: GlibString string => RecentInfo -> IO string

-- | Gets the timestamp (seconds from system's Epoch) when the resource was
--   last modified.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetModified :: RecentInfo -> IO Int

-- | Gets the value of the "private" flag. Resources in the recently used
--   list that have this flag set to <a>True</a> should only be displayed
--   by the applications that have registered them.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetPrivateHint :: RecentInfo -> IO Bool

-- | Computes a valid UTF-8 string that can be used as the name of the item
--   in a menu or list. For example, calling this function on an item that
--   refers to "file://<i>foo</i>bar.txt" will yield "bar.txt".
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetShortName :: GlibString string => RecentInfo -> IO string

-- | Gets the URI of the resource.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetURI :: GlibString string => RecentInfo -> IO string

-- | Gets a displayable version of the resource's URI. If the resource is
--   local, it returns a local path; if the resource is not local, it
--   returns the UTF-8 encoded content of <tt>recentInfoGetUri</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetURIDisplay :: GlibString string => RecentInfo -> IO string

-- | Gets the timestamp (seconds from system's Epoch) when the resource was
--   last visited.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoGetVisited :: RecentInfo -> IO Int

-- | Checks whether an application registered this resource using
--   <tt>appName</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoHasApplication :: GlibString string => RecentInfo -> string -> IO Bool

-- | Checks whether <tt>groupName</tt> appears inside the groups registered
--   for the recently used item info.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoHasGroup :: GlibString string => RecentInfo -> string -> IO Bool

-- | Checks whether the resource is local or not by looking at the scheme
--   of its URI.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoIsLocal :: RecentInfo -> IO Bool

-- | Gets the name of the last application that have registered the
--   recently used resource represented by info.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoLastApplication :: GlibString string => RecentInfo -> IO string

-- | Checks whether two <a>RecentInfo</a> structures point to the same
--   resource.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentInfoMatch :: RecentInfo -> RecentInfo -> IO Bool


-- | Interface implemented by widgets displaying recently used files
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Recent.RecentChooser
data RecentChooser
class GObjectClass o => RecentChooserClass o
castToRecentChooser :: GObjectClass obj => obj -> RecentChooser
toRecentChooser :: RecentChooserClass o => o -> RecentChooser

-- | These identify the various errors that can occur while calling
--   <a>RecentChooser</a> functions.
data RecentChooserError
[RecentChooserErrorNotFound] :: RecentChooserError
[RecentChooserErrorInvalidUri] :: RecentChooserError

-- | Used to specify the sorting method to be applyed to the recently used
--   resource list.
data RecentSortType
[RecentSortNone] :: RecentSortType
[RecentSortMru] :: RecentSortType
[RecentSortLru] :: RecentSortType
[RecentSortCustom] :: RecentSortType
recentChooserSetSortFunc :: RecentChooserClass self => self -> (Maybe (RecentInfo -> IO Int)) -> IO ()

-- | Sets <tt>uri</tt> as the current URI for <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserSetCurrentURI :: (RecentChooserClass self, GlibString string) => self -> string -> IO Bool

-- | Gets the URI currently selected by <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserGetCurrentURI :: (RecentChooserClass self, GlibString string) => self -> IO string

-- | Gets the <a>RecentInfo</a> currently selected by <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserGetCurrentItem :: RecentChooserClass self => self -> IO RecentInfo

-- | Selects <tt>uri</tt> inside <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserSelectURI :: (RecentChooserClass self, GlibString string) => self -> string -> IO Bool

-- | Unselects <tt>uri</tt> inside <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserUnselectURI :: (RecentChooserClass self, GlibString string) => self -> string -> IO ()

-- | Selects all the items inside <tt>chooser</tt>, if the <tt>chooser</tt>
--   supports multiple selection.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserSelectAll :: RecentChooserClass self => self -> IO ()

-- | Unselects all the items inside <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserUnselectAll :: RecentChooserClass self => self -> IO ()

-- | Gets the list of recently used resources in form of <a>RecentInfo</a>
--   
--   The return value of this function is affected by the "sort-type" and
--   "limit" properties of <tt>chooser</tt>.
recentChooserGetItems :: RecentChooserClass self => self -> IO [RecentInfo]

-- | Gets the URI of the recently used resources.
--   
--   The return value of this function is affected by the "sort-type" and
--   "limit" properties of <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserGetURIs :: (RecentChooserClass self, GlibString string) => self -> IO [string]

-- | Adds <tt>filter</tt> to the list of <a>RecentFilter</a> objects held
--   by <tt>chooser</tt>.
--   
--   If no previous filter objects were defined, this function will call
--   <tt>recentChooserSetFilter</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserAddFilter :: (RecentChooserClass self, RecentFilterClass filter) => self -> filter -> IO ()

-- | Removes <tt>filter</tt> from the list of <a>RecentFilter</a> objects
--   held by <tt>chooser</tt>.
recentChooserRemoveFilter :: (RecentChooserClass self, RecentFilterClass filter) => self -> filter -> IO ()

-- | Gets the <a>RecentFilter</a> objects held by <tt>chooser</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserListFilters :: RecentChooserClass self => self -> IO [RecentFilter]

-- | Whether the private items should be displayed.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserShowPrivate :: RecentChooserClass self => Attr self Bool

-- | Whether this <a>RecentChooser</a> should display a tooltip containing
--   the full path of the recently used resources.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserShowTips :: RecentChooserClass self => Attr self Bool

-- | Whether this <a>RecentChooser</a> should display an icon near the
--   item.
--   
--   Default value: <a>True</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserShowIcons :: RecentChooserClass self => Attr self Bool

-- | Whether this <a>RecentChooser</a> should display the recently used
--   resources even if not present anymore. Setting this to <a>False</a>
--   will perform a potentially expensive check on every local resource
--   (every remote resource will always be displayed).
--   
--   Default value: <a>True</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserShowNotFound :: RecentChooserClass self => Attr self Bool

-- | Allow the user to select multiple resources.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserSelectMultiple :: RecentChooserClass self => Attr self Bool

-- | Whether this <a>RecentChooser</a> should display only local (file:)
--   resources.
--   
--   Default value: <a>True</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserLocalOnly :: RecentChooserClass self => Attr self Bool

-- | The maximum number of recently used resources to be displayed, or -1
--   to display all items. By default, the
--   <tt>Setting</tt>:gtk-recent-files-limit setting is respected: you can
--   override that limit on a particular instance of <a>RecentChooser</a>
--   by setting this property.
--   
--   Allowed values: &gt;= <tt>GMaxulong</tt>
--   
--   Default value: -1
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserLimit :: RecentChooserClass self => Attr self Int

-- | Sorting order to be used when displaying the recently used resources.
--   
--   Default value: '<tt>RecentSortNone'</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserSortType :: RecentChooserClass self => Attr self RecentSortType

-- | The <a>RecentFilter</a> object to be used when displaying the recently
--   used resources.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserFilter :: (RecentChooserClass self, RecentFilterClass recentFilter) => ReadWriteAttr self RecentFilter recentFilter

-- | This signal is emitted when there is a change in the set of selected
--   recently used resources. This can happen when a user modifies the
--   selection with the mouse or the keyboard, or when explicitely calling
--   functions to change the selection.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserSelectionChanged :: RecentChooserClass self => Signal self (IO ())

-- | This signal is emitted when the user "activates" a recent item in the
--   recent chooser. This can happen by double-clicking on an item in the
--   recently used resources list, or by pressing Enter.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserItemActivated :: RecentChooserClass self => Signal self (IO ())
instance Show RecentSortType
instance Eq RecentSortType
instance Bounded RecentSortType
instance Show RecentChooserError
instance Eq RecentChooserError
instance Bounded RecentChooserError
instance Enum RecentChooserError
instance Enum RecentSortType


-- | Managing Recently Used Files
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
--   
--   TODO: GtkRecentData gtk_recent_manager_add_full
module Graphics.UI.Gtk.Recent.RecentManager
data RecentManager
class GObjectClass o => RecentManagerClass o
castToRecentManager :: GObjectClass obj => obj -> RecentManager
toRecentManager :: RecentManagerClass o => o -> RecentManager

-- | Creates a new recent manager object. Recent manager objects are used
--   to handle the list of recently used resources. A <a>RecentManager</a>
--   object monitors the recently used resources list, and emits the
--   "changed" signal each time something inside the list changes.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerNew :: IO RecentManager

-- | Gets a unique instance of <a>RecentManager</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerGetDefault :: IO RecentManager

-- | Adds a new resource, pointed by <tt>uri</tt>, into the recently used
--   resources list.
--   
--   This function automatically retrieves some of the needed metadata and
--   setting other metadata to common default values; it then feeds the
--   data to <tt>recentManagerAddFull</tt>.
--   
--   See <tt>recentManagerAddFull</tt> if you want to explicitly define the
--   metadata for the resource pointed by <tt>uri</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerAddItem :: (RecentManagerClass self, GlibString string) => self -> string -> IO Bool

-- | Removes a resource pointed by <tt>uri</tt> from the recently used
--   resources list handled by a recent manager.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerRemoveItem :: (RecentManagerClass self, GlibString string) => self -> string -> IO Bool

-- | Searches for a URI inside the recently used resources list, and
--   returns a structure containing informations about the resource like
--   its MIME type, or its display name.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerLookupItem :: (RecentManagerClass self, GlibString string) => self -> string -> IO RecentInfo

-- | Checks whether there is a recently used resource registered with
--   <tt>uri</tt> inside the recent manager.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerHasItem :: (RecentManagerClass self, GlibString string) => self -> string -> IO Bool

-- | Changes the location of a recently used resource from <tt>uri</tt> to
--   <tt>newUri</tt>.
--   
--   Please note that this function will not affect the resource pointed by
--   the URIs, but only the URI used in the recently used resources list.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerMoveItem :: (RecentManagerClass self, GlibString string) => self -> string -> string -> IO Bool

-- | Gets the list of recently used resources.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerGetItems :: RecentManagerClass self => self -> IO [RecentInfo]

-- | Purges every item from the recently used resources list.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerPurgeItems :: RecentManagerClass self => self -> IO Int

-- | The full path to the file to be used to store and read the recently
--   used resources list
--   
--   Default value: <a>Nothing</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerFilename :: (RecentManagerClass self, GlibString string) => ReadAttr self string

-- | The maximum number of items to be returned by the
--   <a>recentManagerGetItems</a> function.
--   
--   Allowed values: &gt;= <tt>GMaxulong</tt>
--   
--   Default value: -1
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerLimit :: RecentManagerClass self => Attr self Int

-- | The size of the recently used resources list.
--   
--   Allowed values: &gt;= <tt>GMaxulong</tt>
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerSize :: RecentManagerClass self => ReadAttr self Int

-- | Emitted when the current recently used resources manager changes its
--   contents.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentManagerChanged :: RecentManagerClass self => Signal self (IO ())


-- | A filter for selecting a subset of recently used files
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Recent.RecentFilter
data RecentFilter
class ObjectClass o => RecentFilterClass o
castToRecentFilter :: GObjectClass obj => obj -> RecentFilter
toRecentFilter :: RecentFilterClass o => o -> RecentFilter

-- | These flags indicate what parts of a <tt>RecentFilterInfo</tt> struct
--   are filled or need to be filled.
data RecentFilterFlags
[RecentFilterUri] :: RecentFilterFlags
[RecentFilterDisplayName] :: RecentFilterFlags
[RecentFilterMimeType] :: RecentFilterFlags
[RecentFilterApplication] :: RecentFilterFlags
[RecentFilterGroup] :: RecentFilterFlags
[RecentFilterAge] :: RecentFilterFlags
recentFilterNew :: IO RecentFilter

-- | Gets the human-readable name for the filter. See
--   <a>recentFilterSetName</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentFilterGetName :: (RecentFilterClass self, GlibString string) => self -> IO string

-- | Sets the human-readable name of the filter; this is the string that
--   will be displayed in the recently used resources selector user
--   interface if there is a selectable list of filters.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentFilterSetName :: (RecentFilterClass self, GlibString string) => self -> string -> IO ()

-- | Adds a rule that allows resources based on their registered MIME type.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentFilterAddMimeType :: (RecentFilterClass self, GlibString string) => self -> string -> IO ()

-- | Adds a rule that allows resources based on a pattern matching their
--   display name.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentFilterAddPattern :: (RecentFilterClass self, GlibString string) => self -> string -> IO ()

-- | Adds a rule allowing image files in the formats supported by
--   <a>Pixbuf</a>.
recentFilterAddPixbufFormats :: RecentFilterClass self => self -> IO ()

-- | Adds a rule that allows resources based on the name of the application
--   that has registered them.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentFilterAddApplication :: (RecentFilterClass self, GlibString string) => self -> string -> IO ()

-- | Adds a rule that allows resources based on the name of the group to
--   which they belong
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentFilterAddGroup :: (RecentFilterClass self, GlibString string) => self -> string -> IO ()

-- | Adds a rule that allows resources based on their age - that is, the
--   number of days elapsed since they were last modified.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentFilterAddAge :: RecentFilterClass self => self -> Int -> IO ()
instance Show RecentFilterFlags
instance Eq RecentFilterFlags
instance Bounded RecentFilterFlags
instance Enum RecentFilterFlags


-- | Displays recently used files
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Recent.RecentChooserWidget
data RecentChooserWidget
class VBoxClass o => RecentChooserWidgetClass o
castToRecentChooserWidget :: GObjectClass obj => obj -> RecentChooserWidget
toRecentChooserWidget :: RecentChooserWidgetClass o => o -> RecentChooserWidget

-- | Creates a new <a>RecentChooserWidget</a> object. This is an embeddable
--   widget used to access the recently used resources list.
recentChooserWidgetNew :: IO RecentChooserWidget

-- | Creates a new <a>RecentChooserWidget</a> with a specified recent
--   manager.
--   
--   This is useful if you have implemented your own recent manager, or if
--   you have a customized instance of a <a>RecentManager</a> object.
recentChooserWidgetNewForManager :: RecentManagerClass manager => manager -> IO RecentChooserWidget


-- | Displays recently used files in a menu
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Recent.RecentChooserMenu
data RecentChooserMenu
class MenuClass o => RecentChooserMenuClass o
castToRecentChooserMenu :: GObjectClass obj => obj -> RecentChooserMenu
toRecentChooserMenu :: RecentChooserMenuClass o => o -> RecentChooserMenu

-- | Creates a new <a>RecentChooserMenu</a> widget.
--   
--   This kind of widget shows the list of recently used resources as a
--   menu, each item as a menu item. Each item inside the menu might have
--   an icon, representing its MIME type, and a number, for mnemonic
--   access.
--   
--   This widget implements the <a>RecentChooser</a> interface.
--   
--   This widget creates its own <a>RecentManager</a> object. See the
--   <a>recentChooserMenuNewForManager</a> function to know how to create a
--   <a>RecentChooserMenu</a> widget bound to another <a>RecentManager</a>
--   object.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserMenuNew :: IO RecentChooserMenu

-- | Creates a new <a>RecentChooserMenu</a> widget using <tt>manager</tt>
--   as the underlying recently used resources manager.
--   
--   This is useful if you have implemented your own recent manager, or if
--   you have a customized instance of a <a>RecentManager</a> object or if
--   you wish to share a common <a>RecentManager</a> object among multiple
--   <a>RecentChooser</a> widgets.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserMenuNewForManager :: RecentManagerClass manager => manager -> IO RecentChooserMenu

-- | Whether the first ten items in the menu should be prepended by a
--   number acting as a unique mnemonic.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
recentChooserMenuShowNumbers :: RecentChooserMenuClass self => Attr self Bool


-- | Encapsulates context for drawing pages
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Printing.PrintContext
data PrintContext
class GObjectClass o => PrintContextClass o
castToPrintContext :: GObjectClass obj => obj -> PrintContext
toPrintContext :: PrintContextClass o => o -> PrintContext

-- | Obtains the cairo context that is associated with the
--   <a>PrintContext</a>.
printContextGetCairoContext :: PrintContextClass self => self -> IO Cairo

-- | Sets a new cairo context on a print context.
--   
--   This function is intended to be used when implementing an internal
--   print preview, it is not needed for printing, since Gtk+ itself
--   creates a suitable cairo context in that case.
printContextSetCairoContext :: PrintContextClass self => self -> Cairo -> Double -> Double -> IO ()

-- | Obtains the <a>PageSetup</a> that determines the page dimensions of
--   the <a>PrintContext</a>.
printContextGetPageSetup :: PrintContextClass self => self -> IO PageSetup

-- | Obtains the width of the <a>PrintContext</a>, in pixels.
printContextGetWidth :: PrintContextClass self => self -> IO Double

-- | Obtains the height of the <a>PrintContext</a>, in pixels.
printContextGetHeight :: PrintContextClass self => self -> IO Double

-- | Obtains the horizontal resolution of the <a>PrintContext</a>, in dots
--   per inch.
printContextGetDpiX :: PrintContextClass self => self -> IO Double

-- | Obtains the vertical resolution of the <a>PrintContext</a>, in dots
--   per inch.
printContextGetDpiY :: PrintContextClass self => self -> IO Double

-- | Returns a <a>FontMap</a> that is suitable for use with the
--   <a>PrintContext</a>.
printContextGetPangoFontmap :: PrintContextClass self => self -> IO FontMap

-- | Creates a new <tt>Context</tt> that can be used with the
--   <a>PrintContext</a>.
printContextCreatePangoContext :: PrintContextClass self => self -> IO PangoContext

-- | Creates a new <a>PangoLayout</a> that is suitable for use with the
--   <a>PrintContext</a>.
printContextCreatePangoLayout :: PrintContextClass self => self -> IO PangoLayout
printContextGetHardMargins :: PrintContextClass self => self -> IO (Maybe (Double, Double, Double, Double))


-- | Support for named paper sizes
module Graphics.UI.Gtk.Printing.PaperSize
newtype PaperSize
[PaperSize] :: (ForeignPtr (PaperSize)) -> PaperSize
mkPaperSize :: Ptr PaperSize -> IO PaperSize
data Unit
[UnitPixel] :: Unit
[UnitPoints] :: Unit
[UnitInch] :: Unit
[UnitMm] :: Unit

-- | Creates a new <a>PaperSize</a> object by parsing a PWG 5101.1-2002
--   paper name.
--   
--   If <tt>name</tt> is Nothing, the default paper size is returned, see
--   <a>paperSizeGetDefault</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeNew :: GlibString string => Maybe string -> IO PaperSize

-- | Creates a new <a>PaperSize</a> object by using PPD information.
--   
--   If <tt>ppdName</tt> is not a recognized PPD paper name,
--   <tt>ppdDisplayName</tt>, <tt>width</tt> and <tt>height</tt> are used
--   to construct a custom <a>PaperSize</a> object.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeNewFromPpd :: GlibString string => string -> string -> Double -> Double -> IO PaperSize

-- | Creates a new <a>PaperSize</a> object with the given parameters.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeNewCustom :: GlibString string => string -> string -> Double -> Double -> Unit -> IO PaperSize

-- | Copies an existing <a>PaperSize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeCopy :: PaperSize -> IO PaperSize

-- | Compares two <a>PaperSize</a> objects.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeIsEqual :: PaperSize -> PaperSize -> IO Bool

-- | Gets the name of the <a>PaperSize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetName :: GlibString string => PaperSize -> IO string

-- | Gets the human-readable name of the <a>PaperSize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetDisplayName :: GlibString string => PaperSize -> IO string

-- | Gets the PPD name of the <a>PaperSize</a>, which may be
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetPpdName :: GlibString string => PaperSize -> IO (Maybe string)

-- | Gets the paper width of the <a>PaperSize</a>, in units of
--   <tt>unit</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetWidth :: PaperSize -> Unit -> IO Double

-- | Gets the paper height of the <a>PaperSize</a>, in units of
--   <tt>unit</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetHeight :: PaperSize -> Unit -> IO Double

-- | Returns <tt>True</tt> if <tt>size</tt> is not a standard paper size.
paperSizeIsCustom :: PaperSize -> IO Bool

-- | Changes the dimensions of a <tt>size</tt> to <tt>width</tt> x
--   <tt>height</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeSetSize :: PaperSize -> Double -> Double -> Unit -> IO ()

-- | Gets the default top margin for the <a>PaperSize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetDefaultTopMargin :: PaperSize -> Unit -> IO Double

-- | Gets the default bottom margin for the <a>PaperSize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetDefaultBottomMargin :: PaperSize -> Unit -> IO Double

-- | Gets the default left margin for the <a>PaperSize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetDefaultLeftMargin :: PaperSize -> Unit -> IO Double

-- | Gets the default right margin for the <a>PaperSize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetDefaultRightMargin :: PaperSize -> Unit -> IO Double

-- | Returns the name of the default paper size, which depends on the
--   current locale.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
paperSizeGetDefault :: GlibString string => IO string

-- | Creates a list of known paper sizes.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
paperSizeGetPaperSizes :: Bool -> IO [PaperSize]
instance Show Unit
instance Eq Unit
instance Bounded Unit
instance Enum Unit


-- | High-level Printing API
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Printing.PrintOperation
data PrintOperation
class GObjectClass o => PrintOperationClass o
castToPrintOperation :: GObjectClass obj => obj -> PrintOperation
toPrintOperation :: PrintOperationClass o => o -> PrintOperation
data PrintOperationPreview
class GObjectClass o => PrintOperationPreviewClass o
castToPrintOperationPreview :: GObjectClass obj => obj -> PrintOperationPreview
toPrintOperationPreview :: PrintOperationPreviewClass o => o -> PrintOperationPreview

-- | The status gives a rough indication of the completion of a running
--   print operation.
data PrintStatus
[PrintStatusInitial] :: PrintStatus
[PrintStatusPreparing] :: PrintStatus
[PrintStatusGeneratingData] :: PrintStatus
[PrintStatusSendingData] :: PrintStatus
[PrintStatusPending] :: PrintStatus
[PrintStatusPendingIssue] :: PrintStatus
[PrintStatusPrinting] :: PrintStatus
[PrintStatusFinished] :: PrintStatus
[PrintStatusFinishedAborted] :: PrintStatus

-- | The action parameter to <a>printOperationRun</a> determines what
--   action the print operation should perform.
data PrintOperationAction
[PrintOperationActionPrintDialog] :: PrintOperationAction
[PrintOperationActionPrint] :: PrintOperationAction
[PrintOperationActionPreview] :: PrintOperationAction
[PrintOperationActionExport] :: PrintOperationAction

-- | A value of this type is returned by <a>printOperationRun</a>.
data PrintOperationResult
[PrintOperationResultError] :: PrintOperationResult
[PrintOperationResultApply] :: PrintOperationResult
[PrintOperationResultCancel] :: PrintOperationResult
[PrintOperationResultInProgress] :: PrintOperationResult

-- | Error codes that identify various errors that can occur while using
--   the GTK+ printing support.
data PrintError
[PrintErrorGeneral] :: PrintError
[PrintErrorInternalError] :: PrintError
[PrintErrorNomem] :: PrintError
[PrintErrorInvalidFile] :: PrintError

-- | Creates a new <a>PrintOperation</a>.
printOperationNew :: IO PrintOperation

-- | Sets whether the <a>printOperationRun</a> may return before the print
--   operation is completed. Note that some platforms may not allow
--   asynchronous operation.
printOperationSetAllowAsync :: PrintOperationClass self => self -> Bool -> IO ()

-- | Call this when the result of a print operation is
--   <a>PrintOperationResultError</a>, either as returned by
--   <a>printOperationRun</a>, or in the <tt>done</tt> signal handler. The
--   returned <a>GError</a> will contain more details on what went wrong.
printOperationGetError :: PrintOperationClass self => self -> IO ()

-- | Sets the name of the print job. The name is used to identify the job
--   (e.g. in monitoring applications like eggcups).
--   
--   If you don't set a job name, Gtk+ picks a default one by numbering
--   successive print jobs.
printOperationSetJobName :: (PrintOperationClass self, GlibString string) => self -> string -> IO ()

-- | Sets the number of pages in the document.
--   
--   This <i>must</i> be set to a positive number before the rendering
--   starts. It may be set in a <tt>beginPrint</tt> signal hander.
--   
--   Note that the page numbers passed to the <tt>requestPageSetup</tt> and
--   <tt>drawPage</tt> signals are 0-based, i.e. if the user chooses to
--   print all pages, the last 'draw-page' signal will be for page
--   <tt>nPages</tt> - 1.
printOperationSetNPages :: PrintOperationClass self => self -> Int -> IO ()

-- | Returns the number of pages that will be printed.
--   
--   Note that this value is set during print preparation phase
--   (<a>PrintStatusPreparing</a>), so this function should never be called
--   before the data generation phase (<a>PrintStatusGeneratingData</a>).
--   You can connect to the <tt>statusChanged</tt> signal and call
--   <a>printOperationGetNPagesToPrint</a> when print status is
--   <a>PrintStatusGeneratingData</a>. This is typically used to track the
--   progress of print operation.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
printOperationGetNPagesToPrint :: PrintOperationClass self => self -> IO Int

-- | Sets the current page.
--   
--   If this is called before <a>printOperationRun</a>, the user will be
--   able to select to print only the current page.
--   
--   Note that this only makes sense for pre-paginated documents.
printOperationSetCurrentPage :: PrintOperationClass self => self -> Int -> IO ()

-- | If <tt>fullPage</tt> is <tt>True</tt>, the transformation for the
--   cairo context obtained from <a>PrintContext</a> puts the origin at the
--   top left corner of the page (which may not be the top left corner of
--   the sheet, depending on page orientation and the number of pages per
--   sheet). Otherwise, the origin is at the top left corner of the
--   imageable area (i.e. inside the margins).
printOperationSetUseFullPage :: PrintOperationClass self => self -> Bool -> IO ()

-- | Sets up the transformation for the cairo context obtained from
--   <a>PrintContext</a> in such a way that distances are measured in units
--   of <tt>unit</tt>.
printOperationSetUnit :: PrintOperationClass self => self -> Unit -> IO ()

-- | Sets up the <a>PrintOperation</a> to generate a file instead of
--   showing the print dialog. The indended use of this function is for
--   implementing "Export to PDF" actions. Currently, PDF is the only
--   supported format.
--   
--   "Print to PDF" support is independent of this and is done by letting
--   the user pick the "Print to PDF" item from the list of printers in the
--   print dialog.
printOperationSetExportFilename :: (PrintOperationClass self, GlibString string) => self -> string -> IO ()

-- | If <tt>showProgress</tt> is <tt>True</tt>, the print operation will
--   show a progress dialog during the print operation.
printOperationSetShowProgress :: PrintOperationClass self => self -> Bool -> IO ()

-- | If track_status is <tt>True</tt>, the print operation will try to
--   continue report on the status of the print job in the printer queues
--   and printer. This can allow your application to show things like "out
--   of paper" issues, and when the print job actually reaches the printer.
--   
--   This function is often implemented using some form of polling, so it
--   should not be enabled unless needed.
printOperationSetTrackPrintStatus :: PrintOperationClass self => self -> Bool -> IO ()

-- | Sets the label for the tab holding custom widgets.
printOperationSetCustomTabLabel :: (PrintOperationClass self, GlibString string) => self -> string -> IO ()

-- | Runs the print operation, by first letting the user modify print
--   settings in the print dialog, and then print the document.
--   
--   Normally that this function does not return until the rendering of all
--   pages is complete. You can connect to the <tt>statusChanged</tt>
--   signal on <tt>op</tt> to obtain some information about the progress of
--   the print operation. Furthermore, it may use a recursive mainloop to
--   show the print dialog.
--   
--   If you call <a>printOperationSetAllowAsync</a> or set the
--   <tt>allowAsync</tt> property the operation will run asynchronously if
--   this is supported on the platform. The <tt>done</tt> signal will be
--   emitted with the result of the operation when the it is done (i.e.
--   when the dialog is canceled, or when the print succeeds or fails).
printOperationRun :: (PrintOperationClass self, WindowClass parent) => self -> PrintOperationAction -> parent -> IO PrintOperationResult

-- | Cancels a running print operation. This function may be called from a
--   <tt>beginPrint</tt>, <tt>paginate</tt> or <tt>drawPage</tt> signal
--   handler to stop the currently running print operation.
printOperationCancel :: PrintOperationClass self => self -> IO ()

-- | Signalize that drawing of particular page is complete.
--   
--   It is called after completion of page drawing (e.g. drawing in another
--   thread). If <a>printOperationSetDeferDrawing</a> was called before,
--   then this function has to be called by application. In another case it
--   is called by the library itself.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.16</li>
--   </ul>
printOperationDrawPageFinish :: PrintOperationClass self => self -> IO ()

-- | Sets up the <a>PrintOperation</a> to wait for calling of
--   <a>printOperationDrawPageFinish</a> from application. It can be used
--   for drawing page in another thread.
--   
--   This function must be called in the callback of "draw-page" signal.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.16</li>
--   </ul>
printOperationSetDeferDrawing :: PrintOperationClass self => self -> IO ()

-- | Returns the status of the print operation. Also see
--   <a>printOperationGetStatusString</a>.
printOperationGetStatus :: PrintOperationClass self => self -> IO PrintStatus

-- | Returns a string representation of the status of the print operation.
--   The string is translated and suitable for displaying the print status
--   e.g. in a <a>Statusbar</a>.
--   
--   Use <a>printOperationGetStatus</a> to obtain a status value that is
--   suitable for programmatic use.
printOperationGetStatusString :: (PrintOperationClass self, GlibString string) => self -> IO string

-- | A convenience function to find out if the print operation is finished,
--   either successfully (<a>PrintStatusFinished</a>) or unsuccessfully
--   (<a>PrintStatusFinishedAborted</a>).
--   
--   Note: when you enable print status tracking the print operation can be
--   in a non-finished state even after done has been called, as the
--   operation status then tracks the print job status on the printer.
printOperationIsFinished :: PrintOperationClass self => self -> IO Bool

-- | Runs a page setup dialog, letting the user modify the values from
--   <tt>pageSetup</tt>. If the user cancels the dialog, the returned
--   <a>PageSetup</a> is identical to the passed in <tt>pageSetup</tt>,
--   otherwise it contains the modifications done in the dialog.
--   
--   Note that this function may use a recursive mainloop to show the page
--   setup dialog. See <a>printRunPageSetupDialogAsync</a> if this is a
--   problem.
printRunPageSetupDialog :: (WindowClass window, PageSetupClass pageSetup, PrintSettingsClass setting) => window -> pageSetup -> setting -> IO PageSetup

-- | Runs a page setup dialog, letting the user modify the values from
--   <tt>pageSetup</tt>.
--   
--   In contrast to <a>printRunPageSetupDialog</a>, this function returns
--   after showing the page setup dialog on platforms that support this,
--   and calls <tt>doneCb</tt> from a signal handler for the
--   <tt>response</tt> signal of the dialog.
printRunPageSetupDialogAsync :: (WindowClass window, PageSetupClass pageSetup, PrintSettingsClass setting) => window -> pageSetup -> setting -> (PageSetup -> IO ()) -> IO ()

-- | Ends a preview.
--   
--   This function must be called to finish a custom print preview.
printOperationPreviewEndPreview :: PrintOperationPreviewClass self => self -> IO ()

-- | Returns whether the given page is included in the set of pages that
--   have been selected for printing.
printOperationPreviewIsSelected :: PrintOperationPreviewClass self => self -> Int -> IO Bool

-- | Renders a page to the preview, using the print context that was passed
--   to the "preview" handler together with preview.
--   
--   A custom iprint preview should use this function in its
--   <tt>expose</tt> handler to render the currently selected page.
--   
--   Note that this function requires a suitable cairo context to be
--   associated with the print context.
printOperationPreviewRenderPage :: PrintOperationPreviewClass self => self -> Int -> IO ()

-- | The <a>PageSetup</a> used by default.
--   
--   This page setup will be used by <a>printOperationRun</a>, but it can
--   be overridden on a per-page basis by connecting to the
--   <tt>requestPageSetup</tt> signal.
--   
--   Since 2.10
printOperationDefaultPageSetup :: (PrintOperationClass self, PageSetupClass pageSetup) => ReadWriteAttr self PageSetup pageSetup

-- | The <a>PrintSettings</a> used for initializing the dialog.
--   
--   Setting this property is typically used to re-establish print settings
--   from a previous print operation, see <a>printOperationRun</a>.
--   
--   Since 2.10
printOperationPrintSettings :: (PrintOperationClass self, PrintSettingsClass printSettings) => ReadWriteAttr self PrintSettings printSettings

-- | A string used to identify the job (e.g. in monitoring applications
--   like eggcups).
--   
--   If you don't set a job name, GTK+ picks a default one by numbering
--   successive print jobs.
--   
--   Default value: ""
--   
--   Since 2.10
printOperationJobName :: (PrintOperationClass self, GlibString string) => Attr self string

-- | The number of pages in the document.
--   
--   This must be set to a positive number before the rendering starts. It
--   may be set in a <tt>beginPrint</tt> signal hander.
--   
--   Note that the page numbers passed to the <tt>requestPageSetup</tt> and
--   <tt>drawPage</tt> signals are 0-based, i.e. if the user chooses to
--   print all pages, the last <tt>drawPage</tt> signal will be for page
--   <tt>nPages</tt> - 1.
--   
--   Allowed values: &gt;= <tt>GMaxulong</tt>
--   
--   Default value: -1
--   
--   Since 2.10
printOperationNPages :: PrintOperationClass self => Attr self Int

-- | The current page in the document.
--   
--   If this is set before <a>printOperationRun</a>, the user will be able
--   to select to print only the current page.
--   
--   Note that this only makes sense for pre-paginated documents.
--   
--   Allowed values: &gt;= <tt>GMaxulong</tt>
--   
--   Default value: -1
--   
--   Since 2.10
printOperationCurrentPage :: PrintOperationClass self => Attr self Int

-- | If <a>True</a>, the transformation for the cairo context obtained from
--   <a>PrintContext</a> puts the origin at the top left corner of the page
--   (which may not be the top left corner of the sheet, depending on page
--   orientation and the number of pages per sheet). Otherwise, the origin
--   is at the top left corner of the imageable area (i.e. inside the
--   margins).
--   
--   Default value: <a>False</a>
--   
--   Since 2.10
printOperationUseFullPage :: PrintOperationClass self => Attr self Bool

-- | If <a>True</a>, the print operation will try to continue report on the
--   status of the print job in the printer queues and printer. This can
--   allow your application to show things like "out of paper" issues, and
--   when the print job actually reaches the printer. However, this is
--   often implemented using polling, and should not be enabled unless
--   needed.
--   
--   Default value: <a>False</a>
--   
--   Since 2.10
printOperationTrackPrintStatus :: PrintOperationClass self => Attr self Bool

-- | The transformation for the cairo context obtained from
--   <a>PrintContext</a> is set up in such a way that distances are
--   measured in units of unit.
--   
--   Default value: '<tt>UnitPixel'</tt>
--   
--   Since 2.10
printOperationUnit :: PrintOperationClass self => Attr self Unit

-- | Determines whether to show a progress dialog during the print
--   operation.
--   
--   Default value: <a>False</a>
--   
--   Since 2.10
printOperationShowProgress :: PrintOperationClass self => Attr self Bool

-- | Determines whether the print operation may run asynchronously or not.
--   
--   Some systems don't support asynchronous printing, but those that do
--   will return '<tt>PrintOperationResultInProgress'</tt> as the status,
--   and emit the "done" signal when the operation is actually done.
--   
--   The Windows port does not support asynchronous operation at all (this
--   is unlikely to change). On other platforms, all actions except for
--   '<tt>PrintOperationActionExport'</tt> support asynchronous operation.
--   
--   Default value: <a>False</a>
--   
--   Since 2.10
printOperationAllowAsync :: PrintOperationClass self => Attr self Bool

-- | The name of a file to generate instead of showing the print dialog.
--   Currently, PDF is the only supported format.
--   
--   The intended use of this property is for implementing "Export to PDF"
--   actions.
--   
--   "Print to PDF" support is independent of this and is done by letting
--   the user pick the "Print to PDF" item from the list of printers in the
--   print dialog.
--   
--   Default value: <a>Nothing</a>
--   
--   Since 2.10
printOperationExportFilename :: (PrintOperationClass self, GlibString string) => Attr self string

-- | The status of the print operation.
--   
--   Default value: '<tt>PrintStatusInitial'</tt>
--   
--   Since 2.10
printOperationStatus :: PrintOperationClass self => ReadAttr self PrintStatus

-- | A string representation of the status of the print operation. The
--   string is translated and suitable for displaying the print status e.g.
--   in a <a>Statusbar</a>.
--   
--   See the <a>printOperationStatus</a> property for a status value that
--   is suitable for programmatic use.
--   
--   Default value: ""
--   
--   Since 2.10
printOperationStatusString :: (PrintOperationClass self, GlibString string) => ReadAttr self string

-- | Used as the label of the tab containing custom widgets. Note that this
--   property may be ignored on some platforms.
--   
--   If this is <a>Nothing</a>, GTK+ uses a default label.
--   
--   Default value: <a>Nothing</a>
--   
--   Since 2.10
printOperationCustomTabLabel :: (PrintOperationClass self, GlibString string) => Attr self string

-- | If <a>True</a>, the print operation will support print of selection.
--   This allows the print dialog to show a <a>Selection</a> button.
--   
--   Default value: <a>False</a>
--   
--   Since 2.18
printOperationSupportSelection :: PrintOperationClass self => Attr self Bool

-- | Determines whether there is a selection in your application. This can
--   allow your application to print the selection. This is typically used
--   to make a <a>Selection</a> button sensitive.
--   
--   Default value: <a>False</a>
--   
--   Since 2.18
printOperationHasSelection :: PrintOperationClass self => Attr self Bool

-- | If <a>True</a>, page size combo box and orientation combo box are
--   embedded into page setup page.
--   
--   Default value: <a>False</a>
--   
--   Since 2.18
printOperationEmbedPageSetup :: PrintOperationClass self => Attr self Bool

-- | The number of pages that will be printed.
--   
--   Note that this value is set during print preparation phase
--   ('<tt>PrintStatusPreparing'</tt>), so this value should never be get
--   before the data generation phase
--   ('<tt>PrintStatusGeneratingData'</tt>). You can connect to the
--   <tt>statusChanged</tt> signal and call
--   <a>printOperationGetNPagesToPrint</a> when print status is
--   '<tt>PrintStatusGeneratingData'</tt>. This is typically used to track
--   the progress of print operation.
--   
--   Allowed values: &gt;= <tt>GMaxulong</tt>
--   
--   Default value: -1
--   
--   Since 2.18
printOperationNPagesToPrint :: PrintOperationClass self => ReadAttr self Int

-- | Emitted when the print operation run has finished doing everything
--   required for printing.
--   
--   <tt>result</tt> gives you information about what happened during the
--   run. If <tt>result</tt> is <a>PrintOperationResultError</a> then you
--   can call <a>printOperationGetError</a> for more information.
--   
--   If you enabled print status tracking then
--   <a>printOperationIsFinished</a> may still return <tt>False</tt> after
--   <tt>done</tt> was emitted.
printOptDone :: PrintOperationClass self => Signal self (PrintOperationResult -> IO ())

-- | Emitted after the user has finished changing print settings in the
--   dialog, before the actual rendering starts.
--   
--   A typical use for 'begin-print' is to use the parameters from the
--   <a>PrintContext</a> and paginate the document accordingly, and then
--   set the number of pages with <a>printOperationSetNPages</a>.
printOptBeginPrint :: PrintOperationClass self => Signal self (PrintContext -> IO ())

-- | Emitted after the <tt>beginPrint</tt> signal, but before the actual
--   rendering starts. It keeps getting emitted until a connected signal
--   handler returns <tt>True</tt>.
--   
--   The <tt>paginate</tt> signal is intended to be used for paginating a
--   document in small chunks, to avoid blocking the user interface for a
--   long time. The signal handler should update the number of pages using
--   <a>printOperationSetNPages</a>, and return <tt>True</tt> if the
--   document has been completely paginated.
--   
--   If you don't need to do pagination in chunks, you can simply do it all
--   in the 'begin-print handler', and set the number of pages from there.
printOptPaginate :: PrintOperationClass self => Signal self (PrintContext -> IO Bool)

-- | Emitted once for every page that is printed, to give the application a
--   chance to modify the page setup. Any changes done to <tt>setup</tt>
--   will be in force only for printing this page.
printOptRequestPageSetup :: PrintOperationClass self => Signal self (PrintContext -> Int -> PageSetup -> IO ())

-- | Emitted for every page that is printed. The signal handler must render
--   the <tt>pageNr</tt>'s page onto the cairo context obtained from
--   <tt>context</tt> using <tt>printContextGetCairoContext</tt>.
--   
--   Use <a>printOperationSetUseFullPage</a> and
--   <a>printOperationSetUnit</a> before starting the print operation to
--   set up the transformation of the cairo context according to your
--   needs.
printOptDrawPage :: PrintOperationClass self => Signal self (PrintContext -> Int -> IO ())

-- | Emitted after all pages have been rendered. A handler for this signal
--   can clean up any resources that have been allocated in the
--   <tt>beginPrint</tt> handler.
printOptEndPrint :: PrintOperationClass self => Signal self (PrintContext -> IO ())

-- | Emitted at between the various phases of the print operation. See
--   <a>PrintStatus</a> for the phases that are being discriminated. Use
--   <a>printOperationGetStatus</a> to find out the current status.
printOptStatusChanged :: PrintOperationClass self => Signal self (IO ())

-- | Emitted when displaying the print dialog. If you return a widget in a
--   handler for this signal it will be added to a custom tab in the print
--   dialog. You typically return a container widget with multiple widgets
--   in it.
--   
--   The print dialog owns the returned widget, and its lifetime is not
--   controlled by the application. However, the widget is guaranteed to
--   stay around until the <tt>customWidgetApply</tt> signal is emitted on
--   the operation. Then you can read out any information you need from the
--   widgets.
printOptCreateCustomWidget :: PrintOperationClass self => Signal self (IO Widget)

-- | Emitted after change of selected printer. The actual page setup and
--   print settings are passed to the custom widget, which can actualize
--   itself according to this change.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
printOptUpdateCustomWidget :: PrintOperationClass self => Signal self (Widget -> PageSetup -> PrintSettings -> IO ())

-- | Emitted right before <tt>beginPrint</tt> if you added a custom widget
--   in the <tt>createCustomWidtet</tt> handler. When you get this signal
--   you should read the information from the custom widgets, as the
--   widgets are not guaraneed to be around at a later time.
printOptCustomWidgetApply :: PrintOperationClass self => Signal self (Widget -> IO ())

-- | Gets emitted when a preview is requested from the native dialog.
--   
--   The default handler for this signal uses an external viewer
--   application to preview.
--   
--   To implement a custom print preview, an application must return
--   <tt>True</tt> from its handler for this signal. In order to use the
--   provided <tt>context</tt> for the preview implementation, it must be
--   given a suitable cairo context with
--   <tt>printContextSetCairoContext</tt>.
--   
--   The custom preview implementation can use
--   <a>printOperationPreviewIsSelected</a> and
--   <a>printOperationPreviewRenderPage</a> to find pages which are
--   selected for print and render them. The preview must be finished by
--   calling <a>printOperationPreviewEndPreview</a> (typically in response
--   to the user clicking a close button).
printOptPreview :: PrintOperationClass self => Signal self (PrintOperationPreview -> PrintContext -> Window -> IO Bool)

-- | The <tt>ready</tt> signal gets emitted once per preview operation,
--   before the first page is rendered.
--   
--   A handler for this signal can be used for setup tasks.
printOptReady :: PrintOperationPreviewClass self => Signal self (PrintContext -> IO ())

-- | The <tt>gotPageSize</tt> signal is emitted once for each page that
--   gets rendered to the preview.
--   
--   A handler for this signal should update the context according to
--   <tt>pageSetup</tt> and set up a suitable cairo context, using
--   <tt>printContextSetCairoContext</tt>.
printOptGotPageSize :: PrintOperationPreviewClass self => Signal self (PrintContext -> PageSetup -> IO ())
instance Show PrintError
instance Eq PrintError
instance Bounded PrintError
instance Enum PrintError
instance Show PrintOperationResult
instance Eq PrintOperationResult
instance Bounded PrintOperationResult
instance Enum PrintOperationResult
instance Show PrintOperationAction
instance Eq PrintOperationAction
instance Bounded PrintOperationAction
instance Enum PrintOperationAction
instance Show PrintStatus
instance Eq PrintStatus
instance Bounded PrintStatus
instance Enum PrintStatus
instance PrintOperationPreviewClass PrintOperation


-- | Stores print settings
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Printing.PrintSettings
data PrintSettings
class GObjectClass o => PrintSettingsClass o
castToPrintSettings :: GObjectClass obj => obj -> PrintSettings
toPrintSettings :: PrintSettingsClass o => o -> PrintSettings
data PageOrientation
[PageOrientationPortrait] :: PageOrientation
[PageOrientationLandscape] :: PageOrientation
[PageOrientationReversePortrait] :: PageOrientation
[PageOrientationReverseLandscape] :: PageOrientation

-- | Used to determine the layout of pages on a sheet when printing
--   multiple pages per sheet.
data NumberUpLayout
[NumberUpLayoutLeftToRightTopToBottom] :: NumberUpLayout
[NumberUpLayoutLeftToRightBottomToTop] :: NumberUpLayout
[NumberUpLayoutRightToLeftTopToBottom] :: NumberUpLayout
[NumberUpLayoutRightToLeftBottomToTop] :: NumberUpLayout
[NumberUpLayoutTopToBottomLeftToRight] :: NumberUpLayout
[NumberUpLayoutTopToBottomRightToLeft] :: NumberUpLayout
[NumberUpLayoutBottomToTopLeftToRight] :: NumberUpLayout
[NumberUpLayoutBottomToTopRightToLeft] :: NumberUpLayout
data PrintQuality
[PrintQualityLow] :: PrintQuality
[PrintQualityNormal] :: PrintQuality
[PrintQualityHigh] :: PrintQuality
[PrintQualityDraft] :: PrintQuality
data PrintDuplex
[PrintDuplexSimplex] :: PrintDuplex
[PrintDuplexHorizontal] :: PrintDuplex
[PrintDuplexVertical] :: PrintDuplex
data PrintPages
[PrintPagesAll] :: PrintPages
[PrintPagesCurrent] :: PrintPages
[PrintPagesRanges] :: PrintPages
[PrintPagesSelection] :: PrintPages
data PageSet
[PageSetAll] :: PageSet
[PageSetEven] :: PageSet
[PageSetOdd] :: PageSet

-- | Creates a new <a>PrintSettings</a> object.
printSettingsNew :: IO PrintSettings

-- | Reads the print settings from <tt>fileName</tt>. Returns a new
--   <a>PrintSettings</a> object with the restored settings.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
printSettingsNewFromFile :: GlibFilePath fp => fp -> IO PrintSettings

-- | Copies a <a>PrintSettings</a> object.
printSettingsCopy :: PrintSettingsClass self => self -> IO PrintSettings

-- | Returns <tt>True</tt>, if a value is associated with <tt>key</tt>.
printSettingsHasKey :: (PrintSettingsClass self, GlibString string) => self -> string -> IO Bool

-- | Looks up the string value associated with <tt>key</tt>.
printSettingsGet :: (PrintSettingsClass self, GlibString string) => self -> string -> IO string

-- | Associates <tt>value</tt> with <tt>key</tt>.
printSettingsSet :: (PrintSettingsClass self, GlibString string) => self -> string -> string -> IO ()

-- | Removes any value associated with <tt>key</tt>
printSettingsUnset :: (PrintSettingsClass self, GlibString string) => self -> string -> IO ()

-- | Calls <tt>func</tt> for each key-value pair of <tt>settings</tt>.
printSettingsForeach :: PrintSettingsClass self => self -> (String -> IO ()) -> IO ()

-- | Returns the boolean represented by the value that is associated with
--   <tt>key</tt>.
--   
--   The string "true" represents <tt>True</tt>, any other string
--   <tt>False</tt>.
printSettingsGetBool :: (PrintSettingsClass self, GlibString string) => self -> string -> IO Bool

-- | Sets <tt>key</tt> to a boolean value.
printSettingsSetBool :: (PrintSettingsClass self, GlibString string) => self -> string -> Bool -> IO ()

-- | Returns the double value associated with <tt>key</tt>, or 0.
printSettingsGetDouble :: (PrintSettingsClass self, GlibString string) => self -> string -> IO Double

-- | Returns the floating point number represented by the value that is
--   associated with <tt>key</tt>, or <tt>defaultVal</tt> if the value does
--   not represent a floating point number.
--   
--   Floating point numbers are parsed with <tt>gAsciiStrtod</tt>.
printSettingsGetDoubleWithDefault :: (PrintSettingsClass self, GlibString string) => self -> string -> Double -> IO Double

-- | Sets <tt>key</tt> to a double value.
printSettingsSetDouble :: (PrintSettingsClass self, GlibString string) => self -> string -> Double -> IO ()

-- | Returns the value associated with <tt>key</tt>, interpreted as a
--   length. The returned value is converted to <tt>units</tt>.
printSettingsGetLength :: (PrintSettingsClass self, GlibString string) => self -> string -> Unit -> IO Double

-- | Associates a length in units of <tt>unit</tt> with <tt>key</tt>.
printSettingsSetLength :: (PrintSettingsClass self, GlibString string) => self -> string -> Double -> Unit -> IO ()

-- | Returns the integer value of <tt>key</tt>, or 0.
printSettingsGetInt :: (PrintSettingsClass self, GlibString string) => self -> string -> IO Int

-- | Returns the value of <tt>key</tt>, interpreted as an integer, or the
--   default value.
printSettingsGetIntWithDefault :: (PrintSettingsClass self, GlibString string) => self -> string -> Int -> IO Int

-- | Sets <tt>key</tt> to an integer value.
printSettingsSetInt :: (PrintSettingsClass self, GlibString string) => self -> string -> Int -> IO ()

-- | Gets the value of <tt>PrintSettingsPaperWidth</tt>, converted to unit.
printSettingsGetPaperWidth :: PrintSettingsClass self => self -> Unit -> IO Double

-- | Sets the value of <tt>PrintSettingsPaperWidth</tt>.
printSettingsSetPaperWidth :: PrintSettingsClass self => self -> Double -> Unit -> IO ()

-- | Gets the value of <tt>PrintSettingsPaperHeight</tt>, converted to
--   unit.
printSettingsGetPaperHeight :: PrintSettingsClass self => self -> Unit -> IO Double

-- | Sets the value of <tt>PrintSettingsPaperHeight</tt>.
printSettingsSetPaperHeight :: PrintSettingsClass self => self -> Double -> Unit -> IO ()

-- | Sets the values of <tt>PrintSettingsResolution</tt>,
--   <tt>PrintSettingsResolutionX</tt> and
--   <tt>PrintSettingsResolutionY</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.16</li>
--   </ul>
printSettingsSetResolutionXy :: PrintSettingsClass self => self -> Int -> Int -> IO ()

-- | Gets the value of <tt>"resolution-x"</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.16</li>
--   </ul>
printSettingsGetResolutionX :: PrintSettingsClass self => self -> IO Int

-- | Gets the value of <tt>"resolution-y"</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.16</li>
--   </ul>
printSettingsGetResolutionY :: PrintSettingsClass self => self -> IO Int

-- | Reads the print settings from <tt>fileName</tt>. See
--   <a>printSettingsToFile</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
printSettingsLoadFile :: (PrintSettingsClass self, GlibString string) => self -> string -> IO Bool

-- | This function saves the print settings from <tt>settings</tt> to
--   <tt>fileName</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
printSettingsToFile :: (PrintSettingsClass self, GlibString string) => self -> string -> IO Bool

-- | Obtain the value of <tt>PrintSettingsPrinter</tt>.
printSettingsPrinter :: (PrintSettingsClass self, GlibString string) => Attr self string

-- | The value of '<tt>PrintSettingsOrientation'</tt>, converted to a
--   <a>PageOrientation</a>.
printSettingsOrientation :: PrintSettingsClass self => Attr self PageOrientation

-- | The value of <tt>PrintSettingsPaperFormat</tt>, converted to a
--   <a>PaperSize</a>.
printSettingsPaperSize :: PrintSettingsClass self => Attr self PaperSize

-- | The value of '<tt>PrintSettingsUseColor'</tt>.
printSettingsUseColor :: PrintSettingsClass self => Attr self Bool

-- | The value of '<tt>PrintSettingsCollate'</tt>.
printSettingsCollate :: PrintSettingsClass self => Attr self Bool

-- | The value of '<tt>PrintSettingsReverse'</tt>.
printSettingsReverse :: PrintSettingsClass self => Attr self Bool

-- | The value of '<tt>PrintSettingsDuplex'</tt>.
printSettingsDuplex :: PrintSettingsClass self => Attr self PrintDuplex

-- | The value of '<tt>PrintSettingsQuality'</tt>.
printSettingsQuality :: PrintSettingsClass self => Attr self PrintQuality

-- | The value of <tt>PrintSettingsNCopies</tt>.
printSettingsNCopies :: PrintSettingsClass self => Attr self Int

-- | The value of <tt>PrintSettingsNumberUp</tt>.
printSettingsNumberUp :: PrintSettingsClass self => Attr self Int

-- | The value of <tt>PrintSettingsResolution</tt>.
printSettingsResolution :: PrintSettingsClass self => Attr self Int

-- | The value of <tt>PrintSettingsScale</tt>.
printSettingsScale :: PrintSettingsClass self => Attr self Double

-- | The value of <tt>PrintSettingsPrintPages</tt>.
printSettingsPrintPages :: PrintSettingsClass self => Attr self PrintPages

-- | The value of <tt>PrintSettingsPageSet</tt>.
printSettingsPageSet :: PrintSettingsClass self => Attr self PageSet

-- | The value of <tt>PrintSettingsDefaultSource</tt>.
printSettingsDefaultSource :: (PrintSettingsClass self, GlibString string) => Attr self string

-- | The value of <tt>PrintSettingsMediaType</tt>.
printSettingsMediaType :: (PrintSettingsClass self, GlibString string) => Attr self string

-- | The value of <tt>PrintSettingsDither</tt>.
printSettingsDither :: (PrintSettingsClass self, GlibString string) => Attr self string

-- | The value of <tt>PrintSettingsFinishings</tt>.
printSettingsFinishings :: (PrintSettingsClass self, GlibString string) => Attr self string

-- | The value of <tt>PrintSettingsOutputBin</tt>.
printSettingsOutputBin :: (PrintSettingsClass self, GlibString string) => Attr self string

-- | The value of <tt>PrintSettingsNumberUpLayout</tt>.
printSettingsNumberUpLayout :: PrintSettingsClass self => Attr self NumberUpLayout

-- | The value of <tt>PrintSettingsPrinterLpi</tt>.
printSettingsPrinterLpi :: PrintSettingsClass self => Attr self Double
instance Show NumberUpLayout
instance Eq NumberUpLayout
instance Bounded NumberUpLayout
instance Enum NumberUpLayout
instance Show PageSet
instance Eq PageSet
instance Bounded PageSet
instance Enum PageSet
instance Show PrintPages
instance Eq PrintPages
instance Bounded PrintPages
instance Enum PrintPages
instance Show PrintDuplex
instance Eq PrintDuplex
instance Bounded PrintDuplex
instance Enum PrintDuplex
instance Show PrintQuality
instance Eq PrintQuality
instance Bounded PrintQuality
instance Enum PrintQuality
instance Show PageOrientation
instance Eq PageOrientation
instance Bounded PageOrientation
instance Enum PageOrientation


-- | Stores page setup information
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Printing.PageSetup
data PageSetup
class GObjectClass o => PageSetupClass o
castToPageSetup :: GObjectClass obj => obj -> PageSetup
toPageSetup :: PageSetupClass o => o -> PageSetup

-- | Creates a new <a>PageSetup</a>.
pageSetupNew :: IO PageSetup

-- | Reads the page setup from the file <tt>fileName</tt>. Returns a new
--   <a>PageSetup</a> object with the restored page setup.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
pageSetupNewFromFile :: GlibString string => string -> IO PageSetup

-- | Copies a <a>PageSetup</a>.
pageSetupCopy :: PageSetupClass self => self -> IO PageSetup

-- | Gets the top margin in units of <tt>unit</tt>.
pageSetupGetTopMargin :: PageSetupClass self => self -> Unit -> IO Double

-- | Sets the top margin of the <a>PageSetup</a>.
pageSetupSetTopMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()

-- | Gets the bottom margin in units of <tt>unit</tt>.
pageSetupGetBottomMargin :: PageSetupClass self => self -> Unit -> IO Double

-- | Sets the bottom margin of the <a>PageSetup</a>.
pageSetupSetBottomMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()

-- | Gets the left margin in units of <tt>unit</tt>.
pageSetupGetLeftMargin :: PageSetupClass self => self -> Unit -> IO Double

-- | Sets the left margin of the <a>PageSetup</a>.
pageSetupSetLeftMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()

-- | Gets the right margin in units of <tt>unit</tt>.
pageSetupGetRightMargin :: PageSetupClass self => self -> Unit -> IO Double

-- | Sets the right margin of the <a>PageSetup</a>.
pageSetupSetRightMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()

-- | Sets the paper size of the <a>PageSetup</a> and modifies the margins
--   according to the new paper size.
pageSetupSetPaperSizeAndDefaultMargins :: PageSetupClass self => self -> PaperSize -> IO ()

-- | Returns the paper width in units of <tt>unit</tt>.
--   
--   Note that this function takes orientation, but not margins into
--   consideration. See <a>pageSetupGetPageWidth</a>.
pageSetupGetPaperWidth :: PageSetupClass self => self -> Unit -> IO Double

-- | Returns the paper height in units of <tt>unit</tt>.
--   
--   Note that this function takes orientation, but not margins into
--   consideration. See <a>pageSetupGetPageHeight</a>.
pageSetupGetPaperHeight :: PageSetupClass self => self -> Unit -> IO Double

-- | Returns the page width in units of <tt>unit</tt>.
--   
--   Note that this function takes orientation and margins into
--   consideration. See <a>pageSetupGetPaperWidth</a>.
pageSetupGetPageWidth :: PageSetupClass self => self -> Unit -> IO Double

-- | Returns the page height in units of <tt>unit</tt>.
--   
--   Note that this function takes orientation and margins into
--   consideration. See <a>pageSetupGetPaperHeight</a>.
pageSetupGetPageHeight :: PageSetupClass self => self -> Unit -> IO Double

-- | Reads the page setup from the file <tt>fileName</tt>. See
--   <a>pageSetupToFile</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
pageSetupLoadFile :: (PageSetupClass self, GlibString string) => self -> string -> IO Bool

-- | This function saves the information from <tt>setup</tt> to
--   <tt>fileName</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
pageSetupToFile :: (PageSetupClass self, GlibString string) => self -> string -> IO Bool

-- | The page orientation of the <a>PageSetup</a>.
pageSetupOrientation :: PageSetupClass self => Attr self PageOrientation

-- | The paper size of the <a>PageSetup</a>.
pageSetupPaperSize :: PageSetupClass self => Attr self PaperSize


-- | A vertical separator
module Graphics.UI.Gtk.Ornaments.VSeparator
data VSeparator
class SeparatorClass o => VSeparatorClass o
castToVSeparator :: GObjectClass obj => obj -> VSeparator
gTypeVSeparator :: GType
toVSeparator :: VSeparatorClass o => o -> VSeparator

-- | Creates a new <a>VSeparator</a>.
vSeparatorNew :: IO VSeparator


-- | A horizontal separator
module Graphics.UI.Gtk.Ornaments.HSeparator
data HSeparator
class SeparatorClass o => HSeparatorClass o
castToHSeparator :: GObjectClass obj => obj -> HSeparator
gTypeHSeparator :: GType
toHSeparator :: HSeparatorClass o => o -> HSeparator

-- | Creates a new <a>HSeparator</a>.
hSeparatorNew :: IO HSeparator


-- | A bin with a decorative frame and optional label
module Graphics.UI.Gtk.Ornaments.Frame
data Frame
class BinClass o => FrameClass o
castToFrame :: GObjectClass obj => obj -> Frame
gTypeFrame :: GType
toFrame :: FrameClass o => o -> Frame

-- | Creates a new <a>Frame</a> without a label.
--   
--   <ul>
--   <li>A label can later be set by calling <a>frameSetLabel</a>.</li>
--   </ul>
frameNew :: IO Frame

-- | Sets the text of the label.
frameSetLabel :: (FrameClass self, GlibString string) => self -> string -> IO ()

-- | If the frame's label widget is a <a>Label</a>, returns the text in the
--   label widget.
frameGetLabel :: (FrameClass self, GlibString string) => self -> IO string

-- | Sets the label widget for the frame. This is the widget that will
--   appear embedded in the top edge of the frame as a title.
frameSetLabelWidget :: (FrameClass self, WidgetClass labelWidget) => self -> labelWidget -> IO ()

-- | Retrieves the label widget for the frame. See
--   <a>frameSetLabelWidget</a>.
frameGetLabelWidget :: FrameClass self => self -> IO (Maybe Widget)

-- | Sets the alignment of the frame widget's label. The default values for
--   a newly created frame are 0.0 and 0.5.
frameSetLabelAlign :: FrameClass self => self -> Float -> Float -> IO ()

-- | Retrieves the X and Y alignment of the frame's label. See
--   <a>frameSetLabelAlign</a>.
frameGetLabelAlign :: FrameClass self => self -> IO (Float, Float)

-- | Shadow types
data ShadowType
[ShadowNone] :: ShadowType
[ShadowIn] :: ShadowType
[ShadowOut] :: ShadowType
[ShadowEtchedIn] :: ShadowType
[ShadowEtchedOut] :: ShadowType

-- | Sets the shadow type of the frame.
frameSetShadowType :: FrameClass self => self -> ShadowType -> IO ()

-- | Retrieves the shadow type of the frame. See <a>frameSetShadowType</a>.
frameGetShadowType :: FrameClass self => self -> IO ShadowType

-- | Text of the frame's label.
frameLabel :: (FrameClass self, GlibString string) => Attr self string

-- | The horizontal alignment of the label.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
frameLabelXAlign :: FrameClass self => Attr self Float

-- | The vertical alignment of the label.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
frameLabelYAlign :: FrameClass self => Attr self Float

-- | Appearance of the frame border.
--   
--   Default value: <a>ShadowEtchedIn</a>
frameShadowType :: FrameClass self => Attr self ShadowType

-- | A widget to display in place of the usual frame label.
frameLabelWidget :: (FrameClass self, WidgetClass labelWidget) => ReadWriteAttr self (Maybe Widget) labelWidget


-- | A container with two panes arranged vertically
module Graphics.UI.Gtk.Layout.VPaned
data VPaned
class PanedClass o => VPanedClass o
castToVPaned :: GObjectClass obj => obj -> VPaned
gTypeVPaned :: GType
toVPaned :: VPanedClass o => o -> VPaned

-- | Create a new <a>VPaned</a>
vPanedNew :: IO VPaned


-- | A container for arranging buttons vertically
module Graphics.UI.Gtk.Layout.VButtonBox
data VButtonBox
class ButtonBoxClass o => VButtonBoxClass o
castToVButtonBox :: GObjectClass obj => obj -> VButtonBox
gTypeVButtonBox :: GType
toVButtonBox :: VButtonBoxClass o => o -> VButtonBox

-- | Creates a new vertical button box.
vButtonBoxNew :: IO VButtonBox


-- | A vertical container box
module Graphics.UI.Gtk.Layout.VBox
data VBox
class BoxClass o => VBoxClass o
castToVBox :: GObjectClass obj => obj -> VBox
gTypeVBox :: GType
toVBox :: VBoxClass o => o -> VBox

-- | Creates a new <a>VBox</a>.
vBoxNew :: Bool -> Int -> IO VBox


-- | The table widget is a container in which widgets can be aligned in
--   cells.
module Graphics.UI.Gtk.Layout.Table
data Table
class ContainerClass o => TableClass o
castToTable :: GObjectClass obj => obj -> Table
gTypeTable :: GType
toTable :: TableClass o => o -> Table

-- | Used to create a new table widget. An initial size must be given by
--   specifying how many rows and columns the table should have, although
--   this can be changed later with <a>tableResize</a>. <tt>rows</tt> and
--   <tt>columns</tt> must both be in the range 0 .. 65535.
tableNew :: Int -> Int -> Bool -> IO Table

-- | Change the dimensions of an already existing table.
tableResize :: TableClass self => self -> Int -> Int -> IO ()

-- | Child widget attach options for table containers
data AttachOptions
[Expand] :: AttachOptions
[Shrink] :: AttachOptions
[Fill] :: AttachOptions

-- | Adds a widget to a table. The number of 'cells' that a widget will
--   occupy is specified by <tt>leftAttach</tt>, <tt>rightAttach</tt>,
--   <tt>topAttach</tt> and <tt>bottomAttach</tt>. These each represent the
--   leftmost, rightmost, uppermost and lowest column and row numbers of
--   the table. (Columns and rows are indexed from zero).
tableAttach :: (TableClass self, WidgetClass child) => self -> child -> Int -> Int -> Int -> Int -> [AttachOptions] -> [AttachOptions] -> Int -> Int -> IO ()

-- | As there are many options associated with <a>tableAttach</a>, this
--   convenience function provides the programmer with a means to add
--   children to a table with identical padding and expansion options. The
--   values used for the <a>AttachOptions</a> are <tt>[<a>Expand</a>,
--   <a>Fill</a>]</tt>, and the padding is set to 0.
tableAttachDefaults :: (TableClass self, WidgetClass widget) => self -> widget -> Int -> Int -> Int -> Int -> IO ()

-- | Changes the space between a given table row and its surrounding rows.
tableSetRowSpacing :: TableClass self => self -> Int -> Int -> IO ()

-- | Gets the amount of space between row <tt>row</tt>, and row
--   <tt>row</tt> + 1. See <a>tableSetRowSpacing</a>.
tableGetRowSpacing :: TableClass self => self -> Int -> IO Int

-- | Alters the amount of space between a given table column and the
--   adjacent columns.
tableSetColSpacing :: TableClass self => self -> Int -> Int -> IO ()

-- | Gets the amount of space between column <tt>col</tt>, and column
--   <tt>col</tt> + 1. See <a>tableSetColSpacing</a>.
tableGetColSpacing :: TableClass self => self -> Int -> IO Int

-- | Sets the space between every row in <tt>table</tt> equal to
--   <tt>spacing</tt>.
tableSetRowSpacings :: TableClass self => self -> Int -> IO ()

-- | Gets the default row spacing for the table. This is the spacing that
--   will be used for newly added rows. (See <a>tableSetRowSpacings</a>)
tableGetDefaultRowSpacing :: TableClass self => self -> IO Int

-- | Sets the space between every column in <tt>table</tt> equal to
--   <tt>spacing</tt>.
tableSetColSpacings :: TableClass self => self -> Int -> IO ()

-- | Gets the default column spacing for the table. This is the spacing
--   that will be used for newly added columns. (See
--   <a>tableSetColSpacings</a>)
tableGetDefaultColSpacing :: TableClass self => self -> IO Int

-- | Changes the homogenous property of table cells, ie. whether all cells
--   are an equal size or not.
tableSetHomogeneous :: TableClass self => self -> Bool -> IO ()

-- | Returns whether the table cells are all constrained to the same width
--   and height. (See <a>tableSetHomogeneous</a>)
tableGetHomogeneous :: TableClass self => self -> IO Bool

-- | Returns the size of <a>Table</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
tableGetSize :: TableClass self => self -> IO (Int, Int)

-- | The number of rows in the table.
--   
--   Default value: 0
tableNRows :: TableClass self => Attr self Int

-- | The number of columns in the table.
--   
--   Default value: 0
tableNColumns :: TableClass self => Attr self Int

-- | The amount of space between two consecutive rows.
--   
--   Default value: 0
tableRowSpacing :: TableClass self => Attr self Int

-- | The amount of space between two consecutive columns.
--   
--   Default value: 0
tableColumnSpacing :: TableClass self => Attr self Int

-- | If <tt>True</tt> this means the table cells are all the same
--   width/height.
--   
--   Default value: <tt>False</tt>
tableHomogeneous :: TableClass self => Attr self Bool

-- | The column number to attach the left side of the child to.
--   
--   Allowed values: &lt;= 65535
--   
--   Default value: 0
tableChildLeftAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int

-- | The column number to attach the right side of a child widget to.
--   
--   Allowed values: [1,65535]
--   
--   Default value: 1
tableChildRightAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int

-- | The row number to attach the top of a child widget to.
--   
--   Allowed values: &lt;= 65535
--   
--   Default value: 0
tableChildTopAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int

-- | The row number to attach the bottom of the child to.
--   
--   Allowed values: [1,65535]
--   
--   Default value: 1
tableChildBottomAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int

-- | Options specifying the horizontal behaviour of the child.
--   
--   Default value: <tt>[<a>Expand</a>, <a>Fill</a>]</tt>
tableChildXOptions :: (TableClass self, WidgetClass child) => child -> Attr self [AttachOptions]

-- | Options specifying the vertical behaviour of the child.
--   
--   Default value: <tt>[<a>Expand</a>, <a>Fill</a>]</tt>
tableChildYOptions :: (TableClass self, WidgetClass child) => child -> Attr self [AttachOptions]

-- | Extra space to put between the child and its left and right neighbors,
--   in pixels.
--   
--   Allowed values: &lt;= 65535
--   
--   Default value: 0
tableChildXPadding :: (TableClass self, WidgetClass child) => child -> Attr self Int

-- | Extra space to put between the child and its upper and lower
--   neighbors, in pixels.
--   
--   Allowed values: &lt;= 65535
--   
--   Default value: 0
tableChildYPadding :: (TableClass self, WidgetClass child) => child -> Attr self Int


-- | A container which can hide its child
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Layout.Expander
data Expander
class BinClass o => ExpanderClass o
castToExpander :: GObjectClass obj => obj -> Expander
gTypeExpander :: GType
toExpander :: ExpanderClass o => o -> Expander

-- | Creates a new expander using the given string as the text of the
--   label.
expanderNew :: GlibString string => string -> IO Expander

-- | Creates a new expander using <tt>label</tt> as the text of the label.
--   If characters in <tt>label</tt> are preceded by an underscore, they
--   are underlined. If you need a literal underscore character in a label,
--   use '__' (two underscores). The first underlined character represents
--   a keyboard accelerator called a mnemonic. Pressing Alt and that key
--   activates the button.
expanderNewWithMnemonic :: GlibString string => string -> IO Expander

-- | Sets the state of the expander. Set to <tt>True</tt>, if you want the
--   child widget to be revealed, and <tt>False</tt> if you want the child
--   widget to be hidden.
expanderSetExpanded :: Expander -> Bool -> IO ()

-- | Queries a <a>Expander</a> and returns its current state. Returns
--   <tt>True</tt> if the child widget is revealed.
--   
--   See <a>expanderSetExpanded</a>.
expanderGetExpanded :: Expander -> IO Bool

-- | Sets the spacing field of <tt>expander</tt>, which is the number of
--   pixels to place between expander and the child.
expanderSetSpacing :: Expander -> Int -> IO ()

-- | Gets the value set by <a>expanderSetSpacing</a>.
expanderGetSpacing :: Expander -> IO Int

-- | Sets the text of the label of the expander to <tt>label</tt>.
--   
--   This will also clear any previously set labels.
expanderSetLabel :: GlibString string => Expander -> string -> IO ()

-- | Fetches the text from the label of the expander, as set by
--   <a>expanderSetLabel</a>.
expanderGetLabel :: GlibString string => Expander -> IO string

-- | If true, an underline in the text of the expander label indicates the
--   next character should be used for the mnemonic accelerator key.
expanderSetUseUnderline :: Expander -> Bool -> IO ()

-- | Returns whether an embedded underline in the expander label indicates
--   a mnemonic. See <a>expanderSetUseUnderline</a>.
expanderGetUseUnderline :: Expander -> IO Bool

-- | Sets whether the text of the label contains markup in Pango's text
--   markup language. See <a>labelSetMarkup</a>.
expanderSetUseMarkup :: Expander -> Bool -> IO ()

-- | Returns whether the label's text is interpreted as marked up with the
--   Pango text markup language. See <a>expanderSetUseMarkup</a>.
expanderGetUseMarkup :: Expander -> IO Bool

-- | Set the label widget for the expander. This is the widget that will
--   appear embedded alongside the expander arrow.
expanderSetLabelWidget :: WidgetClass labelWidget => Expander -> labelWidget -> IO ()

-- | Retrieves the label widget for the frame. See
--   <a>expanderSetLabelWidget</a>.
expanderGetLabelWidget :: Expander -> IO Widget

-- | Whether the expander has been opened to reveal the child widget.
--   
--   Default value: <tt>False</tt>
expanderExpanded :: Attr Expander Bool

-- | Text of the expander's label.
expanderLabel :: GlibString string => Attr Expander string

-- | If set, an underline in the text indicates the next character should
--   be used for the mnemonic accelerator key.
--   
--   Default value: <tt>False</tt>
expanderUseUnderline :: Attr Expander Bool

-- | The text of the label includes XML markup. See pango_parse_markup().
--   
--   Default value: <tt>False</tt>
expanderUseMarkup :: Attr Expander Bool

-- | Space to put between the label and the child.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
expanderSpacing :: Attr Expander Int

-- | A widget to display in place of the usual expander label.
expanderLabelWidget :: WidgetClass labelWidget => ReadWriteAttr Expander Widget labelWidget

-- | Whether the label widget should fill all available horizontal space.
--   
--   Default value: <a>False</a>
expanderLabelFill :: Attr Expander Bool
onActivate :: Expander -> IO () -> IO (ConnectId Expander)
afterActivate :: Expander -> IO () -> IO (ConnectId Expander)


-- | Infinite scrollable area containing child widgets and/or custom
--   drawing
module Graphics.UI.Gtk.Layout.Layout
data Layout
class ContainerClass o => LayoutClass o
castToLayout :: GObjectClass obj => obj -> Layout
gTypeLayout :: GType
toLayout :: LayoutClass o => o -> Layout

-- | Creates a new <a>Layout</a>. Unless you have a specific adjustment
--   you'd like the layout to use for scrolling, pass <tt>Nothing</tt> for
--   <tt>hadjustment</tt> and <tt>vadjustment</tt>.
layoutNew :: Maybe Adjustment -> Maybe Adjustment -> IO Layout

-- | Adds <tt>childWidget</tt> to <tt>layout</tt>, at position
--   <tt>(x,y)</tt>. <tt>layout</tt> becomes the new parent container of
--   <tt>childWidget</tt>.
layoutPut :: (LayoutClass self, WidgetClass childWidget) => self -> childWidget -> Int -> Int -> IO ()

-- | Moves a current child of <tt>layout</tt> to a new position.
layoutMove :: (LayoutClass self, WidgetClass childWidget) => self -> childWidget -> Int -> Int -> IO ()

-- | Sets the size of the scrollable area of the layout.
layoutSetSize :: LayoutClass self => self -> Int -> Int -> IO ()

-- | Gets the size that has been set on the layout, and that determines the
--   total extents of the layout's scrollbar area. See
--   <a>layoutSetSize</a>.
layoutGetSize :: LayoutClass self => self -> IO (Int, Int)

-- | This function should only be called after the layout has been placed
--   in a <a>ScrolledWindow</a> or otherwise configured for scrolling. It
--   returns the <a>Adjustment</a> used for communication between the
--   horizontal scrollbar and <tt>layout</tt>.
--   
--   See <a>ScrolledWindow</a>, <a>Scrollbar</a>, <a>Adjustment</a> for
--   details.
layoutGetHAdjustment :: LayoutClass self => self -> IO Adjustment

-- | This function should only be called after the layout has been placed
--   in a <a>ScrolledWindow</a> or otherwise configured for scrolling. It
--   returns the <a>Adjustment</a> used for communication between the
--   vertical scrollbar and <tt>layout</tt>.
--   
--   See <a>ScrolledWindow</a>, <a>Scrollbar</a>, <a>Adjustment</a> for
--   details.
layoutGetVAdjustment :: LayoutClass self => self -> IO Adjustment

-- | Sets the horizontal scroll adjustment for the layout.
--   
--   See <a>ScrolledWindow</a>, <a>Scrollbar</a>, <a>Adjustment</a> for
--   details.
layoutSetHAdjustment :: LayoutClass self => self -> Adjustment -> IO ()

-- | Sets the vertical scroll adjustment for the layout.
--   
--   See <a>ScrolledWindow</a>, <a>Scrollbar</a>, <a>Adjustment</a> for
--   details.
layoutSetVAdjustment :: LayoutClass self => self -> Adjustment -> IO ()

-- | Retrieves the <a>Drawable</a> part of the layout used for drawing
--   operations.
layoutGetDrawWindow :: Layout -> IO DrawWindow

-- | The <a>Adjustment</a> for the horizontal position.
layoutHAdjustment :: LayoutClass self => Attr self Adjustment

-- | The <a>Adjustment</a> for the vertical position.
layoutVAdjustment :: LayoutClass self => Attr self Adjustment

-- | The width of the layout.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 100
layoutWidth :: LayoutClass self => Attr self Int

-- | The height of the layout.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 100
layoutHeight :: LayoutClass self => Attr self Int

-- | X position of child widget.
--   
--   Default value: 0
layoutChildX :: (LayoutClass self, WidgetClass child) => child -> Attr self Int

-- | Y position of child widget.
--   
--   Default value: 0
layoutChildY :: (LayoutClass self, WidgetClass child) => child -> Attr self Int

-- | In case the adjustments are replaced, this signal is emitted.
onSetScrollAdjustments :: LayoutClass self => self -> (Adjustment -> Adjustment -> IO ()) -> IO (ConnectId self)

-- | In case the adjustments are replaced, this signal is emitted.
afterSetScrollAdjustments :: LayoutClass self => self -> (Adjustment -> Adjustment -> IO ()) -> IO (ConnectId self)


-- | A container with two panes arranged horizontally
module Graphics.UI.Gtk.Layout.HPaned
data HPaned
class PanedClass o => HPanedClass o
castToHPaned :: GObjectClass obj => obj -> HPaned
gTypeHPaned :: GType
toHPaned :: HPanedClass o => o -> HPaned

-- | Create a new <a>HPaned</a>
hPanedNew :: IO HPaned


-- | A container which allows you to position widgets at fixed coordinates
module Graphics.UI.Gtk.Layout.Fixed
data Fixed
class ContainerClass o => FixedClass o
castToFixed :: GObjectClass obj => obj -> Fixed
gTypeFixed :: GType
toFixed :: FixedClass o => o -> Fixed

-- | Creates a new <a>Fixed</a>.
fixedNew :: IO Fixed

-- | Adds a widget to a <a>Fixed</a> container at the given position.
fixedPut :: (FixedClass self, WidgetClass widget) => self -> widget -> (Int, Int) -> IO ()

-- | Moves a child of a <a>Fixed</a> container to the given position.
fixedMove :: (FixedClass self, WidgetClass widget) => self -> widget -> (Int, Int) -> IO ()

-- | Sets whether the <a>Fixed</a> widget is created with a separate
--   <a>DrawWindow</a> for its window or not. (By default, it will be
--   created with no separate <a>DrawWindow</a>). This function must be
--   called while the <a>Fixed</a> is not realized, for instance,
--   immediately after the window is created.
--   
--   This function was added to provide an easy migration path for older
--   applications which may expect <a>Fixed</a> to have a separate window.
--   
--   Removed in Gtk3. Use the Widget version.
fixedSetHasWindow :: FixedClass self => self -> Bool -> IO ()

-- | Gets whether the <a>Fixed</a> has its own <a>DrawWindow</a>. See
--   <a>fixedSetHasWindow</a>.
--   
--   Removed in Gtk3. Use the Widget version.
fixedGetHasWindow :: FixedClass self => self -> IO Bool

-- | 'hasWindow' property. See <a>fixedGetHasWindow</a> and
--   <a>fixedSetHasWindow</a>
--   
--   Removed in Gtk3. Use the Widget version.
fixedHasWindow :: FixedClass self => Attr self Bool

-- | X position of child widget.
--   
--   Default value: 0
fixedChildX :: (FixedClass self, WidgetClass child) => child -> Attr self Int

-- | Y position of child widget.
--   
--   Default value: 0
fixedChildY :: (FixedClass self, WidgetClass child) => child -> Attr self Int


-- | A container for arranging buttons horizontally
module Graphics.UI.Gtk.Layout.HButtonBox
data HButtonBox
class ButtonBoxClass o => HButtonBoxClass o
castToHButtonBox :: GObjectClass obj => obj -> HButtonBox
gTypeHButtonBox :: GType
toHButtonBox :: HButtonBoxClass o => o -> HButtonBox

-- | Creates a new horizontal button box.
hButtonBoxNew :: IO HButtonBox


-- | A horizontal container box
module Graphics.UI.Gtk.Layout.HBox
data HBox
class BoxClass o => HBoxClass o
castToHBox :: GObjectClass obj => obj -> HBox
gTypeHBox :: GType
toHBox :: HBoxClass o => o -> HBox

-- | Creates a new <a>HBox</a>.
hBoxNew :: Bool -> Int -> IO HBox


-- | A frame that constrains its child to a particular aspect ratio
module Graphics.UI.Gtk.Layout.AspectFrame
data AspectFrame
class FrameClass o => AspectFrameClass o
castToAspectFrame :: GObjectClass obj => obj -> AspectFrame
gTypeAspectFrame :: GType
toAspectFrame :: AspectFrameClass o => o -> AspectFrame

-- | Create a new <a>AspectFrame</a>.
--   
--   The frame may be augmented with a label which can be set by
--   <tt>frameSetLabel</tt>.
aspectFrameNew :: Float -> Float -> Maybe Float -> IO AspectFrame

-- | Set parameters for an existing <a>AspectFrame</a>.
aspectFrameSet :: AspectFrameClass self => self -> Float -> Float -> Maybe Float -> IO ()

-- | X alignment of the child.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
aspectFrameXAlign :: AspectFrameClass self => Attr self Float

-- | Y alignment of the child.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
aspectFrameYAlign :: AspectFrameClass self => Attr self Float

-- | Aspect ratio if obey_child is <tt>False</tt>.
--   
--   Allowed values: [1e-04,10000]
--   
--   Default value: 0.5
aspectFrameRatio :: AspectFrameClass self => Attr self Float

-- | Force aspect ratio to match that of the frame's child.
--   
--   Default value: <tt>True</tt>
aspectFrameObeyChild :: AspectFrameClass self => Attr self Bool


-- | A widget which controls the alignment and size of its child
module Graphics.UI.Gtk.Layout.Alignment
data Alignment
class BinClass o => AlignmentClass o
castToAlignment :: GObjectClass obj => obj -> Alignment
gTypeAlignment :: GType
toAlignment :: AlignmentClass o => o -> Alignment

-- | Creates a new <a>Alignment</a>.
alignmentNew :: Float -> Float -> Float -> Float -> IO Alignment

-- | Sets the <a>Alignment</a> values.
alignmentSet :: AlignmentClass self => self -> Float -> Float -> Float -> Float -> IO ()

-- | Sets the padding on the different sides of the widget. The padding
--   adds blank space to the sides of the widget. For instance, this can be
--   used to indent the child widget towards the right by adding padding on
--   the left.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
alignmentSetPadding :: AlignmentClass self => self -> Int -> Int -> Int -> Int -> IO ()

-- | Gets the padding on the different sides of the widget. See
--   <a>alignmentSetPadding</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
alignmentGetPadding :: AlignmentClass self => self -> IO (Int, Int, Int, Int)

-- | Horizontal position of child in available space. 0.0 is left aligned,
--   1.0 is right aligned.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
alignmentXAlign :: AlignmentClass self => Attr self Float

-- | Vertical position of child in available space. 0.0 is top aligned, 1.0
--   is bottom aligned.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.5
alignmentYAlign :: AlignmentClass self => Attr self Float

-- | If available horizontal space is bigger than needed for the child, how
--   much of it to use for the child. 0.0 means none, 1.0 means all.
--   
--   Allowed values: [0,1]
--   
--   Default value: 1
alignmentXScale :: AlignmentClass self => Attr self Float

-- | If available vertical space is bigger than needed for the child, how
--   much of it to use for the child. 0.0 means none, 1.0 means all.
--   
--   Allowed values: [0,1]
--   
--   Default value: 1
alignmentYScale :: AlignmentClass self => Attr self Float

-- | The padding to insert at the top of the widget.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 0
alignmentTopPadding :: AlignmentClass self => Attr self Int

-- | The padding to insert at the bottom of the widget.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 0
alignmentBottomPadding :: AlignmentClass self => Attr self Int

-- | The padding to insert at the left of the widget.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 0
alignmentLeftPadding :: AlignmentClass self => Attr self Int

-- | The padding to insert at the right of the widget.
--   
--   Allowed values: &lt;= <tt>(<a>maxBound</a> :: Int)</tt>
--   
--   Default value: 0
alignmentRightPadding :: AlignmentClass self => Attr self Int


-- | A filter for selecting a file subset
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.FileFilter
data FileFilter
class ObjectClass o => FileFilterClass o
castToFileFilter :: GObjectClass obj => obj -> FileFilter
gTypeFileFilter :: GType
toFileFilter :: FileFilterClass o => o -> FileFilter
data FileFilterFlags
[FileFilterFilename] :: FileFilterFlags
[FileFilterUri] :: FileFilterFlags
[FileFilterDisplayName] :: FileFilterFlags
[FileFilterMimeType] :: FileFilterFlags

-- | Creates a new <a>FileFilter</a> with no rules added to it. Such a
--   filter doesn't accept any files, so is not particularly useful until
--   you add rules with <a>fileFilterAddMimeType</a>,
--   <a>fileFilterAddPattern</a>, or <a>fileFilterAddCustom</a>.
fileFilterNew :: IO FileFilter

-- | Sets the human-readable name of the filter; this is the string that
--   will be displayed in the file selector user interface if there is a
--   selectable list of filters.
fileFilterSetName :: GlibString string => FileFilter -> string -> IO ()

-- | Gets the human-readable name for the filter. See
--   <a>fileFilterSetName</a>.
fileFilterGetName :: GlibString string => FileFilter -> IO string

-- | Adds a rule allowing a given mime type to <tt>filter</tt>.
fileFilterAddMimeType :: GlibString string => FileFilter -> string -> IO ()

-- | Adds a rule allowing a shell style glob to a filter.
fileFilterAddPattern :: GlibString string => FileFilter -> string -> IO ()

-- | Adds rule to a filter that allows files based on a custom callback
--   function. The list of flags <tt>needed</tt> which is passed in
--   provides information about what sorts of information that the filter
--   function needs; this allows Gtk+ to avoid retrieving expensive
--   information when it isn't needed by the filter.
fileFilterAddCustom :: GlibString string => FileFilter -> [FileFilterFlags] -> (Maybe string -> Maybe string -> Maybe string -> Maybe string -> IO Bool) -> IO ()

-- | Adds a rule allowing image files in the formats supported by
--   <a>Pixbuf</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
fileFilterAddPixbufFormats :: FileFilter -> IO ()

-- | 'name' property. See <a>fileFilterGetName</a> and
--   <a>fileFilterSetName</a>
fileFilterName :: GlibString string => Attr FileFilter string
instance Eq FileFilterFlags
instance Show FileFilterFlags
instance Bounded FileFilterFlags
instance Enum FileFilterFlags
instance Flags FileFilterFlags


-- | File chooser interface used by <a>FileChooserWidget</a> and
--   <a>FileChooserDialog</a>
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.FileChooser
data FileChooser
class GObjectClass o => FileChooserClass o
castToFileChooser :: GObjectClass obj => obj -> FileChooser
gTypeFileChooser :: GType
toFileChooser :: FileChooserClass o => o -> FileChooser

-- | Describes whether a <a>FileChooser</a> is being used to open existing
--   files or to save to a possibly new file.
data FileChooserAction
[FileChooserActionOpen] :: FileChooserAction
[FileChooserActionSave] :: FileChooserAction
[FileChooserActionSelectFolder] :: FileChooserAction
[FileChooserActionCreateFolder] :: FileChooserAction

-- | These identify the various errors that can occur while calling
--   <a>FileChooser</a> functions.
data FileChooserError
[FileChooserErrorNonexistent] :: FileChooserError
[FileChooserErrorBadFilename] :: FileChooserError
[FileChooserErrorAlreadyExists] :: FileChooserError
[FileChooserErrorIncompleteHostname] :: FileChooserError

-- | Used as a return value of handlers for the <a>onConfirmOverwrite</a>
--   signal of a <a>FileChooser</a>.
--   
--   <ul>
--   <li>This value determines whether the file chooser will present the
--   stock confirmation dialog, accept the user's choice of a filename, or
--   let the user choose another filename.</li>
--   </ul>
--   
--   Since Gtk 2.8.
data FileChooserConfirmation
[FileChooserConfirmationConfirm] :: FileChooserConfirmation
[FileChooserConfirmationAcceptFilename] :: FileChooserConfirmation
[FileChooserConfirmationSelectAgain] :: FileChooserConfirmation

-- | Sets the type of operation that the chooser is performing; the user
--   interface is adapted to suit the selected action. For example, an
--   option to create a new folder might be shown if the action is
--   <a>FileChooserActionSave</a> but not if the action is
--   <a>FileChooserActionOpen</a>.
fileChooserSetAction :: FileChooserClass self => self -> FileChooserAction -> IO ()

-- | Gets the type of operation that the file chooser is performing; see
--   <a>fileChooserSetAction</a>.
fileChooserGetAction :: FileChooserClass self => self -> IO FileChooserAction

-- | Sets whether only local files can be selected in the file selector. If
--   <tt>localOnly</tt> is <tt>True</tt> (the default), then the selected
--   file are files are guaranteed to be accessible through the operating
--   systems native file file system and therefore the application only
--   needs to worry about the filename functions in <a>FileChooser</a>,
--   like <a>fileChooserGetFilename</a>, rather than the URI functions like
--   <a>fileChooserGetURI</a>,
fileChooserSetLocalOnly :: FileChooserClass self => self -> Bool -> IO ()

-- | Gets whether only local files can be selected in the file selector.
--   See <a>fileChooserSetLocalOnly</a>
fileChooserGetLocalOnly :: FileChooserClass self => self -> IO Bool

-- | Sets whether multiple files can be selected in the file selector. This
--   is only relevant if the action is set to be
--   <a>FileChooserActionOpen</a> or <a>FileChooserActionSave</a>. It
--   cannot be set with either of the folder actions.
fileChooserSetSelectMultiple :: FileChooserClass self => self -> Bool -> IO ()

-- | Gets whether multiple files can be selected in the file selector. See
--   <a>fileChooserSetSelectMultiple</a>.
fileChooserGetSelectMultiple :: FileChooserClass self => self -> IO Bool

-- | Sets the current name in the file selector, as if entered by the user.
--   Note that the name passed in here is a Unicode string rather than a
--   filename. This function is meant for such uses as a suggested name in
--   a "Save As..." dialog.
--   
--   If you want to preselect a particular existing file, you should use
--   <a>fileChooserSetFilename</a> or <a>fileChooserSetURI</a> instead.
--   Please see the documentation for those functions for an example of
--   using <a>fileChooserSetCurrentName</a> as well.
fileChooserSetCurrentName :: (FileChooserClass self, GlibFilePath fp) => self -> fp -> IO ()

-- | Gets the filename for the currently selected file in the file
--   selector. If multiple files are selected, one of the filenames will be
--   returned at random.
--   
--   If the file chooser is in folder mode, this function returns the
--   selected folder.
fileChooserGetFilename :: (FileChooserClass self, GlibFilePath fp) => self -> IO (Maybe fp)

-- | Sets <tt>filename</tt> as the current filename for the file chooser,
--   by changing to the file's parent folder and actually selecting the
--   file in list. If the <tt>chooser</tt> is in
--   <a>FileChooserActionSave</a> mode, the file's base name will also
--   appear in the dialog's file name entry.
--   
--   If the file name isn't in the current folder of <tt>chooser</tt>, then
--   the current folder of <tt>chooser</tt> will be changed to the folder
--   containing <tt>filename</tt>. This is equivalent to a sequence of
--   <a>fileChooserUnselectAll</a> followed by
--   <a>fileChooserSelectFilename</a>.
--   
--   Note that the file must exist, or nothing will be done except for the
--   directory change.
--   
--   If you are implementing a File/Save As... dialog, you should use this
--   function if you already have a file name to which the user may save;
--   for example, when the user opens an existing file and then does
--   File/Save As... on it. If you don't have a file name already — for
--   example, if the user just created a new file and is saving it for the
--   first time, do not call this function. Instead, use something similar
--   to this:
--   
--   <pre>
--   if documentIsNew
--   then do -- the user just created a new document
--   fileChooserSetCurrentFolder chooser defaultFolderForSaving
--   fileChooserSetCurrentName chooser "Untitled document"
--   else do --the user edited an existing document
--   fileChooserSetFilename chooser existingFilename
--   </pre>
fileChooserSetFilename :: FileChooserClass self => self -> FilePath -> IO Bool

-- | Selects a filename. If the file name isn't in the current folder of
--   the chooser, then the current folder of the chooser will be changed to
--   the folder containing <tt>filename</tt>.
fileChooserSelectFilename :: FileChooserClass self => self -> FilePath -> IO Bool

-- | Unselects a currently selected filename. If the filename is not in the
--   current directory, does not exist, or is otherwise not currently
--   selected, does nothing.
fileChooserUnselectFilename :: FileChooserClass self => self -> FilePath -> IO ()

-- | Selects all the files in the current folder of a file chooser.
fileChooserSelectAll :: FileChooserClass self => self -> IO ()

-- | Unselects all the files in the current folder of a file chooser.
fileChooserUnselectAll :: FileChooserClass self => self -> IO ()

-- | Lists all the selected files and subfolders in the current folder of
--   the chooser. The returned names are full absolute paths. If files in
--   the current folder cannot be represented as local filenames they will
--   be ignored. (See <a>fileChooserGetURIs</a>)
fileChooserGetFilenames :: FileChooserClass self => self -> IO [FilePath]

-- | Sets the current folder for the chooser from a local filename. The
--   user will be shown the full contents of the current folder, plus user
--   interface elements for navigating to other folders.
fileChooserSetCurrentFolder :: FileChooserClass self => self -> FilePath -> IO Bool

-- | Gets the current folder of the chooser as a local filename. See
--   <a>fileChooserSetCurrentFolder</a>.
fileChooserGetCurrentFolder :: FileChooserClass self => self -> IO (Maybe FilePath)

-- | Gets the URI for the currently selected file in the file selector. If
--   multiple files are selected, one of the filenames will be returned at
--   random.
--   
--   If the file chooser is in folder mode, this function returns the
--   selected folder.
fileChooserGetURI :: FileChooserClass self => self -> IO (Maybe String)

-- | Sets the file referred to by <tt>uri</tt> as the current file for the
--   file chooser, by changing to the URI's parent folder and actually
--   selecting the URI in the list. If the <tt>chooser</tt> is
--   <a>FileChooserActionSave</a> mode, the URI's base name will also
--   appear in the dialog's file name entry.
--   
--   If the URI isn't in the current folder of <tt>chooser</tt>, then the
--   current folder of <tt>chooser</tt> will be changed to the folder
--   containing <tt>uri</tt>. This is equivalent to a sequence of
--   <a>fileChooserUnselectAll</a> followed by <a>fileChooserSelectURI</a>.
--   
--   Note that the URI must exist, or nothing will be done except for the
--   directory change. If you are implementing a File/Save As... dialog,
--   you should use this function if you already have a file name to which
--   the user may save; for example, when the user opens an existing file
--   and then does File/Save As... on it. If you don't have a file name
--   already — for example, if the user just created a new file and is
--   saving it for the first time, do not call this function. Instead, use
--   something similar to this:
--   
--   <pre>
--   if documentIsNew
--   then do -- the user just created a new document
--   fileChooserSetCurrentFolderURI chooser defaultFolderForSaving
--   fileChooserSetCurrentName chooser "Untitled document"
--   else do --the user edited an existing document
--   fileChooserSetURI chooser existingURI
--   </pre>
fileChooserSetURI :: FileChooserClass self => self -> String -> IO Bool

-- | Selects the file to by <tt>uri</tt>. If the URI doesn't refer to a
--   file in the current folder of the chooser, then the current folder of
--   the chooser will be changed to the folder containing
--   <tt>filename</tt>.
fileChooserSelectURI :: FileChooserClass self => self -> String -> IO Bool

-- | Unselects the file referred to by <tt>uri</tt>. If the file is not in
--   the current directory, does not exist, or is otherwise not currently
--   selected, does nothing.
fileChooserUnselectURI :: FileChooserClass self => self -> String -> IO ()

-- | Lists all the selected files and subfolders in the current folder of
--   the chooser. The returned names are full absolute URIs.
fileChooserGetURIs :: FileChooserClass self => self -> IO [String]

-- | Sets the current folder for the chooser from an URI. The user will be
--   shown the full contents of the current folder, plus user interface
--   elements for navigating to other folders.
fileChooserSetCurrentFolderURI :: FileChooserClass self => self -> String -> IO Bool

-- | Gets the current folder of the chooser as an URI. See
--   <a>fileChooserSetCurrentFolderURI</a>.
fileChooserGetCurrentFolderURI :: FileChooserClass self => self -> IO String

-- | Sets an application-supplied widget to use to display a custom preview
--   of the currently selected file. To implement a preview, after setting
--   the preview widget, you connect to the UpdatePreview signal, and call
--   <a>fileChooserGetPreviewFilename</a> or
--   <a>fileChooserGetPreviewURI</a> on each change. If you can display a
--   preview of the new file, update your widget and set the preview active
--   using <a>fileChooserSetPreviewWidgetActive</a>. Otherwise, set the
--   preview inactive.
--   
--   When there is no application-supplied preview widget, or the
--   application-supplied preview widget is not active, the file chooser
--   may display an internally generated preview of the current file or it
--   may display no preview at all.
fileChooserSetPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => self -> previewWidget -> IO ()

-- | Gets the current preview widget; see
--   <a>fileChooserSetPreviewWidget</a>.
fileChooserGetPreviewWidget :: FileChooserClass self => self -> IO (Maybe Widget)

-- | Sets whether the preview widget set by
--   <a>fileChooserSetPreviewWidget</a> should be shown for the current
--   filename. When <tt>active</tt> is set to false, the file chooser may
--   display an internally generated preview of the current file or it may
--   display no preview at all. See <a>fileChooserSetPreviewWidget</a> for
--   more details.
fileChooserSetPreviewWidgetActive :: FileChooserClass self => self -> Bool -> IO ()

-- | Gets whether the preview widget set by
--   <a>fileChooserSetPreviewWidget</a> should be shown for the current
--   filename. See <a>fileChooserSetPreviewWidgetActive</a>.
fileChooserGetPreviewWidgetActive :: FileChooserClass self => self -> IO Bool

-- | Sets whether the file chooser should display a stock label with the
--   name of the file that is being previewed; the default is
--   <tt>True</tt>. Applications that want to draw the whole preview area
--   themselves should set this to <tt>False</tt> and display the name
--   themselves in their preview widget.
--   
--   See also: <a>fileChooserSetPreviewWidget</a>
fileChooserSetUsePreviewLabel :: FileChooserClass self => self -> Bool -> IO ()

-- | Gets whether a stock label should be drawn with the name of the
--   previewed file. See <a>fileChooserSetUsePreviewLabel</a>.
fileChooserGetUsePreviewLabel :: FileChooserClass self => self -> IO Bool

-- | Gets the filename that should be previewed in a custom preview widget.
--   See <a>fileChooserSetPreviewWidget</a>.
fileChooserGetPreviewFilename :: FileChooserClass self => self -> IO (Maybe FilePath)

-- | Gets the URI that should be previewed in a custom preview widget. See
--   <a>fileChooserSetPreviewWidget</a>.
fileChooserGetPreviewURI :: FileChooserClass self => self -> IO (Maybe String)

-- | Sets an application-supplied widget to provide extra options to the
--   user.
fileChooserSetExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => self -> extraWidget -> IO ()

-- | Gets the current preview widget; see <a>fileChooserSetExtraWidget</a>.
fileChooserGetExtraWidget :: FileChooserClass self => self -> IO (Maybe Widget)

-- | Adds the filter to the list of filters that the user can select
--   between. When a filter is selected, only files that are passed by that
--   filter are displayed.
fileChooserAddFilter :: FileChooserClass self => self -> FileFilter -> IO ()

-- | Removes the filter from the list of filters that the user can select
--   between.
fileChooserRemoveFilter :: FileChooserClass self => self -> FileFilter -> IO ()

-- | Lists the current set of user-selectable filters; see
--   <a>fileChooserAddFilter</a>, <a>fileChooserRemoveFilter</a>.
fileChooserListFilters :: FileChooserClass self => self -> IO [FileFilter]

-- | Sets the current filter; only the files that pass the filter will be
--   displayed. If the user-selectable list of filters is non-empty, then
--   the filter should be one of the filters in that list. Setting the
--   current filter when the list of filters is empty is useful if you want
--   to restrict the displayed set of files without letting the user change
--   it.
fileChooserSetFilter :: FileChooserClass self => self -> FileFilter -> IO ()

-- | Gets the current filter; see <a>fileChooserSetFilter</a>.
fileChooserGetFilter :: FileChooserClass self => self -> IO (Maybe FileFilter)

-- | Adds a folder to be displayed with the shortcut folders in a file
--   chooser. Note that shortcut folders do not get saved, as they are
--   provided by the application. For example, you can use this to add a
--   "/usr/share/mydrawprogram/Clipart" folder to the volume list.
--   
--   If the folder can not be added successfully an exception will be
--   thrown.
fileChooserAddShortcutFolder :: FileChooserClass self => self -> FilePath -> IO ()

-- | Removes a folder from a file chooser's list of shortcut folders.
--   
--   If the folder can not be removed successfully an exception will be
--   thrown.
fileChooserRemoveShortcutFolder :: FileChooserClass self => self -> FilePath -> IO ()

-- | Queries the list of shortcut folders in the file chooser, as set by
--   <a>fileChooserAddShortcutFolder</a>.
fileChooserListShortcutFolders :: FileChooserClass self => self -> IO [String]

-- | Adds a folder URI to be displayed with the shortcut folders in a file
--   chooser. Note that shortcut folders do not get saved, as they are
--   provided by the application. For example, you can use this to add a
--   "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.
--   
--   If the folder can not be added successfully an exception will be
--   thrown.
fileChooserAddShortcutFolderURI :: FileChooserClass self => self -> String -> IO ()

-- | Removes a folder URI from a file chooser's list of shortcut folders.
fileChooserRemoveShortcutFolderURI :: FileChooserClass self => self -> String -> IO ()

-- | Queries the list of shortcut folders in the file chooser, as set by
--   <a>fileChooserAddShortcutFolderURI</a>.
fileChooserListShortcutFolderURIs :: FileChooserClass self => self -> IO [String]
fileChooserErrorDomain :: GErrorDomain

-- | Sets whether hidden files and folders are displayed in the file
--   selector.
--   
--   Available since Gtk+ version 2.6
fileChooserSetShowHidden :: FileChooserClass self => self -> Bool -> IO ()

-- | Gets whether hidden files and folders are displayed in the file
--   selector. See <a>fileChooserSetShowHidden</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
fileChooserGetShowHidden :: FileChooserClass self => self -> IO Bool

-- | Sets whether a file chooser in <a>FileChooserActionSave</a> mode will
--   present a confirmation dialog if the user types a file name that
--   already exists. This is <tt>False</tt> by default.
--   
--   Regardless of this setting, the <tt>chooser</tt> will emit the
--   "confirm-overwrite" signal when appropriate.
--   
--   If all you need is the stock confirmation dialog, set this property to
--   <tt>True</tt>. You can override the way confirmation is done by
--   actually handling the "confirm-overwrite" signal; please refer to its
--   documentation for the details.
--   
--   Available since Gtk+ version 2.8
fileChooserSetDoOverwriteConfirmation :: FileChooserClass self => self -> Bool -> IO ()

-- | Queries whether a file chooser is set to confirm for overwriting when
--   the user types a file name that already exists.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
fileChooserGetDoOverwriteConfirmation :: FileChooserClass self => self -> IO Bool

-- | 'usePreviewLabel' property. See <a>fileChooserGetUsePreviewLabel</a>
--   and <a>fileChooserSetUsePreviewLabel</a>
fileChooserUsePreviewLabel :: FileChooserClass self => Attr self Bool

-- | 'showHidden' property. See <a>fileChooserGetShowHidden</a> and
--   <a>fileChooserSetShowHidden</a>
--   
--   Since Gtk 2.6.
fileChooserShowHidden :: FileChooserClass self => Attr self Bool

-- | 'selectMultiple' property. See <a>fileChooserGetSelectMultiple</a> and
--   <a>fileChooserSetSelectMultiple</a>
fileChooserSelectMultiple :: FileChooserClass self => Attr self Bool

-- | 'previewWidgetActive' property. See
--   <a>fileChooserGetPreviewWidgetActive</a> and
--   <a>fileChooserSetPreviewWidgetActive</a>
fileChooserPreviewWidgetActive :: FileChooserClass self => Attr self Bool

-- | 'previewWidget' property. See <a>fileChooserGetPreviewWidget</a> and
--   <a>fileChooserSetPreviewWidget</a>
fileChooserPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => ReadWriteAttr self (Maybe Widget) previewWidget

-- | 'localOnly' property. See <a>fileChooserGetLocalOnly</a> and
--   <a>fileChooserSetLocalOnly</a>
fileChooserLocalOnly :: FileChooserClass self => Attr self Bool

-- | 'filter' property. See <a>fileChooserGetFilter</a> and
--   <a>fileChooserSetFilter</a>
fileChooserFilter :: FileChooserClass self => ReadWriteAttr self (Maybe FileFilter) FileFilter

-- | 'extraWidget' property. See <a>fileChooserGetExtraWidget</a> and
--   <a>fileChooserSetExtraWidget</a>
fileChooserExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => ReadWriteAttr self (Maybe Widget) extraWidget

-- | 'doOverwriteConfirmation' property. See
--   <a>fileChooserGetDoOverwriteConfirmation</a> and
--   <a>fileChooserSetDoOverwriteConfirmation</a>
fileChooserDoOverwriteConfirmation :: FileChooserClass self => Attr self Bool

-- | 'action' property. See <a>fileChooserGetAction</a> and
--   <a>fileChooserSetAction</a>
fileChooserAction :: FileChooserClass self => Attr self FileChooserAction

-- | This signal is emitted when the current folder in a <a>FileChooser</a>
--   changes. This can happen due to the user performing some action that
--   changes folders, such as selecting a bookmark or visiting a folder on
--   the file list. It can also happen as a result of calling a function to
--   explicitly change the current folder in a file chooser.
--   
--   Normally you do not need to connect to this signal, unless you need to
--   keep track of which folder a file chooser is showing.
--   
--   See also: <a>fileChooserSetCurrentFolder</a>,
--   <a>fileChooserGetCurrentFolder</a>,
--   <a>fileChooserSetCurrentFolderURI</a>,
--   <a>fileChooserGetCurrentFolderURI</a>.
currentFolderChanged :: FileChooserClass self => Signal self (IO ())

-- | This signal is emitted when the user "activates" a file in the file
--   chooser. This can happen by double-clicking on a file in the file
--   list, or by pressing Enter.
--   
--   Normally you do not need to connect to this signal. It is used
--   internally by <a>FileChooserDialog</a> to know when to activate the
--   default button in the dialog.
--   
--   See also: <a>fileChooserGetFilename</a>,
--   <a>fileChooserGetFilenames</a>, <a>fileChooserGetURI</a>,
--   <a>fileChooserGetURIs</a>.
fileActivated :: FileChooserClass self => Signal self (IO ())

-- | This signal is emitted when there is a change in the set of selected
--   files in a <a>FileChooser</a>. This can happen when the user modifies
--   the selection with the mouse or the keyboard, or when explicitly
--   calling functions to change the selection.
--   
--   Normally you do not need to connect to this signal, as it is easier to
--   wait for the file chooser to finish running, and then to get the list
--   of selected files using the functions mentioned below.
--   
--   See also: <a>fileChooserSelectFilename</a>,
--   <a>fileChooserUnselectFilename</a>, <a>fileChooserGetFilename</a>,
--   <a>fileChooserGetFilenames</a>, <a>fileChooserSelectURI</a>,
--   <a>fileChooserUnselectURI</a>, <a>fileChooserGetURI</a>,
--   <a>fileChooserGetURIs</a>.
fileSelectionChanged :: FileChooserClass self => Signal self (IO ())

-- | This signal is emitted when the preview in a file chooser should be
--   regenerated. For example, this can happen when the currently selected
--   file changes. You should use this signal if you want your file chooser
--   to have a preview widget.
--   
--   Once you have installed a preview widget with
--   <a>fileChooserSetPreviewWidget</a>, you should update it when this
--   signal is emitted. You can use the functions
--   <a>fileChooserGetPreviewFilename</a> or
--   <a>fileChooserGetPreviewURI</a> to get the name of the file to
--   preview. Your widget may not be able to preview all kinds of files;
--   your callback must call <a>fileChooserSetPreviewWidgetActive</a> to
--   inform the file chooser about whether the preview was generated
--   successfully or not.
--   
--   See also: <a>fileChooserSetPreviewWidget</a>,
--   <a>fileChooserSetPreviewWidgetActive</a>,
--   <a>fileChooserSetUsePreviewLabel</a>,
--   <a>fileChooserGetPreviewFilename</a>, <a>fileChooserGetPreviewURI</a>.
updatePreview :: FileChooserClass self => Signal self (IO ())

-- | This signal gets emitted whenever it is appropriate to present a
--   confirmation dialog when the user has selected a file name that
--   already exists. The signal only gets emitted when the file chooser is
--   in <a>FileChooserActionSave</a> mode.
--   
--   Most applications just need to turn on the do-overwrite-confirmation
--   property (or call the <a>fileChooserSetDoOverwriteConfirmation</a>
--   function), and they will automatically get a stock confirmation
--   dialog. Applications which need to customize this behavior should do
--   that, and also connect to the <a>confirmOverwrite</a> signal.
--   
--   A signal handler for this signal must return a
--   <a>FileChooserConfirmation</a> value, which indicates the action to
--   take. If the handler determines that the user wants to select a
--   different filename, it should return
--   <a>FileChooserConfirmationSelectAgain</a>. If it determines that the
--   user is satisfied with his choice of file name, it should return
--   <a>FileChooserConfirmationAcceptFilename</a>. On the other hand, if it
--   determines that the stock confirmation dialog should be used, it
--   should return <a>FileChooserConfirmationConfirm</a>.
--   
--   Since Gtk 2.8.
confirmOverwrite :: FileChooserClass self => Signal self (IO FileChooserConfirmation)

-- | <i>Deprecated: use currentFolderChanged instead</i>
onCurrentFolderChanged :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: use currentFolderChanged instead</i>
afterCurrentFolderChanged :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: use fileActivated instead</i>
onFileActivated :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: use fileActivated instead</i>
afterFileActivated :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: use updatePreview instead</i>
onUpdatePreview :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: use updatePreview instead</i>
afterUpdatePreview :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: use confirmOverwrite instead</i>
onConfirmOverwrite :: FileChooserClass self => self -> IO FileChooserConfirmation -> IO (ConnectId self)

-- | <i>Deprecated: use confirmOverwrite instead</i>
afterConfirmOverwrite :: FileChooserClass self => self -> IO FileChooserConfirmation -> IO (ConnectId self)
instance Enum FileChooserConfirmation
instance Enum FileChooserError
instance Enum FileChooserAction
instance GErrorClass FileChooserError


-- | File chooser widget that can be embedded in other widgets
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.FileChooserWidget
data FileChooserWidget
class VBoxClass o => FileChooserWidgetClass o
castToFileChooserWidget :: GObjectClass obj => obj -> FileChooserWidget
gTypeFileChooserWidget :: GType
toFileChooserWidget :: FileChooserWidgetClass o => o -> FileChooserWidget

-- | Describes whether a <a>FileChooser</a> is being used to open existing
--   files or to save to a possibly new file.
data FileChooserAction

-- | Creates a new <a>FileChooserWidget</a>. This is a file chooser widget
--   that can be embedded in custom windows, and it is the same widget that
--   is used by <a>FileChooserDialog</a>.
fileChooserWidgetNew :: FileChooserAction -> IO FileChooserWidget

-- | Creates a new <a>FileChooserWidget</a> with a specified backend. This
--   is especially useful if you use <tt>fileChooserSetLocalOnly</tt> to
--   allow non-local files. This is a file chooser widget that can be
--   embedded in custom windows and it is the same widget that is used by
--   <a>FileChooserDialog</a>.
--   
--   Removed in Gtk3.
fileChooserWidgetNewWithBackend :: FileChooserAction -> String -> IO FileChooserWidget
instance FileChooserClass FileChooserWidget


-- | A button to launch a file selection dialog
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.6</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.FileChooserButton
data FileChooserButton
class HBoxClass o => FileChooserButtonClass o
castToFileChooserButton :: GObjectClass obj => obj -> FileChooserButton
gTypeFileChooserButton :: GType
toFileChooserButton :: FileChooserButtonClass o => o -> FileChooserButton

-- | Creates a new file-selecting button widget.
fileChooserButtonNew :: GlibString string => string -> FileChooserAction -> IO FileChooserButton

-- | Creates a new file-selecting button widget using <tt>backend</tt>.
--   
--   Removed in Gtk3.
fileChooserButtonNewWithBackend :: GlibString string => string -> FileChooserAction -> string -> IO FileChooserButton

-- | Creates a <a>FileChooserButton</a> widget which uses <tt>dialog</tt>
--   as it's file-picking window.
fileChooserButtonNewWithDialog :: FileChooserDialogClass dialog => dialog -> IO FileChooserButton

-- | Retrieves the title of the browse dialog used by the button.
fileChooserButtonGetTitle :: (FileChooserButtonClass self, GlibString string) => self -> IO string

-- | Modifies the <tt>title</tt> of the browse dialog used by the button.
fileChooserButtonSetTitle :: (FileChooserButtonClass self, GlibString string) => self -> string -> IO ()

-- | Retrieves the width in characters of the <tt>button</tt> widget's
--   entry and/or label.
fileChooserButtonGetWidthChars :: FileChooserButtonClass self => self -> IO Int

-- | Sets the width (in characters) that the button will use to
--   <tt>nChars</tt>.
fileChooserButtonSetWidthChars :: FileChooserButtonClass self => self -> Int -> IO ()

-- | Instance of the <a>FileChooserDialog</a> associated with the button.
fileChooserButtonDialog :: (FileChooserButtonClass self, FileChooserDialogClass fileChooserDialog) => WriteAttr self fileChooserDialog

-- | Title to put on the <a>FileChooserDialog</a> associated with the
--   button.
--   
--   Default value: "Select A File"
fileChooserButtonTitle :: (FileChooserButtonClass self, GlibString string) => Attr self string
fileChooserButtonWidthChars :: FileChooserButtonClass self => Attr self Int
instance FileChooserClass FileChooserButton


-- | A vertical ruler
module Graphics.UI.Gtk.Special.VRuler
data VRuler
class RulerClass o => VRulerClass o
castToVRuler :: GObjectClass obj => obj -> VRuler
toVRuler :: VRulerClass o => o -> VRuler

-- | Creates a new vertical ruler
vRulerNew :: IO VRuler


-- | A horizontal ruler
--   
--   <ul>
--   <li>Rulers are removed in Gtk3 and thus this module is blank. There is
--   no replacement</li>
--   </ul>
module Graphics.UI.Gtk.Special.HRuler
data HRuler
class RulerClass o => HRulerClass o
castToHRuler :: GObjectClass obj => obj -> HRuler
toHRuler :: HRulerClass o => o -> HRuler

-- | Creates a new horizontal ruler.
hRulerNew :: IO HRuler


-- | Base class for horizontal or vertical rulers
module Graphics.UI.Gtk.Special.Ruler
data Ruler
class WidgetClass o => RulerClass o
castToRuler :: GObjectClass obj => obj -> Ruler
toRuler :: RulerClass o => o -> Ruler

-- | Units of measure
--   
--   Removed in Gtk3.
data MetricType
[Pixels] :: MetricType
[Inches] :: MetricType
[Centimeters] :: MetricType

-- | Range of ruler
rulerRange :: RulerClass self => Attr self (Double, Double, Double, Double)

-- | Lower limit of ruler.
--   
--   Default value: 0
rulerLower :: RulerClass self => Attr self Double

-- | Upper limit of ruler.
--   
--   Default value: 0
rulerUpper :: RulerClass self => Attr self Double

-- | Position of mark on the ruler.
--   
--   Default value: 0
rulerPosition :: RulerClass self => Attr self Double

-- | Maximum size of the ruler.
--   
--   Default value: 0
rulerMaxSize :: RulerClass self => Attr self Double

-- | The metric used for the ruler.
--   
--   Default value: '<tt>Pixels'</tt>
--   
--   Since 2.8
rulerMetric :: RulerClass self => Attr self MetricType


-- | A 'color wheel' widget
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.14</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.HSV
data HSV
class WidgetClass o => HSVClass o
castToHSV :: GObjectClass obj => obj -> HSV
toHSV :: HSVClass o => o -> HSV

-- | Creates a new <a>HSV</a> color selector.
--   
--   <ul>
--   <li>Available since 2.14</li>
--   </ul>
hsvNew :: IO HSV

-- | An <a>HSV</a> color selector can be said to be adjusting if multiple
--   rapid changes are being made to its value, for example, when the user
--   is adjusting the value with the mouse. This function queries whether
--   the <a>HSV</a> color selector is being adjusted or not.
hsvIsAdjusting :: HSVClass self => self -> IO Bool

-- | Converts a color from <a>HSV</a> space to RGB. Input values must be in
--   the [0.0, 1.0] range; output values will be in the same range.
hsvToRgb :: (Double, Double, Double) -> (Double, Double, Double)

-- | Converts a color from RGB space to <a>HSV</a>. Input values must be in
--   the [0.0, 1.0] range; output values will be in the same range.
rgbToHsv :: (Double, Double, Double) -> (Double, Double, Double)

-- | Color in an <a>HSV</a> color selector. Color component values must be
--   in the [0.0, 1.0] range.
hsvColor :: HSVClass self => Attr self (Double, Double, Double)

-- | The size and ring width of an <a>HSV</a> color selector.
hsvMetrics :: HSVClass self => Attr self (Int, Int)
hsvChanged :: HSVClass self => Signal self (IO ())
hsvMove :: HSVClass self => Signal self (DirectionType -> IO ())


-- | A button to launch a font selection dialog
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.FontButton
data FontButton
class ButtonClass o => FontButtonClass o
castToFontButton :: GObjectClass obj => obj -> FontButton
gTypeFontButton :: GType
toFontButton :: FontButtonClass o => o -> FontButton

-- | Creates a new font picker widget.
fontButtonNew :: IO FontButton

-- | Creates a new font picker widget.
fontButtonNewWithFont :: GlibString string => string -> IO FontButton

-- | Sets or updates the currently-displayed font in font picker dialog.
fontButtonSetFontName :: (FontButtonClass self, GlibString string) => self -> string -> IO Bool

-- | Retrieves the name of the currently selected font.
fontButtonGetFontName :: (FontButtonClass self, GlibString string) => self -> IO string

-- | If <tt>showStyle</tt> is <tt>True</tt>, the font style will be
--   displayed along with name of the selected font.
fontButtonSetShowStyle :: FontButtonClass self => self -> Bool -> IO ()

-- | Returns whether the name of the font style will be shown in the label.
fontButtonGetShowStyle :: FontButtonClass self => self -> IO Bool

-- | If <tt>showSize</tt> is <tt>True</tt>, the font size will be displayed
--   along with the name of the selected font.
fontButtonSetShowSize :: FontButtonClass self => self -> Bool -> IO ()

-- | Returns whether the font size will be shown in the label.
fontButtonGetShowSize :: FontButtonClass self => self -> IO Bool

-- | If <tt>useFont</tt> is <tt>True</tt>, the font name will be written
--   using the selected font.
fontButtonSetUseFont :: FontButtonClass self => self -> Bool -> IO ()

-- | Returns whether the selected font is used in the label.
fontButtonGetUseFont :: FontButtonClass self => self -> IO Bool

-- | If <tt>useSize</tt> is <tt>True</tt>, the font name will be written
--   using the selected size.
fontButtonSetUseSize :: FontButtonClass self => self -> Bool -> IO ()

-- | Returns whether the selected size is used in the label.
fontButtonGetUseSize :: FontButtonClass self => self -> IO Bool

-- | Sets the title for the font selection dialog.
fontButtonSetTitle :: (FontButtonClass self, GlibString string) => self -> string -> IO ()

-- | Retrieves the title of the font selection dialog.
fontButtonGetTitle :: (FontButtonClass self, GlibString string) => self -> IO string

-- | The title of the font selection dialog.
--   
--   Default value: "Pick a Font"
fontButtonTitle :: (FontButtonClass self, GlibString string) => Attr self string

-- | The name of the currently selected font.
--   
--   Default value: "Sans 12"
fontButtonFontName :: (FontButtonClass self, GlibString string) => Attr self string

-- | If this property is set to <tt>True</tt>, the label will be drawn in
--   the selected font.
--   
--   Default value: <tt>False</tt>
fontButtonUseFont :: FontButtonClass self => Attr self Bool

-- | If this property is set to <tt>True</tt>, the label will be drawn with
--   the selected font size.
--   
--   Default value: <tt>False</tt>
fontButtonUseSize :: FontButtonClass self => Attr self Bool

-- | If this property is set to <tt>True</tt>, the name of the selected
--   font style will be shown in the label. For a more WYSIWIG way to show
--   the selected style, see the ::use-font property.
--   
--   Default value: <tt>True</tt>
fontButtonShowStyle :: FontButtonClass self => Attr self Bool

-- | If this property is set to <tt>True</tt>, the selected font size will
--   be shown in the label. For a more WYSIWIG way to show the selected
--   size, see the ::use-size property.
--   
--   Default value: <tt>True</tt>
fontButtonShowSize :: FontButtonClass self => Attr self Bool

-- | The <tt>fontSet</tt> signal is emitted when the user selects a font.
--   When handling this signal, use <a>fontButtonGetFontName</a> to find
--   out which font was just selected.
onFontSet :: FontButtonClass self => self -> IO () -> IO (ConnectId self)

-- | The <tt>fontSet</tt> signal is emitted when the user selects a font.
--   When handling this signal, use <a>fontButtonGetFontName</a> to find
--   out which font was just selected.
afterFontSet :: FontButtonClass self => self -> IO () -> IO (ConnectId self)


-- | A dialog box for selecting fonts
module Graphics.UI.Gtk.Selectors.FontSelectionDialog
data FontSelectionDialog
class DialogClass o => FontSelectionDialogClass o
castToFontSelectionDialog :: GObjectClass obj => obj -> FontSelectionDialog
gTypeFontSelectionDialog :: GType
toFontSelectionDialog :: FontSelectionDialogClass o => o -> FontSelectionDialog

-- | Creates a new <a>FontSelectionDialog</a>.
fontSelectionDialogNew :: GlibString string => string -> IO FontSelectionDialog

-- | Gets the currently-selected font name.
fontSelectionDialogGetFontName :: (FontSelectionDialogClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets the currently-selected font.
fontSelectionDialogSetFontName :: (FontSelectionDialogClass self, GlibString string) => self -> string -> IO Bool

-- | Gets the text displayed in the preview area.
fontSelectionDialogGetPreviewText :: (FontSelectionDialogClass self, GlibString string) => self -> IO string

-- | Sets the text displayed in the preview area.
fontSelectionDialogSetPreviewText :: (FontSelectionDialogClass self, GlibString string) => self -> string -> IO ()

-- | Gets the <tt>Cancel</tt> button.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
fontSelectionDialogGetCancelButton :: FontSelectionDialogClass self => self -> IO Widget

-- | Gets the <tt>OK</tt> button.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
fontSelectionDialogGetOkButton :: FontSelectionDialogClass self => self -> IO Widget

-- | Retrieves the <a>FontSelection</a> widget embedded in the dialog.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
fontSelectionDialogGetFontSelection :: FontSelectionDialogClass self => self -> IO FontSelection

-- | 'previewText' property. See <a>fontSelectionDialogGetPreviewText</a>
--   and <a>fontSelectionDialogSetPreviewText</a>
fontSelectionDialogPreviewText :: (FontSelectionDialogClass self, GlibString string) => Attr self string


-- | A widget for selecting fonts
module Graphics.UI.Gtk.Selectors.FontSelection
data FontSelection
class VBoxClass o => FontSelectionClass o
castToFontSelection :: GObjectClass obj => obj -> FontSelection
gTypeFontSelection :: GType
toFontSelection :: FontSelectionClass o => o -> FontSelection

-- | Creates a new <a>FontSelection</a>.
fontSelectionNew :: IO FontSelection

-- | Gets the currently-selected font name.
fontSelectionGetFontName :: (FontSelectionClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets the currently-selected font.
fontSelectionSetFontName :: (FontSelectionClass self, GlibString string) => self -> string -> IO Bool

-- | Gets the text displayed in the preview area.
fontSelectionGetPreviewText :: (FontSelectionClass self, GlibString string) => self -> IO string

-- | Sets the text displayed in the preview area.
fontSelectionSetPreviewText :: (FontSelectionClass self, GlibString string) => self -> string -> IO ()

-- | The X string that represents this font.
--   
--   Default value: ""
fontSelectionFontName :: (FontSelectionClass self, GlibString string) => Attr self string

-- | The text to display in order to demonstrate the selected font.
--   
--   Default value: "abcdefghijk ABCDEFGHIJK"
fontSelectionPreviewText :: (FontSelectionClass self, GlibString string) => Attr self string


-- | Prompt the user for a file or directory name
--   
--   <ul>
--   <li>As of Gtk+ 2.4 this module has been deprecated in favour of
--   <a>FileChooser</a></li>
--   </ul>
--   
--   This module is empty in Gtk3.
module Graphics.UI.Gtk.Selectors.FileSelection
data FileSelection
class DialogClass o => FileSelectionClass o
castToFileSelection :: GObjectClass obj => obj -> FileSelection
gTypeFileSelection :: GType
toFileSelection :: FileSelectionClass o => o -> FileSelection

-- | Creates a new file selection dialog box. By default it will contain a
--   <a>TreeView</a> of the application's current working directory, and a
--   file listing. Operation buttons that allow the user to create a
--   directory, delete files and rename files, are also present.
fileSelectionNew :: GlibString string => string -> IO FileSelection

-- | Sets a default path for the file requestor. If <tt>filename</tt>
--   includes a directory path, then the requestor will open with that path
--   as its current working directory.
--   
--   This has the consequence that in order to open the requestor with a
--   working directory and an empty filename, <tt>filename</tt> must have a
--   trailing directory separator.
fileSelectionSetFilename :: (FileSelectionClass self, GlibString string) => self -> string -> IO ()

-- | This function returns the selected filename.
--   
--   If no file is selected then the selected directory path is returned.
fileSelectionGetFilename :: (FileSelectionClass self, GlibString string) => self -> IO string

-- | Shows the file operation buttons, if they have previously been hidden.
--   The rest of the widgets in the dialog will be resized accordingly.
fileSelectionShowFileopButtons :: FileSelectionClass self => self -> IO ()

-- | Hides the file operation buttons that normally appear at the top of
--   the dialog. Useful if you wish to create a custom file selector, based
--   on <a>FileSelection</a>.
fileSelectionHideFileopButtons :: FileSelectionClass self => self -> IO ()

-- | Extract the buttons of a fileselection.
fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> IO (Button, Button)

-- | Will attempt to match <tt>pattern</tt> to a valid filenames or
--   subdirectories in the current directory. If a match can be made, the
--   matched filename will appear in the text entry field of the file
--   selection dialog. If a partial match can be made, the "Files" list
--   will contain those file names which have been partially matched, and
--   the "Folders" list those directories which have been partially
--   matched.
fileSelectionComplete :: (FileSelectionClass self, GlibString string) => self -> string -> IO ()

-- | Retrieves the list of file selections the user has made in the dialog
--   box. This function is intended for use when the user can select
--   multiple files in the file list.
fileSelectionGetSelections :: (FileSelectionClass self, GlibString string) => self -> IO [string]

-- | Sets whether the user is allowed to select multiple files in the file
--   list. Use <a>fileSelectionGetSelections</a> to get the list of
--   selected files.
fileSelectionSetSelectMultiple :: FileSelectionClass self => self -> Bool -> IO ()

-- | Determines whether or not the user is allowed to select multiple files
--   in the file list. See <a>fileSelectionSetSelectMultiple</a>.
fileSelectionGetSelectMultiple :: FileSelectionClass self => self -> IO Bool

-- | The currently selected filename.
fileSelectionFilename :: (FileSelectionClass self, GlibString string) => Attr self string

-- | Whether buttons for creating/manipulating files should be displayed.
--   
--   Default value: <tt>False</tt>
fileSelectionShowFileops :: FileSelectionClass self => Attr self Bool

-- | Whether to allow multiple files to be selected.
--   
--   Default value: <tt>False</tt>
fileSelectionSelectMultiple :: FileSelectionClass self => Attr self Bool


-- | A button to launch a color selection dialog
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.ColorButton
data ColorButton
class ButtonClass o => ColorButtonClass o
castToColorButton :: GObjectClass obj => obj -> ColorButton
gTypeColorButton :: GType
toColorButton :: ColorButtonClass o => o -> ColorButton

-- | Creates a new color button. This returns a widget in the form of a
--   small button containing a swatch representing the current selected
--   color. When the button is clicked, a color-selection dialog will open,
--   allowing the user to select a color. The swatch will be updated to
--   reflect the new color when the user finishes.
colorButtonNew :: IO ColorButton

-- | Creates a new color button.
colorButtonNewWithColor :: Color -> IO ColorButton

-- | Sets the current color to be <tt>color</tt>.
colorButtonSetColor :: ColorButtonClass self => self -> Color -> IO ()

-- | Returns the current color value.
colorButtonGetColor :: ColorButtonClass self => self -> IO Color

-- | Sets the current opacity to be <tt>alpha</tt>.
colorButtonSetAlpha :: ColorButtonClass self => self -> Word16 -> IO ()

-- | Returns the current alpha value.
colorButtonGetAlpha :: ColorButtonClass self => self -> IO Word16

-- | Sets whether or not the color button should use the alpha channel.
colorButtonSetUseAlpha :: ColorButtonClass self => self -> Bool -> IO ()

-- | Does the color selection dialog use the alpha channel?
colorButtonGetUseAlpha :: ColorButtonClass self => self -> IO Bool

-- | Sets the title for the color selection dialog.
colorButtonSetTitle :: (ColorButtonClass self, GlibString string) => self -> string -> IO ()

-- | Gets the title of the color selection dialog.
colorButtonGetTitle :: (ColorButtonClass self, GlibString string) => self -> IO string

-- | If this property is set to <tt>True</tt>, the color swatch on the
--   button is rendered against a checkerboard background to show its
--   opacity and the opacity slider is displayed in the color selection
--   dialog.
--   
--   Default value: <tt>False</tt>
colorButtonUseAlpha :: ColorButtonClass self => Attr self Bool

-- | The title of the color selection dialog
--   
--   Default value: "Pick a Color"
colorButtonTitle :: (ColorButtonClass self, GlibString string) => Attr self string

-- | The selected opacity value (0 fully transparent, 65535 fully opaque).
--   
--   Allowed values: &lt;= 65535
--   
--   Default value: 65535
colorButtonAlpha :: ColorButtonClass self => Attr self Word16

-- | The <tt>colorSet</tt> signal is emitted when the user selects a color.
--   When handling this signal, use <a>colorButtonGetColor</a> and
--   <a>colorButtonGetAlpha</a> to find out which color was just selected.
onColorSet :: ColorButtonClass self => self -> IO () -> IO (ConnectId self)

-- | The <tt>colorSet</tt> signal is emitted when the user selects a color.
--   When handling this signal, use <a>colorButtonGetColor</a> and
--   <a>colorButtonGetAlpha</a> to find out which color was just selected.
afterColorSet :: ColorButtonClass self => self -> IO () -> IO (ConnectId self)


-- | A standard dialog box for selecting a color
module Graphics.UI.Gtk.Selectors.ColorSelectionDialog
data ColorSelectionDialog
class DialogClass o => ColorSelectionDialogClass o
castToColorSelectionDialog :: GObjectClass obj => obj -> ColorSelectionDialog
gTypeColorSelectionDialog :: GType
toColorSelectionDialog :: ColorSelectionDialogClass o => o -> ColorSelectionDialog

-- | Creates a new <a>ColorSelectionDialog</a>.
colorSelectionDialogNew :: GlibString string => string -> IO ColorSelectionDialog

-- | Retrieve the ColorSelection object contained within the dialog.
--   
--   Removed in Gtk3.
colorSelectionDialogGetColor :: ColorSelectionDialog -> IO ColorSelection

-- | Retrieve the OK button widget contained within the dialog.
--   
--   Removed in Gtk3.
colorSelectionDialogGetOkButton :: ColorSelectionDialog -> IO Button

-- | Retrieve the Cancel button widget contained within the dialog.
--   
--   Removed in Gtk3.
colorSelectionDialogGetCancelButton :: ColorSelectionDialog -> IO Button

-- | Retrieve the Help button widget contained within the dialog.
--   
--   Removed in Gtk3.
colorSelectionDialogGetHelpButton :: ColorSelectionDialog -> IO Button


-- | A widget used to select a color
module Graphics.UI.Gtk.Selectors.ColorSelection
data ColorSelection
class VBoxClass o => ColorSelectionClass o
castToColorSelection :: GObjectClass obj => obj -> ColorSelection
gTypeColorSelection :: GType
toColorSelection :: ColorSelectionClass o => o -> ColorSelection

-- | Creates a new <a>ColorSelection</a>.
colorSelectionNew :: IO ColorSelection

-- | Returns the current alpha value.
colorSelectionGetCurrentAlpha :: ColorSelectionClass self => self -> IO Int

-- | Sets the current opacity to be <tt>alpha</tt>. The first time this is
--   called, it will also set the original opacity to be <tt>alpha</tt>
--   too.
colorSelectionSetCurrentAlpha :: ColorSelectionClass self => self -> Int -> IO ()

-- | Gets the current color in the <a>ColorSelection</a> widget.
colorSelectionGetCurrentColor :: ColorSelectionClass self => self -> IO Color

-- | Sets the current color to be <tt>color</tt>. The first time this is
--   called, it will also set the original color to be <tt>color</tt> too.
colorSelectionSetCurrentColor :: ColorSelectionClass self => self -> Color -> IO ()

-- | Determines whether the <a>ColorSelection</a> widget has an opacity
--   control.
colorSelectionGetHasOpacityControl :: ColorSelectionClass self => self -> IO Bool

-- | Sets the <a>ColorSelection</a> widget to use or not use opacity.
colorSelectionSetHasOpacityControl :: ColorSelectionClass self => self -> Bool -> IO ()

-- | Determines whether the color selector has a color palette.
colorSelectionGetHasPalette :: ColorSelectionClass self => self -> IO Bool

-- | Sets whether to show or hide the palette.
colorSelectionSetHasPalette :: ColorSelectionClass self => self -> Bool -> IO ()

-- | Returns the previous alpha value.
colorSelectionGetPreviousAlpha :: ColorSelectionClass self => self -> IO Int

-- | Sets the 'previous' alpha to be <tt>alpha</tt>. This function should
--   be called with some hesitations, as it might seem confusing to have
--   that alpha change.
colorSelectionSetPreviousAlpha :: ColorSelectionClass self => self -> Int -> IO ()

-- | Returns the original color value.
colorSelectionGetPreviousColor :: ColorSelectionClass self => self -> IO Color

-- | Sets the 'previous' color to be <tt>color</tt>. This function should
--   be called with some hesitations, as it might seem confusing to have
--   that color change. Calling <a>colorSelectionSetCurrentColor</a> will
--   also set this color the first time it is called.
colorSelectionSetPreviousColor :: ColorSelectionClass self => self -> Color -> IO ()

-- | Gets the current state of the widget. Returns True if the user is
--   currently dragging a color around, and False if the selection has
--   stopped.
colorSelectionIsAdjusting :: ColorSelectionClass self => self -> IO Bool

-- | Whether the color selector should allow setting opacity.
--   
--   Default value: <tt>False</tt>
colorSelectionHasOpacityControl :: ColorSelectionClass self => Attr self Bool

-- | Whether a palette should be used.
--   
--   Default value: <tt>False</tt>
colorSelectionHasPalette :: ColorSelectionClass self => Attr self Bool

-- | The current opacity value (0 fully transparent, 65535 fully opaque).
--   
--   Allowed values: &lt;= 65535
--   
--   Default value: 65535
colorSelectionCurrentAlpha :: ColorSelectionClass self => Attr self Int

-- | 'previousAlpha' property. See <a>colorSelectionGetPreviousAlpha</a>
--   and <a>colorSelectionSetPreviousAlpha</a>
colorSelectionPreviousAlpha :: ColorSelectionClass self => Attr self Int


-- | Constructing menus and toolbars from an XML description
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.ActionMenuToolbar.UIManager
data UIManager
class GObjectClass o => UIManagerClass o
castToUIManager :: GObjectClass obj => obj -> UIManager
gTypeUIManager :: GType
toUIManager :: UIManagerClass o => o -> UIManager

-- | These enumeration values are used by <a>uiManagerAddUi</a> to
--   determine what UI element to create.
data UIManagerItemType
[UiManagerAuto] :: UIManagerItemType
[UiManagerMenubar] :: UIManagerItemType
[UiManagerMenu] :: UIManagerItemType
[UiManagerToolbar] :: UIManagerItemType
[UiManagerPlaceholder] :: UIManagerItemType
[UiManagerPopup] :: UIManagerItemType
[UiManagerMenuitem] :: UIManagerItemType
[UiManagerToolitem] :: UIManagerItemType
[UiManagerSeparator] :: UIManagerItemType
[UiManagerAccelerator] :: UIManagerItemType
[UiManagerPopupWithAccels] :: UIManagerItemType
data MergeId

-- | Creates a new ui manager object.
uiManagerNew :: IO UIManager

-- | Sets the "add_tearoffs" property, which controls whether menus
--   generated by this <a>UIManager</a> will have tearoff menu items.
--   
--   Note that this only affects regular menus. Generated popup menus never
--   have tearoff menu items.
uiManagerSetAddTearoffs :: UIManager -> Bool -> IO ()

-- | Returns whether menus generated by this <a>UIManager</a> will have
--   tearoff menu items.
uiManagerGetAddTearoffs :: UIManager -> IO Bool

-- | Inserts an action group into the list of action groups associated with
--   <tt>self</tt>. Actions in earlier groups hide actions with the same
--   name in later groups.
uiManagerInsertActionGroup :: UIManager -> ActionGroup -> Int -> IO ()

-- | Removes an action group from the list of action groups associated with
--   <tt>self</tt>.
uiManagerRemoveActionGroup :: UIManager -> ActionGroup -> IO ()

-- | Returns the list of action groups associated with the UI manager.
uiManagerGetActionGroups :: UIManager -> IO [ActionGroup]

-- | Returns the <a>AccelGroup</a> associated with <tt>self</tt>.
uiManagerGetAccelGroup :: UIManager -> IO AccelGroup

-- | Looks up a widget by following a path. The path consists of the names
--   specified in the XML description of the UI. separated by '/'. Elements
--   which don't have a name or action attribute in the XML (e.g.
--   &lt;popup&gt;) can be addressed by their XML element name (e.g.
--   "popup"). The root element ("/ui") can be omitted in the path.
--   
--   Note that the widget found by following a path that ends in a
--   &lt;menu&gt; element is the menuitem to which the menu is attached,
--   not the menu itself.
uiManagerGetWidget :: GlibString string => UIManager -> string -> IO (Maybe Widget)

-- | Obtains a list of all toplevel widgets of the requested types.
uiManagerGetToplevels :: UIManager -> [UIManagerItemType] -> IO [Widget]

-- | Looks up an action by following a path. See <a>uiManagerGetWidget</a>
--   for more information about paths.
uiManagerGetAction :: GlibString string => UIManager -> string -> IO (Maybe Action)

-- | Parses a string containing a UI definition and merges it with the
--   current contents of <tt>self</tt>. An enclosing &lt;ui&gt; element is
--   added if it is missing.
--   
--   If a parse error occurres, an exception is thrown.
uiManagerAddUiFromString :: GlibString string => UIManager -> string -> IO MergeId

-- | Parses a file containing a UI definition and merges it with the
--   current contents of <tt>self</tt>.
--   
--   If a parse or IO error occurres, an exception is thrown.
uiManagerAddUiFromFile :: GlibString string => UIManager -> string -> IO MergeId

-- | Returns an unused merge id, suitable for use with
--   <a>uiManagerAddUi</a>.
uiManagerNewMergeId :: UIManager -> IO MergeId

-- | Adds a UI element to the current contents of <tt>self</tt>.
--   
--   If <tt>type</tt> is <a>UiManagerAuto</a>, Gtk+ inserts a menuitem,
--   toolitem or separator if such an element can be inserted at the place
--   determined by <tt>path</tt>. Otherwise <tt>type</tt> must indicate an
--   element that can be inserted at the place determined by <tt>path</tt>.
--   
--   If <tt>path</tt> points to a menuitem or toolitem, the new element
--   will be inserted before or after this item, depending on <tt>top</tt>.
uiManagerAddUi :: GlibString string => UIManager -> MergeId -> string -> string -> Maybe string -> [UIManagerItemType] -> Bool -> IO ()

-- | Unmerges the part of the UI manager's content identified by
--   <tt>mergeId</tt>.
uiManagerRemoveUi :: UIManager -> MergeId -> IO ()

-- | Creates a UI definition of the merged UI.
uiManagerGetUi :: GlibString string => UIManager -> IO string

-- | Makes sure that all pending updates to the UI have been completed.
--   
--   This may occasionally be necessary, since <a>UIManager</a> updates the
--   UI in an idle function. A typical example where this function is
--   useful is to enforce that the menubar and toolbar have been added to
--   the main window before showing it:
--   
--   <pre>
--   do
--   containerAdd window vbox
--   onAddWidget merge (addWidget vbox)
--   uiManagerAddUiFromFile merge "my-menus"
--   uiManagerAddUiFromFile merge "my-toolbars"
--   uiManagerEnsureUpdate merge
--   widgetShow window
--   </pre>
uiManagerEnsureUpdate :: UIManager -> IO ()

-- | The "add-tearoffs" property controls whether generated menus have
--   tearoff menu items.
--   
--   Note that this only affects regular menus. Generated popup menus never
--   have tearoff menu items.
--   
--   Default value: <tt>False</tt>
uiManagerAddTearoffs :: Attr UIManager Bool

-- | An XML string describing the merged UI.
--   
--   Default value: <tt>"&lt;ui&gt;\n&lt;/ui&gt;\n"</tt>
uiManagerUi :: GlibString string => ReadAttr UIManager string

-- | The add_widget signal is emitted for each generated menubar and
--   toolbar. It is not emitted for generated popup menus, which can be
--   obtained by <a>uiManagerGetWidget</a>.
addWidget :: UIManagerClass self => Signal self (Widget -> IO ())

-- | The "actions-changed" signal is emitted whenever the set of actions
--   changes.
actionsChanged :: UIManagerClass self => Signal self (IO ())

-- | The add_widget signal is emitted for each generated menubar and
--   toolbar. It is not emitted for generated popup menus, which can be
--   obtained by <a>uiManagerGetWidget</a>.
onAddWidget :: UIManagerClass self => self -> (Widget -> IO ()) -> IO (ConnectId self)

-- | The add_widget signal is emitted for each generated menubar and
--   toolbar. It is not emitted for generated popup menus, which can be
--   obtained by <a>uiManagerGetWidget</a>.
afterAddWidget :: UIManagerClass self => self -> (Widget -> IO ()) -> IO (ConnectId self)

-- | The "actions-changed" signal is emitted whenever the set of actions
--   changes.
onActionsChanged :: UIManagerClass self => self -> IO () -> IO (ConnectId self)

-- | The "actions-changed" signal is emitted whenever the set of actions
--   changes.
afterActionsChanged :: UIManagerClass self => self -> IO () -> IO (ConnectId self)

-- | The connect_proxy signal is emitted after connecting a proxy to an
--   action in the group.
--   
--   This is intended for simple customizations for which a custom action
--   class would be too clumsy, e.g. showing tooltips for menuitems in the
--   statusbar.
onConnectProxy :: UIManagerClass self => self -> (Action -> Widget -> IO ()) -> IO (ConnectId self)

-- | The connect_proxy signal is emitted after connecting a proxy to an
--   action in the group.
--   
--   This is intended for simple customizations for which a custom action
--   class would be too clumsy, e.g. showing tooltips for menuitems in the
--   statusbar.
afterConnectProxy :: UIManagerClass self => self -> (Action -> Widget -> IO ()) -> IO (ConnectId self)

-- | The disconnect_proxy signal is emitted after disconnecting a proxy
--   from an action in the group.
onDisconnectProxy :: UIManagerClass self => self -> (Action -> Widget -> IO ()) -> IO (ConnectId self)

-- | The disconnect_proxy signal is emitted after disconnecting a proxy
--   from an action in the group.
afterDisconnectProxy :: UIManagerClass self => self -> (Action -> Widget -> IO ()) -> IO (ConnectId self)

-- | The pre_activate signal is emitted just before the <tt>action</tt> is
--   activated.
--   
--   This is intended for applications to get notification just before any
--   action is activated.
onPreActivate :: UIManagerClass self => self -> (Action -> IO ()) -> IO (ConnectId self)

-- | The pre_activate signal is emitted just before the <tt>action</tt> is
--   activated.
--   
--   This is intended for applications to get notification just before any
--   action is activated.
afterPreActivate :: UIManagerClass self => self -> (Action -> IO ()) -> IO (ConnectId self)

-- | The post_activate signal is emitted just after the <tt>action</tt> is
--   activated.
--   
--   This is intended for applications to get notification just after any
--   action is activated.
onPostActivate :: UIManagerClass self => self -> (Action -> IO ()) -> IO (ConnectId self)

-- | The post_activate signal is emitted just after the <tt>action</tt> is
--   activated.
--   
--   This is intended for applications to get notification just after any
--   action is activated.
afterPostActivate :: UIManagerClass self => self -> (Action -> IO ()) -> IO (ConnectId self)
instance Bounded UIManagerItemType
instance Enum UIManagerItemType
instance Flags UIManagerItemType


-- | An action of which represents a list of recently used files
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.12</li>
--   </ul>
module Graphics.UI.Gtk.ActionMenuToolbar.RecentAction
data RecentAction
class ActionClass o => RecentActionClass o
castToRecentAction :: GObjectClass obj => obj -> RecentAction
toRecentAction :: RecentActionClass o => o -> RecentAction

-- | Creates a new <a>RecentAction</a> object. To add the action to a
--   <a>ActionGroup</a> and set the accelerator for the action, call
--   <tt>actionGroupAddActionWithAccel</tt>.
recentActionNew :: GlibString string => string -> Maybe string -> Maybe string -> Maybe string -> IO RecentAction

-- | Creates a new <a>RecentAction</a> object. To add the action to a
--   <a>ActionGroup</a> and set the accelerator for the action, call
--   <tt>actionGroupAddActionWithAccel</tt>.
recentActionNewForManager :: (RecentManagerClass manager, GlibString string) => string -> Maybe string -> Maybe string -> Maybe string -> Maybe manager -> IO RecentAction

-- | If recent items should be shown with numbers next to them.
recentActionShowNumbers :: RecentActionClass self => Attr self Bool


-- | A toolbar item that separates groups of other toolbar items
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.SeparatorToolItem
data SeparatorToolItem
class ToolItemClass o => SeparatorToolItemClass o
castToSeparatorToolItem :: GObjectClass obj => obj -> SeparatorToolItem
gTypeSeparatorToolItem :: GType
toSeparatorToolItem :: SeparatorToolItemClass o => o -> SeparatorToolItem

-- | Create a new <a>SeparatorToolItem</a>
separatorToolItemNew :: IO SeparatorToolItem

-- | Whether the separator tool item is drawn as a vertical line, or just
--   blank. Setting this <tt>False</tt> along with <a>toolItemSetExpand</a>
--   is useful to create an item that forces following items to the end of
--   the toolbar.
separatorToolItemSetDraw :: SeparatorToolItemClass self => self -> Bool -> IO ()

-- | Returns whether the separator tool item is drawn as a line, or just
--   blank. See <a>separatorToolItemSetDraw</a>.
separatorToolItemGetDraw :: SeparatorToolItemClass self => self -> IO Bool

-- | Whether the separator is drawn, or just blank.
--   
--   Default value: <tt>True</tt>
separatorToolItemDraw :: SeparatorToolItemClass self => Attr self Bool


-- | A separator used in menus
module Graphics.UI.Gtk.MenuComboToolbar.SeparatorMenuItem
data SeparatorMenuItem
class MenuItemClass o => SeparatorMenuItemClass o
castToSeparatorMenuItem :: GObjectClass obj => obj -> SeparatorMenuItem
gTypeSeparatorMenuItem :: GType
toSeparatorMenuItem :: SeparatorMenuItemClass o => o -> SeparatorMenuItem

-- | Creates a new <a>SeparatorMenuItem</a>.
separatorMenuItemNew :: IO SeparatorMenuItem


-- | A tool palette with categories
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.20</li>
--   </ul>
--   
--   TODO:
--   
--   gtk_tool_palette_add_drag_dest gtk_tool_palette_get_drag_item
--   gtk_tool_palette_get_drag_target_group
--   gtk_tool_palette_get_drag_target_item gtk_tool_palette_get_drop_group
--   gtk_tool_palette_get_drop_item
module Graphics.UI.Gtk.MenuComboToolbar.ToolPalette
data ToolPalette
class ContainerClass o => ToolPaletteClass o
castToToolPalette :: GObjectClass obj => obj -> ToolPalette
toToolPalette :: ToolPaletteClass o => o -> ToolPalette

-- | Flags used to specify the supported drag targets.
data ToolPaletteDragTargets
[ToolPaletteDragItems] :: ToolPaletteDragTargets
[ToolPaletteDragGroups] :: ToolPaletteDragTargets
toolPaletteNew :: IO ToolPalette

-- | Unsets the tool palette icon size set with
--   <tt>toolPaletteSetIconSize</tt>, so that user preferences will be used
--   to determine the icon size.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteUnsetIconSize :: ToolPaletteClass self => self -> IO ()

-- | Unsets a toolbar style set with <tt>toolPaletteSetStyle</tt>, so that
--   user preferences will be used to determine the toolbar style.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteUnsetStyle :: ToolPaletteClass self => self -> IO ()

-- | Gets the horizontal adjustment of the tool palette.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteGetHAdjustment :: ToolPaletteClass self => self -> IO Adjustment

-- | Gets the vertical adjustment of the tool palette.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteGetVAdjustment :: ToolPaletteClass self => self -> IO Adjustment

-- | 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.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) => palette -> group -> Int -> IO ()

-- | Gets the position of group in palette as index. See
--   <a>toolPaletteSetGroupPosition</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) => palette -> group -> IO Int

-- | The size of the icons in a tool palette is normally determined by the
--   <tt>toolbarIconSize</tt> 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: <a>IconSizeSmallToolbar</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteIconSize :: ToolPaletteClass self => Attr self IconSize

-- | Is <a>True</a> if the <tt>iconSize</tt> property has been set.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteIconSizeSet :: ToolPaletteClass self => Attr self Bool

-- | The style of items in the tool palette.
--   
--   Default value: <a>ToolbarIcons</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteToolbarStyle :: ToolPaletteClass self => Attr self ToolbarStyle

-- | Whether the item group should be the only one that is expanded at a
--   given time.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteChildExclusive :: ToolPaletteClass self => Attr self Bool

-- | Whether the item group should receive extra space when the palette
--   grows. at a given time.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteChildExpand :: ToolPaletteClass self => Attr self Bool

-- | Set the scroll adjustments for the viewport. Usually scrolled
--   containers like <a>ScrolledWindow</a> will emit this signal to connect
--   two instances of <a>Scrollbar</a> to the scroll directions of the
--   <tt>Toolpalette</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolPaletteSetScrollAdjustments :: ToolPaletteClass self => Signal self (Adjustment -> Adjustment -> IO ())
instance Eq ToolPaletteDragTargets
instance Enum ToolPaletteDragTargets


-- | A sub container used in a tool palette
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.20</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.ToolItemGroup
data ToolItemGroup
class ContainerClass o => ToolItemGroupClass o
castToToolItemGroup :: GObjectClass obj => obj -> ToolItemGroup
toToolItemGroup :: ToolItemGroupClass o => o -> ToolItemGroup

-- | Creates a new tool item group with label label.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupNew :: GlibString string => string -> IO ToolItemGroup

-- | Gets the tool item at position (x, y).
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupGetDropItem :: ToolItemGroupClass self => self -> (Int, Int) -> IO ToolItem

-- | Gets the position of item in group as index.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupGetItemPosition :: (ToolItemGroupClass group, ToolItemClass item) => group -> item -> IO Int

-- | Gets the number of tool items in group.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupGetNItems :: ToolItemGroupClass group => group -> IO Int

-- | Gets the tool item at index in group.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupGetNthItem :: ToolItemGroupClass group => group -> Int -> IO ToolItem

-- | Inserts item at position in the list of children of group.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupInsert :: (ToolItemGroupClass group, ToolItemClass item) => group -> item -> Int -> IO ()

-- | Sets the position of item in the list of children of group.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupSetItemPosition :: (ToolItemGroupClass group, ToolItemClass item) => group -> item -> Int -> IO ()

-- | Wether the group has been collapsed and items are hidden.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupCollapsed :: ToolItemGroupClass group => Attr group Bool

-- | Ellipsize for item group headers.
--   
--   Default value: EllipsizeNone
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupEllipsize :: ToolItemGroupClass group => Attr group EllipsizeMode

-- | Relief of the group header button.
--   
--   Default value: <a>ReliefNormal</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupHeaderRelief :: ToolItemGroupClass group => Attr group ReliefStyle

-- | The human-readable title of this item group.
--   
--   Default value: ""
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupLabel :: GlibString string => ToolItemGroupClass group => Attr group string

-- | A widget to display in place of the usual label.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupLabelWidget :: ToolItemGroupClass group => Attr group Widget

-- | Whether the item should receive extra space when the group grows.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupChildExpand :: ToolItemGroupClass group => Attr group Bool

-- | Whether the item should fill the available space.
--   
--   Default value: <a>True</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupChildFill :: ToolItemGroupClass group => Attr group Bool

-- | Whether the item should be the same size as other homogeneous items.
--   
--   Default value: <a>True</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupChildHomogeneous :: ToolItemGroupClass group => Attr group Bool

-- | Whether the item should start a new row.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupChildNewRow :: ToolItemGroupClass group => Attr group Bool

-- | Position of the item within this group.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGroupChildPosition :: ToolItemGroupClass group => Attr group Int


-- | The base class of widgets that can be added to <a>Toolbar</a>
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.ToolItem
data ToolItem
class BinClass o => ToolItemClass o
castToToolItem :: GObjectClass obj => obj -> ToolItem
gTypeToolItem :: GType
toToolItem :: ToolItemClass o => o -> ToolItem

-- | Creates a new <a>ToolItem</a>
toolItemNew :: IO ToolItem

-- | Sets whether the tool item is to be allocated the same size as other
--   homogeneous items. The effect is that all homogeneous items will have
--   the same width as the widest of the items.
toolItemSetHomogeneous :: ToolItemClass self => self -> Bool -> IO ()

-- | Returns whether the tool item is the same size as other homogeneous
--   items. See <a>toolItemSetHomogeneous</a>.
toolItemGetHomogeneous :: ToolItemClass self => self -> IO Bool

-- | Sets whether the tool item is allocated extra space when there is more
--   room on the toolbar then needed for the items. The effect is that the
--   item gets bigger when the toolbar gets bigger and smaller when the
--   toolbar gets smaller.
toolItemSetExpand :: ToolItemClass self => self -> Bool -> IO ()

-- | Returns whether the tool item is allocated extra space. See
--   <a>toolItemSetExpand</a>.
toolItemGetExpand :: ToolItemClass self => self -> IO Bool

-- | Sets the <a>Tooltips</a> object to be used for the tool item, the text
--   to be displayed as tooltip on the item and the private text to be
--   used. See <tt>tooltipsSetTip</tt>.
--   
--   Removed in Gtk3.
toolItemSetTooltip :: (ToolItemClass self, GlibString string) => self -> Tooltips -> string -> string -> IO ()

-- | Sets whether toolitem has a drag window. When <tt>True</tt> the tool
--   item can be used as a drag source through <tt>dragSourceSet</tt>. When
--   the tool item has a drag window it will intercept all events, even
--   those that would otherwise be sent to a child widget.
toolItemSetUseDragWindow :: ToolItemClass self => self -> Bool -> IO ()

-- | Returns whether the tool item has a drag window. See
--   <a>toolItemSetUseDragWindow</a>.
toolItemGetUseDragWindow :: ToolItemClass self => self -> IO Bool

-- | Sets whether the tool item is visible when the toolbar is docked
--   horizontally.
toolItemSetVisibleHorizontal :: ToolItemClass self => self -> Bool -> IO ()

-- | Returns whether the tool item is visible on toolbars that are docked
--   horizontally.
toolItemGetVisibleHorizontal :: ToolItemClass self => self -> IO Bool

-- | Sets whether the tool item is visible when the toolbar is docked
--   vertically. Some tool items, such as text entries, are too wide to be
--   useful on a vertically docked toolbar. If <tt>False</tt> the tool item
--   will not appear on toolbars that are docked vertically.
toolItemSetVisibleVertical :: ToolItemClass self => self -> Bool -> IO ()

-- | Returns whether the tool item is visible when the toolbar is docked
--   vertically. See <a>toolItemSetVisibleVertical</a>.
toolItemGetVisibleVertical :: ToolItemClass self => self -> IO Bool

-- | Sets whether the tool item should be considered important. The
--   <a>ToolButton</a> class uses this property to determine whether to
--   show or hide its label when the toolbar style is
--   <a>ToolbarBothHoriz</a>. The result is that only tool buttons with the
--   "is important" property set have labels, an effect known as "priority
--   text".
toolItemSetIsImportant :: ToolItemClass self => self -> Bool -> IO ()

-- | Returns whether the tool item is considered important. See
--   <a>toolItemSetIsImportant</a>
toolItemGetIsImportant :: ToolItemClass self => self -> IO Bool

-- | The size of an icon in pixels.
--   
--   <ul>
--   <li>This enumeration contains one case that is not exported and which
--   is used when new sizes are registered using
--   <a>iconSizeRegister</a>.</li>
--   <li>Applying <a>show</a> to this type will reveal the name of the size
--   that is registered with Gtk+.</li>
--   </ul>
data IconSize

-- | Returns the icon size used for the tool item.
toolItemGetIconSize :: ToolItemClass self => self -> IO IconSize

-- | Orientation is good
data Orientation
[OrientationHorizontal] :: Orientation
[OrientationVertical] :: Orientation

-- | Returns the orientation used for the tool item.
toolItemGetOrientation :: ToolItemClass self => self -> IO Orientation

-- | Where to place the toolbar?
data ToolbarStyle
[ToolbarIcons] :: ToolbarStyle
[ToolbarText] :: ToolbarStyle
[ToolbarBoth] :: ToolbarStyle
[ToolbarBothHoriz] :: ToolbarStyle

-- | Returns the toolbar style used for the tool item.
--   
--   Possibilities are: [<a>ToolbarBoth</a>] meaning the tool item should
--   show both an icon and a label, stacked vertically
--   [<a>ToolbarIcons</a>] meaning the toolbar shows only icons
--   [<a>ToolbarText</a>] meaning the tool item should only show text
--   [<a>ToolbarBothHoriz</a>] meaning the tool item should show both an
--   icon and a label, arranged horizontally
toolItemGetToolbarStyle :: ToolItemClass self => self -> IO ToolbarStyle

-- | I don't have a clue.
data ReliefStyle
[ReliefNormal] :: ReliefStyle
[ReliefHalf] :: ReliefStyle
[ReliefNone] :: ReliefStyle

-- | Returns the relief style of the tool item. See
--   <tt>buttonSetReliefStyle</tt>.
toolItemGetReliefStyle :: ToolItemClass self => self -> IO ReliefStyle

-- | Returns the <a>MenuItem</a> that was last set by
--   <a>toolItemSetProxyMenuItem</a>, ie. the <a>MenuItem</a> that is going
--   to appear in the overflow menu.
toolItemRetrieveProxyMenuItem :: ToolItemClass self => self -> IO (Maybe Widget)

-- | If <tt>menuItemId</tt> matches the string passed to
--   <a>toolItemSetProxyMenuItem</a> return the corresponding
--   <a>MenuItem</a>.
toolItemGetProxyMenuItem :: (ToolItemClass self, GlibString string) => self -> string -> IO (Maybe Widget)

-- | Sets the <a>MenuItem</a> used in the toolbar overflow menu. The
--   <tt>menuItemId</tt> is used to identify the caller of this function
--   and should also be used with <a>toolItemGetProxyMenuItem</a>.
toolItemSetProxyMenuItem :: (ToolItemClass self, MenuItemClass menuItem, GlibString string) => self -> string -> menuItem -> IO ()

-- | Returns the ellipsize mode used for <tt>toolItem</tt>. Custom
--   subclasses of <a>ToolItem</a> should call this function to find out
--   how text should be ellipsized.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
toolItemGetEllipsizeMode :: ToolItemClass item => item -> IO EllipsizeMode

-- | Returns the text alignment used for <tt>toolItem</tt>. Custom
--   subclasses of <a>ToolItem</a> should call this function to find out
--   how text should be aligned.
toolItemGetTextAlignment :: ToolItemClass item => item -> IO Double

-- | Returns the text orientation used for <tt>toolItem</tt>. Custom
--   subclasses of <a>ToolItem</a> should call this function to find out
--   how text should be orientated.
toolItemGetTextOrientation :: ToolItemClass item => item -> IO Orientation

-- | Returns the size group used for labels in <tt>toolItem</tt>. Custom
--   subclasses of <a>ToolItem</a> should call this function and use the
--   size group for labels.
toolItemGetTextSizeGroup :: ToolItemClass item => item -> IO SizeGroup

-- | Whether the toolbar item is visible when the toolbar is in a
--   horizontal orientation.
--   
--   Default value: <tt>True</tt>
toolItemVisibleHorizontal :: ToolItemClass self => Attr self Bool

-- | Whether the toolbar item is visible when the toolbar is in a vertical
--   orientation.
--   
--   Default value: <tt>True</tt>
toolItemVisibleVertical :: ToolItemClass self => Attr self Bool

-- | Whether the toolbar item is considered important. When <tt>True</tt>,
--   toolbar buttons show text in <a>ToolbarBothHoriz</a> mode.
--   
--   Default value: <tt>False</tt>
toolItemIsImportant :: ToolItemClass self => Attr self Bool

-- | 'expand' property. See <a>toolItemGetExpand</a> and
--   <a>toolItemSetExpand</a>
toolItemExpand :: ToolItemClass self => Attr self Bool

-- | 'homogeneous' property. See <a>toolItemGetHomogeneous</a> and
--   <a>toolItemSetHomogeneous</a>
toolItemHomogeneous :: ToolItemClass self => Attr self Bool

-- | 'useDragWindow' property. See <a>toolItemGetUseDragWindow</a> and
--   <a>toolItemSetUseDragWindow</a>
toolItemUseDragWindow :: ToolItemClass self => Attr self Bool


-- | A menu item used to tear off and reattach its menu
module Graphics.UI.Gtk.MenuComboToolbar.TearoffMenuItem
data TearoffMenuItem
class MenuItemClass o => TearoffMenuItemClass o
castToTearoffMenuItem :: GObjectClass obj => obj -> TearoffMenuItem
gTypeTearoffMenuItem :: GType
toTearoffMenuItem :: TearoffMenuItemClass o => o -> TearoffMenuItem

-- | Creates a new <a>TearoffMenuItem</a>.
tearoffMenuItemNew :: IO TearoffMenuItem


-- | A choice from multiple check menu items
module Graphics.UI.Gtk.MenuComboToolbar.RadioMenuItem
data RadioMenuItem
class CheckMenuItemClass o => RadioMenuItemClass o
castToRadioMenuItem :: GObjectClass obj => obj -> RadioMenuItem
gTypeRadioMenuItem :: GType
toRadioMenuItem :: RadioMenuItemClass o => o -> RadioMenuItem

-- | Creates a new <a>RadioMenuItem</a>.
radioMenuItemNew :: IO RadioMenuItem

-- | Creates a new <a>RadioMenuItem</a> whose child is a simple
--   <a>Label</a>.
radioMenuItemNewWithLabel :: GlibString string => string -> IO RadioMenuItem

-- | Creates a new <a>RadioMenuItem</a> containing a label. The label will
--   be created using <tt>labelNewWithMnemonic</tt>, so underscores in
--   <tt>label</tt> indicate the mnemonic for the menu item.
radioMenuItemNewWithMnemonic :: GlibString string => string -> IO RadioMenuItem

-- | Create a new radio button, adding it to the same group as the group to
--   which <tt>groupMember</tt> belongs.
radioMenuItemNewFromWidget :: RadioMenuItem -> IO RadioMenuItem

-- | Create a new radio button with a label, adding it to the same group as
--   the group to which <tt>groupMember</tt> belongs.
radioMenuItemNewWithLabelFromWidget :: GlibString string => RadioMenuItem -> string -> IO RadioMenuItem

-- | Create a new radio button with a label and attach it to the group of
--   another radio button. Underscores in the label string indicate the
--   mnemonic for the menu item.
radioMenuItemNewWithMnemonicFromWidget :: GlibString string => RadioMenuItem -> string -> IO RadioMenuItem

-- | Alias for <a>radioMenuItemNewFromWidget</a>.
radioMenuItemNewJoinGroup :: RadioMenuItem -> IO RadioMenuItem

-- | Alias for <a>radioMenuItemNewWithLabelFromWidget</a>.
radioMenuItemNewJoinGroupWithLabel :: GlibString string => RadioMenuItem -> string -> IO RadioMenuItem

-- | Alias for <a>radioMenuItemNewWithMnemonicFromWidget</a>.
radioMenuItemNewJoinGroupWithMnemonic :: GlibString string => RadioMenuItem -> string -> IO RadioMenuItem


-- | A widget used to choose from a list of valid choices
--   
--   <ul>
--   <li>Warning: this module is deprecated and should not be used in
--   newly-written code. It is empty in Gtk3.</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.OptionMenu
data OptionMenu
class ButtonClass o => OptionMenuClass o
castToOptionMenu :: GObjectClass obj => obj -> OptionMenu
gTypeOptionMenu :: GType
toOptionMenu :: OptionMenuClass o => o -> OptionMenu

-- | Create a new option menu.
optionMenuNew :: IO OptionMenu

-- | Returns the <a>Menu</a> associated with the <a>OptionMenu</a>.
optionMenuGetMenu :: OptionMenuClass self => self -> IO Menu

-- | Provides the <a>Menu</a> that is popped up to allow the user to choose
--   a new value. You should provide a simple menu avoiding the use of
--   tearoff menu items, submenus, and accelerators.
optionMenuSetMenu :: (OptionMenuClass self, MenuClass menu) => self -> menu -> IO ()

-- | Removes the menu from the option menu.
optionMenuRemoveMenu :: OptionMenuClass self => self -> IO ()

-- | Selects the menu item specified by <tt>index</tt> making it the newly
--   selected value for the option menu.
optionMenuSetHistory :: OptionMenuClass self => self -> Int -> IO ()

-- | Retrieves the index of the currently selected menu item. The menu
--   items are numbered from top to bottom, starting with 0.
optionMenuGetHistory :: OptionMenuClass self => self -> IO Int

-- | The menu of options.
optionMenuMenu :: (OptionMenuClass self, MenuClass menu) => ReadWriteAttr self Menu menu

-- | This signal is called if the selected option has changed.
onOMChanged :: OptionMenuClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is called if the selected option has changed.
afterOMChanged :: OptionMenuClass self => self -> IO () -> IO (ConnectId self)


-- | A base class for menu objects
module Graphics.UI.Gtk.MenuComboToolbar.MenuShell
data MenuShell
class ContainerClass o => MenuShellClass o
castToMenuShell :: GObjectClass obj => obj -> MenuShell
gTypeMenuShell :: GType
toMenuShell :: MenuShellClass o => o -> MenuShell

-- | Adds a new <a>MenuItem</a> to the end of the menu shell's item list.
menuShellAppend :: (MenuShellClass self, MenuItemClass child) => self -> child -> IO ()

-- | Adds a new <a>MenuItem</a> to the beginning of the menu shell's item
--   list.
menuShellPrepend :: (MenuShellClass self, MenuItemClass child) => self -> child -> IO ()

-- | Adds a new <a>MenuItem</a> to the menu shell's item list at the
--   position indicated by <tt>position</tt>.
menuShellInsert :: (MenuShellClass self, MenuItemClass child) => self -> child -> Int -> IO ()

-- | Deactivates the menu shell. Typically this results in the menu shell
--   being erased from the screen.
menuShellDeactivate :: MenuShellClass self => self -> IO ()

-- | Activates the menu item within the menu shell. If the menu was
--   deactivated and <tt>forceDeactivate</tt> is set, the previously
--   deactivated menu is reactivated.
menuShellActivateItem :: (MenuShellClass self, MenuItemClass menuItem) => self -> menuItem -> Bool -> IO ()

-- | Selects the menu item from the menu shell.
menuShellSelectItem :: (MenuShellClass self, MenuItemClass menuItem) => self -> menuItem -> IO ()

-- | Deselects the currently selected item from the menu shell, if any.
menuShellDeselect :: MenuShellClass self => self -> IO ()

-- | Select the first visible or selectable child of the menu shell; don't
--   select tearoff items unless the only item is a tearoff item.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
menuShellSelectFirst :: MenuShellClass self => self -> Bool -> IO ()

-- | Cancels the selection within the menu shell.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
menuShellCancel :: MenuShellClass self => self -> IO ()

-- | If <tt>takeFocus</tt> is <tt>True</tt> (the default) the menu shell
--   will take the keyboard focus so that it will receive all keyboard
--   events which is needed to enable keyboard navigation in menus.
--   
--   Setting <tt>takeFocus</tt> to <tt>False</tt> is useful only for
--   special applications like virtual keyboard implementations which
--   should not take keyboard focus.
--   
--   The <tt>takeFocus</tt> state of a menu or menu bar is automatically
--   propagated to submenus whenever a submenu is popped up, so you don't
--   have to worry about recursively setting it for your entire menu
--   hierarchy. Only when programmatically picking a submenu and popping it
--   up manually, the <tt>takeFocus</tt> property of the submenu needs to
--   be set explicitely.
--   
--   Note that setting it to <tt>False</tt> has side-effects:
--   
--   If the focus is in some other app, it keeps the focus and keynav in
--   the menu doesn't work. Consequently, keynav on the menu will only work
--   if the focus is on some toplevel owned by the onscreen keyboard.
--   
--   To avoid confusing the user, menus with <tt>takeFocus</tt> set to
--   <tt>False</tt> should not display mnemonics or accelerators, since it
--   cannot be guaranteed that they will work.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
menuShellSetTakeFocus :: MenuShellClass self => self -> Bool -> IO ()

-- | Returns <tt>True</tt> if the menu shell will take the keyboard focus
--   on popup.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
menuShellGetTakeFocus :: MenuShellClass self => self -> IO Bool

-- | A boolean that determines whether the menu and its submenus grab the
--   keyboard focus. See <a>menuShellSetTakeFocus</a> and
--   <a>menuShellGetTakeFocus</a>.
--   
--   Default value: <tt>True</tt>
menuShellTakeFocus :: MenuShellClass self => Attr self Bool

-- | This signal is called if an item is activated. The boolean flag
--   <tt>hide</tt> is True whenever the menu will behidden after this
--   action.
onActivateCurrent :: MenuShellClass self => self -> (Bool -> IO ()) -> IO (ConnectId self)

-- | This signal is called if an item is activated. The boolean flag
--   <tt>hide</tt> is True whenever the menu will behidden after this
--   action.
afterActivateCurrent :: MenuShellClass self => self -> (Bool -> IO ()) -> IO (ConnectId self)

-- | This signal will be emitted when a selection is aborted and thus does
--   not lead to an activation. This is in contrast to the
--   <tt>selection</tt> done signal which is always emitted.
onCancel :: MenuShellClass self => self -> IO () -> IO (ConnectId self)

-- | This signal will be emitted when a selection is aborted and thus does
--   not lead to an activation. This is in contrast to the
--   <tt>selection</tt> done signal which is always emitted.
afterCancel :: MenuShellClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is sent whenever the menu shell is deactivated (hidden).
onDeactivated :: MenuShellClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is sent whenever the menu shell is deactivated (hidden).
afterDeactivated :: MenuShellClass self => self -> IO () -> IO (ConnectId self)

-- | From where was a menu item entered?
data MenuDirectionType
[MenuDirParent] :: MenuDirectionType
[MenuDirChild] :: MenuDirectionType
[MenuDirNext] :: MenuDirectionType
[MenuDirPrev] :: MenuDirectionType

-- | This signal is emitted for each move the cursor makes.
onMoveCurrent :: MenuShellClass self => self -> (MenuDirectionType -> IO ()) -> IO (ConnectId self)

-- | This signal is emitted for each move the cursor makes.
afterMoveCurrent :: MenuShellClass self => self -> (MenuDirectionType -> IO ()) -> IO (ConnectId self)

-- | This signal is emitted when the user finished using the menu. Note
--   that this signal is emitted even if no menu item was activated.
onSelectionDone :: MenuShellClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is emitted when the user finished using the menu. Note
--   that this signal is emitted even if no menu item was activated.
afterSelectionDone :: MenuShellClass self => self -> IO () -> IO (ConnectId self)


-- | The widget used for item in menus
module Graphics.UI.Gtk.MenuComboToolbar.MenuItem
data MenuItem
class ItemClass o => MenuItemClass o
castToMenuItem :: GObjectClass obj => obj -> MenuItem
gTypeMenuItem :: GType
toMenuItem :: MenuItemClass o => o -> MenuItem

-- | Creates a new <a>MenuItem</a>.
menuItemNew :: IO MenuItem

-- | Creates a new <a>MenuItem</a> whose child is a <a>Label</a>.
menuItemNewWithLabel :: GlibString string => string -> IO MenuItem

-- | Creates a new <a>MenuItem</a> containing a label. The label will be
--   created using <tt>labelNewWithMnemonic</tt>, so underscores in
--   <tt>label</tt> indicate the mnemonic for the menu item.
menuItemNewWithMnemonic :: GlibString string => string -> IO MenuItem

-- | Sets text on the MenuItem label
menuItemSetLabel :: (MenuItemClass self, GlibString string) => self -> string -> IO ()

-- | Gets text on the MenuItem label
menuItemGetLabel :: (MenuItemClass self, GlibString string) => self -> IO string

-- | If True, an underline in the text indicates the next character should
--   be used for the mnemonic accelerator key.
menuItemSetUseUnderline :: (MenuItemClass self) => self -> Bool -> IO ()

-- | Checks if an underline in the text indicates the next character should
--   be used for the mnemonic accelerator key.
menuItemGetUseUnderline :: (MenuItemClass self) => self -> IO Bool

-- | Sets the item's submenu, or changes it.
menuItemSetSubmenu :: (MenuItemClass self, MenuClass submenu) => self -> submenu -> IO ()

-- | Gets the submenu underneath this menu item, if any. See
--   <a>menuItemSetSubmenu</a>.
menuItemGetSubmenu :: MenuItemClass self => self -> IO (Maybe Widget)

-- | Removes the item's submenu.
menuItemRemoveSubmenu :: MenuItemClass self => self -> IO ()

-- | Select the menu item. Emits the "select" signal on the item.
menuItemEmitSelect :: MenuItemClass self => self -> IO ()

-- | Deselect the menu item. Emits the "deselect" signal on the item.
menuItemEmitDeselect :: MenuItemClass self => self -> IO ()

-- | Simulate a click on the menu item. Emits the "activate" signal on the
--   item.
menuItemEmitActivate :: MenuItemClass self => self -> IO ()

-- | Sets whether the menu item appears justified at the right side of a
--   menu bar. This was traditionally done for "Help" menu items, but is
--   now considered a bad idea. (If the widget layout is reversed for a
--   right-to-left language like Hebrew or Arabic,
--   right-justified-menu-items appear at the left.)
menuItemSetRightJustified :: MenuItemClass self => self -> Bool -> IO ()

-- | Gets whether the menu item appears justified at the right side of the
--   menu bar.
menuItemGetRightJustified :: MenuItemClass self => self -> IO Bool

-- | Set the accelerator path on the menu item, through which runtime
--   changes of the menu item's accelerator caused by the user can be
--   identified and saved to persistant storage (see <tt>accelMapSave</tt>
--   on this). To setup a default accelerator for this menu item, call
--   <tt>accelMapAddEntry</tt> with the same accel path. See also
--   <tt>accelMapAddEntry</tt> on the specifics of accelerator paths, and
--   <tt>menuSetAccelPath</tt> for a more convenient variant of this
--   function.
--   
--   This function is basically a convenience wrapper that handles calling
--   <tt>widgetSetAccelPath</tt> with the appropriate accelerator group for
--   the menu item.
--   
--   Note that you do need to set an accelerator on the parent menu with
--   <tt>menuSetAccelGroup</tt> for this to work.
menuItemSetAccelPath :: (MenuItemClass self, GlibString string) => self -> Maybe string -> IO ()

-- | 'submenu' property. See <a>menuItemGetSubmenu</a> and
--   <a>menuItemSetSubmenu</a>
menuItemSubmenu :: (MenuItemClass self, MenuClass submenu) => ReadWriteAttr self (Maybe Widget) submenu

-- | 'rightJustified' property. See <a>menuItemGetRightJustified</a> and
--   <a>menuItemSetRightJustified</a>
menuItemRightJustified :: MenuItemClass self => Attr self Bool

-- | 'label' property. See <a>menuItemSetLabel</a> and
--   <a>menuItemGetLabel</a>
menuItemLabel :: (MenuItemClass self, GlibString string) => Attr self string

-- | 'useUnderline' property. See <a>menuItemSetUseUnderline</a> and
--   <tt>menuItemGetUseEUnderline</tt>
menuItemUseUnderline :: MenuItemClass self => Attr self Bool

-- | Emitted when the user chooses a menu item that has a submenu.
--   
--   <ul>
--   <li>This signal is not emitted if the menu item does not have a
--   submenu.</li>
--   </ul>
menuItemActivatedItem :: MenuItemClass self => Signal self (IO ())

-- | The user has chosen the menu item.
--   
--   <ul>
--   <li>This is the only function applications normally connect to. It is
--   not emitted if the item has a submenu.</li>
--   </ul>
menuItemActivated :: MenuItemClass self => Signal self (IO ())

-- | Deprecated. See <a>menuItemActivatedItem</a>.
menuItemActivateItem :: MenuItemClass self => Signal self (IO ())

-- | Deprecated. See <a>menuItemActivated</a>.
menuItemActivate :: MenuItemClass self => Signal self (IO ())

-- | This signal is emitted when the item is selected.
menuItemSelect :: MenuItemClass i => Signal i (IO ())

-- | This signal is emitted when the item is deselected.
menuItemDeselect :: MenuItemClass i => Signal i (IO ())

-- | This signal is emitted when the item is toggled.
menuItemToggle :: MenuItemClass i => Signal i (IO ())
onActivateItem :: MenuItemClass self => self -> IO () -> IO (ConnectId self)
afterActivateItem :: MenuItemClass self => self -> IO () -> IO (ConnectId self)
onActivateLeaf :: MenuItemClass self => self -> IO () -> IO (ConnectId self)
afterActivateLeaf :: MenuItemClass self => self -> IO () -> IO (ConnectId self)
onSelect :: ItemClass i => i -> IO () -> IO (ConnectId i)
afterSelect :: ItemClass i => i -> IO () -> IO (ConnectId i)
onDeselect :: ItemClass i => i -> IO () -> IO (ConnectId i)
afterDeselect :: ItemClass i => i -> IO () -> IO (ConnectId i)
onToggle :: ItemClass i => i -> IO () -> IO (ConnectId i)
afterToggle :: ItemClass i => i -> IO () -> IO (ConnectId i)


-- | A subclass widget for <a>MenuShell</a> which holds <a>MenuItem</a>
--   widgets
module Graphics.UI.Gtk.MenuComboToolbar.MenuBar
data MenuBar
class MenuShellClass o => MenuBarClass o
castToMenuBar :: GObjectClass obj => obj -> MenuBar
gTypeMenuBar :: GType
toMenuBar :: MenuBarClass o => o -> MenuBar

-- | Determines how to pack a menu bar: left-to-right, right-to-left,
--   top-to-bottom or bottom-to-top.
data PackDirection
[PackDirectionLtr] :: PackDirection
[PackDirectionRtl] :: PackDirection
[PackDirectionTtb] :: PackDirection
[PackDirectionBtt] :: PackDirection

-- | Creates the new <a>MenuBar</a>
menuBarNew :: IO MenuBar

-- | Sets how items should be packed inside a menubar.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
menuBarSetPackDirection :: MenuBarClass self => self -> PackDirection -> IO ()

-- | Retrieves the current pack direction of the menubar. See
--   <a>menuBarSetPackDirection</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
menuBarGetPackDirection :: MenuBarClass self => self -> IO PackDirection

-- | Sets how widgets should be packed inside the children of a menubar.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
menuBarSetChildPackDirection :: MenuBarClass self => self -> PackDirection -> IO ()

-- | Retrieves the current child pack direction of the menubar. See
--   <a>menuBarSetChildPackDirection</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
menuBarGetChildPackDirection :: MenuBarClass self => self -> IO PackDirection

-- | The pack direction of the menubar. It determines how menuitems are
--   arranged in the menubar.
--   
--   Default value: <a>PackDirectionLtr</a>
menuBarPackDirection :: MenuBarClass self => Attr self PackDirection

-- | The pack direction of the menubar. It determines how the widgets
--   contained in child menuitems are arranged.
--   
--   Default value: <a>PackDirectionLtr</a>
menuBarChildPackDirection :: MenuBarClass self => Attr self PackDirection
instance Enum PackDirection


-- | A menu item with a check box
module Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem
data CheckMenuItem
class MenuItemClass o => CheckMenuItemClass o
castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem
gTypeCheckMenuItem :: GType
toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem

-- | Creates a new <a>CheckMenuItem</a>.
checkMenuItemNew :: IO CheckMenuItem

-- | Creates a new <a>CheckMenuItem</a> with a label.
checkMenuItemNewWithLabel :: GlibString string => string -> IO CheckMenuItem

-- | Creates a new <a>CheckMenuItem</a> containing a label. The label will
--   be created using <a>labelNewWithMnemonic</a>, so underscores in
--   <tt>label</tt> indicate the mnemonic for the menu item.
checkMenuItemNewWithMnemonic :: GlibString string => string -> IO CheckMenuItem

-- | Sets the active state of the menu item's check box.
checkMenuItemSetActive :: CheckMenuItemClass self => self -> Bool -> IO ()

-- | Returns whether the check menu item is active. See
--   <a>checkMenuItemSetActive</a>.
checkMenuItemGetActive :: CheckMenuItemClass self => self -> IO Bool

-- | Emits the toggled signal.
checkMenuItemEmitToggled :: CheckMenuItemClass self => self -> IO ()

-- | If the user has selected a range of elements (such as some text or
--   spreadsheet cells) that are affected by a boolean setting, and the
--   current values in that range are inconsistent, you may want to display
--   the check in an "in between" state. This function turns on "in
--   between" display. Normally you would turn off the inconsistent state
--   again if the user explicitly selects a setting. This has to be done
--   manually, <a>checkMenuItemSetInconsistent</a> only affects visual
--   appearance, it doesn't affect the semantics of the widget.
checkMenuItemSetInconsistent :: CheckMenuItemClass self => self -> Bool -> IO ()

-- | Query if the menu check is drawn as inconsistent (inbetween). See
--   <a>checkMenuItemSetInconsistent</a>.
checkMenuItemGetInconsistent :: CheckMenuItemClass self => self -> IO Bool

-- | Returns whether the menu item is drawn like a <a>RadioMenuItem</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
checkMenuItemGetDrawAsRadio :: CheckMenuItemClass self => self -> IO Bool

-- | Sets whether the menu item is drawn like a <a>RadioMenuItem</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
checkMenuItemSetDrawAsRadio :: CheckMenuItemClass self => self -> Bool -> IO ()

-- | Whether the menu item is checked.
--   
--   Default value: <tt>False</tt>
checkMenuItemActive :: CheckMenuItemClass self => Attr self Bool

-- | Whether to display an "inconsistent" state.
--   
--   Default value: <tt>False</tt>
checkMenuItemInconsistent :: CheckMenuItemClass self => Attr self Bool

-- | Whether the menu item looks like a radio menu item.
--   
--   Default value: <tt>False</tt>
checkMenuItemDrawAsRadio :: CheckMenuItemClass self => Attr self Bool

-- | This signal is emitted when the state of the check box is changed.
checkMenuItemToggled :: CheckMenuItemClass self => Signal self (IO ())


-- | A persistent index into a tree model.
module Graphics.UI.Gtk.ModelView.TreeRowReference

-- | Tree Row Reference : like a <a>TreePath</a> it points to a subtree or
--   node, but it is persistent. It identifies the same node (so long as it
--   exists) even when items are added, removed, or reordered.
data TreeRowReference

-- | Creates a row reference based on a path. This reference will keep
--   pointing to the node pointed to by the given path, so long as it
--   exists. Returns <tt>Nothing</tt> if there is no node at the given
--   path.
treeRowReferenceNew :: TreeModelClass self => self -> TreePath -> IO (Maybe TreeRowReference)

-- | Returns a path that the row reference currently points to.
--   
--   <ul>
--   <li>The returned path may be the empty list if the reference was
--   invalid.</li>
--   </ul>
treeRowReferenceGetPath :: TreeRowReference -> IO TreePath

-- | Returns True if the reference refers to a current valid path.
treeRowReferenceValid :: TreeRowReference -> IO Bool


-- | The interface for sortable models used by <a>TreeView</a>
module Graphics.UI.Gtk.ModelView.TreeSortable
data TreeSortable
class GObjectClass o => TreeSortableClass o
castToTreeSortable :: GObjectClass obj => obj -> TreeSortable
gTypeTreeSortable :: GType
toTreeSortable :: TreeSortableClass o => o -> TreeSortable

-- | ID number of a sort column.
--   
--   <ul>
--   <li>A <a>SortColumnId</a> is a logical number to which a sorting
--   function can be associated. The number does not have to coincide with
--   any column number.</li>
--   </ul>
type SortColumnId = Int

-- | A special <a>SortColumnId</a> to indicated that the default sorting
--   function is used.
treeSortableDefaultSortColumnId :: SortColumnId

-- | Query the sort column id that is currently in use. The return value
--   may be the special constant <a>treeSortableDefaultSortColumnId</a> in
--   which case the returned Boolean flag is <tt>False</tt>.
treeSortableGetSortColumnId :: TreeSortableClass self => self -> IO (SortType, Bool, SortColumnId)

-- | Sets the current sort column to be <tt>sortColumnId</tt>. The
--   <tt>sortable</tt> will resort itself to reflect this change, after
--   emitting a <a>sortColumnChanged</a> signal. If <tt>sortColumnId</tt>
--   is <a>treeSortableDefaultSortColumnId</a>, then the default sort
--   function will be used, if it is set. Note that this function is mainly
--   used by the view and that the user program should simply set the
--   <a>SortColumnId</a> of the <a>TreeViewColumn</a>s.
treeSortableSetSortColumnId :: TreeSortableClass self => self -> SortColumnId -> SortType -> IO ()

-- | Sets the comparison function used when sorting to be
--   <tt>sortFunc</tt>. If the current sort column id of <tt>self</tt> is
--   the same as <tt>sortColumnId</tt>, then the model will sort using this
--   function.
treeSortableSetSortFunc :: TreeSortableClass self => self -> SortColumnId -> (TreeIter -> TreeIter -> IO Ordering) -> IO ()

-- | Sets the default comparison function used when sorting to be
--   <tt>sortFunc</tt>. If the current sort column id of <tt>self</tt> is
--   <a>treeSortableDefaultSortColumnId</a> then the model will sort using
--   this function.
--   
--   | If <tt>sortFunc</tt> is <a>Nothing</a>, 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
--   <tt>TreeSortableDefaultSortColumnId</tt>, the model will be unsorted.
treeSortableSetDefaultSortFunc :: TreeSortableClass self => self -> Maybe (TreeIter -> TreeIter -> IO Ordering) -> IO ()

-- | Returns <tt>True</tt> if the model has a default sort function. This
--   is used primarily by <a>TreeViewColumn</a>s in order to determine if a
--   model has a default ordering or if the entries are retrieved in the
--   sequence in which they are stored in the model.
treeSortableHasDefaultSortFunc :: TreeSortableClass self => self -> IO Bool

-- | Emits a <a>sortColumnChanged</a> signal on the model.
treeSortableSortColumnChanged :: TreeSortableClass self => self -> IO ()
sortColumnChanged :: TreeSortableClass self => Signal self (IO ())


-- | Interfaces for drag-and-drop support in <a>TreeView</a>.
module Graphics.UI.Gtk.ModelView.TreeDrag
treeModelEqual :: (TreeModelClass tm1, TreeModelClass tm2) => tm1 -> tm2 -> Bool

-- | The <tt>SelectionTag</tt>, <a>TargetTag</a> and
--   <tt>SelectionTypeTag</tt> of the DND mechanism of <a>ListStore</a> and
--   <a>TreeStore</a>. This tag is used by <a>treeGetRowDragData</a> and
--   <a>treeSetRowDragData</a> to store a store and a <a>TreePath</a> in a
--   <a>SelectionDataM</a>. This target should be added to a
--   <a>TargetList</a> using <a>TargetSameWidget</a> flag and an
--   <a>InfoId</a> of <tt>0</tt>.
targetTreeModelRow :: TargetTag

-- | Obtains a <a>TreeModel</a> and a path from <a>SelectionDataM</a>
--   whenever the target is <a>targetTreeModelRow</a>. Normally called from
--   a <tt>treeDragDestDragDataReceived</tt> handler.
treeGetRowDragData :: SelectionDataM (Maybe (TreeModel, TreePath))

-- | Sets selection data with the target <a>targetTreeModelRow</a>,
--   consisting of a <a>TreeModel</a> and a <a>TreePath</a>. Normally used
--   in a <tt>treeDragSourceDragDataGet</tt> handler.
--   
--   <ul>
--   <li>Returns <tt>True</tt> if setting the data was successful.</li>
--   </ul>
treeSetRowDragData :: TreeModelClass treeModel => treeModel -> TreePath -> SelectionDataM Bool


-- | Allows a custom data structure to be used with the <a>TreeView</a> and
--   other widgets that follow the model-view-controller paradigm. The two
--   models <a>ListStore</a> and <a>TreeStore</a> are based on the
--   <a>CustomStore</a>. Even if no application-specific tree model should
--   be implemented, this module is relevant in that it provides the
--   functions <a>customStoreSetColumn</a> and <a>customStoreGetRow</a>
--   functions.
module Graphics.UI.Gtk.ModelView.CustomStore

-- | A <a>CustomStore</a> is an instance of a Gtk+ <a>TreeModel</a> and can
--   thus be used for any widget that stores data in a <a>TreeModel</a>.
--   The user may either create an instance of a <a>CustomStore</a> or use
--   one of the pre-defined models <a>ListStore</a> or <a>TreeStore</a>.
data CustomStore private row

-- | These flags indicate various properties of a <a>TreeModel</a>.
--   
--   <ul>
--   <li>If a model has <a>TreeModelItersPersist</a> set, iterators remain
--   valid after a <a>TreeModel</a> signal was emitted.</li>
--   <li>The <a>TreeModelListOnly</a> flag is set if the rows are arranged
--   in a simple flat list. This is set in the <a>ListStore</a>
--   implementation.</li>
--   </ul>
data TreeModelFlags
[TreeModelItersPersist] :: TreeModelFlags
[TreeModelListOnly] :: TreeModelFlags

-- | The <a>TreeModelIface</a> structure contains all functions that are
--   required to implement an application-specific <a>TreeModel</a>.
data TreeModelIface row
[TreeModelIface] :: IO [TreeModelFlags] -> (TreePath -> IO (Maybe TreeIter)) -> (TreeIter -> IO TreePath) -> (TreeIter -> IO row) -> (TreeIter -> IO (Maybe TreeIter)) -> (Maybe TreeIter -> IO (Maybe TreeIter)) -> (TreeIter -> IO Bool) -> (Maybe TreeIter -> IO Int) -> (Maybe TreeIter -> Int -> IO (Maybe TreeIter)) -> (TreeIter -> IO (Maybe TreeIter)) -> (TreeIter -> IO ()) -> (TreeIter -> IO ()) -> TreeModelIface row

-- | Return the flags that are valid for this model.
[treeModelIfaceGetFlags] :: TreeModelIface row -> IO [TreeModelFlags]

-- | Convert an path into the tree into a more concise <a>TreeIter</a>.
--   Return <tt>Nothing</tt> if the path does not exit.
[treeModelIfaceGetIter] :: TreeModelIface row -> TreePath -> IO (Maybe TreeIter)

-- | Convert an iterator to a path. The iterator will always be valid.
[treeModelIfaceGetPath] :: TreeModelIface row -> TreeIter -> IO TreePath

-- | Retrieve a row at the given iterator.
[treeModelIfaceGetRow] :: TreeModelIface row -> TreeIter -> IO row

-- | Advance the given iterator to the next node at the same level. Return
--   <tt>Nothing</tt> if there is no next node at this level.
[treeModelIfaceIterNext] :: TreeModelIface row -> TreeIter -> IO (Maybe TreeIter)

-- | Advance the given iterator to the first child of this iterator. Return
--   <tt>Notihing</tt> if the node at this iterator has no children.
[treeModelIfaceIterChildren] :: TreeModelIface row -> Maybe TreeIter -> IO (Maybe TreeIter)

-- | Check if the node at the given iterator has children.
[treeModelIfaceIterHasChild] :: TreeModelIface row -> TreeIter -> IO Bool

-- | Query the number of children the the node at the given iteratore has.
[treeModelIfaceIterNChildren] :: TreeModelIface row -> Maybe TreeIter -> IO Int

-- | Ask for an iterator to the <tt>n</tt>th child. Return <tt>Nothing</tt>
--   if no such child exists.
[treeModelIfaceIterNthChild] :: TreeModelIface row -> Maybe TreeIter -> Int -> IO (Maybe TreeIter)

-- | Ask for an iterator to the parent of the node.
[treeModelIfaceIterParent] :: TreeModelIface row -> TreeIter -> IO (Maybe TreeIter)

-- | Increase a reference count for this node. A positive reference count
--   indicates that the node is used (that is, most likely it is visible)
--   in at least one widget. Tracking reference counts for nodes is
--   optional but may be useful to infer when a given row can be discarded
--   if it was retrieved from an external source.
[treeModelIfaceRefNode] :: TreeModelIface row -> TreeIter -> IO ()

-- | Decrement the reference count of the given node.
[treeModelIfaceUnrefNode] :: TreeModelIface row -> TreeIter -> IO ()

-- | A structure containing functions that enable this widget to be used as
--   a source in drag-and-drop.
data DragSourceIface model row
[DragSourceIface] :: (model row -> TreePath -> IO Bool) -> (model row -> TreePath -> SelectionDataM Bool) -> (model row -> TreePath -> IO Bool) -> DragSourceIface model row

-- | Determine if the row at the given path is draggable. Return
--   <tt>False</tt> if for some reason this row should not be dragged by
--   the user.
[treeDragSourceRowDraggable] :: DragSourceIface model row -> model row -> TreePath -> IO Bool

-- | Fill in the <a>SelectionDataM</a> structure with information on the
--   given node using <a>selectionDataSet</a>.
[treeDragSourceDragDataGet] :: DragSourceIface model row -> model row -> TreePath -> SelectionDataM Bool

-- | The widget is informed that the row at the given path should be
--   deleted as the result of this drag.
[treeDragSourceDragDataDelete] :: DragSourceIface model row -> model row -> TreePath -> IO Bool

-- | A structure containing functions that enable this widget to be used as
--   a target in drag-and-drop.
data DragDestIface model row
[DragDestIface] :: (model row -> TreePath -> SelectionDataM Bool) -> (model row -> TreePath -> SelectionDataM Bool) -> DragDestIface model row

-- | Tell the drag-and-drop mechanism if the row can be dropped at the
--   given path.
[treeDragDestRowDropPossible] :: DragDestIface model row -> model row -> TreePath -> SelectionDataM Bool

-- | The data in the <a>SelectionDataM</a> structure should be read using
--   <a>selectionDataGet</a> and its information be used to insert a new
--   row at the given path.
[treeDragDestDragDataReceived] :: DragDestIface model row -> model row -> TreePath -> SelectionDataM Bool

-- | Create a new store that implements the <a>TreeModelIface</a> interface
--   and optionally the <a>DragSourceIface</a> and the
--   <a>DragDestIface</a>. If the latter two are set to <tt>Nothing</tt> a
--   dummy interface is substituted that rejects every drag and drop.
customStoreNew :: (TreeModelClass (model row), TypedTreeModelClass model) => private -> ((CustomStore private row) -> model row) -> TreeModelIface row -> Maybe (DragSourceIface model row) -> Maybe (DragDestIface model row) -> IO (model row)

-- | Extract a row of the given model at the given <a>TreeIter</a>.
customStoreGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row

-- | Set or update a column mapping. This function should be used before
--   the model is installed into a widget since the number of defined
--   columns are only checked once by widgets.
customStoreSetColumn :: TypedTreeModelClass model => model row -> (ColumnId row ty) -> (row -> ty) -> IO ()

-- | Return the private data stored in this <a>CustomStore</a>. The private
--   data is meant as a container for the data stored in this model.
customStoreGetPrivate :: CustomStore private row -> private

-- | Query the current value of the stamp that is used to create
--   <a>TreeIter</a> iterators. The stamp is compared each time a view
--   accesses this store. If the stamp doesn't match, a warning is emitted.
--   The stamp should be updated each time a the data in the model changes.
--   The rationale is that a view should never use a stale <a>TreeIter</a>,
--   i.e., one that refers to an old model.
customStoreGetStamp :: CustomStore private row -> IO CInt

-- | Create a new stamp. See <a>customStoreGetStamp</a>.
customStoreInvalidateIters :: CustomStore private row -> IO ()
treeModelGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row
treeModelSetColumn :: TypedTreeModelClass model => model row -> (ColumnId row ty) -> (row -> ty) -> IO ()
instance Bounded TreeModelFlags
instance Enum TreeModelFlags
instance Flags TreeModelFlags
instance TreeModelClass (CustomStore private row)
instance GObjectClass (CustomStore private row)


-- | The tree interface used by <a>TreeView</a>.
module Graphics.UI.Gtk.ModelView.TreeModel
data TreeModel
class GObjectClass o => TreeModelClass o
castToTreeModel :: GObjectClass obj => obj -> TreeModel
gTypeTreeModel :: GType
toTreeModel :: TreeModelClass o => o -> TreeModel
data TypedTreeModel row
class TypedTreeModelClass model where dummy _ = error "not used"
toTypedTreeModel :: TypedTreeModelClass model => model row -> TypedTreeModel row

-- | Tree Iterator: a pointer to an entry in a <a>TreeModel</a>. The
--   constructor of this structure is public for the sake of creating
--   custom tree models. The first value is a time stamp that is handled by
--   the functions that interface with Gtk. The time stamps are used to
--   print warnings if programmers use an iter to a model that has changed
--   meanwhile. The other three fields are used by the custom model
--   implementation to implement an indexing scheme. The precise use of the
--   three words is therefore implementation specific. See also
--   <a>TreePath</a>.
data TreeIter
[TreeIter] :: {-# UNPACK #-} !CInt -> !Word32 -> !Word32 -> !Word32 -> TreeIter

-- | TreePath : a list of indices to specify a subtree or node in a
--   <a>TreeModel</a>. The node that correspond to a given <a>TreePath</a>
--   might change if nodes are removed or added and a <a>TreePath</a> may
--   refer to a different or even non-existent node after a modification of
--   the model. In contrast, a <a>TreeIter</a> is a more compact
--   representation of a <a>TreePath</a> which becomes invalid after each
--   modification of the underlying model. An intelligent index that is
--   adjusted with each update of the model to point to the same node
--   (whenever possible) is <a>TreeRowReference</a>.
type TreePath = [Int]

-- | The type of a tree column.
data ColumnId row ty

-- | Create a <a>ColumnId</a> to extract an integer.
makeColumnIdInt :: Int -> ColumnId row Int

-- | Create a <a>ColumnId</a> to extract an Boolean.
makeColumnIdBool :: Int -> ColumnId row Bool

-- | Create a <a>ColumnId</a> to extract an string.
makeColumnIdString :: GlibString string => Int -> ColumnId row string

-- | Create a <a>ColumnId</a> to extract an <a>Pixbuf</a>.
makeColumnIdPixbuf :: Int -> ColumnId row Pixbuf

-- | The invalid <a>ColumnId</a>. Widgets use this value if no column id
--   has been set.
invalidColumnId :: ColumnId row ty

-- | Convert a <a>ColumnId</a> to a bare number.
columnIdToNumber :: ColumnId row ty -> Int

-- | Convert a comma or colon separated string into a <a>TreePath</a>. Any
--   non-digit characters are assumed to separate indices, thus, the
--   function always is always successful.
stringToTreePath :: DefaultGlibString -> TreePath

-- | Returns a set of flags supported by this interface.
--   
--   The flags supported should not change during the lifecycle of the
--   tree_model.
treeModelGetFlags :: TreeModelClass self => self -> IO [TreeModelFlags]

-- | Turn a <a>TreePath</a> into a <a>TreeIter</a>.
--   
--   Returns <tt>Nothing</tt> if the given <a>TreePath</a> was invalid. The
--   empty list is always invalid. The root node of a tree can be accessed
--   by passing <tt>[0]</tt> as <tt>path</tt>.
treeModelGetIter :: TreeModelClass self => self -> TreePath -> IO (Maybe TreeIter)

-- | Turn a <a>String</a> into a <a>TreeIter</a>.
--   
--   <ul>
--   <li>Returns <tt>Nothing</tt> if the string is not a colon separated
--   list of numbers that references a valid node.</li>
--   </ul>
treeModelGetIterFromString :: (TreeModelClass self, GlibString string) => self -> string -> IO (Maybe TreeIter)

-- | Retrieves an <a>TreeIter</a> to the first entry.
--   
--   Returns <tt>Nothing</tt> if the table is empty.
treeModelGetIterFirst :: TreeModelClass self => self -> IO (Maybe TreeIter)

-- | Turn an abstract <a>TreeIter</a> into a <a>TreePath</a>.
--   
--   In case the given <a>TreeIter</a> was invalid, an empty list is
--   returned.
treeModelGetPath :: TreeModelClass self => self -> TreeIter -> IO TreePath

-- | Read the value of at a specific column and <a>TreeIter</a>.
treeModelGetValue :: TreeModelClass self => self -> TreeIter -> ColumnId row ty -> IO ty

-- | Retrieve an iterator to the node following it at the current level. If
--   there is no next node, <tt>Nothing</tt> is returned.
treeModelIterNext :: TreeModelClass self => self -> TreeIter -> IO (Maybe TreeIter)

-- | Retrieve an iterator to the first child of <tt>parent</tt>. If
--   <tt>parent</tt> has no children, <tt>Nothing</tt>.
treeModelIterChildren :: TreeModelClass self => self -> TreeIter -> IO (Maybe TreeIter)

-- | Returns <tt>True</tt> if <tt>iter</tt> has children, <tt>False</tt>
--   otherwise.
treeModelIterHasChild :: TreeModelClass self => self -> TreeIter -> IO Bool

-- | Returns the number of children that <tt>iter</tt> has. As a special
--   case, if <tt>iter</tt> is <tt>Nothing</tt>, then the number of
--   toplevel nodes is returned.
treeModelIterNChildren :: TreeModelClass self => self -> Maybe TreeIter -> IO Int

-- | Retrieve the <tt>n</tt>th child of <tt>parent</tt>, counting from
--   zero. If <tt>n</tt> is too big or <tt>parent</tt> has no children,
--   <tt>Nothing</tt> is returned. If <tt>Nothing</tt> is specified for the
--   <tt>parent</tt> argument, the function will return the <tt>n</tt>th
--   root node.
treeModelIterNthChild :: TreeModelClass self => self -> Maybe TreeIter -> Int -> IO (Maybe TreeIter)

-- | Retrieve the parent of this iterator.
treeModelIterParent :: TreeModelClass self => self -> TreeIter -> IO (Maybe TreeIter)

-- | Maps a function over each node in model in a depth-first fashion. If
--   it returns <tt>True</tt>, then the tree ceases to be walked, and
--   <a>treeModelForeach</a> returns.
treeModelForeach :: TreeModelClass self => self -> (TreeIter -> IO Bool) -> IO ()

-- | Generates a string representation of the iter. This string is a ':'
--   separated list of numbers. For example, "4:10:0:3" would be an
--   acceptable return value for this string.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
treeModelGetStringFromIter :: (TreeModelClass self, GlibString string) => self -> TreeIter -> IO string

-- | Lets the tree ref the node. This is an optional method for models to
--   implement. To be more specific, models may ignore this call as it
--   exists primarily for performance reasons.
--   
--   This function is primarily meant as a way for views to let caching
--   model know when nodes are being displayed (and hence, whether or not
--   to cache that node.) For example, a file-system based model would not
--   want to keep the entire file-hierarchy in memory, just the sections
--   that are currently being displayed by every current view.
--   
--   A model should be expected to be able to get an iter independent of
--   its reffed state.
treeModelRefNode :: TreeModelClass self => self -> TreeIter -> IO ()

-- | Lets the tree unref the node. This is an optional method for models to
--   implement. To be more specific, models may ignore this call as it
--   exists primarily for performance reasons.
--   
--   For more information on what this means, see <a>treeModelRefNode</a>.
--   Please note that nodes that are deleted are not unreffed.
treeModelUnrefNode :: TreeModelClass self => self -> TreeIter -> IO ()

-- | Emits the <a>rowChanged</a> signal on the model.
--   
--   <ul>
--   <li>This function is only necessary to implement a custom tree model.
--   When using <a>ListStore</a> or <a>TreeStore</a>, this function is
--   called automatically.</li>
--   </ul>
treeModelRowChanged :: TreeModelClass self => self -> TreePath -> TreeIter -> IO ()

-- | Emits the <a>rowInserted</a> signal on the model.
--   
--   <ul>
--   <li>This function is only necessary to implement a custom tree model.
--   When using <a>ListStore</a> or <a>TreeStore</a>, this function is
--   called automatically.</li>
--   </ul>
treeModelRowInserted :: TreeModelClass self => self -> TreePath -> TreeIter -> IO ()

-- | Emits the <a>rowHasChildToggled</a> signal on the model. This should
--   be called by models after the child state of a node changes.
--   
--   <ul>
--   <li>This function is only necessary to implement a custom tree model.
--   When using <a>ListStore</a> or <a>TreeStore</a>, this function is
--   called automatically.</li>
--   </ul>
treeModelRowHasChildToggled :: TreeModelClass self => self -> TreePath -> TreeIter -> IO ()

-- | Emits the <a>rowDeleted</a> signal on the model. This should be called
--   by models after a row has been removed. The location pointed to by
--   <tt>path</tt> should be the location that the row previously was at.
--   It may not be a valid location anymore.
--   
--   <ul>
--   <li>This function is only necessary to implement a custom tree model.
--   When using <a>ListStore</a> or <a>TreeStore</a>, this function is
--   called automatically.</li>
--   </ul>
treeModelRowDeleted :: TreeModelClass self => self -> TreePath -> IO ()

-- | Emits the <a>rowsReordered</a> signal on the model. This should be
--   called by models when their rows have been reordered. The length of
--   <tt>newOrder</tt> must be equal to the value returned by
--   <tt>treeModelIterNChildren self iter</tt>.
--   
--   <ul>
--   <li>This function is only necessary to implement a custom tree model.
--   When using <a>ListStore</a> or <a>TreeStore</a>, this function is
--   called automatically.</li>
--   </ul>
treeModelRowsReordered :: TreeModelClass self => self -> TreePath -> Maybe TreeIter -> [Int] -> IO ()

-- | This signal is emitted when a row in the model has changed.
rowChanged :: TreeModelClass self => Signal self (TreePath -> TreeIter -> IO ())

-- | This signal is emitted when a new row has been inserted in the model.
rowInserted :: TreeModelClass self => Signal self (TreePath -> TreeIter -> IO ())

-- | This signal is emitted when a row has gotten the first child row or
--   lost its last child row.
rowHasChildToggled :: TreeModelClass self => Signal self (TreePath -> TreeIter -> IO ())

-- | This signal is emitted when a row has been deleted.
--   
--   Note that no iterator is passed to the signal handler, since the row
--   is already deleted.
--   
--   Implementations of <a>TreeModel</a> must emit row-deleted
--   <i>before</i> removing the node from its internal data structures.
--   This is because models and views which access and monitor this model
--   might have references on the node which need to be released in the
--   <a>rowDeleted</a> handler.
rowDeleted :: TreeModelClass self => Signal self (TreePath -> IO ())

-- | This signal is emitted when the children of a node in the
--   <a>TreeModel</a> have been reordered. See
--   <a>treeModelRowsReordered</a> for more information about the
--   parameters that this signal carries.
--   
--   Note that this signal is <i>not</i> emitted when rows are reordered by
--   DND, since this is implemented by removing and then reinserting the
--   row.
rowsReordered :: TreeModelClass self => Signal self (TreePath -> Maybe TreeIter -> [Int] -> IO ())
instance Eq (ColumnId row ty)
instance Show (ColumnId row ty)


-- | Standard model to store list data.
module Graphics.UI.Gtk.ModelView.ListStore
data ListStore a

-- | Create a new <a>TreeModel</a> that contains a list of elements.
listStoreNew :: [a] -> IO (ListStore a)

-- | Create a new <a>TreeModel</a> that contains a list of elements. In
--   addition, specify two interfaces for drag and drop.
listStoreNewDND :: [a] -> Maybe (DragSourceIface ListStore a) -> Maybe (DragDestIface ListStore a) -> IO (ListStore a)

-- | Default drag functions for <a>ListStore</a>. These functions allow the
--   rows of the model to serve as drag source. Any row is allowed to be
--   dragged and the data set in the <tt>SelectionDataM</tt> object is set
--   with <a>treeSetRowDragData</a>, i.e. it contains the model and the
--   <a>TreePath</a> to the row.
listStoreDefaultDragSourceIface :: DragSourceIface ListStore row

-- | Default drop functions for <a>ListStore</a>. These functions accept a
--   row and insert the row into the new location if it is dragged into a
--   tree view that uses the same model.
listStoreDefaultDragDestIface :: DragDestIface ListStore row

-- | Convert a <a>TreeIter</a> to an an index into the <a>ListStore</a>.
--   Note that this function merely extracts the second element of the
--   <a>TreeIter</a>.
listStoreIterToIndex :: TreeIter -> Int

-- | Extract the value at the given index.
listStoreGetValue :: ListStore a -> Int -> IO a

-- | Extract the value at the given index.
listStoreSafeGetValue :: ListStore a -> Int -> IO (Maybe a)

-- | Update the value at the given index. The index must exist.
listStoreSetValue :: ListStore a -> Int -> a -> IO ()

-- | Extract all data from the store.
listStoreToList :: ListStore a -> IO [a]

-- | Query the number of elements in the store.
listStoreGetSize :: ListStore a -> IO Int

-- | Insert an element in front of the given element. The element is
--   appended if the index is greater or equal to the size of the list.
listStoreInsert :: ListStore a -> Int -> a -> IO ()

-- | Prepend the element to the store.
listStorePrepend :: ListStore a -> a -> IO ()

-- | Append an element to the store. Returns the index of the inserted
--   element.
listStoreAppend :: ListStore a -> a -> IO Int

-- | Remove the element at the given index.
listStoreRemove :: ListStore a -> Int -> IO ()

-- | Empty the store.
listStoreClear :: ListStore a -> IO ()
instance TypedTreeModelClass ListStore
instance TreeModelClass (ListStore a)
instance GObjectClass (ListStore a)


-- | A <a>TreeModel</a> which makes an underlying tree model sortable
module Graphics.UI.Gtk.ModelView.TreeModelSort
data TreeModelSort
class GObjectClass o => TreeModelSortClass o
castToTreeModelSort :: GObjectClass obj => obj -> TreeModelSort
gTypeTreeModelSort :: GType
toTreeModelSort :: TreeModelSortClass o => o -> TreeModelSort
data TypedTreeModelSort row

-- | Creates a new <a>TreeModelSort</a>, that will be a sorted view of the
--   given model.
treeModelSortNewWithModel :: (TreeModelClass (childModel row), TypedTreeModelClass childModel) => childModel row -> IO (TypedTreeModelSort row)

-- | Returns the underlying model the <a>TreeModelSort</a> is sorting.
treeModelSortGetModel :: TreeModelSortClass self => self -> IO TreeModel

-- | Converts the given path to a path relative to the given sorted model.
--   
--   <ul>
--   <li>The given path points to a row in the child model. The returned
--   path will point to the same row in the sorted model.</li>
--   </ul>
treeModelSortConvertChildPathToPath :: TreeModelSortClass self => self -> TreePath -> IO TreePath

-- | Converts path in the sorted model to a path on the unsorted model on
--   which the given <a>TreeModelSort</a> is based. That is, the given path
--   points to a location in the given <a>TreeModelSort</a>. The returned
--   path will point to the same location in the underlying unsorted model.
treeModelSortConvertPathToChildPath :: TreeModelSortClass self => self -> TreePath -> IO TreePath

-- | Return an iterator in the sorted model that points to the row pointed
--   to by the given iter from the unsorted model.
treeModelSortConvertChildIterToIter :: TreeModelSortClass self => self -> TreeIter -> IO TreeIter

-- | Return an iterator in the unsorted model that points to the row
--   pointed to by the given iter from the sorted model.
treeModelSortConvertIterToChildIter :: TreeModelSortClass self => self -> TreeIter -> IO TreeIter

-- | This resets the default sort function. As a consequence, the order of
--   this model will be the same order as that of the child model.
treeModelSortResetDefaultSortFunc :: TreeModelSortClass self => self -> IO ()

-- | Clear the cache of unref'd iterators.
--   
--   <ul>
--   <li>This function should almost never be called. It clears the
--   <a>TreeModelSort</a> of any cached iterators that haven't been reffed
--   with <a>treeModelRefNode</a>. This might be useful if the child model
--   being sorted is static (and doesn't change often) and there has been a
--   lot of unreffed access to nodes. As a side effect of this function,
--   all unreffed iters will be invalid.</li>
--   </ul>
treeModelSortClearCache :: TreeModelSortClass self => self -> IO ()

-- | Checks if the given iter is a valid iter for this
--   <a>TreeModelSort</a>.
--   
--   <ul>
--   <li>WARNING: This function is slow. Only use it for debugging and/or
--   testing purposes.</li>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
treeModelSortIterIsValid :: TreeModelSortClass self => self -> TreeIter -> IO Bool
instance TreeModelClass (TypedTreeModelSort a)
instance TreeModelSortClass (TypedTreeModelSort a)
instance GObjectClass (TypedTreeModelSort a)
instance TreeSortableClass TreeModelSort
instance TreeSortableClass (TypedTreeModelSort row)


-- | A <a>TreeModel</a> which hides parts of an underlying tree model
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.TreeModelFilter
data TreeModelFilter
data TypedTreeModelFilter row
class GObjectClass o => TreeModelFilterClass o
castToTreeModelFilter :: GObjectClass obj => obj -> TreeModelFilter
gTypeTreeModelFilter :: GType
toTreeModelFilter :: TreeModelFilterClass o => o -> TreeModelFilter

-- | Creates a new <a>TreeModel</a>, with <tt>childModel</tt> as the child
--   model and <tt>root</tt> as the virtual root.
treeModelFilterNew :: (TreeModelClass (childModel row), TypedTreeModelClass childModel) => childModel row -> TreePath -> IO (TypedTreeModelFilter row)

-- | Sets the visible function used when filtering the rows to be
--   <tt>func</tt>. The function should return <tt>True</tt> if the given
--   row should be visible and <tt>False</tt> otherwise. The passed-in
--   iterator is an iterator of the child model, not of the
--   <a>TreeModelFilter</a> model that is passed in as the first argument
--   to this function.
--   
--   If the condition calculated by the function changes over time (e.g.
--   because it depends on some global parameters), you must call
--   <a>treeModelFilterRefilter</a> to keep the visibility information of
--   the model up to date.
treeModelFilterSetVisibleFunc :: TreeModelFilterClass self => self -> (TreeIter -> IO Bool) -> IO ()

-- | Sets <tt>column</tt> of the child model to be the column where the
--   filter model should look for visibility information. A row containing
--   <tt>True</tt> means that this row should be shown.
treeModelFilterSetVisibleColumn :: (TreeModelFilterClass (self row), TypedTreeModelClass self) => self row -> ColumnId row Bool -> IO ()

-- | Returns a pointer to the child model of <tt>filter</tt>.
treeModelFilterGetModel :: TreeModelFilterClass self => self -> IO (Maybe TreeModel)

-- | Return an iterator in the sorted model that points to the row pointed
--   to by the given iter from the unfiltered model.
treeModelFilterConvertChildIterToIter :: TreeModelFilterClass self => self -> TreeIter -> IO TreeIter

-- | Return an iterator in the unfiltered model that points to the row
--   pointed to by the given iter from the filtered model.
treeModelFilterConvertIterToChildIter :: TreeModelFilterClass self => self -> TreeIter -> IO TreeIter

-- | Converts the given path to a path relative to the given filtered
--   model.
--   
--   <ul>
--   <li>The given path points to a row in the child model. The returned
--   path will point to the same row in the filtered model.</li>
--   </ul>
treeModelFilterConvertChildPathToPath :: TreeModelFilterClass self => self -> TreePath -> IO TreePath

-- | Converts path in the filtered model to a path on the unfiltered model
--   on which the given <a>TreeModelFilter</a> is based. That is, the given
--   path points to a location in the given <a>TreeModelFilter</a>. The
--   returned path will point to the same location in the underlying
--   unfiltered model.
treeModelFilterConvertPathToChildPath :: TreeModelFilterClass self => self -> TreePath -> IO TreePath

-- | Emits <a>rowChanged</a> for each row in the child model, which causes
--   the filter to re-evaluate whether a row is visible or not.
treeModelFilterRefilter :: TreeModelFilterClass self => self -> IO ()

-- | This function should almost never be called. It clears the
--   <tt>filter</tt> of any cached iterators that haven't been reffed with
--   <a>treeModelRefNode</a>. This might be useful if the child model being
--   filtered is static (and doesn't change often) and there has been a lot
--   of unreffed access to nodes. As a side effect of this function, all
--   unreffed iters will be invalid.
treeModelFilterClearCache :: TreeModelFilterClass self => self -> IO ()

-- | The model for the filtermodel to filter.
treeModelFilterChildModel :: TreeModelFilterClass self => ReadAttr self TreeModel

-- | The virtual root (relative to the child model) for this filtermodel.
treeModelFilterVirtualRoot :: TreeModelFilterClass self => ReadAttr self TreePath
instance TreeModelClass (TypedTreeModelFilter a)
instance TreeModelFilterClass (TypedTreeModelFilter a)
instance GObjectClass (TypedTreeModelFilter a)


-- | The selection object for <a>TreeView</a>
module Graphics.UI.Gtk.ModelView.TreeSelection
data TreeSelection
class GObjectClass o => TreeSelectionClass o
castToTreeSelection :: GObjectClass obj => obj -> TreeSelection
gTypeTreeSelection :: GType
toTreeSelection :: TreeSelectionClass o => o -> TreeSelection

-- | Mode in which selections can be performed
--   
--   <ul>
--   <li>There is a deprecated entry SelectionExtended which should have
--   the same value as SelectionMultiple. C2HS chokes on that
--   construct.</li>
--   </ul>
data SelectionMode
[SelectionNone] :: SelectionMode
[SelectionSingle] :: SelectionMode
[SelectionBrowse] :: SelectionMode
[SelectionMultiple] :: SelectionMode

-- | Callback type for a function that is called everytime the selection
--   changes. This function is set with
--   <a>treeSelectionSetSelectFunction</a>.
type TreeSelectionCB = TreePath -> IO Bool

-- | Callback function type for <a>treeSelectionSelectedForeach</a>.
type TreeSelectionForeachCB = TreeIter -> IO ()

-- | Set single or multiple choice.
treeSelectionSetMode :: TreeSelectionClass self => self -> SelectionMode -> IO ()

-- | Gets the selection mode.
treeSelectionGetMode :: TreeSelectionClass self => self -> IO SelectionMode

-- | Set a callback function if selection changes.
--   
--   <ul>
--   <li>If set, this function is called before any node is selected or
--   unselected, giving some control over which nodes are selected. The
--   select function should return <tt>True</tt> if the state of the node
--   may be toggled, and <tt>False</tt> if the state of the node should be
--   left unchanged.</li>
--   </ul>
treeSelectionSetSelectFunction :: TreeSelectionClass self => self -> TreeSelectionCB -> IO ()

-- | Retrieve the <a>TreeView</a> widget that this <a>TreeSelection</a>
--   works on.
treeSelectionGetTreeView :: TreeSelectionClass self => self -> IO TreeView

-- | Retrieves the selection of a single choice <a>TreeSelection</a>.
treeSelectionGetSelected :: TreeSelectionClass self => self -> IO (Maybe TreeIter)

-- | Execute a function for each selected node.
--   
--   <ul>
--   <li>Note that you cannot modify the tree or selection from within this
--   function. Hence, <a>treeSelectionGetSelectedRows</a> might be more
--   useful.</li>
--   </ul>
treeSelectionSelectedForeach :: TreeSelectionClass self => self -> TreeSelectionForeachCB -> IO ()

-- | Creates a list of paths of all selected rows.
--   
--   <ul>
--   <li>Additionally, if you are planning on modifying the model after
--   calling this function, you may want to convert the returned list into
--   a list of <tt>TreeRowReference</tt>s. To do this, you can use
--   <tt>treeRowReferenceNew</tt>.</li>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
treeSelectionGetSelectedRows :: TreeSelectionClass self => self -> IO [TreePath]

-- | Returns the number of rows that are selected.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
treeSelectionCountSelectedRows :: TreeSelectionClass self => self -> IO Int

-- | Select a specific item by <a>TreePath</a>.
treeSelectionSelectPath :: TreeSelectionClass self => self -> TreePath -> IO ()

-- | Deselect a specific item by <a>TreePath</a>.
treeSelectionUnselectPath :: TreeSelectionClass self => self -> TreePath -> IO ()

-- | Returns True if the row at the given path is currently selected.
treeSelectionPathIsSelected :: TreeSelectionClass self => self -> TreePath -> IO Bool

-- | Select a specific item by <a>TreeIter</a>.
treeSelectionSelectIter :: TreeSelectionClass self => self -> TreeIter -> IO ()

-- | Deselect a specific item by <a>TreeIter</a>.
treeSelectionUnselectIter :: TreeSelectionClass self => self -> TreeIter -> IO ()

-- | Returns True if the row at the given iter is currently selected.
treeSelectionIterIsSelected :: TreeSelectionClass self => self -> TreeIter -> IO Bool

-- | Selects all the nodes. The tree selection must be set to
--   <a>SelectionMultiple</a> mode.
treeSelectionSelectAll :: TreeSelectionClass self => self -> IO ()

-- | Unselects all the nodes.
treeSelectionUnselectAll :: TreeSelectionClass self => self -> IO ()

-- | Selects a range of nodes, determined by <tt>startPath</tt> and
--   <tt>endPath</tt> inclusive. <tt>selection</tt> must be set to
--   <a>SelectionMultiple</a> mode.
treeSelectionSelectRange :: TreeSelectionClass self => self -> TreePath -> TreePath -> IO ()

-- | Unselects a range of nodes, determined by <tt>startPath</tt> and
--   <tt>endPath</tt> inclusive.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
treeSelectionUnselectRange :: TreeSelectionClass self => self -> TreePath -> TreePath -> IO ()

-- | 'mode' property. See <a>treeSelectionGetMode</a> and
--   <a>treeSelectionSetMode</a>
treeSelectionMode :: TreeSelectionClass self => Attr self SelectionMode

-- | Emitted whenever the selection has (possibly) changed. Please note
--   that this signal is mostly a hint. It may only be emitted once when a
--   range of rows are selected, and it may occasionally be emitted when
--   nothing has happened.
treeSelectionSelectionChanged :: TreeSelectionClass self => Signal self (IO ())
onSelectionChanged :: TreeSelectionClass self => self -> IO () -> IO (ConnectId self)
afterSelectionChanged :: TreeSelectionClass self => self -> IO () -> IO (ConnectId self)


-- | A visible column in a <a>TreeView</a> widget
module Graphics.UI.Gtk.ModelView.TreeViewColumn
data TreeViewColumn
class ObjectClass o => TreeViewColumnClass o
castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn
gTypeTreeViewColumn :: GType
toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn

-- | Generate a new TreeViewColumn widget.
treeViewColumnNew :: IO TreeViewColumn

-- | Add a cell renderer at the beginning of a column.
--   
--   <ul>
--   <li>Excess space is divided equally among all renderers which have
--   <tt>expand</tt> set to True.</li>
--   </ul>
treeViewColumnPackStart :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()

-- | Add a cell renderer at the end of a column.
--   
--   <ul>
--   <li>Excess space is divided equally among all renderers which have
--   <tt>expand</tt> set to True.</li>
--   </ul>
treeViewColumnPackEnd :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()

-- | Remove the associations of attributes to a store for all
--   <a>CellRenderer</a>s.
treeViewColumnClear :: TreeViewColumn -> IO ()

-- | Retrieve all <a>CellRenderer</a>s that are contained in this column.
--   
--   Removed in Gtk3.
treeViewColumnGetCellRenderers :: TreeViewColumn -> IO [CellRenderer]

-- | Set the number of pixels between two cell renderers.
treeViewColumnSetSpacing :: TreeViewColumn -> Int -> IO ()

-- | Get the number of pixels between two cell renderers.
treeViewColumnGetSpacing :: TreeViewColumn -> IO Int

-- | Set the visibility of a given column.
treeViewColumnSetVisible :: TreeViewColumn -> Bool -> IO ()

-- | Get the visibility of a given column.
treeViewColumnGetVisible :: TreeViewColumn -> IO Bool

-- | Set if a given column is resizable by the user.
treeViewColumnSetResizable :: TreeViewColumn -> Bool -> IO ()

-- | Get if a given column is resizable by the user.
treeViewColumnGetResizable :: TreeViewColumn -> IO Bool

-- | Wether columns of a tree or list widget can be resized.
data TreeViewColumnSizing
[TreeViewColumnGrowOnly] :: TreeViewColumnSizing
[TreeViewColumnAutosize] :: TreeViewColumnSizing
[TreeViewColumnFixed] :: TreeViewColumnSizing

-- | Set wether the column can be resized.
treeViewColumnSetSizing :: TreeViewColumn -> TreeViewColumnSizing -> IO ()

-- | Return the resizing type of the column.
treeViewColumnGetSizing :: TreeViewColumn -> IO TreeViewColumnSizing

-- | Query the current width of the column.
treeViewColumnGetWidth :: TreeViewColumn -> IO Int

-- | Set the width of the column.
--   
--   <ul>
--   <li>This is meaningful only if the sizing type is
--   <a>TreeViewColumnFixed</a>.</li>
--   </ul>
treeViewColumnSetFixedWidth :: TreeViewColumn -> Int -> IO ()

-- | Gets the fixed width of the column.
--   
--   <ul>
--   <li>This is meaningful only if the sizing type is
--   <a>TreeViewColumnFixed</a>.</li>
--   <li>This value is only meaning may not be the actual width of the
--   column on the screen, just what is requested.</li>
--   </ul>
treeViewColumnGetFixedWidth :: TreeViewColumn -> IO Int

-- | Set minimum width of the column.
treeViewColumnSetMinWidth :: TreeViewColumn -> Int -> IO ()

-- | Get the minimum width of a column. Returns -1 if this width was not
--   set.
treeViewColumnGetMinWidth :: TreeViewColumn -> IO Int

-- | Set maximum width of the column.
treeViewColumnSetMaxWidth :: TreeViewColumn -> Int -> IO ()

-- | Get the maximum width of a column. Returns -1 if this width was not
--   set.
treeViewColumnGetMaxWidth :: TreeViewColumn -> IO Int

-- | Emit the <tt>clicked</tt> signal on the column.
treeViewColumnClicked :: TreeViewColumn -> IO ()

-- | Set the widget's title if a custom widget has not been set.
treeViewColumnSetTitle :: GlibString string => TreeViewColumn -> string -> IO ()

-- | Get the widget's title.
treeViewColumnGetTitle :: GlibString string => TreeViewColumn -> IO (Maybe string)

-- | Set if the column should be sensitive to mouse clicks.
treeViewColumnSetClickable :: TreeViewColumn -> Bool -> IO ()

-- | Returns True if the user can click on the header for the column.
treeViewColumnGetClickable :: TreeViewColumn -> IO Bool

-- | Set the column's title to this widget.
treeViewColumnSetWidget :: WidgetClass widget => TreeViewColumn -> Maybe widget -> IO ()

-- | Retrieve the widget responsible for showing the column title. In case
--   only a text title was set this will be a <a>Alignment</a> widget with
--   a <a>Label</a> inside.
treeViewColumnGetWidget :: TreeViewColumn -> IO (Maybe Widget)

-- | Sets the alignment of the title or custom widget inside the column
--   header. The alignment determines its location inside the button -- 0.0
--   for left, 0.5 for center, 1.0 for right.
treeViewColumnSetAlignment :: TreeViewColumn -> Float -> IO ()

-- | Returns the current x alignment of the tree column. This value can
--   range between 0.0 and 1.0.
treeViewColumnGetAlignment :: TreeViewColumn -> IO Float

-- | Set if the column can be reordered by the end user dragging the
--   header.
treeViewColumnSetReorderable :: TreeViewColumn -> Bool -> IO ()

-- | Returns whether the column can be reordered by the user.
treeViewColumnGetReorderable :: TreeViewColumn -> IO Bool

-- | Set the column by which to sort.
--   
--   <ul>
--   <li>Sets the logical <tt>columnId</tt> that this column sorts on when
--   this column is selected for sorting. The selected column's header will
--   be clickable after this call. Logical refers to the
--   <a>SortColumnId</a> for which a comparison function was set.</li>
--   </ul>
treeViewColumnSetSortColumnId :: TreeViewColumn -> SortColumnId -> IO ()

-- | Get the column by which to sort.
--   
--   <ul>
--   <li>Retrieves the logical <tt>columnId</tt> that the model sorts on
--   when this column is selected for sorting.</li>
--   <li>Returns <a>treeSortableDefaultSortColumnId</a> if this tree view
--   column has no <a>SortColumnId</a> associated with it.</li>
--   </ul>
treeViewColumnGetSortColumnId :: TreeViewColumn -> IO SortColumnId

-- | Set if a given column has sorting arrows in its heading.
treeViewColumnSetSortIndicator :: TreeViewColumn -> Bool -> IO ()

-- | Query if a given column has sorting arrows in its heading.
treeViewColumnGetSortIndicator :: TreeViewColumn -> IO Bool

-- | Set if a given column is sorted in ascending or descending order.
--   
--   <ul>
--   <li>In order for sorting to work, it is necessary to either use
--   automatic sorting via <a>treeViewColumnSetSortColumnId</a> or to use a
--   user defined sorting on the elements in a <a>TreeModel</a>.</li>
--   </ul>
treeViewColumnSetSortOrder :: TreeViewColumn -> SortType -> IO ()

-- | Query if a given column is sorted in ascending or descending order.
treeViewColumnGetSortOrder :: TreeViewColumn -> IO SortType
data SortType
[SortAscending] :: SortType
[SortDescending] :: SortType

-- | Sets the column to take available extra space. This space is shared
--   equally amongst all columns that have the expand set to <tt>True</tt>.
--   If no column has this option set, then the last column gets all extra
--   space. By default, every column is created with this <tt>False</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
treeViewColumnSetExpand :: TreeViewColumn -> Bool -> IO ()

-- | Return <tt>True</tt> if the column expands to take any available
--   space.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
treeViewColumnGetExpand :: TreeViewColumn -> IO Bool

-- | Returns <tt>True</tt> if any of the cells packed into the
--   <tt>treeColumn</tt> are visible. For this to be meaningful, you must
--   first initialize the cells with <tt>treeViewColumnCellSetCellData</tt>
treeViewColumnCellIsVisible :: TreeViewColumn -> IO Bool

-- | Sets the current keyboard focus to be at <tt>cell</tt>, if the column
--   contains 2 or more editable and activatable cells.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
treeViewColumnFocusCell :: CellRendererClass cell => TreeViewColumn -> cell -> IO ()

-- | Flags the column, and the cell renderers added to this column, to have
--   their sizes renegotiated.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
treeViewColumnQueueResize :: TreeViewColumn -> IO ()

-- | Whether to display the column.
--   
--   Default value: <tt>True</tt>
treeViewColumnVisible :: Attr TreeViewColumn Bool

-- | Column is user-resizable.
--   
--   Default value: <tt>False</tt>
treeViewColumnResizable :: Attr TreeViewColumn Bool

-- | Current width of the column.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
treeViewColumnWidth :: ReadAttr TreeViewColumn Int

-- | Space which is inserted between cells.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
treeViewColumnSpacing :: Attr TreeViewColumn Int

-- | Resize mode of the column.
--   
--   Default value: <a>TreeViewColumnGrowOnly</a>
treeViewColumnSizing :: Attr TreeViewColumn TreeViewColumnSizing

-- | Current fixed width of the column.
--   
--   Allowed values: &gt;= 1
--   
--   Default value: 1
treeViewColumnFixedWidth :: Attr TreeViewColumn Int

-- | Minimum allowed width of the column.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
treeViewColumnMinWidth :: Attr TreeViewColumn Int

-- | Maximum allowed width of the column.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
treeViewColumnMaxWidth :: Attr TreeViewColumn Int

-- | Title to appear in column header.
--   
--   Default value: ""
treeViewColumnTitle :: GlibString string => ReadWriteAttr TreeViewColumn (Maybe string) string

-- | Column gets share of extra width allocated to the widget.
--   
--   Default value: <tt>False</tt>
treeViewColumnExpand :: Attr TreeViewColumn Bool

-- | Whether the header can be clicked.
--   
--   Default value: <tt>False</tt>
treeViewColumnClickable :: Attr TreeViewColumn Bool

-- | Widget to put in column header button instead of column title.
treeViewColumnWidget :: WidgetClass widget => ReadWriteAttr TreeViewColumn (Maybe Widget) (Maybe widget)

-- | X Alignment of the column header text or widget.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0
treeViewColumnAlignment :: Attr TreeViewColumn Float

-- | Whether the column can be reordered around the headers.
--   
--   Default value: <tt>False</tt>
treeViewColumnReorderable :: Attr TreeViewColumn Bool

-- | Whether to show a sort indicator.
--   
--   Default value: <tt>False</tt>
treeViewColumnSortIndicator :: Attr TreeViewColumn Bool

-- | Sort direction the sort indicator should indicate.
--   
--   Default value: <a>SortAscending</a>
treeViewColumnSortOrder :: Attr TreeViewColumn SortType

-- | 'sortColumnId' property. See <a>treeViewColumnGetSortColumnId</a> and
--   <a>treeViewColumnSetSortColumnId</a>
treeViewColumnSortColumnId :: Attr TreeViewColumn SortColumnId

-- | Emitted when the header of this column has been clicked on.
onColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted when the header of this column has been clicked on.
afterColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self)


-- | Standard model to store hierarchical data.
module Graphics.UI.Gtk.ModelView.TreeStore

-- | A store for hierarchical data.
data TreeStore a

-- | Create a new list store.
--   
--   <ul>
--   <li>The given rose tree determines the initial content and may be the
--   empty list. Each <a>Tree</a> in the forest corresponds to one
--   top-level node.</li>
--   <li>The TreeStore maintains the initially given Forest and aligns the
--   <a>TreePath</a> bits to fit in 96-bit length <a>TreeIter</a>
--   storage.</li>
--   <li>Additionally, a cache is used to achieve higher performance if
--   operating on recently used TreePaths.</li>
--   <li><b>Note:</b> due to the limited amount of bits available in
--   TreeIter storage, only limited depth forests can be used with this
--   implementation, the result of too deep Forests is an undefined
--   behaviour while trying to retrieve the deeply nested nodes. For
--   example: assuming the average requiement is 8 bits per tree level (max
--   number of children at the level is 255), then we can only use 12
--   levels deep trees (96/8) - any further levels in a TreePath will not
--   be encoded in the corresponding TreeIter storage.</li>
--   </ul>
treeStoreNew :: Forest a -> IO (TreeStore a)

-- | Create a new list store.
--   
--   <ul>
--   <li>In addition to <a>treeStoreNew</a>, this function takes an two
--   interfaces to implement user-defined drag-and-drop functionality.</li>
--   </ul>
treeStoreNewDND :: Forest a -> Maybe (DragSourceIface TreeStore a) -> Maybe (DragDestIface TreeStore a) -> IO (TreeStore a)

-- | Default drag functions for <a>TreeStore</a>. These functions allow the
--   rows of the model to serve as drag source. Any row is allowed to be
--   dragged and the data set in the <tt>SelectionDataM</tt> object is set
--   with <a>treeSetRowDragData</a>, i.e. it contains the model and the
--   <a>TreePath</a> to the row.
treeStoreDefaultDragSourceIface :: DragSourceIface TreeStore row

-- | Default drop functions for <a>TreeStore</a>. These functions accept a
--   row and insert the row into the new location if it is dragged into a
--   tree view that uses the same model.
treeStoreDefaultDragDestIface :: DragDestIface TreeStore row

-- | Extract one node from the current model. Fails if the given
--   <a>TreePath</a> refers to a non-existent node.
treeStoreGetValue :: TreeStore a -> TreePath -> IO a

-- | Extract a subtree from the current model. Fails if the given
--   <a>TreePath</a> refers to a non-existent node.
treeStoreGetTree :: TreeStore a -> TreePath -> IO (Tree a)

-- | Extract a subtree from the current model. Like <a>treeStoreGetTree</a>
--   but returns <tt>Nothing</tt> if the path refers to a non-existant
--   node.
treeStoreLookup :: TreeStore a -> TreePath -> IO (Maybe (Tree a))

-- | Set a node in the store.
treeStoreSetValue :: TreeStore a -> TreePath -> a -> IO ()

-- | Insert a single node into the store.
--   
--   <ul>
--   <li>This function inserts a single node without children into the
--   tree. Its arguments are similar to those of
--   <a>treeStoreInsert</a>.</li>
--   </ul>
treeStoreInsert :: TreeStore a -> TreePath -> Int -> a -> IO ()

-- | Insert a node into the store.
treeStoreInsertTree :: TreeStore a -> TreePath -> Int -> Tree a -> IO ()

-- | Insert nodes into the store.
--   
--   <ul>
--   <li>The given list of nodes is inserted into given parent at
--   <tt>pos</tt>. If the parent existed, the function returns <tt>Just
--   path</tt> where <tt>path</tt> is the position of the newly inserted
--   elements. If <tt>pos</tt> is negative or greater or equal to the
--   number of children of the node at <tt>path</tt>, the new nodes are
--   appended to the list.</li>
--   </ul>
treeStoreInsertForest :: TreeStore a -> TreePath -> Int -> Forest a -> IO ()

-- | Remove a node from the store.
--   
--   <ul>
--   <li>The node denoted by the path is removed, along with all its
--   children. The function returns <tt>True</tt> if the given node was
--   found.</li>
--   </ul>
treeStoreRemove :: TreeStore a -> TreePath -> IO Bool
treeStoreClear :: TreeStore a -> IO ()

-- | Change a node in the store.
--   
--   <ul>
--   <li>Returns <tt>True</tt> if the node was found. For a monadic
--   version, see <a>treeStoreChangeM</a>.</li>
--   </ul>
treeStoreChange :: TreeStore a -> TreePath -> (a -> a) -> IO Bool

-- | Change a node in the store.
--   
--   <ul>
--   <li>Returns <tt>True</tt> if the node was found. For a purely
--   functional version, see <a>treeStoreChange</a>.</li>
--   </ul>
treeStoreChangeM :: TreeStore a -> TreePath -> (a -> IO a) -> IO Bool
instance TypedTreeModelClass TreeStore
instance TreeModelClass (TreeStore a)
instance GObjectClass (TreeStore a)


-- | A widget displaying a single row of a <a>TreeModel</a>
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.6</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.CellView
data CellView
class WidgetClass o => CellViewClass o
castToCellView :: GObjectClass obj => obj -> CellView
gTypeCellView :: GType
toCellView :: CellViewClass o => o -> CellView

-- | Creates a new <a>CellView</a> widget.
cellViewNew :: IO CellView

-- | Creates a new <a>CellView</a> widget, adds a <a>CellRendererText</a>
--   to it, and makes its show <tt>markup</tt>. The text can be marked up
--   with the Pango text markup language.
cellViewNewWithMarkup :: GlibString string => string -> IO CellView

-- | Creates a new <a>CellView</a> widget, adds a <a>CellRendererPixbuf</a>
--   to it, and makes its show <tt>pixbuf</tt>.
cellViewNewWithPixbuf :: Pixbuf -> IO CellView

-- | Creates a new <a>CellView</a> widget, adds a <a>CellRendererText</a>
--   to it, and makes its show <tt>text</tt>.
cellViewNewWithText :: GlibString string => string -> IO CellView

-- | Sets the model for <tt>cellView</tt>. If <tt>cellView</tt> already has
--   a model set, it will remove it before setting the new model. If
--   <tt>model</tt> is <tt>Nothing</tt>, then it will unset the old model.
cellViewSetModel :: (CellViewClass self, TreeModelClass model) => self -> Maybe model -> IO ()

-- | Returns the size needed by the cell view to display the model row
--   pointed to by <tt>path</tt>.
cellViewGetSizeOfRow :: CellViewClass self => self -> TreePath -> IO Requisition

-- | Sets the background color of <tt>view</tt>.
cellViewSetBackgroundColor :: CellViewClass self => self -> Color -> IO ()

-- | Returns the cell renderers which have been added to <tt>cellView</tt>.
--   
--   Removed in Gtk3.
cellViewGetCellRenderers :: CellViewClass self => self -> IO [CellRenderer]

-- | Background color as a string.
--   
--   Default value: <tt>""</tt>
cellViewBackground :: (CellViewClass self, GlibString string) => WriteAttr self string


-- | Renders a toggle button in a cell
module Graphics.UI.Gtk.ModelView.CellRendererToggle
data CellRendererToggle
class CellRendererClass o => CellRendererToggleClass o
castToCellRendererToggle :: GObjectClass obj => obj -> CellRendererToggle
gTypeCellRendererToggle :: GType
toCellRendererToggle :: CellRendererToggleClass o => o -> CellRendererToggle

-- | Creates a new <a>CellRendererToggle</a>. Adjust rendering parameters
--   using object properties. Object properties can be set globally (with
--   <a>set</a>). Also, within a <a>TreeViewColumn</a>, you can bind a
--   property to a value in a <a>TreeModel</a> using
--   <a>cellLayoutSetAttributes</a>. For example, you can bind the
--   <a>cellToggleActive</a> property on the cell renderer to a boolean
--   value in the model, thus causing the check button to reflect the state
--   of the model.
cellRendererToggleNew :: IO CellRendererToggle

-- | Returns whether we're rendering radio toggles rather than checkboxes.
cellRendererToggleGetRadio :: CellRendererToggleClass self => self -> IO Bool

-- | If <tt>radio</tt> is <tt>True</tt>, the cell renderer renders a radio
--   toggle (i.e. a toggle in a group of mutually-exclusive toggles). If
--   <tt>False</tt>, it renders a check toggle (a standalone boolean
--   option). This can be set globally for the cell renderer, or changed
--   just before rendering each cell in the model (for <a>TreeView</a>, you
--   set up a per-row setting using <a>TreeViewColumn</a> to associate
--   model columns with cell renderer properties).
cellRendererToggleSetRadio :: CellRendererToggleClass self => self -> Bool -> IO ()

-- | Returns whether the cell renderer is active. See
--   <a>cellRendererToggleSetActive</a>.
cellRendererToggleGetActive :: CellRendererToggleClass self => self -> IO Bool

-- | Activates or deactivates a cell renderer.
cellRendererToggleSetActive :: CellRendererToggleClass self => self -> Bool -> IO ()

-- | The toggle state of the button.
--   
--   Default value: <tt>False</tt>
cellToggleActive :: CellRendererToggleClass self => Attr self Bool

-- | The inconsistent state of the button.
--   
--   Default value: <tt>False</tt>
cellToggleInconsistent :: CellRendererToggleClass self => Attr self Bool

-- | The toggle button can be activated.
--   
--   Default value: <tt>True</tt>
cellToggleActivatable :: CellRendererToggleClass self => Attr self Bool

-- | Draw the toggle button as a radio button.
--   
--   Default value: <tt>False</tt>
cellToggleRadio :: CellRendererToggleClass self => Attr self Bool

-- | Size of check or radio indicator.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 12
cellToggleIndicatorSize :: CellRendererToggleClass self => Attr self Int

-- | The <a>cellToggled</a> signal is emitted when the cell is toggled. The
--   string represents a <tt>TreePath</tt> into the model and can be
--   converted using <tt>stringToTreePath</tt>.
cellToggled :: (CellRendererToggleClass self, GlibString string) => Signal self (string -> IO ())

-- | <i>Deprecated: instead of 'onCellToggled obj' use 'on obj
--   cellToggled'</i>
onCellToggled :: (CellRendererToggleClass self, GlibString string) => self -> (string -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterCellToggled obj' use 'after obj
--   cellToggled'</i>
afterCellToggled :: (CellRendererToggleClass self, GlibString string) => self -> (string -> IO ()) -> IO (ConnectId self)


-- | Renders a spin button in a cell
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.CellRendererSpin
data CellRendererSpin
class CellRendererTextClass o => CellRendererSpinClass o
castToCellRendererSpin :: GObjectClass obj => obj -> CellRendererSpin
toCellRendererSpin :: CellRendererSpinClass o => o -> CellRendererSpin

-- | Creates a new <a>CellRendererSpin</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererSpinNew :: IO CellRendererSpin

-- | The adjustment that holds the value of the spinbutton.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererSpinAdjustment :: CellRendererSpinClass self => Attr self Adjustment

-- | The acceleration rate when you hold down a button.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererSpinClimbRate :: CellRendererSpinClass self => Attr self Double

-- | The number of decimal places to display.
--   
--   Allowed values: &lt;= 20
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererSpinDigits :: CellRendererSpinClass self => Attr self Int


-- | A <a>CellRenderer</a> which displays a single-line text.
module Graphics.UI.Gtk.ModelView.CellRendererText
data CellRendererText
class CellRendererClass o => CellRendererTextClass o
castToCellRendererText :: GObjectClass obj => obj -> CellRendererText
gTypeCellRendererText :: GType
toCellRendererText :: CellRendererTextClass o => o -> CellRendererText

-- | Create a new CellRendererText object.
cellRendererTextNew :: IO CellRendererText

-- | Sets the height of a renderer to explicitly be determined by the
--   <a>cellTextFont</a> and <a>cellYPad</a> attribute set on it. Further
--   changes in these properties do not affect the height, so they must be
--   accompanied by a subsequent call to this function. Using this function
--   is unflexible, and should really only be used if calculating the size
--   of a cell is too slow (ie, a massive number of cells displayed). If
--   <tt>numberOfRows</tt> is -1, then the fixed height is unset, and the
--   height is determined by the properties again.
cellRendererTextSetFixedHeightFromFont :: CellRendererTextClass self => self -> Int -> IO ()

-- | Define the attribute that specifies the text to be rendered. See also
--   <a>cellTextMarkup</a>.
cellText :: (CellRendererTextClass cr, GlibString string) => Attr cr string

-- | Define a markup string instead of a text. See <a>cellText</a>.
cellTextMarkup :: (CellRendererTextClass cr, GlibString string) => WriteAttr cr (Maybe string)

-- | Whether or not to keep all text in a single paragraph.
--   
--   Default value: <tt>False</tt>
cellTextSingleParagraphMode :: CellRendererTextClass self => Attr self Bool

-- | Text background color as a string.
--   
--   Default value: <tt>""</tt>
cellTextBackground :: (CellRendererClass self, GlibString string) => WriteAttr self string

-- | Text background color as a <a>Color</a>.
cellTextBackgroundColor :: CellRendererClass self => Attr self Color

-- | Whether the 'cellTextBackground'\/'cellTextBackgroundColor' attribute
--   is set.
--   
--   Default value: <tt>False</tt>
cellTextBackgroundSet :: CellRendererClass self => Attr self Bool

-- | Text foreground color as a string.
--   
--   Default value: <tt>""</tt>
cellTextForeground :: (CellRendererClass self, GlibString string) => WriteAttr self string

-- | Text foreground color as a <a>Color</a>.
cellTextForegroundColor :: CellRendererClass self => Attr self Color

-- | Whether the 'cellTextForeground'\/'cellTextForegroundColor' attribute
--   is set.
--   
--   Default value: <tt>False</tt>
cellTextForegroundSet :: CellRendererClass self => Attr self Bool

-- | Whether the text can be modified by the user.
cellTextEditable :: CellRendererTextClass self => Attr self Bool

-- | Whether the <a>cellTextEditable</a> flag affects text editability.
cellTextEditableSet :: CellRendererTextClass self => Attr self Bool

-- | Font description as a string.
cellTextFont :: (CellRendererTextClass self, GlibString string) => Attr self string

-- | Font description as a <a>FontDescription</a>.
cellTextFontDesc :: CellRendererTextClass self => Attr self FontDescription

-- | Name of the font family, e.g. Sans, Helvetica, Times, Monospace.
cellTextFamily :: (CellRendererTextClass self, GlibString string) => Attr self string

-- | Determines if <a>cellTextFamily</a> has an effect.
cellTextFamilySet :: CellRendererTextClass self => Attr self Bool

-- | Font style (e.g. normal or italics).
cellTextStyle :: CellRendererTextClass self => Attr self FontStyle

-- | Whether the <a>cellTextStyle</a> tag is used, default is
--   <tt>False</tt>.
cellTextStyleSet :: CellRendererTextClass self => Attr self Bool

-- | Font variant (e.g. small caps).
cellTextVariant :: CellRendererTextClass self => Attr self Variant

-- | Whether the <a>cellTextVariant</a> tag is used, default is
--   <tt>False</tt>.
cellTextVariantSet :: CellRendererTextClass self => Attr self Bool

-- | Font weight, default: 400.
cellTextWeight :: CellRendererTextClass self => Attr self Int

-- | Whether the <a>cellTextWeight</a> tag is used, default is
--   <tt>False</tt>.
cellTextWeightSet :: CellRendererTextClass self => Attr self Bool

-- | Font stretch.
cellTextStretch :: CellRendererTextClass self => Attr self Stretch

-- | Whether the <a>cellTextStretch</a> tag is used, default is
--   <tt>False</tt>.
cellTextStretchSet :: CellRendererTextClass self => Attr self Bool

-- | Font size in points.
cellTextSize :: CellRendererTextClass self => Attr self Double

-- | Font size in points.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
cellTextSizePoints :: CellRendererTextClass self => Attr self Double

-- | Whether the <a>cellTextSize</a> tag is used, default is
--   <tt>False</tt>.
cellTextSizeSet :: CellRendererTextClass self => Attr self Bool

-- | Font scaling factor. Default is 1.
cellTextScale :: CellRendererTextClass self => Attr self Double

-- | Whether the <a>cellTextScale</a> tag is used, default is
--   <tt>False</tt>.
cellTextScaleSet :: CellRendererTextClass self => Attr self Bool

-- | Offset of text above the baseline (below the baseline if rise is
--   negative).
--   
--   Allowed values: &gt;= -2147483647
--   
--   Default value: 0
cellTextRise :: CellRendererTextClass self => Attr self Int

-- | Whether the <a>cellTextRise</a> tag is used, default is
--   <tt>False</tt>.
cellTextRiseSet :: CellRendererTextClass self => Attr self Bool

-- | Whether to strike through the text.
cellTextStrikethrough :: CellRendererTextClass self => Attr self Bool

-- | Whether the <a>cellTextStrikethrough</a> tag is used, default is
--   <tt>False</tt>.
cellTextStrikethroughSet :: CellRendererTextClass self => Attr self Bool

-- | Style of underline for this text.
cellTextUnderline :: CellRendererTextClass self => Attr self Underline

-- | Whether the <a>cellTextUnderline</a> tag is used, default is
--   <tt>False</tt>.
cellTextUnderlineSet :: CellRendererTextClass self => Attr self Bool

-- | The language this text is in, as an ISO code. Pango can use this as a
--   hint when rendering the text. If you don't understand this parameter,
--   you probably don't need it.
cellTextLanguage :: (CellRendererTextClass self, GlibString string) => Attr self (Maybe string)

-- | Whether the <a>cellTextLanguage</a> tag is used, default is
--   <tt>False</tt>.
cellTextLanguageSet :: CellRendererTextClass self => Attr self Bool

-- | Specifies the preferred place to ellipsize the string, if the cell
--   renderer does not have enough room to display the entire string.
--   Setting it to <a>EllipsizeNone</a> turns off ellipsizing. See the
--   <a>cellTextWrapWidth</a> property for another way of making the text
--   fit into a given width.
--   
--   <ul>
--   <li>Available in Gtk 2.6 or higher.</li>
--   </ul>
cellTextEllipsize :: CellRendererTextClass self => Attr self EllipsizeMode

-- | Whether the <a>cellTextEllipsize</a> tag affects the ellipsize mode.
--   
--   <ul>
--   <li>Available in Gtk 2.6 or higher.</li>
--   </ul>
cellTextEllipsizeSet :: CellRendererTextClass self => Attr self Bool

-- | The desired width of the cell, in characters. If this property is set
--   to <tt>-1</tt>, the width will be calculated automatically, otherwise
--   the cell will request either 3 characters or the property value,
--   whichever is greater.
--   
--   <ul>
--   <li>Available in Gtk 2.6 or higher.</li>
--   </ul>
cellTextWidthChars :: CellRendererTextClass self => Attr self Int

-- | Specifies how to break the string into multiple lines, if the cell
--   renderer does not have enough room to display the entire string. This
--   property has no effect unless the <a>cellTextWrapWidth</a> property is
--   set.
--   
--   <ul>
--   <li>Available in Gtk 2.8 or higher.</li>
--   </ul>
cellTextWrapMode :: CellRendererTextClass self => Attr self LayoutWrapMode

-- | Specifies the width at which the text is wrapped. The wrap-mode
--   property can be used to influence at what character positions the line
--   breaks can be placed. Setting wrap-width to <tt>-1</tt> turns wrapping
--   off.
--   
--   <ul>
--   <li>Available in Gtk 2.8 or higher.</li>
--   </ul>
cellTextWrapWidth :: CellRendererTextClass self => Attr self Int

-- | Specifies how to align the lines of text with respect to each other.
--   
--   Note that this property describes how to align the lines of text in
--   case there are several of them. The <a>cellXAlign</a> property of
--   <a>CellRenderer</a>, on the other hand, sets the horizontal alignment
--   of the whole text.
--   
--   Default value: <a>AlignLeft</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellTextAlignment :: CellRendererTextClass self => Attr self LayoutAlignment

-- | Emitted when the user finished editing a cell.
--   
--   Whenever editing is finished successfully, this signal is emitted
--   which indicates that the model should be updated with the supplied
--   value. The value is always a string which matches the <a>cellText</a>
--   attribute of <a>CellRendererText</a> (and its derivates like
--   <a>CellRendererCombo</a>).
--   
--   <ul>
--   <li>This signal is not emitted when editing is disabled (see
--   <a>cellTextEditable</a>) or when the user aborts editing.</li>
--   </ul>
edited :: (CellRendererTextClass self, GlibString string) => Signal self (TreePath -> string -> IO ())

-- | <i>Deprecated: instead of 'onEdited obj' use 'on obj edited'</i>
onEdited :: (CellRendererTextClass self, GlibString string) => self -> (TreePath -> string -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterEdited obj' use 'after obj edited'</i>
afterEdited :: (CellRendererTextClass self, GlibString string) => self -> (TreePath -> string -> IO ()) -> IO (ConnectId self)


-- | Renders numbers as progress bars
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.6</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.CellRendererProgress
data CellRendererProgress
class CellRendererClass o => CellRendererProgressClass o
castToCellRendererProgress :: GObjectClass obj => obj -> CellRendererProgress
gTypeCellRendererProgress :: GType
toCellRendererProgress :: CellRendererProgressClass o => o -> CellRendererProgress

-- | Creates a new <a>CellRendererProgress</a>.
cellRendererProgressNew :: IO CellRendererProgress

-- | The "value" property determines the percentage to which the progress
--   bar will be "filled in".
--   
--   Allowed values: <tt>[0,100]</tt>
--   
--   Default value: <tt>0</tt>
cellProgressValue :: CellRendererProgressClass self => Attr self Int

-- | The <a>cellProgressText</a> attribute determines the label which will
--   be drawn over the progress bar. Setting this property to
--   <tt>Nothing</tt> causes the default label to be displayed. Setting
--   this property to an empty string causes no label to be displayed.
--   
--   Default value: <tt>Nothing</tt>
cellProgressText :: (CellRendererProgressClass self, GlibString string) => Attr self (Maybe string)


-- | Renders a pixbuf in a cell
module Graphics.UI.Gtk.ModelView.CellRendererPixbuf
data CellRendererPixbuf
class CellRendererClass o => CellRendererPixbufClass o
castToCellRendererPixbuf :: GObjectClass obj => obj -> CellRendererPixbuf
gTypeCellRendererPixbuf :: GType
toCellRendererPixbuf :: CellRendererPixbufClass o => o -> CellRendererPixbuf

-- | Create a new CellRendererPixbuf object.
cellRendererPixbufNew :: IO CellRendererPixbuf

-- | The pixbuf to render.
cellPixbuf :: CellRendererPixbufClass self => Attr self Pixbuf

-- | Pixbuf for open expander.
cellPixbufExpanderOpen :: CellRendererPixbufClass self => Attr self Pixbuf

-- | Pixbuf for closed expander.
cellPixbufExpanderClosed :: CellRendererPixbufClass self => Attr self Pixbuf

-- | The stock ID of the stock icon to render.
--   
--   Default value: <tt>""</tt>
cellPixbufStockId :: (CellRendererPixbufClass self, GlibString string) => Attr self string

-- | The <tt>IconSize</tt> value that specifies the size of the rendered
--   icon.
--   
--   Default value: 1
cellPixbufStockSize :: CellRendererPixbufClass self => Attr self Int

-- | Render detail to pass to the theme engine.
--   
--   Default value: <tt>""</tt>
cellPixbufStockDetail :: (CellRendererPixbufClass self, GlibString string) => Attr self string

-- | The name of the themed icon to display. This property only has an
--   effect if not overridden by <a>cellPixbufStockId</a> or
--   <a>cellPixbuf</a> attributes.
--   
--   Default value: <tt>""</tt>
cellPixbufIconName :: (CellRendererPixbufClass self, GlibString string) => Attr self string

-- | Specifies whether the rendered pixbuf should be colorized according to
--   the <tt>CellRendererState</tt>.
--   
--   Default value: <tt>False</tt>
cellPixbufFollowState :: CellRendererPixbufClass self => Attr self Bool


-- | Renders a combo box in a cell
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.6</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.CellRendererCombo
data CellRendererCombo
class CellRendererTextClass o => CellRendererComboClass o
castToCellRendererCombo :: GObjectClass obj => obj -> CellRendererCombo
gTypeCellRendererCombo :: GType
toCellRendererCombo :: CellRendererComboClass o => o -> CellRendererCombo

-- | Creates a new <a>CellRendererCombo</a>. This <tt>Renderer</tt> allows
--   for displaying a fixed set of options the user can choose from.
cellRendererComboNew :: IO CellRendererCombo

-- | If <tt>True</tt>, the cell renderer will allow the user to enter
--   values other than the ones in the popup list.
--   
--   Default value: <tt>True</tt>
cellComboHasEntry :: CellRendererComboClass self => Attr self Bool

-- | The tuple containing a model and a column in this model that determine
--   the possible strings that can be shown in the combo box. Note that
--   this tree model can be a datum in the tree model that is used to
--   populate the view in which the <a>CellRendererCombo</a> is part of. In
--   other words, it is possible that every <a>CellRendererCombo</a> can
--   show a different set of options on each row.
cellComboTextModel :: (TreeModelClass (model row), TypedTreeModelClass model, CellRendererComboClass self, GlibString string) => WriteAttr self (model row, ColumnId row string)


-- | Renders a spinning animation in a cell
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.20</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.CellRendererSpinner
data CellRendererSpinner
class CellRendererClass o => CellRendererSpinnerClass o
castToCellRendererSpinner :: GObjectClass obj => obj -> CellRendererSpinner
toCellRendererSpinner :: CellRendererSpinnerClass o => o -> CellRendererSpinner

-- | Returns a new cell renderer which will show a spinner to indicate
--   activity.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
cellRendererSpinnerNew :: IO CellRendererSpinner

-- | Whether the spinner is active (ie. shown) in the cell.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
cellRendererSpinnerActive :: CellRendererSpinnerClass self => Attr self Bool

-- | 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 <a>Spinner</a> 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 <tt>numSteps</tt> style property and the
--   duration of the cycle by looking at <tt>cycleDuration</tt>.
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
cellRendererSpinnerPulse :: CellRendererSpinnerClass self => Attr self Int

-- | The <a>IconSize</a> value that specifies the size of the rendered
--   spinner.
--   
--   Default value: <a>IconSizeMenu</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
cellRendererSpinnerSize :: CellRendererSpinnerClass self => Attr self IconSize


-- | An interface for packing cells
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.CellLayout
class GObjectClass o => CellLayoutClass o
toCellLayout :: CellLayoutClass o => o -> CellLayout

-- | Packs the <tt>cell</tt> into the beginning of the cell layout. If
--   <tt>expand</tt> is <tt>False</tt>, then the <tt>cell</tt> is allocated
--   no more space than it needs. Any unused space is divided evenly
--   between cells for which <tt>expand</tt> is <tt>True</tt>.
--   
--   Note that reusing the same cell renderer is not supported.
cellLayoutPackStart :: (CellLayoutClass self, CellRendererClass cell) => self -> cell -> Bool -> IO ()

-- | Adds the <tt>cell</tt> to the end of <tt>cellLayout</tt>. If
--   <tt>expand</tt> is <tt>False</tt>, then the <tt>cell</tt> is allocated
--   no more space than it needs. Any unused space is divided evenly
--   between cells for which <tt>expand</tt> is <tt>True</tt>.
--   
--   Note that reusing the same cell renderer is not supported.
cellLayoutPackEnd :: (CellLayoutClass self, CellRendererClass cell) => self -> cell -> Bool -> IO ()

-- | Re-inserts <tt>cell</tt> at <tt>position</tt>. Note that <tt>cell</tt>
--   has already to be packed into <tt>cellLayout</tt> for this to function
--   properly.
cellLayoutReorder :: (CellLayoutClass self, CellRendererClass cell) => self -> cell -> Int -> IO ()

-- | Remove all renderers from the cell layout.
cellLayoutClear :: CellLayoutClass self => self -> IO ()

-- | Clears all existing attributes previously set with
--   <a>cellLayoutSetAttributes</a>.
cellLayoutClearAttributes :: (CellLayoutClass self, CellRendererClass cell) => self -> cell -> IO ()

-- | Returns the cell renderers which have been added to
--   <tt>cellLayout</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
cellLayoutGetCells :: CellLayoutClass self => self -> IO [CellRenderer]

-- | Adds an attribute mapping to the renderer <tt>cell</tt>. The
--   <tt>column</tt> is the <a>ColumnId</a> of the model to get a value
--   from, and the <tt>attribute</tt> is the parameter on <tt>cell</tt> to
--   be set from the value. So for example if column 2 of the model
--   contains strings, you could have the "text" attribute of a
--   <a>CellRendererText</a> get its values from column 2.
cellLayoutAddColumnAttribute :: (CellLayoutClass self, CellRendererClass cell) => self -> cell -> ReadWriteAttr cell a v -> ColumnId row v -> IO ()

-- | Specify how a row of the <tt>model</tt> defines the attributes of the
--   <a>CellRenderer</a> <tt>cell</tt>. This is a convenience wrapper
--   around <a>cellLayoutSetAttributeFunc</a> in that it sets the cells of
--   the <tt>cell</tt> with the data retrieved from the model.
--   
--   <ul>
--   <li>Note on using <a>TreeModelSort</a> and <a>TreeModelFilter</a>:
--   These two models wrap another model, the so-called child model,
--   instead of storing their own data. This raises the problem that the
--   data of cell renderers must be set using the child model, while the
--   <a>TreeIter</a>s that the view works with refer to the model that
--   encapsulates the child model. For convenience, this function
--   transparently translates an iterator to the child model before
--   extracting the data using e.g.
--   <a>treeModelSortConvertIterToChildIter</a>. Hence, it is possible to
--   install the encapsulating model in the view and to pass the child
--   model to this function.</li>
--   </ul>
cellLayoutSetAttributes :: (CellLayoutClass self, CellRendererClass cell, TreeModelClass (model row), TypedTreeModelClass model) => self -> cell -> model row -> (row -> [AttrOp cell]) -> IO ()

-- | Install a function that looks up a row in the model and sets the
--   attributes of the <a>CellRenderer</a> <tt>cell</tt> using the row's
--   content.
cellLayoutSetAttributeFunc :: (CellLayoutClass self, CellRendererClass cell, TreeModelClass model) => self -> cell -> model -> (TreeIter -> IO ()) -> IO ()
instance CellLayoutClass CellView
instance CellLayoutClass IconView
instance CellLayoutClass EntryCompletion
instance CellLayoutClass TreeViewColumn
instance CellLayoutClass ComboBox
instance CellLayoutClass ComboBoxEntry


-- | A widget used to choose from a list of items.
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.ComboBox
data ComboBox
class BinClass o => ComboBoxClass o
castToComboBox :: GObjectClass obj => obj -> ComboBox
gTypeComboBox :: GType
toComboBox :: ComboBoxClass o => o -> ComboBox

-- | Create a combo box that holds strings.
--   
--   This function stores a <a>ListStore</a> with the widget and sets the
--   model to the list store. The widget can contain only strings. The
--   model can be retrieved with <a>comboBoxGetModel</a>. The list store
--   can be retrieved with <a>comboBoxGetModelText</a>. Any exisiting model
--   or renderers are removed before setting the new text model. Note that
--   the functions <a>comboBoxAppendText</a>, <a>comboBoxInsertText</a>,
--   <a>comboBoxPrependText</a>, <a>comboBoxRemoveText</a> and
--   <a>comboBoxGetActiveText</a> can be called on a combo box only once
--   <a>comboBoxSetModelText</a> is called.
type ComboBoxText = Text

-- | Creates a new empty <a>ComboBox</a>.
comboBoxNew :: IO ComboBox

-- | Creates a new empty <a>ComboBox</a> with an entry.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.24</li>
--   </ul>
comboBoxNewWithEntry :: IO ComboBox

-- | Convenience function which constructs a new text combo box that is a
--   <a>ComboBox</a> just displaying strings. This function internally
--   calls <a>comboBoxSetModelText</a> after creating a new combo box.
comboBoxNewText :: IO ComboBox

-- | Creates a new <a>ComboBox</a> with the model initialized to
--   <tt>model</tt>.
comboBoxNewWithModel :: TreeModelClass model => model -> IO ComboBox

-- | Creates a new empty <a>ComboBox</a> with an entry and with the model
--   initialized to <tt>model</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.24</li>
--   </ul>
comboBoxNewWithModelAndEntry :: TreeModelClass model => model -> IO ComboBox
comboBoxSetModelText :: ComboBoxClass self => self -> IO (ListStore ComboBoxText)

-- | Retrieve the model that was created with <a>comboBoxSetModelText</a>.
comboBoxGetModelText :: ComboBoxClass self => self -> IO (ListStore ComboBoxText)

-- | Appends <tt>string</tt> to the list of strings stored in
--   <tt>comboBox</tt>. Note that you can only use this function with combo
--   boxes constructed with <a>comboBoxNewText</a>. Returns the index of
--   the appended text.
comboBoxAppendText :: ComboBoxClass self => self -> ComboBoxText -> IO Int

-- | Inserts <tt>string</tt> at <tt>position</tt> in the list of strings
--   stored in <tt>comboBox</tt>. Note that you can only use this function
--   with combo boxes constructed with <a>comboBoxNewText</a>.
comboBoxInsertText :: ComboBoxClass self => self -> Int -> ComboBoxText -> IO ()

-- | Prepends <tt>string</tt> to the list of strings stored in
--   <tt>comboBox</tt>. Note that you can only use this function with combo
--   boxes constructed with <a>comboBoxNewText</a>.
comboBoxPrependText :: ComboBoxClass self => self -> ComboBoxText -> IO ()

-- | Removes the string at <tt>position</tt> from <tt>comboBox</tt>. Note
--   that you can only use this function with combo boxes constructed with
--   <a>comboBoxNewText</a>.
comboBoxRemoveText :: ComboBoxClass self => self -> Int -> IO ()

-- | Returns the currently active string in <tt>comboBox</tt> or
--   <tt>Nothing</tt> if none is selected. Note that you can only use this
--   function with combo boxes constructed with <a>comboBoxNewText</a>.
comboBoxGetActiveText :: ComboBoxClass self => self -> IO (Maybe ComboBoxText)

-- | Returns the wrap width which is used to determine the number of
--   columns for the popup menu. If the wrap width is larger than 1, the
--   combo box is in table mode.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxGetWrapWidth :: ComboBoxClass self => self -> IO Int

-- | Sets the wrap width of the combo box to be <tt>width</tt>. The wrap
--   width is basically the preferred number of columns when you want the
--   popup to be laid out in a table.
comboBoxSetWrapWidth :: ComboBoxClass self => self -> Int -> IO ()

-- | Gets the column with row span information for <tt>comboBox</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxGetRowSpanColumn :: ComboBoxClass self => self -> IO (ColumnId row Int)

-- | Sets the column with row span information for <tt>comboBox</tt> to be
--   <tt>rowSpan</tt>. The row span column contains integers which indicate
--   how many rows an item should span.
comboBoxSetRowSpanColumn :: ComboBoxClass self => self -> ColumnId row Int -> IO ()

-- | Gets the source of the column span information for the combo box.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxGetColumnSpanColumn :: ComboBoxClass self => self -> IO (ColumnId row Int)

-- | Sets the source of the column span information for the combo box. The
--   column span source contains integers which indicate how many columns
--   an item should span.
comboBoxSetColumnSpanColumn :: ComboBoxClass self => self -> ColumnId row Int -> IO ()

-- | Returns the index of the currently active item, or -1 if there is no
--   active item. If the model is a non-flat treemodel, and the active item
--   is not an immediate child of the root of the tree, this function
--   returns <tt><tt>treePathGetIndices</tt> path !! 0</tt>, where
--   <tt>path</tt> is the <a>TreePath</a> of the active item.
comboBoxGetActive :: ComboBoxClass self => self -> IO Int

-- | Sets the active item of <tt>comboBox</tt> to be the item at
--   <tt>index</tt>.
comboBoxSetActive :: ComboBoxClass self => self -> Int -> IO ()

-- | Returns a <a>TreeIter</a> that points to the current active item, if
--   it exists, or <tt>Nothing</tt> if there is no current active item.
comboBoxGetActiveIter :: ComboBoxClass self => self -> IO (Maybe TreeIter)

-- | Sets the current active item to be the one referenced by
--   <tt>iter</tt>. <tt>iter</tt> must correspond to a path of depth one.
comboBoxSetActiveIter :: ComboBoxClass self => self -> TreeIter -> IO ()

-- | Returns the <a>TreeModel</a> which is acting as data source for
--   <tt>comboBox</tt>.
comboBoxGetModel :: ComboBoxClass self => self -> IO (Maybe TreeModel)

-- | Sets the model used by <tt>comboBox</tt> to be <tt>model</tt>. Will
--   unset a previously set model (if applicable). If model is
--   <tt>Nothing</tt>, then it will unset the model.
--   
--   Note that this function does not clear the cell renderers, you have to
--   call <tt>comboBoxCellLayoutClear</tt> yourself if you need to set up
--   different cell renderers for the new model.
comboBoxSetModel :: (ComboBoxClass self, TreeModelClass model) => self -> Maybe model -> IO ()

-- | Pops up the menu or dropdown list of the combo box.
--   
--   This function is mostly intended for use by accessibility
--   technologies; applications should have little use for it.
comboBoxPopup :: ComboBoxClass self => self -> IO ()

-- | Hides the menu or dropdown list of <tt>comboBox</tt>.
--   
--   This function is mostly intended for use by accessibility
--   technologies; applications should have little use for it.
comboBoxPopdown :: ComboBoxClass self => self -> IO ()

-- | Installs a mapping from the model to a row separator flag, which is
--   used to determine whether a row should be drawn as a separator. If the
--   row separator mapping is <tt>Nothing</tt>, no separators are drawn.
--   This is the default value.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxSetRowSeparatorSource :: (ComboBoxClass self, TreeModelClass (model row), TypedTreeModelClass model) => self -> Maybe (model row, row -> Bool) -> IO ()

-- | Sets whether the popup menu should have a tearoff menu item.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxSetAddTearoffs :: ComboBoxClass self => self -> Bool -> IO ()

-- | Gets the current value of the :add-tearoffs property.
comboBoxGetAddTearoffs :: ComboBoxClass self => self -> IO Bool

-- | Sets the menu's title in tearoff mode.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
comboBoxSetTitle :: (ComboBoxClass self, GlibString string) => self -> string -> IO ()

-- | Gets the current title of the menu in tearoff mode. See
--   <a>comboBoxSetAddTearoffs</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
comboBoxGetTitle :: (ComboBoxClass self, GlibString string) => self -> IO string

-- | Sets whether the combo box will grab focus when it is clicked with the
--   mouse. Making mouse clicks not grab focus is useful in places like
--   toolbars where you don't want the keyboard focus removed from the main
--   area of the application.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxSetFocusOnClick :: ComboBoxClass self => self -> Bool -> IO ()

-- | Returns whether the combo box grabs focus when it is clicked with the
--   mouse. See <a>comboBoxSetFocusOnClick</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxGetFocusOnClick :: ComboBoxClass self => self -> IO Bool

-- | The model from which the combo box takes the values shown in the list.
comboBoxModel :: (ComboBoxClass self, TreeModelClass treeModel) => ReadWriteAttr self TreeModel treeModel

-- | If wrap-width is set to a positive value, the list will be displayed
--   in multiple columns, the number of columns is determined by
--   wrap-width.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
comboBoxWrapWidth :: ComboBoxClass self => Attr self Int

-- | The values of that column are used to determine how many rows a value
--   in the list will span. Therefore, the values in the model column
--   pointed to by this property must be greater than zero and not larger
--   than wrap-width.
--   
--   Default value: <a>invalidColumnId</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxRowSpanColumn :: ComboBoxClass self => Attr self (ColumnId row Int)

-- | The values of that column are used to determine how many columns a
--   value in the list will span.
--   
--   Default value: <a>invalidColumnId</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxColumnSpanColumn :: ComboBoxClass self => Attr self (ColumnId row Int)

-- | The item which is currently active. This value only makes sense for a
--   list model.
comboBoxActive :: ComboBoxClass self => Attr self Int

-- | The add-tearoffs property controls whether generated menus have
--   tearoff menu items.
--   
--   Note that this only affects menu style combo boxes.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxAddTearoffs :: ComboBoxClass self => Attr self Bool

-- | The has-frame property controls whether a frame is drawn around the
--   entry.
--   
--   Default value: <tt>True</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
comboBoxHasFrame :: ComboBoxClass self => Attr self Bool

-- | Whether the combo box grabs focus when it is clicked with the mouse.
--   
--   Default value: <tt>True</tt>
comboBoxFocusOnClick :: ComboBoxClass self => Attr self Bool

-- | A title that may be displayed by the window manager when the popup is
--   torn-off.
--   
--   Default value: ""
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
comboBoxTearoffTitle :: (ComboBoxClass self, GlibString string) => Attr self string

-- | Whether the combo boxes dropdown is popped up. Note that this property
--   is mainly useful because it allows you to connect to
--   notify::popup-shown.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
comboBoxPopupShown :: ComboBoxClass self => ReadAttr self Bool

-- | 'title' property. See <a>comboBoxGetTitle</a> and
--   <a>comboBoxSetTitle</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
comboBoxTitle :: (ComboBoxClass self, GlibString string) => Attr self string

-- | Returns whether the combo box has an entry.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.24</li>
--   </ul>
comboBoxGetHasEntry :: ComboBoxClass self => self -> IO Bool

-- | Sets the model column which combo_box should use to get strings from
--   to be <tt>textColumn</tt>. The column text_column in the model of
--   <tt>comboBox</tt> must be of type ComboBoxText.
--   
--   This is only relevant if <tt>comboBox</tt> has been created with
--   "has-entry" as True.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.24</li>
--   </ul>
comboBoxSetEntryTextColumn :: ComboBoxClass comboBox => comboBox -> ColumnId row ComboBoxText -> IO ()

-- | Returns the column which <tt>comboBox</tt> is using to get the strings
--   from to display in the internal entry.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.24</li>
--   </ul>
comboBoxGetEntryTextColumn :: ComboBoxClass comboBox => comboBox -> IO (ColumnId row ComboBoxText)

-- | The changed signal is emitted when the active item is changed. The can
--   be due to the user selecting a different item from the list, or due to
--   a call to <a>comboBoxSetActiveIter</a>. It will also be emitted while
--   typing into a <a>ComboBoxEntry</a>, as well as when selecting an item
--   from the <tt>ComboBoxEntry'</tt>s list.
changed :: ComboBoxClass self => Signal self (IO ())

-- | <i>Deprecated: instead of 'onChanged obj' use 'on obj changed'</i>
onChanged :: ComboBoxClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterChanged obj' use 'after obj
--   changed'</i>
afterChanged :: ComboBoxClass self => self -> IO () -> IO (ConnectId self)


-- | A text entry field with a dropdown list
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry
data ComboBoxEntry
class ComboBoxClass o => ComboBoxEntryClass o
castToComboBoxEntry :: GObjectClass obj => obj -> ComboBoxEntry
gTypeComboBoxEntry :: GType
toComboBoxEntry :: ComboBoxEntryClass o => o -> ComboBoxEntry

-- | Creates a new <a>ComboBoxEntry</a> which has a <a>Entry</a> as child.
--   After construction, you should set a model using
--   <a>comboBoxSetModel</a> and a text column using
--   <a>comboBoxEntrySetTextColumn</a>.
comboBoxEntryNew :: IO ComboBoxEntry

-- | Creates a new <a>ComboBoxEntry</a> with a store containing strings.
--   See <a>comboBoxEntrySetModelText</a>.
comboBoxEntryNewText :: IO ComboBoxEntry

-- | Creates a new <a>ComboBoxEntry</a> which has a <a>Entry</a> as child
--   and a list of strings as popup. You can get the <a>Entry</a> from a
--   <a>ComboBoxEntry</a> using <tt>binGetChild</tt>. To add and remove
--   strings from the list, just modify <tt>model</tt> using its data
--   manipulation API.
comboBoxEntryNewWithModel :: TreeModelClass model => model -> IO ComboBoxEntry

-- | Set a model that holds strings.
--   
--   This function stores a <a>ListStore</a> with the widget and sets the
--   model to the list store. The widget can contain only strings. The
--   model can be retrieved with <a>comboBoxGetModel</a>. The list store
--   can be retrieved with <a>comboBoxGetModelText</a>. Any exisiting model
--   or renderers are removed before setting the new text model. In order
--   to respond to new texts that the user enters, it is necessary to
--   connect to the <a>entryActivated</a> signal of the contained
--   <a>Entry</a> and insert the text into the text model which can be
--   retrieved with <a>comboBoxGetModelText</a>. Note that the functions
--   <a>comboBoxAppendText</a>, <a>comboBoxInsertText</a>,
--   <a>comboBoxPrependText</a>, <a>comboBoxRemoveText</a> and
--   <a>comboBoxGetActiveText</a> can be called on a combo box only once
--   <a>comboBoxEntrySetModelText</a> is called.
comboBoxEntrySetModelText :: ComboBoxEntryClass self => self -> IO (ListStore String)

-- | Sets the model column should be use to get strings from to be
--   <tt>textColumn</tt>.
comboBoxEntrySetTextColumn :: (ComboBoxEntryClass self, GlibString string) => self -> ColumnId row string -> IO ()

-- | Returns the column which is used to get the strings from.
comboBoxEntryGetTextColumn :: (ComboBoxEntryClass self, GlibString string) => self -> IO (ColumnId row string)

-- | Retrieve the text currently in the entry.
--   
--   <ul>
--   <li>Returns <tt>Nothing</tt> if no text is selected or entered.</li>
--   <li>Availabe in Gtk 2.6 or higher.</li>
--   </ul>
comboBoxEntryGetActiveText :: (ComboBoxEntryClass self, GlibString string) => self -> IO (Maybe string)

-- | A column in the data source model to get the strings from.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: <a>invalidColumnId</a>
comboBoxEntryTextColumn :: (ComboBoxEntryClass self, GlibString string) => Attr self (ColumnId row string)


-- | Collection of tags that can be used together
module Graphics.UI.Gtk.Multiline.TextTagTable
data TextTagTable
class GObjectClass o => TextTagTableClass o
castToTextTagTable :: GObjectClass obj => obj -> TextTagTable
gTypeTextTagTable :: GType
toTextTagTable :: TextTagTableClass o => o -> TextTagTable

-- | Creates a new <a>TextTagTable</a>. The table contains no tags by
--   default.
textTagTableNew :: IO TextTagTable

-- | Add a tag to the table. The tag is assigned the highest priority in
--   the table.
--   
--   The tag must not be in a tag table already, and may not have the same
--   name as an already-added tag.
textTagTableAdd :: (TextTagTableClass self, TextTagClass tag) => self -> tag -> IO ()

-- | Remove a tag from the table.
textTagTableRemove :: (TextTagTableClass self, TextTagClass tag) => self -> tag -> IO ()

-- | Look up a named tag.
textTagTableLookup :: (TextTagTableClass self, GlibString string) => self -> string -> IO (Maybe TextTag)

-- | Maps over each tag in the table.
textTagTableForeach :: TextTagTableClass self => self -> (TextTag -> IO ()) -> IO ()

-- | Returns the size of the table (the number of tags).
textTagTableGetSize :: TextTagTableClass self => self -> IO Int


-- | A position in the buffer preserved across buffer modifications
module Graphics.UI.Gtk.Multiline.TextMark
data TextMark
class GObjectClass o => TextMarkClass o
castToTextMark :: GObjectClass obj => obj -> TextMark
gTypeTextMark :: GType
toTextMark :: TextMarkClass o => o -> TextMark

-- | The name of a mark.
type MarkName = DefaultGlibString

-- | Creates a text mark. Add it to a buffer using
--   <tt>textBufferAddMark</tt>. If <tt>name</tt> is <tt>Nothing</tt>, the
--   mark is anonymous; otherwise, the mark can be retrieved by this name
--   using <tt>textBufferGetMark</tt>. If a mark has left gravity, and text
--   is inserted at the mark's current location, the mark will be moved to
--   the left of the newly-inserted text. If the mark has right gravity
--   (<tt>leftGravity</tt> = <tt>False</tt>), the mark will end up on the
--   right of newly-inserted text. The standard left-to-right cursor is a
--   mark with right gravity (when you type, the cursor stays on the right
--   side of the text you're typing).
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
textMarkNew :: Maybe MarkName -> Bool -> IO TextMark

-- | Sets the visibility of <tt>mark</tt>; the insertion point is normally
--   visible, i.e. you can see it as a vertical bar. Also, the text widget
--   uses a visible mark to indicate where a drop will occur when
--   dragging-and-dropping text. Most other marks are not visible. Marks
--   are not visible by default.
textMarkSetVisible :: TextMarkClass self => self -> Bool -> IO ()

-- | Returns <tt>True</tt> if the mark is visible (i.e. a cursor is
--   displayed for it)
textMarkGetVisible :: TextMarkClass self => self -> IO Bool

-- | Returns <tt>True</tt> if the mark has been removed from its buffer
--   with <tt>textBufferDeleteMark</tt>. Marks can't be used once deleted.
textMarkGetDeleted :: TextMarkClass self => self -> IO Bool

-- | Returns the mark name; returns <tt>Nothing</tt> for anonymous marks.
textMarkGetName :: TextMarkClass self => self -> IO (Maybe MarkName)

-- | Gets the buffer this mark is located inside, or <tt>Nothing</tt> if
--   the mark is deleted.
textMarkGetBuffer :: TextMarkClass self => self -> IO (Maybe TextBuffer)

-- | Determines whether the mark has left gravity.
--   
--   The name is misleading as Arabic, Hebrew and some other languages have
--   the beginning of a line towards the right.
textMarkGetLeftGravity :: TextMarkClass self => self -> IO Bool

-- | Retreives the name of a mark.
textMarkName :: TextMarkClass self => ReadAttr self (Maybe MarkName)

-- | The 'visible' property. See <a>textMarkGetVisible</a> and
--   <a>textMarkSetVisible</a>
textMarkVisible :: TextMarkClass self => Attr self Bool

-- | Determines whether the mark keeps to the left when text is inserted at
--   its position.
textMarkLeftGravity :: TextMarkClass self => ReadAttr self Bool


-- | Retrieve an integer or floating-point number from the user
module Graphics.UI.Gtk.Entry.SpinButton
data SpinButton
class EntryClass o => SpinButtonClass o
castToSpinButton :: GObjectClass obj => obj -> SpinButton
gTypeSpinButton :: GType
toSpinButton :: SpinButtonClass o => o -> SpinButton

-- | Creates a new <a>SpinButton</a>.
spinButtonNew :: Adjustment -> Double -> Int -> IO SpinButton

-- | This is a convenience constructor that allows creation of a numeric
--   <a>SpinButton</a> without manually creating an adjustment. The value
--   is initially set to the minimum value and a page increment of 10 *
--   <tt>step</tt> is the default. The precision of the spin button is
--   equivalent to the precision of <tt>step</tt>.
--   
--   Note that the way in which the precision is derived works best if
--   <tt>step</tt> is a power of ten. If the resulting precision is not
--   suitable for your needs, use <a>spinButtonSetDigits</a> to correct it.
spinButtonNewWithRange :: Double -> Double -> Double -> IO SpinButton

-- | Changes the properties of an existing spin button. The adjustment,
--   climb rate, and number of decimal places are all changed accordingly,
--   after this function call.
spinButtonConfigure :: SpinButtonClass self => self -> Adjustment -> Double -> Int -> IO ()

-- | Replaces the <a>Adjustment</a> associated with the spin button.
spinButtonSetAdjustment :: SpinButtonClass self => self -> Adjustment -> IO ()

-- | Get the adjustment associated with a <a>SpinButton</a>
spinButtonGetAdjustment :: SpinButtonClass self => self -> IO Adjustment

-- | Set the precision to be displayed by <tt>spinButton</tt>. Up to 20
--   digit precision is allowed.
spinButtonSetDigits :: SpinButtonClass self => self -> Int -> IO ()

-- | Fetches the precision of <tt>spinButton</tt>. See
--   <a>spinButtonSetDigits</a>.
spinButtonGetDigits :: SpinButtonClass self => self -> IO Int

-- | Sets the step and page increments for the spin button. This affects
--   how quickly the value changes when the spin button's arrows are
--   activated.
spinButtonSetIncrements :: SpinButtonClass self => self -> Double -> Double -> IO ()

-- | Gets the current step and page the increments used by the spin button.
--   See <a>spinButtonSetIncrements</a>.
spinButtonGetIncrements :: SpinButtonClass self => self -> IO (Double, Double)

-- | Sets the minimum and maximum allowable values for the spin button
spinButtonSetRange :: SpinButtonClass self => self -> Double -> Double -> IO ()

-- | Gets the range allowed for the spin button. See
--   <a>spinButtonSetRange</a>.
spinButtonGetRange :: SpinButtonClass self => self -> IO (Double, Double)

-- | Get the value of the spin button as a floating point value.
spinButtonGetValue :: SpinButtonClass self => self -> IO Double

-- | Get the value of the spin button as an integral value.
spinButtonGetValueAsInt :: SpinButtonClass self => self -> IO Int

-- | Set the value of the spin button.
spinButtonSetValue :: SpinButtonClass self => self -> Double -> IO ()

-- | Whether to clamp or ignore illegal values.
data SpinButtonUpdatePolicy
[UpdateAlways] :: SpinButtonUpdatePolicy
[UpdateIfValid] :: SpinButtonUpdatePolicy

-- | Sets the update behavior of a spin button. This determines whether the
--   spin button is always updated or only when a valid value is set.
spinButtonSetUpdatePolicy :: SpinButtonClass self => self -> SpinButtonUpdatePolicy -> IO ()

-- | Gets the update behavior of a spin button. See
--   <a>spinButtonSetUpdatePolicy</a>.
spinButtonGetUpdatePolicy :: SpinButtonClass self => self -> IO SpinButtonUpdatePolicy

-- | Sets the flag that determines if non-numeric text can be typed into
--   the spin button.
spinButtonSetNumeric :: SpinButtonClass self => self -> Bool -> IO ()

-- | Returns whether non-numeric text can be typed into the spin button.
--   See <a>spinButtonSetNumeric</a>.
spinButtonGetNumeric :: SpinButtonClass self => self -> IO Bool

-- | Spin a SpinButton with the following method.
data SpinType
[SpinStepForward] :: SpinType
[SpinStepBackward] :: SpinType
[SpinPageForward] :: SpinType
[SpinPageBackward] :: SpinType
[SpinHome] :: SpinType
[SpinEnd] :: SpinType
[SpinUserDefined] :: SpinType

-- | Increment or decrement a spin button's value in a specified direction
--   by a specified amount.
spinButtonSpin :: SpinButtonClass self => self -> SpinType -> Double -> IO ()

-- | Sets the flag that determines if a spin button value wraps around to
--   the opposite limit when the upper or lower limit of the range is
--   exceeded.
spinButtonSetWrap :: SpinButtonClass self => self -> Bool -> IO ()

-- | Returns whether the spin button's value wraps around to the opposite
--   limit when the upper or lower limit of the range is exceeded. See
--   <a>spinButtonSetWrap</a>.
spinButtonGetWrap :: SpinButtonClass self => self -> IO Bool

-- | Sets the policy as to whether values are corrected to the nearest step
--   increment when a spin button is activated after providing an invalid
--   value.
spinButtonSetSnapToTicks :: SpinButtonClass self => self -> Bool -> IO ()

-- | Returns whether the values are corrected to the nearest step. See
--   <a>spinButtonSetSnapToTicks</a>.
spinButtonGetSnapToTicks :: SpinButtonClass self => self -> IO Bool

-- | Manually force an update of the spin button.
spinButtonUpdate :: SpinButtonClass self => self -> IO ()

-- | The adjustment that holds the value of the spinbutton.
spinButtonAdjustment :: SpinButtonClass self => Attr self Adjustment

-- | The acceleration rate when you hold down a button.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
spinButtonClimbRate :: SpinButtonClass self => Attr self Double

-- | The number of decimal places to display.
--   
--   Allowed values: &lt;= 20
--   
--   Default value: 0
spinButtonDigits :: SpinButtonClass self => Attr self Int

-- | Whether erroneous values are automatically changed to a spin button's
--   nearest step increment.
--   
--   Default value: <tt>False</tt>
spinButtonSnapToTicks :: SpinButtonClass self => Attr self Bool

-- | Whether non-numeric characters should be ignored.
--   
--   Default value: <tt>False</tt>
spinButtonNumeric :: SpinButtonClass self => Attr self Bool

-- | Whether a spin button should wrap upon reaching its limits.
--   
--   Default value: <tt>False</tt>
spinButtonWrap :: SpinButtonClass self => Attr self Bool

-- | Whether the spin button should update always, or only when the value
--   is legal.
--   
--   Default value: <a>UpdateAlways</a>
spinButtonUpdatePolicy :: SpinButtonClass self => Attr self SpinButtonUpdatePolicy

-- | Reads the current value, or sets a new value.
--   
--   Default value: 0
spinButtonValue :: SpinButtonClass self => Attr self Double

-- | Install a custom input handler.
--   
--   <ul>
--   <li>This signal is called upon each time the value of the SpinButton
--   is set by spinButtonSetValue. The function can return Nothing if the
--   value is no good.</li>
--   </ul>
onInput :: SpinButtonClass sb => sb -> (IO (Maybe Double)) -> IO (ConnectId sb)

-- | Install a custom input handler.
--   
--   <ul>
--   <li>This signal is called upon each time the value of the SpinButton
--   is set by spinButtonSetValue. The function can return Nothing if the
--   value is no good.</li>
--   </ul>
afterInput :: SpinButtonClass sb => sb -> (IO (Maybe Double)) -> IO (ConnectId sb)

-- | Install a custom output handler.
--   
--   <ul>
--   <li>This handler makes it possible to query the current value and to
--   render something completely different to the screen using
--   entrySetText. The return value must be False in order to let the
--   default output routine run after this signal returns.</li>
--   </ul>
onOutput :: SpinButtonClass sb => sb -> IO Bool -> IO (ConnectId sb)

-- | Install a custom output handler.
--   
--   <ul>
--   <li>This handler makes it possible to query the current value and to
--   render something completely different to the screen using
--   entrySetText. The return value must be False in order to let the
--   default output routine run after this signal returns.</li>
--   </ul>
afterOutput :: SpinButtonClass sb => sb -> IO Bool -> IO (ConnectId sb)

-- | The value of the spin button has changed.
onValueSpinned :: SpinButtonClass sb => sb -> IO () -> IO (ConnectId sb)

-- | The value of the spin button has changed.
afterValueSpinned :: SpinButtonClass sb => sb -> IO () -> IO (ConnectId sb)
instance EditableClass SpinButton


-- | A vertical slider widget for selecting a value from a range
module Graphics.UI.Gtk.Entry.VScale
data VScale
class ScaleClass o => VScaleClass o
castToVScale :: GObjectClass obj => obj -> VScale
gTypeVScale :: GType
toVScale :: VScaleClass o => o -> VScale

-- | Creates a new <a>VScale</a>.
vScaleNew :: Adjustment -> IO VScale

-- | Creates a new vertical scale widget that lets the user input a number
--   between <tt>min</tt> and <tt>max</tt> (including <tt>min</tt> and
--   <tt>max</tt>) with the increment <tt>step</tt>. <tt>step</tt> must be
--   nonzero; it's the distance the slider moves when using the arrow keys
--   to adjust the scale value.
--   
--   Note that the way in which the precision is derived works best if
--   <tt>step</tt> is a power of ten. If the resulting precision is not
--   suitable for your needs, use <a>scaleSetDigits</a> to correct it.
vScaleNewWithRange :: Double -> Double -> Double -> IO VScale


-- | A horizontal slider widget for selecting a value from a range
module Graphics.UI.Gtk.Entry.HScale
data HScale
class ScaleClass o => HScaleClass o
castToHScale :: GObjectClass obj => obj -> HScale
gTypeHScale :: GType
toHScale :: HScaleClass o => o -> HScale

-- | Creates a new <a>HScale</a>.
hScaleNew :: Adjustment -> IO HScale

-- | Creates a new horizontal scale widget that lets the user input a
--   number between <tt>min</tt> and <tt>max</tt> (including <tt>min</tt>
--   and <tt>max</tt>) with the increment <tt>step</tt>. <tt>step</tt> must
--   be nonzero; it's the distance the slider moves when using the arrow
--   keys to adjust the scale value.
--   
--   Note that the way in which the precision is derived works best if
--   <tt>step</tt> is a power of ten. If the resulting precision is not
--   suitable for your needs, use <a>scaleSetDigits</a> to correct it.
hScaleNewWithRange :: Double -> Double -> Double -> IO HScale


-- | Completion functionality for <a>Entry</a>
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Entry.EntryCompletion
data EntryCompletion
class GObjectClass o => EntryCompletionClass o
castToEntryCompletion :: GObjectClass obj => obj -> EntryCompletion
gTypeEntryCompletion :: GType
toEntryCompletion :: EntryCompletionClass o => o -> EntryCompletion

-- | Creates a new <a>EntryCompletion</a> object.
entryCompletionNew :: IO EntryCompletion

-- | Gets the entry <tt>completion</tt> has been attached to.
entryCompletionGetEntry :: EntryCompletion -> IO (Maybe Entry)

-- | Sets the model for a <a>EntryCompletion</a>. If <tt>completion</tt>
--   already has a model set, it will remove it before setting the new
--   model. If model is <tt>Nothing</tt>, then it will unset the model.
entryCompletionSetModel :: TreeModelClass model => EntryCompletion -> Maybe model -> IO ()

-- | Returns the model the <a>EntryCompletion</a> is using as data source.
--   Returns <tt>Nothing</tt> if the model is unset.
entryCompletionGetModel :: EntryCompletion -> IO (Maybe TreeModel)

-- | Convenience function for setting up the most used case of this code: a
--   completion list with just strings. This function will set up
--   <tt>completion</tt> to have a list displaying all (and just) strings
--   in the completion list, and to get those strings from <tt>model</tt>.
--   This functions creates and adds a <a>CellRendererText</a> which
--   retrieves its content from the given model.
entryCompletionSetTextModel :: (TreeModelClass (model string), TypedTreeModelClass model, GlibString string) => EntryCompletion -> model string -> IO ()

-- | Sets the match function for <tt>completion</tt> to be <tt>func</tt>.
--   The match function is used to determine if a row should or should not
--   be in the completion list.
--   
--   <ul>
--   <li>The passed-in function decides whether the row indicated by the
--   <a>TreeIter</a> matches a given key, and should be displayed as a
--   possible completion for key. Note that the key is normalized and
--   case-folded. Normalization will standardizing such issues as whether a
--   character with an accent is represented as a base character and
--   combining accent or as a single precomposed character. If this is not
--   appropriate you can extract the original text from the entry.</li>
--   </ul>
entryCompletionSetMatchFunc :: GlibString string => EntryCompletion -> (string -> TreeIter -> IO Bool) -> IO ()

-- | Requires the length of the search key for <tt>completion</tt> to be at
--   least <tt>length</tt>. This is useful for long lists, where completing
--   using a small key takes a lot of time and will come up with
--   meaningless results anyway (ie, a too large dataset).
entryCompletionSetMinimumKeyLength :: EntryCompletion -> Int -> IO ()

-- | Returns the minimum key length as set for <tt>completion</tt>.
entryCompletionGetMinimumKeyLength :: EntryCompletion -> IO Int

-- | Requests a completion operation, or in other words a refiltering of
--   the current list with completions, using the current key. The
--   completion list view will be updated accordingly.
entryCompletionComplete :: EntryCompletion -> IO ()

-- | Inserts an action in <tt>completion</tt>'s action item list at
--   position <tt>index</tt> with text <tt>text</tt>. If you want the
--   action item to have markup, use
--   <a>entryCompletionInsertActionMarkup</a>.
entryCompletionInsertActionText :: GlibString string => EntryCompletion -> Int -> string -> IO ()

-- | Inserts an action in <tt>completion</tt>'s action item list at
--   position <tt>index</tt> with markup <tt>markup</tt>.
entryCompletionInsertActionMarkup :: GlibString string => EntryCompletion -> Int -> string -> IO ()

-- | Deletes the action at <tt>index</tt> from <tt>completion</tt>'s action
--   list.
entryCompletionDeleteAction :: EntryCompletion -> Int -> IO ()

-- | Convenience function for setting up the most used case of this code: a
--   completion list with just strings. This function will set up
--   <tt>completion</tt> to have a list displaying all (and just) strings
--   in the completion list, and to get those strings from <tt>column</tt>
--   in the model of <tt>completion</tt>.
--   
--   This functions creates and adds a <a>CellRendererText</a> for the
--   selected column.
entryCompletionSetTextColumn :: GlibString string => EntryCompletion -> ColumnId row string -> IO ()

-- | Requests a prefix insertion.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
entryCompletionInsertPrefix :: EntryCompletion -> IO ()

-- | Returns the column in the model of the completion to get strings from.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
entryCompletionGetTextColumn :: GlibString string => EntryCompletion -> IO (ColumnId row string)

-- | Sets whether the common prefix of the possible completions should be
--   automatically inserted in the entry.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
entryCompletionSetInlineCompletion :: EntryCompletion -> Bool -> IO ()

-- | Returns whether the common prefix of the possible completions should
--   be automatically inserted in the entry.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
entryCompletionGetInlineCompletion :: EntryCompletion -> IO Bool

-- | Sets whether the completions should be presented in a popup window.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
entryCompletionSetPopupCompletion :: EntryCompletion -> Bool -> IO ()

-- | Returns whether the completions should be presented in a popup window.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
entryCompletionGetPopupCompletion :: EntryCompletion -> IO Bool

-- | Sets whether the completion popup window will be resized to be the
--   same width as the entry.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
entryCompletionSetPopupSetWidth :: EntryCompletion -> Bool -> IO ()

-- | Returns whether the completion popup window will be resized to the
--   width of the entry.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
entryCompletionGetPopupSetWidth :: EntryCompletion -> IO Bool

-- | Sets whether the completion popup window will appear even if there is
--   only a single match. You may want to set this to <tt>False</tt> if you
--   are using inline completion.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
entryCompletionSetPopupSingleMatch :: EntryCompletion -> Bool -> IO ()

-- | Returns whether the completion popup window will appear even if there
--   is only a single match.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
entryCompletionGetPopupSingleMatch :: EntryCompletion -> IO Bool

-- | The model to find matches in.
entryCompletionModel :: TreeModelClass model => ReadWriteAttr EntryCompletion (Maybe TreeModel) (Maybe model)

-- | Minimum length of the search key in order to look up matches.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 1
entryCompletionMinimumKeyLength :: Attr EntryCompletion Int

-- | The column of the model containing the strings.
--   
--   Default value: <a>invalidColumnId</a>
entryCompletionTextColumn :: GlibString string => Attr EntryCompletion (ColumnId row string)

-- | Determines whether the common prefix of the possible completions
--   should be inserted automatically in the entry. Note that this requires
--   text-column to be set, even if you are using a custom match function.
--   
--   Default value: <tt>False</tt>
entryCompletionInlineCompletion :: Attr EntryCompletion Bool

-- | Determines whether the possible completions should be shown in a popup
--   window.
--   
--   Default value: <tt>True</tt>
entryCompletionPopupCompletion :: Attr EntryCompletion Bool

-- | Determines whether the completions popup window will be resized to the
--   width of the entry.
--   
--   Default value: <tt>True</tt>
entryCompletionPopupSetWidth :: Attr EntryCompletion Bool

-- | Determines whether the completions popup window will shown for a
--   single possible completion. You probably want to set this to
--   <tt>False</tt> if you are using inline completion.
--   
--   Default value: <tt>True</tt>
entryCompletionPopupSingleMatch :: Attr EntryCompletion Bool

-- | Gets emitted when the inline autocompletion is triggered. The default
--   behaviour is to make the entry display the whole prefix and select the
--   newly inserted part.
--   
--   Applications may connect to this signal in order to insert only a
--   smaller part of the <tt>prefix</tt> into the entry - e.g. the entry
--   used in the <a>FileChooser</a> inserts only the part of the prefix up
--   to the next '/'.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
insertPrefix :: (EntryCompletionClass self, GlibString string) => Signal self (string -> IO Bool)

-- | Gets emitted when an action is activated.
completionActionActivated :: EntryCompletionClass self => Signal self (Int -> IO ())

-- | Gets emitted when a match from the list is selected. The default
--   behaviour is to replace the contents of the entry with the contents of
--   the text column in the row pointed to by <tt>iter</tt>.
matchSelected :: EntryCompletionClass self => Signal self (TreeModel -> TreeIter -> IO Bool)

-- | Gets emitted when the inline autocompletion is triggered. The default
--   behaviour is to make the entry display the whole prefix and select the
--   newly inserted part.
--   
--   Applications may connect to this signal in order to insert only a
--   smaller part of the <tt>prefix</tt> into the entry - e.g. the entry
--   used in the <a>FileChooser</a> inserts only the part of the prefix up
--   to the next '/'.
onInsertPrefix :: (EntryCompletionClass self, GlibString string) => self -> (string -> IO Bool) -> IO (ConnectId self)

-- | Gets emitted when the inline autocompletion is triggered. The default
--   behaviour is to make the entry display the whole prefix and select the
--   newly inserted part.
--   
--   Applications may connect to this signal in order to insert only a
--   smaller part of the <tt>prefix</tt> into the entry - e.g. the entry
--   used in the <a>FileChooser</a> inserts only the part of the prefix up
--   to the next '/'.
afterInsertPrefix :: (EntryCompletionClass self, GlibString string) => self -> (string -> IO Bool) -> IO (ConnectId self)

-- | Gets emitted when an action is activated.
onActionActivated :: EntryCompletionClass self => self -> (Int -> IO ()) -> IO (ConnectId self)

-- | Gets emitted when an action is activated.
afterActionActivated :: EntryCompletionClass self => self -> (Int -> IO ()) -> IO (ConnectId self)


-- | Text buffer for <a>Entry</a>
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.18</li>
--   </ul>
module Graphics.UI.Gtk.Entry.EntryBuffer
data EntryBuffer
class GObjectClass o => EntryBufferClass o
castToEntryBuffer :: GObjectClass obj => obj -> EntryBuffer
toEntryBuffer :: EntryBufferClass o => o -> EntryBuffer

-- | Create a new <a>EntryBuffer</a> object.
--   
--   Optionally, specify initial text to set in the buffer.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferNew :: GlibString string => Maybe string -> IO EntryBuffer

-- | Retrieves the length in bytes of the buffer. See
--   <tt>entryBufferGetLength</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferGetBytes :: EntryBufferClass self => self -> IO Int

-- | Inserts <tt>chars</tt> into the contents of the buffer, at position
--   <tt>position</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferInsertText :: (EntryBufferClass self, GlibString string) => self -> Int -> string -> IO Int

-- | Deletes a sequence of characters from the buffer. <tt>nChars</tt>
--   characters are deleted starting at <tt>position</tt>. If
--   <tt>nChars</tt> is negative, then all characters until the end of the
--   text are deleted.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferDeleteText :: EntryBufferClass self => self -> Int -> Int -> IO Int

-- | Used when subclassing <a>EntryBuffer</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferEmitDeletedText :: EntryBufferClass self => self -> Int -> Int -> IO ()

-- | Used when subclassing <a>EntryBuffer</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferEmitInsertedText :: (EntryBufferClass self, GlibString string) => self -> Int -> string -> Int -> IO ()

-- | The contents of the buffer.
--   
--   Default value: ""
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferText :: (EntryBufferClass self, GlibString string) => Attr self string

-- | The length of the text in buffer.
--   
--   Allowed values: &lt;= 65535
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferLength :: EntryBufferClass self => ReadAttr self Int

-- | The maximum length of the text in the buffer.
--   
--   Allowed values: [0,65535]
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferMaxLength :: EntryBufferClass self => Attr self Int

-- | <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferInsertedText :: (EntryBufferClass self, GlibString string) => Signal self (Int -> string -> Int -> IO ())

-- | <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
entryBufferDeletedText :: EntryBufferClass self => Signal self (Int -> Int -> IO ())


-- | Interface for text-editing widgets
module Graphics.UI.Gtk.Entry.Editable
data Editable
class GObjectClass o => EditableClass o
castToEditable :: GObjectClass obj => obj -> Editable
gTypeEditable :: GType
toEditable :: EditableClass o => o -> Editable

-- | Selects a region of text. The characters that are selected are those
--   characters at positions from <tt>startPos</tt> up to, but not
--   including <tt>endPos</tt>. If <tt>endPos</tt> is negative, then the
--   the characters selected will be those characters from
--   <tt>startPos</tt> to the end of the text.
--   
--   Calling this function with <tt>start</tt>=1 and <tt>end</tt>=4 it will
--   mark "ask" in the string "Haskell".
editableSelectRegion :: EditableClass self => self -> Int -> Int -> IO ()

-- | Gets the current selection bounds, if there is a selection.
editableGetSelectionBounds :: EditableClass self => self -> IO (Int, Int)

-- | Inserts text at a given position.
editableInsertText :: (EditableClass self, GlibString string) => self -> string -> Int -> IO Int

-- | Deletes a sequence of characters. The characters that are deleted are
--   those characters at positions from <tt>startPos</tt> up to, but not
--   including <tt>endPos</tt>. If <tt>endPos</tt> is negative, then the
--   the characters deleted will be those characters from <tt>startPos</tt>
--   to the end of the text.
editableDeleteText :: EditableClass self => self -> Int -> Int -> IO ()

-- | Retrieves a sequence of characters. The characters that are retrieved
--   are those characters at positions from <tt>startPos</tt> up to, but
--   not including <tt>endPos</tt>. If <tt>endPos</tt> is negative, then
--   the the characters retrieved will be those characters from
--   <tt>startPos</tt> to the end of the text.
editableGetChars :: (EditableClass self, GlibString string) => self -> Int -> Int -> IO string

-- | Causes the characters in the current selection to be copied to the
--   clipboard and then deleted from the widget.
editableCutClipboard :: EditableClass self => self -> IO ()

-- | Causes the characters in the current selection to be copied to the
--   clipboard.
editableCopyClipboard :: EditableClass self => self -> IO ()

-- | Causes the contents of the clipboard to be pasted into the given
--   widget at the current cursor position.
editablePasteClipboard :: EditableClass self => self -> IO ()

-- | Deletes the current contents of the widgets selection and disclaims
--   the selection.
editableDeleteSelection :: EditableClass self => self -> IO ()

-- | Determines if the user can edit the text in the editable widget or
--   not.
editableSetEditable :: EditableClass self => self -> Bool -> IO ()

-- | Retrieves whether the text is editable. See
--   <a>editableSetEditable</a>.
editableGetEditable :: EditableClass self => self -> IO Bool

-- | Sets the cursor position.
editableSetPosition :: EditableClass self => self -> Int -> IO ()

-- | Retrieves the current cursor position.
editableGetPosition :: EditableClass self => self -> IO Int

-- | 'position' property. See <a>editableGetPosition</a> and
--   <a>editableSetPosition</a>
editablePosition :: EditableClass self => Attr self Int

-- | 'editable' property. See <a>editableGetEditable</a> and
--   <a>editableSetEditable</a>
editableEditable :: EditableClass self => Attr self Bool

-- | The <a>editableChanged</a> signal is emitted at the end of a single
--   user-visible operation on the contents of the <a>Editable</a>.
--   
--   <ul>
--   <li>For inctance, a paste operation that replaces the contents of the
--   selection will cause only one signal emission (even though it is
--   implemented by first deleting the selection, then inserting the new
--   content, and may cause multiple <tt>inserText</tt> signals to be
--   emitted).</li>
--   </ul>
editableChanged :: EditableClass ec => Signal ec (IO ())

-- | Emitted when a piece of text is deleted from the <a>Editable</a>
--   widget.
--   
--   <ul>
--   <li>See <a>insertText</a> for information on how to use this
--   signal.</li>
--   </ul>
deleteText :: EditableClass self => Signal self (Int -> Int -> IO ())

-- | Emitted when a piece of text is inserted into the <a>Editable</a>
--   widget.
--   
--   <ul>
--   <li>The connected signal receives the text that is inserted, together
--   with the position in the entry widget. The return value should be the
--   position in the entry widget that lies past the recently inserted text
--   (i.e. you should return the given position plus the length of the
--   string).</li>
--   <li>To modify the text that the user inserts, you need to connect to
--   this signal, modify the text the way you want and then call
--   <a>editableInsertText</a>. To avoid that this signal handler is called
--   recursively, you need to temporarily block it using
--   <a>signalBlock</a>. After the default signal handler has inserted your
--   modified text, it is important that you prevent the default handler
--   from being executed again when this signal handler returns. To stop
--   the current signal, use <a>stopInsertText</a>. The following code is
--   an example of how to turn all input into uppercase:</li>
--   </ul>
--   
--   <pre>
--   idRef &lt;- newIORef undefined
--   id &lt;- entry `on` insertText $ \str pos -&gt; do
--   id &lt;- readIORef idRef
--   signalBlock id
--   pos' &lt;- editableInsertText entry (map toUpper str) pos
--   signalUnblock id
--   stopInsertText id
--   return pos'
--   writeIORef idRef id
--   </pre>
--   
--   Note that binding <a>insertText</a> using <a>after</a> is not very
--   useful, except to track editing actions.
insertText :: (EditableClass self, GlibString string) => Signal self (string -> Int -> IO Int)

-- | Stop the current signal that deletes text.
stopDeleteText :: EditableClass self => ConnectId self -> IO ()

-- | Stop the current signal that inserts text.
stopInsertText :: EditableClass self => ConnectId self -> IO ()
onEditableChanged :: EditableClass ec => ec -> IO () -> IO (ConnectId ec)
afterEditableChanged :: EditableClass ec => ec -> IO () -> IO (ConnectId ec)
onDeleteText :: EditableClass self => self -> (Int -> Int -> IO ()) -> IO (ConnectId self)
afterDeleteText :: EditableClass self => self -> (Int -> Int -> IO ()) -> IO (ConnectId self)
onInsertText :: (EditableClass self, GlibString string) => self -> (string -> Int -> IO Int) -> IO (ConnectId self)
afterInsertText :: (EditableClass self, GlibString string) => self -> (string -> Int -> IO Int) -> IO (ConnectId self)


-- | A button which pops up a volume control
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.12</li>
--   </ul>
module Graphics.UI.Gtk.Buttons.VolumeButton
data VolumeButton
class ScaleButtonClass o => VolumeButtonClass o
castToVolumeButton :: GObjectClass obj => obj -> VolumeButton
toVolumeButton :: VolumeButtonClass o => o -> VolumeButton

-- | Creates a <a>VolumeButton</a>, with a range between 0.0 and 1.0, with
--   a stepping of 0.02. Volume values can be obtained and modified using
--   the functions from <a>ScaleButton</a>.
volumeButtonNew :: IO VolumeButton


-- | A button which pops up a scale
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.12</li>
--   </ul>
module Graphics.UI.Gtk.Buttons.ScaleButton
data ScaleButton
class ButtonClass o => ScaleButtonClass o
castToScaleButton :: GObjectClass obj => obj -> ScaleButton
toScaleButton :: ScaleButtonClass o => o -> ScaleButton

-- | Creates a <a>ScaleButton</a>, with a range between <tt>min</tt> and
--   <tt>max</tt>, with a stepping of <tt>step</tt>.
scaleButtonNew :: GlibString string => IconSize -> Double -> Double -> Double -> [string] -> IO ScaleButton

-- | Sets the icons to be used by the scale button. For details, see the
--   "icons" property.
scaleButtonSetIcons :: (ScaleButtonClass self, GlibString string) => self -> [string] -> IO ()

-- | Retrieves the popup of the <a>ScaleButton</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
scaleButtonGetPopup :: ScaleButtonClass self => self -> IO Widget

-- | Retrieves the plus button of the <a>ScaleButton</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
scaleButtonGetPlusButton :: ScaleButtonClass self => self -> IO Widget

-- | Retrieves the minus button of the <a>ScaleButton</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
scaleButtonGetMinusButton :: ScaleButtonClass self => self -> IO Widget

-- | The value of the scale.
--   
--   Default value: 0
scaleButtonValue :: ScaleButtonClass self => Attr self Double

-- | The icon size.
--   
--   Default value: '<tt>IconSizeSmallToolbar'</tt>
scaleButtonSize :: ScaleButtonClass self => Attr self IconSize

-- | The <a>Adjustment</a> that contains the current value of this scale
--   button object.
scaleButtonAdjustment :: ScaleButtonClass self => Attr self Adjustment

-- | The names of the icons to be used by the scale button. The first item
--   in the array will be used in the button when the current value is the
--   lowest value, the second item for the highest value. All the
--   subsequent icons will be used for all the other values, spread evenly
--   over the range of values.
--   
--   If there's only one icon name in the icons array, it will be used for
--   all the values. If only two icon names are in the icons array, the
--   first one will be used for the bottom 50% of the scale, and the second
--   one for the top 50%.
--   
--   It is recommended to use at least 3 icons so that the
--   <a>ScaleButton</a> reflects the current value of the scale better for
--   the users.
--   
--   Since 2.12
scaleButtonIcons :: (ScaleButtonClass self, GlibString string) => ReadWriteAttr self [string] (Maybe [string])

-- | The <tt>popdown</tt> signal is a keybinding signal which gets emitted
--   to popdown the scale widget.
--   
--   The default binding for this signal is Escape.
scaleButtonPopdown :: ScaleButtonClass self => Signal self (IO ())

-- | The <tt>popup</tt> signal is a keybinding signal which gets emitted to
--   popup the scale widget.
--   
--   The default bindings for this signal are Space, Enter and Return.
scaleButtonPopup :: ScaleButtonClass self => Signal self (IO ())

-- | The <a>scaleButtonValueChanged</a> signal is emitted when the value
--   field has changed.
scaleButtonValueChanged :: ScaleButtonClass self => Signal self (Double -> IO ())


-- | Create buttons bound to a URL
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Buttons.LinkButton
data LinkButton
class ButtonClass o => LinkButtonClass o
castToLinkButton :: GObjectClass obj => obj -> LinkButton
toLinkButton :: LinkButtonClass o => o -> LinkButton

-- | Creates a new <a>LinkButton</a> with the URI as its text.
linkButtonNew :: GlibString string => string -> IO LinkButton

-- | Creates a new <a>LinkButton</a> containing a label.
linkButtonNewWithLabel :: GlibString string => string -> string -> IO LinkButton

-- | Sets <tt>func</tt> as the function that should be invoked every time a
--   user clicks a <a>LinkButton</a>. This function is called before every
--   callback registered for the <tt>buttonClicked</tt> signal.
--   
--   If no uri hook has been set, Gtk+ defaults to calling
--   <tt>showURI</tt>.
--   
--   Removed in Gtk3.
linkButtonSetUriHook :: (String -> IO ()) -> IO ()

-- | The URI bound to this button.
--   
--   Default value: ""
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
linkButtonURI :: (LinkButtonClass self, GlibString string) => Attr self string

-- | The <tt>visited</tt> state of this button. A visited link is drawn in
--   a different color.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
linkButtonVisited :: LinkButtonClass self => Attr self Bool


-- | Create buttons which retain their state
module Graphics.UI.Gtk.Buttons.ToggleButton
data ToggleButton
class ButtonClass o => ToggleButtonClass o
castToToggleButton :: GObjectClass obj => obj -> ToggleButton
gTypeToggleButton :: GType
toToggleButton :: ToggleButtonClass o => o -> ToggleButton

-- | Creates a new toggle button. A widget should be packed into the
--   button, as in <a>buttonNew</a>.
toggleButtonNew :: IO ToggleButton

-- | Creates a new toggle button with a text label.
toggleButtonNewWithLabel :: GlibString string => string -> IO ToggleButton

-- | Creates a new <a>ToggleButton</a> containing a label. The label will
--   be created using <a>labelNewWithMnemonic</a>, so underscores in
--   <tt>label</tt> indicate the mnemonic for the button.
toggleButtonNewWithMnemonic :: GlibString string => string -> IO ToggleButton

-- | Sets whether the button is displayed as a separate indicator and
--   label. You can call this function on a <a>CheckButton</a> or a
--   <a>RadioButton</a> with <tt>False</tt> to make the button look like a
--   normal button.
--   
--   This function only affects instances of classes like
--   <a>CheckButton</a> and <a>RadioButton</a> that derive from
--   <a>ToggleButton</a>, not instances of <a>ToggleButton</a> itself.
toggleButtonSetMode :: ToggleButtonClass self => self -> Bool -> IO ()

-- | Retrieves whether the button is displayed as a separate indicator and
--   label. See <a>toggleButtonSetMode</a>.
toggleButtonGetMode :: ToggleButtonClass self => self -> IO Bool

-- | Emits the toggled signal on the <a>ToggleButton</a>. There is no good
--   reason for an application ever to call this function.
toggleButtonToggled :: ToggleButtonClass self => self -> IO ()

-- | Queries a <a>ToggleButton</a> and returns its current state. Returns
--   <tt>True</tt> if the toggle button is pressed in and <tt>False</tt> if
--   it is raised.
toggleButtonGetActive :: ToggleButtonClass self => self -> IO Bool

-- | Sets the status of the toggle button. Set to <tt>True</tt> if you want
--   the <a>ToggleButton</a> to be 'pressed in', and <tt>False</tt> to
--   raise it. This action causes the toggled signal to be emitted.
toggleButtonSetActive :: ToggleButtonClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>toggleButtonSetInconsistent</a>.
toggleButtonGetInconsistent :: ToggleButtonClass self => self -> IO Bool

-- | If the user has selected a range of elements (such as some text or
--   spreadsheet cells) that are affected by a toggle button, and the
--   current values in that range are inconsistent, you may want to display
--   the toggle in an "in between" state. This function turns on "in
--   between" display. Normally you would turn off the inconsistent state
--   again if the user toggles the toggle button. This has to be done
--   manually, <a>toggleButtonSetInconsistent</a> only affects visual
--   appearance, it doesn't affect the semantics of the button.
toggleButtonSetInconsistent :: ToggleButtonClass self => self -> Bool -> IO ()

-- | If the toggle button should be pressed in or not.
--   
--   Default value: <tt>False</tt>
toggleButtonActive :: ToggleButtonClass self => Attr self Bool

-- | If the toggle button is in an "in between" state.
--   
--   Default value: <tt>False</tt>
toggleButtonInconsistent :: ToggleButtonClass self => Attr self Bool

-- | If the toggle part of the button is displayed.
--   
--   Default value: <tt>False</tt>
toggleButtonDrawIndicator :: ToggleButtonClass self => Attr self Bool

-- | 'mode' property. See <a>toggleButtonGetMode</a> and
--   <a>toggleButtonSetMode</a>
toggleButtonMode :: ToggleButtonClass self => Attr self Bool

-- | Should be connected if you wish to perform an action whenever the
--   <tt>ToggleButton'</tt>s state is changed.
toggled :: ToggleButtonClass self => Signal self (IO ())

-- | Whenever the state of the button is changed, the toggled signal is
--   emitted.
onToggled :: ToggleButtonClass self => self -> IO () -> IO (ConnectId self)

-- | Whenever the state of the button is changed, the toggled signal is
--   emitted.
afterToggled :: ToggleButtonClass self => self -> IO () -> IO (ConnectId self)


-- | A choice from multiple check buttons
module Graphics.UI.Gtk.Buttons.RadioButton
data RadioButton
class CheckButtonClass o => RadioButtonClass o
castToRadioButton :: GObjectClass obj => obj -> RadioButton
gTypeRadioButton :: GType
toRadioButton :: RadioButtonClass o => o -> RadioButton

-- | Creates a new <a>RadioButton</a> with a new group. To be of any
--   practical value, a widget should then be packed into the radio button.
radioButtonNew :: IO RadioButton

-- | Creates a new <a>RadioButton</a> with a text label.
radioButtonNewWithLabel :: GlibString string => string -> IO RadioButton

-- | Creates a new <a>RadioButton</a> containing a label. The label will be
--   created using <a>labelNewWithMnemonic</a>, so underscores in
--   <tt>label</tt> indicate the mnemonic for the button.
radioButtonNewWithMnemonic :: GlibString string => string -> IO RadioButton

-- | Creates a new <a>RadioButton</a>, adding it to the same group as the
--   group to which <tt>groupMember</tt> belongs. As with
--   <a>radioButtonNew</a>, a widget should be packed into the radio
--   button.
radioButtonNewFromWidget :: RadioButton -> IO RadioButton

-- | Creates a new <a>RadioButton</a> with a text label, adding it to the
--   same group as the group to which <tt>groupMember</tt> belongs.
radioButtonNewWithLabelFromWidget :: GlibString string => RadioButton -> string -> IO RadioButton

-- | Creates a new <a>RadioButton</a> containing a label, adding it to the
--   same group as the group to which <tt>groupMember</tt> belongs. The
--   label will be created using <a>labelNewWithMnemonic</a>, so
--   underscores in <tt>label</tt> indicate the mnemonic for the button.
radioButtonNewWithMnemonicFromWidget :: GlibString string => RadioButton -> string -> IO RadioButton

-- | Alias for <a>radioButtonNewFromWidget</a>.

-- | <i>Deprecated: use radioButtonNewFromWidget instead</i>
radioButtonNewJoinGroup :: RadioButton -> IO RadioButton

-- | Alias for <a>radioButtonNewWithLabelFromWidget</a>.

-- | <i>Deprecated: use radioButtonNewWithLabelFromWidget instead</i>
radioButtonNewJoinGroupWithLabel :: GlibString string => RadioButton -> string -> IO RadioButton

-- | Alias for <a>radioButtonNewWithMnemonicFromWidget</a>.

-- | <i>Deprecated: use radioButtonNewWithMnemonicFromWidget instead</i>
radioButtonNewJoinGroupWithMnemonic :: GlibString string => RadioButton -> string -> IO RadioButton

-- | Sets a <a>RadioButton</a>s group. It should be noted that this does
--   not change the layout of your interface in any way, so if you are
--   changing the group, it is likely you will need to re-arrange the user
--   interface to reflect these changes.
radioButtonSetGroup :: RadioButton -> RadioButton -> IO ()

-- | Retrieves the group assigned to a radio button.
radioButtonGetGroup :: RadioButton -> IO [RadioButton]

-- | Sets a new group for a radio button.
radioButtonGroup :: ReadWriteAttr RadioButton [RadioButton] RadioButton

-- | Emitted when the group of radio buttons that a radio button belongs to
--   changes. This is emitted when a radio button switches from being alone
--   to being part of a group of 2 or more buttons, or vice-versa, and when
--   a buttton is moved from one group of 2 or more buttons to a different
--   one, but not when the composition of the group that a button belongs
--   to changes.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
groupChanged :: RadioButtonClass self => Signal self (IO ())

-- | Emitted when the group of radio buttons that a radio button belongs to
--   changes. This is emitted when a radio button switches from being alone
--   to being part of a group of 2 or more buttons, or vice-versa, and when
--   a buttton is moved from one group of 2 or more buttons to a different
--   one, but not when the composition of the group that a button belongs
--   to changes.
onGroupChanged :: RadioButtonClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted when the group of radio buttons that a radio button belongs to
--   changes. This is emitted when a radio button switches from being alone
--   to being part of a group of 2 or more buttons, or vice-versa, and when
--   a buttton is moved from one group of 2 or more buttons to a different
--   one, but not when the composition of the group that a button belongs
--   to changes.
afterGroupChanged :: RadioButtonClass self => self -> IO () -> IO (ConnectId self)


-- | Create widgets with a discrete toggle button
module Graphics.UI.Gtk.Buttons.CheckButton
data CheckButton
class ToggleButtonClass o => CheckButtonClass o
castToCheckButton :: GObjectClass obj => obj -> CheckButton
gTypeCheckButton :: GType
toCheckButton :: CheckButtonClass o => o -> CheckButton

-- | Creates a new <a>CheckButton</a>.
checkButtonNew :: IO CheckButton

-- | Creates a new <a>CheckButton</a> with a <a>Label</a> to the right of
--   it.
checkButtonNewWithLabel :: GlibString string => string -> IO CheckButton

-- | Creates a new <a>CheckButton</a> containing a label. The label will be
--   created using <a>labelNewWithMnemonic</a>, so underscores in
--   <tt>label</tt> indicate the mnemonic for the check button.
checkButtonNewWithMnemonic :: GlibString string => string -> IO CheckButton


-- | Report messages of minor importance to the user
module Graphics.UI.Gtk.Display.Statusbar
data Statusbar
class HBoxClass o => StatusbarClass o
castToStatusbar :: GObjectClass obj => obj -> Statusbar
gTypeStatusbar :: GType
toStatusbar :: StatusbarClass o => o -> Statusbar
type ContextId = CUInt
data MessageId

-- | Creates a new <a>Statusbar</a> ready for messages.
statusbarNew :: IO Statusbar

-- | Returns a new context identifier, given a description of the actual
--   context. This id can be used to later remove entries form the
--   Statusbar.
statusbarGetContextId :: (StatusbarClass self, GlibString string) => self -> string -> IO ContextId

-- | Pushes a new message onto the Statusbar's stack. It will be displayed
--   as long as it is on top of the stack.
statusbarPush :: (StatusbarClass self, GlibString string) => self -> ContextId -> string -> IO MessageId

-- | Removes the topmost message that has the correct context.
statusbarPop :: StatusbarClass self => self -> ContextId -> IO ()

-- | Forces the removal of a message from a statusbar's stack. The exact
--   <tt>contextId</tt> and <tt>messageId</tt> must be specified.
statusbarRemove :: StatusbarClass self => self -> ContextId -> MessageId -> IO ()

-- | Sets whether the statusbar has a resize grip. <tt>True</tt> by
--   default.
statusbarSetHasResizeGrip :: StatusbarClass self => self -> Bool -> IO ()

-- | Returns whether the statusbar has a resize grip.
statusbarGetHasResizeGrip :: StatusbarClass self => self -> IO Bool

-- | Retrieves the box containing the label widget.
statusbarGetMessageArea :: StatusbarClass self => self -> IO Box

-- | Forces the removal of all messages from a statusbar's stack with the
--   exact <tt>contextId</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
statusbarRemoveAll :: StatusbarClass self => self -> Int -> IO ()

-- | Whether the statusbar has a grip for resizing the toplevel window.
--   
--   Default value: <tt>True</tt>
--   
--   Removed in Gtk3.
statusbarHasResizeGrip :: StatusbarClass self => Attr self Bool

-- | Is emitted whenever a new message is popped off a statusbar's stack.
textPopped :: (StatusbarClass self, GlibString string) => Signal self (ContextId -> string -> IO ())

-- | Is emitted whenever a new message gets pushed onto a statusbar's
--   stack.
textPushed :: (StatusbarClass self, GlibString string) => Signal self (ContextId -> string -> IO ())

-- | Called if a message is removed.
onTextPopped :: (StatusbarClass self, GlibString string) => self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)

-- | Called if a message is removed.
afterTextPopped :: (StatusbarClass self, GlibString string) => self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)

-- | Called if a message is pushed on top of the stack.
onTextPushed :: (StatusbarClass self, GlibString string) => self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)

-- | Called if a message is pushed on top of the stack.
afterTextPushed :: (StatusbarClass self, GlibString string) => self -> (ContextId -> string -> IO ()) -> IO (ConnectId self)


-- | Report messages of minor importance to the user
module Graphics.UI.Gtk.Display.Spinner
data Spinner
class DrawingAreaClass o => SpinnerClass o

-- | Returns a new spinner widget. Not yet started.
spinnerNew :: IO Spinner

-- | Starts the animation of the spinner.
spinnerStart :: SpinnerClass spinner => spinner -> IO ()

-- | Stops the animation of the spinner.
spinnerStop :: SpinnerClass spinner => spinner -> IO ()

-- | Whether the spinner is active.
--   
--   Default value: <a>False</a>
spinnerActive :: SpinnerClass spinner => Attr spinner Bool


-- | A widget which indicates progress visually
module Graphics.UI.Gtk.Display.ProgressBar
data ProgressBar
class WidgetClass o => ProgressBarClass o
castToProgressBar :: GObjectClass obj => obj -> ProgressBar
gTypeProgressBar :: GType
toProgressBar :: ProgressBarClass o => o -> ProgressBar

-- | Creates a new <a>ProgressBar</a>.
progressBarNew :: IO ProgressBar

-- | Indicates that some progress is made, but you don't know how much.
--   Causes the progress bar to enter "activity mode", where a block
--   bounces back and forth. Each call to <a>progressBarPulse</a> causes
--   the block to move by a little bit (the amount of movement per pulse is
--   determined by <a>progressBarSetPulseStep</a>).
progressBarPulse :: ProgressBarClass self => self -> IO ()

-- | Causes the given <tt>text</tt> to appear superimposed on the progress
--   bar.
progressBarSetText :: (ProgressBarClass self, GlibString string) => self -> string -> IO ()

-- | Causes the progress bar to "fill in" the given fraction of the bar.
--   The fraction should be between 0.0 and 1.0, inclusive.
progressBarSetFraction :: ProgressBarClass self => self -> Double -> IO ()

-- | Sets the fraction of total progress bar length to move the bouncing
--   block for each call to <a>progressBarPulse</a>.
progressBarSetPulseStep :: ProgressBarClass self => self -> Double -> IO ()

-- | Returns the current fraction of the task that's been completed.
progressBarGetFraction :: ProgressBarClass self => self -> IO Double

-- | Retrieves the pulse step set with <a>progressBarSetPulseStep</a>
progressBarGetPulseStep :: ProgressBarClass self => self -> IO Double

-- | Retrieves the text displayed superimposed on the progress bar, if any,
--   otherwise <tt>Nothing</tt>.
progressBarGetText :: (ProgressBarClass self, GlibString string) => self -> IO (Maybe string)

-- | Is the ProgressBar horizontally or vertically directed?
--   
--   Removed in Gtk3.
data ProgressBarOrientation
[ProgressLeftToRight] :: ProgressBarOrientation
[ProgressRightToLeft] :: ProgressBarOrientation
[ProgressBottomToTop] :: ProgressBarOrientation
[ProgressTopToBottom] :: ProgressBarOrientation

-- | Causes the progress bar to switch to a different orientation
--   (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
progressBarSetOrientation :: ProgressBarClass self => self -> ProgressBarOrientation -> IO ()

-- | Retrieves the current progress bar orientation.
progressBarGetOrientation :: ProgressBarClass self => self -> IO ProgressBarOrientation

-- | Sets the mode used to ellipsize (add an ellipsis: "...") the text if
--   there is not enough space to render the entire string.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
progressBarSetEllipsize :: ProgressBarClass self => self -> EllipsizeMode -> IO ()

-- | Returns the ellipsizing position of the progressbar. See
--   <a>progressBarSetEllipsize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
progressBarGetEllipsize :: ProgressBarClass self => self -> IO EllipsizeMode

-- | Orientation and growth direction of the progress bar.
--   
--   Default value: <a>ProgressLeftToRight</a>
--   
--   Removed in Gtk3.
progressBarOrientation :: ProgressBarClass self => Attr self ProgressBarOrientation

-- | The number of discrete blocks in a progress bar (when shown in the
--   discrete style).
--   
--   Allowed values: &gt;= 2
--   
--   Default value: 10
progressBarDiscreteBlocks :: ProgressBarClass self => Attr self Int

-- | The fraction of total work that has been completed.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0
progressBarFraction :: ProgressBarClass self => Attr self Double

-- | The fraction of total progress to move the bouncing block when pulsed.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0.1
progressBarPulseStep :: ProgressBarClass self => Attr self Double

-- | Text to be displayed in the progress bar.
--   
--   Default value: "%P %%"
progressBarText :: (ProgressBarClass self, GlibString string) => ReadWriteAttr self (Maybe string) string

-- | The preferred place to ellipsize the string, if the progressbar does
--   not have enough room to display the entire string, specified as a
--   <a>EllipsizeMode</a>.
--   
--   Note that setting this property to a value other than
--   <a>EllipsizeNone</a> has the side-effect that the progressbar requests
--   only enough space to display the ellipsis "...". Another means to set
--   a progressbar's width is <a>widgetSetSizeRequest</a>.
--   
--   Default value: <a>EllipsizeNone</a>
progressBarEllipsize :: ProgressBarClass self => Attr self EllipsizeMode


-- | A label which displays an accelerator key on the right of the text
module Graphics.UI.Gtk.Display.AccelLabel
data AccelLabel
class LabelClass o => AccelLabelClass o
castToAccelLabel :: GObjectClass obj => obj -> AccelLabel
gTypeAccelLabel :: GType
toAccelLabel :: AccelLabelClass o => o -> AccelLabel

-- | Creates a new <a>AccelLabel</a>.
accelLabelNew :: GlibString string => string -> IO AccelLabel

-- | Sets the widget to be monitored by this accelerator label.
accelLabelSetAccelWidget :: (AccelLabelClass self, WidgetClass accelWidget) => self -> accelWidget -> IO ()

-- | Fetches the widget monitored by this accelerator label. See
--   <a>accelLabelSetAccelWidget</a>.
accelLabelGetAccelWidget :: AccelLabelClass self => self -> IO (Maybe Widget)

-- | The widget to be monitored for accelerator changes.
accelLabelAccelWidget :: (AccelLabelClass self, WidgetClass accelWidget) => ReadWriteAttr self (Maybe Widget) accelWidget


-- | Limit the effect of grabs
module Graphics.UI.Gtk.Windows.WindowGroup
data WindowGroup
class GObjectClass o => WindowGroupClass o
castToWindowGroup :: GObjectClass obj => obj -> WindowGroup
gTypeWindowGroup :: GType
toWindowGroup :: WindowGroupClass o => o -> WindowGroup

-- | Creates a new <a>WindowGroup</a> object. Grabs added with
--   <a>grabAdd</a> only affect windows within the same <a>WindowGroup</a>.
windowGroupNew :: IO WindowGroup

-- | Adds a window to a <a>WindowGroup</a>.
windowGroupAddWindow :: (WindowGroupClass self, WindowClass window) => self -> window -> IO ()

-- | Removes a window from a <a>WindowGroup</a>.
windowGroupRemoveWindow :: (WindowGroupClass self, WindowClass window) => self -> window -> IO ()

-- | Returns a list of the <a>Window</a>s that belong to
--   <tt>windowGroup</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
windowGroupListWindows :: WindowGroupClass self => self -> IO [Window]


-- | A convenient message window
module Graphics.UI.Gtk.Windows.MessageDialog
data MessageDialog
class DialogClass o => MessageDialogClass o
castToMessageDialog :: GObjectClass obj => obj -> MessageDialog
gTypeMessageDialog :: GType
toMessageDialog :: MessageDialogClass o => o -> MessageDialog
data MessageType
[MessageInfo] :: MessageType
[MessageWarning] :: MessageType
[MessageQuestion] :: MessageType
[MessageError] :: MessageType
[MessageOther] :: MessageType

-- | Specify what buttons this dialog should show.
--   
--   <ul>
--   <li>Prebuilt sets of buttons for the dialog. If none of these choices
--   are appropriate, simply use <a>ButtonsNone</a> then call
--   <tt>dialogAddButtons</tt>.</li>
--   </ul>
data ButtonsType
[ButtonsNone] :: ButtonsType
[ButtonsOk] :: ButtonsType
[ButtonsClose] :: ButtonsType
[ButtonsCancel] :: ButtonsType
[ButtonsYesNo] :: ButtonsType
[ButtonsOkCancel] :: ButtonsType

-- | Flags used to influence dialog construction.
--   
--   <ul>
--   <li>Marking a dialog as model will call <tt>widgetSetModal</tt> on the
--   dialog window, the <a>DialogDestroyWithParent</a> will call
--   <tt>windowSetDestroyWithParent</tt> on the dialog window. Note that in
--   case the dialog is simply destroyed, no response signal is ever
--   emitted. Finally, <a>DialogNoSeparator</a> omits the separator between
--   the action area and the dialog content which is preferable for very
--   simple messages, i.e. those that only contain one button.</li>
--   </ul>
data DialogFlags
[DialogModal] :: DialogFlags
[DialogDestroyWithParent] :: DialogFlags
[DialogNoSeparator] :: DialogFlags

-- | Create a new message dialog, which is a simple dialog with an icon
--   indicating the dialog type (error, warning, etc.) and some text the
--   user may want to see. When the user clicks a button a "response"
--   signal is emitted with response IDs from <tt>ResponseType</tt>. See
--   <a>Dialog</a> for more details.
messageDialogNew :: GlibString string => Maybe Window -> [DialogFlags] -> MessageType -> ButtonsType -> string -> IO MessageDialog

-- | Creates a new message dialog, which is a simple dialog with an icon
--   indicating the dialog type (error, warning, etc.) and some text which
--   is marked up with the Pango text markup language. When the user clicks
--   a button a "response" signal is emitted with response IDs from
--   <tt>ResponseType</tt>. See <a>Dialog</a> and <tt>PangoMarkup</tt> for
--   more details.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
messageDialogNewWithMarkup :: GlibString string => Maybe Window -> [DialogFlags] -> MessageType -> ButtonsType -> string -> IO MessageDialog

-- | Sets the text of the message dialog to be <tt>str</tt>, which is
--   marked up with the Pango text markup language.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
messageDialogSetMarkup :: (MessageDialogClass self, GlibString string) => self -> string -> IO ()

-- | Sets the dialog's image to <tt>image</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
messageDialogSetImage :: (MessageDialogClass self, WidgetClass image) => self -> image -> IO ()
messageDialogSetSecondaryMarkup :: (MessageDialogClass self, GlibString string) => self -> string -> IO ()
messageDialogSetSecondaryText :: (MessageDialogClass self, GlibString string) => self -> string -> IO ()

-- | The type of message.
--   
--   Default value: <a>MessageInfo</a>
messageDialogMessageType :: MessageDialogClass self => Attr self MessageType

-- | The primary text of the message dialog. If the dialog has a secondary
--   text, this will appear as the title.
--   
--   Default value: <tt>Nothing</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
messageDialogText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string)

-- | Interpret the string <a>messageDialogText</a> as markup.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
messageDialogUseMarkup :: MessageDialogClass self => Attr self Bool

-- | The secondary text of the message dialog.
--   
--   Default value: <tt>Nothing</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
messageDialogSecondaryText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string)

-- | Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
messageDialogSecondaryUseMarkup :: MessageDialogClass self => Attr self Bool

-- | The image for this dialog.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
messageDialogImage :: (MessageDialogClass self, WidgetClass widget) => ReadWriteAttr self Widget widget

-- | The buttons shown in the message dialog.
--   
--   Default value: <a>ButtonsNone</a>
messageDialogButtons :: MessageDialogClass self => WriteAttr self ButtonsType

-- | The <a>VBox</a> that corresponds to the message area of this dialog.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
messageDialogMessageArea :: MessageDialogClass self => ReadAttr self VBox
instance Bounded DialogFlags
instance Eq DialogFlags
instance Show DialogFlags
instance Eq ButtonsType
instance Show ButtonsType
instance Enum ButtonsType
instance Eq MessageType
instance Show MessageType
instance Enum MessageType
instance Enum DialogFlags
instance Flags DialogFlags


-- | Report important messages to the user
module Graphics.UI.Gtk.Display.InfoBar
data InfoBar
class HBoxClass o => InfoBarClass o
castToInfoBar :: GObjectClass obj => obj -> InfoBar
toInfoBar :: InfoBarClass o => o -> InfoBar

-- | Creates a new <a>InfoBar</a> object.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarNew :: IO InfoBar

-- | Add an activatable widget to the action area of a <a>InfoBar</a>,
--   connecting a signal handler that will emit the "response" signal on
--   the message area when the widget is activated. The widget is appended
--   to the end of the message areas action area.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarAddActionWidget :: (InfoBarClass self, WidgetClass child) => self -> child -> Int -> IO ()

-- | Adds a button with the given text (or a stock button, if buttonText is
--   a stock ID) and sets things up so that clicking the button will emit
--   the "response" signal with the given responseId. The button is
--   appended to the end of the info bars's action area. The button widget
--   is returned, but usually you don't need it.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarAddButton :: (InfoBarClass self, GlibString string) => self -> string -> Int -> IO Button

-- | Calls <tt>widgetSetSensitive</tt> for each widget in the info bars's
--   action area with the given responseId. A convenient way to
--   sensitize/desensitize dialog buttons.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarSetResponseSensitive :: InfoBarClass self => self -> Int -> Bool -> IO ()

-- | Sets the last widget in the info bar's action area with the given
--   responseId as the default widget for the dialog. Pressing "Enter"
--   normally activates the default widget.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarSetDefaultResponse :: InfoBarClass self => self -> Int -> IO ()

-- | Emits the 'response' signal with the given <tt>responseId</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarEmitResponse :: InfoBarClass self => self -> Int -> IO ()

-- | Returns the action area of <tt>infoBar</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarGetActionArea :: InfoBarClass self => self -> IO Widget

-- | Returns the content area of <tt>infoBar</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarGetContentArea :: InfoBarClass self => self -> IO Widget

-- | The type of the message.
--   
--   The type is used to determine the colors to use in the info bar.
--   
--   If the type is <tt>MessageOther</tt>, no info bar is painted but the
--   colors are still set.
--   
--   Default value: <tt>MessageInfo</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarMessageType :: InfoBarClass self => Attr self MessageType

-- | Emitted when an action widget is clicked or the application programmer
--   calls <tt>dialogResponse</tt>. The <tt>responseId</tt> depends on
--   which action widget was clicked.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
infoBarResponse :: InfoBarClass self => Signal self (Int -> IO ())

-- | The <tt>close</tt> signal is a keybinding signal which gets emitted
--   when the user uses a keybinding to dismiss the info bar.
--   
--   The default binding for this signal is the Escape key.
--   
--   Since 2.18
infoBarClose :: InfoBarClass self => Signal self (IO ())


-- | A widget used to guide users through multi-step operations
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Windows.Assistant
data Assistant
class WindowClass o => AssistantClass o
castToAssistant :: GObjectClass obj => obj -> Assistant
toAssistant :: AssistantClass o => o -> Assistant
data AssistantPageType
[AssistantPageContent] :: AssistantPageType
[AssistantPageIntro] :: AssistantPageType
[AssistantPageConfirm] :: AssistantPageType
[AssistantPageSummary] :: AssistantPageType
[AssistantPageProgress] :: AssistantPageType

-- | Creates a new <a>Assistant</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantNew :: IO Assistant

-- | Returns the number of pages in the <tt>assistant</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantGetNPages :: AssistantClass self => self -> IO Int

-- | Returns the child widget contained in page number <tt>pageNum</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantGetNthPage :: AssistantClass self => self -> Int -> IO (Maybe Widget)

-- | Prepends a page to the <tt>assistant</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantPrependPage :: (AssistantClass self, WidgetClass page) => self -> page -> IO Int

-- | Appends a page to the <tt>assistant</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantAppendPage :: (AssistantClass self, WidgetClass page) => self -> page -> IO Int

-- | Inserts a page in the <tt>assistant</tt> at a given position.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantInsertPage :: (AssistantClass self, WidgetClass page) => self -> page -> Int -> IO Int

-- | Sets the page forwarding function to be <tt>pageFunc</tt>, this
--   function will be used to determine what will be the next page when the
--   user presses the forward button. Setting <tt>pageFunc</tt> to
--   <a>Nothing</a> will make the assistant to use the default forward
--   function, which just goes to the next visible page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantSetForwardPageFunc :: AssistantClass self => self -> Maybe (Int -> IO Int) -> IO ()

-- | Adds a widget to the action area of a <a>Assistant</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantAddActionWidget :: (AssistantClass self, WidgetClass child) => self -> child -> IO ()

-- | Removes a widget from the action area of a <a>Assistant</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantRemoveActionWidget :: (AssistantClass self, WidgetClass child) => self -> child -> IO ()

-- | Forces <tt>assistant</tt> to recompute the buttons state.
--   
--   Gtk+ automatically takes care of this in most situations, e.g. when
--   the user goes to a different page, or when the visibility or
--   completeness of a page changes.
--   
--   One situation where it can be necessary to call this function is when
--   changing a value on the current page affects the future page flow of
--   the assistant.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantUpdateButtonsState :: AssistantClass self => self -> IO ()

-- | Sets the page type for <tt>page</tt>. The page type determines the
--   page behavior in the <tt>assistant</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantSetPageType :: (AssistantClass self, WidgetClass page) => self -> page -> AssistantPageType -> IO ()

-- | Gets the page type of <tt>page</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantGetPageType :: (AssistantClass self, WidgetClass page) => self -> page -> IO AssistantPageType

-- | Sets a title for <tt>page</tt>. The title is displayed in the header
--   area of the assistant when <tt>page</tt> is the current page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantSetPageTitle :: (AssistantClass self, WidgetClass page, GlibString string) => self -> page -> string -> IO ()

-- | Gets the title for <tt>page</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantGetPageTitle :: (AssistantClass self, WidgetClass page, GlibString string) => self -> page -> IO string

-- | Sets a header image for <tt>page</tt>. This image is displayed in the
--   header area of the assistant when <tt>page</tt> is the current page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantSetPageHeaderImage :: (AssistantClass self, WidgetClass page) => self -> page -> Pixbuf -> IO ()

-- | Gets the header image for <tt>page</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantGetPageHeaderImage :: (AssistantClass self, WidgetClass page) => self -> page -> IO (Maybe Pixbuf)

-- | Sets a header image for <tt>page</tt>. This image is displayed in the
--   side area of the assistant when <tt>page</tt> is the current page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantSetPageSideImage :: (AssistantClass self, WidgetClass page) => self -> page -> Pixbuf -> IO ()

-- | Gets the header image for <tt>page</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantGetPageSideImage :: (AssistantClass self, WidgetClass page) => self -> page -> IO (Maybe Pixbuf)

-- | Sets whether <tt>page</tt> contents are complete. This will make
--   <tt>assistant</tt> update the buttons state to be able to continue the
--   task.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantSetPageComplete :: (AssistantClass self, WidgetClass page) => self -> page -> Bool -> IO ()

-- | Gets whether <tt>page</tt> is complete.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantGetPageComplete :: (AssistantClass self, WidgetClass page) => self -> page -> IO Bool

-- | Erases the visited page history so the back button is not shown on the
--   current page, and removes the cancel button from subsequent pages.
--   
--   Use this when the information provided up to the current page is
--   hereafter deemed permanent and cannot be modified or undone. For
--   example, showing a progress page to track a long-running, unreversible
--   operation after the user has clicked apply on a confirmation page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
assistantCommit :: AssistantClass self => self -> IO ()

-- | Switches the page to <tt>pageNum</tt>. Note that this will only be
--   necessary in custom buttons, as the <tt>assistant</tt> flow can be set
--   with <a>assistantSetForwardPageFunc</a>.
--   
--   Returns the page number of the current page
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantCurrentPage :: AssistantClass self => Attr self Int

-- | The type of the assistant page.
--   
--   Default value: <a>AssistantPageContent</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantChildPageType :: AssistantClass self => Attr self AssistantPageType

-- | The title that is displayed in the page header.
--   
--   If title and header-image are both, no header is displayed.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantChildTitle :: (AssistantClass self, GlibString string) => Attr self string

-- | The image that is displayed next to the page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantChildHeaderImage :: AssistantClass self => Attr self Pixbuf

-- | Sidebar image for the assistant page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantChildSidebarImage :: AssistantClass self => Attr self Pixbuf

-- | Setting the "complete" child property to <tt>True</tt> marks a page as
--   complete (i.e.: all the required fields are filled out). Gtk+ uses
--   this information to control the sensitivity of the navigation buttons.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantChildComplete :: AssistantClass self => Attr self Bool

-- | The ::assistantCancel signal is emitted when then the assistantCancel
--   button is clicked.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantCancel :: AssistantClass self => Signal self (IO ())

-- | The ::assistantPrepare signal is emitted when a new page is set as the
--   assistant's current page, before making the new page visible. A
--   handler for this signal can do any preparation which are necessary
--   before showing <tt>page</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantPrepare :: AssistantClass self => Signal self (Widget -> IO ())

-- | The ::assistantApply signal is emitted when the assistantApply button
--   is clicked. The default behavior of the <a>Assistant</a> is to switch
--   to the page after the current page, unless the current page is the
--   last one.
--   
--   A handler for the ::assistantApply signal should carry out the actions
--   for which the wizard has collected data. If the action takes a long
--   time to complete, you might consider to put a page of type
--   <a>AssistantPageProgress</a> after the confirmation page and handle
--   this operation within the <a>assistantPrepare</a> signal of the
--   progress page.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
assistantApply :: AssistantClass self => Signal self (IO ())

-- | The ::assistantClose signal is emitted either when the assistantClose
--   button of a summary page is clicked, or when the apply button in the
--   last page in the flow (of type <a>AssistantPageConfirm</a>) is
--   clicked.
assistantClose :: AssistantClass self => Signal self (IO ())
instance Show AssistantPageType
instance Eq AssistantPageType
instance Bounded AssistantPageType
instance Enum AssistantPageType


-- | Display information about an application
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.6</li>
--   </ul>
module Graphics.UI.Gtk.Windows.AboutDialog
data AboutDialog
class DialogClass o => AboutDialogClass o
castToAboutDialog :: GObjectClass obj => obj -> AboutDialog
gTypeAboutDialog :: GType
toAboutDialog :: AboutDialogClass o => o -> AboutDialog

-- | Creates a new <a>AboutDialog</a>.
aboutDialogNew :: IO AboutDialog

-- | Installs a global function to be called whenever the user activates an
--   email link in an about dialog.
--   
--   Removed in Gtk3.
aboutDialogSetEmailHook :: GlibString string => (string -> IO ()) -> IO ()

-- | Installs a global function to be called whenever the user activates a
--   URL link in an about dialog.
--   
--   Removed in Gtk3.
aboutDialogSetUrlHook :: GlibString string => (string -> IO ()) -> IO ()

-- | The name of the program. If this is not set, it defaults to
--   <tt>gGetApplicationName</tt>.
aboutDialogProgramName :: (AboutDialogClass self, GlibString string) => Attr self string

-- | The name of the program. If this is not set, it defaults to
--   <tt>gGetApplicationName</tt>.
aboutDialogName :: (AboutDialogClass self, GlibString string) => Attr self string

-- | The version of the program.
aboutDialogVersion :: (AboutDialogClass self, GlibString string) => Attr self string

-- | Copyright information for the program.
aboutDialogCopyright :: (AboutDialogClass self, GlibString string) => Attr self string

-- | Comments about the program. This string is displayed in a label in the
--   main dialog, thus it should be a short explanation of the main purpose
--   of the program, not a detailed list of features.
aboutDialogComments :: (AboutDialogClass self, GlibString string) => Attr self string

-- | The license of the program. This string is displayed in a text view in
--   a secondary dialog, therefore it is fine to use a long multi-paragraph
--   text. Note that the text is only wrapped in the text view if the
--   <a>aboutDialogWrapLicense</a> property is set to <tt>True</tt>;
--   otherwise the text itself must contain the intended linebreaks.
--   
--   Default value: <tt>Nothing</tt>
aboutDialogLicense :: (AboutDialogClass self, GlibString string) => Attr self (Maybe string)

-- | The URL for the link to the website of the program. This should be a
--   string starting with "http://.
aboutDialogWebsite :: (AboutDialogClass self, GlibString string) => Attr self string

-- | The label for the link to the website of the program. If this is not
--   set, it defaults to the URL specified in the website property.
aboutDialogWebsiteLabel :: (AboutDialogClass self, GlibString string) => Attr self string

-- | The authors of the program. Each string may contain email addresses
--   and URLs, which will be displayed as links, see the introduction for
--   more details.
aboutDialogAuthors :: (AboutDialogClass self, GlibString string) => Attr self [string]

-- | The people documenting the program. Each string may contain email
--   addresses and URLs, which will be displayed as links, see the
--   introduction for more details.
aboutDialogDocumenters :: (AboutDialogClass self, GlibString string) => Attr self [string]

-- | The people who contributed artwork to the program. Each string may
--   contain email addresses and URLs, which will be displayed as links,
--   see the introduction for more details.
aboutDialogArtists :: (AboutDialogClass self, GlibString string) => Attr self [string]

-- | Credits to the translators. This string should be marked as
--   translatable. The string may contain email addresses and URLs, which
--   will be displayed as links, see the introduction for more details.
aboutDialogTranslatorCredits :: (AboutDialogClass self, GlibString string) => Attr self string

-- | A logo for the about box. If this is not set, it defaults to
--   <tt>windowGetDefaultIconList</tt>.
aboutDialogLogo :: AboutDialogClass self => ReadWriteAttr self Pixbuf (Maybe Pixbuf)

-- | A named icon to use as the logo for the about box. This property
--   overrides the logo property.
--   
--   Default value: <tt>Nothing</tt>
aboutDialogLogoIconName :: (AboutDialogClass self, GlibString string) => ReadWriteAttr self string (Maybe string)

-- | Whether to wrap the text in the license dialog.
--   
--   Default value: <tt>False</tt>
aboutDialogWrapLicense :: AboutDialogClass self => Attr self Bool

-- | Returns the program name displayed in the about dialog.
aboutDialogGetName :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the name to display in the about dialog. If this is not set, it
--   defaults to the program executable name.
aboutDialogSetName :: (AboutDialogClass self, GlibString string) => self -> string -> IO ()

-- | Returns the version string.
aboutDialogGetVersion :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the version string to display in the about dialog.
aboutDialogSetVersion :: (AboutDialogClass self, GlibString string) => self -> string -> IO ()

-- | Returns the copyright string.
aboutDialogGetCopyright :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the copyright string to display in the about dialog. This should
--   be a short string of one or two lines.
aboutDialogSetCopyright :: (AboutDialogClass self, GlibString string) => self -> string -> IO ()

-- | Returns the comments string.
aboutDialogGetComments :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the comments string to display in the about dialog. This should
--   be a short string of one or two lines.
aboutDialogSetComments :: (AboutDialogClass self, GlibString string) => self -> string -> IO ()

-- | Returns the license information.
aboutDialogGetLicense :: (AboutDialogClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets the license information to be displayed in the secondary license
--   dialog. If <tt>license</tt> is <tt>Nothing</tt>, the license button is
--   hidden.
aboutDialogSetLicense :: (AboutDialogClass self, GlibString string) => self -> Maybe string -> IO ()

-- | Returns the website URL.
aboutDialogGetWebsite :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the URL to use for the website link.
aboutDialogSetWebsite :: (AboutDialogClass self, GlibString string) => self -> string -> IO ()

-- | Returns the label used for the website link.
aboutDialogGetWebsiteLabel :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the label to be used for the website link. It defaults to the
--   website URL.
aboutDialogSetWebsiteLabel :: (AboutDialogClass self, GlibString string) => self -> string -> IO ()

-- | Sets the strings which are displayed in the authors tab of the
--   secondary credits dialog.
aboutDialogSetAuthors :: (AboutDialogClass self, GlibString string) => self -> [string] -> IO ()

-- | Returns the string which are displayed in the authors tab of the
--   secondary credits dialog.
aboutDialogGetAuthors :: (AboutDialogClass self, GlibString string) => self -> IO [string]

-- | Sets the strings which are displayed in the artists tab of the
--   secondary credits dialog.
aboutDialogSetArtists :: (AboutDialogClass self, GlibString string) => self -> [string] -> IO ()

-- | Returns the string which are displayed in the artists tab of the
--   secondary credits dialog.
aboutDialogGetArtists :: (AboutDialogClass self, GlibString string) => self -> IO [string]

-- | Sets the strings which are displayed in the documenters tab of the
--   secondary credits dialog.
aboutDialogSetDocumenters :: (AboutDialogClass self, GlibString string) => self -> [string] -> IO ()

-- | Returns the string which are displayed in the documenters tab of the
--   secondary credits dialog.
aboutDialogGetDocumenters :: (AboutDialogClass self, GlibString string) => self -> IO [string]

-- | Returns the translator credits string which is displayed in the
--   translators tab of the secondary credits dialog.
aboutDialogGetTranslatorCredits :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the translator credits string which is displayed in the
--   translators tab of the secondary credits dialog.
--   
--   The intended use for this string is to display the translator of the
--   language which is currently used in the user interface.
aboutDialogSetTranslatorCredits :: (AboutDialogClass self, GlibString string) => self -> string -> IO ()

-- | Returns the pixbuf displayed as logo in the about dialog.
aboutDialogGetLogo :: AboutDialogClass self => self -> IO Pixbuf

-- | Sets the pixbuf to be displayed as logo in the about dialog. If it is
--   <tt>Nothing</tt>, the default window icon set with
--   <tt>windowSetDefaultIcon</tt> will be used.
aboutDialogSetLogo :: AboutDialogClass self => self -> Maybe Pixbuf -> IO ()

-- | Returns the icon name displayed as logo in the about dialog.
aboutDialogGetLogoIconName :: (AboutDialogClass self, GlibString string) => self -> IO string

-- | Sets the pixbuf to be displayed as logo in the about dialog. If it is
--   <tt>Nothing</tt>, the default window icon set with
--   <tt>windowSetDefaultIcon</tt> will be used.
aboutDialogSetLogoIconName :: (AboutDialogClass self, GlibString string) => self -> Maybe string -> IO ()

-- | Returns whether the license text in <tt>about</tt> is automatically
--   wrapped.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
aboutDialogGetWrapLicense :: AboutDialogClass self => self -> IO Bool

-- | Sets whether the license text in <tt>about</tt> is automatically
--   wrapped.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
aboutDialogSetWrapLicense :: AboutDialogClass self => self -> Bool -> IO ()


-- | Create popup windows
--   
--   NOTE: Now FFI haven't support variadic function
--   <tt>gtk_dialog_set_alternative_button_order</tt>
module Graphics.UI.Gtk.Windows.Dialog
data Dialog
class WindowClass o => DialogClass o
castToDialog :: GObjectClass obj => obj -> Dialog
gTypeDialog :: GType
toDialog :: DialogClass o => o -> Dialog

-- | Some constructors that can be used as response numbers for dialogs.
data ResponseId

-- | GTK returns this if a response widget has no <tt>response_id</tt>, or
--   if the dialog gets programmatically hidden or destroyed.
[ResponseNone] :: ResponseId

-- | GTK won't return these unless you pass them in as the response for an
--   action widget. They are for your convenience.
[ResponseReject] :: ResponseId

-- | (as above)
[ResponseAccept] :: ResponseId

-- | If the dialog is deleted.
[ResponseDeleteEvent] :: ResponseId

-- | "Ok" was pressed.
--   
--   <ul>
--   <li>This value is returned from the "Ok" stock dialog button.</li>
--   </ul>
[ResponseOk] :: ResponseId

-- | "Cancel" was pressed.
--   
--   <ul>
--   <li>These value is returned from the "Cancel" stock dialog
--   button.</li>
--   </ul>
[ResponseCancel] :: ResponseId

-- | "Close" was pressed.
--   
--   <ul>
--   <li>This value is returned from the "Close" stock dialog button.</li>
--   </ul>
[ResponseClose] :: ResponseId

-- | "Yes" was pressed.
--   
--   <ul>
--   <li>This value is returned from the "Yes" stock dialog button.</li>
--   </ul>
[ResponseYes] :: ResponseId

-- | "No" was pressed.
--   
--   <ul>
--   <li>This value is returned from the "No" stock dialog button.</li>
--   </ul>
[ResponseNo] :: ResponseId

-- | "Apply" was pressed.
--   
--   <ul>
--   <li>This value is returned from the "Apply" stock dialog button.</li>
--   </ul>
[ResponseApply] :: ResponseId

-- | "Help" was pressed.
--   
--   <ul>
--   <li>This value is returned from the "Help" stock dialog button.</li>
--   </ul>
[ResponseHelp] :: ResponseId

-- | A user-defined response
--   
--   <ul>
--   <li>This value is returned from a user defined button</li>
--   </ul>
[ResponseUser] :: Int -> ResponseId

-- | Creates a new dialog box. Widgets should not be packed into this
--   <a>Window</a> directly, but into the "upper" and "action area", which
--   are obtained using <a>dialogGetUpper</a> and
--   <a>dialogGetActionArea</a>.
dialogNew :: IO Dialog

-- | Get the upper part of a dialog.
--   
--   <ul>
--   <li>The upper part of a dialog window consists of a <a>VBox</a>. Add
--   the required widgets into this box.</li>
--   </ul>
dialogGetUpper :: DialogClass dc => dc -> IO VBox
dialogGetContentArea :: DialogClass dc => dc -> IO Widget

-- | Extract the action area of a dialog box.
--   
--   <ul>
--   <li>This is useful to add some special widgets that cannot be added
--   with dialogAddActionWidget.</li>
--   </ul>
dialogGetActionArea :: DialogClass dc => dc -> IO HBox

-- | Blocks in a recursive main loop until the dialog either emits the
--   response signal, or is destroyed. If the dialog is destroyed during
--   the call to <a>dialogRun</a>, it returns <a>ResponseNone</a>.
--   Otherwise, it returns the response ID from the "response" signal
--   emission. Before entering the recursive main loop, <a>dialogRun</a>
--   calls <tt>widgetShow</tt> on the dialog for you. Note that you still
--   need to show any children of the dialog yourself.
--   
--   During <a>dialogRun</a>, the default behavior of "delete_event" is
--   disabled; if the dialog receives "delete_event", it will not be
--   destroyed as windows usually are, and <a>dialogRun</a> will return
--   <a>ResponseDeleteEvent</a>. Also, during <a>dialogRun</a> the dialog
--   will be modal. You can force <a>dialogRun</a> to return at any time by
--   calling <a>dialogResponse</a> to emit the "response" signal.
--   Destroying the dialog during <a>dialogRun</a> is a very bad idea,
--   because your post-run code won't know whether the dialog was destroyed
--   or not. Hence, you should not call <a>widgetDestroy</a> before
--   <a>dialogRun</a> has returned.
--   
--   After <a>dialogRun</a> returns, you are responsible for hiding or
--   destroying the dialog if you wish to do so.
--   
--   Note that even though the recursive main loop gives the effect of a
--   modal dialog (it prevents the user from interacting with other windows
--   while the dialog is run), callbacks such as timeouts, IO channel
--   watches, DND drops, etc, <i>will</i> be triggered during a
--   <a>dialogRun</a> call.
dialogRun :: DialogClass self => self -> IO ResponseId

-- | Emits the "response" signal with the given response ID. Used to
--   indicate that the user has responded to the dialog in some way;
--   typically either you or <a>dialogRun</a> will be monitoring the
--   "response" signal and take appropriate action.
--   
--   This function can be used to add a custom widget to the action area
--   that should close the dialog when activated or to close the dialog
--   otherwise.
dialogResponse :: DialogClass self => self -> ResponseId -> IO ()

-- | Adds a button with the given text (or a stock button, if
--   <tt>buttonText</tt> is a stock ID) and sets things up so that clicking
--   the button will emit the "response" signal with the given
--   <tt>responseId</tt>. The button is appended to the end of the dialog's
--   action area. The button widget is returned, but usually you don't need
--   it.
dialogAddButton :: (DialogClass self, GlibString string) => self -> string -> ResponseId -> IO Button

-- | Adds an activatable widget to the action area of a <a>Dialog</a>,
--   connecting a signal handler that will emit the "response" signal on
--   the dialog when the widget is activated. The widget is appended to the
--   end of the dialog's action area. If you want to add a non-activatable
--   widget, simply pack it into the action area.
dialogAddActionWidget :: (DialogClass self, WidgetClass child) => self -> child -> ResponseId -> IO ()

-- | Sets the last widget in the dialog's action area with the given
--   <a>ResponseId</a> as the default widget for the dialog. Pressing
--   "Enter" normally activates the default widget.
--   
--   <ul>
--   <li>The default response is reset once it is triggered. Hence, if you
--   hide the dialog (rather than closing it) and re-display it later, you
--   need to call this function again.</li>
--   </ul>
dialogSetDefaultResponse :: DialogClass self => self -> ResponseId -> IO ()

-- | Query if the dialog has a visible horizontal separator.
--   
--   Removed in Gtk3.
dialogGetHasSeparator :: DialogClass self => self -> IO Bool

-- | Sets whether the dialog has a separator above the buttons.
--   <tt>True</tt> by default.
--   
--   Removed in Gtk3.
dialogSetHasSeparator :: DialogClass self => self -> Bool -> IO ()

-- | Calls <tt><tt>widgetSetSensitive</tt> widget setting</tt> for each
--   widget in the dialog's action area with the given <tt>responseId</tt>.
--   A convenient way to sensitize/desensitize dialog buttons.
dialogSetResponseSensitive :: DialogClass self => self -> ResponseId -> Bool -> IO ()

-- | Gets the response id of a widget in the action area of a dialog.
dialogGetResponseForWidget :: (DialogClass self, WidgetClass widget) => self -> widget -> IO ResponseId

-- | Returns <tt>True</tt> if dialogs are expected to use an alternative
--   button order on the screen screen. See
--   <tt>dialogSetAlternativeButtonOrder</tt> for more details about
--   alternative button order.
--   
--   If you need to use this function, you should probably connect to the
--   <tt>alternativeButtonOrder</tt> signal on the GtkSettings object
--   associated to screen, in order to be notified if the button order
--   setting changes.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
dialogAlternativeDialogButtonOrder :: Maybe Screen -> IO Bool

-- | Sets an alternative button order.
--   
--   If the <tt>alternativeButtonOrder</tt> setting is set to
--   <tt>True</tt>, the dialog buttons are reordered according to the order
--   of the response ids in <tt>newOrder</tt>.
--   
--   See <tt>dialogSetAlternativeButtonOrder</tt> for more information.
--   
--   This function is for use by language bindings.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
dialogSetAlternativeButtonOrderFromArray :: DialogClass self => self -> [ResponseId] -> IO ()

-- | Gets the widget button that uses the given response ID in the action
--   area of a dialog.
dialogGetWidgetForResponse :: DialogClass self => self -> ResponseId -> IO (Maybe Widget)

-- | The dialog has a separator bar above its buttons.
--   
--   Default value: <tt>True</tt>
--   
--   Removed in Gtk3.
dialogHasSeparator :: DialogClass self => Attr self Bool

-- | Width of border around the button area at the bottom of the dialog.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 5
dialogActionAreaBorder :: DialogClass self => ReadAttr self Int

-- | Spacing between buttons.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 6
dialogButtonSpacing :: DialogClass self => ReadAttr self Int

-- | Width of border around the main dialog area.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 2
dialogContentAreaBorder :: DialogClass self => ReadAttr self Int

-- | The default spacing used between elements of the content area of the
--   dialog, as returned by <tt>dialogSetContentArea</tt>, unless
--   <tt>boxSetSpacing</tt> was called on that widget directly.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.16</li>
--   </ul>
dialogContentAreaSpacing :: DialogClass self => ReadAttr self Int

-- | Emitted when an action widget is clicked, the dialog receives a delete
--   event, or the application programmer calls <a>dialogResponse</a>. On a
--   delete event, the response ID is <a>ResponseNone</a>. Otherwise, it
--   depends on which action widget was clicked.
response :: DialogClass self => Signal self (ResponseId -> IO ())

-- | Emitted when an action widget is clicked, the dialog receives a delete
--   event, or the application programmer calls <a>dialogResponse</a>. On a
--   delete event, the response ID is <a>ResponseNone</a>. Otherwise, it
--   depends on which action widget was clicked.
onResponse :: DialogClass self => self -> (ResponseId -> IO ()) -> IO (ConnectId self)

-- | Emitted when an action widget is clicked, the dialog receives a delete
--   event, or the application programmer calls <a>dialogResponse</a>. On a
--   delete event, the response ID is <a>ResponseNone</a>. Otherwise, it
--   depends on which action widget was clicked.
afterResponse :: DialogClass self => self -> (ResponseId -> IO ()) -> IO (ConnectId self)


-- | A toplevel container widget used to manage offscreen rendering of
--   child widgets.
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.20</li>
--   </ul>
module Graphics.UI.Gtk.Windows.OffscreenWindow
data OffscreenWindow
class WindowClass o => OffscreenWindowClass o
castToOffscreenWindow :: GObjectClass obj => obj -> OffscreenWindow
gTypeOffscreenWindow :: GType
toOffscreenWindow :: OffscreenWindowClass o => o -> OffscreenWindow

-- | Creates a toplevel container widget that is used to retrieve snapshots
--   of widgets without showing them on the screen. For widgets that are on
--   the screen and part of a normal widget hierarchy,
--   <tt>widgetGetSnapshot</tt> can be used instead.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
offscreenWindowNew :: IO OffscreenWindow

-- | Retrieves a snapshot of the contained widget in the form of a
--   <a>Pixmap</a>. If you need to keep this around over window resizes
--   then you should add a reference to it.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
offscreenWindowGetPixmap :: OffscreenWindowClass self => self -> IO (Maybe Pixmap)

-- | Retrieves a snapshot of the contained widget in the form of a
--   <a>Pixbuf</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
offscreenWindowGetPixbuf :: OffscreenWindowClass self => self -> IO (Maybe Pixbuf)


-- | Maintains a list of all open GdkDisplays
--   
--   <ul>
--   <li>Module available since Gdk version 2.2</li>
--   </ul>
module Graphics.UI.Gtk.Gdk.DisplayManager
data DisplayManager
class GObjectClass o => DisplayManagerClass o
castToDisplayManager :: GObjectClass obj => obj -> DisplayManager
toDisplayManager :: DisplayManagerClass o => o -> DisplayManager

-- | Returns the global <a>DisplayManager</a> singleton;
--   <tt>parsePargs</tt>, <a>init</a>, or <tt>initCheck</tt> must have been
--   called first.
displayManagerGet :: IO DisplayManager

-- | List all currently open displays.
displayManagerListDisplays :: DisplayManagerClass self => self -> IO [Display]

-- | The default display.
displayManagerDefaultDisplay :: DisplayManagerClass self => Attr self Display

-- | The <a>displayManagerOpened</a> signal is emitted when a display is
--   opened.
displayManagerOpened :: DisplayManagerClass self => Signal self (Display -> IO ())


-- | Object representing a physical screen
--   
--   <ul>
--   <li>Module available since Gdk version 2.2</li>
--   </ul>
module Graphics.UI.Gtk.Gdk.Screen
data Screen
class GObjectClass o => ScreenClass o
castToScreen :: GObjectClass obj => obj -> Screen
gTypeScreen :: GType
toScreen :: ScreenClass o => o -> Screen

-- | Gets the default screen for the default display. (See
--   <tt>displayGetDefault</tt>).
screenGetDefault :: IO (Maybe Screen)

-- | Gets the system default colormap for <tt>screen</tt>
--   
--   Removed in Gtk3.
screenGetSystemColormap :: Screen -> IO Colormap

-- | Gets a colormap to use for creating windows or pixmaps with an alpha
--   channel. The windowing system on which Gtk+ is running may not support
--   this capability, in which case <tt>Nothing</tt> will be returned. Even
--   if a non-<tt>Nothing</tt> value is returned, its possible that the
--   window's alpha channel won't be honored when displaying the window on
--   the screen: in particular, for X an appropriate windowing manager and
--   compositing manager must be running to provide appropriate display.
--   
--   <ul>
--   <li>Available since Gdk version 2.8</li>
--   </ul>
--   
--   Removed in Gtk3.
screenGetRGBAColormap :: Screen -> IO (Maybe Colormap)

-- | <i>Deprecated: instead of 'screenGetDefaultColormap obj' use 'get obj
--   screenDefaultColormap'</i>
screenGetDefaultColormap :: Screen -> IO Colormap

-- | <i>Deprecated: instead of 'screenSetDefaultColormap obj value' use
--   'set obj [ screenDefaultColormap := value ]'</i>
screenSetDefaultColormap :: Screen -> Colormap -> IO ()

-- | Get the system's default visual for <tt>screen</tt>. This is the
--   visual for the root window of the display.
screenGetSystemVisual :: Screen -> IO Visual

-- | Returns whether windows with an RGBA visual can reasonably be expected
--   to have their alpha channel drawn correctly on the screen.
--   
--   On X11 this function returns whether a compositing manager is
--   compositing <tt>screen</tt>.
--   
--   <ul>
--   <li>Available since Gdk version 2.10</li>
--   </ul>
screenIsComposited :: Screen -> IO Bool

-- | Gets the root window of <tt>screen</tt>.
screenGetRootWindow :: Screen -> IO DrawWindow

-- | Gets the display to which the <tt>screen</tt> belongs.
screenGetDisplay :: Screen -> IO Display

-- | Gets the index of <tt>screen</tt> among the screens in the display to
--   which it belongs. (See <a>screenGetDisplay</a>)
screenGetNumber :: Screen -> IO Int

-- | Gets the width of <tt>screen</tt> in pixels
screenGetWidth :: Screen -> IO Int

-- | Gets the height of <tt>screen</tt> in pixels
screenGetHeight :: Screen -> IO Int
screenGetWidthMm :: Screen -> IO Int
screenGetHeightMm :: Screen -> IO Int

-- | Gets the width of <tt>screen</tt> in millimeters. Note that on some X
--   servers this value will not be correct.
screenGetWidthMM :: Screen -> IO Int

-- | Returns the height of <tt>screen</tt> in millimeters. Note that on
--   some X servers this value will not be correct.
screenGetHeightMM :: Screen -> IO Int

-- | Lists the available visuals for the specified <tt>screen</tt>. A
--   visual describes a hardware image data format. For example, a visual
--   might support 24-bit color, or 8-bit color, and might expect pixels to
--   be in a certain format.
screenListVisuals :: Screen -> IO [Visual]

-- | Obtains a list of all toplevel windows known to GDK on the screen
--   <tt>screen</tt>. A toplevel window is a child of the root window (see
--   <tt>getDefaultRootWindow</tt>).
screenGetToplevelWindows :: Screen -> IO [DrawWindow]

-- | Determines the name to pass to <tt>displayOpen</tt> to get a
--   <a>Display</a> with this screen as the default screen.
screenMakeDisplayName :: GlibString string => Screen -> IO string

-- | Returns the number of monitors which <tt>screen</tt> consists of.
screenGetNMonitors :: Screen -> IO Int

-- | Retrieves the <a>Rectangle</a> representing the size and position of
--   the individual monitor within the entire screen area.
--   
--   Note that the size of the entire screen area can be retrieved via
--   <a>screenGetWidth</a> and <a>screenGetHeight</a>.
screenGetMonitorGeometry :: Screen -> Int -> IO Rectangle

-- | Returns the monitor number in which the point (<tt>x</tt>,<tt>y</tt>)
--   is located.
screenGetMonitorAtPoint :: Screen -> Int -> Int -> IO Int

-- | Returns the number of the monitor in which the largest area of the
--   bounding rectangle of <tt>window</tt> resides.
screenGetMonitorAtWindow :: Screen -> DrawWindow -> IO Int

-- | Gets the height in millimeters of the specified monitor.
--   
--   <ul>
--   <li>Available since Gdk version 2.14</li>
--   </ul>
screenGetMonitorHeightMm :: Screen -> Int -> IO Int

-- | Gets the width in millimeters of the specified monitor, if available.
--   
--   <ul>
--   <li>Available since Gdk version 2.14</li>
--   </ul>
screenGetMonitorWidthMm :: Screen -> Int -> IO Int

-- | Returns the output name of the specified monitor. Usually something
--   like VGA, DVI, or TV, not the actual product name of the display
--   device.
--   
--   <ul>
--   <li>Available since Gdk version 2.14</li>
--   </ul>
screenGetMonitorPlugName :: GlibString string => Screen -> Int -> IO (Maybe string)

-- | Returns the currently active window of this screen.
--   
--   On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property on
--   the root window, as described in the Extended Window Manager Hints. If
--   there is no currently currently active window, or the window manager
--   does not support the _NET_ACTIVE_WINDOW hint, this function returns
--   <tt>Nothing</tt>.
--   
--   On other platforms, this function may return <tt>Nothing</tt>,
--   depending on whether it is implementable on that platform.
--   
--   <ul>
--   <li>Available since Gdk version 2.10</li>
--   </ul>
screenGetActiveWindow :: Screen -> IO (Maybe DrawWindow)

-- | Returns a list of <a>DrawWindow</a>s representing the current window
--   stack.
--   
--   On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
--   property on the root window, as described in the Extended Window
--   Manager Hints. If the window manager does not support the
--   _NET_CLIENT_LIST_STACKING hint, this function returns
--   <tt>Nothing</tt>.
--   
--   On other platforms, this function may return <tt>Nothing</tt>,
--   depending on whether it is implementable on that platform.
--   
--   <ul>
--   <li>Available since Gdk version 2.10</li>
--   </ul>
screenGetWindowStack :: Screen -> IO (Maybe [DrawWindow])

-- | The default font options for the screen.
screenFontOptions :: Attr Screen (Maybe FontOptions)

-- | The resolution for fonts on the screen.
--   
--   Default value: -1
screenResolution :: Attr Screen Double

-- | Sets the default <tt>colormap</tt> for <tt>screen</tt>.
--   
--   Gets the default colormap for <tt>screen</tt>.
--   
--   Removed in Gtk3.
screenDefaultColormap :: Attr Screen Colormap

-- | The ::size_changed signal is emitted when the pixel width or height of
--   a screen changes.
screenSizeChanged :: ScreenClass self => Signal self (IO ())

-- | The <a>screenCompositedChanged</a> signal is emitted when the
--   composited status of the screen changes
--   
--   <ul>
--   <li>Available since Gdk version 2.10</li>
--   </ul>
screenCompositedChanged :: ScreenClass self => Signal self (IO ())

-- | The <a>screenMonitorsChanged</a> signal is emitted when the number,
--   size or position of the monitors attached to the screen change.
--   
--   Only for X for now. Future implementations for Win32 and OS X may be a
--   possibility.
--   
--   <ul>
--   <li>Available since Gdk version 2.14</li>
--   </ul>
screenMonitorsChanged :: ScreenClass self => Signal self (IO ())


-- | A widget which is not displayed The <a>Invisible</a> 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.
module Graphics.UI.Gtk.Windows.Invisible
data Invisible

-- | Creates a new <a>Invisible</a>.
invisibleNew :: IO Invisible

-- | Creates a new <a>Invisible</a> object for a specified screen
--   
--   <ul>
--   <li>Available since Gdk version 2.2</li>
--   </ul>
invisibleNewForScreen :: Screen -> IO Invisible

-- | Sets the <a>Screen</a> where the <a>Invisible</a> object will be
--   displayed.
--   
--   <ul>
--   <li>Available since Gdk version 2.2</li>
--   </ul>
invisibleSetScreen :: Invisible -> Screen -> IO ()

-- | Returns the <a>Screen</a> object associated with invisible
--   
--   <ul>
--   <li>Available since Gdk version 2.2</li>
--   </ul>
invisibleGetScreen :: Invisible -> IO Screen


-- | Pixmaps -- Offscreen drawables
--   
--   This module is empty when built with Gtk3 because Pixmap has been
--   removed.
module Graphics.UI.Gtk.Gdk.Pixmap
data Pixmap
class DrawableClass o => PixmapClass o

-- | A <a>Bitmap</a> is a special <a>Pixmap</a> in that the number of bits
--   per pixel is one, that is, a pixel is either set or unset. Whenever a
--   function expects a <a>Bitmap</a>, a <a>Pixmap</a> of depth one must be
--   supplied.
type Bitmap = Pixmap

-- | Create a new pixmap.
--   
--   If <tt>drawable</tt> is <tt>Nothing</tt>, the depth of the pixmap is
--   taken from the <tt>depth</tt> parameter, otherwise the pixmap has the
--   same depth as the <a>Drawable</a> specified by <tt>drawable</tt>.
--   Therefore, at least one of <tt>drawable</tt> and <tt>depth</tt> must
--   not be <tt>Nothing</tt>.
--   
--   <ul>
--   <li>Note that in Gtk+ 2.0 the <tt>drawable</tt> can only be a
--   <a>DrawWindow</a>, not an arbitary <a>Drawable</a>.</li>
--   </ul>
pixmapNew :: DrawableClass drawable => Maybe drawable -> Int -> Int -> Maybe Int -> IO Pixmap


-- | A set of rectangles describing areas to be redrawn.
--   
--   <ul>
--   <li>Regions consist of a set of non-overlapping rectangles. They are
--   used to specify the area of a window which needs updating.</li>
--   </ul>
--   
--   This module is empty when built with Gtk3 because Pixmap has been
--   removed.
module Graphics.UI.Gtk.Gdk.Region
makeNewRegion :: Ptr Region -> IO Region
newtype Region
[Region] :: (ForeignPtr (Region)) -> Region

-- | Create an empty region.
regionNew :: IO Region

-- | Specify how to interpret a polygon.
--   
--   <ul>
--   <li>The flag determines what happens if a polygon has overlapping
--   areas.</li>
--   </ul>
data FillRule
[EvenOddRule] :: FillRule
[WindingRule] :: FillRule

-- | Convert a polygon into a <a>Region</a>.
regionPolygon :: [Point] -> FillRule -> IO Region

-- | Copy a <a>Region</a>.
regionCopy :: Region -> IO Region

-- | Convert a rectangle to a <a>Region</a>.
regionRectangle :: Rectangle -> IO Region

-- | Smallest rectangle including the <a>Region</a>.
regionGetClipbox :: Region -> IO Rectangle

-- | Turn the <a>Region</a> into its rectangles.
--   
--   A <a>Region</a> is a set of horizontal bands. Each band consists of
--   one or more rectangles of the same height. No rectangles in a band
--   touch.
regionGetRectangles :: Region -> IO [Rectangle]

-- | Test if a <a>Region</a> is empty.
regionEmpty :: Region -> IO Bool

-- | Compares two <a>Region</a>s for equality.
regionEqual :: Region -> Region -> IO Bool

-- | Checks if a point it is within a region.
regionPointIn :: Region -> Point -> IO Bool

-- | How a rectangle is contained in a <a>Region</a>.
data OverlapType
[OverlapRectangleIn] :: OverlapType
[OverlapRectangleOut] :: OverlapType
[OverlapRectanglePart] :: OverlapType

-- | Check if a rectangle is within a region.
regionRectIn :: Region -> Rectangle -> IO OverlapType

-- | Move a region.
regionOffset :: Region -> Int -> Int -> IO ()

-- | Move a region.
--   
--   <ul>
--   <li>Positive values shrink the region, negative values expand it.</li>
--   </ul>
regionShrink :: Region -> Int -> Int -> IO ()

-- | Updates the region to include the rectangle.
regionUnionWithRect :: Region -> Rectangle -> IO ()

-- | Intersects one region with another.
--   
--   <ul>
--   <li>Changes <tt>reg1</tt> to include the common areas of <tt>reg1</tt>
--   and <tt>reg2</tt>.</li>
--   </ul>
regionIntersect :: Region -> Region -> IO ()

-- | Unions one region with another.
--   
--   <ul>
--   <li>Changes <tt>reg1</tt> to include <tt>reg1</tt> and
--   <tt>reg2</tt>.</li>
--   </ul>
regionUnion :: Region -> Region -> IO ()

-- | Removes pars of a <a>Region</a>.
--   
--   <ul>
--   <li>Reduces the region <tt>reg1</tt> so that is does not include any
--   areas of <tt>reg2</tt>.</li>
--   </ul>
regionSubtract :: Region -> Region -> IO ()

-- | XORs two <a>Region</a>s.
--   
--   <ul>
--   <li>The exclusive or of two regions contains all areas which were not
--   overlapping. In other words, it is the union of the regions minus
--   their intersections.</li>
--   </ul>
regionXor :: Region -> Region -> IO ()
instance Enum OverlapType
instance Enum FillRule
instance Show Region


-- | Gtk specific functions to for redering with Cairo.
--   
--   Cairo is a graphics library that supports vector graphics and image
--   compositing that can be used with Gdk. The Cairo API is an addition to
--   Gdk/Gtk (rather than a replacement). Cairo rendering can be performed
--   on any <a>Drawable</a> by calling <a>renderWithDrawable</a>. The
--   functions in this module provide ways of drawing Gtk specific
--   elements, such as <a>Pixbuf</a>s or text laid out with Pango.
--   
--   All functions in this module are only available in Gtk 2.8 or higher.
module Graphics.UI.Gtk.Cairo

-- | Retrieve the default <a>FontMap</a> that contains a list of available
--   fonts.
--   
--   <ul>
--   <li>One purpose of creating an explicit <a>FontMap</a> is to set a
--   different scaling factor between font sizes (in points, pt) and Cairo
--   units (in pixels). The default is 96dpi (dots per inch) which
--   corresponds to an average screen as output medium. A 10pt font will
--   therefore scale to <tt>10pt * (1/72 pt/inch) * (96 pixel/inch) = 13.3
--   pixel</tt>.</li>
--   </ul>
cairoFontMapGetDefault :: IO FontMap

-- | Set the scaling factor between font size and Cairo units.
--   
--   <ul>
--   <li>Value is in dots per inch (dpi). See
--   <a>cairoFontMapGetDefault</a>.</li>
--   </ul>
cairoFontMapSetResolution :: FontMap -> Double -> IO ()

-- | Ask for the scaling factor between font size and Cairo units.
--   
--   <ul>
--   <li>Value is in dots per inch (dpi). See
--   <a>cairoFontMapGetDefault</a>.</li>
--   </ul>
cairoFontMapGetResolution :: FontMap -> IO Double

-- | Create a <a>PangoContext</a>.
--   
--   <ul>
--   <li>If no <a>FontMap</a> is specified, it uses the default
--   <a>FontMap</a> that has a scaling factor of 96 dpi. See
--   <a>cairoFontMapGetDefault</a>.</li>
--   </ul>
cairoCreateContext :: Maybe FontMap -> IO PangoContext

-- | Set the scaling factor of the <a>PangoContext</a>.
--   
--   <ul>
--   <li>Supplying zero or a negative value will result in the resolution
--   value of the underlying <a>FontMap</a> to be used. See also
--   <a>cairoFontMapGetDefault</a>.</li>
--   </ul>
cairoContextSetResolution :: PangoContext -> Double -> IO ()

-- | Ask for the scaling factor of the <a>PangoContext</a>.
--   
--   <ul>
--   <li>A negative value will be returned if no resolution has been set.
--   See <a>cairoContextSetResolution</a>.</li>
--   </ul>
cairoContextGetResolution :: PangoContext -> IO Double

-- | Set Cairo font options.
--   
--   <ul>
--   <li>Apply the given font options to the context. Values set through
--   this functions override those that are set by
--   <a>updateContext</a>.</li>
--   </ul>
cairoContextSetFontOptions :: PangoContext -> FontOptions -> IO ()

-- | Retrieve Cairo font options.
cairoContextGetFontOptions :: PangoContext -> IO FontOptions

-- | Creates a Cairo context for drawing to a <a>Drawable</a>.
--   
--   Removed in Gtk3.
renderWithDrawable :: DrawableClass drawable => drawable -> Render a -> IO a

-- | Adds the given region to the current path of the <a>Render</a>
--   context.
--   
--   Removed in Gtk3.
region :: Region -> Render ()

-- | Sets the specified <a>Color</a> as the source color of the
--   <a>Render</a> context.
setSourceColor :: Color -> Render ()

-- | Sets the given pixbuf as the source pattern for the Cairo context. The
--   pattern has an extend mode of <a>ExtendNone</a> and is aligned so that
--   the origin of pixbuf is <tt>(x, y)</tt>.
setSourcePixbuf :: Pixbuf -> Double -> Double -> Render ()

-- | Adds the given region to the current path of the <a>Render</a>
--   context.
rectangle :: Rectangle -> Render ()

-- | Update a <a>PangoContext</a> with respect to changes in a
--   <a>Render</a> environment.
--   
--   <ul>
--   <li>The <a>PangoContext</a> must have been created with
--   <a>cairoCreateContext</a>. Any <a>PangoLayout</a>s that have been
--   previously created with this context have to be update using
--   <a>layoutContextChanged</a>.</li>
--   </ul>
updateContext :: PangoContext -> Render ()

-- | Create a <a>PangoLayout</a> within a <a>Render</a> context.
--   
--   <ul>
--   <li>This is a convenience function that creates a new
--   <a>PangoContext</a> within this <a>Render</a> context and creates a
--   new <a>PangoLayout</a>. If the transformation or target surface of the
--   <a>Render</a> context change, <a>updateLayout</a> has to be called on
--   this layout.</li>
--   </ul>
createLayout :: GlibString string => string -> Render PangoLayout

-- | Propagate changed to the <a>Render</a> context to a
--   <a>PangoLayout</a>.
--   
--   <ul>
--   <li>This is a convenience function that calls <a>updateContext</a> on
--   the (private) <a>PangoContext</a> of the given layout to propagate
--   changes from the <a>Render</a> context to the <a>PangoContext</a> and
--   then calls <a>layoutContextChanged</a> on the layout. This function is
--   necessary for <a>createLayout</a> since a private <a>PangoContext</a>
--   is created that is not visible to the user.</li>
--   </ul>
updateLayout :: PangoLayout -> Render ()

-- | Draw a glyph string.
--   
--   <ul>
--   <li>The origin of the glyphs (the left edge of the baseline) will be
--   drawn at the current point of the cairo context.</li>
--   </ul>
showGlyphString :: GlyphItem -> Render ()

-- | Draw a <a>LayoutLine</a>.
--   
--   <ul>
--   <li>The origin of the glyphs (the left edge of the baseline) will be
--   drawn at the current point of the cairo context.</li>
--   </ul>
showLayoutLine :: LayoutLine -> Render ()

-- | Draw a <a>PangoLayout</a>.
--   
--   <ul>
--   <li>The top-left corner of the <a>PangoLayout</a> will be drawn at the
--   current point of the cairo context.</li>
--   </ul>
showLayout :: PangoLayout -> Render ()

-- | Add the extent of a glyph string to the current path.
--   
--   <ul>
--   <li>The origin of the glyphs (the left edge of the line) will be at
--   the current point of the cairo context.</li>
--   </ul>
glyphStringPath :: GlyphItem -> Render ()

-- | Add the extent of a layout line to the current path.
--   
--   <ul>
--   <li>The origin of the glyphs (the left edge of the line) will be at
--   the current point of the cairo context.</li>
--   </ul>
layoutLinePath :: LayoutLine -> Render ()

-- | Add the layout to the current path.
--   
--   <ul>
--   <li>Adds the top-left corner of the text to the current path.
--   Afterwards, the path position is at the bottom-right corner of the
--   <a>PangoLayout</a>.</li>
--   </ul>
layoutPath :: PangoLayout -> Render ()


-- | Graphics contexts - objects to encapsulate drawing properties
module Graphics.UI.Gtk.Gdk.GC
data GC
class GObjectClass o => GCClass o
castToGC :: GObjectClass obj => obj -> GC
gTypeGC :: GType

-- | Create an empty graphics context.
gcNew :: DrawableClass d => d -> IO GC

-- | Intermediate data structure for <a>GC</a>s.
--   
--   <ul>
--   <li>If <tt>graphicsExposure</tt> is set then copying portions into a
--   drawable will generate an <tt>"exposure"</tt> event, even if the
--   destination area is not currently visible.</li>
--   </ul>
--   
--   Removed in Gtk3.
data GCValues
[GCValues] :: Color -> Color -> Function -> Fill -> Maybe Pixmap -> Maybe Pixmap -> Maybe Pixmap -> SubwindowMode -> Int -> Int -> Int -> Int -> Bool -> Int -> LineStyle -> CapStyle -> JoinStyle -> GCValues
[foreground] :: GCValues -> Color
[background] :: GCValues -> Color
[function] :: GCValues -> Function
[fill] :: GCValues -> Fill
[tile] :: GCValues -> Maybe Pixmap
[stipple] :: GCValues -> Maybe Pixmap
[clipMask] :: GCValues -> Maybe Pixmap
[subwindowMode] :: GCValues -> SubwindowMode
[tsXOrigin] :: GCValues -> Int
[tsYOrigin] :: GCValues -> Int
[clipXOrigin] :: GCValues -> Int
[clipYOrigin] :: GCValues -> Int
[graphicsExposure] :: GCValues -> Bool
[lineWidth] :: GCValues -> Int
[lineStyle] :: GCValues -> LineStyle
[capStyle] :: GCValues -> CapStyle
[joinStyle] :: GCValues -> JoinStyle
newGCValues :: GCValues

-- | Color
--   
--   <ul>
--   <li>Specifies a color with three integer values for red, green and
--   blue. All values range from 0 (least intense) to 65535 (highest
--   intensity).</li>
--   </ul>
data Color :: *
[Color] :: Word16 -> Word16 -> Word16 -> Color

-- | Determine how bitmap operations are carried out.
--   
--   Removed in Gtk3.
data Function
[Copy] :: Function
[Invert] :: Function
[Xor] :: Function
[Clear] :: Function
[And] :: Function
[AndReverse] :: Function
[AndInvert] :: Function
[Noop] :: Function
[Or] :: Function
[Equiv] :: Function
[OrReverse] :: Function
[CopyInvert] :: Function
[OrInvert] :: Function
[Nand] :: Function
[Nor] :: Function
[Set] :: Function

-- | How objects are filled.
--   
--   Removed in Gtk3.
data Fill
[Solid] :: Fill
[Tiled] :: Fill
[Stippled] :: Fill
[OpaqueStippled] :: Fill

-- | Determine if child widget may be overdrawn.
--   
--   Removed in Gtk3.
data SubwindowMode
[ClipByChildren] :: SubwindowMode
[IncludeInferiors] :: SubwindowMode

-- | Determines if a line is solid or dashed.
--   
--   Removed in Gtk3.
data LineStyle
[LineSolid] :: LineStyle
[LineOnOffDash] :: LineStyle
[LineDoubleDash] :: LineStyle

-- | Specify the how the ends of a line is drawn.
--   
--   Removed in Gtk3.
data CapStyle
[CapNotLast] :: CapStyle
[CapButt] :: CapStyle
[CapRound] :: CapStyle
[CapProjecting] :: CapStyle
data JoinStyle
[JoinMiter] :: JoinStyle
[JoinRound] :: JoinStyle
[JoinBevel] :: JoinStyle

-- | Creates a graphics context with specific values.
gcNewWithValues :: DrawableClass d => d -> GCValues -> IO GC

-- | Change some of the values of a graphics context.
gcSetValues :: GC -> GCValues -> IO ()

-- | Retrieve the values in a graphics context.
gcGetValues :: GC -> IO GCValues

-- | Set a clipping rectangle.
--   
--   <ul>
--   <li>All drawing operations are restricted to this rectangle. This
--   rectangle is interpreted relative to the clip origin.</li>
--   </ul>
gcSetClipRectangle :: GC -> Rectangle -> IO ()

-- | Set a clipping region.
--   
--   <ul>
--   <li>All drawing operations are restricted to this region. This region
--   is interpreted relative to the clip origin.</li>
--   </ul>
gcSetClipRegion :: GC -> Region -> IO ()

-- | Specify the pattern with which lines are drawn.
--   
--   <ul>
--   <li>Every tuple in the list contains an even and an odd segment. Even
--   segments are drawn normally, whereby the <a>lineStyle</a> member of
--   the graphics context defines if odd segements are drawn or not. A
--   <tt>phase</tt> argument greater than 0 will drop <tt>phase</tt> pixels
--   before starting to draw.</li>
--   </ul>
gcSetDashes :: GC -> Int -> [(Int, Int)] -> IO ()


-- | An object for rendering a cell in a list, icon or combo box widget.
module Graphics.UI.Gtk.ModelView.CellRenderer
data CellRenderer
class ObjectClass o => CellRendererClass o
castToCellRenderer :: GObjectClass obj => obj -> CellRenderer
gTypeCellRenderer :: GType
toCellRenderer :: CellRendererClass o => o -> CellRenderer
data CellRendererMode
[CellRendererModeInert] :: CellRendererMode
[CellRendererModeActivatable] :: CellRendererMode
[CellRendererModeEditable] :: CellRendererMode

-- | Informs the cell renderer that the editing is stopped. If
--   <tt>canceled</tt> is <tt>True</tt>, the cell renderer will emit the
--   <a>editingCanceled</a> signal.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
cellRendererStopEditing :: CellRendererClass self => self -> Bool -> IO ()

-- | Returns <tt>(width, height)</tt> denoting the size of the fixed size
--   of <tt>cell</tt>. If no fixed size is set, returns <tt>-1</tt> for
--   that value.
cellRendererGetFixedSize :: CellRendererClass self => self -> IO (Int, Int)

-- | Sets the renderer size to be explicit, independent of the properties
--   set.
cellRendererSetFixedSize :: CellRendererClass self => self -> Int -> Int -> IO ()

-- | Editable mode of the CellRenderer.
--   
--   Default value: <a>CellRendererModeInert</a>
cellMode :: CellRendererClass self => Attr self CellRendererMode

-- | Display the cell.
--   
--   Default value: <tt>True</tt>
cellVisible :: CellRendererClass self => Attr self Bool

-- | Display the cell sensitive.
--   
--   Default value: <tt>True</tt>
cellSensitive :: CellRendererClass self => Attr self Bool

-- | The x-align.
--   
--   Allowed values: <tt>[0,1]</tt>
--   
--   Default value: <tt>0.5</tt>
cellXAlign :: CellRendererClass self => Attr self Float

-- | The y-align.
--   
--   Allowed values: <tt>[0,1]</tt>
--   
--   Default value: <tt>0.5</tt>
cellYAlign :: CellRendererClass self => Attr self Float

-- | The xpad.
--   
--   Default value: <tt>0</tt>
cellXPad :: CellRendererClass self => Attr self Int

-- | The ypad.
--   
--   Default value: <tt>0</tt>
cellYPad :: CellRendererClass self => Attr self Int

-- | The fixed width.
--   
--   Allowed values: <tt>&gt;= -1</tt>
--   
--   Default value: <tt>-1</tt>
cellWidth :: CellRendererClass self => Attr self Int

-- | The fixed height.
--   
--   Allowed values: <tt>&gt;= -1</tt>
--   
--   Default value: <tt>-1</tt>
cellHeight :: CellRendererClass self => Attr self Int

-- | Row has children.
--   
--   Default value: <tt>False</tt>
cellIsExpander :: CellRendererClass self => Attr self Bool

-- | Row is an expander row, and is expanded.
--   
--   Default value: <tt>False</tt>
cellIsExpanded :: CellRendererClass self => Attr self Bool

-- | Cell background color as a string.
--   
--   Default value: <tt>""</tt>
cellBackground :: (CellRendererClass self, GlibString string) => WriteAttr self string

-- | Cell background color as a <a>Color</a>.
--   
--   Removed in Gtk3.
cellBackgroundColor :: CellRendererClass self => Attr self Color

-- | Whether the <a>cellBackground</a> / <a>cellBackgroundColor</a>
--   attribute is set.
--   
--   You can use this to reset the attribute to its default.
--   
--   Default value: <tt>False</tt>
cellBackgroundSet :: CellRendererClass self => Attr self Bool

-- | This signal gets emitted when a cell starts to be edited. The indended
--   use of this signal is to do special setup on <tt>editable</tt>, e.g.
--   adding a <a>EntryCompletion</a> or setting up additional columns in a
--   <a>ComboBox</a>.
--   
--   <ul>
--   <li>The widget that is passed to the handler contains the widget that
--   is used by the <a>CellRenderer</a> to interact with the user. The
--   widget must be casted to the appropriate widget. For instance, a
--   <a>CellRendererText</a> uses an <a>Entry</a> widget, while a
--   <a>CellRendererCombo</a> uses a <a>ComboBox</a> (if
--   <a>cellComboHasEntry</a> is <tt>False</tt>) or a <a>ComboBoxEntry</a>
--   (if <a>cellComboHasEntry</a> is <tt>True</tt>).</li>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
editingStarted :: CellRendererClass self => Signal self (Widget -> TreePath -> IO ())

-- | This signal gets emitted when the user cancels the process of editing
--   a cell. For example, an editable cell renderer could be written to
--   cancel editing when the user presses Escape.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
editingCanceled :: CellRendererClass self => Signal self (IO ())

-- | <i>Deprecated: instead of 'onEditingStarted obj' use 'on obj
--   editingStarted'</i>
onEditingStarted :: CellRendererClass self => self -> (Widget -> TreePath -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterEditingStarted obj' use 'after obj
--   editingStarted'</i>
afterEditingStarted :: CellRendererClass self => self -> (Widget -> TreePath -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'onEditingCanceled obj' use 'on obj
--   editingCanceled'</i>
onEditingCanceled :: CellRendererClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterEditingCanceled obj' use 'after obj
--   editingCanceled'</i>
afterEditingCanceled :: CellRendererClass self => self -> IO () -> IO (ConnectId self)
instance Eq CellRendererMode
instance Enum CellRendererMode


-- | Drawing primitives.
--   
--   This module defines drawing primitives that can operate on
--   <a>DrawWindow</a>s and <a>Pixmap</a>s.
--   
--   This module is empty when built with Gtk3 because GTKDrawable has been
--   removed.
module Graphics.UI.Gtk.Gdk.Drawable
data Drawable
class GObjectClass o => DrawableClass o
castToDrawable :: GObjectClass obj => obj -> Drawable
gTypeDrawable :: GType
toDrawable :: DrawableClass o => o -> Drawable

-- | Get the size of pixels.
--   
--   <ul>
--   <li>Returns the number of bits which are use to store information on
--   each pixels in this <a>Drawable</a>.</li>
--   </ul>
drawableGetDepth :: DrawableClass d => d -> IO Int

-- | Retrieve the size of the <a>Drawable</a>.
--   
--   <ul>
--   <li>The result might not be up-to-date if there are still resizing
--   messages to be processed.</li>
--   </ul>
drawableGetSize :: DrawableClass d => d -> IO (Int, Int)

-- | Determine where not to draw.
--   
--   <ul>
--   <li>Computes the region of a drawable that potentially can be written
--   to by drawing primitives. This region will not take into account the
--   clip region for the GC, and may also not take into account other
--   factors such as if the window is obscured by other windows, but no
--   area outside of this region will be affected by drawing
--   primitives.</li>
--   </ul>
drawableGetClipRegion :: DrawableClass d => d -> IO Region

-- | Determine what not to redraw.
--   
--   <ul>
--   <li>Computes the region of a drawable that is potentially visible.
--   This does not necessarily take into account if the window is obscured
--   by other windows, but no area outside of this region is visible.</li>
--   </ul>
drawableGetVisibleRegion :: DrawableClass d => d -> IO Region

-- | Get <a>NativeWindowId</a> of <a>Drawable</a>.
drawableGetID :: DrawableClass d => d -> IO NativeWindowId

-- | Represents the x and y coordinate of a point.
type Point = (Int, Int)

-- | Draw a point into a <a>Drawable</a>.
drawPoint :: DrawableClass d => d -> GC -> Point -> IO ()

-- | Draw several points into a <a>Drawable</a>.
--   
--   <ul>
--   <li>This function is more efficient than calling <a>drawPoint</a> on
--   several points.</li>
--   </ul>
drawPoints :: DrawableClass d => d -> GC -> [Point] -> IO ()

-- | Draw a line into a <a>Drawable</a>.
--   
--   <ul>
--   <li>The parameters are x1, y1, x2, y2.</li>
--   <li>Drawing several separate lines can be done more efficiently by
--   <a>drawSegments</a>.</li>
--   </ul>
drawLine :: DrawableClass d => d -> GC -> Point -> Point -> IO ()

-- | Draw several lines.
--   
--   <ul>
--   <li>The function uses the current line width, dashing and especially
--   the joining specification in the graphics context (in contrast to
--   <a>drawSegments</a>.</li>
--   </ul>
drawLines :: DrawableClass d => d -> GC -> [Point] -> IO ()
data Dither
[RgbDitherNone] :: Dither
[RgbDitherNormal] :: Dither
[RgbDitherMax] :: Dither

-- | Render a <a>Pixbuf</a>.
--   
--   <ul>
--   <li>Usage: <tt>drawPixbuf d gc pb srcX srcY destX destY srcWidth
--   srcHeight dither xDither yDither</tt> Renders a rectangular portion of
--   a <a>Pixbuf</a> to a <a>Drawable</a>. The <tt>srcX</tt>,
--   <tt>srcY</tt>, <tt>srcWidth</tt> and <tt>srcHeight</tt> specify what
--   part of the <a>Pixbuf</a> should be rendered. The latter two values
--   may be <tt>-1</tt> in which case the width and height are taken from
--   <tt>pb</tt>. The image is placed at <tt>destX</tt>, <tt>destY</tt>. If
--   you render parts of an image at a time, set <tt>ditherX</tt> and
--   <tt>ditherY</tt> to the origin of the image you are rendering.</li>
--   <li>Since 2.2.</li>
--   </ul>
drawPixbuf :: DrawableClass d => d -> GC -> Pixbuf -> Int -> Int -> Int -> Int -> Int -> Int -> Dither -> Int -> Int -> IO ()

-- | Draw several unconnected lines.
--   
--   <ul>
--   <li>This method draws several unrelated lines.</li>
--   </ul>
drawSegments :: DrawableClass d => d -> GC -> [(Point, Point)] -> IO ()

-- | Draw a rectangular object.
--   
--   <ul>
--   <li>Draws a rectangular outline or filled rectangle, using the
--   foreground color and other attributes of the <a>GC</a>.</li>
--   <li>A rectangle drawn filled is 1 pixel smaller in both dimensions
--   than a rectangle outlined. Calling <a>drawRectangle</a> w gc True 0 0
--   20 20 results in a filled rectangle 20 pixels wide and 20 pixels high.
--   Calling <a>drawRectangle</a> d gc False 0 0 20 20 results in an
--   outlined rectangle with corners at (0, 0), (0, 20), (20, 20), and (20,
--   0), which makes it 21 pixels wide and 21 pixels high.</li>
--   </ul>
drawRectangle :: DrawableClass d => d -> GC -> Bool -> Int -> Int -> Int -> Int -> IO ()

-- | Draws an arc or a filled 'pie slice'.
--   
--   <ul>
--   <li>The arc is defined by the bounding rectangle of the entire
--   ellipse, and the start and end angles of the part of the ellipse to be
--   drawn.</li>
--   <li>The starting angle <tt>aStart</tt> is relative to the 3 o'clock
--   position, counter-clockwise, in 1/64ths of a degree. <tt>aEnd</tt> is
--   measured similarly, but relative to <tt>aStart</tt>.</li>
--   </ul>
drawArc :: DrawableClass d => d -> GC -> Bool -> Int -> Int -> Int -> Int -> Int -> Int -> IO ()

-- | Draws an outlined or filled polygon.
--   
--   <ul>
--   <li>The polygon is closed automatically, connecting the last point to
--   the first point if necessary.</li>
--   </ul>
drawPolygon :: DrawableClass d => d -> GC -> Bool -> [Point] -> IO ()

-- | Draw a segment of text.
--   
--   <ul>
--   <li>This function draws a segment of text. These segements are the
--   result of itemizing a string into segments with the same
--   characteristics (font, text direction, etc.) using <a>itemize</a>.
--   Each item is then turned into a shapes by calling <a>shape</a>. These
--   shapes can then be drawn onto screen using this function. A simpler
--   interface, that also takes care of breaking a paragraph into several
--   lines is a <a>LayoutLine</a>.</li>
--   </ul>
drawGlyphs :: DrawableClass d => d -> GC -> Int -> Int -> GlyphItem -> IO ()

-- | Draw a single line of text.
--   
--   <ul>
--   <li>The <tt>x</tt> coordinate specifies the start of the string, the
--   <tt>y</tt> coordinate specifies the base line.</li>
--   </ul>
drawLayoutLine :: DrawableClass d => d -> GC -> Int -> Int -> LayoutLine -> IO ()

-- | Draw a single line of text.
--   
--   <ul>
--   <li>The <tt>x</tt> coordinate specifies the start of the string, the
--   <tt>y</tt> coordinate specifies the base line.</li>
--   <li>If both colors are <tt>Nothing</tt> this function will behave like
--   <a>drawLayoutLine</a> in that it uses the default colors from the
--   graphics context.</li>
--   </ul>
drawLayoutLineWithColors :: DrawableClass d => d -> GC -> Int -> Int -> LayoutLine -> Maybe Color -> Maybe Color -> IO ()

-- | Draw a paragraph of text.
--   
--   <ul>
--   <li>The <tt>x</tt> and <tt>y</tt> values specify the upper left point
--   of the layout.</li>
--   </ul>
drawLayout :: DrawableClass d => d -> GC -> Int -> Int -> PangoLayout -> IO ()

-- | Draw a paragraph of text.
--   
--   <ul>
--   <li>The <tt>x</tt> and <tt>y</tt> values specify the upper left point
--   of the layout.</li>
--   <li>If both colors are <tt>Nothing</tt> this function will behave like
--   <a>drawLayout</a> in that it uses the default colors from the graphics
--   context.</li>
--   </ul>
drawLayoutWithColors :: DrawableClass d => d -> GC -> Int -> Int -> PangoLayout -> Maybe Color -> Maybe Color -> IO ()

-- | Copies another <a>Drawable</a>.
--   
--   <ul>
--   <li>Copies the (width,height) region of the <tt>src</tt> at
--   coordinates (<tt>xSrc</tt>, <tt>ySrc</tt>) to coordinates
--   (<tt>xDest</tt>, <tt>yDest</tt>) in the <tt>dest</tt>. The
--   <tt>width</tt> and/or <tt>height</tt> may be given as -1, in which
--   case the entire source drawable will be copied.</li>
--   <li>Most fields in <tt>gc</tt> are not used for this operation, but
--   notably the clip mask or clip region will be honored. The source and
--   destination drawables must have the same visual and colormap, or
--   errors will result. (On X11, failure to match visual/colormap results
--   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 <a>GC</a>, then use
--   <a>drawRectangle</a> to draw a rectangle clipped to the bitmap.</li>
--   </ul>
drawDrawable :: (DrawableClass src, DrawableClass dest) => dest -> GC -> src -> Int -> Int -> Int -> Int -> Int -> Int -> IO ()


-- | Cursors | Standard and pixmap cursors.
module Graphics.UI.Gtk.Gdk.Cursor
newtype Cursor
[Cursor] :: (ForeignPtr (Cursor)) -> Cursor

-- | Cursor types.
data CursorType
[XCursor] :: CursorType
[Arrow] :: CursorType
[BasedArrowDown] :: CursorType
[BasedArrowUp] :: CursorType
[Boat] :: CursorType
[Bogosity] :: CursorType
[BottomLeftCorner] :: CursorType
[BottomRightCorner] :: CursorType
[BottomSide] :: CursorType
[BottomTee] :: CursorType
[BoxSpiral] :: CursorType
[CenterPtr] :: CursorType
[Circle] :: CursorType
[Clock] :: CursorType
[CoffeeMug] :: CursorType
[Cross] :: CursorType
[CrossReverse] :: CursorType
[Crosshair] :: CursorType
[DiamondCross] :: CursorType
[Dot] :: CursorType
[Dotbox] :: CursorType
[DoubleArrow] :: CursorType
[DraftLarge] :: CursorType
[DraftSmall] :: CursorType
[DrapedBox] :: CursorType
[Exchange] :: CursorType
[Fleur] :: CursorType
[Gobbler] :: CursorType
[Gumby] :: CursorType
[Hand1] :: CursorType
[Hand2] :: CursorType
[Heart] :: CursorType
[Icon] :: CursorType
[IronCross] :: CursorType
[LeftPtr] :: CursorType
[LeftSide] :: CursorType
[LeftTee] :: CursorType
[Leftbutton] :: CursorType
[LlAngle] :: CursorType
[LrAngle] :: CursorType
[Man] :: CursorType
[Middlebutton] :: CursorType
[Mouse] :: CursorType
[Pencil] :: CursorType
[Pirate] :: CursorType
[Plus] :: CursorType
[QuestionArrow] :: CursorType
[RightPtr] :: CursorType
[RightSide] :: CursorType
[RightTee] :: CursorType
[Rightbutton] :: CursorType
[RtlLogo] :: CursorType
[Sailboat] :: CursorType
[SbDownArrow] :: CursorType
[SbHDoubleArrow] :: CursorType
[SbLeftArrow] :: CursorType
[SbRightArrow] :: CursorType
[SbUpArrow] :: CursorType
[SbVDoubleArrow] :: CursorType
[Shuttle] :: CursorType
[Sizing] :: CursorType
[Spider] :: CursorType
[Spraycan] :: CursorType
[Star] :: CursorType
[Target] :: CursorType
[Tcross] :: CursorType
[TopLeftArrow] :: CursorType
[TopLeftCorner] :: CursorType
[TopRightCorner] :: CursorType
[TopSide] :: CursorType
[TopTee] :: CursorType
[Trek] :: CursorType
[UlAngle] :: CursorType
[Umbrella] :: CursorType
[UrAngle] :: CursorType
[Watch] :: CursorType
[Xterm] :: CursorType
[LastCursor] :: CursorType
[BlankCursor] :: CursorType
[CursorIsPixmap] :: CursorType

-- | Creates a new cursor from the set of builtin cursors for the default
--   display. See <a>cursorNewForDisplay</a>. To make the cursor invisible,
--   use <a>BlankCursor</a>.
cursorNew :: CursorType -> IO Cursor

-- | Creates a new cursor from a given pixmap and mask. Both the pixmap and
--   mask must have a depth of 1 (i.e. each pixel has only 2 values - on or
--   off). The standard cursor size is 16 by 16 pixels.
--   
--   Removed in Gtk3.
cursorNewFromPixmap :: Pixmap -> Pixmap -> Color -> Color -> Int -> Int -> IO Cursor

-- | Creates a new cursor from a pixbuf. Not all GDK backends support RGBA
--   cursors. If they are not supported, a monochrome approximation will be
--   displayed. The functions <tt>displaySupportsCursorAlpha</tt> and
--   <tt>displaySupportsCursorColor</tt> can be used to determine whether
--   RGBA cursors are supported; <tt>displayGetDefaultCursorSize</tt> and
--   <tt>displayGetMaximalCursorSize</tt> give information about cursor
--   sizes.
--   
--   On the X backend, support for RGBA cursors requires a sufficently new
--   version of the X Render extension.
cursorNewFromPixbuf :: Display -> Pixbuf -> Int -> Int -> IO Cursor

-- | Creates a new cursor by looking up name in the current cursor theme.
cursorNewFromName :: GlibString string => Display -> string -> IO (Maybe Cursor)

-- | Creates a new cursor from the set of builtin cursors.
cursorNewForDisplay :: Display -> CursorType -> IO Cursor

-- | Returns the display on which the GdkCursor is defined.
cursorGetDisplay :: Cursor -> IO Display

-- | Returns a <a>Pixbuf</a> with the image used to display the cursor.
--   Note that depending on the capabilities of the windowing system and on
--   the cursor, GDK may not be able to obtain the image data. In this
--   case, <tt>Nothing</tt> is returned.
cursorGetImage :: Cursor -> IO (Maybe Pixbuf)
instance Show CursorType
instance Eq CursorType
instance Bounded CursorType
instance Enum CursorType


-- | A <a>DrawWindow</a> is a rectangular region on the screen.
module Graphics.UI.Gtk.Gdk.DrawWindow
data DrawWindow
class DrawableClass o => DrawWindowClass o
castToDrawWindow :: GObjectClass obj => obj -> DrawWindow
gTypeDrawWindow :: GType

-- | The state a <tt>DrawWindow</tt> is in.
data WindowState
[WindowStateWithdrawn] :: WindowState
[WindowStateIconified] :: WindowState
[WindowStateMaximized] :: WindowState
[WindowStateSticky] :: WindowState
[WindowStateFullscreen] :: WindowState
[WindowStateAbove] :: WindowState
[WindowStateBelow] :: WindowState

-- | The identifer of a window of the underlying windowing system.
data NativeWindowId
toNativeWindowId :: Integral a => a -> NativeWindowId
fromNativeWindowId :: Integral a => NativeWindowId -> a

-- | Gets the bitwise OR of the currently active drawWindow state flags,
--   from the <a>WindowState</a> enumeration.
drawWindowGetState :: DrawWindowClass self => self -> IO [WindowState]

-- | Scroll the contents of <tt>DrawWindow</tt>.
--   
--   <ul>
--   <li>Scroll both, pixels and children, by the given amount.
--   <tt>DrawWindow</tt> itself does not move. Portions of the window that
--   the scroll operation brings inm from offscreen areas are invalidated.
--   The invalidated region may be bigger than what would strictly be
--   necessary. (For X11, a minimum area will be invalidated if the window
--   has no subwindows, or 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.)</li>
--   </ul>
drawWindowScroll :: DrawWindowClass self => self -> Int -> Int -> IO ()

-- | Clears an entire <tt>DrawWindow</tt> to the background color or
--   background pixmap.
--   
--   Removed in Gtk3.
drawWindowClear :: DrawWindowClass self => self -> IO ()

-- | Clears an area of <tt>DrawWindow</tt> to the background color or
--   background pixmap.
--   
--   Removed in Gtk3.
drawWindowClearArea :: DrawWindowClass self => self -> Int -> Int -> Int -> Int -> IO ()

-- | Like <a>drawWindowClearArea</a>, but also generates an expose event
--   for the cleared area.
--   
--   Removed in Gtk3.
drawWindowClearAreaExpose :: DrawWindowClass self => self -> Int -> Int -> Int -> Int -> IO ()

-- | Raises <tt>DrawWindow</tt> to the top of the Z-order (stacking order),
--   so that other drawWindows with the same parent drawWindow appear below
--   <tt>DrawWindow</tt>. This is true whether or not the drawWindows are
--   visible.
--   
--   If <tt>DrawWindow</tt> is a toplevel, the window manager may choose to
--   deny the request to move the drawWindow in the Z-order,
--   <a>drawWindowRaise</a> only requests the restack, does not guarantee
--   it.
drawWindowRaise :: DrawWindowClass self => self -> IO ()

-- | Lowers <tt>DrawWindow</tt> to the bottom of the Z-order (stacking
--   order), so that other windows with the same parent window appear above
--   <tt>DrawWindow</tt>. This is true whether or not the other windows are
--   visible.
--   
--   If <tt>DrawWindow</tt> is a toplevel, the window manager may choose to
--   deny the request to move the drawWindow in the Z-order,
--   <a>drawWindowLower</a> only requests the restack, does not guarantee
--   it.
--   
--   Note that a widget is raised automatically when it is mapped, thus you
--   need to call <a>drawWindowLower</a> after <a>widgetShow</a> if the
--   window should not appear above other windows.
drawWindowLower :: DrawWindowClass self => self -> IO ()

-- | Registers a drawWindow as a potential drop destination.
drawWindowRegisterDnd :: DrawWindowClass self => self -> IO ()

-- | A convenience wrapper around <a>drawWindowBeginPaintRegion</a> which
--   creates a rectangular region for you.
--   
--   <ul>
--   <li>See <a>drawWindowBeginPaintRegion</a> for details.</li>
--   </ul>
drawWindowBeginPaintRect :: DrawWindowClass self => self -> Rectangle -> IO ()

-- | Indicate that you are beginning the process of redrawing
--   <tt>region</tt>.
--   
--   <ul>
--   <li>A backing store (offscreen buffer) large enough to contain
--   <tt>region</tt> will be created. The backing store will be initialized
--   with the background color or background pixmap for
--   <tt>DrawWindow</tt>. Then, all drawing operations performed on
--   <tt>DrawWindow</tt> will be diverted to the backing store. When you
--   call <a>drawWindowEndPaint</a>, the backing store will be copied to
--   <tt>DrawWindow</tt>, making it visible onscreen. Only the part of
--   <tt>DrawWindow</tt> contained in <tt>region</tt> will be modified;
--   that is, drawing operations are clipped to <tt>region</tt>.</li>
--   </ul>
--   
--   The net result of all this is to remove flicker, because the user sees
--   the finished product appear all at once when you call
--   <a>drawWindowEndPaint</a>. If you draw to <tt>DrawWindow</tt> directly
--   without calling <a>drawWindowBeginPaintRegion</a>, the user may see
--   flicker as individual drawing operations are performed in sequence.
--   The clipping and background-initializing features of
--   <a>drawWindowBeginPaintRegion</a> are conveniences for the programmer,
--   so you can avoid doing that work yourself.
--   
--   When using GTK+, the widget system automatically places calls to
--   <a>drawWindowBeginPaintRegion</a> and <a>drawWindowEndPaint</a> around
--   emissions of the <tt>expose_event</tt> signal. That is, if you're
--   writing an expose event handler, you can assume that the exposed area
--   in <tt>eventRegion</tt> has already been cleared to the window
--   background, is already set as the clip region, and already has a
--   backing store. Therefore in most cases, application code need not call
--   <a>drawWindowBeginPaintRegion</a>. (You can disable the automatic
--   calls around expose events on a widget-by-widget basis by calling
--   <tt>widgetSetDoubleBuffered</tt>.)
--   
--   If you call this function multiple times before calling the matching
--   <a>drawWindowEndPaint</a>, the backing stores are pushed onto a stack.
--   <a>drawWindowEndPaint</a> copies the topmost backing store onscreen,
--   subtracts the topmost region from all other regions in the stack, and
--   pops the stack. All drawing operations affect only the topmost backing
--   store in the stack. One matching call to <a>drawWindowEndPaint</a> is
--   required for each call to <a>drawWindowBeginPaintRegion</a>.
--   
--   Removed in Gtk3.
drawWindowBeginPaintRegion :: DrawWindowClass self => self -> Region -> IO ()

-- | Signal that drawing has finished.
--   
--   <ul>
--   <li>Indicates that the backing store created by the most recent call
--   to <a>drawWindowBeginPaintRegion</a> should be copied onscreen and
--   deleted, leaving the next-most-recent backing store or no backing
--   store at all as the active paint region. See
--   <a>drawWindowBeginPaintRegion</a> for full details. It is an error to
--   call this function without a matching
--   <a>drawWindowBeginPaintRegion</a> first.</li>
--   </ul>
drawWindowEndPaint :: DrawWindowClass self => self -> IO ()

-- | A convenience wrapper around <a>drawWindowInvalidateRegion</a> which
--   invalidates a rectangular region. See
--   <a>drawWindowInvalidateRegion</a> for details.
drawWindowInvalidateRect :: DrawWindowClass self => self -> Rectangle -> Bool -> IO ()

-- | Adds <tt>region</tt> to the update area for <tt>DrawWindow</tt>. The
--   update area is the region that needs to be redrawn, or "dirty
--   region.". During the next idle period of the main look, an expose even
--   for this region will be created. An application would normally redraw
--   the contents of <tt>DrawWindow</tt> in response to those expose
--   events.
--   
--   The <tt>invalidateChildren</tt> parameter controls whether the region
--   of each child drawWindow that intersects <tt>region</tt> will also be
--   invalidated. If <tt>False</tt>, then the update area for child
--   drawWindows will remain unaffected.
drawWindowInvalidateRegion :: DrawWindowClass self => self -> Region -> Bool -> IO ()

-- | Ask for the dirty region of this window.
--   
--   <ul>
--   <li>Transfers ownership of the update area from <tt>DrawWindow</tt> to
--   the caller of the function. That is, after calling this function,
--   <tt>DrawWindow</tt> will no longer have an invalid/dirty region; the
--   update area is removed from <tt>DrawWindow</tt> and handed to you. If
--   this window has no update area, <a>drawWindowGetUpdateArea</a> returns
--   <a>Nothing</a>.</li>
--   </ul>
--   
--   Removed in Gtk3.
drawWindowGetUpdateArea :: DrawWindowClass self => self -> IO (Maybe Region)

-- | Temporarily freezes a drawWindow such that it won't receive expose
--   events. * The drawWindow will begin receiving expose events again when
--   <a>drawWindowThawUpdates</a> is called. If
--   <a>drawWindowFreezeUpdates</a> has been called more than once,
--   <a>drawWindowThawUpdates</a> must be called an equal number of times
--   to begin processing exposes.
drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO ()

-- | Thaws a drawWindow frozen with <a>drawWindowFreezeUpdates</a>.
drawWindowThawUpdates :: DrawWindowClass self => self -> IO ()

-- | Sends one or more expose events to <tt>DrawWindow</tt>.
--   
--   <ul>
--   <li>The areas in each expose event will cover the entire update area
--   for the window (see <a>drawWindowInvalidateRegion</a> for details).
--   Normally Gtk calls <a>drawWindowProcessUpdates</a> on your behalf, so
--   there's no need to call this function unless you want to force expose
--   events to be delivered immediately 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.</li>
--   </ul>
drawWindowProcessUpdates :: DrawWindowClass self => self -> Bool -> IO ()

-- | Setting <tt>acceptFocus</tt> to <tt>False</tt> hints the desktop
--   environment that the window doesn't want to receive input focus.
--   
--   On X, it is the responsibility of the drawWindow manager to interpret
--   this hint. ICCCM-compliant drawWindow manager usually respect it.
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
drawWindowSetAcceptFocus :: DrawWindowClass self => self -> Bool -> IO ()

-- | Applies a shape mask to window. Pixels in window corresponding to set
--   bits in the mask will be visible; pixels in window corresponding to
--   unset bits in the mask will be transparent. This gives a
--   non-rectangular window.
--   
--   <ul>
--   <li>If <tt>mask</tt> is <tt>Nothing</tt>, the shape mask will be
--   unset, and the x/y parameters are not used. The <tt>mask</tt> must be
--   a bitmap, that is, a <a>Pixmap</a> of depth one.</li>
--   <li>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. On
--   servers without the shape extension, this function will do nothing. On
--   the Win32 platform the functionality is always present.</li>
--   <li>This function works on both toplevel and child windows.</li>
--   </ul>
drawWindowShapeCombineMask :: DrawWindowClass self => self -> Maybe Pixmap -> Int -> Int -> IO ()

-- | Makes pixels in <tt>DrawWindow</tt> outside <tt>shapeRegion</tt>
--   transparent.
--   
--   <ul>
--   <li>Makes pixels in <tt>DrawWindow</tt> outside <tt>shapeRegion</tt>
--   transparent, so that the window may be nonrectangular.</li>
--   </ul>
--   
--   If <tt>shapeRegion</tt> is <a>Nothing</a>, the shape will be unset, so
--   the whole <a>DrawWindow</a> will be opaque again. The parameters
--   <tt>offsetX</tt> and <tt>offsetY</tt> are ignored if
--   <tt>shapeRegion</tt> is <a>Nothing</a>.
--   
--   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. On servers
--   without the shape extension, this function will do nothing.
--   
--   This function works on both toplevel and child drawWindows.
drawWindowShapeCombineRegion :: DrawWindowClass self => self -> Maybe Region -> Int -> Int -> IO ()

-- | Sets the shape mask of <tt>DrawWindow</tt> to the union of shape masks
--   for all children of <tt>DrawWindow</tt>, ignoring the shape mask of
--   <tt>DrawWindow</tt> itself. Contrast with
--   <a>drawWindowMergeChildShapes</a> which includes the shape mask of
--   <tt>DrawWindow</tt> in the masks to be merged.
drawWindowSetChildShapes :: DrawWindowClass self => self -> IO ()

-- | Merges the shape masks for any child drawWindows into the shape mask
--   for <tt>DrawWindow</tt>. i.e. the union of all masks for
--   <tt>DrawWindow</tt> and its children will become the new mask for
--   <tt>DrawWindow</tt>. See <a>drawWindowShapeCombineMask</a>.
--   
--   This function is distinct from <a>drawWindowSetChildShapes</a> because
--   it includes <tt>DrawWindow</tt>'s shape mask in the set of shapes to
--   be merged.
drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO ()
drawWindowGetPointer :: DrawWindowClass self => self -> IO (Maybe (Bool, Int, Int, [Modifier]))

-- | Obtains the current pointer position and modifier state.
--   
--   <ul>
--   <li>The position is given in coordinates relative to the given
--   window.</li>
--   <li>The return value is <tt>(Just win, x, y, mod)</tt> where
--   <tt>win</tt> is the window over which the mouse currently resides and
--   <tt>mod</tt> denotes the keyboard modifiers currently being
--   depressed.</li>
--   <li>The return value is <tt>Nothing</tt> for the window if the mouse
--   cursor is not over a known window.</li>
--   </ul>
drawWindowGetPointerPos :: DrawWindowClass self => self -> IO (Maybe DrawWindow, Int, Int, [Modifier])

-- | Obtains the position of a window in screen coordinates.
--   
--   You can use this to help convert a position between screen coordinates
--   and local <a>DrawWindow</a> relative coordinates.
drawWindowGetOrigin :: DrawWindow -> IO (Int, Int)

-- | Sets the mouse pointer for a <a>DrawWindow</a>.
--   
--   Use <a>cursorNewForDisplay</a> or <a>cursorNewFromPixmap</a> to create
--   the cursor. To make the cursor invisible, use <a>BlankCursor</a>.
--   Passing <tt>Nothing</tt> means that the <tt>DrawWindow</tt> will use
--   the cursor of its parent <tt>DrawWindow</tt>. Most <tt>DrawWindow</tt>
--   should use this default.
drawWindowSetCursor :: DrawWindow -> Maybe Cursor -> IO ()

-- | Get the handle to an exising window of the windowing system. The
--   passed-in handle is a reference to a native window, that is, an Xlib
--   XID for X windows and a HWND for Win32.
--   
--   Removed in Gtk3.
drawWindowForeignNew :: NativeWindowId -> IO (Maybe DrawWindow)

-- | Obtains the root window (parent all other windows are inside) for the
--   default display and screen.
drawWindowGetDefaultRootWindow :: IO DrawWindow

-- | Returns the width of the window.
--   
--   On the X11 platform the returned size is the size reported in the
--   most-recently-processed configure event, rather than the current size
--   on the X server.
drawWindowGetWidth :: DrawWindow -> IO Int

-- | Returns the height of the window.
--   
--   On the X11 platform the returned size is the size reported in the
--   most-recently-processed configure event, rather than the current size
--   on the X server.
drawWindowGetHeight :: DrawWindow -> IO Int


-- | Routines for handling resource files
module Graphics.UI.Gtk.General.RcStyle
data RcStyle
class GObjectClass o => RcStyleClass o
castToRcStyle :: GObjectClass obj => obj -> RcStyle
gTypeRcStyle :: GType
toRcStyle :: RcStyleClass o => o -> RcStyle

-- | Creates a new <a>RcStyle</a> with no fields set. The <a>RcStyle</a>
--   structure is used to represent a set of information about the
--   appearance of a widget. This can later be composited together with
--   other <a>RcStyle</a> structures to form a <a>Style</a>.
rcStyleNew :: IO RcStyle

-- | Makes a copy of the specified <a>RcStyle</a>. This function will
--   correctly copy an RC style that is a member of a class derived from
--   <a>RcStyle</a>.
rcStyleCopy :: RcStyleClass self => self -> IO RcStyle

-- | Adds a file to the list of files to be parsed at the end of
--   <tt>initGUI</tt>.
rcAddDefaultFile :: GlibString string => string -> IO ()

-- | etrieves the current list of RC files that will be parsed at the end
--   of <tt>initGUI</tt>.
rcGetDefaultFiles :: GlibString string => IO [string]

-- | Obtains the path to the IM modules file. See the documentation of the
--   <tt>GTK_IM_MODULE_FILE</tt> environment variable for more details.
rcGetImModuleFile :: GlibString string => IO string

-- | Returns a directory in which GTK+ looks for theme engines.
rcGetModuleDir :: GlibString string => IO string

-- | Finds all matching RC styles for a given widget, composites them
--   together, and then creates a GtkStyle representing the composite
--   appearance. (GTK+ actually keeps a cache of previously created styles,
--   so a new style may not be created.)
rcGetStyle :: WidgetClass widget => widget -> IO Style

-- | Creates up a <a>Style</a> from styles defined in a RC file by
--   providing the raw components used in matching. This function may be
--   useful when creating pseudo-widgets that should be themed like widgets
--   but don't actually have corresponding GTK+ widgets.
rcGetStyleByPaths :: GlibString string => Settings -> Maybe string -> Maybe string -> GType -> IO Style

-- | Returns the standard directory in which themes should be installed.
--   (GTK+ does not actually use this directory itself.)
rcGetThemeDir :: GlibString string => IO string

-- | Parses a given resource file.
rcParse :: GlibString string => string -> IO ()

-- | Parses resource information directly from a string.
rcParseString :: GlibString string => string -> IO ()

-- | If the modification time on any previously read file for the default
--   <a>Settings</a> has changed, discard all style information and then
--   reread all previously read RC files.
rcReparseAll :: IO Bool

-- | f the modification time on any previously read file for the given
--   <a>Settings</a> has changed, discard all style information and then
--   reread all previously read RC files.
rcReparseAllForSettings :: Settings -> Bool -> IO Bool

-- | This function recomputes the styles for all widgets that use a
--   particular <a>Settings</a> object. (There is one <a>Settings</a>
--   object per <a>Screen</a>, see <tt>settingsGetForScreen</tt>.) It is
--   useful when some global parameter has changed that affects the
--   appearance of all widgets, because when a widget gets a new style, it
--   will both redraw and recompute any cached information about its
--   appearance. As an example, it is used when the default font size set
--   by the operating system changes. Note that this function doesn't
--   affect widgets that have a style set explicitely on them with
--   <tt>widgetSetStyle</tt>.
rcResetStyles :: Settings -> IO ()

-- | Sets the list of files that GTK+ will read at the end of
--   <tt>initGUI</tt>.
rcSetDefaultFiles :: GlibString string => [string] -> IO ()


-- | Customization of widgets.
module Graphics.UI.Gtk.General.Style
data Style
class GObjectClass o => StyleClass o
castToStyle :: GObjectClass obj => obj -> Style
gTypeStyle :: GType
toStyle :: StyleClass o => o -> Style

-- | Retrieve the the foreground color.
--   
--   <ul>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetForeground :: Style -> StateType -> IO Color

-- | Retrieve the background color.
--   
--   <ul>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetBackground :: Style -> StateType -> IO Color

-- | Retrieve a light color.
--   
--   <ul>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetLight :: Style -> StateType -> IO Color

-- | Retrieve a middle color.
--   
--   <ul>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetMiddle :: Style -> StateType -> IO Color

-- | Retrieve a dark color.
--   
--   <ul>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetDark :: Style -> StateType -> IO Color

-- | Retrieve the text color.
--   
--   <ul>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetText :: Style -> StateType -> IO Color

-- | Retrieve the base color.
--   
--   <ul>
--   <li>The base color is the standard text background of a widget.</li>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetBase :: Style -> StateType -> IO Color

-- | Retrieve the color for drawing anti-aliased text.
--   
--   <ul>
--   <li>The anti-aliasing color is the color which is used when the
--   rendering of a character does not make it clear if a certain pixel
--   shoud be set or not. This color is between the text and the base
--   color.</li>
--   <li>The parameter <tt>state</tt> determines for which widget state
--   (one of <a>StateType</a>) the <a>Color</a> should be retrieved. Use
--   <a>widgetGetState</a> to determine the current state of the
--   widget.</li>
--   </ul>
styleGetAntiAliasing :: Style -> StateType -> IO Color
stylePaintFlatBox :: WidgetClass widget => Style -> DrawWindow -> StateType -> ShadowType -> Rectangle -> widget -> String -> Int -> Int -> Int -> Int -> IO ()
stylePaintLayout :: WidgetClass widget => Style -> DrawWindow -> StateType -> Bool -> Rectangle -> widget -> String -> Int -> Int -> PangoLayout -> IO ()


-- | A <a>KeyVal</a> is a numeric value identifying a keyboard key. The
--   defined values can be found at &lt;http: The names of the keys are the
--   names of the macros without the prefix.
module Graphics.UI.Gtk.Gdk.Keys

-- | Key values are the codes which are sent whenever a key is pressed or
--   released.
type KeyVal = Word32
type KeyCode = Word16

-- | Converts a key value into a symbolic name.
keyName :: KeyVal -> DefaultGlibString

-- | Converts a key name to a key value.
keyFromName :: DefaultGlibString -> KeyVal

-- | Convert from a Gdk key symbol to the corresponding Unicode character.
keyToChar :: KeyVal -> Maybe Char
keyvalName :: KeyVal -> IO DefaultGlibString
keyvalFromName :: DefaultGlibString -> IO KeyVal
keyvalToChar :: KeyVal -> IO (Maybe Char)

-- | Obtains the upper- and lower-case versions of the keyval symbol.
--   Examples of keyvals are GDK_a, <tt>Enter</tt>, <tt>F1</tt>, etc.
keyvalConvertCase :: KeyVal -> (KeyVal, KeyVal)

-- | Converts a key value to upper case, if applicable.
keyvalToUpper :: KeyVal -> KeyVal

-- | Converts a key value to lower case, if applicable.
keyvalToLower :: KeyVal -> KeyVal

-- | Returns <a>True</a> if the given key value is in upper case.
keyvalIsUpper :: KeyVal -> Bool

-- | Returns <a>True</a> if the given key value is in upper case.
keyvalIsLower :: KeyVal -> Bool


-- | Types and accessors to examine information in events.
module Graphics.UI.Gtk.Gdk.EventM

-- | A monad providing access to data in an event.
type EventM t = ReaderT (Ptr t) IO

-- | A tag for events that do not carry any event-specific information.
data EAny

-- | A tag for <i>key</i> events.
data EKey

-- | A tag for <i>Button</i> events.
data EButton

-- | A tag for <i>Scroll</i> events.
data EScroll

-- | A tag for <i>Motion</i> events.
data EMotion

-- | A tag for <i>Expose</i> events.
data EExpose

-- | A tag for <i>Visibility</i> events.
data EVisibility

-- | A tag for <i>Crossing</i> events.
data ECrossing

-- | A tag for <i>Focus</i> events.
data EFocus

-- | A tag for <i>Configure</i> events.
data EConfigure

-- | A tag for <i>Property</i> events.
data EProperty

-- | A tag for <i>Proximity</i> events.
data EProximity

-- | A tag for <i>WindowState</i> event.
data EWindowState

-- | A tag for <i>OwnerChange</i> events.
data EOwnerChange

-- | A tag for <i>GrabBroken</i> events.
data EGrabBroken

-- | Retrieve the <a>DrawWindow</a> that this event relates to.
eventWindow :: EventM any DrawWindow

-- | Query if this event was sent sent explicitly by the application
--   (rather than being generated by human interaction).
eventSent :: EventM any Bool

-- | Retrieve the <tt>(x,y)</tt> coordinates of the mouse.
eventCoordinates :: HasCoordinates t => EventM t (Double, Double)

-- | Retrieve the <tt>(x,y)</tt> coordinates of the mouse relative to the
--   root (origin) of the screen.
eventRootCoordinates :: HasRootCoordinates t => EventM t (Double, Double)

-- | Query the modifier keys that were depressed when the event happened.
--   Sticky modifiers such as CapsLock are omitted in the return value. Use
--   <a>eventModifierAll</a> your application requires all modifiers. Use
--   <a>eventModifierMouse</a> if you just need the mouse buttons.
eventModifier :: HasModifier t => EventM t [Modifier]

-- | Query the modifier keys that were depressed when the event happened.
--   The result includes sticky modifiers such as CapsLock. Normally,
--   <a>eventModifier</a> is more appropriate in applications.
eventModifierAll :: HasModifier t => EventM t [Modifier]

-- | Query the mouse buttons that were depressed when the event happened.
eventModifierMouse :: HasModifier t => EventM t [Modifier]

-- | Query the time when the event occurred.
eventTime :: HasTime t => EventM t TimeStamp

-- | The key value. See <a>KeyVal</a>.
eventKeyVal :: EventM EKey KeyVal

-- | The key value as a string. See <a>KeyVal</a>.
eventKeyName :: EventM EKey DefaultGlibString

-- | The hardware key code.
eventHardwareKeycode :: EventM EKey KeyCode

-- | The keyboard group.
eventKeyboardGroup :: EventM EKey Word8
data MouseButton
[LeftButton] :: MouseButton
[MiddleButton] :: MouseButton
[RightButton] :: MouseButton
[OtherButton] :: Int -> MouseButton

-- | Query the mouse buttons.
eventButton :: EventM EButton MouseButton

-- | Type of mouse click
data Click
[SingleClick] :: Click
[DoubleClick] :: Click
[TripleClick] :: Click
[ReleaseClick] :: Click
eventClick :: EventM EButton Click

-- | in which direction was scrolled?
data ScrollDirection
[ScrollUp] :: ScrollDirection
[ScrollDown] :: ScrollDirection
[ScrollLeft] :: ScrollDirection
[ScrollRight] :: ScrollDirection

-- | Query the direction of scrolling.
eventScrollDirection :: EventM EScroll ScrollDirection

-- | Check if the motion event is only a hint rather than the full mouse
--   movement information.
eventIsHint :: EventM EMotion Bool

-- | Request more motion notifies if this event is a motion notify hint
--   event.
--   
--   This action should be used instead of <tt>drawWindowGetPointer</tt> to
--   request further motion notifies, because it also works for extension
--   events where motion notifies are provided for devices other than the
--   core pointer.
--   
--   Coordinate extraction, processing and requesting more motion events
--   from a <tt>motionNotifyEvent</tt> usually works like this:
--   
--   <pre>
--   on widget motionNotifyEvent $ do
--     (x, y) &lt;- eventCoordinates
--     -- handle the x,y motion:
--     ...
--     -- finally, notify that we are ready to get more motion events:
--     eventRequestMotions
--   </pre>
eventRequestMotions :: EventM EMotion ()

-- | Query a bounding box of the region that needs to be updated.
eventArea :: EventM EExpose Rectangle

-- | Query the region that needs to be updated. Removed in Gtk3.
eventRegion :: EventM EExpose Region
data VisibilityState
[VisibilityUnobscured] :: VisibilityState
[VisibilityPartialObscured] :: VisibilityState
[VisibilityFullyObscured] :: VisibilityState

-- | Get the visibility status of a window.
eventVisibilityState :: EventM EVisibility VisibilityState

-- | How focus is crossing the widget.
data CrossingMode
[CrossingNormal] :: CrossingMode
[CrossingGrab] :: CrossingMode
[CrossingUngrab] :: CrossingMode
[CrossingGtkGrab] :: CrossingMode
[CrossingGtkUngrab] :: CrossingMode
[CrossingStateChanged] :: CrossingMode

-- | Get the mode of the mouse cursor crossing a window.
eventCrossingMode :: EventM ECrossing CrossingMode

-- | Information on from what level of the widget hierarchy the mouse
--   cursor came.
--   
--   <ul>
--   <li><i><a>NotifyAncestor</a></i> The window is entered from an
--   ancestor or left towards an ancestor.</li>
--   <li><i><a>NotifyVirtual</a></i> The pointer moves between an ancestor
--   and an inferior of the window.</li>
--   <li><i><a>NotifyInferior</a></i> The window is entered from an
--   inferior or left towards an inferior.</li>
--   <li><i><a>NotifyNonlinear</a></i> The window is entered from or left
--   towards a window which is neither an ancestor nor an inferior.</li>
--   <li><i><a>NotifyNonlinearVirtual</a></i> The pointer moves between two
--   windows which are not ancestors of each other and the window is part
--   of the ancestor chain between one of these windows and their least
--   common ancestor.</li>
--   <li><i><a>NotifyUnknown</a></i> The level change does not fit into any
--   of the other categories or could not be determined.</li>
--   </ul>
data NotifyType
[NotifyAncestor] :: NotifyType
[NotifyVirtual] :: NotifyType
[NotifyInferior] :: NotifyType
[NotifyNonlinear] :: NotifyType
[NotifyNonlinearVirtual] :: NotifyType
[NotifyUnknown] :: NotifyType

-- | Get the notify type of the mouse cursor crossing a window.
eventNotifyType :: EventM ECrossing NotifyType

-- | Query if the window has the focus or is an inferior window.
eventCrossingFocus :: EventM ECrossing Bool

-- | Query if a window gained focus (<tt>True</tt>) or lost the focus
--   (<tt>False</tt>).
eventFocusIn :: EventM EFocus Bool

-- | Get the <tt>(x,y)</tt> position of the window within the parent
--   window.
eventPosition :: EventM EConfigure (Int, Int)

-- | Get the new size of the window as <tt>(width,height)</tt>.
eventSize :: EventM EConfigure (Int, Int)
eventProperty :: EventM EProperty Atom

-- | The state a <tt>DrawWindow</tt> is in.
data WindowState
[WindowStateWithdrawn] :: WindowState
[WindowStateIconified] :: WindowState
[WindowStateMaximized] :: WindowState
[WindowStateSticky] :: WindowState
[WindowStateFullscreen] :: WindowState
[WindowStateAbove] :: WindowState
[WindowStateBelow] :: WindowState

-- | Query which window state bits have changed.
eventWindowStateChanged :: EventM EWindowState [WindowState]

-- | Query the new window state.
eventWindowState :: EventM EWindowState [WindowState]
data OwnerChange
[OwnerChangeNewOwner] :: OwnerChange
[OwnerChangeDestroy] :: OwnerChange
[OwnerChangeClose] :: OwnerChange

-- | Query why a seleciton changed its owner.
eventChangeReason :: EventM EOwnerChange OwnerChange

-- | Query what selection changed its owner.
eventSelection :: EventM EOwnerChange SelectionTag

-- | Query the time when the selection was taken over.
eventSelectionTime :: EventM EOwnerChange TimeStamp

-- | Check if a keyboard (<tt>True</tt>) or a mouse pointer grap
--   (<tt>False</tt>) was broken.
eventKeyboardGrab :: EventM EGrabBroken Bool

-- | Check if a grab was broken implicitly.
eventImplicit :: EventM EGrabBroken Bool

-- | Get the new window that owns the grab or <tt>Nothing</tt> if the
--   window is not part of this application.
eventGrabWindow :: EventM EGrabBroken (Maybe DrawWindow)

-- | Keyboard modifiers that are depressed when the user presses a key or a
--   mouse button.
--   
--   <ul>
--   <li>This data type is used to build lists of modifers that were active
--   during an event.</li>
--   <li>The <a>Apple</a> key on Macintoshs is mapped to <a>Alt2</a> and
--   the <a>Meta</a> key (if available).</li>
--   <li>Since Gtk 2.10, there are also <a>Super</a>, <a>Hyper</a> and
--   <a>Meta</a> modifiers which are simply generated from <a>Alt</a> ..
--   <tt>Compose</tt> modifier keys, depending on the mapping used by the
--   windowing system. Due to one key being mapped to e.g. <a>Alt2</a> and
--   <a>Meta</a>, you shouldn't pattern match directly against a certain
--   key but check whether a key is in the list using the <a>elem</a>
--   function, say.</li>
--   </ul>
data Modifier
[Shift] :: Modifier
[Lock] :: Modifier
[Control] :: Modifier
[Alt] :: Modifier
[Alt2] :: Modifier
[Alt3] :: Modifier
[Alt4] :: Modifier
[Alt5] :: Modifier
[Button1] :: Modifier
[Button2] :: Modifier
[Button3] :: Modifier
[Button4] :: Modifier
[Button5] :: Modifier
[Super] :: Modifier
[Hyper] :: Modifier
[Meta] :: Modifier
[Release] :: Modifier
[ModifierMask] :: Modifier

-- | The time (in milliseconds) when an event happened. This is used mostly
--   for ordering events and responses to events.
type TimeStamp = Word32

-- | Represents the current time, and can be used anywhere a time is
--   expected.
currentTime :: TimeStamp

-- | Execute an event handler and assume it handled the event unless it
--   threw a pattern match exception or calls mzero (e.g. via guard).
tryEvent :: EventM any () -> EventM any Bool

-- | Explicitly stop the handling of an event. This function should only be
--   called inside a handler that is wrapped with <a>tryEvent</a>. (It
--   merely throws a bogus pattern matching error which <a>tryEvent</a>
--   interprets as if the handler does not handle the event.)
stopEvent :: EventM any ()
instance HasCoordinates EButton
instance HasCoordinates EScroll
instance HasCoordinates EMotion
instance HasCoordinates ECrossing
instance HasRootCoordinates EButton
instance HasRootCoordinates EScroll
instance HasRootCoordinates EMotion
instance HasRootCoordinates ECrossing
instance HasModifier EKey
instance HasModifier EButton
instance HasModifier EScroll
instance HasModifier EMotion
instance HasModifier ECrossing
instance HasTime EKey
instance HasTime EButton
instance HasTime EScroll
instance HasTime EMotion
instance HasTime ECrossing
instance HasTime EProperty
instance HasTime EProximity
instance HasTime EOwnerChange


module Graphics.UI.Gtk.Gdk.AppLaunchContext
data AppLaunchContext
class GObjectClass o => AppLaunchContextClass o
castToAppLaunchContext :: GObjectClass obj => obj -> AppLaunchContext
gTypeAppLaunchContext :: GType
toAppLaunchContext :: AppLaunchContextClass o => o -> AppLaunchContext

-- | Creates a new <a>AppLaunchContext</a>.
appLaunchContextNew :: IO AppLaunchContext

-- | Sets the display on which applications will be launched when using
--   this context. See also <a>appLaunchContextSetScreen</a>.
appLaunchContextSetDisplay :: AppLaunchContext -> Display -> IO ()

-- | Sets the screen on which applications will be launched when using this
--   context. See also <a>appLaunchContextSetDisplay</a>.
--   
--   If both screen and display are set, the screen takes priority. If
--   neither screen or display are set, the default screen and display are
--   used.
appLaunchContextSetScreen :: AppLaunchContext -> Screen -> IO ()

-- | Sets the workspace on which applications will be launched when using
--   this context when running under a window manager that supports
--   multiple workspaces, as described in the Extended Window Manager
--   Hints.
--   
--   When the workspace is not specified or desktop is set to -1, it is up
--   to the window manager to pick one, typically it will be the current
--   workspace.
appLaunchContextSetDesktop :: AppLaunchContext -> Int -> IO ()

-- | Sets the timestamp of context. The timestamp should ideally be taken
--   from the event that triggered the launch.
--   
--   Window managers can use this information to avoid moving the focus to
--   the newly launched application when the user is busy typing in another
--   window. This is also known as 'focus stealing prevention'.
appLaunchContextSetTimestamp :: AppLaunchContext -> TimeStamp -> IO ()

-- | Sets the icon for applications that are launched with this context.
--   The <tt>iconName</tt> will be interpreted in the same way as the Icon
--   field in desktop files. See also <tt>appLaunchContextSetIcon</tt>.
--   
--   If both icon and <tt>iconName</tt> are set, the <tt>iconName</tt>
--   takes priority. If neither icon or <tt>iconName</tt> is set, the icon
--   is taken from either the file that is passed to launched application
--   or from the GAppInfo for the launched application itself.
appLaunchContextSetIconName :: GlibString string => AppLaunchContext -> string -> IO ()


-- | Controls the keyboard/mouse/monitors combination.
--   
--   <ul>
--   <li>Module available since Gdk version 2.2</li>
--   </ul>
module Graphics.UI.Gtk.Gdk.Display
data Display
class GObjectClass o => DisplayClass o
castToDisplay :: GObjectClass obj => obj -> Display
gTypeDisplay :: GType
toDisplay :: DisplayClass o => o -> Display

-- | Opens a display.
displayOpen :: GlibString string => string -> IO (Maybe Display)

-- | Gets the default <a>Display</a>. This is a convenience function for
--   <tt>displayManagerGetDefaultDisplay displayManagerGet</tt>.
displayGetDefault :: IO (Maybe Display)

-- | Gets the name of the display.
displayGetName :: GlibString string => Display -> IO string

-- | Gets the number of screen managed by the <tt>display</tt>.
displayGetNScreens :: Display -> IO Int

-- | Returns a screen object for one of the screens of the display.
displayGetScreen :: Display -> Int -> IO Screen

-- | Get the default <a>Screen</a> for <tt>display</tt>.
displayGetDefaultScreen :: Display -> IO Screen

-- | Release any pointer grab.
displayPointerUngrab :: Display -> TimeStamp -> IO ()

-- | Release any keyboard grab
displayKeyboardUngrab :: Display -> TimeStamp -> IO ()

-- | Test if the pointer is grabbed.
displayPointerIsGrabbed :: Display -> IO Bool

-- | Emits a short beep on <tt>display</tt>
displayBeep :: Display -> IO ()

-- | Flushes any requests queued for the windowing system and waits until
--   all requests have been handled. This is often used for making sure
--   that the display is synchronized with the current state of the
--   program. Calling <a>displaySync</a> before <tt>errorTrapPop</tt> makes
--   sure that any errors generated from earlier requests are handled
--   before the error trap is removed.
--   
--   This is most useful for X11. On windowing systems where requests are
--   handled synchronously, this function will do nothing.
displaySync :: Display -> IO ()

-- | Flushes any requests queued for the windowing system; this happens
--   automatically when the main loop blocks waiting for new events, but if
--   your application is drawing without returning control to the main
--   loop, you may need to call this function explicitely. A common case
--   where this function needs to be called is when an application is
--   executing drawing commands from a thread other than the thread where
--   the main loop is running.
--   
--   This is most useful for X11. On windowing systems where requests are
--   handled synchronously, this function will do nothing.
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
displayFlush :: Display -> IO ()

-- | Closes the connection to the windowing system for the given display,
--   and cleans up associated resources.
displayClose :: Display -> IO ()

-- | Returns the list of available input devices attached to
--   <tt>display</tt>.
displayListDevices :: Display -> IO [Device]

-- | Sets the double click time (two clicks within this time interval count
--   as a double click and result in an <a>eventButton</a> where
--   <a>eventClick</a> is <a>DoubleClick</a>). Applications should
--   <i>not</i> set this, it is a global user-configured setting.
displaySetDoubleClickTime :: Display -> Int -> IO ()

-- | Sets the double click distance (two clicks within this distance count
--   as a double click and result in an <a>eventButton</a> where
--   <a>eventClick</a> is <a>DoubleClick</a>). See also
--   <a>displaySetDoubleClickTime</a>. Applications should <i>not</i> set
--   this, it is a global user-configured setting.
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
displaySetDoubleClickDistance :: Display -> Int -> IO ()

-- | Gets the current location of the pointer and the current modifier mask
--   for a given display.
displayGetPointer :: Display -> IO (Screen, [Modifier], Int, Int)

-- | Obtains the window underneath the mouse pointer, returning the
--   location of the pointer in that window in <tt>winX</tt>, <tt>winY</tt>
--   for <tt>screen</tt>. Returns <tt>Nothing</tt> if the window under the
--   mouse pointer is not known to GDK (for example, belongs to another
--   application).
displayGetWindowAtPointer :: Display -> IO (Maybe (DrawWindow, Int, Int))

-- | Moves the pointer of <tt>display</tt> to the point
--   <tt>x</tt>,<tt>y</tt> on the screen <tt>screen</tt>, unless the
--   pointer is confined to a window by a grab, in which case it will be
--   moved as far as allowed by the grab. Warping the pointer creates
--   events as if the user had moved the mouse instantaneously to the
--   destination.
--   
--   Note that the pointer should normally be under the control of the
--   user. This function was added to cover some rare use cases like
--   keyboard navigation support for the color picker in the
--   <a>ColorSelectionDialog</a>.
--   
--   <ul>
--   <li>Available since Gdk version 2.8</li>
--   </ul>
displayWarpPointer :: Display -> Screen -> Int -> Int -> IO ()

-- | Returns <tt>True</tt> if multicolored cursors are supported on
--   <tt>display</tt>. Otherwise, cursors have only a forground and a
--   background color.
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
displaySupportsCursorColor :: Display -> IO Bool

-- | Returns <tt>True</tt> if cursors can use an 8bit alpha channel on
--   <tt>display</tt>. Otherwise, cursors are restricted to bilevel alpha
--   (i.e. a mask).
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
displaySupportsCursorAlpha :: Display -> IO Bool

-- | Returns the default size to use for cursors on <tt>display</tt>.
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
displayGetDefaultCursorSize :: Display -> IO Int

-- | Gets the maximal size to use for cursors on <tt>display</tt>.
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
displayGetMaximalCursorSize :: Display -> IO (Int, Int)

-- | Returns the default group leader window for all toplevel windows on
--   <tt>display</tt>. This window is implicitly created by GDK. See
--   <tt>windowSetGroup</tt>.
--   
--   <ul>
--   <li>Available since Gdk version 2.4</li>
--   </ul>
displayGetDefaultGroup :: Display -> IO DrawWindow

-- | Returns whether <a>EOwnerChange</a> events will be sent when the owner
--   of a selection changes.
--   
--   <ul>
--   <li>Available since Gdk version 2.6</li>
--   </ul>
displaySupportsSelectionNotification :: Display -> IO Bool

-- | Request <a>EOwnerChange</a> events for ownership changes of the
--   selection named by the given atom.
--   
--   <ul>
--   <li>Available since Gdk version 2.6</li>
--   </ul>
displayRequestSelectionNotification :: Display -> SelectionTag -> IO Bool

-- | Returns whether the speicifed display supports clipboard persistance;
--   i.e. if it's possible to store the clipboard data after an application
--   has quit. On X11 this checks if a clipboard daemon is running.
--   
--   <ul>
--   <li>Available since Gdk version 2.6</li>
--   </ul>
displaySupportsClipboardPersistence :: Display -> IO Bool

-- | Issues a request to the clipboard manager to store the clipboard data.
--   On X11, this is a special program that works according to the
--   freedesktop clipboard specification, available at
--   http://www.freedesktop.org/Standards/clipboard-manager-spec.
--   
--   <ul>
--   <li>Available since Gdk version 2.6</li>
--   </ul>
displayStoreClipboard :: Display -> DrawWindow -> Word32 -> (Maybe [TargetTag]) -> IO ()

-- | Returns <tt>True</tt> if <tt>windowShapeCombineMask</tt> can be used
--   to create shaped windows on <tt>display</tt>.
--   
--   <ul>
--   <li>Available since Gdk version 2.10</li>
--   </ul>
displaySupportsShapes :: Display -> IO Bool

-- | Returns <tt>True</tt> if <tt>windowInputShapeCombineMask</tt> can be
--   used to modify the input shape of windows on <tt>display</tt>.
--   
--   <ul>
--   <li>Available since Gdk version 2.10</li>
--   </ul>
displaySupportsInputShapes :: Display -> IO Bool

-- | Returns <tt>True</tt> if <tt>windowSetComposited</tt> can be used to
--   redirect drawing on the window using compositing.
--   
--   Currently this only works on X11 with XComposite and XDamage
--   extensions available.
--   
--   <ul>
--   <li>Available since Gdk version 2.12</li>
--   </ul>
displaySupportsComposite :: Display -> IO Bool

-- | The <a>displayClosed</a> signal is emitted when the connection to the
--   windowing system for <tt>display</tt> is closed.
displayClosed :: DisplayClass self => Signal self (Bool -> IO ())


-- | A single line text entry field
module Graphics.UI.Gtk.Entry.Entry
data Entry
class WidgetClass o => EntryClass o
castToEntry :: GObjectClass obj => obj -> Entry
gTypeEntry :: GType
toEntry :: EntryClass o => o -> Entry

-- | Creates a new <a>Entry</a> widget.
entryNew :: IO Entry

-- | Creates a new <a>Entry</a> widget backed by a particular
--   <a>EntryBuffer</a>. One buffer can be shared among many widgets.
entryNewWithBuffer :: EntryBufferClass buffer => buffer -> IO Entry

-- | Sets the text in the widget to the given value, replacing the current
--   contents.
entrySetText :: (EntryClass self, GlibString string) => self -> string -> IO ()

-- | Retrieves the contents of the entry widget. See also
--   <a>editableGetChars</a>.
entryGetText :: (EntryClass self, GlibString string) => self -> IO string

-- | Appends the given text to the contents of the widget.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
entryAppendText :: (EntryClass self, GlibString string) => self -> string -> IO ()

-- | Prepends the given text to the contents of the widget.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
entryPrependText :: (EntryClass self, GlibString string) => self -> string -> IO ()

-- | Sets whether the contents of the entry are visible or not. When
--   visibility is set to <tt>False</tt>, characters are displayed as the
--   invisible char, and will also appear that way when the text in the
--   entry widget is copied elsewhere.
--   
--   The default invisible char is the asterisk '*', but it can be changed
--   with <a>entrySetInvisibleChar</a>.
entrySetVisibility :: EntryClass self => self -> Bool -> IO ()

-- | Retrieves whether the text in <tt>entry</tt> is visible. See
--   <a>entrySetVisibility</a>.
entryGetVisibility :: EntryClass self => self -> IO Bool

-- | Sets the character to use in place of the actual text when
--   <a>entrySetVisibility</a> has been called to set text visibility to
--   <tt>False</tt>. i.e. this is the character used in "password mode" to
--   show the user how many characters have been typed. The default
--   invisible char is an asterisk ('*'). If you set the invisible char to
--   <tt>'\0'</tt>, then the user will get no feedback at all; there will
--   be no text on the screen as they type.
entrySetInvisibleChar :: EntryClass self => self -> Char -> IO ()

-- | Retrieves the character displayed in place of the real characters for
--   entries with visisbility set to false. See
--   <a>entrySetInvisibleChar</a>.
entryGetInvisibleChar :: EntryClass self => self -> IO Char

-- | Sets the maximum allowed length of the contents of the widget. If the
--   current contents are longer than the given length, then they will be
--   truncated to fit.
entrySetMaxLength :: EntryClass self => self -> Int -> IO ()

-- | Retrieves the maximum allowed length of the text in <tt>entry</tt>.
--   See <a>entrySetMaxLength</a>.
entryGetMaxLength :: EntryClass self => self -> IO Int

-- | Query whether pressing return will activate the default widget.
entryGetActivatesDefault :: EntryClass self => self -> IO Bool

-- | If <tt>setting</tt> is <tt>True</tt>, pressing Enter in the
--   <tt>entry</tt> will activate the default widget for the window
--   containing the entry. This usually means that the dialog box
--   containing the entry will be closed, since the default widget is
--   usually one of the dialog buttons.
--   
--   (For experts: if <tt>setting</tt> is <tt>True</tt>, the entry calls
--   <a>windowActivateDefault</a> on the window containing the entry, in
--   the default handler for the "activate" signal.)
--   
--   This setting is useful in <a>Dialog</a> boxes where enter should press
--   the default button.
entrySetActivatesDefault :: EntryClass self => self -> Bool -> IO ()

-- | Query if the text <a>Entry</a> is displayed with a frame around it.
entryGetHasFrame :: EntryClass self => self -> IO Bool

-- | Sets whether the entry has a beveled frame around it.
entrySetHasFrame :: EntryClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>entrySetWidthChars</a>.
entryGetWidthChars :: EntryClass self => self -> IO Int

-- | Changes the size request of the entry to be about the right size for
--   <tt>nChars</tt> characters. Note that it changes the size
--   <i>request</i>, the size can still be affected by how you pack the
--   widget into containers. If <tt>nChars</tt> is -1, the size reverts to
--   the default entry size.
--   
--   This setting is only considered when the widget formulates its size
--   request. Make sure that it is not mapped (shown) before you change
--   this value.
entrySetWidthChars :: EntryClass self => self -> Int -> IO ()

-- | Sets the alignment for the contents of the entry. This controls the
--   horizontal positioning of the contents when the displayed text is
--   shorter than the width of the entry.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
entrySetAlignment :: EntryClass self => self -> Float -> IO ()

-- | Gets the value set by <a>entrySetAlignment</a>.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
entryGetAlignment :: EntryClass self => self -> IO Float

-- | Sets the auxiliary completion object to use with the entry. All
--   further configuration of the completion mechanism is done on
--   completion using the <a>EntryCompletion</a> API.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
entrySetCompletion :: EntryClass self => self -> EntryCompletion -> IO ()

-- | Returns the auxiliary completion object currently in use by the entry.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
entryGetCompletion :: EntryClass self => self -> IO EntryCompletion

-- | Get the <a>EntryBuffer</a> object which holds the text for this
--   widget.
entryGetBuffer :: EntryClass self => self -> IO EntryBuffer

-- | Set the <a>EntryBuffer</a> object which holds the text for this
--   widget.
entrySetBuffer :: (EntryClass self, EntryBufferClass buffer) => self -> buffer -> IO ()

-- | Returns the <a>Window</a> which contains the entry's icon at
--   <tt>iconPos</tt>. This function is useful when drawing something to
--   the entry in an <tt>eventExpose</tt> callback because it enables the
--   callback to distinguish between the text window and entry's icon
--   windows.
--   
--   See also <a>entryGetTextWindow</a>. Removed in Gtk3.
entryGetIconWindow :: EntryClass self => self -> EntryIconPosition -> IO DrawWindow

-- | Returns the <a>Window</a> which contains the text. This function is
--   useful when drawing something to the entry in an <tt>eventExpose</tt>
--   callback because it enables the callback to distinguish between the
--   text window and entry's icon windows.
--   
--   See also <a>entryGetIconWindow</a>. Removed in Gtk3.
entryGetTextWindow :: EntryClass self => self -> IO DrawWindow

-- | Allow the <a>Entry</a> input method to internally handle key press and
--   release events. If this function returns <a>True</a>, then no further
--   processing should be done for this key event. See
--   <tt>imContextFilterKeypress</tt>.
--   
--   Note that you are expected to call this function from your handler
--   when overriding key event handling. This is needed in the case when
--   you need to insert your own key handling between the input method and
--   the default key event handling of the <a>Entry</a>. See
--   <tt>textViewResetImContext</tt> for an example of use.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
entryImContextFilterKeypress :: EntryClass self => self -> EventM EKey Bool

-- | Reset the input method context of the entry if needed.
--   
--   This can be necessary in the case where modifying the buffer would
--   confuse on-going input method behavior.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
entryResetImContext :: EntryClass self => self -> IO ()

-- | The current position of the insertion cursor in chars.
--   
--   Allowed values: [0,65535]
--   
--   Default value: 0
entryCursorPosition :: EntryClass self => ReadAttr self Int

-- | The position of the opposite end of the selection from the cursor in
--   chars.
--   
--   Allowed values: [0,65535]
--   
--   Default value: 0
entrySelectionBound :: EntryClass self => ReadAttr self Int

-- | Whether the entry contents can be edited.
--   
--   Default value: <tt>True</tt>
entryEditable :: EntryClass self => Attr self Bool

-- | Maximum number of characters for this entry. Zero if no maximum.
--   
--   Allowed values: [0,65535]
--   
--   Default value: 0
entryMaxLength :: EntryClass self => Attr self Int

-- | <tt>False</tt> displays the "invisible char" instead of the actual
--   text (password mode).
--   
--   Default value: <tt>True</tt>
entryVisibility :: EntryClass self => Attr self Bool

-- | <tt>False</tt> removes outside bevel from entry.
--   
--   Default value: <tt>True</tt>
entryHasFrame :: EntryClass self => Attr self Bool

-- | The character to use when masking entry contents (in "password mode").
--   
--   Default value: '*'
entryInvisibleChar :: EntryClass self => Attr self Char

-- | Whether to activate the default widget (such as the default button in
--   a dialog) when Enter is pressed.
--   
--   Default value: <tt>False</tt>
entryActivatesDefault :: EntryClass self => Attr self Bool

-- | Number of characters to leave space for in the entry.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
entryWidthChars :: EntryClass self => Attr self Int

-- | Number of pixels of the entry scrolled off the screen to the left.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
entryScrollOffset :: EntryClass self => ReadAttr self Int

-- | The contents of the entry.
--   
--   Default value: ""
entryText :: (EntryClass self, GlibString string) => Attr self string

-- | The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL
--   layouts.
--   
--   Allowed values: [0,1]
--   
--   Default value: 0
entryXalign :: EntryClass self => Attr self Float

-- | 'alignment' property. See <a>entryGetAlignment</a> and
--   <a>entrySetAlignment</a>
entryAlignment :: EntryClass self => Attr self Float

-- | 'completion' property. See <a>entryGetCompletion</a> and
--   <a>entrySetCompletion</a>
entryCompletion :: EntryClass self => Attr self EntryCompletion

-- | The buffer being displayed.
entryBuffer :: (EntryClass self, EntryBufferClass buffer) => ReadWriteAttr self EntryBuffer buffer

-- | A keybinding signal which gets emitted when the user activates the
--   entry.
--   
--   Applications should not connect to it, but may emit it with
--   <tt>signalEmitByName</tt> if they need to control activation
--   programmatically.
entryActivated :: EntryClass ec => Signal ec (IO ())

-- | Deprecated. See <a>entryActivated</a>.
entryActivate :: EntryClass ec => Signal ec (IO ())

-- | The <a>entryBackspace</a> signal is a keybinding signal which gets
--   emitted when the user asks for it.
--   
--   The default bindings for this signal are Backspace and
--   Shift-Backspace.
entryBackspace :: EntryClass ec => Signal ec (IO ())

-- | The <a>entryCopyClipboard</a> signal is a keybinding signal which gets
--   emitted to copy the selection to the clipboard.
--   
--   The default bindings for this signal are Ctrl-c and Ctrl-Insert.
entryCopyClipboard :: EntryClass ec => Signal ec (IO ())

-- | The <a>entryCutClipboard</a> signal is a keybinding signal which gets
--   emitted to cut the selection to the clipboard.
--   
--   The default bindings for this signal are Ctrl-x and Shift-Delete.
entryCutClipboard :: EntryClass ec => Signal ec (IO ())

-- | The <a>entryPasteClipboard</a> signal is a keybinding signal which
--   gets emitted to paste the contents of the clipboard into the text
--   view.
--   
--   The default bindings for this signal are Ctrl-v and Shift-Insert.
entryPasteClipboard :: EntryClass ec => Signal ec (IO ())

-- | The <a>entryDeleteFromCursor</a> signal is a keybinding signal which
--   gets emitted when the user initiates a text deletion.
--   
--   If the type is <a>DeleteChars</a>, GTK+ deletes the selection if there
--   is one, otherwise it deletes the requested number of characters.
--   
--   The default bindings for this signal are Delete for deleting a
--   character and Ctrl-Delete for deleting a word.
entryDeleteFromCursor :: EntryClass ec => Signal ec (DeleteType -> Int -> IO ())

-- | The <a>entryInsertAtCursor</a> signal is a keybinding signal which
--   gets emitted when the user initiates the insertion of a fixed string
--   at the cursor.
entryInsertAtCursor :: (EntryClass ec, GlibString string) => Signal ec (string -> IO ())

-- | The <a>entryMoveCursor</a> signal is a keybinding signal which gets
--   emitted when the user initiates a cursor movement. If the cursor is
--   not visible in entry, this signal causes the viewport to be moved
--   instead.
--   
--   Applications should not connect to it, but may emit it with
--   <tt>signalEmitByName</tt> if they need to control the cursor
--   programmatically.
--   
--   The default bindings for this signal come in two variants, the variant
--   with the Shift modifier extends the selection, the variant without the
--   Shift modifer does not. There are too many key combinations to list
--   them all here.
--   
--   <ul>
--   <li>Arrow keys move by individual characters/lines</li>
--   <li>Ctrl-arrow key combinations move by words/paragraphs</li>
--   <li>Home/End keys move to the ends of the buffer</li>
--   </ul>
entryMoveCursor :: EntryClass ec => Signal ec (MovementStep -> Int -> Bool -> IO ())

-- | The <a>entryPopulatePopup</a> signal gets emitted before showing the
--   context menu of the entry.
--   
--   If you need to add items to the context menu, connect to this signal
--   and append your menuitems to the menu.
entryPopulatePopup :: EntryClass ec => Signal ec (Menu -> IO ())

-- | The <tt>entryToggleOverwrite</tt> signal is a keybinding signal which
--   gets emitted to toggle the overwrite mode of the entry.
--   
--   The default bindings for this signal is Insert.
entryToggleOverwirte :: EntryClass ec => Signal ec (IO ())

-- | If an input method is used, the typed text will not immediately be
--   committed to the buffer. So if you are interested in the text, connect
--   to this signal.
entryPreeditChanged :: (EntryClass ec, GlibString string) => Signal ec (string -> IO ())

-- | The <tt>iconPress</tt> signal is emitted when an activatable icon is
--   clicked.
entryIconPress :: EntryClass ec => Signal ec (EntryIconPosition -> EventM EButton ())

-- | The <tt>iconRelease</tt> signal is emitted on the button release from
--   a mouse click over an activatable icon.
entryIconRelease :: EntryClass ec => Signal ec (EntryIconPosition -> EventM EButton ())

-- | Emitted when the user presses return within the <a>Entry</a> field.
onEntryActivate :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the user presses return within the <a>Entry</a> field.
afterEntryActivate :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the current selection has been copied to the clipboard.
onCopyClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the current selection has been copied to the clipboard.
afterCopyClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the current selection has been cut to the clipboard.
onCutClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the current selection has been cut to the clipboard.
afterCutClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the current selection has been pasted from the clipboard.
onPasteClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the current selection has been pasted from the clipboard.
afterPasteClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the user changes from overwriting to inserting.
onToggleOverwrite :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)

-- | Emitted when the user changes from overwriting to inserting.
afterToggleOverwrite :: EntryClass ec => ec -> IO () -> IO (ConnectId ec)
instance EditableClass Entry


-- | Interface for widgets which can are used for editing cells
module Graphics.UI.Gtk.ModelView.CellEditable
data CellEditable
class GObjectClass o => CellEditableClass o
castToCellEditable :: GObjectClass obj => obj -> CellEditable
toCellEditable :: CellEditableClass o => o -> CellEditable

-- | Begins editing on a <tt>cellEditable</tt>. <tt>event</tt> is the
--   <tt>Event</tt> that began the editing process.
cellEditableStartEditing :: CellEditableClass self => self -> EventM EAny ()

-- | Emits the <a>cellEditableEditingDone</a> signal.
cellEditableEmitEditingDone :: CellEditableClass self => self -> IO ()

-- | Emits the <a>cellEditableRemoveWidget</a> signal.
cellEditableEmitRemoveWidget :: CellEditableClass self => self -> IO ()

-- | Indicates whether editing on the cell has been canceled.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.20</li>
--   </ul>
cellEditableEditingCanceled :: CellEditableClass self => Attr self Bool

-- | This signal is a sign for the cell renderer to update its value from
--   the <tt>cellEditable</tt>.
--   
--   Implementations of <a>CellEditable</a> are responsible for emitting
--   this signal when they are done editing, e.g. <a>Entry</a> is emitting
--   it when the user presses Enter.
--   
--   <a>cellEditableEmitEditingDone</a> is a convenience method for
--   emitting ::editing-done.
cellEditableEditingDone :: CellEditableClass self => Signal self (IO ())

-- | This signal is meant to indicate that the cell is finished editing,
--   and the widget may now be destroyed.
--   
--   Implementations of <a>CellEditable</a> are responsible for emitting
--   this signal when they are done editing. It must be emitted after the
--   <a>cellEditableEditingDone</a> signal, to give the cell renderer a
--   chance to update the cell's value before the widget is removed.
--   
--   <a>cellEditableEmitRemoveWidget</a> is a convenience method for
--   emitting ::remove-widget.
cellEditableRemoveWidget :: CellEditableClass self => Signal self (IO ())


-- | Base class for input method contexts
module Graphics.UI.Gtk.Abstract.IMContext
data IMContext
class ObjectClass o => IMContextClass o
castToIMContext :: GObjectClass obj => obj -> IMContext
gTypeIMContext :: GType
toIMContext :: IMContextClass o => o -> IMContext

-- | Set the client window for the input context; this is the
--   <a>DrawWindow</a> in which the input appears. This window is used in
--   order to correctly position status windows, and may also be used for
--   purposes internal to the input method.
imContextSetClientWindow :: IMContextClass self => self -> Maybe DrawWindow -> IO ()

-- | Retrieve the current preedit string for the input context, and a list
--   of attributes to apply to the string. This string should be displayed
--   inserted at the insertion point.
imContextGetPreeditString :: (IMContextClass self, GlibString string) => self -> IO (string, [[PangoAttribute]], Int)

-- | Allow an input method to internally handle key press and release
--   events. If this function returns <tt>True</tt>, then no further
--   processing should be done for this key event.
imContextFilterKeypress :: IMContextClass self => self -> EventM EKey Bool

-- | Notify the input method that the widget to which this input context
--   corresponds has gained focus. The input method may, for example,
--   change the displayed feedback to reflect this change.
imContextFocusIn :: IMContextClass self => self -> IO ()

-- | Notify the input method that the widget to which this input context
--   corresponds has lost focus. The input method may, for example, change
--   the displayed feedback or reset the contexts state to reflect this
--   change.
imContextFocusOut :: IMContextClass self => self -> IO ()

-- | Notify the input method that a change such as a change in cursor
--   position has been made. This will typically cause the input method to
--   clear the preedit state.
imContextReset :: IMContextClass self => self -> IO ()

-- | Notify the input method that a change in cursor position has been
--   made. The location is relative to the client window.
imContextSetCursorLocation :: IMContextClass self => self -> Rectangle -> IO ()

-- | Sets whether the IM context should use the preedit string to display
--   feedback. If <tt>usePreedit</tt> is <tt>False</tt> (default is
--   <tt>True</tt>), then the IM context may use some other method to
--   display feedback, such as displaying it in a child of the root window.
imContextSetUsePreedit :: IMContextClass self => self -> Bool -> IO ()

-- | Sets surrounding context around the insertion point and preedit
--   string. This function is expected to be called in response to the
--   <a>imContextRetrieveSurrounding</a> signal, and will likely have no
--   effect if called at other times.
imContextSetSurrounding :: (IMContextClass self, GlibString string) => self -> string -> Int -> IO ()

-- | Retrieves context around the insertion point. Input methods typically
--   want context in order to constrain input text based on existing text;
--   this is important for languages such as Thai where only some sequences
--   of characters are allowed.
--   
--   This function is implemented by emitting the
--   <a>imContextRetrieveSurrounding</a> signal on the input method; in
--   response to this signal, a widget should provide as much context as is
--   available, up to an entire paragraph, by calling
--   <a>imContextSetSurrounding</a>. Note that there is no obligation for a
--   widget to respond to the <a>imContextRetrieveSurrounding</a> signal,
--   so input methods must be prepared to function without context.
imContextGetSurrounding :: (IMContextClass self, GlibString string) => self -> IO (Maybe (string, Int))

-- | Asks the widget that the input context is attached to to delete
--   characters around the cursor position by emitting the
--   <a>imContextDeleteSurrounding</a> signal.
--   
--   In order to use this function, you should first call
--   <a>imContextGetSurrounding</a> to get the current context, and call
--   this function immediately afterwards to make sure that you know what
--   you are deleting. You should also account for the fact that even if
--   the signal was handled, the input context might not have deleted all
--   the characters that were requested to be deleted.
--   
--   This function is used by an input method that wants to make
--   substitutions in the existing text in response to new input. It is not
--   useful for applications.
imContextDeleteSurrounding :: IMContextClass self => self -> Int -> Int -> IO Bool

-- | This signal is emitted when a new preediting sequence starts.
imContextPreeditStart :: IMContextClass self => Signal self (IO ())

-- | This signal is emitted when a preediting sequence has been completed
--   or canceled.
imContextPreeditEnd :: IMContextClass self => Signal self (IO ())

-- | This signal is emitted whenever the preedit sequence currently being
--   entered has changed. It is also emitted at the end of a preedit
--   sequence, in which case <a>imContextGetPreeditString</a> returns the
--   empty string.
imContextPreeditChanged :: IMContextClass self => Signal self (IO ())

-- | This signal is emitted when a complete input sequence has been entered
--   by the user. This can be a single character immediately after a key
--   press or the final result of preediting. Parameters:
--   
--   <tt>str</tt> - the completed character(s) entered by the user
imContextCommit :: (IMContextClass self, GlibString string) => Signal self (string -> IO ())

-- | This signal is emitted when the input method requires the context
--   surrounding the cursor. The callback should set the input method
--   surrounding context by calling <a>imContextSetSurrounding</a>.
--   
--   Returns True if the signal was handled.
imContextRetrieveSurrounding :: IMContextClass self => Signal self (IO Bool)

-- | This signal is emitted when the input method needs to delete all or
--   part of the context surrounding the cursor. Parameters:
--   
--   <tt>offset</tt> - the character offset from the cursor position of the
--   text to be deleted. A negative value indicates a position before the
--   cursor.
--   
--   <tt>n_chars</tt> - the number of characters to be deleted.
--   
--   Returns True if the signal was handled.
imContextDeleteSurrounding' :: IMContextClass self => Signal self (Int -> Int -> IO Bool)


-- | Functions for manipulating keyboard codes
module Graphics.UI.Gtk.Gdk.Keymap
data Keymap
class GObjectClass o => KeymapClass o
castToKeymap :: GObjectClass obj => obj -> Keymap
toKeymap :: KeymapClass o => o -> Keymap

-- | A <a>KeymapKey</a> is a hardware key that can be mapped to a keyval.
data KeymapKey

-- | Returns the <a>Keymap</a> attached to the default display.
keymapGetDefault :: IO Keymap

-- | Returns the <a>Keymap</a> attached to <tt>display</tt>.
--   
--   <ul>
--   <li>Available since Gdk version 2.2</li>
--   </ul>
keymapGetForDisplay :: Display -> IO Keymap

-- | Looks up the keyval mapped to a keycode/group/level triplet. If no
--   keyval is bound to <tt>key</tt>, returns 0. For normal user input, you
--   want to use <a>keymapTranslateKeyboardState</a> instead of this
--   function, since the effective group/level may not be the same as the
--   current keyboard state.
keymapLookupKey :: KeymapClass self => (Maybe self) -> KeymapKey -> IO Int

-- | Translates the contents of a <tt>EventKey</tt> into a keyval,
--   effective group, and level. Modifiers that affected the translation
--   and are thus unavailable for application use are returned in
--   <tt>consumedModifiers</tt>. See <tt>keyvalGetKeys</tt> for an
--   explanation of groups and levels. The <tt>effectiveGroup</tt> is the
--   group that was actually used for the translation; some keys such as
--   Enter are not affected by the active keyboard group. The
--   <tt>level</tt> is derived from <tt>state</tt>. For convenience,
--   <tt>EventKey</tt> already contains the translated keyval, so this
--   function isn't as useful as you might think.
keymapTranslateKeyboardState :: KeymapClass self => self -> Int -> Modifier -> Int -> IO (Maybe (Int, Int, Int, Modifier))

-- | Obtains a list of keycode/group/level combinations that will generate
--   <tt>keyval</tt>. Groups and levels are two kinds of keyboard mode; in
--   general, the level determines whether the top or bottom symbol on a
--   key is used, and the group determines whether the left or right symbol
--   is used. On US keyboards, the shift key changes the keyboard level,
--   and there are no groups. A group switch key might convert a keyboard
--   between Hebrew to English modes, for example. <tt>EventKey</tt>
--   contains a <tt>group</tt> field that indicates the active keyboard
--   group. The level is computed from the modifier mask.
keymapGetEntriesForKeyval :: KeymapClass self => self -> KeyVal -> IO (Maybe [KeymapKey])

-- | Returns the keyvals bound to <tt>hardwareKeycode</tt>. The Nth
--   <a>KeymapKey</a> in <tt>keys</tt> is bound to the Nth keyval in
--   <tt>keyvals</tt>. 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 <a>keymapTranslateKeyboardState</a>.
keymapGetEntriesForKeycode :: KeymapClass self => self -> Int -> IO (Maybe ([KeymapKey], [KeyVal]))

-- | Returns the direction of effective layout of the keymap.
--   
--   Returns the direction of the keymap.
keymapGetDirection :: KeymapClass self => self -> IO PangoDirection

-- | Determines if keyboard layouts for both right-to-left and
--   left-to-right languages are in use.
--   
--   <ul>
--   <li>Available since Gdk version 2.12</li>
--   </ul>
keymapHaveBidiLayouts :: KeymapClass self => self -> IO Bool

-- | Returns whether the Caps Lock modifer is locked.
--   
--   <ul>
--   <li>Available since Gdk version 2.16</li>
--   </ul>
keymapGetCapsLockState :: KeymapClass self => self -> IO Bool

-- | The <a>keymapDirectionChanged</a> signal gets emitted when the
--   direction of the keymap changes.
--   
--   <ul>
--   <li>Available since Gdk version 2.0</li>
--   </ul>
keymapDirectionChanged :: KeymapClass self => Signal self (IO ())

-- | The <a>keymapKeysChanged</a> signal is emitted when the mapping
--   represented by <tt>keymap</tt> changes.
--   
--   <ul>
--   <li>Available since Gdk version 2.2</li>
--   </ul>
keymapKeysChanged :: KeymapClass self => Signal self (IO ())

-- | The <a>keymapStateChanged</a> signal is emitted when the state of the
--   keyboard changes, e.g when Caps Lock is turned on or off. See
--   <a>keymapGetCapsLockState</a>.
--   
--   <ul>
--   <li>Available since Gdk version 2.16</li>
--   </ul>
keymapStateChanged :: KeymapClass self => Signal self (IO ())


-- | Toplevel which can contain other widgets
module Graphics.UI.Gtk.Windows.Window
data Window
class BinClass o => WindowClass o
castToWindow :: GObjectClass obj => obj -> Window
gTypeWindow :: GType
toWindow :: WindowClass o => o -> Window

-- | Interaction of a window with window manager
data WindowType
[WindowToplevel] :: WindowType
[WindowPopup] :: WindowType

-- | Determines a window edge or corner.
data WindowEdge
[WindowEdgeNorthWest] :: WindowEdge
[WindowEdgeNorth] :: WindowEdge
[WindowEdgeNorthEast] :: WindowEdge
[WindowEdgeWest] :: WindowEdge
[WindowEdgeEast] :: WindowEdge
[WindowEdgeSouthWest] :: WindowEdge
[WindowEdgeSouth] :: WindowEdge
[WindowEdgeSouthEast] :: WindowEdge
data WindowTypeHint
[WindowTypeHintNormal] :: WindowTypeHint
[WindowTypeHintDialog] :: WindowTypeHint
[WindowTypeHintMenu] :: WindowTypeHint
[WindowTypeHintToolbar] :: WindowTypeHint
[WindowTypeHintSplashscreen] :: WindowTypeHint
[WindowTypeHintUtility] :: WindowTypeHint
[WindowTypeHintDock] :: WindowTypeHint
[WindowTypeHintDesktop] :: WindowTypeHint
[WindowTypeHintDropdownMenu] :: WindowTypeHint
[WindowTypeHintPopupMenu] :: WindowTypeHint
[WindowTypeHintTooltip] :: WindowTypeHint
[WindowTypeHintNotification] :: WindowTypeHint
[WindowTypeHintCombo] :: WindowTypeHint
[WindowTypeHintDnd] :: WindowTypeHint

-- | Defines the reference point of a window and the meaning of coordinates
--   passed to <a>windowMove</a>. See <a>windowMove</a> and the
--   "implementation notes" section of the extended window manager hints
--   specification for more details.
data Gravity
[GravityNorthWest] :: Gravity
[GravityNorth] :: Gravity
[GravityNorthEast] :: Gravity
[GravityWest] :: Gravity
[GravityCenter] :: Gravity
[GravityEast] :: Gravity
[GravitySouthWest] :: Gravity
[GravitySouth] :: Gravity
[GravitySouthEast] :: Gravity
[GravityStatic] :: Gravity

-- | Create a new top level window.
windowNew :: IO Window

-- | Create a popup window.
windowNewPopup :: IO Window

-- | Activates the current focused widget within the window.
windowActivateFocus :: WindowClass self => self -> IO Bool

-- | Activates the default widget for the window, unless the current
--   focused widget has been configured to receive the default action (see
--   <tt>ReceivesDefault</tt> in <tt>WidgetFlags</tt>), in which case the
--   focused widget is activated.
windowActivateDefault :: WindowClass self => self -> IO Bool

-- | Sets the default size of a window. If the window's "natural" size (its
--   size request) is larger than the default, the default will be ignored.
--   More generally, if the default size does not obey the geometry hints
--   for the window (<a>windowSetGeometryHints</a> can be used to set these
--   explicitly), the default size will be clamped to the nearest permitted
--   size.
--   
--   Unlike <tt>widgetSetSizeRequest</tt>, which sets a size request for a
--   widget and thus would keep users from shrinking the window, this
--   function only sets the initial size, just as if the user had resized
--   the window themselves. Users can still shrink the window again as they
--   normally would. Setting a default size of -1 means to use the
--   "natural" default size (the size request of the window).
--   
--   For more control over a window's initial size and how resizing works,
--   investigate <a>windowSetGeometryHints</a>.
--   
--   For some uses, <a>windowResize</a> is a more appropriate function.
--   <a>windowResize</a> changes the current size of the window, rather
--   than the size to be used on initial display. <a>windowResize</a>
--   always affects the window itself, not the geometry widget.
--   
--   The default size of a window only affects the first time a window is
--   shown; if a window is hidden and re-shown, it will remember the size
--   it had prior to hiding, rather than using the default size.
--   
--   Windows can't actually be 0x0 in size, they must be at least 1x1, but
--   passing 0 for <tt>width</tt> and <tt>height</tt> is OK, resulting in a
--   1x1 default size.
windowSetDefaultSize :: WindowClass self => self -> Int -> Int -> IO ()

-- | Gets the default size of the window. A value of -1 for the width or
--   height indicates that a default size has not been explicitly set for
--   that dimension, so the "natural" size of the window will be used.
windowGetDefaultSize :: WindowClass self => self -> IO (Int, Int)

-- | Sets a position constraint for this window. If the old or new
--   constraint is <a>WinPosCenterAlways</a>, this will also cause the
--   window to be repositioned to satisfy the new constraint.
windowSetPosition :: WindowClass self => self -> WindowPosition -> IO ()

-- | Window position types
data WindowPosition
[WinPosNone] :: WindowPosition
[WinPosCenter] :: WindowPosition
[WinPosMouse] :: WindowPosition
[WinPosCenterAlways] :: WindowPosition
[WinPosCenterOnParent] :: WindowPosition

-- | Returns whether the window is part of the current active toplevel.
--   (That is, the toplevel window receiving keystrokes.) The return value
--   is <tt>True</tt> if the window is active toplevel itself, but also if
--   it is, say, a <tt>Plug</tt> embedded in the active toplevel. You might
--   use this function if you wanted to draw a widget differently in an
--   active window from a widget in an inactive window. See
--   <a>windowHasToplevelFocus</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
windowIsActive :: WindowClass self => self -> IO Bool

-- | Returns whether the input focus is within this <a>Window</a>. For real
--   toplevel windows, this is identical to <a>windowIsActive</a>, but for
--   embedded windows, like <tt>Plug</tt>, the results will differ.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
windowHasToplevelFocus :: WindowClass self => self -> IO Bool

-- | Returns a list of all existing toplevel windows.
windowListToplevels :: IO [Window]

-- | The default widget is the widget that's activated when the user
--   presses Enter in a dialog (for example). This function sets or unsets
--   the default widget for a Window about. When setting (rather than
--   unsetting) the default widget it's generally easier to call
--   widgetGrabDefault on the widget. Before making a widget the default
--   widget, you must set the <tt>widgetCanDefault</tt> flag on the widget.
windowSetDefault :: (WindowClass self, WidgetClass widget) => self -> Maybe widget -> IO ()

-- | Returns the default widget for window. See <a>windowSetDefault</a> for
--   more details.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
windowGetDefaultWidget :: WindowClass self => self -> IO (Maybe Widget)

-- | Adds a mnemonic to this window.
windowAddMnemonic :: (WindowClass self, WidgetClass widget) => self -> KeyVal -> widget -> IO ()

-- | Removes a mnemonic from this window.
windowRemoveMnemonic :: (WindowClass self, WidgetClass widget) => self -> KeyVal -> widget -> IO ()

-- | Activates the targets associated with the mnemonic.
windowMnemonicActivate :: WindowClass self => self -> KeyVal -> [Modifier] -> IO Bool

-- | Activates mnemonics and accelerators for this <a>Window</a>. This is
--   normally called by the default <tt>keyPressEvent</tt> handler for
--   toplevel windows, however in some cases it may be useful to call this
--   directly when overriding the standard key handling for a toplevel
--   window.
windowActivateKey :: WindowClass self => self -> EventM EKey Bool

-- | Propagate a key press or release event to the focus widget and up the
--   focus container chain until a widget handles event. This is normally
--   called by the default <tt>keyPressEvent</tt> and
--   <tt>keyReleaseEvent</tt> handlers for toplevel windows, however in
--   some cases it may be useful to call this directly when overriding the
--   standard key handling for a toplevel window.
windowPropagateKeyEvent :: WindowClass self => self -> EventM EKey Bool

-- | Presents a window to the user. This may mean raising the window in the
--   stacking order, deiconifying it, moving it to the current desktop,
--   and/or giving it the keyboard focus, possibly dependent on the user's
--   platform, window manager, and preferences.
--   
--   If <tt>window</tt> is hidden, this function calls <tt>widgetShow</tt>
--   as well.
--   
--   This function should be used when the user tries to open a window
--   that's already open. Say for example the preferences dialog is
--   currently open, and the user chooses Preferences from the menu a
--   second time; use <a>windowPresent</a> to move the already-open dialog
--   where the user can see it.
--   
--   If you are calling this function in response to a user interaction, it
--   is preferable to use <a>windowPresentWithTime</a>.
windowPresent :: WindowClass self => self -> IO ()

-- | Asks to deiconify (i.e. unminimize) the specified <tt>window</tt>.
--   Note that you shouldn't assume the window is definitely deiconified
--   afterward, because other entities (e.g. the user or window manager)
--   could iconify it again before your code which assumes deiconification
--   gets to run.
--   
--   You can track iconification via the <tt>windowStateEvent</tt> signal
--   on <a>Widget</a>.
windowDeiconify :: WindowClass self => self -> IO ()

-- | Asks to iconify (i.e. minimize) the specified <tt>window</tt>. Note
--   that you shouldn't assume the window is definitely iconified
--   afterward, because other entities (e.g. the user or window manager)
--   could deiconify it again, or there may not be a window manager in
--   which case iconification isn't possible, etc. But normally the window
--   will end up iconified. Just don't write code that crashes if not.
--   
--   It's permitted to call this function before showing a window, in which
--   case the window will be iconified before it ever appears onscreen.
--   
--   You can track iconification via the <tt>windowStateEvent</tt> signal
--   on <a>Widget</a>.
windowIconify :: WindowClass self => self -> IO ()

-- | Asks to maximize the window, so that it becomes full-screen. Note that
--   you shouldn't assume the window is definitely maximized afterward,
--   because other entities (e.g. the user or window manager) could
--   unmaximize it again, and not all window managers support maximization.
--   But normally the window will end up maximized. Just don't write code
--   that crashes if not.
--   
--   It's permitted to call this function before showing a window, in which
--   case the window will be maximized when it appears onscreen initially.
--   
--   You can track maximization via the <tt>windowStateEvent</tt> signal on
--   <a>Widget</a>.
windowMaximize :: WindowClass self => self -> IO ()

-- | Asks to unmaximize the window. Note that you shouldn't assume the
--   window is definitely unmaximized afterward, because other entities
--   (e.g. the user or window manager) could maximize it again, and not all
--   window managers honor requests to unmaximize. But normally the window
--   will end up unmaximized. Just don't write code that crashes if not.
--   
--   You can track maximization via the <tt>windowStateEvent</tt> signal on
--   <a>Widget</a>.
windowUnmaximize :: WindowClass self => self -> IO ()

-- | Asks to place <tt>window</tt> in the fullscreen state. Note that you
--   shouldn't assume the window is definitely full screen afterward,
--   because other entities (e.g. the user or window manager) could
--   unfullscreen it again, and not all window managers honor requests to
--   fullscreen windows. But normally the window will end up fullscreen.
--   Just don't write code that crashes if not.
--   
--   You can track the fullscreen state via the <tt>windowStateEvent</tt>
--   signal on <a>Widget</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowFullscreen :: WindowClass self => self -> IO ()

-- | Asks to toggle off the fullscreen state for <tt>window</tt>. Note that
--   you shouldn't assume the window is definitely not full screen
--   afterward, because other entities (e.g. the user or window manager)
--   could fullscreen it again, and not all window managers honor requests
--   to unfullscreen windows. But normally the window will end up restored
--   to its normal state. Just don't write code that crashes if not.
--   
--   You can track the fullscreen state via the <tt>windowStateEvent</tt>
--   signal on <a>Widget</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowUnfullscreen :: WindowClass self => self -> IO ()

-- | Asks to keep <tt>window</tt> above, so that it stays on top. Note that
--   you shouldn't assume the window is definitely above afterward, because
--   other entities (e.g. the user or window manager) could not keep it
--   above, and not all window managers support keeping windows above. But
--   normally the window will end kept above. Just don't write code that
--   crashes if not.
--   
--   It's permitted to call this function before showing a window, in which
--   case the window will be kept above when it appears onscreen initially.
--   
--   You can track the above state via the <tt>windowStateEvent</tt> signal
--   on <a>Widget</a>.
--   
--   Note that, according to the Extended Window Manager Hints
--   specification, the above state is mainly meant for user preferences
--   and should not be used by applications e.g. for drawing attention to
--   their dialogs.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
windowSetKeepAbove :: WindowClass self => self -> Bool -> IO ()

-- | Asks to keep <tt>window</tt> below, so that it stays in bottom. Note
--   that you shouldn't assume the window is definitely below afterward,
--   because other entities (e.g. the user or window manager) could not
--   keep it below, and not all window managers support putting windows
--   below. But normally the window will be kept below. Just don't write
--   code that crashes if not.
--   
--   It's permitted to call this function before showing a window, in which
--   case the window will be kept below when it appears onscreen initially.
--   
--   You can track the below state via the <tt>windowStateEvent</tt> signal
--   on <a>Widget</a>.
--   
--   Note that, according to the Extended Window Manager Hints
--   specification, the above state is mainly meant for user preferences
--   and should not be used by applications e.g. for drawing attention to
--   their dialogs.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
windowSetKeepBelow :: WindowClass self => self -> Bool -> IO ()

-- | Startup notification identifiers are used by desktop environment to
--   track application startup, to provide user feedback and other
--   features. This function changes the corresponding property on the
--   underlying GdkWindow. Normally, startup identifier is managed
--   automatically and you should only use this function in special cases
--   like transferring focus from other processes. You should use this
--   function before calling <a>windowPresent</a> or any equivalent
--   function generating a window map event.
--   
--   This function is only useful on X11, not with other GTK+ targets.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
windowSetStartupId :: (WindowClass self, GlibString string) => self -> string -> IO ()

-- | Retrieves the frame <a>DrawWindow</a> that contains a <a>Window</a>.
--   
--   Removed in Gtk3.
windowGetFrame :: WindowClass widget => widget -> IO (Maybe DrawWindow)

-- | (Note: this is a special-purpose function intended for the framebuffer
--   port; see <a>windowSetHasFrame</a>. It will have no effect on the
--   window border drawn by the window manager, which is the normal case
--   when using the X Window system.)
--   
--   For windows with frames (see <a>windowSetHasFrame</a>) this function
--   can be used to change the size of the frame border.
--   
--   Removed in Gtk3.
windowSetFrameDimensions :: WindowClass self => self -> Int -> Int -> Int -> Int -> IO ()

-- | Retrieves the dimensions of the frame window for this toplevel. See
--   <a>windowSetHasFrame</a>, <a>windowSetFrameDimensions</a>.
--   
--   (Note: this is a special-purpose function intended for the framebuffer
--   port; see <a>windowSetHasFrame</a>. It will not return the size of the
--   window border drawn by the window manager, which is the normal case
--   when using a windowing system. See <tt>drawWindowGetFrameExtents</tt>
--   to get the standard window border extents.)
--   
--   Removed in Gtk3.
windowGetFrameDimensions :: WindowClass self => self -> IO (Int, Int, Int, Int)

-- | Asks to stick <tt>window</tt>, which means that it will appear on all
--   user desktops. Note that you shouldn't assume the window is definitely
--   stuck afterward, because other entities (e.g. the user or window
--   manager) could unstick it again, and some window managers do not
--   support sticking windows. But normally the window will end up stuck.
--   Just don't write code that crashes if not.
--   
--   It's permitted to call this function before showing a window.
--   
--   You can track stickiness via the <tt>windowStateEvent</tt> signal on
--   <a>Widget</a>.
windowStick :: WindowClass self => self -> IO ()

-- | Asks to unstick <tt>window</tt>, which means that it will appear on
--   only one of the user's desktops. Note that you shouldn't assume the
--   window is definitely unstuck afterward, because other entities (e.g.
--   the user or window manager) could stick it again. But normally the
--   window will end up stuck. Just don't write code that crashes if not.
--   
--   You can track stickiness via the <tt>windowStateEvent</tt> signal on
--   <a>Widget</a>.
windowUnstick :: WindowClass self => self -> IO ()

-- | Associate <tt>accelGroup</tt> with <tt>window</tt>, such that calling
--   <tt>accelGroupsActivate</tt> on <tt>window</tt> will activate
--   accelerators in <tt>accelGroup</tt>.
windowAddAccelGroup :: WindowClass self => self -> AccelGroup -> IO ()

-- | Reverses the effects of <a>windowAddAccelGroup</a>.
windowRemoveAccelGroup :: WindowClass self => self -> AccelGroup -> IO ()

-- | Sets an icon list to be used as fallback for windows that haven't had
--   <a>windowSetIconList</a> called on them to set up a window-specific
--   icon list. This function allows you to set up the icon for all windows
--   in your app at once.
--   
--   See <a>windowSetIconList</a> for more details.
windowSetDefaultIconList :: [Pixbuf] -> IO ()

-- | Gets the value set by <a>windowSetDefaultIconList</a>.
windowGetDefaultIconList :: IO [Pixbuf]

-- | Sets an icon to be used as fallback for windows that haven't had
--   <a>windowSetIcon</a> called on them from a pixbuf.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
windowSetDefaultIcon :: Maybe Pixbuf -> IO ()

-- | Sets an icon to be used as fallback for windows that haven't had
--   <a>windowSetIconList</a> called on them from a file on disk. May throw
--   a <a>GError</a> if the file cannot be loaded.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowSetDefaultIconFromFile :: GlibString string => string -> IO Bool

-- | Sets an icon to be used as fallback for windows that haven't had
--   <a>windowSetIconList</a> called on them from a named themed icon, see
--   <a>windowSetIconName</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
windowSetDefaultIconName :: GlibString string => string -> IO ()

-- | Returns the fallback icon name for windows that has been set with
--   <a>windowSetDefaultIconName</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.16</li>
--   </ul>
windowGetDefaultIconName :: GlibString string => IO string

-- | Window gravity defines the meaning of coordinates passed to
--   <a>windowMove</a>. See <a>windowMove</a> and <a>Gravity</a> for more
--   details.
--   
--   The default window gravity is <a>GravityNorthWest</a> which will
--   typically "do what you mean."
windowSetGravity :: WindowClass self => self -> Gravity -> IO ()

-- | Gets the value set by <a>windowSetGravity</a>.
windowGetGravity :: WindowClass self => self -> IO Gravity

-- | Sets the <a>Screen</a> where the <tt>window</tt> is displayed; if the
--   window is already mapped, it will be unmapped, and then remapped on
--   the new screen.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowSetScreen :: WindowClass self => self -> Screen -> IO ()

-- | Returns the <a>Screen</a> associated with the window.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowGetScreen :: WindowClass self => self -> IO Screen

-- | Starts resizing a window. This function is used if an application has
--   window resizing controls. When GDK can support it, the resize will be
--   done using the standard mechanism for the window manager or windowing
--   system. Otherwise, GDK will try to emulate window resizing,
--   potentially not all that well, depending on the windowing system.
windowBeginResizeDrag :: WindowClass self => self -> WindowEdge -> MouseButton -> Int -> Int -> TimeStamp -> IO ()

-- | Starts moving a window. This function is used if an application has
--   window movement grips. When GDK can support it, the window movement
--   will be done using the standard mechanism for the window manager or
--   windowing system. Otherwise, GDK will try to emulate window movement,
--   potentially not all that well, depending on the windowing system.
windowBeginMoveDrag :: WindowClass self => self -> MouseButton -> Int -> Int -> TimeStamp -> IO ()

-- | By setting the type hint for the window, you allow the window manager
--   to decorate and handle the window in a way which is suitable to the
--   function of the window in your application.
--   
--   This function should be called before the window becomes visible.
windowSetTypeHint :: WindowClass self => self -> WindowTypeHint -> IO ()

-- | Gets the type hint for this window. See <a>windowSetTypeHint</a>.
windowGetTypeHint :: WindowClass self => self -> IO WindowTypeHint

-- | Gets the value set by <a>windowSetIcon</a> (or if you've called
--   <a>windowSetIconList</a>, gets the first icon in the icon list).
windowGetIcon :: WindowClass self => self -> IO (Maybe Pixbuf)

-- | This function returns the position you need to pass to
--   <a>windowMove</a> to keep <tt>window</tt> in its current position.
--   This means that the meaning of the returned value varies with window
--   gravity. See <a>windowMove</a> for more details.
--   
--   If you haven't changed the window gravity, its gravity will be
--   <a>GravityNorthWest</a>. This means that <a>windowGetPosition</a> gets
--   the position of the top-left corner of the window manager frame for
--   the window. <a>windowMove</a> sets the position of this same top-left
--   corner.
--   
--   Moreover, nearly all window managers are historically broken with
--   respect to their handling of window gravity. So moving a window to its
--   current position as returned by <a>windowGetPosition</a> tends to
--   result in moving the window slightly. Window managers are slowly
--   getting better over time.
--   
--   If a window has gravity <a>GravityStatic</a> the window manager frame
--   is not relevant, and thus <a>windowGetPosition</a> will always produce
--   accurate results. However you can't use static gravity to do things
--   like place a window in a corner of the screen, because static gravity
--   ignores the window manager decorations.
--   
--   If you are saving and restoring your application's window positions,
--   you should know that it's impossible for applications to do this
--   without getting it somewhat wrong because applications do not have
--   sufficient knowledge of window manager state. The Correct Mechanism is
--   to support the session management protocol (see the "GnomeClient"
--   object in the GNOME libraries for example) and allow the window
--   manager to save your window sizes and positions.
windowGetPosition :: WindowClass self => self -> IO (Int, Int)

-- | Obtains the current size of the window. If the window is not onscreen,
--   it returns the size Gtk+ will suggest to the window manager for the
--   initial window size (but this is not reliably the same as the size the
--   window manager will actually select). The size obtained by
--   <a>windowGetSize</a> is the last size received in a
--   <tt>EventConfigure</tt>, that is, Gtk+ uses its locally-stored size,
--   rather than querying the X server for the size. As a result, if you
--   call <a>windowResize</a> then immediately call <a>windowGetSize</a>,
--   the size won't have taken effect yet. After the window manager
--   processes the resize request, Gtk+ receives notification that the size
--   has changed via a configure event, and the size of the window gets
--   updated.
--   
--   Note 1: Nearly any use of this function creates a race condition,
--   because the size of the window may change between the time that you
--   get the size and the time that you perform some action assuming that
--   size is the current size. To avoid race conditions, connect to
--   "configure_event" on the window and adjust your size-dependent state
--   to match the size delivered in the <tt>EventConfigure</tt>.
--   
--   Note 2: The returned size does <i>not</i> include the size of the
--   window manager decorations (aka the window frame or border). Those are
--   not drawn by Gtk+ and Gtk+ has no reliable method of determining their
--   size.
--   
--   Note 3: If you are getting a window size in order to position the
--   window onscreen, there may be a better way. The preferred way is to
--   simply set the window's semantic type with <a>windowSetTypeHint</a>,
--   which allows the window manager to e.g. center dialogs. Also, if you
--   set the transient parent of dialogs with <a>windowSetTransientFor</a>
--   window managers will often center the dialog over its parent window.
--   It's much preferred to let the window manager handle these things
--   rather than doing it yourself, because all apps will behave
--   consistently and according to user prefs if the window manager handles
--   it. Also, the window manager can take the size of the window
--   decorations/border into account, while your application cannot.
--   
--   In any case, if you insist on application-specified window
--   positioning, there's <i>still</i> a better way than doing it yourself
--   - <a>windowSetPosition</a> will frequently handle the details for you.
windowGetSize :: WindowClass self => self -> IO (Int, Int)

-- | Asks the window manager to move <tt>window</tt> to the given position.
--   Window managers are free to ignore this; most window managers ignore
--   requests for initial window positions (instead using a user-defined
--   placement algorithm) and honor requests after the window has already
--   been shown.
--   
--   Note: the position is the position of the gravity-determined reference
--   point for the window. The gravity determines two things: first, the
--   location of the reference point in root window coordinates; and
--   second, which point on the window is positioned at the reference
--   point.
--   
--   By default the gravity is <a>GravityNorthWest</a>, so the reference
--   point is simply the <tt>x</tt>, <tt>y</tt> supplied to
--   <a>windowMove</a>. The top-left corner of the window decorations (aka
--   window frame or border) will be placed at <tt>x</tt>, <tt>y</tt>.
--   Therefore, to position a window at the top left of the screen, you
--   want to use the default gravity (which is <a>GravityNorthWest</a>) and
--   move the window to 0,0.
--   
--   To position a window at the bottom right corner of the screen, you
--   would set <a>GravitySouthEast</a>, which means that the reference
--   point is at <tt>x</tt> + the window width and <tt>y</tt> + the window
--   height, and the bottom-right corner of the window border will be
--   placed at that reference point. So, to place a window in the bottom
--   right corner you would first set gravity to south east, then write:
--   <tt>gtk_window_move (window, gdk_screen_width() - window_width,
--   gdk_screen_height() - window_height)</tt>.
--   
--   The Extended Window Manager Hints specification at
--   http://www.freedesktop.org/Standards/wm-spec has a nice table of
--   gravities in the "implementation notes" section.
--   
--   The <a>windowGetPosition</a> documentation may also be relevant.
windowMove :: WindowClass self => self -> Int -> Int -> IO ()

-- | Parses a standard X Window System geometry string - see the manual
--   page for X (type 'man X') for details on this.
--   <a>windowParseGeometry</a> does work on all GTK+ ports including Win32
--   but is primarily intended for an X environment.
--   
--   If either a size or a position can be extracted from the geometry
--   string, <a>windowParseGeometry</a> returns <tt>True</tt> and calls
--   gtk_window_set_default_size() and<i>or gtk_window_move() to
--   resize</i>move the window.
--   
--   If <a>windowParseGeometry</a> returns <tt>True</tt>, it will also set
--   the <tt>HintUserPos</tt> and<i>or <tt>HintUserSize</tt> hints
--   indicating to the window manager that the size</i>position of the
--   window was user-specified This causes most window managers to honor
--   the geometry.
--   
--   Note that for <a>windowParseGeometry</a> to work as expected, it has
--   to be called when the window has its "final" size, i.e. after calling
--   <tt>widgetShowAll</tt> on the contents and
--   <a>windowSetGeometryHints</a> on the window.
windowParseGeometry :: (WindowClass self, GlibString string) => self -> string -> IO Bool

-- | Hides window, then reshows it, resetting the default size and position
--   of the window. Used by GUI builders only.
windowReshowWithInitialSize :: WindowClass self => self -> IO ()

-- | Resizes the window as if the user had done so, obeying geometry
--   constraints. The default geometry constraint is that windows may not
--   be smaller than their size request; to override this constraint, call
--   <tt>widgetSetSizeRequest</tt> to set the window's request to a smaller
--   value.
--   
--   If <a>windowResize</a> is called before showing a window for the first
--   time, it overrides any default size set with
--   <a>windowSetDefaultSize</a>.
--   
--   Windows may not be resized smaller than 1 by 1 pixels.
windowResize :: WindowClass self => self -> Int -> Int -> IO ()

-- | Sets the icon for <tt>window</tt>.
--   
--   This function is equivalent to calling <a>windowSetIcon</a> with a
--   pixbuf created by loading the image from <tt>filename</tt>.
--   
--   This may throw an exception if the file cannot be loaded.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowSetIconFromFile :: (WindowClass self, GlibFilePath fp) => self -> fp -> IO ()

-- | By default, after showing the first <a>Window</a> for each
--   <a>Screen</a>, Gtk+ calls <tt>screenNotifyStartupComplete</tt>. Call
--   this function to disable the automatic startup notification. You might
--   do this if your first window is a splash screen, and you want to delay
--   notification until after your real main window has been shown, for
--   example.
--   
--   In that example, you would disable startup notification temporarily,
--   show your splash screen, then re-enable it so that showing the main
--   window would automatically result in notification.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowSetAutoStartupNotification :: Bool -> IO ()

-- | Presents a window to the user in response to a user interaction. If
--   you need to present a window without a timestamp, use
--   <a>windowPresent</a>. See <a>windowPresent</a> for details.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
windowPresentWithTime :: WindowClass self => self -> TimeStamp -> IO ()

-- | This function sets up hints about how a window can be resized by the
--   user. You can set a minimum and maximum size, the allowed resize
--   increments (e.g. for xterm, you can only resize by the size of a
--   character) and aspect ratios.
--   
--   If you set a geometry widget, the hints will apply to the geometry
--   widget instead of directly to the toplevel window. Of course since the
--   geometry widget is a child widget of the top level window,
--   constraining the sizing behaviour of the widget will have a knock-on
--   effect on the sizing of the toplevel window.
--   
--   The
--   <tt>minWidth</tt>/<tt>minHeight</tt>/<tt>maxWidth</tt>/<tt>maxHeight</tt>
--   fields may be set to <tt>-1</tt>, to use the size request of the
--   window or geometry widget. If the minimum size hint is not provided,
--   Gtk+ will use the size requisition of the window (or the geometry
--   widget if it set) as the minimum size. The base size is treated
--   similarly.
--   
--   The canonical use-case for <a>windowSetGeometryHints</a> is to get a
--   terminal widget to resize properly. Here, the terminal text area
--   should be the geometry widget. Gtk+ will then automatically set the
--   base size of the terminal window to the size of other widgets in the
--   terminal window, such as the menubar and scrollbar. Then, the
--   <tt>widthInc</tt> and <tt>heightInc</tt> values should be set to the
--   size of one character in the terminal. Finally, the base size should
--   be set to the size of one character. The net effect is that the
--   minimum size of the terminal will have a 1x1 character terminal area,
--   and only terminal sizes on the "character grid" will be allowed.
--   
--   The other useful settings are <tt>minAspect</tt> and
--   <tt>maxAspect</tt>. These specify a width/height ratio as a floating
--   point number. If a geometry widget is set, the aspect applies to the
--   geometry widget rather than the entire window. The most common use of
--   these hints is probably to set <tt>minAspect</tt> and
--   <tt>maxAspect</tt> to the same value, thus forcing the window to keep
--   a constant aspect ratio.
windowSetGeometryHints :: (WindowClass self, WidgetClass widget) => self -> Maybe widget -> Maybe (Int, Int) -> Maybe (Int, Int) -> Maybe (Int, Int) -> Maybe (Int, Int) -> Maybe (Double, Double) -> IO ()

-- | Returns the group for window or the default group, if window is
--   <tt>Nothing</tt> or if window does not have an explicit window group.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
windowGetGroup :: WindowClass self => Maybe self -> IO WindowGroup

-- | Gets the type of the window. See <a>WindowType</a>.
--   
--   <ul>
--   <li>Available since Gtk version 2.20</li>
--   </ul>
windowGetWindowType :: WindowClass self => self -> IO WindowType

-- | The title of the window.
windowTitle :: (WindowClass self, GlibString string) => Attr self string

-- | The type of the window.
--   
--   Default value: <a>WindowToplevel</a>
windowType :: WindowClass self => ReadAttr self WindowType

-- | If <tt>True</tt>, the window has no mimimum size. Setting this to
--   <tt>True</tt> is 99% of the time a bad idea.
--   
--   Default value: <tt>False</tt>
windowAllowShrink :: WindowClass self => Attr self Bool

-- | If <tt>True</tt>, users can expand the window beyond its minimum size.
--   
--   Default value: <tt>True</tt>
windowAllowGrow :: WindowClass self => Attr self Bool

-- | If <tt>True</tt>, users can resize the window.
--   
--   Default value: <tt>True</tt>
windowResizable :: WindowClass self => Attr self Bool

-- | If <tt>True</tt>, the window is modal (other windows are not usable
--   while this one is up).
--   
--   Default value: <tt>False</tt>
windowModal :: WindowClass self => Attr self Bool

-- | The requested opacity of the window. See <a>windowSetOpacity</a> for
--   more details about window opacity.
--   
--   Allowed values: [0,1]
--   
--   Default values: 1
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
windowOpacity :: WindowClass self => Attr self Double

-- | Unique identifier for the window to be used when restoring a session.
--   
--   Default value: "\"
windowRole :: (WindowClass self, GlibString string) => Attr self string

-- | The <a>windowStartupId</a> is a write-only property for setting
--   window's startup notification identifier.
--   
--   Default value: "\"
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
windowStartupId :: (WindowClass self, GlibString string) => Attr self string

-- | The initial position of the window.
--   
--   Default value: <a>WinPosNone</a>
windowWindowPosition :: WindowClass self => Attr self WindowPosition

-- | The default width of the window, used when initially showing the
--   window.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
windowDefaultWidth :: WindowClass self => Attr self Int

-- | The default height of the window, used when initially showing the
--   window.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
windowDefaultHeight :: WindowClass self => Attr self Int

-- | Whether the window frame should have a close button.
--   
--   Default values: <tt>True</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
windowDeletable :: WindowClass self => Attr self Bool

-- | If this window should be destroyed when the parent is destroyed.
--   
--   Default value: <tt>False</tt>
windowDestroyWithParent :: WindowClass self => Attr self Bool

-- | Icon for this window.
windowIcon :: WindowClass self => Attr self (Maybe Pixbuf)

-- | The <a>windowIconName</a> property specifies the name of the themed
--   icon to use as the window icon. See <a>IconTheme</a> for more details.
--   
--   Default values: "\"
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
windowIconName :: (WindowClass self, GlibString string) => Attr self string

-- | The screen where this window will be displayed.
windowScreen :: WindowClass self => Attr self Screen

-- | Hint to help the desktop environment understand what kind of window
--   this is and how to treat it.
--   
--   Default value: <a>WindowTypeHintNormal</a>
windowTypeHint :: WindowClass self => Attr self WindowTypeHint

-- | <tt>True</tt> if the window should not be in the task bar.
--   
--   Default value: <tt>False</tt>
windowSkipTaskbarHint :: WindowClass self => Attr self Bool

-- | <tt>True</tt> if the window should not be in the pager.
--   
--   Default value: <tt>False</tt>
windowSkipPagerHint :: WindowClass self => Attr self Bool

-- | <tt>True</tt> if the window should be brought to the user's attention.
--   
--   Default value: <tt>False</tt>
windowUrgencyHint :: WindowClass self => Attr self Bool

-- | <tt>True</tt> if the window should receive the input focus.
--   
--   Default value: <tt>True</tt>
windowAcceptFocus :: WindowClass self => Attr self Bool

-- | <tt>True</tt> if the window should receive the input focus when
--   mapped.
--   
--   Default value: <tt>True</tt>
windowFocusOnMap :: WindowClass self => Attr self Bool

-- | Whether the window should be decorated by the window manager.
--   
--   Default value: <tt>True</tt>
windowDecorated :: WindowClass self => Attr self Bool

-- | The window gravity of the window. See <a>windowMove</a> and
--   <a>Gravity</a> for more details about window gravity.
--   
--   Default value: <a>GravityNorthWest</a>
windowGravity :: WindowClass self => Attr self Gravity

-- | Whether the input focus is within this GtkWindow.
--   
--   Note: If add <tt>window</tt> before <tt>HasToplevelFocus</tt>
--   (has-toplevel-focus attribute) will conflicts with fucntion
--   <a>windowHasToplevelFocus</a>, so we named this attribute to
--   <a>windowToplevelFocus</a>.
--   
--   Default values: <tt>False</tt>
windowToplevelFocus :: WindowClass self => Attr self Bool

-- | 'transientFor' property. See <a>windowGetTransientFor</a> and
--   <a>windowSetTransientFor</a>
windowTransientFor :: (WindowClass self, WindowClass parent) => ReadWriteAttr self (Maybe Window) parent

-- | If <tt>focus</tt> is not the current focus widget, and is focusable,
--   sets it as the focus widget for the window. If <tt>focus</tt> is
--   <tt>Nothing</tt>, unsets the focus widget for this window. To set the
--   focus to a particular widget in the toplevel, it is usually more
--   convenient to use <tt>widgetGrabFocus</tt> instead of this function.
windowFocus :: WindowClass self => Attr self (Maybe Widget)

-- | (Note: this is a special-purpose function for the framebuffer port,
--   that causes Gtk+ to draw its own window border. For most applications,
--   you want <a>windowSetDecorated</a> instead, which tells the window
--   manager whether to draw the window border.)
--   
--   If this function is called on a window with setting of <tt>True</tt>,
--   before it is realized or showed, it will have a "frame" window around
--   its <a>DrawWindow</a>, accessible using <a>windowGetFrame</a>. Using
--   the signal <tt>windowFrameEvent</tt> you can receive all events
--   targeted at the frame.
--   
--   This function is used by the 1 -fb port to implement managed windows,
--   but it could conceivably be used by X-programs that want to do their
--   own window decorations.
--   
--   Removed in Gtk3.
windowHasFrame :: WindowClass self => Attr self Bool

-- | Sets up the icon representing a <a>Window</a>. The icon is used when
--   the window is minimized (also known as iconified). Some window
--   managers or desktop environments may also place it in the window
--   frame, or display it in other contexts.
--   
--   By passing several sizes, you may improve the final image quality of
--   the icon, by reducing or eliminating automatic image scaling.
--   
--   Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
--   larger images (64x64, 128x128) if you have them.
--   
--   See also <a>windowSetDefaultIconList</a> to set the icon for all
--   windows in your application in one go.
--   
--   Note that transient windows (those who have been set transient for
--   another window using <a>windowSetTransientFor</a>) will inherit their
--   icon from their transient parent. So there's no need to explicitly set
--   the icon on transient windows.
windowIconList :: WindowClass self => Attr self [Pixbuf]

-- | The mnemonic modifier for this window.
windowMnemonicModifier :: WindowClass self => Attr self [Modifier]
windowMnemonicVisible :: WindowClass self => Attr self Bool

-- | Observe events that are emitted on the frame of this window.
frameEvent :: WindowClass self => Signal self (EventM EAny Bool)

-- | The <a>keysChanged</a> signal gets emitted when the set of
--   accelerators or mnemonics that are associated with window changes.
keysChanged :: WindowClass self => Signal self (IO ())

-- | Observe a change in input focus.
setFocus :: WindowClass self => Signal self (Maybe Widget -> IO ())

-- | Sets the title of the <a>Window</a>. The title of a window will be
--   displayed in its title bar; on the X Window System, the title bar is
--   rendered by the window manager, so exactly how the title appears to
--   users may vary according to a user's exact configuration. The title
--   should help a user distinguish this window from other windows they may
--   have open. A good title might include the application name and current
--   document filename, for example.
windowSetTitle :: (WindowClass self, GlibString string) => self -> string -> IO ()

-- | Retrieves the title of the window. See <a>windowSetTitle</a>.
windowGetTitle :: (WindowClass self, GlibString string) => self -> IO string

-- | Sets whether the user can resize a window. Windows are user resizable
--   by default.
windowSetResizable :: WindowClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>windowSetResizable</a>.
windowGetResizable :: WindowClass self => self -> IO Bool

-- | Sets a window modal or non-modal. Modal windows prevent interaction
--   with other windows in the same application. To keep modal dialogs on
--   top of main application windows, use <a>windowSetTransientFor</a> to
--   make the dialog transient for the parent; most window managers will
--   then disallow lowering the dialog below the parent.
windowSetModal :: WindowClass self => self -> Bool -> IO ()

-- | Returns whether the window is modal. See <a>windowSetModal</a>.
windowGetModal :: WindowClass self => self -> IO Bool

-- | Sets the window resizing policy.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code. Use <a>windowSetResizable</a> instead.</li>
--   </ul>
--   
--   Removed in Gtk3.

-- | <i>Deprecated: Use windowSetResizable instead.</i>
windowSetPolicy :: WindowClass self => self -> Bool -> Bool -> Bool -> IO ()

-- | Dialog windows should be set transient for the main application window
--   they were spawned from. This allows window managers to e.g. keep the
--   dialog on top of the main window, or center the dialog over the main
--   window. <tt>dialogNewWithButtons</tt> and other convenience functions
--   in Gtk+ will sometimes call <a>windowSetTransientFor</a> on your
--   behalf.
--   
--   On Windows, this function will and put the child window on top of the
--   parent, much as the window manager would have done on X.
--   
--   Note that if you want to show a window <tt>self</tt> on top of a
--   full-screen window <tt>parent</tt>, you need to turn the <tt>self</tt>
--   window into a dialog (using <a>windowSetTypeHint</a> with
--   <a>WindowTypeHintDialog</a>). Otherwise the <tt>parent</tt> window
--   will always cover the <tt>self</tt> window.
windowSetTransientFor :: (WindowClass self, WindowClass parent) => self -> parent -> IO ()

-- | Fetches the transient parent for this window. See
--   <a>windowSetTransientFor</a>.
windowGetTransientFor :: WindowClass self => self -> IO (Maybe Window)

-- | If this setting is <tt>True</tt>, then destroying the transient parent
--   of the window will also destroy the window itself. This is useful for
--   dialogs that shouldn't persist beyond the lifetime of the main window
--   they're associated with, for example.
windowSetDestroyWithParent :: WindowClass self => self -> Bool -> IO ()

-- | Returns whether the window will be destroyed with its transient
--   parent. See <a>windowSetDestroyWithParent</a>.
windowGetDestroyWithParent :: WindowClass self => self -> IO Bool

-- | Retrieves the current focused widget within the window. | Note that
--   this is the widget that would have the focus if the toplevel | window
--   focused; if the toplevel window is not focused then |
--   <tt>widgetHasFocus</tt> will not be True for the widget.
windowGetFocus :: WindowClass self => self -> IO (Maybe Widget)

-- | If focus is not the current focus widget, and is focusable, sets it as
--   | the focus widget for the window. If focus is Nothing, unsets the
--   focus | widget for this window. To set the focus to a particular
--   widget in the | toplevel, it is usually more convenient to use
--   <tt>widgetGrabFocus</tt> instead | of this function.
windowSetFocus :: (WindowClass self, WidgetClass widget) => self -> Maybe widget -> IO ()

-- | Sets the mnemonic modifier for this window.
windowSetMnemonicModifier :: WindowClass self => self -> [Modifier] -> IO ()

-- | Returns the mnemonic modifier for this window. See
--   <a>windowSetMnemonicModifier</a>.
windowGetMnemonicModifier :: WindowClass self => self -> IO [Modifier]

-- | Windows may set a hint asking the desktop environment not to display
--   the window in the task bar. This function sets this hint.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowSetSkipTaskbarHint :: WindowClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>windowSetSkipTaskbarHint</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowGetSkipTaskbarHint :: WindowClass self => self -> IO Bool

-- | Windows may set a hint asking the desktop environment not to display
--   the window in the pager. This function sets this hint. (A "pager" is
--   any desktop navigation tool such as a workspace switcher that displays
--   a thumbnail representation of the windows on the screen.)
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowSetSkipPagerHint :: WindowClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>windowSetSkipPagerHint</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
windowGetSkipPagerHint :: WindowClass self => self -> IO Bool

-- | Windows may set a hint asking the desktop environment not to receive
--   the input focus. This function sets this hint.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
windowSetAcceptFocus :: WindowClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>windowSetAcceptFocus</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
windowGetAcceptFocus :: WindowClass self => self -> IO Bool

-- | Windows may set a hint asking the desktop environment not to receive
--   the input focus when the window is mapped. This function sets this
--   hint.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
windowSetFocusOnMap :: WindowClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>windowSetFocusOnMap</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
windowGetFocusOnMap :: WindowClass self => self -> IO Bool

-- | By default, windows are decorated with a title bar, resize controls,
--   etc. Some window managers allow Gtk+ to disable these decorations,
--   creating a borderless window. If you set the decorated property to
--   <tt>False</tt> using this function, Gtk+ will do its best to convince
--   the window manager not to decorate the window. Depending on the
--   system, this function may not have any effect when called on a window
--   that is already visible, so you should call it before calling
--   <tt>windowShow</tt>.
--   
--   On Windows, this function always works, since there's no window
--   manager policy involved.
windowSetDecorated :: WindowClass self => self -> Bool -> IO ()

-- | Returns whether the window has been set to have decorations such as a
--   title bar via <a>windowSetDecorated</a>.
windowGetDecorated :: WindowClass self => self -> IO Bool

-- | 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 <tt>False</tt> using this function, GTK+ will do
--   its best to convince the window manager not to show a close button.
--   Depending on the system, this function may not have any effect when
--   called on a window that is already visible, so you should call it
--   before calling <tt>windowShow</tt>.
--   
--   On Windows, this function always works, since there's no window
--   manager policy involved.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
windowSetDeletable :: WindowClass self => self -> Bool -> IO ()

-- | Returns whether the window has been set to have a close button via
--   <a>windowSetDeletable</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
windowGetDeletable :: WindowClass self => self -> IO Bool

-- | If this function is called on a window with setting of <tt>True</tt>,
--   before it is realized or showed, it will have a "frame" window around
--   its <a>DrawWindow</a>, accessible using <a>windowGetFrame</a>. Using
--   the signal <tt>windowFrameEvent</tt> you can receive all events
--   targeted at the frame.
--   
--   (Note: this is a special-purpose function for the framebuffer port,
--   that causes GTK+ to draw its own window border. For most applications,
--   you want <a>windowSetDecorated</a> instead, which tells the window
--   manager whether to draw the window border.)
--   
--   This function is used by the 1 -fb port to implement managed windows,
--   but it could conceivably be used by X-programs that want to do their
--   own window decorations.
--   
--   Removed in Gtk3.
windowSetHasFrame :: WindowClass self => self -> Bool -> IO ()

-- | Accessor for whether the window has a frame window exterior to
--   window-&gt;window. Gets the value set by <a>windowSetHasFrame</a>.
--   
--   Removed in Gtk3.
windowGetHasFrame :: WindowClass self => self -> IO Bool

-- | This function is only useful on X11, not with other Gtk+ targets.
--   
--   In combination with the window title, the window role allows a window
--   manager to identify "the same" window when an application is
--   restarted. So for example you might set the "toolbox" role on your
--   app's toolbox window, so that when the user restarts their session,
--   the window manager can put the toolbox back in the same place.
--   
--   If a window already has a unique title, you don't need to set the
--   role, since the WM can use the title to identify the window when
--   restoring the session.
windowSetRole :: (WindowClass self, GlibString string) => self -> string -> IO ()

-- | Returns the role of the window. See <a>windowSetRole</a> for further
--   explanation.
windowGetRole :: (WindowClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets up the icon representing a <a>Window</a>. This icon is used when
--   the window is minimized (also known as iconified). Some window
--   managers or desktop environments may also place it in the window
--   frame, or display it in other contexts.
--   
--   The icon should be provided in whatever size it was naturally drawn;
--   that is, don't scale the image before passing it to Gtk+. Scaling is
--   postponed until the last minute, when the desired final size is known,
--   to allow best quality.
--   
--   If you have your icon hand-drawn in multiple sizes, use
--   <a>windowSetIconList</a>. Then the best size will be used.
--   
--   This function is equivalent to calling <a>windowSetIconList</a> with a
--   1-element list.
--   
--   See also <a>windowSetDefaultIconList</a> to set the icon for all
--   windows in your application in one go.
windowSetIcon :: WindowClass self => self -> Maybe Pixbuf -> IO ()

-- | Sets up the icon representing a <a>Window</a>. The icon is used when
--   the window is minimized (also known as iconified). Some window
--   managers or desktop environments may also place it in the window
--   frame, or display it in other contexts.
--   
--   <a>windowSetIconList</a> allows you to pass in the same icon in
--   several hand-drawn sizes. The list should contain the natural sizes
--   your icon is available in; that is, don't scale the image before
--   passing it to GTK+. Scaling is postponed until the last minute, when
--   the desired final size is known, to allow best quality.
--   
--   By passing several sizes, you may improve the final image quality of
--   the icon, by reducing or eliminating automatic image scaling.
--   
--   Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
--   larger images (64x64, 128x128) if you have them.
--   
--   See also <a>windowSetDefaultIconList</a> to set the icon for all
--   windows in your application in one go.
--   
--   Note that transient windows (those who have been set transient for
--   another window using <a>windowSetTransientFor</a> will inherit their
--   icon from their transient parent. So there's no need to explicitly set
--   the icon on transient windows.
windowSetIconList :: WindowClass self => self -> [Pixbuf] -> IO ()

-- | Retrieves the list of icons set by <a>windowSetIconList</a>.
windowGetIconList :: WindowClass self => self -> IO [Pixbuf]

-- | Sets the icon for the window from a named themed icon. See the docs
--   for <a>IconTheme</a> for more details.
--   
--   Note that this has nothing to do with the WM_ICON_NAME property which
--   is mentioned in the ICCCM.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
windowSetIconName :: (WindowClass self, GlibString string) => self -> string -> IO ()

-- | Returns the name of the themed icon for the window, see
--   <a>windowSetIconName</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
windowGetIconName :: (WindowClass self, GlibString string) => self -> IO string

-- | Windows may set a hint asking the desktop environment to draw the
--   users attention to the window. This function sets this hint.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
windowSetUrgencyHint :: WindowClass self => self -> Bool -> IO ()

-- | Gets the value set by <a>windowSetUrgencyHint</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
windowGetUrgencyHint :: WindowClass self => self -> IO Bool
windowSetOpacity :: WindowClass self => self -> Double -> IO ()

-- | Fetches the requested opacity for this window. See
--   <a>windowSetOpacity</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
windowGetOpacity :: WindowClass self => self -> IO Double

-- | Observe a change in input focus.
onSetFocus :: (WindowClass self, WidgetClass foc) => self -> (Maybe foc -> IO ()) -> IO (ConnectId self)

-- | Observe a change in input focus.
afterSetFocus :: (WindowClass self, WidgetClass foc) => self -> (Maybe foc -> IO ()) -> IO (ConnectId self)
instance Enum GdkWindowHints


-- | A file chooser dialog, suitable for "File/Open" or "File/Save"
--   commands
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.Selectors.FileChooserDialog
data FileChooserDialog
class DialogClass o => FileChooserDialogClass o
castToFileChooserDialog :: GObjectClass obj => obj -> FileChooserDialog
gTypeFileChooserDialog :: GType
toFileChooserDialog :: FileChooserDialogClass o => o -> FileChooserDialog

-- | Creates a new <a>FileChooserDialog</a>.
fileChooserDialogNew :: GlibString string => Maybe string -> Maybe Window -> FileChooserAction -> [(string, ResponseId)] -> IO FileChooserDialog

-- | Creates a new <a>FileChooserDialog</a> with a specified backend. This
--   is especially useful if you use <a>fileChooserSetLocalOnly</a> to
--   allow non-local files and you use a more expressive vfs, such as
--   gnome-vfs, to load files.
fileChooserDialogNewWithBackend :: GlibString string => Maybe string -> Maybe Window -> FileChooserAction -> [(string, ResponseId)] -> string -> IO FileChooserDialog
instance FileChooserClass FileChooserDialog


-- | A widget that displays a small to medium amount of text
module Graphics.UI.Gtk.Display.Label
data Label
class MiscClass o => LabelClass o
castToLabel :: GObjectClass obj => obj -> Label
gTypeLabel :: GType
toLabel :: LabelClass o => o -> Label

-- | Creates a new label with the given text inside it. You can pass
--   <tt>Nothing</tt> to get an empty label widget.
labelNew :: GlibString string => Maybe string -> IO Label

-- | Creates a new <a>Label</a>, containing the text in <tt>str</tt>.
--   
--   If characters in <tt>str</tt> are preceded by an underscore, they are
--   underlined. If you need a literal underscore character in a label, use
--   '__' (two underscores). The first underlined character represents a
--   keyboard accelerator called a mnemonic. The mnemonic key can be used
--   to activate another widget, chosen automatically, or explicitly using
--   <a>labelSetMnemonicWidget</a>.
--   
--   If <a>labelSetMnemonicWidget</a> is not called, then the first
--   activatable ancestor of the <a>Label</a> will be chosen as the
--   mnemonic widget. For instance, if the label is inside a button or menu
--   item, the button or menu item will automatically become the mnemonic
--   widget and be activated by the mnemonic.
labelNewWithMnemonic :: GlibString string => string -> IO Label

-- | Sets the text within the <a>Label</a> widget. It overwrites any text
--   that was there before.
--   
--   This will also clear any previously set mnemonic accelerators.
labelSetText :: (LabelClass self, GlibString string) => self -> string -> IO ()

-- | Sets the text of the label. The label is interpreted as including
--   embedded underlines and/or Pango markup depending on the markup and
--   underline properties.
labelSetLabel :: (LabelClass self, GlibString string) => self -> string -> IO ()

-- | Sets the label's text from the given string. If characters in the
--   string are preceded by an underscore, they are underlined indicating
--   that they represent a keyboard accelerator called a mnemonic. The
--   mnemonic key can be used to activate another widget, chosen
--   automatically, or explicitly using <a>labelSetMnemonicWidget</a>.
labelSetTextWithMnemonic :: (LabelClass self, GlibString string) => self -> string -> IO ()

-- | Parses <tt>str</tt> which is marked up with the Pango text markup
--   language, as defined in <a>Graphics.Rendering.Pango.Markup</a>,
--   setting the label's text and attribute list based on the parse
--   results. If the <tt>str</tt> is external data, you may need to escape
--   it.
labelSetMarkup :: (LabelClass self, GlibString markup) => self -> markup -> IO ()

-- | Parses <tt>str</tt> which is marked up with the Pango text markup
--   language, as defined in <a>Graphics.Rendering.Pango.Markup</a>,
--   setting the label's text and attribute list based on the parse
--   results. If characters in <tt>str</tt> are preceded by an underscore,
--   they are underlined indicating that they represent a keyboard
--   accelerator called a mnemonic.
--   
--   The mnemonic key can be used to activate another widget, chosen
--   automatically, or explicitly using <a>labelSetMnemonicWidget</a>.
labelSetMarkupWithMnemonic :: (LabelClass self, GlibString markup) => self -> markup -> IO ()

-- | If the label has been set so that it has an mnemonic key (using i.e.
--   <a>labelSetMarkupWithMnemonic</a>, <a>labelSetTextWithMnemonic</a>,
--   <a>labelNewWithMnemonic</a> or the "use_underline" property) the label
--   can be associated with a widget that is the target of the mnemonic.
--   When the label is inside a widget (like a <a>Button</a> or a
--   <a>Notebook</a> tab) it is automatically associated with the correct
--   widget, but sometimes (i.e. when the target is a <a>Entry</a> next to
--   the label) you need to set it explicitly using this function.
--   
--   The target widget will be accelerated by emitting "mnemonic_activate"
--   on it. The default handler for this signal will activate the widget if
--   there are no mnemonic collisions and toggle focus between the
--   colliding widgets otherwise.
labelSetMnemonicWidget :: (LabelClass self, WidgetClass widget) => self -> widget -> IO ()

-- | Retrieves the target of the mnemonic (keyboard shortcut) of this
--   label. See <a>labelSetMnemonicWidget</a>.
labelGetMnemonicWidget :: LabelClass self => self -> IO (Maybe Widget)

-- | Key values are the codes which are sent whenever a key is pressed or
--   released.
type KeyVal = Word32

-- | If the label has been set so that it has an mnemonic key this function
--   returns the keyval used for the mnemonic accelerator.
labelGetMnemonicKeyval :: LabelClass self => self -> IO KeyVal

-- | Sets whether the text of the label contains markup in Pango's text
--   markup language. See <a>labelSetMarkup</a>.
labelSetUseMarkup :: LabelClass self => self -> Bool -> IO ()

-- | Returns whether the label's text is interpreted as marked up with the
--   Pango text markup language. See <a>labelSetUseMarkup</a>.
labelGetUseMarkup :: LabelClass self => self -> IO Bool

-- | If <tt>True</tt>, an underline in the text indicates the next
--   character should be used for the mnemonic accelerator key.
labelSetUseUnderline :: LabelClass self => self -> Bool -> IO ()

-- | Returns whether an embedded underline in the label indicates a
--   mnemonic. See <a>labelSetUseUnderline</a>.
labelGetUseUnderline :: LabelClass self => self -> IO Bool

-- | Gets the text from a label widget, as displayed on the screen. This
--   does not include any embedded underlines indicating mnemonics or Pango
--   markup. (See <a>labelGetLabel</a>)
labelGetText :: (LabelClass self, GlibString string) => self -> IO string

-- | Gets the text from a label widget including any embedded underlines
--   indicating mnemonics and Pango markup. (See <a>labelGetText</a>).
labelGetLabel :: (LabelClass self, GlibString string) => self -> IO string

-- | Sets a PangoAttrList; the attributes in the list are applied to the
--   label text.
--   
--   Note: The attributes set with this function will be applied and merged
--   with any other attributes previously effected by way of the
--   <a>labelUseUnderline</a> or <a>labelUseMarkup</a> properties. While it
--   is not recommended to mix markup strings with manually set attributes,
--   if you must; know that the attributes will be applied to the label
--   after the markup string is parsed.
labelSetAttributes :: LabelClass self => self -> [PangoAttribute] -> IO ()

-- | Gets the attribute list that was set on the label using
--   <a>labelSetAttributes</a>, if any. This function does not reflect
--   attributes that come from the labels markup (see
--   <a>labelSetMarkup</a>). If you want to get the effective attributes
--   for the label, use <a>layoutGetAttributes</a> (<a>labelGetLayout</a>
--   (label)).
labelGetAttributes :: LabelClass self => self -> IO [PangoAttribute]

-- | Underline parts of the text, odd indices of the list represent
--   underlined parts.
labelSetPattern :: LabelClass l => l -> [Int] -> IO ()

-- | Justification for label and maybe other widgets (text?)
data Justification
[JustifyLeft] :: Justification
[JustifyRight] :: Justification
[JustifyCenter] :: Justification
[JustifyFill] :: Justification

-- | Sets the alignment of the lines in the text of the label relative to
--   each other. <a>JustifyLeft</a> is the default value when the widget is
--   first created with <a>labelNew</a>. If you instead want to set the
--   alignment of the label as a whole, use <a>miscSetAlignment</a>
--   instead. <a>labelSetJustify</a> has no effect on labels containing
--   only a single line.
labelSetJustify :: LabelClass self => self -> Justification -> IO ()

-- | Returns the justification of the label. See <a>labelSetJustify</a>.
labelGetJustify :: LabelClass self => self -> IO Justification

-- | Gets the <a>PangoLayout</a> used to display the label. The layout is
--   useful to e.g. convert text positions to pixel positions, in
--   combination with <a>labelGetLayoutOffsets</a>.
labelGetLayout :: LabelClass self => self -> IO PangoLayout

-- | Toggles line wrapping within the <a>Label</a> widget. <tt>True</tt>
--   makes it break lines if text exceeds the widget's size. <tt>False</tt>
--   lets the text get cut off by the edge of the widget if it exceeds the
--   widget size.
labelSetLineWrap :: LabelClass self => self -> Bool -> IO ()

-- | Returns whether lines in the label are automatically wrapped. See
--   <a>labelSetLineWrap</a>.
labelGetLineWrap :: LabelClass self => self -> IO Bool

-- | If line wrapping is on (see <a>labelSetLineWrap</a>) this controls how
--   the line wrapping is done. The default is <a>WrapWholeWords</a> which
--   means wrap on word boundaries.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
labelSetLineWrapMode :: LabelClass self => self -> LayoutWrapMode -> IO ()

-- | Returns line wrap mode used by the label. See
--   <a>labelSetLineWrapMode</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
labelGetLineWrapMode :: LabelClass self => self -> IO LayoutWrapMode

-- | Selectable labels allow the user to select text from the label, for
--   copy-and-paste.
labelSetSelectable :: LabelClass self => self -> Bool -> IO ()

-- | Gets whether the text selectable.
labelGetSelectable :: LabelClass self => self -> IO Bool

-- | Selects a range of characters in the label, if the label is
--   selectable. See <a>labelSetSelectable</a>. If the label is not
--   selectable, this function has no effect. If <tt>startOffset</tt> or
--   <tt>endOffset</tt> are -1, then the end of the label will be
--   substituted.
labelSelectRegion :: LabelClass self => self -> Int -> Int -> IO ()

-- | Gets the selected range of characters in the label, if any. If there
--   is a range selected the result is the start and end of the selection
--   as character offsets.
labelGetSelectionBounds :: LabelClass self => self -> IO (Maybe (Int, Int))

-- | Obtains the coordinates where the label will draw the
--   <a>PangoLayout</a> representing the text in the label; useful to
--   convert mouse events into coordinates inside the <a>PangoLayout</a>,
--   e.g. to take some action if some part of the label is clicked. Of
--   course you will need to create a <a>EventBox</a> to receive the
--   events, and pack the label inside it, since labels are a 'NoWindow'
--   widget.
labelGetLayoutOffsets :: LabelClass self => self -> IO (Int, Int)

-- | Sets the mode used to ellipsize (add an ellipsis: "...") to the text
--   if there is not enough space to render the entire string.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelSetEllipsize :: LabelClass self => self -> EllipsizeMode -> IO ()

-- | Returns the ellipsizing position of the label. See
--   <a>labelSetEllipsize</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelGetEllipsize :: LabelClass self => self -> IO EllipsizeMode

-- | Sets the desired width in characters of <tt>label</tt> to
--   <tt>nChars</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelSetWidthChars :: LabelClass self => self -> Int -> IO ()

-- | Retrieves the desired width of <tt>label</tt>, in characters. See
--   <a>labelSetWidthChars</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelGetWidthChars :: LabelClass self => self -> IO Int

-- | Sets the desired maximum width in characters of <tt>label</tt> to
--   <tt>nChars</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelSetMaxWidthChars :: LabelClass self => self -> Int -> IO ()

-- | Retrieves the desired maximum width of <tt>label</tt>, in characters.
--   See <a>labelSetWidthChars</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelGetMaxWidthChars :: LabelClass self => self -> IO Int

-- | Sets whether the label is in single line mode.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelSetSingleLineMode :: LabelClass self => self -> Bool -> IO ()

-- | Returns whether the label is in single line mode.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelGetSingleLineMode :: LabelClass self => self -> IO Bool

-- | Sets the angle of rotation for the label. An angle of 90 reads from
--   from bottom to top, an angle of 270, from top to bottom. The angle
--   setting for the label is ignored if the label is selectable, wrapped,
--   or ellipsized.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelSetAngle :: LabelClass self => self -> Double -> IO ()

-- | Gets the angle of rotation for the label. See gtk_label_set_angle.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
labelGetAngle :: LabelClass self => self -> IO Double

-- | The text of the label.
labelLabel :: (LabelClass self, GlibString string) => Attr self string

-- | The text of the label includes XML markup. See pango_parse_markup().
--   
--   Default value: <tt>False</tt>
labelUseMarkup :: LabelClass self => Attr self Bool

-- | If set, an underline in the text indicates the next character should
--   be used for the mnemonic accelerator key.
--   
--   Default value: <tt>False</tt>
labelUseUnderline :: LabelClass self => Attr self Bool

-- | The alignment of the lines in the text of the label relative to each
--   other. This does NOT affect the alignment of the label within its
--   allocation.
--   
--   Default value: <a>JustifyLeft</a>
labelJustify :: LabelClass self => Attr self Justification

-- | If set, wrap lines if the text becomes too wide.
--   
--   Default value: <tt>False</tt>
labelWrap :: LabelClass self => Attr self Bool

-- | If line wrapping is on (see the <a>labelWrap</a> property) this
--   controls how the line wrapping is done. The default is
--   <a>WrapWholeWords</a>, which means wrap on word boundaries.
--   
--   Default value: <a>WrapWholeWords</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
labelWrapMode :: LabelClass self => Attr self LayoutWrapMode

-- | Whether the label text can be selected with the mouse.
--   
--   Default value: <tt>False</tt>
labelSelectable :: LabelClass self => Attr self Bool

-- | The widget to be activated when the label's mnemonic key is pressed.
labelMnemonicWidget :: (LabelClass self, WidgetClass widget) => ReadWriteAttr self (Maybe Widget) widget

-- | The mnemonic accelerator key for this label.
--   
--   Default value: 16777215
labelMnemonicKeyval :: LabelClass self => ReadAttr self Int

-- | A string with _ characters in positions correspond to characters in
--   the text to underline.
--   
--   Default value: "\"
labelPattern :: (LabelClass self, GlibString string) => WriteAttr self string

-- | The current position of the insertion cursor in chars.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
labelCursorPosition :: LabelClass self => ReadAttr self Int

-- | The position of the opposite end of the selection from the cursor in
--   chars.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
labelSelectionBound :: LabelClass self => ReadAttr self Int

-- | The preferred place to ellipsize the string, if the label does not
--   have enough room to display the entire string, specified as a
--   <a>EllipsizeMode</a>.
--   
--   Note that setting this property to a value other than
--   <a>EllipsizeNone</a> has the side-effect that the label requests only
--   enough space to display the ellipsis "...". In particular, this means
--   that ellipsizing labels don't work well in notebook tabs, unless the
--   tab's tab-expand property is set to <tt>True</tt>. Other means to set
--   a label's width are <a>widgetSetSizeRequest</a> and
--   <a>labelSetWidthChars</a>.
--   
--   Default value: <a>EllipsizeNone</a>
labelEllipsize :: LabelClass self => Attr self EllipsizeMode

-- | The desired width of the label, in characters. If this property is set
--   to -1, the width will be calculated automatically, otherwise the label
--   will request either 3 characters or the property value, whichever is
--   greater. If the width-chars property is set to a positive value, then
--   the max-width-chars property is ignored.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
labelWidthChars :: LabelClass self => Attr self Int

-- | Whether the label is in single line mode. In single line mode, the
--   height of the label does not depend on the actual text, it is always
--   set to ascent + descent of the font. This can be an advantage in
--   situations where resizing the label because of text changes would be
--   distracting, e.g. in a statusbar.
--   
--   Default value: <tt>False</tt>
labelSingleLineMode :: LabelClass self => Attr self Bool

-- | The angle that the baseline of the label makes with the horizontal, in
--   degrees, measured counterclockwise. An angle of 90 reads from from
--   bottom to top, an angle of 270, from top to bottom. Ignored if the
--   label is selectable, wrapped, or ellipsized.
--   
--   Allowed values: [0,360]
--   
--   Default value: 0
labelAngle :: LabelClass self => Attr self Double

-- | A list of style attributes to apply to the text of the label.
labelAttributes :: LabelClass self => Attr self [PangoAttribute]

-- | The desired maximum width of the label, in characters. If this
--   property is set to -1, the width will be calculated automatically,
--   otherwise the label will request space for no more than the requested
--   number of characters. If the width-chars property is set to a positive
--   value, then the max-width-chars property is ignored.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
labelMaxWidthChars :: LabelClass self => Attr self Int

-- | 'lineWrap' property. See <a>labelGetLineWrap</a> and
--   <a>labelSetLineWrap</a>
labelLineWrap :: LabelClass self => Attr self Bool

-- | 'text' property. See <a>labelGetText</a> and <a>labelSetText</a>
labelText :: (LabelClass self, GlibString string) => Attr self string

-- | The <a>labelActiveCurrentLink</a> signal a keybinding signal which
--   gets emitted when the user activates a link in the label.
labelActiveCurrentLink :: LabelClass self => Signal self (IO ())

-- | The <a>labelActiveLink</a> signal is emitted when a URI is activated.
--   Default is to use showURI.
labelActiveLink :: (LabelClass self, GlibString string) => Signal self (string -> IO ())

-- | The <a>labelCopyClipboard</a> signal is a keybinding signal which gets
--   emitted to copy the selection to the clipboard.
labelCopyClipboard :: LabelClass self => Signal self (IO ())

-- | The <a>labelMoveCursor</a> signal is a keybinding signal which gets
--   emitted when the user initiates a cursor movement. If the cursor is
--   not visible in label, this signal causes the viewport to be moved
--   instead.
--   
--   Applications should not connect to it, but may emit it with
--   <tt>signalEmitByName</tt> if they need to control the cursor
--   programmatically.
--   
--   The default bindings for this signal come in two variants, the variant
--   with the Shift modifier extends the selection, the variant without the
--   Shift modifer does not. There are too many key combinations to list
--   them all here.
--   
--   <ul>
--   <li>Arrow keys move by individual characters/lines</li>
--   <li>Ctrl-arrow key combinations move by words/paragraphs</li>
--   <li>Home/End keys move to the ends of the buffer</li>
--   </ul>
labelMoveCursor :: LabelClass self => Signal self (MovementStep -> Int -> Bool -> IO ())

-- | The <a>labelPopulatePopup</a> signal gets emitted before showing the
--   context menu of the label.
--   
--   If you need to add items to the context menu, connect to this signal
--   and append your menuitems to the menu.
labelPopulatePopup :: LabelClass self => Signal self (Menu -> IO ())


-- | A tabbed notebook container
module Graphics.UI.Gtk.Layout.Notebook
data Notebook
class ContainerClass o => NotebookClass o
data NotebookPage
castToNotebook :: GObjectClass obj => obj -> Notebook
gTypeNotebook :: GType
toNotebook :: NotebookClass o => o -> Notebook

-- | Creates a new <a>Notebook</a> widget with no pages.
notebookNew :: IO Notebook

-- | Appends a page to <tt>notebook</tt>.
--   
--   The given label will be used for the label widget of the new tab. In
--   case the context menu is enabled, this name will also appear in the
--   popup menu. If you want to specify something else to go in the tab,
--   use <a>notebookAppendPageMenu</a>.
--   
--   <ul>
--   <li>This function returned <tt>()</tt> in Gtk+ version 2.2.X and
--   earlier</li>
--   </ul>
notebookAppendPage :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO Int

-- | Appends a page to <tt>notebook</tt>, specifying the widget to use as
--   the label in the popup menu.
--   
--   Like <a>notebookAppendPage</a> but allows any widget to be used for
--   the label of the new tab and the entry in the page-switch popup menu.
--   
--   <ul>
--   <li>This function returned <tt>()</tt> in Gtk version 2.2.X and
--   earlier</li>
--   </ul>
notebookAppendPageMenu :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) => self -> child -> tabLabel -> menuLabel -> IO Int

-- | Prepends a page to <tt>notebook</tt>.
--   
--   <ul>
--   <li>The given label will be used for the label widget of the new tab.
--   In case the context menu is enabled, this name will also appear in the
--   popup menu. If you want to specify something else to go in the tab,
--   use <a>notebookPrependPageMenu</a>.</li>
--   <li>This function returned <tt>()</tt> in Gtk version 2.2.X and
--   earlier</li>
--   </ul>
notebookPrependPage :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO Int

-- | Prepends a page to <tt>notebook</tt>, specifying the widget to use as
--   the label in the popup menu.
--   
--   Like <a>notebookPrependPage</a> but allows any widget to be used for
--   the label of the new tab and then entry in the page-switch popup menu.
--   
--   <ul>
--   <li>This function returned <tt>()</tt> in Gtk version 2.2.X and
--   earlier</li>
--   </ul>
notebookPrependPageMenu :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) => self -> child -> tabLabel -> menuLabel -> IO Int

-- | Insert a page into <tt>notebook</tt> at the given position.
--   
--   <ul>
--   <li>The given label will be used for the label widget of the new tab.
--   In case the context menu is enabled, this name will also appear in the
--   popup menu. If you want to specify something else to go in the tab,
--   use <a>notebookInsertPageMenu</a>.</li>
--   <li>This function returned <tt>()</tt> in Gtk version 2.2.X and
--   earlier</li>
--   </ul>
notebookInsertPage :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> Int -> IO Int

-- | Insert a page into <tt>notebook</tt> at the given position, specifying
--   the widget to use as the label in the popup menu.
--   
--   Like <a>notebookInsertPage</a> but allows any widget to be used for
--   the label of the new tab and then entry in the page-switch popup menu.
--   
--   <ul>
--   <li>This function returned <tt>()</tt> in Gtk version 2.2.X and
--   earlier</li>
--   </ul>
notebookInsertPageMenu :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) => self -> child -> tabLabel -> menuLabel -> Int -> IO Int

-- | Removes a page from the notebook given its index in the notebook.
notebookRemovePage :: NotebookClass self => self -> Int -> IO ()

-- | Query the page the child widget is contained in.
--   
--   <ul>
--   <li>The function returns the page number if the child was found,
--   Nothing otherwise.</li>
--   </ul>
notebookPageNum :: (NotebookClass self, WidgetClass w) => self -> w -> IO (Maybe Int)

-- | Switches to the page number <tt>pageNum</tt>. Page numbers start from
--   <tt>0</tt>. Use <tt>-1</tt> to request the last page.
--   
--   <ul>
--   <li>Note that due to historical reasons, GtkNotebook refuses to switch
--   to a page unless the child widget is visible. Therefore, it is
--   recommended to show child widgets before adding them to a
--   notebook.</li>
--   </ul>
notebookSetCurrentPage :: NotebookClass self => self -> Int -> IO ()

-- | Switches to the next page. Nothing happens if the current page is the
--   last page.
notebookNextPage :: NotebookClass self => self -> IO ()

-- | Switches to the previous page. Nothing happens if the current page is
--   the first page.
notebookPrevPage :: NotebookClass self => self -> IO ()

-- | Reorders the page containing <tt>child</tt>, so that it appears in
--   position <tt>position</tt>. If <tt>position</tt> is greater than or
--   equal to the number of children in the list or negative,
--   <tt>child</tt> will be moved to the end of the list.
notebookReorderChild :: (NotebookClass self, WidgetClass child) => self -> child -> Int -> IO ()

-- | Position a scale's value is drawn relative to the trough
data PositionType
[PosLeft] :: PositionType
[PosRight] :: PositionType
[PosTop] :: PositionType
[PosBottom] :: PositionType

-- | Sets the edge at which the tabs for switching pages in the notebook
--   are drawn.
notebookSetTabPos :: NotebookClass self => self -> PositionType -> IO ()

-- | Gets the edge at which the tabs for switching pages in the notebook
--   are drawn.
notebookGetTabPos :: NotebookClass self => self -> IO PositionType

-- | Sets whether to show the tabs for the notebook or not.
notebookSetShowTabs :: NotebookClass self => self -> Bool -> IO ()

-- | Returns whether the tabs of the notebook are shown. See
--   <a>notebookSetShowTabs</a>.
notebookGetShowTabs :: NotebookClass self => self -> IO Bool

-- | Sets whether a bevel will be drawn around the notebook pages. This
--   only has a visual effect when the tabs are not shown. See
--   <a>notebookSetShowTabs</a>.
notebookSetShowBorder :: NotebookClass self => self -> Bool -> IO ()

-- | Returns whether a bevel will be drawn around the notebook pages. See
--   <a>notebookSetShowBorder</a>.
notebookGetShowBorder :: NotebookClass self => self -> IO Bool

-- | Sets whether the tab label area will have arrows for scrolling if
--   there are too many tabs to fit in the area.
notebookSetScrollable :: NotebookClass self => self -> Bool -> IO ()

-- | Returns whether the tab label area has arrows for scrolling. See
--   <a>notebookSetScrollable</a>.
notebookGetScrollable :: NotebookClass self => self -> IO Bool

-- | Sets the width the border around the tab labels in a notebook. This is
--   equivalent to calling <tt><a>notebookSetTabHBorder</a> notebook
--   borderWidth</tt> followed by <tt><a>notebookSetTabVBorder</a> notebook
--   borderWidth</tt>.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
notebookSetTabBorder :: NotebookClass self => self -> Int -> IO ()

-- | Sets the width of the horizontal border of tab labels.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
notebookSetTabHBorder :: NotebookClass self => self -> Int -> IO ()

-- | Sets the width of the vertical border of tab labels.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
notebookSetTabVBorder :: NotebookClass self => self -> Int -> IO ()

-- | Enables or disables the popup menu: if the user clicks with the right
--   mouse button on the bookmarks, a menu with all the pages will be
--   popped up.
notebookSetPopup :: NotebookClass self => self -> Bool -> IO ()

-- | Returns the page number of the current page.
notebookGetCurrentPage :: NotebookClass self => self -> IO Int

-- | Changes the menu label for the page containing <tt>child</tt>.
notebookSetMenuLabel :: (NotebookClass self, WidgetClass child, WidgetClass menuLabel) => self -> child -> Maybe menuLabel -> IO ()

-- | Retrieves the menu label widget of the page containing <tt>child</tt>.
notebookGetMenuLabel :: (NotebookClass self, WidgetClass child) => self -> child -> IO (Maybe Widget)

-- | Creates a new label and sets it as the menu label of <tt>child</tt>.
notebookSetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO ()

-- | Retrieves the text of the menu label for the page containing
--   <tt>child</tt>.
notebookGetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> IO (Maybe string)

-- | Returns the child widget contained in page number <tt>pageNum</tt>.
notebookGetNthPage :: NotebookClass self => self -> Int -> IO (Maybe Widget)

-- | Gets the number of pages in a notebook.
--   
--   <ul>
--   <li>Available since Gtk version 2.2</li>
--   </ul>
notebookGetNPages :: NotebookClass self => self -> IO Int

-- | Returns the tab label widget for the page <tt>child</tt>.
--   <tt>Nothing</tt> is returned if <tt>child</tt> is not in
--   <tt>notebook</tt> or if no tab label has specifically been set for
--   <tt>child</tt>.
notebookGetTabLabel :: (NotebookClass self, WidgetClass child) => self -> child -> IO (Maybe Widget)

-- | Retrieves the text of the tab label for the page containing
--   <tt>child</tt>.
notebookGetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> IO (Maybe string)

-- | Packing parameters of a widget
--   
--   <ul>
--   <li>The <a>Packing</a> parameter determines how the child behaves in
--   the horizontal or vertical way in an <a>HBox</a> or <a>VBox</a>,
--   respectively. <a>PackNatural</a> means the child is as big as it
--   requests. It will stay at the start or end of a <a>Box</a> if there is
--   more space available. All children packed with <a>PackRepel</a> will
--   be padded on both sides with additional space. <a>PackGrow</a> will
--   increase the size of a widget so that it covers the available space. A
--   menu bar, for instance, should always stay at the top of a window and
--   should only occupy as little space as possible. Hence it should be
--   packed at the start of a <a>VBox</a> with the packing option
--   <a>PackNatural</a>. The working area of a window (e.g. the text area
--   in an editor) should expand when the window is resized. Here the
--   packing option <a>PackGrow</a> is the right choice and it is
--   irrelevant whether the main area is inserted at the start or the end
--   of a box. Finally <a>PackRepel</a> 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.</li>
--   </ul>
data Packing
[PackRepel] :: Packing
[PackGrow] :: Packing
[PackNatural] :: Packing

-- | Packing of widgets at start or end in a box
data PackType
[PackStart] :: PackType
[PackEnd] :: PackType

-- | Query the packing attributes for the tab label of the page containing
--   <tt>child</tt>.
--   
--   Removed in Gtk3.
notebookQueryTabLabelPacking :: (NotebookClass self, WidgetClass child) => self -> child -> IO (Packing, PackType)

-- | Sets the packing parameters for the tab label of the page containing
--   <tt>child</tt>. See <a>boxPackStart</a> for the exact meaning of the
--   parameters.
--   
--   Removed in Gtk3.
notebookSetTabLabelPacking :: (NotebookClass self, WidgetClass child) => self -> child -> Packing -> PackType -> IO ()

-- | Sets whether the tabs must have all the same size or not.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
notebookSetHomogeneousTabs :: NotebookClass self => self -> Bool -> IO ()

-- | Changes the tab label for <tt>child</tt>.
notebookSetTabLabel :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel) => self -> child -> tabLabel -> IO ()

-- | Creates a new label and sets it as the tab label for the page
--   containing <tt>child</tt>.
notebookSetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO ()

-- | Sets whether the notebook tab can be reordered via drag and drop or
--   not.
--   
--   <ul>
--   <li>Available since Gtk version 2.10</li>
--   </ul>
notebookSetTabReorderable :: (NotebookClass self, WidgetClass child) => self -> child -> Bool -> IO ()

-- | Gets whether the tab can be reordered via drag and drop or not.
--   
--   <ul>
--   <li>Available since Gtk version 2.10</li>
--   </ul>
notebookGetTabReorderable :: (NotebookClass self, WidgetClass child) => self -> child -> IO Bool

-- | Sets whether the tab can be detached from notebook to another notebook
--   or widget.
--   
--   Note that 2 notebooks must share a common group identificator (see
--   gtk_notebook_set_group_id()) to allow automatic tabs interchange
--   between them.
--   
--   If you want a widget to interact with a notebook through DnD (i.e.:
--   accept dragged tabs from it) it must be set as a drop destination and
--   accept the target <a>GTK_NOTEBOOK_TAB</a>. The notebook will fill the
--   selection with a GtkWidget** pointing to the child widget that
--   corresponds to the dropped tab.
--   
--   If you want a notebook to accept drags from other widgets, you will
--   have to set your own DnD code to do it.
--   
--   <ul>
--   <li>Available since Gtk version 2.10</li>
--   </ul>
notebookSetTabDetachable :: (NotebookClass self, WidgetClass child) => self -> child -> Bool -> IO ()

-- | Returns whether the tab contents can be detached from notebook.
--   
--   <ul>
--   <li>Available since Gtk version 2.10</li>
--   </ul>
notebookGetTabDetachable :: (NotebookClass self, WidgetClass child) => self -> child -> IO Bool

-- | Sets widget as one of the action widgets. Depending on the pack type
--   the widget will be placed before or after the tabs. You can use a
--   <a>Box</a> if you need to pack more than one widget on the same side.
--   
--   Note that action widgets are "internal" children of the notebook and
--   thus not included in the list returned from <tt>containerForeach</tt>.
--   
--   <ul>
--   <li>Available since Gtk version 2.20</li>
--   </ul>
notebookSetActionWidget :: (NotebookClass self, WidgetClass widget) => self -> widget -> PackType -> IO ()

-- | Gets one of the action widgets. See <a>notebookSetActionWidget</a>.
--   
--   <ul>
--   <li>Available since Gtk version 2.20</li>
--   </ul>
notebookGetActionWidget :: NotebookClass self => self -> PackType -> IO (Maybe Widget)

-- | The index of the current page.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
notebookPage :: NotebookClass self => Attr self Int

-- | Which side of the notebook holds the tabs.
--   
--   Default value: <a>PosTop</a>
notebookTabPos :: NotebookClass self => Attr self PositionType

-- | Width of the border around the tab labels.
--   
--   Default value: 2
notebookTabBorder :: NotebookClass self => WriteAttr self Int

-- | Width of the horizontal border of tab labels.
--   
--   Default value: 2
notebookTabHborder :: NotebookClass self => Attr self Int

-- | Width of the vertical border of tab labels.
--   
--   Default value: 2
notebookTabVborder :: NotebookClass self => Attr self Int

-- | Whether tabs should be shown or not.
--   
--   Default value: <tt>True</tt>
notebookShowTabs :: NotebookClass self => Attr self Bool

-- | Whether the border should be shown or not.
--   
--   Default value: <tt>True</tt>
notebookShowBorder :: NotebookClass self => Attr self Bool

-- | If <tt>True</tt>, scroll arrows are added if there are too many tabs
--   to fit.
--   
--   Default value: <tt>False</tt>
notebookScrollable :: NotebookClass self => Attr self Bool

-- | If <tt>True</tt>, pressing the right mouse button on the notebook pops
--   up a menu that you can use to go to a page.
--   
--   Default value: <tt>False</tt>
notebookEnablePopup :: NotebookClass self => Attr self Bool

-- | Whether tabs should have homogeneous sizes.
--   
--   Default value: <tt>False</tt>
notebookHomogeneous :: NotebookClass self => Attr self Bool

-- | Switches to the page number <tt>pageNum</tt>.
--   
--   Note that due to historical reasons, <a>Notebook</a> refuses to switch
--   to a page unless the child widget is visible. Therefore, it is
--   recommended to show child widgets before adding them to a notebook.
--   
--   Returns the page number of the current page.
notebookCurrentPage :: NotebookClass self => Attr self Int

-- | The string displayed on the child's tab label.
--   
--   Default value: <tt>Nothing</tt>
notebookChildTabLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string

-- | The string displayed in the child's menu entry.
--   
--   Default value: <tt>Nothing</tt>
notebookChildMenuLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string

-- | The index of the child in the parent.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: 0
notebookChildPosition :: (NotebookClass self, WidgetClass child) => child -> Attr self Int

-- | The packing style of the child's tab.
--   
--   Default value: <a>PackGrow</a>
notebookChildTabPacking :: (NotebookClass self, WidgetClass child) => child -> Attr self Packing

-- | A <a>PackType</a> indicating whether the child is packed with
--   reference to the start or end of the parent.
--   
--   Default value: <a>PackStart</a>
notebookChildTabPackType :: (NotebookClass self, WidgetClass child) => child -> Attr self PackType

-- | Whether the tab is detachable.
--   
--   Default value: <tt>False</tt>
notebookChildDetachable :: NotebookClass self => Attr self Bool

-- | Whether the tab is reorderable by user action or not.
--   
--   Default value: <tt>False</tt>
notebookChildReorderable :: NotebookClass self => Attr self Bool

-- | Whether to expand the child's tab or not.
--   
--   Default value : <tt>False</tt>
notebookChildTabExpand :: NotebookClass self => Attr self Bool

-- | Whether the child's tab should fill the allocated area or not.
--   
--   Default value : <tt>False</tt>
notebookChildTabFill :: NotebookClass self => Attr self Bool

-- | The <a>notebookStyleArrowSpacing</a> property defines the spacing
--   between the scroll arrows and the tabs.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk version 2.10</li>
--   </ul>
notebookStyleArrowSpacing :: NotebookClass self => ReadAttr self Bool

-- | The <a>notebookStyleHasBackwardStepper</a> property determines whether
--   the standard backward arrow button is displayed.
--   
--   Default value: <tt>True</tt>
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
notebookStyleHasBackwardStepper :: NotebookClass self => ReadAttr self Bool

-- | The <a>notebookStyleHasForwardStepper</a> property determines whether
--   the standard forward arrow button is displayed.
--   
--   Default value : <tt>True</tt>
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
notebookStyleHasForwardStepper :: NotebookClass self => ReadAttr self Bool

-- | The <a>notebookStyleHasSecondaryBackwardStepper</a> property
--   determines whether a second backward arrow button is displayed on the
--   opposite end of the tab area.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
notebookStyleHasSecondaryBackwardStepper :: NotebookClass self => ReadAttr self Bool

-- | The <a>notebookStyleHasSecondaryForwardStepper</a> property determines
--   whether a second forward arrow button is displayed on the opposite end
--   of the tab area.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
notebookStyleHasSecondaryForwardStepper :: NotebookClass self => ReadAttr self Bool

-- | The <a>notebookStyleTabCurvature</a> property defines size of tab
--   curvature.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 1
--   
--   <ul>
--   <li>Available since Gtk version 2.10</li>
--   </ul>
notebookStyleTabCurvature :: NotebookClass self => ReadAttr self Int

-- | The <a>notebookStyleTabOverlap</a> property defines size of tab
--   overlap area.
--   
--   Default value: 2
--   
--   <ul>
--   <li>Available since Gtk version 2.10</li>
--   </ul>
notebookStyleTabOverlap :: NotebookClass self => ReadAttr self Int

-- | Emitted when the user or a function changes the current page.
switchPage :: NotebookClass self => Signal self (Int -> IO ())

-- | The <a>pageAdded</a> signal is emitted in the notebook right after a
--   page is added to the notebook.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
pageAdded :: NotebookClass self => Signal self (Widget -> Int -> IO ())

-- | The <a>pageRemoved</a> signal is emitted in the notebook right after a
--   page is removed from the notebook.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
pageRemoved :: NotebookClass self => Signal self (Widget -> Int -> IO ())

-- | The <a>pageReordered</a> signal is emitted in the notebook right after
--   a page has been reordered.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
pageReordered :: NotebookClass self => Signal self (Widget -> Int -> IO ())

-- | This signal is emitted when a new page is selected.
onSwitchPage :: NotebookClass nb => nb -> (Int -> IO ()) -> IO (ConnectId nb)

-- | This signal is emitted when a new page is selected.
afterSwitchPage :: NotebookClass nb => nb -> (Int -> IO ()) -> IO (ConnectId nb)


-- | Renders a keyboard accelerator in a cell
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.CellRendererAccel
data CellRendererAccel
class CellRendererTextClass o => CellRendererAccelClass o
castToCellRendererAccel :: GObjectClass obj => obj -> CellRendererAccel
toCellRendererAccel :: CellRendererAccelClass o => o -> CellRendererAccel
data CellRendererAccelMode
[CellRendererAccelModeGtk] :: CellRendererAccelMode
[CellRendererAccelModeOther] :: CellRendererAccelMode

-- | Creates a new <a>CellRendererAccel</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererAccelNew :: IO CellRendererAccel

-- | The keyval of the accelerator.
--   
--   Allowed values: &lt;= GMaxint
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererAccelAccelKey :: CellRendererAccelClass self => Attr self Int

-- | The modifier mask of the accelerator.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererAccelAccelMods :: CellRendererAccelClass self => Attr self [Modifier]

-- | The hardware keycode of the accelerator. Note that the hardware
--   keycode is only relevant if the key does not have a keyval. Normally,
--   the keyboard configuration should assign keyvals to all keys.
--   
--   Allowed values: &lt;= GMaxint
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererAccelKeycode :: CellRendererAccelClass self => Attr self Int

-- | Determines if the edited accelerators are GTK+ accelerators. If they
--   are, consumed modifiers are suppressed, only accelerators accepted by
--   GTK+ are allowed, and the accelerators are rendered in the same way as
--   they are in menus.
--   
--   Default value: <a>CellRendererAccelModeGtk</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
cellRendererAccelAccelMode :: CellRendererAccelClass self => Attr self CellRendererAccelMode

-- | Gets emitted when the user has selected a new accelerator.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
accelEdited :: (CellRendererAccelClass self, GlibString string) => Signal self (string -> KeyVal -> Modifier -> KeyCode -> IO ())

-- | Gets emitted when the user has removed the accelerator.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
accelCleared :: (CellRendererAccelClass self, GlibString string) => Signal self (string -> IO ())
instance Show CellRendererAccelMode
instance Eq CellRendererAccelMode
instance Bounded CellRendererAccelMode
instance Enum CellRendererAccelMode


-- | Definiton of a record that contains event information. Deprecated in
--   favor of <a>EventM</a> and not exported by Gtk.hs.
module Graphics.UI.Gtk.Gdk.Events

-- | Keyboard modifiers that are depressed when the user presses a key or a
--   mouse button.
--   
--   <ul>
--   <li>This data type is used to build lists of modifers that were active
--   during an event.</li>
--   <li>The <a>Apple</a> key on Macintoshs is mapped to <a>Alt2</a> and
--   the <a>Meta</a> key (if available).</li>
--   <li>Since Gtk 2.10, there are also <a>Super</a>, <a>Hyper</a> and
--   <a>Meta</a> modifiers which are simply generated from <a>Alt</a> ..
--   <tt>Compose</tt> modifier keys, depending on the mapping used by the
--   windowing system. Due to one key being mapped to e.g. <a>Alt2</a> and
--   <a>Meta</a>, you shouldn't pattern match directly against a certain
--   key but check whether a key is in the list using the <a>elem</a>
--   function, say.</li>
--   </ul>
data Modifier
[Shift] :: Modifier
[Lock] :: Modifier
[Control] :: Modifier
[Alt] :: Modifier
[Alt2] :: Modifier
[Alt3] :: Modifier
[Alt4] :: Modifier
[Alt5] :: Modifier
[Button1] :: Modifier
[Button2] :: Modifier
[Button3] :: Modifier
[Button4] :: Modifier
[Button5] :: Modifier
[Super] :: Modifier
[Hyper] :: Modifier
[Meta] :: Modifier
[Release] :: Modifier
[ModifierMask] :: Modifier

-- | The time (in milliseconds) when an event happened. This is used mostly
--   for ordering events and responses to events.
type TimeStamp = Word32

-- | Represents the current time, and can be used anywhere a time is
--   expected.
currentTime :: TimeStamp

-- | Events that are delivered to a widget.
--   
--   <ul>
--   <li>Any given signal only emits one of these variants as described in
--   <a>Widget</a>. Many events share common attributes:</li>
--   <li>The <a>eventSent</a> attribute is <tt>True</tt> if the event was
--   not created by the user but by another application.</li>
--   <li>The <a>eventTime</a> attribute contains a time in milliseconds
--   when the event happened.</li>
--   <li>The <a>eventX</a> and <a>eventY</a> attributes contain the
--   coordinates relative to the <a>DrawWindow</a> associated with this
--   widget. The values can contain sub-pixel information if the input
--   device is a graphics tablet or the like.</li>
--   <li>The <a>eventModifier</a> attribute denotes what modifier key was
--   pressed during the event.</li>
--   </ul>
data Event

-- | An event that is not in one of the more specific categories below.
--   This includes delete, destroy, map and unmap events. These events have
--   no extra information associated with them.
[Event] :: Bool -> Event
[eventSent] :: Event -> Bool

-- | The expose event.
--   
--   <ul>
--   <li>A region of widget that receives this event needs to be redrawn.
--   This event is the result of revealing part or all of a window or by
--   the application calling functions like
--   <a>widgetQueueDrawArea</a>.</li>
--   </ul>
[Expose] :: Bool -> Rectangle -> Region -> Int -> Event
[eventSent] :: Event -> Bool

-- | A bounding box denoting what needs to be updated. For a more detailed
--   information on the area that needs redrawing, use the next field.
[eventArea] :: Event -> Rectangle

-- | A set of horizontal stripes that denote the invalid area.
[eventRegion] :: Event -> Region

-- | The number of contiguous <a>Expose</a> events following this one. The
--   only use for this is "exposure compression", i.e. handling all
--   contiguous <a>Expose</a> events in one go, though Gdk performs some
--   exposure compression so this is not normally needed.
[eventCount] :: Event -> Int

-- | Mouse motion.
--   
--   <ul>
--   <li>Captures the movement of the mouse cursor while it is within the
--   area of the widget.</li>
--   </ul>
[Motion] :: Bool -> TimeStamp -> Double -> [Modifier] -> Bool -> Double -> Event
[eventSent] :: Event -> Bool

-- | The time of the event in milliseconds.
[eventTime] :: Event -> TimeStamp
[eventX, eventY] :: Event -> Double
[eventModifier] :: Event -> [Modifier]

-- | Indicate if this event is only a hint of the motion.
--   
--   <ul>
--   <li>If the <a>PointerMotionHintMask</a> is set with
--   <a>widgetAddEvents</a> then mouse positions are only generated each
--   time <a>drawWindowGetPointer</a> is called. In this case
--   <a>eventIsHint</a> is set to <tt>True</tt>.</li>
--   </ul>
[eventIsHint] :: Event -> Bool

-- | The coordinates of the click relative to the screen origin.

-- | The coordinates of the click relative to the screen origin.
[eventXRoot, eventYRoot] :: Event -> Double

-- | A mouse button was pressed or released.
--   
--   <ul>
--   <li>This event is triggered if the mouse button was pressed or
--   released while the mouse cursor was within the region of the
--   widget.</li>
--   </ul>
[Button] :: Bool -> Click -> TimeStamp -> Double -> [Modifier] -> MouseButton -> Double -> Event
[eventSent] :: Event -> Bool

-- | The kind of button press, see <a>Click</a>. Note that double clicks
--   will trigger this event with <a>eventClick</a> set to
--   <a>SingleClick</a>, <a>ReleaseClick</a>, <a>SingleClick</a>,
--   <a>DoubleClick</a>, <a>ReleaseClick</a>. Triple clicks will produce
--   this sequence followed by <a>SingleClick</a>, <a>DoubleClick</a>,
--   <a>TripleClick</a>, <a>ReleaseClick</a>.
[eventClick] :: Event -> Click

-- | The time of the event in milliseconds.
[eventTime] :: Event -> TimeStamp
[eventX, eventY] :: Event -> Double
[eventModifier] :: Event -> [Modifier]

-- | The button that was pressed.
[eventButton] :: Event -> MouseButton

-- | The coordinates of the click relative to the screen origin.

-- | The coordinates of the click relative to the screen origin.
[eventXRoot, eventYRoot] :: Event -> Double

-- | A key was pressed while the widget had the input focus.
--   
--   <ul>
--   <li>If the widget has the current input focus (see
--   <a>widgetSetCanFocus</a>) it will receive key pressed events. Certain
--   key combinations are of no interest to a normal widget like Alt-F to
--   access the file menu. For all these keys, the handler must return
--   <tt>False</tt> to indicate that the key stroke should be propagated to
--   the parent widget. At the top-level widget, keyboard shortcuts like
--   Alt-F are turned into the corresponding signals.</li>
--   </ul>
[Key] :: Bool -> Bool -> TimeStamp -> [Modifier] -> Bool -> Bool -> Bool -> KeyVal -> DefaultGlibString -> Maybe Char -> Event

-- | This flag is set if the key was released. This flag makes it possible
--   to connect the same handler to <a>onKeyPress</a> and
--   <a>onKeyRelease</a>.
[eventRelease] :: Event -> Bool
[eventSent] :: Event -> Bool

-- | The time of the event in milliseconds.
[eventTime] :: Event -> TimeStamp
[eventModifier] :: Event -> [Modifier]

-- | This flag is <tt>True</tt> if Caps Lock is on while this key was
--   pressed.
[eventWithCapsLock] :: Event -> Bool

-- | This flag is <tt>True</tt> if Number Lock is on while this key was
--   pressed.
[eventWithNumLock] :: Event -> Bool

-- | This flag is <tt>True</tt> if Scroll Lock is on while this key was
--   pressed.
[eventWithScrollLock] :: Event -> Bool

-- | A number representing the key that was pressed or released. A more
--   convenient interface is provided by the next two fields.
[eventKeyVal] :: Event -> KeyVal

-- | A string representing the key that was pressed or released.
--   
--   <ul>
--   <li>This string contains a description of the key rather than what
--   should appear on screen. For example, pressing "1" on the keypad
--   results in <a>KP_1</a>. Of particular interest are <a>F1</a> till
--   <a>F12</a>, for a complete list refer to "<a>gdk/gdkkeysyms.h</a>"
--   where all possible values are defined. The corresponding strings are
--   the constants without the GDK_ prefix.</li>
--   </ul>
[eventKeyName] :: Event -> DefaultGlibString

-- | A character matching the key that was pressed.
--   
--   <ul>
--   <li>This entry can be used to build up a whole input string. The
--   character is <tt>Nothing</tt> if the key does not correspond to a
--   simple unicode character.</li>
--   </ul>
[eventKeyChar] :: Event -> Maybe Char

-- | Mouse cursor crossing event.
--   
--   <ul>
--   <li>This event indicates that the mouse cursor is hovering over this
--   widget. It is used to set a widget into the pre-focus state where some
--   GUI elements like buttons on a toolbar change their appearance.</li>
--   </ul>
[Crossing] :: Bool -> TimeStamp -> Double -> Double -> Bool -> CrossingMode -> NotifyType -> [Modifier] -> Event
[eventSent] :: Event -> Bool

-- | The time of the event in milliseconds.
[eventTime] :: Event -> TimeStamp
[eventX, eventY] :: Event -> Double

-- | The coordinates of the click relative to the screen origin.

-- | The coordinates of the click relative to the screen origin.
[eventXRoot, eventYRoot] :: Event -> Double

-- | This flag is false if the widget was entered, it is true when the
--   widget the mouse cursor left the widget.
[eventLeaves] :: Event -> Bool

-- | Kind of enter/leave event.
--   
--   <ul>
--   <li>The mouse cursor might enter this widget because it grabs the
--   mouse cursor for e.g. a modal dialog box.</li>
--   </ul>
[eventCrossingMode] :: Event -> CrossingMode

-- | Information on from what level of the widget hierarchy the mouse
--   cursor came.
--   
--   <ul>
--   <li>See <a>NotifyType</a>.</li>
--   </ul>
[eventNotifyType] :: Event -> NotifyType
[eventModifier] :: Event -> [Modifier]

-- | Gaining or loosing input focus.
[Focus] :: Bool -> Bool -> Event
[eventSent] :: Event -> Bool

-- | This flag is <tt>True</tt> if the widget receives the focus and
--   <tt>False</tt> if it just lost the input focus.
[eventInFocus] :: Event -> Bool

-- | The widget's size has changed.
--   
--   <ul>
--   <li>In response to this event the application can allocate resources
--   that are specific to the size of the widget. It is emitted when the
--   widget is shown the first time and on every resize.</li>
--   </ul>
[Configure] :: Bool -> Int -> Int -> Int -> Int -> Event
[eventSent] :: Event -> Bool

-- | Position within the parent window.
[eventXParent] :: Event -> Int

-- | Position within the parent window.
[eventYParent] :: Event -> Int
[eventWidth] :: Event -> Int
[eventHeight] :: Event -> Int

-- | Change of visibility of a widget.
[Visibility] :: Bool -> VisibilityState -> Event
[eventSent] :: Event -> Bool

-- | Denote what portions of the widget is visible.
[eventVisible] :: Event -> VisibilityState

-- | Wheel movement of the mouse.
--   
--   <ul>
--   <li>This action denotes that the content of the widget should be
--   scrolled. The event is triggered by the movement of the mouse wheel.
--   Surrounding scroll bars are independant of this signal. Most mice do
--   not have buttons for horizontal scrolling, hence <a>eventDirection</a>
--   will usually not contain <a>ScrollLeft</a> and <a>ScrollRight</a>.
--   Mice with additional buttons may not work on X since only five buttons
--   are supported (the three main buttons and two for the wheel).</li>
--   <li>The handler of this signal should update the scroll bars that
--   surround this widget which in turn tell this widget to update.</li>
--   </ul>
[Scroll] :: Bool -> TimeStamp -> Double -> ScrollDirection -> Double -> Event
[eventSent] :: Event -> Bool

-- | The time of the event in milliseconds.
[eventTime] :: Event -> TimeStamp
[eventX, eventY] :: Event -> Double
[eventDirection] :: Event -> ScrollDirection

-- | The coordinates of the click relative to the screen origin.

-- | The coordinates of the click relative to the screen origin.
[eventXRoot, eventYRoot] :: Event -> Double

-- | Indicate how the appearance of this window has changed.
[WindowState] :: Bool -> [WindowState] -> [WindowState] -> Event
[eventSent] :: Event -> Bool

-- | The mask indicates which flags have changed.
[eventWindowMask] :: Event -> [WindowState]

-- | The state indicates the current state of the window.
[eventWindowState] :: Event -> [WindowState]

-- | The state of the pen of a graphics tablet pen or touchscreen device.
[Proximity] :: Bool -> TimeStamp -> Bool -> Event
[eventSent] :: Event -> Bool

-- | The time of the event in milliseconds.
[eventTime] :: Event -> TimeStamp

-- | Whether the stylus has moved in or out of contact with the tablet.
[eventInContact] :: Event -> Bool

-- | An event that contains information on a button press.
type EventButton = Event

-- | An event that contains information on scrolling.
type EventScroll = Event

-- | An event that contains information on the movement of the mouse
--   pointer.
type EventMotion = Event

-- | An area of the <tt>DrawWindow</tt> needs redrawing.
type EventExpose = Event

-- | An event that contains information about a key press.
type EventKey = Event

-- | An event that contains the new size of a window.
type EventConfigure = Event

-- | Generated when the pointer enters or leaves a window.
type EventCrossing = Event

-- | An event that informs about a change of the input focus.
type EventFocus = Event

-- | An event that indicates a property of the window changed.
type EventProperty = Event

-- | An event that indicates that the pen of a graphics table is touching
--   or not touching the tablet.
type EventProximity = Event

-- | Parts of the window have been exposed or obscured.
type EventVisibility = Event

-- | The window state has changed.
type EventWindowState = Event

-- | A grab has been broken by unusual means.
type EventGrabBroken = Event
marshExposeRect :: Ptr Event -> IO Rectangle
marshalEvent :: Ptr Event -> IO Event
data VisibilityState
[VisibilityUnobscured] :: VisibilityState
[VisibilityPartialObscured] :: VisibilityState
[VisibilityFullyObscured] :: VisibilityState

-- | How focus is crossing the widget.
data CrossingMode
[CrossingNormal] :: CrossingMode
[CrossingGrab] :: CrossingMode
[CrossingUngrab] :: CrossingMode
[CrossingGtkGrab] :: CrossingMode
[CrossingGtkUngrab] :: CrossingMode
[CrossingStateChanged] :: CrossingMode

-- | Information on from what level of the widget hierarchy the mouse
--   cursor came.
--   
--   <ul>
--   <li><i><a>NotifyAncestor</a></i> The window is entered from an
--   ancestor or left towards an ancestor.</li>
--   <li><i><a>NotifyVirtual</a></i> The pointer moves between an ancestor
--   and an inferior of the window.</li>
--   <li><i><a>NotifyInferior</a></i> The window is entered from an
--   inferior or left towards an inferior.</li>
--   <li><i><a>NotifyNonlinear</a></i> The window is entered from or left
--   towards a window which is neither an ancestor nor an inferior.</li>
--   <li><i><a>NotifyNonlinearVirtual</a></i> The pointer moves between two
--   windows which are not ancestors of each other and the window is part
--   of the ancestor chain between one of these windows and their least
--   common ancestor.</li>
--   <li><i><a>NotifyUnknown</a></i> The level change does not fit into any
--   of the other categories or could not be determined.</li>
--   </ul>
data NotifyType
[NotifyAncestor] :: NotifyType
[NotifyVirtual] :: NotifyType
[NotifyInferior] :: NotifyType
[NotifyNonlinear] :: NotifyType
[NotifyNonlinearVirtual] :: NotifyType
[NotifyUnknown] :: NotifyType

-- | The state a <tt>DrawWindow</tt> is in.
data WindowState
[WindowStateWithdrawn] :: WindowState
[WindowStateIconified] :: WindowState
[WindowStateMaximized] :: WindowState
[WindowStateSticky] :: WindowState
[WindowStateFullscreen] :: WindowState
[WindowStateAbove] :: WindowState
[WindowStateBelow] :: WindowState

-- | in which direction was scrolled?
data ScrollDirection
[ScrollUp] :: ScrollDirection
[ScrollDown] :: ScrollDirection
[ScrollLeft] :: ScrollDirection
[ScrollRight] :: ScrollDirection
data MouseButton
[LeftButton] :: MouseButton
[MiddleButton] :: MouseButton
[RightButton] :: MouseButton
[OtherButton] :: Int -> MouseButton

-- | Type of mouse click
data Click
[SingleClick] :: Click
[DoubleClick] :: Click
[TripleClick] :: Click
[ReleaseClick] :: Click

-- | Rectangle
--   
--   <ul>
--   <li>Specifies x, y, width and height</li>
--   </ul>
data Rectangle :: *
[Rectangle] :: Int -> Int -> Int -> Int -> Rectangle
instance Show Event


-- | Gdk general functions.
module Graphics.UI.Gtk.Gdk.Gdk

-- | Flushes the X output buffer and waits until all requests have been
--   processed by the server. This is rarely needed by applications.
flush :: IO ()

-- | Returns the width of the default screen in pixels.
screenWidth :: IO Int

-- | Returns the height of the default screen in pixels.
screenHeight :: IO Int

-- | Returns the width of the default screen in millimeters. Note that on
--   many X servers this value will not be correct.
screenWidthMM :: IO Int

-- | Returns the height of the default screen in millimeters. Note that on
--   many X servers this value will not be correct.
screenHeightMM :: IO Int
data GrabStatus
[GrabSuccess] :: GrabStatus
[GrabAlreadyGrabbed] :: GrabStatus
[GrabInvalidTime] :: GrabStatus
[GrabNotViewable] :: GrabStatus
[GrabFrozen] :: GrabStatus

-- | Grabs the pointer (usually a mouse) so that all events are passed to
--   this application until the pointer is ungrabbed with
--   <a>pointerUngrab</a>, or the grab window becomes unviewable. This
--   overrides any previous pointer grab by this client.
--   
--   Pointer grabs are used for operations which need complete control over
--   mouse events, even if the mouse leaves the application. For example in
--   GTK+ it is used for Drag and Drop, for dragging the handle in the
--   GtkHPaned and GtkVPaned widgets, and for resizing columns in GtkCList
--   widgets.
--   
--   Note that if the event mask of an X window has selected both button
--   press and button release events, then a button press event will cause
--   an automatic pointer grab until the button is released. X does this
--   automatically since most applications expect to receive button press
--   and release events in pairs. It is equivalent to a pointer grab on the
--   window with <tt>owner_events</tt> set to <tt>True</tt>.
--   
--   If you set up anything at the time you take the grab that needs to be
--   cleaned up when the grab ends, you should handle the
--   GdkEventGrabBroken events that are emitted when the grab ends
--   unvoluntarily.
pointerGrab :: (DrawWindowClass window, DrawWindowClass confine_to) => window -> Bool -> [EventMask] -> Maybe confine_to -> Maybe Cursor -> TimeStamp -> IO GrabStatus

-- | Ungrabs the pointer on the default display, if it is grabbed by this
--   application.
pointerUngrab :: TimeStamp -> IO ()

-- | Returns <tt>True</tt> if the pointer on the default display is
--   currently grabbed by this application.
--   
--   Note that this does not take the inmplicit pointer grab on button
--   presses into account.
pointerIsGrabbed :: IO Bool

-- | Grabs the keyboard so that all events are passed to this application
--   until the keyboard is ungrabbed with <a>keyboardUngrab</a>. This
--   overrides any previous keyboard grab by this client.
--   
--   If you set up anything at the time you take the grab that needs to be
--   cleaned up when the grab ends, you should handle the
--   GdkEventGrabBroken events that are emitted when the grab ends
--   unvoluntarily.
keyboardGrab :: (DrawWindowClass window) => window -> Bool -> TimeStamp -> IO GrabStatus

-- | Ungrabs the keyboard on the default display, if it is grabbed by this
--   application.
keyboardUngrab :: TimeStamp -> IO ()

-- | Emits a short beep.
beep :: IO ()


-- | A tag that can be applied to text in a <a>TextBuffer</a>
module Graphics.UI.Gtk.Multiline.TextTag
data TextTag
class GObjectClass o => TextTagClass o
castToTextTag :: GObjectClass obj => obj -> TextTag
gTypeTextTag :: GType
toTextTag :: TextTagClass o => o -> TextTag
type TagName = DefaultGlibString

-- | Creates a <a>TextTag</a>.
--   
--   <ul>
--   <li>Supplying <tt>Nothing</tt> as tag name results in an anonymous
--   tag.</li>
--   </ul>
textTagNew :: Maybe TagName -> IO TextTag

-- | Sets the priority of a <a>TextTag</a>. Valid priorities are start at 0
--   and go to one less than <a>textTagTableGetSize</a>. Each tag in a
--   table has a unique priority; setting the priority of one tag shifts
--   the priorities of all the other tags in the table to maintain a unique
--   priority for each tag. Higher priority tags "win" if two tags both set
--   the same text attribute. When adding a tag to a tag table, it will be
--   assigned the highest priority in the table by default; so normally the
--   precedence of a set of tags is the order in which they were added to
--   the table, or created with <a>textBufferCreateTag</a>, which adds the
--   tag to the buffer's table automatically.
textTagSetPriority :: TextTagClass self => self -> Int -> IO ()

-- | Get the tag priority.
textTagGetPriority :: TextTagClass self => self -> IO Int
newtype TextAttributes
[TextAttributes] :: (ForeignPtr (TextAttributes)) -> TextAttributes

-- | Creates a <a>TextAttributes</a>, which describes a set of properties
--   on some text.
textAttributesNew :: IO TextAttributes

-- | Copies src and returns a new <a>TextAttributes</a>.
textAttributesCopy :: TextAttributes -> IO TextAttributes

-- | Copies the values from src to dest so that dest has the same values as
--   src.
textAttributesCopyValues :: TextAttributes -> TextAttributes -> IO ()

-- | This function is use internal for transform TextAttributes. Don't
--   expoert this function.
makeNewTextAttributes :: Ptr TextAttributes -> IO TextAttributes

-- | Name used to refer to the text tag. <tt>Nothing</tt> for anonymous
--   tags.
--   
--   Default value: <tt>Nothing</tt>
textTagName :: (TextTagClass self, GlibString string) => Attr self (Maybe string)

-- | Background color as a string.
--   
--   Default value: ""
textTagBackground :: (TextTagClass self, GlibString string) => WriteAttr self string

-- | Whether this tag affects the background color.
--   
--   Default value: <tt>False</tt>
textTagBackgroundSet :: TextTagClass self => Attr self Bool

-- | Whether the background color fills the entire line height or only the
--   height of the tagged characters.
--   
--   Default value: <tt>False</tt>
textTagBackgroundFullHeight :: TextTagClass self => Attr self Bool

-- | Whether this tag affects background height.
--   
--   Default value: <tt>False</tt>
textTagBackgroundFullHeightSet :: TextTagClass self => Attr self Bool

-- | Background color as a (possibly unallocated) GdkColor.
textTagBackgroundGdk :: TextTagClass self => Attr self Color

-- | Bitmap to use as a mask when drawing the text background.
--   
--   Removed in Gtk3.
textTagBackgroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap

-- | Whether this tag affects the background stipple.
--   
--   Default value: <tt>False</tt>
--   
--   Removed in Gtk3.
textTagBackgroundStippleSet :: TextTagClass self => Attr self Bool

-- | Foreground color as a string.
--   
--   Default value: ""
textTagForeground :: (TextTagClass self, GlibString string) => WriteAttr self string

-- | Whether this tag affects the foreground color.
--   
--   Default value: <tt>False</tt>
textTagForegroundSet :: TextTagClass self => Attr self Bool

-- | Foreground color as a (possibly unallocated) GdkColor.
textTagForegroundGdk :: TextTagClass self => Attr self Color

-- | Bitmap to use as a mask when drawing the text foreground.
--   
--   Removed in Gtk3.
textTagForegroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap

-- | Whether this tag affects the foreground stipple.
--   
--   Default value: <tt>False</tt>
--   
--   Removed in Gtk3.
textTagForegroundStippleSet :: TextTagClass self => Attr self Bool

-- | Text direction, e.g. right-to-left or left-to-right.
--   
--   Default value: <a>TextDirLtr</a>
textTagDirection :: TextTagClass self => Attr self TextDirection

-- | Whether the text can be modified by the user.
--   
--   Default value: <tt>True</tt>
textTagEditable :: TextTagClass self => Attr self Bool

-- | Whether this tag affects text editability.
--   
--   Default value: <tt>False</tt>
textTagEditableSet :: TextTagClass self => Attr self Bool

-- | Font description as a string, e.g. "Sans Italic 12".
--   
--   Default value: ""
textTagFont :: (TextTagClass self, GlibString string) => Attr self string

-- | Font description as a <a>FontDescription</a> struct.
textTagFontDesc :: TextTagClass self => Attr self FontDescription

-- | Name of the font family, e.g. Sans, Helvetica, Times, Monospace.
--   
--   Default value: ""
textTagFamily :: (TextTagClass self, GlibString string) => Attr self string

-- | Whether this tag affects the font family.
--   
--   Default value: <tt>False</tt>
textTagFamilySet :: TextTagClass self => Attr self Bool

-- | Font style as a <a>Style</a>, e.g. <a>StyleItalic</a>.
--   
--   Default value: <a>StyleNormal</a>
textTagStyle :: TextTagClass self => Attr self FontStyle

-- | Whether this tag affects the font style.
--   
--   Default value: <tt>False</tt>
textTagStyleSet :: TextTagClass self => Attr self Bool

-- | Custom tabs for this text. textTagTabs :: TextTagClass self =&gt; Attr
--   self TabArray
--   
--   Whether this tag affects tabs.
--   
--   Default value: <tt>False</tt>
textTagTabsSet :: TextTagClass self => Attr self Bool

-- | Font variant as a <a>Variant</a>, e.g. <a>VariantSmallCaps</a>.
--   
--   Default value: <a>VariantNormal</a>
textTagVariant :: TextTagClass self => Attr self Variant

-- | Whether this tag affects the font variant.
--   
--   Default value: <tt>False</tt>
textTagVariantSet :: TextTagClass self => Attr self Bool

-- | Font weight as an integer, see predefined values in <a>Weight</a>; for
--   example, <a>WeightBold</a>.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 400
textTagWeight :: TextTagClass self => Attr self Int

-- | Whether this tag affects the font weight.
--   
--   Default value: <tt>False</tt>
textTagWeightSet :: TextTagClass self => Attr self Bool

-- | Font stretch as a <a>Stretch</a>, e.g. <a>StretchCondensed</a>.
--   
--   Default value: <a>StretchNormal</a>
textTagStretch :: TextTagClass self => Attr self Stretch

-- | Whether this tag affects the font stretch.
textTagStretchSet :: TextTagClass self => Attr self Bool

-- | Font size in Pango units.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textTagSize :: TextTagClass self => Attr self Int

-- | Whether this tag affects the font size.
--   
--   Default value: <tt>False</tt>
textTagSizeSet :: TextTagClass self => Attr self Bool

-- | Font size as a scale factor relative to the default font size. This
--   properly adapts to theme changes etc. so is recommended.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 1
textTagScale :: TextTagClass self => Attr self Double

-- | Whether this tag scales the font size by a factor.
--   
--   Default value: <tt>False</tt>
textTagScaleSet :: TextTagClass self => Attr self Bool

-- | Font size in points.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textTagSizePoints :: TextTagClass self => Attr self Double

-- | Left, right, or center justification.
--   
--   Default value: <a>JustifyLeft</a>
textTagJustification :: TextTagClass self => Attr self Justification

-- | Whether this tag affects paragraph justification.
--   
--   Default value: <tt>False</tt>
textTagJustificationSet :: TextTagClass self => Attr self Bool

-- | The language this text is in, as an ISO code. Pango can use this as a
--   hint when rendering the text. If not set, an appropriate default will
--   be used.
--   
--   Default value: ""
textTagLanguage :: (TextTagClass self, GlibString string) => Attr self string

-- | Whether this tag affects the language the text is rendered as.
--   
--   Default value: <tt>False</tt>
textTagLanguageSet :: TextTagClass self => Attr self Bool

-- | Width of the left margin in pixels.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textTagLeftMargin :: TextTagClass self => Attr self Int

-- | Whether this tag affects the left margin.
--   
--   Default value: <tt>False</tt>
textTagLeftMarginSet :: TextTagClass self => Attr self Bool

-- | Width of the right margin in pixels.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textTagRightMargin :: TextTagClass self => Attr self Int

-- | Whether this tag affects the right margin.
--   
--   Default value: <tt>False</tt>
textTagRightMarginSet :: TextTagClass self => Attr self Bool

-- | Amount to indent the paragraph, in pixels.
--   
--   Default value: 0
textTagIndent :: TextTagClass self => Attr self Int

-- | Whether this tag affects indentation.
--   
--   Default value: <tt>False</tt>
textTagIndentSet :: TextTagClass self => Attr self Bool

-- | Offset of text above the baseline (below the baseline if rise is
--   negative) in pixels.
--   
--   Default value: 0
textTagRise :: TextTagClass self => Attr self Int

-- | Whether this tag affects the rise.
textTagRiseSet :: TextTagClass self => Attr self Bool

-- | Pixels of blank space above paragraphs.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textTagPixelsAboveLines :: TextTagClass self => Attr self Int

-- | Whether this tag affects the number of pixels above lines.
--   
--   Default value: <tt>False</tt>
textTagPixelsAboveLinesSet :: TextTagClass self => Attr self Bool

-- | Pixels of blank space below paragraphs.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textTagPixelsBelowLines :: TextTagClass self => Attr self Int

-- | Whether this tag affects the number of pixels below lines.
--   
--   Default value: <tt>False</tt>
textTagPixelsBelowLinesSet :: TextTagClass self => Attr self Bool

-- | Pixels of blank space between wrapped lines in a paragraph.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textTagPixelsInsideWrap :: TextTagClass self => Attr self Int

-- | Whether this tag affects the number of pixels between wrapped lines.
--   
--   Default value: <tt>False</tt>
textTagPixelsInsideWrapSet :: TextTagClass self => Attr self Bool

-- | Whether to strike through the text.
--   
--   Default value: <tt>False</tt>
textTagStrikethrough :: TextTagClass self => Attr self Bool

-- | Whether this tag affects strikethrough.
--   
--   Default value: <tt>False</tt>
textTagStrikethroughSet :: TextTagClass self => Attr self Bool

-- | Style of underline for this text.
--   
--   Default value: <a>UnderlineNone</a>
textTagUnderline :: TextTagClass self => Attr self Underline

-- | Whether this tag affects underlining.
--   
--   Default value: <tt>False</tt>
textTagUnderlineSet :: TextTagClass self => Attr self Bool

-- | Whether to wrap lines never, at word boundaries, or at character
--   boundaries.
--   
--   Default value: <a>WrapNone</a>
textTagWrapMode :: TextTagClass self => Attr self WrapMode

-- | Whether this tag affects line wrap mode.
--   
--   Default value: <tt>False</tt>
textTagWrapModeSet :: TextTagClass self => Attr self Bool

-- | Whether this text is hidden.
--   
--   Note that there may still be problems with the support for invisible
--   text, in particular when navigating programmatically inside a buffer
--   containing invisible segments.
--   
--   Default value: <tt>False</tt>
textTagInvisible :: TextTagClass self => Attr self Bool

-- | Whether this tag affects text visibility.
--   
--   Default value: <tt>False</tt>
textTagInvisibleSet :: TextTagClass self => Attr self Bool

-- | The paragraph background color as a string.
--   
--   Default value: ""
textTagParagraphBackground :: (TextTagClass self, GlibString string) => WriteAttr self string

-- | Whether this tag affects the paragraph background color.
--   
--   Default value: <tt>False</tt>
textTagParagraphBackgroundSet :: TextTagClass self => Attr self Bool

-- | The paragraph background color as a as a (possibly unallocated)
--   <a>Color</a>.
textTagParagraphBackgroundGdk :: TextTagClass self => Attr self Color

-- | 'priority' property. See <a>textTagGetPriority</a> and
--   <a>textTagSetPriority</a>
textTagPriority :: TextTagClass self => Attr self Int

-- | An event has occurred that affects the given tag.
--   
--   <ul>
--   <li>Adding an event handler to the tag makes it possible to react on
--   e.g. mouse clicks to implement hyperlinking.</li>
--   <li>The first argument is the object the event was fired from
--   (typically a <a>TextView</a>). The second argument is the iterator
--   indicating where the event happened.</li>
--   </ul>
textTagEvent :: TextTagClass self => Signal self (GObject -> TextIter -> EventM EAny Bool)

-- | An event has occurred that affects the given tag.
--   
--   <ul>
--   <li>Adding an event handler to the tag makes it possible to react on
--   e.g. mouse clicks to implement hyperlinking.</li>
--   </ul>
onTextTagEvent :: TextTagClass t => t -> (Event -> TextIter -> IO ()) -> IO (ConnectId t)


-- | An iterator is an abstract datatype representing a pointer into a
--   <a>TextBuffer</a>.
module Graphics.UI.Gtk.Multiline.TextIter
data TextIter

-- | Specify the way the search function for <a>TextBuffer</a> works.
data TextSearchFlags
[TextSearchVisibleOnly] :: TextSearchFlags
[TextSearchTextOnly] :: TextSearchFlags

-- | Copy the iterator.
textIterCopy :: TextIter -> IO TextIter

-- | Return the <a>TextBuffer</a> this iterator is associated with.
textIterGetBuffer :: TextIter -> IO TextBuffer

-- | Returns the character offset of an iterator. Each character in a
--   <a>TextBuffer</a> has an offset, starting with 0 for the first
--   character in the buffer. Use <a>textBufferGetIterAtOffset</a> to
--   convert an offset back into an iterator.
textIterGetOffset :: TextIter -> IO Int

-- | Returns the line number containing the iterator. Lines in a
--   <a>TextBuffer</a> are numbered beginning with 0 for the first line in
--   the buffer.
textIterGetLine :: TextIter -> IO Int

-- | Returns the character offset of the iterator, counting from the start
--   of a newline-terminated line. The first character on the line has
--   offset 0.
textIterGetLineOffset :: TextIter -> IO Int

-- | Returns the offset in characters from the start of the line to the
--   given <tt>iter</tt>, not counting characters that are invisible due to
--   tags with the "invisible" flag toggled on.
textIterGetVisibleLineOffset :: TextIter -> IO Int

-- | Returns the Unicode character at this iterator. If the element at this
--   iterator is a non-character element, such as an image embedded in the
--   buffer, the Unicode "unknown" character 0xFFFC is returned. If invoked
--   on the end iterator, <tt>Nothigng</tt> is returned.
textIterGetChar :: TextIter -> IO (Maybe Char)

-- | Returns the text in the given range. A "slice" is a list of
--   characters, including the Unicode "unknown" character 0xFFFC for
--   iterable non-character elements in the buffer, such as images. Because
--   images are encoded in the slice, offsets in the returned array will
--   correspond to offsets in the text buffer. Note that 0xFFFC can occur
--   in normal text as well, so it is not a reliable indicator that a
--   pixbuf or widget is in the buffer.
textIterGetSlice :: GlibString string => TextIter -> TextIter -> IO string

-- | Return the text in a given range.
--   
--   <ul>
--   <li>Pictures (and other objects) are stripped form the output. Thus,
--   this function does not preserve offsets.</li>
--   </ul>
textIterGetText :: GlibString string => TextIter -> TextIter -> IO string

-- | Like <a>textIterGetSlice</a>, but invisible text is not included.
--   Invisible text is usually invisible because a <a>TextTag</a> with the
--   "invisible" attribute turned on has been applied to it.
textIterGetVisibleSlice :: GlibString string => TextIter -> TextIter -> IO string

-- | Like <a>textIterGetText</a>, but invisible text is not included.
--   Invisible text is usually invisible because a <a>TextTag</a> with the
--   "invisible" attribute turned on has been applied to it.
textIterGetVisibleText :: GlibString string => TextIter -> TextIter -> IO string

-- | Get the <a>Pixbuf</a> under the iterator.
textIterGetPixbuf :: TextIter -> IO (Maybe Pixbuf)

-- | If the location at <tt>iter</tt> contains a child anchor, the anchor
--   is returned (with no new reference count added). Otherwise,
--   <tt>Nothing</tt> is returned.
textIterGetChildAnchor :: TextIter -> IO (Maybe TextChildAnchor)

-- | Returns a list of all <a>TextMark</a> at this location. Because marks
--   are not iterable (they don't take up any "space" in the buffer, they
--   are just marks in between iterable locations), multiple marks can
--   exist in the same place. The returned list is not in any meaningful
--   order.
textIterGetMarks :: TextIter -> IO [TextMark]

-- | Returns a list of <a>TextTag</a> that are toggled on or off at this
--   point. (If <tt>toggledOn</tt> is <tt>True</tt>, the list contains tags
--   that are toggled on.) If a tag is toggled on at <tt>iter</tt>, then
--   some non-empty range of characters following <tt>iter</tt> has that
--   tag applied to it. If a tag is toggled off, then some non-empty range
--   following <tt>iter</tt> does <i>not</i> have the tag applied to it.
textIterGetToggledTags :: TextIter -> Bool -> IO [TextTag]

-- | Returns <tt>True</tt> if <tt>tag</tt> is toggled on at exactly this
--   point. If <tt>tag</tt> is <tt>Nothing</tt>, returns <tt>True</tt> if
--   any tag is toggled on at this point. Note that the
--   <a>textIterBeginsTag</a> returns <tt>True</tt> if <tt>iter</tt> is the
--   <i>start</i> of the tagged range; <a>textIterHasTag</a> tells you
--   whether an iterator is <i>within</i> a tagged range.
textIterBeginsTag :: TextIter -> Maybe TextTag -> IO Bool

-- | Returns <tt>True</tt> if <tt>tag</tt> is toggled off at exactly this
--   point. If <tt>tag</tt> is <tt>Notihng</tt>, returns <tt>True</tt> if
--   any tag is toggled off at this point. Note that the
--   <a>textIterEndsTag</a> returns <tt>True</tt> if <tt>iter</tt> is the
--   <i>end</i> of the tagged range; <a>textIterHasTag</a> tells you
--   whether an iterator is <i>within</i> a tagged range.
textIterEndsTag :: TextIter -> Maybe TextTag -> IO Bool

-- | Query if the <a>TextIter</a> is at the beginning or the end of a
--   <a>TextTag</a>. This is equivalent to (<a>textIterBeginsTag</a> ||
--   <a>textIterEndsTag</a>), i.e. it tells you whether a range with
--   <tt>tag</tt> applied to it begins <i>or</i> ends at <tt>iter</tt>.
textIterTogglesTag :: TextIter -> Maybe TextTag -> IO Bool

-- | Check if <a>TextIter</a> is within a range tagged with tag.
textIterHasTag :: TextIter -> Maybe TextTag -> IO Bool

-- | Returns a list of tags that apply to <tt>iter</tt>, in ascending order
--   of priority (highest-priority tags are last).
textIterGetTags :: TextIter -> IO [TextTag]

-- | Returns whether the character at <tt>iter</tt> is within an editable
--   region of text. Non-editable text is "locked" and can't be changed by
--   the user via <a>TextView</a>. This function is simply a convenience
--   wrapper around <a>textIterGetAttributes</a>. If no tags applied to
--   this text affect editability, <tt>defaultSetting</tt> will be
--   returned.
--   
--   You don't want to use this function to decide whether text can be
--   inserted at <tt>iter</tt>, because for insertion you don't want to
--   know whether the char at <tt>iter</tt> is inside an editable range,
--   you want to know whether a new character inserted at <tt>iter</tt>
--   would be inside an editable range. Use <a>textIterCanInsert</a> to
--   handle this case.
textIterEditable :: TextIter -> Bool -> IO Bool

-- | Check if new text can be inserted at <a>TextIter</a>.
--   
--   <ul>
--   <li>Considering the default editability of the buffer, and tags that
--   affect editability, determines whether text inserted at <tt>iter</tt>
--   would be editable. If text inserted at <tt>iter</tt> would be editable
--   then the user should be allowed to insert text at <tt>iter</tt>.
--   <a>textBufferInsertInteractive</a> uses this function to decide
--   whether insertions are allowed at a given position.</li>
--   <li>Use <a>textBufferInsertInteractive</a> if you want to insert text
--   depending on the current editable status.</li>
--   </ul>
textIterCanInsert :: TextIter -> Bool -> IO Bool

-- | Determine if <a>TextIter</a> begins a new natural-language word.
textIterStartsWord :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> ends a new natural-language word.
textIterEndsWord :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> is inside a word.
textIterInsideWord :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> begins a new line.
textIterStartsLine :: TextIter -> IO Bool

-- | Returns <tt>True</tt> if <tt>iter</tt> points to the start of the
--   paragraph delimiter characters for a line (delimiters will be either a
--   newline, a carriage return, a carriage return followed by a newline,
--   or a Unicode paragraph separator character). Note that an iterator
--   pointing to the n of a rn pair will not be counted as the end of a
--   line, the line ends before the r. The end iterator is considered to be
--   at the end of a line, even though there are no paragraph delimiter
--   chars there.
textIterEndsLine :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> starts a sentence.
textIterStartsSentence :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> ends a sentence.
textIterEndsSentence :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> is inside a sentence.
textIterInsideSentence :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> is at a cursor position.
textIterIsCursorPosition :: TextIter -> IO Bool

-- | Return number of characters in this line.
--   
--   <ul>
--   <li>The return value includes delimiters.</li>
--   </ul>
textIterGetCharsInLine :: TextIter -> IO Int

-- | Computes the effect of any tags applied to this spot in the text. The
--   values parameter should be initialized to the default settings you
--   wish to use if no tags are in effect. You'd typically obtain the
--   defaults from <tt>textViewGetDefaultAttributes</tt>.
--   <a>textIterGetAttributes</a> will modify values, applying the effects
--   of any tags present at iter. If any tags affected values, the function
--   returns <tt>True</tt>.
textIterGetAttributes :: TextIter -> TextAttributes -> IO Bool

-- | A convenience wrapper around <a>textIterGetAttributes</a>, which
--   returns the language in effect at iter. If no tags affecting language
--   apply to iter, the return value is identical to that of
--   <tt>getDefaultLanguage</tt>.
textIterGetLanguage :: TextIter -> IO Language

-- | Determine if <a>TextIter</a> is at the end of the buffer.
textIterIsEnd :: TextIter -> IO Bool

-- | Determine if <a>TextIter</a> is at the beginning of the buffer.
textIterIsStart :: TextIter -> IO Bool

-- | Move <a>TextIter</a> forwards.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a character.</li>
--   </ul>
textIterForwardChar :: TextIter -> IO Bool

-- | Move <a>TextIter</a> backwards.
--   
--   <ul>
--   <li>Retuns True if the movement was possible.</li>
--   </ul>
textIterBackwardChar :: TextIter -> IO Bool

-- | Move <a>TextIter</a> forwards by <tt>n</tt> characters.
--   
--   <ul>
--   <li>Retuns <tt>True</tt> if the iterator is pointing to a new
--   character (and <tt>False</tt> if the iterator points to a picture or
--   has not moved).</li>
--   <li>Note that images embedded in the buffer occupy 1 character slot,
--   so <a>textIterForwardChar</a> may actually move onto an image instead
--   of a character.</li>
--   </ul>
textIterForwardChars :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> backwards by <tt>n</tt> characters.
--   
--   <ul>
--   <li>Retuns <tt>True</tt> if the iterator is pointing to a new
--   character (and <tt>False</tt> if the iterator points to a picture or
--   has not moved).</li>
--   </ul>
textIterBackwardChars :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> forwards.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new line (and False
--   if the iterator points to a picture or has not moved).</li>
--   <li>If <a>TextIter</a> is on the first line, it will be moved to the
--   beginning of the buffer.</li>
--   </ul>
textIterForwardLine :: TextIter -> IO Bool

-- | Move <a>TextIter</a> backwards.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new line (and False
--   if the iterator points to a picture or has not moved).</li>
--   <li>If <a>TextIter</a> is on the first line, it will be moved to the
--   end of the buffer.</li>
--   </ul>
textIterBackwardLine :: TextIter -> IO Bool

-- | Move <a>TextIter</a> forwards by <tt>n</tt> lines.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new line (and False
--   if the iterator points to a picture or has not moved).</li>
--   <li>If <a>TextIter</a> is on the first line, it will be moved to the
--   beginning of the buffer.</li>
--   <li><tt>n</tt> can be negative.</li>
--   </ul>
textIterForwardLines :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> backwards by <tt>n</tt> lines.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new line (and False
--   if the iterator points to a picture or has not moved).</li>
--   <li>If <a>TextIter</a> is on the first line, it will be moved to the
--   end of the buffer.</li>
--   <li><tt>n</tt> can be negative.</li>
--   </ul>
textIterBackwardLines :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> forwards by <tt>n</tt> word ends.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new word end.</li>
--   </ul>
textIterForwardWordEnds :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> backwards by <tt>n</tt> word beginnings.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new word start.</li>
--   </ul>
textIterBackwardWordStarts :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> forwards to the next word end.
--   
--   <ul>
--   <li>Retuns True if the iterator has moved to a new word end.</li>
--   </ul>
textIterForwardWordEnd :: TextIter -> IO Bool

-- | Move <a>TextIter</a> backwards to the next word beginning.
--   
--   <ul>
--   <li>Retuns True if the iterator has moved to a new word
--   beginning.</li>
--   </ul>
textIterBackwardWordStart :: TextIter -> IO Bool

-- | Move <a>TextIter</a> forwards to the next cursor position.
--   
--   <ul>
--   <li>Some characters are composed of two Unicode codes. This function
--   ensures that <a>TextIter</a> does not point inbetween such double
--   characters.</li>
--   <li>Returns True if <a>TextIter</a> moved and points to a character
--   (not to an object).</li>
--   </ul>
textIterForwardCursorPosition :: TextIter -> IO Bool

-- | Move <a>TextIter</a> backwards to the next cursor position.
--   
--   <ul>
--   <li>Some characters are composed of two Unicode codes. This function
--   ensures that <a>TextIter</a> does not point inbetween such double
--   characters.</li>
--   <li>Returns True if <a>TextIter</a> moved and points to a character
--   (not to an object).</li>
--   </ul>
textIterBackwardCursorPosition :: TextIter -> IO Bool

-- | Move <a>TextIter</a> forwards by <tt>n</tt> cursor positions.
--   
--   <ul>
--   <li>Returns True if <a>TextIter</a> moved and points to a character
--   (not to an object).</li>
--   </ul>
textIterForwardCursorPositions :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> backwards by <tt>n</tt> cursor positions.
--   
--   <ul>
--   <li>Returns True if <a>TextIter</a> moved and points to a character
--   (not to an object).</li>
--   </ul>
textIterBackwardCursorPositions :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> forwards by <tt>n</tt> sentence ends.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new sentence
--   end.</li>
--   </ul>
textIterForwardSentenceEnds :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> backwards by <tt>n</tt> sentence beginnings.
--   
--   <ul>
--   <li>Retuns True if the iterator is pointing to a new sentence
--   start.</li>
--   </ul>
textIterBackwardSentenceStarts :: TextIter -> Int -> IO Bool

-- | Move <a>TextIter</a> forwards to the next sentence end.
--   
--   <ul>
--   <li>Retuns True if the iterator has moved to a new sentence end.</li>
--   </ul>
textIterForwardSentenceEnd :: TextIter -> IO Bool

-- | Move <a>TextIter</a> backwards to the next sentence beginning.
--   
--   <ul>
--   <li>Retuns True if the iterator has moved to a new sentence
--   beginning.</li>
--   </ul>
textIterBackwardSentenceStart :: TextIter -> IO Bool

-- | Set <a>TextIter</a> to an offset within the buffer.
textIterSetOffset :: TextIter -> Int -> IO ()

-- | Set <a>TextIter</a> to a line within the buffer.
--   
--   <ul>
--   <li>If number is negative or larger than the number of lines in the
--   buffer, moves <tt>iter</tt> to the start of the last line in the
--   buffer.</li>
--   </ul>
textIterSetLine :: TextIter -> Int -> IO ()

-- | Set <a>TextIter</a> to an offset within the line.
--   
--   <ul>
--   <li>The given character offset must be less than or equal to the
--   number of characters in the line; if equal, the iterator moves to the
--   start of the next line.</li>
--   </ul>
textIterSetLineOffset :: TextIter -> Int -> IO ()

-- | Like <a>textIterSetLineOffset</a>, but the offset is in visible
--   characters, i.e. text with a tag making it invisible is not counted in
--   the offset.
textIterSetVisibleLineOffset :: TextIter -> Int -> IO ()

-- | Moves <tt>iter</tt> forward to the "end iterator," which points one
--   past the last valid character in the buffer.
textIterForwardToEnd :: TextIter -> IO ()

-- | Moves the iterator to point to the paragraph delimiter characters,
--   which will be either a newline, a carriage return, a carriage
--   return/newline in sequence, or the Unicode paragraph separator
--   character. If the iterator is already at the paragraph delimiter
--   characters, moves to the paragraph delimiter characters for the next
--   line. If <tt>iter</tt> is on the last line in the buffer, which does
--   not end in paragraph delimiters, moves to the end iterator (end of the
--   last line), and returns <tt>False</tt>.
textIterForwardToLineEnd :: TextIter -> IO Bool

-- | Moves <a>TextIter</a> forward to the next change of a <a>TextTag</a>.
--   
--   <ul>
--   <li>If Nothing is supplied, any <a>TextTag</a> will be matched.</li>
--   <li>Returns <tt>True</tt> if there was a tag toggle after
--   <a>TextIter</a>.</li>
--   </ul>
textIterForwardToTagToggle :: TextIter -> Maybe TextTag -> IO Bool

-- | Moves <a>TextIter</a> backward to the next change of a <a>TextTag</a>.
--   
--   <ul>
--   <li>If <tt>Nothing</tt> is supplied, any <a>TextTag</a> will be
--   matched.</li>
--   <li>Returns <tt>True</tt> if there was a tag toggle before
--   <a>TextIter</a>.</li>
--   </ul>
textIterBackwardToTagToggle :: TextIter -> Maybe TextTag -> IO Bool

-- | Move <a>TextIter</a> forward until a predicate function returns True.
--   
--   <ul>
--   <li>If <tt>pred</tt> returns True before <tt>limit</tt> is reached,
--   the search is stopped and the return value is True.</li>
--   <li>If <tt>limit</tt> is Nothing, the search stops at the end of the
--   buffer.</li>
--   </ul>
textIterForwardFindChar :: TextIter -> (Char -> Bool) -> Maybe TextIter -> IO Bool

-- | Move <a>TextIter</a> backward until a predicate function returns True.
--   
--   <ul>
--   <li>If <tt>pred</tt> returns True before <tt>limit</tt> is reached,
--   the search is stopped and the return value is True.</li>
--   <li>If <tt>limit</tt> is Nothing, the search stops at the end of the
--   buffer.</li>
--   </ul>
textIterBackwardFindChar :: TextIter -> (Char -> Bool) -> Maybe TextIter -> IO Bool

-- | Search forward for a specific string.
--   
--   <ul>
--   <li>If specified, the last character which is tested against that
--   start of the search pattern will be <tt>limit</tt>.</li>
--   <li><a>TextSearchFlags</a> may be empty.</li>
--   <li>Returns the start and end position of the string found.</li>
--   </ul>
textIterForwardSearch :: GlibString string => TextIter -> string -> [TextSearchFlags] -> Maybe TextIter -> IO (Maybe (TextIter, TextIter))

-- | Search backward for a specific string.
--   
--   <ul>
--   <li>If specified, the last character which is tested against that
--   start of the search pattern will be <tt>limit</tt>.</li>
--   <li><a>TextSearchFlags</a> my be empty.</li>
--   <li>Returns the start and end position of the string found.</li>
--   </ul>
textIterBackwardSearch :: GlibString string => TextIter -> string -> [TextSearchFlags] -> Maybe TextIter -> IO (Maybe (TextIter, TextIter))

-- | Compare two <a>TextIter</a> for equality.
textIterEqual :: TextIter -> TextIter -> IO Bool

-- | Compare two <a>TextIter</a>.
textIterCompare :: TextIter -> TextIter -> IO Ordering

-- | Checks whether iter falls in the range [start, end). start and end
--   must be in ascending order.
textIterInRange :: TextIter -> TextIter -> TextIter -> IO Bool

-- | Swaps the value of first and second if second comes before first in
--   the buffer. That is, ensures that first and second are in sequence.
--   Most text buffer functions that take a range call this automatically
--   on your behalf, so there's no real reason to call it yourself in those
--   cases. There are some exceptions, such as <a>textIterInRange</a>, that
--   expect a pre-sorted range.
textIterOrder :: TextIter -> TextIter -> IO ()

-- | Moves <tt>iter</tt> to the start of the next visible line. Returns
--   <tt>True</tt> if there was a next line to move to, and <tt>False</tt>
--   if <tt>iter</tt> was simply moved to the end of the buffer and is now
--   not dereferenceable, or if <tt>iter</tt> was already at the end of the
--   buffer.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
textIterForwardVisibleLine :: TextIter -> IO Bool

-- | Moves <tt>iter</tt> to the start of the previous visible line. Returns
--   <tt>True</tt> if <tt>iter</tt> could be moved; i.e. if <tt>iter</tt>
--   was at character offset 0, this function returns <tt>False</tt>.
--   Therefore if <tt>iter</tt> was already on line 0, but not at the start
--   of the line, <tt>iter</tt> is snapped to the start of the line and the
--   function returns <tt>True</tt>. (Note that this implies that in a loop
--   calling this function, the line number may not change on every
--   iteration, if your first iteration is on line 0.)
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
textIterBackwardVisibleLine :: TextIter -> IO Bool

-- | Moves <tt>count</tt> visible lines forward, if possible (if
--   <tt>count</tt> would move past the start or end of the buffer, moves
--   to the start or end of the buffer). The return value indicates whether
--   the iterator moved onto a dereferenceable position; if the iterator
--   didn't move, or moved onto the end iterator, then <tt>False</tt> is
--   returned. If <tt>count</tt> is 0, the function does nothing and
--   returns <tt>False</tt>. If <tt>count</tt> is negative, moves backward
--   by 0 - <tt>count</tt> lines.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
textIterForwardVisibleLines :: TextIter -> Int -> IO Bool

-- | Moves <tt>count</tt> visible lines backward, if possible (if
--   <tt>count</tt> would move past the start or end of the buffer, moves
--   to the start or end of the buffer). The return value indicates whether
--   the iterator moved onto a dereferenceable position; if the iterator
--   didn't move, or moved onto the end iterator, then <tt>False</tt> is
--   returned. If <tt>count</tt> is 0, the function does nothing and
--   returns <tt>False</tt>. If <tt>count</tt> is negative, moves forward
--   by 0 - <tt>count</tt> lines.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
textIterBackwardVisibleLines :: TextIter -> Int -> IO Bool

-- | Calls <a>textIterForwardVisibleWordEnd</a> up to count times.
textIterForwardVisibleWordEnds :: TextIter -> Int -> IO Bool

-- | Calls <a>textIterBackwardVisibleWordStart</a> up to count times.
textIterBackwardVisibleWordStarts :: TextIter -> Int -> IO Bool

-- | Moves forward to the next visible word end. (If iter is currently on a
--   word end, moves forward to the next one after that.) Word breaks are
--   determined by Pango and should be correct for nearly any language (if
--   not, the correct fix would be to the Pango word break algorithms).
textIterForwardVisibleWordEnd :: TextIter -> IO Bool

-- | Moves backward to the previous visible word start. (If iter is
--   currently on a word start, moves backward to the next one after that.)
--   Word breaks are determined by Pango and should be correct for nearly
--   any language (if not, the correct fix would be to the Pango word break
--   algorithms).
textIterBackwardVisibleWordStart :: TextIter -> IO Bool

-- | Moves iter forward to the next visible cursor position. See
--   <a>textIterForwardCursorPosition</a> for details.
textIterForwardVisibleCursorPosition :: TextIter -> IO Bool

-- | Moves iter forward to the previous visible cursor position. See
--   <a>textIterBackwardCursorPosition</a> for details.
textIterBackwardVisibleCursorPosition :: TextIter -> IO Bool

-- | Moves up to count visible cursor positions. See
--   <a>textIterForwardCursorPosition</a> for details.
textIterForwardVisibleCursorPositions :: TextIter -> Int -> IO Bool

-- | Moves up to count visible cursor positions. See
--   <a>textIterBackwardCursorPosition</a> for details.
textIterBackwardVisibleCursorPositions :: TextIter -> Int -> IO Bool

-- | 'visibleLineOffset' property. See <a>textIterGetVisibleLineOffset</a>
--   and <a>textIterSetVisibleLineOffset</a>
textIterVisibleLineOffset :: Attr TextIter Int

-- | 'offset' property. See <a>textIterGetOffset</a> and
--   <a>textIterSetOffset</a>
textIterOffset :: Attr TextIter Int

-- | 'lineOffset' property. See <a>textIterGetLineOffset</a> and
--   <a>textIterSetLineOffset</a>
textIterLineOffset :: Attr TextIter Int

-- | 'line' property. See <a>textIterGetLine</a> and <a>textIterSetLine</a>
textIterLine :: Attr TextIter Int


-- | Stores attributed text for display in a <a>TextView</a>
module Graphics.UI.Gtk.Multiline.TextBuffer
data TextBuffer
class GObjectClass o => TextBufferClass o
castToTextBuffer :: GObjectClass obj => obj -> TextBuffer
gTypeTextBuffer :: GType
toTextBuffer :: TextBufferClass o => o -> TextBuffer

-- | Creates a new text buffer.
textBufferNew :: Maybe TextTagTable -> IO TextBuffer

-- | Obtains the number of lines in the buffer. This value is cached, so
--   the function is very fast.
textBufferGetLineCount :: TextBufferClass self => self -> IO Int

-- | Gets the number of characters in the buffer. The character count is
--   cached, so this function is very fast.
textBufferGetCharCount :: TextBufferClass self => self -> IO Int

-- | Get the <a>TextTagTable</a> associated with this buffer.
textBufferGetTagTable :: TextBufferClass self => self -> IO TextTagTable

-- | Inserts <tt>text</tt> at position <tt>iter</tt>. Emits the
--   <tt>insertText</tt> signal; insertion actually occurs in the default
--   handler for the signal. <tt>iter</tt> is invalidated when insertion
--   occurs (because the buffer contents change).
textBufferInsert :: (TextBufferClass self, GlibString string) => self -> TextIter -> string -> IO ()

-- | Inserts <tt>text</tt> at position <tt>iter</tt>. Similar to
--   <a>textBufferInsert</a> but uses <a>ByteString</a> buffers.
--   
--   <ul>
--   <li>The passed-in buffer must contain a valid UTF-8 encoded
--   string.</li>
--   </ul>
textBufferInsertByteString :: TextBufferClass self => self -> TextIter -> ByteString -> IO ()

-- | Simply calls <a>textBufferInsert</a>, using the current cursor
--   position as the insertion point.
textBufferInsertAtCursor :: (TextBufferClass self, GlibString string) => self -> string -> IO ()

-- | Simply calls <a>textBufferInsert</a>, using the current cursor
--   position as the insertion point. Similar to
--   <a>textBufferInsertAtCursor</a> but uses <a>ByteString</a> buffers.
--   
--   <ul>
--   <li>The passed-in buffer must contain a valid UTF-8 encoded
--   string.</li>
--   </ul>
textBufferInsertByteStringAtCursor :: TextBufferClass self => self -> ByteString -> IO ()

-- | Like <a>textBufferInsert</a>, but the insertion will not occur if
--   <tt>iter</tt> is at a non-editable location in the buffer. Usually you
--   want to prevent insertions at ineditable locations if the insertion
--   results from a user action (is interactive).
--   
--   If no tag is at the specified position, use the default value
--   <tt>def</tt> to decide if the text should be inserted. This value
--   could be set to the result of <a>textViewGetEditable</a>.
textBufferInsertInteractive :: (TextBufferClass self, GlibString string) => self -> TextIter -> string -> Bool -> IO Bool

-- | Similar to <a>textBufferInsertInteractive</a> but uses
--   <a>ByteString</a> buffers.
--   
--   <ul>
--   <li>The passed-in buffer must contain a valid UTF-8 encoded
--   string.</li>
--   </ul>
textBufferInsertByteStringInteractive :: TextBufferClass self => self -> TextIter -> ByteString -> Bool -> IO Bool

-- | Calls <a>textBufferInsertInteractive</a> at the cursor position.
textBufferInsertInteractiveAtCursor :: (TextBufferClass self, GlibString string) => self -> string -> Bool -> IO Bool

-- | Similar to <a>textBufferInsertInteractiveAtCursor</a> but uses
--   <a>ByteString</a> buffers.
--   
--   <ul>
--   <li>The passed-in buffer must contain a valid UTF-8 encoded
--   string.</li>
--   </ul>
textBufferInsertByteStringInteractiveAtCursor :: TextBufferClass self => self -> ByteString -> Bool -> IO Bool

-- | Copies text, tags, and pixbufs between <tt>start</tt> and <tt>end</tt>
--   (the order of <tt>start</tt> and <tt>end</tt> doesn't matter) and
--   inserts the copy at <tt>iter</tt>. Used instead of simply
--   getting/inserting text because it preserves images and tags. If
--   <tt>start</tt> and <tt>end</tt> are in a different buffer from
--   <tt>buffer</tt>, the two buffers must share the same tag table.
--   
--   Implemented via emissions of the insert-text and <a>applyTag</a>
--   signals, so expect those.
textBufferInsertRange :: TextBufferClass self => self -> TextIter -> TextIter -> TextIter -> IO ()

-- | Same as <a>textBufferInsertRange</a>, but does nothing if the
--   insertion point isn't editable. The <tt>defaultEditable</tt> parameter
--   indicates whether the text is editable at <tt>iter</tt> if no tags
--   enclosing <tt>iter</tt> affect editability. Typically the result of
--   <a>textViewGetEditable</a> is appropriate here.
textBufferInsertRangeInteractive :: TextBufferClass self => self -> TextIter -> TextIter -> TextIter -> Bool -> IO Bool

-- | Deletes text between <tt>start</tt> and <tt>end</tt>. The order of
--   <tt>start</tt> and <tt>end</tt> is not actually relevant;
--   <a>textBufferDelete</a> will reorder them. This function actually
--   emits the <a>deleteRange</a> signal, and the default handler of that
--   signal deletes the text. Because the buffer is modified, all
--   outstanding iterators become invalid after calling this function;
--   however, the <tt>start</tt> and <tt>end</tt> will be re-initialized to
--   point to the location where text was deleted.
textBufferDelete :: TextBufferClass self => self -> TextIter -> TextIter -> IO ()

-- | Deletes all <i>editable</i> text in the given range. Calls
--   <a>textBufferDelete</a> for each editable sub-range of
--   [<tt>start</tt>,<tt>end</tt>). <tt>start</tt> and <tt>end</tt> are
--   revalidated to point to the location of the last deleted range, or
--   left untouched if no text was deleted.
textBufferDeleteInteractive :: TextBufferClass self => self -> TextIter -> TextIter -> Bool -> IO Bool

-- | Deletes current contents of <tt>buffer</tt>, and inserts <tt>text</tt>
--   instead. Similar to <a>textBufferSetText</a> but uses
--   <a>ByteString</a> buffers.
--   
--   <ul>
--   <li>The passed-in buffer must contain a valid UTF-8 encoded
--   string.</li>
--   </ul>
textBufferSetByteString :: TextBufferClass self => self -> ByteString -> IO ()

-- | Returns the text in the range [<tt>start</tt>,<tt>end</tt>). Similar
--   to <a>textBufferGetText</a> but uses <a>ByteString</a> buffers.
--   
--   <ul>
--   <li>The returned buffer is a UTF-8 encoded string.</li>
--   </ul>
textBufferGetByteString :: TextBufferClass self => self -> TextIter -> TextIter -> Bool -> IO ByteString

-- | Returns the text in the range [<tt>start</tt>,<tt>end</tt>). Similar
--   to <a>textBufferGetSlice</a> but uses <a>ByteString</a> buffers.
--   
--   <ul>
--   <li>The returned buffer is a UTF-8 encoded string.</li>
--   </ul>
textBufferGetByteStringSlice :: TextBufferClass self => self -> TextIter -> TextIter -> Bool -> IO ByteString

-- | Deletes current contents of <tt>buffer</tt>, and inserts <tt>text</tt>
--   instead.
textBufferSetText :: (TextBufferClass self, GlibString string) => self -> string -> IO ()

-- | Returns the text in the range [<tt>start</tt>,<tt>end</tt>). Excludes
--   undisplayed text (text marked with tags that set the invisibility
--   attribute) if <tt>includeHiddenChars</tt> is <tt>False</tt>. Does not
--   include characters representing embedded images, so character indexes
--   into the returned string do <i>not</i> correspond to character indexes
--   into the buffer. Contrast with <a>textBufferGetSlice</a>.
textBufferGetText :: (TextBufferClass self, GlibString string) => self -> TextIter -> TextIter -> Bool -> IO string

-- | Returns the text in the range [<tt>start</tt>,<tt>end</tt>). Excludes
--   undisplayed text (text marked with tags that set the invisibility
--   attribute) if <tt>includeHiddenChars</tt> is <tt>False</tt>. The
--   returned string includes a <tt>(chr 0xFFFC)</tt> character whenever
--   the buffer contains embedded images, so character indexes into the
--   returned string <i>do</i> correspond to character indexes into the
--   buffer. Contrast with <a>textBufferGetText</a>. Note that <tt>(chr
--   0xFFFC)</tt> can occur in normal text as well, so it is not a reliable
--   indicator that a pixbuf or widget is in the buffer.
textBufferGetSlice :: (TextBufferClass self, GlibString string) => self -> TextIter -> TextIter -> Bool -> IO string

-- | Inserts an image into the text buffer at <tt>iter</tt>. The image will
--   be counted as one character in character counts, and when obtaining
--   the buffer contents as a string, will be represented by the Unicode
--   "object replacement character" <tt>(chr 0xFFFC)</tt>. Note that the
--   "slice" variants for obtaining portions of the buffer as a string
--   include this character for pixbufs, but the "text" variants do not.
--   e.g. see <a>textBufferGetSlice</a> and <a>textBufferGetText</a>.
textBufferInsertPixbuf :: TextBufferClass self => self -> TextIter -> Pixbuf -> IO ()

-- | Creates a mark at position <tt>where</tt>. If <tt>markName</tt> is
--   <tt>Nothing</tt>, the mark is anonymous; otherwise, the mark can be
--   retrieved by name using <a>textBufferGetMark</a>. If a mark has left
--   gravity, and text is inserted at the mark's current location, the mark
--   will be moved to the left of the newly-inserted text. If the mark has
--   right gravity (<tt>leftGravity</tt> = <tt>False</tt>), the mark will
--   end up on the right of newly-inserted text. The standard left-to-right
--   cursor is a mark with right gravity (when you type, the cursor stays
--   on the right side of the text you're typing).
--   
--   Emits the <a>markSet</a> signal as notification of the mark's initial
--   placement.
textBufferCreateMark :: TextBufferClass self => self -> Maybe MarkName -> TextIter -> Bool -> IO TextMark

-- | Adds the mark at position given by the <a>TextIter</a>. The mark may
--   not be added to any other buffer.
--   
--   Emits the <a>markSet</a> signal as notification of the mark's initial
--   placement.
textBufferAddMark :: TextBufferClass self => self -> TextMark -> TextIter -> IO ()

-- | Moves <tt>mark</tt> to the new location <tt>where</tt>. Emits the
--   <a>markSet</a> signal as notification of the move.
textBufferMoveMark :: (TextBufferClass self, TextMarkClass mark) => self -> mark -> TextIter -> IO ()

-- | Moves the mark named <tt>name</tt> (which must exist) to location
--   <tt>where</tt>. See <a>textBufferMoveMark</a> for details.
textBufferMoveMarkByName :: TextBufferClass self => self -> MarkName -> TextIter -> IO ()

-- | Deletes <tt>mark</tt>, so that it's no longer located anywhere in the
--   buffer. Most operations on <tt>mark</tt> become invalid. There is no
--   way to undelete a mark. <a>textMarkGetDeleted</a> will return
--   <tt>True</tt> after this function has been called on a mark;
--   <a>textMarkGetDeleted</a> indicates that a mark no longer belongs to a
--   buffer. The <a>markDeleted</a> signal will be emitted as notification
--   after the mark is deleted.
textBufferDeleteMark :: (TextBufferClass self, TextMarkClass mark) => self -> mark -> IO ()

-- | Deletes the mark named <tt>name</tt>; the mark must exist. See
--   <a>textBufferDeleteMark</a> for details.
textBufferDeleteMarkByName :: TextBufferClass self => self -> MarkName -> IO ()

-- | Returns the mark named <tt>name</tt> in the buffer, or
--   <tt>Nothing</tt> if no such mark exists in the buffer.
textBufferGetMark :: TextBufferClass self => self -> MarkName -> IO (Maybe TextMark)

-- | Returns the mark that represents the cursor (insertion point).
--   Equivalent to calling <tt>liftM fromJust $ textBufferGetMark
--   "insert"</tt>, but very slightly more efficient, and involves less
--   typing.
textBufferGetInsert :: TextBufferClass self => self -> IO TextMark

-- | Returns the mark that represents the selection bound. Equivalent to
--   calling <tt>liftM fromJust $ textBufferGetMark "selection_bound"</tt>,
--   but very slightly more efficient, and involves less typing.
--   
--   The currently-selected text in <tt>buffer</tt> is the region between
--   the "selection_bound" and "insert" marks. If "selection_bound" and
--   "insert" are in the same place, then there is no current selection.
--   <a>textBufferGetSelectionBounds</a> is another convenient function for
--   handling the selection, if you just want to know whether there's a
--   selection and what its bounds are.
textBufferGetSelectionBound :: TextBufferClass self => self -> IO TextMark

-- | This function moves the "insert" and "selection_bound" marks
--   simultaneously. If you move them to the same place in two steps with
--   <a>textBufferMoveMark</a>, you will temporarily select a region in
--   between their old and new locations, which can be pretty inefficient
--   since the temporarily-selected region will force stuff to be
--   recalculated. This function moves them as a unit, which can be
--   optimized.
textBufferPlaceCursor :: TextBufferClass self => self -> TextIter -> IO ()

-- | Emits the <a>applyTag</a> signal on the buffer. The default handler
--   for the signal applies <tt>tag</tt> to the given range. <tt>start</tt>
--   and <tt>end</tt> do not have to be in order.
textBufferApplyTag :: (TextBufferClass self, TextTagClass tag) => self -> tag -> TextIter -> TextIter -> IO ()

-- | Emits the <a>removeTag</a> signal. The default handler for the signal
--   removes all occurrences of <tt>tag</tt> from the given range.
--   <tt>start</tt> and <tt>end</tt> don't have to be in order.
textBufferRemoveTag :: (TextBufferClass self, TextTagClass tag) => self -> tag -> TextIter -> TextIter -> IO ()

-- | Calls <a>textTagTableLookup</a> on the buffer's tag table to get a
--   <a>TextTag</a>, then calls <a>textBufferApplyTag</a>.
textBufferApplyTagByName :: TextBufferClass self => self -> TagName -> TextIter -> TextIter -> IO ()

-- | Calls <a>textTagTableLookup</a> on the buffer's tag table to get a
--   <a>TextTag</a>, then calls <a>textBufferRemoveTag</a>.
textBufferRemoveTagByName :: TextBufferClass self => self -> TagName -> TextIter -> TextIter -> IO ()

-- | Removes all tags in the range between <tt>start</tt> and <tt>end</tt>.
--   Be careful with this function; it could remove tags added in code
--   unrelated to the code you're currently writing. That is, using this
--   function is probably a bad idea if you have two or more unrelated code
--   sections that add tags.
textBufferRemoveAllTags :: TextBufferClass self => self -> TextIter -> TextIter -> IO ()

-- | Obtains an iterator pointing to <tt>charOffset</tt> within the given
--   line. The <tt>charOffset</tt> must exist, offsets off the end of the
--   line are not allowed.
textBufferGetIterAtLineOffset :: TextBufferClass self => self -> Int -> Int -> IO TextIter

-- | Creates an iterator pointing to a position <tt>charOffset</tt> chars
--   from the start of the entire buffer. If <tt>charOffset</tt> is -1 or
--   greater than the number of characters in the buffer, the end iterator
--   is returned, that is the iterator one past the last valid character in
--   the buffer.
textBufferGetIterAtOffset :: TextBufferClass self => self -> Int -> IO TextIter

-- | Create an iterator at a specific line.
textBufferGetIterAtLine :: TextBufferClass self => self -> Int -> IO TextIter

-- | Create an iterator from a mark.
textBufferGetIterAtMark :: (TextBufferClass self, TextMarkClass mark) => self -> mark -> IO TextIter

-- | Create an iterator at the first position in the text buffer. This is
--   the same as using <a>textBufferGetIterAtOffset</a> to get the iter at
--   character offset 0.
textBufferGetStartIter :: TextBufferClass self => self -> IO TextIter

-- | Returns the "end iterator," one past the last valid character in the
--   text buffer. If dereferenced with <a>textIterGetChar</a>, the end
--   iterator has a character value of 0. The entire buffer lies in the
--   range from the first position in the buffer (call
--   <a>textBufferGetStartIter</a> to get character position 0) to the end
--   iterator.
textBufferGetEndIter :: TextBufferClass self => self -> IO TextIter

-- | Indicates whether the buffer has been modified since the last call to
--   <a>textBufferSetModified</a> set the modification flag to
--   <tt>False</tt>. Used for example to enable a "save" function in a text
--   editor.
--   
--   It is often more convenient to use <a>onModifiedChanged</a>.
textBufferGetModified :: TextBufferClass self => self -> IO Bool

-- | Used to keep track of whether the buffer has been modified since the
--   last time it was saved. Whenever the buffer is saved to disk, call
--   <tt><a>textBufferSetModified</a> buffer False</tt>. When the buffer is
--   modified, it will automatically toggled on the modified bit again.
--   When the modified bit flips, the buffer emits a <a>modifiedChanged</a>
--   signal.
textBufferSetModified :: TextBufferClass self => self -> Bool -> IO ()

-- | Deletes the range between the "insert" and "selection_bound" marks,
--   that is, the currently-selected text. If <tt>interactive</tt> is
--   <tt>True</tt>, the editability of the selection will be considered
--   (users can't delete uneditable text).
textBufferDeleteSelection :: TextBufferClass self => self -> Bool -> Bool -> IO Bool

-- | Check if a selection exists.
textBufferHasSelection :: TextBufferClass self => self -> IO Bool

-- | Returns the bounds of the selection (if the selection has length 0,
--   then <tt>start</tt> and <tt>end</tt> will be the same). <tt>start</tt>
--   and <tt>end</tt> will be in ascending order.
textBufferGetSelectionBounds :: TextBufferClass self => self -> IO (TextIter, TextIter)

-- | This function moves the "insert" and "selection_bound" marks
--   simultaneously. If you move them in two steps with
--   <a>textBufferMoveMark</a>, you will temporarily select a region in
--   between their old and new locations, which can be pretty inefficient
--   since the temporarily-selected region will force stuff to be
--   recalculated. This function moves them as a unit, which can be
--   optimized.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
textBufferSelectRange :: TextBufferClass self => self -> TextIter -> TextIter -> IO ()

-- | Retrieves the first and last iterators in the buffer, i.e. the entire
--   buffer lies within the range <tt>[start,end)</tt>.
textBufferGetBounds :: TextBufferClass self => self -> IO (TextIter, TextIter)

-- | Called to indicate that the buffer operations between here and a call
--   to <a>textBufferEndUserAction</a> are part of a single user-visible
--   operation. The operations between <a>textBufferBeginUserAction</a> and
--   <a>textBufferEndUserAction</a> can then be grouped when creating an
--   undo stack. <a>TextBuffer</a> maintains a count of calls to
--   <a>textBufferBeginUserAction</a> that have not been closed with a call
--   to <a>textBufferEndUserAction</a>, and emits the
--   <a>beginUserAction</a> and <a>endUserAction</a> signals only for the
--   outermost pair of calls. This allows you to build user actions from
--   other user actions.
--   
--   The "interactive" buffer mutation functions, such as
--   <a>textBufferInsertInteractive</a>, automatically call begin/end user
--   action around the buffer operations they perform, so there's no need
--   to add extra calls if you user action consists solely of a single call
--   to one of those functions.
textBufferBeginUserAction :: TextBufferClass self => self -> IO ()

-- | Should be paired with a call to <a>textBufferBeginUserAction</a>. See
--   that function for a full explanation.
textBufferEndUserAction :: TextBufferClass self => self -> IO ()

-- | Performs the appropriate action as if the user hit the delete key with
--   the cursor at the position specified by <tt>iter</tt>. In the normal
--   case a single character will be deleted, but when combining accents
--   are involved, more than one character can be deleted, and when
--   precomposed character and accent combinations are involved, less than
--   one character will be deleted.
--   
--   Because the buffer is modified, all outstanding iterators become
--   invalid after calling this function; however, the <tt>iter</tt> will
--   be re-initialized to point to the location where text was deleted.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
textBufferBackspace :: TextBufferClass self => self -> TextIter -> Bool -> Bool -> IO Bool

-- | Inserts a child widget anchor into the text buffer at <tt>iter</tt>.
--   The anchor will be counted as one character in character counts, and
--   when obtaining the buffer contents as a string, will be represented by
--   the Unicode "object replacement character" <tt>(chr 0xFFFC)</tt>. Note
--   that the "slice" variants for obtaining portions of the buffer as a
--   string include this character for child anchors, but the "text"
--   variants do not. e.g. see <a>textBufferGetSlice</a> and
--   <a>textBufferGetText</a>. Consider <a>textBufferCreateChildAnchor</a>
--   as a more convenient alternative to this function.
textBufferInsertChildAnchor :: TextBufferClass self => self -> TextIter -> TextChildAnchor -> IO ()

-- | This is a convenience function which simply creates a child anchor
--   with <a>textBufferChildAnchorNew</a> and inserts it into the buffer
--   with <a>textBufferInsertChildAnchor</a>.
textBufferCreateChildAnchor :: TextBufferClass self => self -> TextIter -> IO TextChildAnchor

-- | Obtains the location of <tt>anchor</tt> within <tt>buffer</tt>.
textBufferGetIterAtChildAnchor :: TextBufferClass self => self -> TextIter -> TextChildAnchor -> IO ()

-- | Pastes the contents of a clipboard at the given <tt>location</tt>.
--   (Note: pasting is asynchronous, that is, we'll ask for the paste data
--   and return, and at some point later after the main loop runs, the
--   paste data will be inserted.)
textBufferPasteClipboard :: TextBufferClass self => self -> Clipboard -> TextIter -> Bool -> IO ()

-- | Pastes the contents of a clipboard at the insertion point. (Note:
--   pasting is asynchronous, that is, we'll ask for the paste data and
--   return, and at some point later after the main loop runs, the paste
--   data will be inserted.)
textBufferPasteClipboardAtCursor :: TextBufferClass self => self -> Clipboard -> Bool -> IO ()

-- | Copies the currently-selected text to a clipboard.
textBufferCopyClipboard :: TextBufferClass self => self -> Clipboard -> IO ()

-- | Copies the currently-selected text to a clipboard, then deletes said
--   text if it's editable.
textBufferCutClipboard :: TextBufferClass self => self -> Clipboard -> Bool -> IO ()

-- | Adds clipboard to the list of clipboards in which the selection
--   contents of <tt>self</tt> are available. In most cases,
--   <tt>clipboard</tt> will be the <a>Clipboard</a> of type
--   <tt>selectionPrimary</tt> for a view of <tt>self</tt>.
textBufferAddSelectionClipboard :: TextBufferClass self => self -> Clipboard -> IO ()

-- | Removes a <a>Clipboard</a> added with
--   <a>textBufferAddSelectionClipboard</a>.
textBufferRemoveSelectionClipboard :: TextBufferClass self => self -> Clipboard -> IO ()

-- | Text Tag Table.
textBufferTagTable :: (TextBufferClass self, TextTagTableClass textTagTable) => ReadWriteAttr self TextTagTable textTagTable

-- | The text content of the buffer. Without child widgets and images, see
--   <a>textBufferGetText</a> for more information.
--   
--   Default value: ""
textBufferText :: (TextBufferClass self, GlibString string) => Attr self string

-- | The 'modified' property. See <a>textBufferGetModified</a> and
--   <a>textBufferSetModified</a>
textBufferModified :: TextBufferClass self => Attr self Bool

-- | A <a>TextTag</a> was applied to a region of text.
applyTag :: TextBufferClass self => Signal self (TextTag -> TextIter -> TextIter -> IO ())

-- | A new atomic user action is started.
--   
--   <ul>
--   <li>Together with <a>endUserAction</a> these signals can be used to
--   build an undo stack.</li>
--   </ul>
beginUserAction :: TextBufferClass self => Signal self (IO ())

-- | Emitted when the contents of the buffer change.
bufferChanged :: TextBufferClass self => Signal self (IO ())

-- | A range of text is about to be deleted.
deleteRange :: TextBufferClass self => Signal self (TextIter -> TextIter -> IO ())

-- | An atomic action has ended.
--   
--   <ul>
--   <li>see <a>beginUserAction</a></li>
--   </ul>
endUserAction :: TextBufferClass self => Signal self (IO ())

-- | A <a>Pixbuf</a> is inserted into the buffer.
--   
--   <ul>
--   <li>See note in <a>bufferInsertText</a>.</li>
--   </ul>
insertPixbuf :: TextBufferClass self => Signal self (TextIter -> Pixbuf -> IO ())

-- | The <a>insertChildAnchor</a> signal is emitted to insert a
--   <a>TextChildAnchor</a> in a <a>TextBuffer</a>. Insertion actually
--   occurs in the default handler.
--   
--   <ul>
--   <li>See note in <a>bufferInsertText</a>.</li>
--   </ul>
insertChildAnchor :: TextBufferClass self => Signal self (TextIter -> TextChildAnchor -> IO ())

-- | Some text is inserted. Insertion actually occurs in the default
--   handler.
--   
--   <ul>
--   <li>The function connected to this handler may not modify the buffer
--   since this would invalidate the iterator. If this function replaces
--   the default handler, it needs to stop the emission of this signal in
--   order to prevent the default handler from running. If additional text
--   should be inserted, this can be done using the <a>after</a> function
--   to connect.</li>
--   </ul>
bufferInsertText :: (TextBufferClass self, GlibString string) => Signal self (TextIter -> string -> IO ())

-- | A <a>TextMark</a> within the buffer was deleted.
markDeleted :: TextBufferClass self => Signal self (TextMark -> IO ())

-- | A <a>TextMark</a> was inserted into the buffer.
markSet :: TextBufferClass self => Signal self (TextIter -> TextMark -> IO ())
modifiedChanged :: TextBufferClass self => Signal self (IO ())

-- | The <a>pasteDone</a> signal is emitted after paste operation has been
--   completed. This is useful to properly scroll the view to the end of
--   the pasted text. See <a>textBufferPasteClipboard</a> for more details.
pasteDone :: TextBufferClass self => Signal self (Clipboard -> IO ())

-- | The textbuffer has changed.
removeTag :: TextBufferClass self => Signal self (TextTag -> TextIter -> TextIter -> IO ())

-- | A <a>TextTag</a> was applied to a region of text.
onApplyTag :: TextBufferClass self => self -> (TextTag -> TextIter -> TextIter -> IO ()) -> IO (ConnectId self)

-- | A <a>TextTag</a> was applied to a region of text.
afterApplyTag :: TextBufferClass self => self -> (TextTag -> TextIter -> TextIter -> IO ()) -> IO (ConnectId self)

-- | A new atomic user action is started.
--   
--   <ul>
--   <li>Together with <a>onEndUserAction</a> these signals can be used to
--   build an undo stack.</li>
--   </ul>
onBeginUserAction :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | A new atomic user action is started.
--   
--   <ul>
--   <li>Together with <a>onEndUserAction</a> these signals can be used to
--   build an undo stack.</li>
--   </ul>
afterBeginUserAction :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted when the contents of the buffer change.
onBufferChanged :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted when the contents of the buffer change.
afterBufferChanged :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | A range of text is about to be deleted.
onDeleteRange :: TextBufferClass self => self -> (TextIter -> TextIter -> IO ()) -> IO (ConnectId self)

-- | A range of text is about to be deleted.
afterDeleteRange :: TextBufferClass self => self -> (TextIter -> TextIter -> IO ()) -> IO (ConnectId self)

-- | An atomic action has ended.
--   
--   <ul>
--   <li>see <a>onBeginUserAction</a></li>
--   </ul>
onEndUserAction :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | An atomic action has ended.
--   
--   <ul>
--   <li>see <a>onBeginUserAction</a></li>
--   </ul>
afterEndUserAction :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | A <a>Pixbuf</a> is inserted into the buffer.
onInsertPixbuf :: TextBufferClass self => self -> (TextIter -> Pixbuf -> IO ()) -> IO (ConnectId self)

-- | A <a>Pixbuf</a> is inserted into the buffer.
afterInsertPixbuf :: TextBufferClass self => self -> (TextIter -> Pixbuf -> IO ()) -> IO (ConnectId self)

-- | Some text was inserted.
onBufferInsertText :: (TextBufferClass self, GlibString string) => self -> (TextIter -> string -> IO ()) -> IO (ConnectId self)

-- | Some text was inserted.
afterBufferInsertText :: (TextBufferClass self, GlibString string) => self -> (TextIter -> string -> IO ()) -> IO (ConnectId self)

-- | A <a>TextMark</a> within the buffer was deleted.
onMarkDeleted :: TextBufferClass self => self -> (TextMark -> IO ()) -> IO (ConnectId self)

-- | A <a>TextMark</a> within the buffer was deleted.
afterMarkDeleted :: TextBufferClass self => self -> (TextMark -> IO ()) -> IO (ConnectId self)

-- | A <a>TextMark</a> was inserted into the buffer.
onMarkSet :: TextBufferClass self => self -> (TextIter -> TextMark -> IO ()) -> IO (ConnectId self)

-- | A <a>TextMark</a> was inserted into the buffer.
afterMarkSet :: TextBufferClass self => self -> (TextIter -> TextMark -> IO ()) -> IO (ConnectId self)

-- | The textbuffer has changed.
onModifiedChanged :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | The textbuffer has changed.
afterModifiedChanged :: TextBufferClass self => self -> IO () -> IO (ConnectId self)

-- | A <a>TextTag</a> was removed.
onRemoveTag :: TextBufferClass self => self -> (TextTag -> TextIter -> TextIter -> IO ()) -> IO (ConnectId self)

-- | A <a>TextTag</a> was removed.
afterRemoveTag :: TextBufferClass self => self -> (TextTag -> TextIter -> TextIter -> IO ()) -> IO (ConnectId self)


-- | Widget that displays a <a>TextBuffer</a>
module Graphics.UI.Gtk.Multiline.TextView
data TextView
class ContainerClass o => TextViewClass o
data TextChildAnchor
class GObjectClass o => TextChildAnchorClass o
castToTextView :: GObjectClass obj => obj -> TextView
gTypeTextView :: GType
toTextView :: TextViewClass o => o -> TextView

-- | Editing option
data DeleteType
[DeleteChars] :: DeleteType
[DeleteWordEnds] :: DeleteType
[DeleteWords] :: DeleteType
[DeleteDisplayLines] :: DeleteType
[DeleteDisplayLineEnds] :: DeleteType
[DeleteParagraphEnds] :: DeleteType
[DeleteParagraphs] :: DeleteType
[DeleteWhitespace] :: DeleteType

-- | Editing direction
data DirectionType
[DirTabForward] :: DirectionType
[DirTabBackward] :: DirectionType
[DirUp] :: DirectionType
[DirDown] :: DirectionType
[DirLeft] :: DirectionType
[DirRight] :: DirectionType

-- | Justification for label and maybe other widgets (text?)
data Justification
[JustifyLeft] :: Justification
[JustifyRight] :: Justification
[JustifyCenter] :: Justification
[JustifyFill] :: Justification

-- | Movement in text widget
data MovementStep
[MovementLogicalPositions] :: MovementStep
[MovementVisualPositions] :: MovementStep
[MovementWords] :: MovementStep
[MovementDisplayLines] :: MovementStep
[MovementDisplayLineEnds] :: MovementStep
[MovementParagraphs] :: MovementStep
[MovementParagraphEnds] :: MovementStep
[MovementPages] :: MovementStep
[MovementBufferEnds] :: MovementStep
[MovementHorizontalPages] :: MovementStep

-- | The window type for coordinate translation.
data TextWindowType
[TextWindowPrivate] :: TextWindowType
[TextWindowWidget] :: TextWindowType
[TextWindowText] :: TextWindowType
[TextWindowLeft] :: TextWindowType
[TextWindowRight] :: TextWindowType
[TextWindowTop] :: TextWindowType
[TextWindowBottom] :: TextWindowType

-- | Determine how lines are wrapped in a <a>TextView</a>.
data WrapMode
[WrapNone] :: WrapMode
[WrapChar] :: WrapMode
[WrapWord] :: WrapMode
[WrapWordChar] :: WrapMode

-- | Creates a new <a>TextView</a>. If you don't call
--   <a>textViewSetBuffer</a> before using the text view, an empty default
--   buffer will be created for you. Get the buffer with
--   <a>textViewGetBuffer</a>. If you want to specify your own buffer,
--   consider <a>textViewNewWithBuffer</a>.
textViewNew :: IO TextView

-- | Creates a new <a>TextView</a> widget displaying the buffer
--   <tt>buffer</tt>. One buffer can be shared among many widgets.
textViewNewWithBuffer :: TextBufferClass buffer => buffer -> IO TextView

-- | Sets the given buffer as the buffer being displayed by the text view.
textViewSetBuffer :: (TextViewClass self, TextBufferClass buffer) => self -> buffer -> IO ()

-- | Returns the <a>TextBuffer</a> being displayed by this text view.
textViewGetBuffer :: TextViewClass self => self -> IO TextBuffer

-- | Scrolls the text view so that <tt>mark</tt> is on the screen in the
--   position indicated by <tt>xalign</tt> and <tt>yalign</tt>. An
--   alignment of 0.0 indicates left or top, 1.0 indicates right or bottom,
--   0.5 means center. If the alignment is <tt>Nothing</tt>, the text
--   scrolls the minimal distance to get the mark onscreen, possibly not
--   scrolling at all. The effective screen for purposes of this function
--   is reduced by a margin of size <tt>withinMargin</tt>.
textViewScrollToMark :: (TextViewClass self, TextMarkClass mark) => self -> mark -> Double -> Maybe (Double, Double) -> IO ()

-- | Scrolls the text view so that <tt>iter</tt> is on the screen in the
--   position indicated by <tt>xalign</tt> and <tt>yalign</tt>. An
--   alignment of 0.0 indicates left or top, 1.0 indicates right or bottom,
--   0.5 means center. If the alignment is <tt>Nothing</tt>, the text
--   scrolls the minimal distance to get the mark onscreen, possibly not
--   scrolling at all. The effective screen for purposes of this function
--   is reduced by a margin of size <tt>withinMargin</tt>.
--   
--   <ul>
--   <li>This function uses the currently-computed height of the lines in
--   the text buffer. Note that line heights are computed in an idle
--   handler; so this function may not have the desired effect if it's
--   called before the height computations. To avoid oddness, consider
--   using <a>textViewScrollToMark</a> which saves a point to be scrolled
--   to after line validation. This is particularly important if you add
--   new text to the buffer and immediately ask the view to scroll to it
--   (which it can't since it is not updated until the main loop
--   runs).</li>
--   </ul>
textViewScrollToIter :: TextViewClass self => self -> TextIter -> Double -> Maybe (Double, Double) -> IO Bool

-- | Scrolls the text view the minimum distance such that <tt>mark</tt> is
--   contained within the visible area of the widget.
textViewScrollMarkOnscreen :: (TextViewClass self, TextMarkClass mark) => self -> mark -> IO ()

-- | Moves a mark within the buffer so that it's located within the
--   currently-visible text area.
textViewMoveMarkOnscreen :: (TextViewClass self, TextMarkClass mark) => self -> mark -> IO Bool

-- | Moves the cursor to the currently visible region of the buffer, it it
--   isn't there already.
textViewPlaceCursorOnscreen :: TextViewClass self => self -> IO Bool

-- | Gets the <a>TextIter</a> at the start of the line containing the
--   coordinate <tt>y</tt>. <tt>y</tt> is in buffer coordinates, convert
--   from window coordinates with <a>textViewWindowToBufferCoords</a>. Also
--   returns <tt>lineTop</tt> the coordinate of the top edge of the line.
textViewGetLineAtY :: TextViewClass self => self -> Int -> IO (TextIter, Int)

-- | Gets the y coordinate of the top of the line containing <tt>iter</tt>,
--   and the height of the line. The coordinate is a buffer coordinate;
--   convert to window coordinates with
--   <a>textViewBufferToWindowCoords</a>.
textViewGetLineYrange :: TextViewClass self => self -> TextIter -> IO (Int, Int)

-- | Retrieves the iterator at buffer coordinates <tt>x</tt> and
--   <tt>y</tt>. Buffer coordinates are coordinates for the entire buffer,
--   not just the currently-displayed portion. If you have coordinates from
--   an event, you have to convert those to buffer coordinates with
--   <a>textViewWindowToBufferCoords</a>.
textViewGetIterAtLocation :: TextViewClass self => self -> Int -> Int -> IO TextIter

-- | Converts coordinate <tt>(bufferX, bufferY)</tt> to coordinates for the
--   window <tt>win</tt>
--   
--   Note that you can't convert coordinates for a nonexisting window (see
--   <a>textViewSetBorderWindowSize</a>).
textViewBufferToWindowCoords :: TextViewClass self => self -> TextWindowType -> (Int, Int) -> IO (Int, Int)

-- | Converts coordinates on the window identified by <tt>win</tt> to
--   buffer coordinates.
--   
--   Note that you can't convert coordinates for a nonexisting window (see
--   <a>textViewSetBorderWindowSize</a>).
textViewWindowToBufferCoords :: TextViewClass self => self -> TextWindowType -> (Int, Int) -> IO (Int, Int)

-- | Retrieves the <a>DrawWindow</a> corresponding to an area of the text
--   view; possible windows include the overall widget window, child
--   windows on the left, right, top, bottom, and the window that displays
--   the text buffer. Windows are <tt>Nothing</tt> and nonexistent if their
--   width or height is 0, and are nonexistent before the widget has been
--   realized.
textViewGetWindow :: TextViewClass self => self -> TextWindowType -> IO (Maybe DrawWindow)

-- | Retrieve the type of window the <a>TextView</a> widget contains.
--   
--   Usually used to find out which window an event corresponds to. An
--   emission of an event signal of <a>TextView</a> yields a
--   <a>DrawWindow</a>. This function can be used to see if the event
--   actually belongs to the main text window.
textViewGetWindowType :: TextViewClass self => self -> DrawWindow -> IO TextWindowType

-- | Sets the width of <a>TextWindowLeft</a> or <a>TextWindowRight</a>, or
--   the height of <a>TextWindowTop</a> or <a>TextWindowBottom</a>.
--   Automatically destroys the corresponding window if the size is set to
--   0, and creates the window if the size is set to non-zero. This
--   function can only be used for the "border windows", it doesn't work
--   with <a>TextWindowWidget</a>, <a>TextWindowText</a>, or
--   <a>TextWindowPrivate</a>.
textViewSetBorderWindowSize :: TextViewClass self => self -> TextWindowType -> Int -> IO ()

-- | Gets the width of the specified border window. See
--   <a>textViewSetBorderWindowSize</a>.
textViewGetBorderWindowSize :: TextViewClass self => self -> TextWindowType -> IO Int

-- | Moves the given <tt>iter</tt> forward by one display (wrapped) line. A
--   display line is different from a paragraph. Paragraphs are separated
--   by newlines or other paragraph separator characters. Display lines are
--   created by line-wrapping a paragraph. If wrapping is turned off,
--   display lines and paragraphs will be the same. Display lines are
--   divided differently for each view, since they depend on the view's
--   width; paragraphs are the same in all views, since they depend on the
--   contents of the <a>TextBuffer</a>.
textViewForwardDisplayLine :: TextViewClass self => self -> TextIter -> IO Bool

-- | Moves the given <tt>iter</tt> backward by one display (wrapped) line.
--   A display line is different from a paragraph. Paragraphs are separated
--   by newlines or other paragraph separator characters. Display lines are
--   created by line-wrapping a paragraph. If wrapping is turned off,
--   display lines and paragraphs will be the same. Display lines are
--   divided differently for each view, since they depend on the view's
--   width; paragraphs are the same in all views, since they depend on the
--   contents of the <a>TextBuffer</a>.
textViewBackwardDisplayLine :: TextViewClass self => self -> TextIter -> IO Bool

-- | Moves the given <tt>iter</tt> forward to the next display line end. A
--   display line is different from a paragraph. Paragraphs are separated
--   by newlines or other paragraph separator characters. Display lines are
--   created by line-wrapping a paragraph. If wrapping is turned off,
--   display lines and paragraphs will be the same. Display lines are
--   divided differently for each view, since they depend on the view's
--   width; paragraphs are the same in all views, since they depend on the
--   contents of the <a>TextBuffer</a>.
textViewForwardDisplayLineEnd :: TextViewClass self => self -> TextIter -> IO Bool

-- | Moves the given <tt>iter</tt> backward to the next display line start.
--   A display line is different from a paragraph. Paragraphs are separated
--   by newlines or other paragraph separator characters. Display lines are
--   created by line-wrapping a paragraph. If wrapping is turned off,
--   display lines and paragraphs will be the same. Display lines are
--   divided differently for each view, since they depend on the view's
--   width; paragraphs are the same in all views, since they depend on the
--   contents of the <a>TextBuffer</a>.
textViewBackwardDisplayLineStart :: TextViewClass self => self -> TextIter -> IO Bool

-- | Determines whether <tt>iter</tt> is at the start of a display line.
--   See <a>textViewForwardDisplayLine</a> for an explanation of display
--   lines vs. paragraphs.
textViewStartsDisplayLine :: TextViewClass self => self -> TextIter -> IO Bool

-- | Move the iterator a given number of characters visually, treating it
--   as the strong cursor position. If <tt>count</tt> is positive, then the
--   new strong cursor position will be <tt>count</tt> positions to the
--   right of the old cursor position. If <tt>count</tt> is negative then
--   the new strong cursor position will be <tt>count</tt> positions to the
--   left of the old cursor position.
--   
--   In the presence of bidirection text, the correspondence between
--   logical and visual order will depend on the direction of the current
--   run, and there may be jumps when the cursor is moved off of the end of
--   a run.
textViewMoveVisually :: TextViewClass self => self -> TextIter -> Int -> IO Bool

-- | Adds a child widget in the text buffer, at the given <tt>anchor</tt>.
textViewAddChildAtAnchor :: (TextViewClass self, WidgetClass child) => self -> child -> TextChildAnchor -> IO ()

-- | Create a new <a>TextChildAnchor</a>.
--   
--   <ul>
--   <li>Using <tt>textBufferCreateChildAnchor</tt> is usually simpler then
--   executing this function and <tt>textBufferInsertChildAnchor</tt>.</li>
--   </ul>
textChildAnchorNew :: IO TextChildAnchor

-- | Retrieve all <a>Widget</a>s at this <a>TextChildAnchor</a>.
--   
--   <ul>
--   <li>The widgets in the returned list need to be upcasted to what they
--   were.</li>
--   </ul>
textChildAnchorGetWidgets :: TextChildAnchor -> IO [Widget]

-- | Query if an anchor was deleted.
textChildAnchorGetDeleted :: TextChildAnchor -> IO Bool

-- | Adds a child at fixed coordinates in one of the text widget's windows.
--   The window must have nonzero size (see
--   <a>textViewSetBorderWindowSize</a>). Note that the child coordinates
--   are given relative to the <a>DrawWindow</a> in question, and that
--   these coordinates have no sane relationship to scrolling. When placing
--   a child in <a>TextWindowWidget</a>, scrolling is irrelevant, the child
--   floats above all scrollable areas. If you want the widget to move when
--   the text view scrolls, use <a>textViewAddChildAtAnchor</a> instead.
textViewAddChildInWindow :: (TextViewClass self, WidgetClass child) => self -> child -> TextWindowType -> Int -> Int -> IO ()

-- | Move a child widget within the <a>TextView</a>. This is really only
--   apprpriate for "floating" child widgets added using
--   <a>textViewAddChildInWindow</a>.
textViewMoveChild :: (TextViewClass self, WidgetClass child) => self -> child -> Int -> Int -> IO ()

-- | Sets the line wrapping for the view.
textViewSetWrapMode :: TextViewClass self => self -> WrapMode -> IO ()

-- | Gets the line wrapping for the view.
textViewGetWrapMode :: TextViewClass self => self -> IO WrapMode

-- | Sets the default editability of the <a>TextView</a>. You can override
--   this default setting with tags in the buffer, using the "editable"
--   attribute of tags.
textViewSetEditable :: TextViewClass self => self -> Bool -> IO ()

-- | Returns the default editability of the <a>TextView</a>. Tags in the
--   buffer may override this setting for some ranges of text.
textViewGetEditable :: TextViewClass self => self -> IO Bool

-- | Toggles whether the insertion point is displayed. A buffer with no
--   editable text probably shouldn't have a visible cursor, so you may
--   want to turn the cursor off.
textViewSetCursorVisible :: TextViewClass self => self -> Bool -> IO ()

-- | Find out whether the cursor is being displayed.
textViewGetCursorVisible :: TextViewClass self => self -> IO Bool

-- | Sets the default number of blank pixels above paragraphs in the text
--   view. Tags in the buffer for the text view may override the defaults.
--   
--   <ul>
--   <li>Tags in the buffer may override this default.</li>
--   </ul>
textViewSetPixelsAboveLines :: TextViewClass self => self -> Int -> IO ()

-- | Gets the default number of pixels to put above paragraphs.
textViewGetPixelsAboveLines :: TextViewClass self => self -> IO Int

-- | Sets the default number of pixels of blank space to put below
--   paragraphs in the text view. May be overridden by tags applied to the
--   text view's buffer.
textViewSetPixelsBelowLines :: TextViewClass self => self -> Int -> IO ()

-- | Gets the default number of blank pixels below each paragraph.
textViewGetPixelsBelowLines :: TextViewClass self => self -> IO Int

-- | Sets the default number of pixels of blank space to leave between
--   display/wrapped lines within a paragraph. May be overridden by tags in
--   the text view's buffer.
textViewSetPixelsInsideWrap :: TextViewClass self => self -> Int -> IO ()

-- | Gets the default number of pixels of blank space between lines in a
--   wrapped paragraph.
textViewGetPixelsInsideWrap :: TextViewClass self => self -> IO Int

-- | Sets the default justification of text in the text view. Tags in the
--   view's buffer may override the default.
textViewSetJustification :: TextViewClass self => self -> Justification -> IO ()

-- | Gets the default justification of paragraphs in the text view. Tags in
--   the buffer may override the default.
textViewGetJustification :: TextViewClass self => self -> IO Justification

-- | Sets the default left margin for text in the text view. Tags in the
--   buffer may override the default.
textViewSetLeftMargin :: TextViewClass self => self -> Int -> IO ()

-- | Gets the default left margin size of paragraphs in the text view. Tags
--   in the buffer may override the default.
textViewGetLeftMargin :: TextViewClass self => self -> IO Int

-- | Sets the default right margin for text in the text view. Tags in the
--   buffer may override the default.
textViewSetRightMargin :: TextViewClass self => self -> Int -> IO ()

-- | Gets the default right margin for text in the text view. Tags in the
--   buffer may override the default.
textViewGetRightMargin :: TextViewClass self => self -> IO Int

-- | Sets the default indentation for paragraphs in the text view. Tags in
--   the buffer may override the default.
textViewSetIndent :: TextViewClass self => self -> Int -> IO ()

-- | Gets the default indentation of paragraphs in the text view. Tags in
--   the view's buffer may override the default. The indentation may be
--   negative.
textViewGetIndent :: TextViewClass self => self -> IO Int

-- | Obtains a copy of the default text attributes. These are the
--   attributes used for text unless a tag overrides them. You'd typically
--   pass the default attributes in to <tt>textIterGetAttributes</tt> in
--   order to get the attributes in effect at a given text position.
textViewGetDefaultAttributes :: TextViewClass self => self -> IO TextAttributes

-- | Returns the currently-visible region of the buffer, in buffer
--   coordinates. Convert to window coordinates with
--   <a>textViewBufferToWindowCoords</a>.
textViewGetVisibleRect :: TextViewClass self => self -> IO Rectangle

-- | Gets a rectangle which roughly contains the character at
--   <tt>iter</tt>. The rectangle position is in buffer coordinates; use
--   <a>textViewBufferToWindowCoords</a> to convert these coordinates to
--   coordinates for one of the windows in the text view.
textViewGetIterLocation :: TextViewClass self => self -> TextIter -> IO Rectangle

-- | Retrieves the iterator pointing to the character at buffer coordinates
--   <tt>x</tt> and <tt>y</tt>. Buffer coordinates are coordinates for the
--   entire buffer, not just the currently-displayed portion. If you have
--   coordinates from an event, you have to convert those to buffer
--   coordinates with <a>textViewWindowToBufferCoords</a>.
--   
--   Note that this is different from <a>textViewGetIterAtLocation</a>,
--   which returns cursor locations, i.e. positions <i>between</i>
--   characters.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
textViewGetIterAtPosition :: TextViewClass self => self -> Int -> Int -> IO (TextIter, Int)

-- | Changes the <a>TextView</a> overwrite mode.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
textViewSetOverwrite :: TextViewClass self => self -> Bool -> IO ()

-- | Returns whether the <a>TextView</a> is in overwrite mode or not.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
textViewGetOverwrite :: TextViewClass self => self -> IO Bool

-- | Sets the behavior of the text widget when the Tab key is pressed. If
--   <tt>acceptsTab</tt> is <tt>True</tt> a tab character is inserted. If
--   <tt>acceptsTab</tt> is <tt>False</tt> the keyboard focus is moved to
--   the next widget in the focus chain.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
textViewSetAcceptsTab :: TextViewClass self => self -> Bool -> IO ()

-- | Returns whether pressing the Tab key inserts a tab characters.
--   <a>textViewSetAcceptsTab</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
textViewGetAcceptsTab :: TextViewClass self => self -> IO Bool

-- | Gets the horizontal-scrolling <a>Adjustment</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
textViewGetHadjustment :: TextViewClass self => self -> IO Adjustment

-- | Gets the vertical-scrolling <a>Adjustment</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
textViewGetVadjustment :: TextViewClass self => self -> IO Adjustment

-- | Allow the <a>TextView</a> input method to internally handle key press
--   and release events. If this function returns <a>True</a>, then no
--   further processing should be done for this key event. See
--   <tt>imContextFilterKeypress</tt>.
--   
--   Note that you are expected to call this function from your handler
--   when overriding key event handling. This is needed in the case when
--   you need to insert your own key handling between the input method and
--   the default key event handling of the <a>TextView</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
textViewImContextFilterKeypress :: TextViewClass self => self -> EventM EKey Bool

-- | Reset the input method context of the text view if needed.
--   
--   This can be necessary in the case where modifying the buffer would
--   confuse on-going input method behavior.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
textViewResetImContext :: TextViewClass self => self -> IO ()

-- | Pixels of blank space above paragraphs.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textViewPixelsAboveLines :: TextViewClass self => Attr self Int

-- | Pixels of blank space below paragraphs.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textViewPixelsBelowLines :: TextViewClass self => Attr self Int

-- | Pixels of blank space between wrapped lines in a paragraph.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textViewPixelsInsideWrap :: TextViewClass self => Attr self Int

-- | Whether the text can be modified by the user.
--   
--   Default value: <tt>True</tt>
textViewEditable :: TextViewClass self => Attr self Bool

-- | Which IM (input method) module should be used for this entry. See
--   GtkIMContext. Setting this to a non-empty value overrides the
--   system-wide IM module setting. See the GtkSettings "gtk-im-module"
--   property.
--   
--   Default value: ""
textViewImModule :: TextViewClass self => Attr self DefaultGlibString

-- | Whether to wrap lines never, at word boundaries, or at character
--   boundaries.
--   
--   Default value: <a>WrapNone</a>
textViewWrapMode :: TextViewClass self => Attr self WrapMode

-- | Left, right, or center justification.
--   
--   Default value: <a>JustifyLeft</a>
textViewJustification :: TextViewClass self => Attr self Justification

-- | Width of the left margin in pixels.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textViewLeftMargin :: TextViewClass self => Attr self Int

-- | Width of the right margin in pixels.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textViewRightMargin :: TextViewClass self => Attr self Int

-- | Amount to indent the paragraph, in pixels.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
textViewIndent :: TextViewClass self => Attr self Int

-- | If the insertion cursor is shown.
--   
--   Default value: <tt>True</tt>
textViewCursorVisible :: TextViewClass self => Attr self Bool

-- | The buffer which is displayed.
textViewBuffer :: TextViewClass self => Attr self TextBuffer

-- | Whether entered text overwrites existing contents.
--   
--   Default value: <tt>False</tt>
textViewOverwrite :: TextViewClass self => Attr self Bool

-- | Whether Tab will result in a tab character being entered.
--   
--   Default value: <tt>True</tt>
textViewAcceptsTab :: TextViewClass self => Attr self Bool

-- | The <a>backspace</a> signal is a keybinding signal which gets emitted
--   when the user asks for it.
--   
--   The default bindings for this signal are Backspace and
--   Shift-Backspace.
backspace :: TextViewClass self => Signal self (IO ())

-- | Copying to the clipboard.
--   
--   <ul>
--   <li>This signal is emitted when a selection is copied to the
--   clipboard.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
copyClipboard :: TextViewClass self => Signal self (IO ())

-- | Cutting to the clipboard.
--   
--   <ul>
--   <li>This signal is emitted when a selection is cut out and copied to
--   the clipboard. The action itself happens when the textview processed
--   this request.</li>
--   </ul>
cutClipboard :: TextViewClass self => Signal self (IO ())

-- | Deleting text.
--   
--   <ul>
--   <li>The widget will remove the specified number of units in the text
--   where the meaning of units depends on the kind of deletion.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
deleteFromCursor :: TextViewClass self => Signal self (DeleteType -> Int -> IO ())

-- | Inserting text.
--   
--   <ul>
--   <li>The widget will insert the string into the text where the meaning
--   of units depends on the kind of deletion.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
insertAtCursor :: (TextViewClass self, GlibString string) => Signal self (string -> IO ())

-- | Moving the cursor.
--   
--   <ul>
--   <li>The signal specifies what kind and how many steps the cursor will
--   do. The flag is set to <tt>True</tt> if this movement extends a
--   selection.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
moveCursor :: TextViewClass self => Signal self (MovementStep -> Int -> Bool -> IO ())

-- | The <a>moveViewport</a> signal is a keybinding signal which can be
--   bound to key combinations to allow the user to move the viewport, i.e.
--   change what part of the text view is visible in a containing scrolled
--   window. There are no default bindings for this signal.
moveViewport :: TextViewClass self => Signal self (ScrollStep -> Int -> IO ())

-- | Moving the focus.
--   
--   <ul>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
moveFocus :: TextViewClass self => Signal self (DirectionType -> IO ())

-- | Page change signals.
--   
--   <ul>
--   <li>The signal specifies how many pages the view should move up or
--   down. The flag is set to <tt>True</tt> if this movement extends a
--   selection.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   <li>Figure out why this signal is called horizontally, not
--   vertically.</li>
--   </ul>
pageHorizontally :: TextViewClass self => Signal self (Int -> Bool -> IO ())

-- | Pasting from the clipboard.
--   
--   <ul>
--   <li>This signal is emitted when something is pasted from the
--   clipboard.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
pasteClipboard :: TextViewClass self => Signal self (IO ())

-- | Add menu entries to context menus.
--   
--   <ul>
--   <li>This signal is emitted if a context menu within the
--   <a>TextView</a> is opened. This signal can be used to add application
--   specific menu items to this popup.</li>
--   </ul>
populatePopup :: TextViewClass self => Signal self (Menu -> IO ())

-- | Inserting an anchor.
--   
--   <ul>
--   <li>This signal is emitted when anchor is inserted into the text.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
selectAll :: TextViewClass self => Signal self (Bool -> IO ())

-- | The scroll-bars changed.
setAnchor :: TextViewClass self => Signal self (IO ())

-- | The <a>setTextViewScrollAdjustments</a> signal is a keybinding signal
--   which gets emitted to toggle the visibility of the cursor. The default
--   binding for this signal is F7.
setTextViewScrollAdjustments :: TextViewClass self => Signal self (Adjustment -> Adjustment -> IO ())

-- | The <a>toggleCursorVisible</a> signal is a keybinding signal which
--   gets emitted to toggle the visibility of the cursor. The default
--   binding for this signal is F7.
toggleCursorVisible :: TextViewClass self => Signal self (IO ())

-- | Insert Overwrite mode has changed.
--   
--   <ul>
--   <li>This signal is emitted when the <a>TextView</a> changes from
--   inserting mode to overwriting mode and vice versa.</li>
--   <li>The action itself happens when the <a>TextView</a> processes this
--   signal.</li>
--   </ul>
toggleOverwrite :: TextViewClass self => Signal self (IO ())

-- | If an input method is used, the typed text will not immediately be
--   committed to the buffer. So if you are interested in the text, connect
--   to this signal.
--   
--   This signal is only emitted if the text at the given position is
--   actually editable.
textViewPreeditChanged :: (TextViewClass self, GlibString string) => Signal self (string -> IO ())


-- | A widget which displays a list of icons in a grid
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.6</li>
--   </ul>
module Graphics.UI.Gtk.ModelView.IconView
data IconView
class ContainerClass o => IconViewClass o
castToIconView :: GObjectClass obj => obj -> IconView
gTypeIconView :: GType
toIconView :: IconViewClass o => o -> IconView

-- | Creates a new <a>IconView</a> widget
iconViewNew :: IO IconView

-- | Creates a new <a>IconView</a> widget with the model <tt>model</tt> and
--   defines how to extract a string and a pixbuf from the model.
iconViewNewWithModel :: TreeModelClass model => model -> IO IconView

-- | Sets the model for a <a>IconView</a>. If the <tt>iconView</tt> already
--   has a model set, it will remove it before setting the new model. If
--   <tt>model</tt> is <tt>Nothing</tt>, then it will unset the old model.
iconViewSetModel :: (IconViewClass self, TreeModelClass model) => self -> Maybe model -> IO ()

-- | Returns the model the <a>IconView</a> is based on. Returns
--   <tt>Nothing</tt> if the model is unset.
iconViewGetModel :: IconViewClass self => self -> IO (Maybe TreeModel)

-- | Sets the column of the text for entries in the <a>IconView</a>. If a
--   markup source is set using <tt>iconViewSetMarkupSource</tt>, then the
--   text source is ignored.
iconViewSetTextColumn :: (IconViewClass self, GlibString string) => self -> ColumnId row string -> IO ()

-- | Returns the column with text for <tt>iconView</tt>.
iconViewGetTextColumn :: (IconViewClass self, GlibString string) => self -> IO (ColumnId row string)

-- | Sets the column of the text for entries in the <a>IconView</a> as a
--   markup string (see <a>Markup</a>). A text source that is set using
--   <tt>iconViewSetTextSource</tt> is ignored once a markup source is set.
iconViewSetMarkupColumn :: (IconViewClass self, GlibString markup) => self -> ColumnId row markup -> IO ()

-- | Returns the column with markup text for <tt>iconView</tt>.
iconViewGetMarkupColumn :: (IconViewClass self, GlibString markup) => self -> IO (ColumnId row markup)

-- | Sets the column of the <a>Pixbuf</a> for entries in the
--   <a>IconView</a>.
iconViewSetPixbufColumn :: IconViewClass self => self -> ColumnId row Pixbuf -> IO ()

-- | Returns the column with pixbufs for <tt>iconView</tt>.
iconViewGetPixbufColumn :: IconViewClass self => self -> IO (ColumnId row Pixbuf)

-- | Finds the path at the point (<tt>x</tt>, <tt>y</tt>), relative to
--   widget coordinates. See <a>iconViewGetItemAtPos</a>, if you are also
--   interested in the cell at the specified position.
iconViewGetPathAtPos :: IconViewClass self => self -> Int -> Int -> IO TreePath

-- | Calls a function for each selected icon. Note that the model or
--   selection cannot be modified from within this function.
iconViewSelectedForeach :: IconViewClass self => self -> (TreePath -> IO ()) -> IO ()

-- | Sets the selection mode of the <tt>iconView</tt>.
iconViewSetSelectionMode :: IconViewClass self => self -> SelectionMode -> IO ()

-- | Gets the selection mode of the <tt>iconView</tt>.
iconViewGetSelectionMode :: IconViewClass self => self -> IO SelectionMode

-- | Sets the ::orientation property which determines whether the labels
--   are drawn beside the icons instead of below.
iconViewSetOrientation :: IconViewClass self => self -> Orientation -> IO ()

-- | Returns the value of the ::orientation property which determines
--   whether the labels are drawn beside the icons instead of below.
iconViewGetOrientation :: IconViewClass self => self -> IO Orientation

-- | Sets the ::columns property which determines in how many columns the
--   icons are arranged. If <tt>columns</tt> is -1, the number of columns
--   will be chosen automatically to fill the available area.
iconViewSetColumns :: IconViewClass self => self -> Int -> IO ()

-- | Returns the value of the ::columns property.
iconViewGetColumns :: IconViewClass self => self -> IO Int

-- | Sets the ::item-width property which specifies the width to use for
--   each item. If it is set to -1, the icon view will automatically
--   determine a suitable item size.
iconViewSetItemWidth :: IconViewClass self => self -> Int -> IO ()

-- | Returns the value of the ::item-width property.
iconViewGetItemWidth :: IconViewClass self => self -> IO Int

-- | Sets the ::spacing property which specifies the space which is
--   inserted between the cells (i.e. the icon and the text) of an item.
iconViewSetSpacing :: IconViewClass self => self -> Int -> IO ()

-- | Returns the value of the ::spacing property.
iconViewGetSpacing :: IconViewClass self => self -> IO Int

-- | Sets the ::row-spacing property which specifies the space which is
--   inserted between the rows of the icon view.
iconViewSetRowSpacing :: IconViewClass self => self -> Int -> IO ()

-- | Returns the value of the ::row-spacing property.
iconViewGetRowSpacing :: IconViewClass self => self -> IO Int

-- | Sets the ::column-spacing property which specifies the space which is
--   inserted between the columns of the icon view.
iconViewSetColumnSpacing :: IconViewClass self => self -> Int -> IO ()

-- | Returns the value of the ::column-spacing property.
iconViewGetColumnSpacing :: IconViewClass self => self -> IO Int

-- | Sets the ::margin property which specifies the space which is inserted
--   at the top, bottom, left and right of the icon view.
iconViewSetMargin :: IconViewClass self => self -> Int -> IO ()

-- | Returns the value of the ::margin property.
iconViewGetMargin :: IconViewClass self => self -> IO Int

-- | Selects the row at <tt>path</tt>.
iconViewSelectPath :: IconViewClass self => self -> TreePath -> IO ()

-- | Unselects the row at <tt>path</tt>.
iconViewUnselectPath :: IconViewClass self => self -> TreePath -> IO ()

-- | Returns <tt>True</tt> if the icon pointed to by <tt>path</tt> is
--   currently selected. If <tt>icon</tt> does not point to a valid
--   location, <tt>False</tt> is returned.
iconViewPathIsSelected :: IconViewClass self => self -> TreePath -> IO Bool

-- | Creates a list of paths of all selected items. Additionally, if you
--   are planning on modifying the model after calling this function, you
--   may want to convert the returned list into a list of
--   <tt>TreeRowReference</tt>s. To do this, you can use
--   <tt>treeRowReferenceNew</tt>.
iconViewGetSelectedItems :: IconViewClass self => self -> IO [TreePath]

-- | Selects all the icons. <tt>iconView</tt> must has its selection mode
--   set to <tt>SelectionMultiple</tt>.
iconViewSelectAll :: IconViewClass self => self -> IO ()

-- | Unselects all the icons.
iconViewUnselectAll :: IconViewClass self => self -> IO ()

-- | Activates the item determined by <tt>path</tt>.
iconViewItemActivated :: IconViewClass self => self -> TreePath -> IO ()

-- | Finds the path at the point (<tt>x</tt>, <tt>y</tt>), relative to
--   widget coordinates. In contrast to <a>iconViewGetPathAtPos</a>, this
--   function also obtains the cell at the specified position.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewGetItemAtPos :: IconViewClass self => self -> Int -> Int -> IO (Maybe (TreePath, CellRenderer))

-- | Given <tt>Left path</tt> as argument , sets the current keyboard focus
--   to be at <tt>path</tt>, and selects it. This is useful when you want
--   to focus the user's attention on a particular item. If <tt>Right
--   cell</tt> is given, then focus is given to the cell specified by it.
--   Additionally, if <tt>startEditing</tt> is <tt>True</tt>, then editing
--   should be started in the specified cell.
--   
--   This function is often followed by <a>widgetGrabFocus</a> in order to
--   give keyboard focus to the widget. Please note that editing can only
--   happen when the widget is realized.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewSetCursor :: (IconViewClass self, CellRendererClass cell) => self -> (Either TreePath cell) -> Bool -> IO ()

-- | Return a <tt>path</tt> and a <tt>cell</tt> with the current cursor
--   path and cell. If the cursor isn't currently set, then <tt>[]</tt>
--   will be returned for the <tt>path</tt>. If no cell currently has
--   focus, then <tt>cell</tt> will be <tt>Nothing</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewGetCursor :: IconViewClass self => self -> IO (TreePath, Maybe CellRenderer)

-- | Moves the alignments of <tt>iconView</tt> to the position specified by
--   <tt>path</tt>. <tt>rowAlign</tt> determines where the row is placed,
--   and <tt>colAlign</tt> determines where <tt>column</tt> is placed. Both
--   are expected to be between 0.0 and 1.0. 0.0 means left/top alignment,
--   1.0 means right/bottom alignment, 0.5 means center.
--   
--   If <tt>useAlign</tt> is <tt>False</tt>, then the alignment arguments
--   are ignored, and the tree does the minimum amount of work to scroll
--   the item onto the screen. This means that the item will be scrolled to
--   the edge closest to its current position. If the item is currently
--   visible on the screen, nothing is done.
--   
--   This function only works if the model is set, and <tt>path</tt> is a
--   valid row on the model. If the model changes before the
--   <tt>iconView</tt> is realized, the centered path will be modified to
--   reflect this change.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewScrollToPath :: IconViewClass self => self -> TreePath -> Bool -> Float -> Float -> IO ()

-- | Retrieve the first and last visible path. Note that there may be
--   invisible paths inbetween.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewGetVisibleRange :: IconViewClass self => self -> IO (Maybe (TreePath, TreePath))

-- | Turns <tt>iconView</tt> into a drag source for automatic DND.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
iconViewEnableModelDragSource :: IconViewClass self => self -> [Modifier] -> TargetList -> [DragAction] -> IO ()

-- | Turns <tt>iconView</tt> into a drop destination for automatic DND.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
iconViewEnableModelDragDest :: IconViewClass self => self -> TargetList -> [DragAction] -> IO ()

-- | Undoes the effect of <a>iconViewEnableModelDragSource</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
iconViewUnsetModelDragSource :: IconViewClass self => self -> IO ()

-- | Undoes the effect of <a>iconViewEnableModelDragDest</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
iconViewUnsetModelDragDest :: IconViewClass self => self -> IO ()

-- | Check if icons can be moved around.
--   
--   <ul>
--   <li>Set whether the user can use drag and drop (DND) to reorder the
--   rows in the store. This works on both <a>TreeStore</a> and
--   <a>ListStore</a> models. If <tt>ro</tt> is <tt>True</tt>, then the
--   user can reorder the model by dragging and dropping rows. The
--   developer can listen to these changes by connecting to the model's
--   signals. If you need to control which rows may be dragged or where
--   rows may be dropped, you can override the
--   <a>treeDragSourceRowDraggable</a> function in the default DND
--   implementation of the model.</li>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewSetReorderable :: IconViewClass self => self -> Bool -> IO ()

-- | Retrieves whether the user can reorder the list via drag-and-drop. See
--   <a>iconViewSetReorderable</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewGetReorderable :: IconViewClass self => self -> IO Bool

-- | Gets the row in which the item path is currently displayed. Row
--   numbers start at 0.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
iconViewGetItemRow :: IconViewClass self => self -> TreePath -> IO Int

-- | Gets the column in which the item path is currently displayed. Column
--   numbers start at 0.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
iconViewGetItemColumn :: IconViewClass self => self -> TreePath -> IO Int

-- | The ::selection-mode property specifies the selection mode of icon
--   view. If the mode is <tt>SelectionMultiple</tt>, rubberband selection
--   is enabled, for the other modes, only keyboard selection is possible.
--   
--   Default value: <tt>SelectionSingle</tt>
iconViewSelectionMode :: IconViewClass self => Attr self SelectionMode

-- | The <a>iconViewTextColumn</a> property contains the number of the
--   model column containing the texts which are displayed. If this
--   property and the <a>iconViewMarkupColumn</a> property are both set to
--   <a>invalidColumnId</a>, no texts are displayed.
--   
--   Default value: <a>invalidColumnId</a>
iconViewTextColumn :: (IconViewClass self, GlibString string) => Attr self (ColumnId row string)

-- | The <a>iconViewMarkupColumn</a> property contains the number of the
--   model column containing markup information to be displayed. If this
--   property and the <a>iconViewTextColumn</a> property are both set to
--   column numbers, it overrides the text column. If both are set to
--   <a>invalidColumnId</a>, no texts are displayed.
--   
--   Default value: <a>invalidColumnId</a>
iconViewMarkupColumn :: (IconViewClass self, GlibString markup) => Attr self (ColumnId row markup)

-- | The <a>iconViewPixbufColumn</a> property contains the number of the
--   model column containing the pixbufs which are displayed. Setting this
--   property to <a>invalidColumnId</a> turns off the display of pixbufs.
--   
--   Default value: <a>invalidColumnId</a>
iconViewPixbufColumn :: IconViewClass self => Attr self (ColumnId row Pixbuf)

-- | The model for the icon view.
iconViewModel :: (IconViewClass self, TreeModelClass model) => ReadWriteAttr self (Maybe TreeModel) (Maybe model)

-- | The columns property contains the number of the columns in which the
--   items should be displayed. If it is -1, the number of columns will be
--   chosen automatically to fill the available area.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
iconViewColumns :: IconViewClass self => Attr self Int

-- | The item-width property specifies the width to use for each item. If
--   it is set to -1, the icon view will automatically determine a suitable
--   item size.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
iconViewItemWidth :: IconViewClass self => Attr self Int

-- | The spacing property specifies the space which is inserted between the
--   cells (i.e. the icon and the text) of an item.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
iconViewSpacing :: IconViewClass self => Attr self Int

-- | The row-spacing property specifies the space which is inserted between
--   the rows of the icon view.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 6
iconViewRowSpacing :: IconViewClass self => Attr self Int

-- | The column-spacing property specifies the space which is inserted
--   between the columns of the icon view.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 6
iconViewColumnSpacing :: IconViewClass self => Attr self Int

-- | The margin property specifies the space which is inserted at the edges
--   of the icon view.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 6
iconViewMargin :: IconViewClass self => Attr self Int

-- | The orientation property specifies how the cells (i.e. the icon and
--   the text) of the item are positioned relative to each other.
--   
--   Default value: <tt>OrientationVertical</tt>
iconViewOrientation :: IconViewClass self => Attr self Orientation

-- | The reorderable property specifies if the items can be reordered by
--   DND.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
iconViewReorderable :: IconViewClass self => Attr self Bool

-- | The item-orientation property specifies how the cells (i.e. the icon
--   and the text) of the item are positioned relative to each other.
--   
--   Default value: <tt>OrientationVertical</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
iconViewItemOrientation :: IconViewClass self => Attr self Orientation

-- | New scroll adjustment have been set for this widget.
setIconViewScrollAdjustments :: IconViewClass self => Signal self (Adjustment -> Adjustment -> IO ())

-- | A specific element has been activated (by pressing enter or double
--   clicking).
itemActivated :: IconViewClass self => Signal self (TreePath -> IO ())

-- | The selected item changed.
selectionChanged :: IconViewClass self => Signal self (IO ())


-- | A widget for displaying both trees and lists.
module Graphics.UI.Gtk.ModelView.TreeView
data TreeView
class ContainerClass o => TreeViewClass o
castToTreeView :: GObjectClass obj => obj -> TreeView
gTypeTreeView :: GType
toTreeView :: TreeViewClass o => o -> TreeView

-- | Represents the x and y coordinate of a point.
type Point = (Int, Int)

-- | Used in <a>DragContext</a> to indicate what the destination should do
--   with the dropped data.
--   
--   <ul>
--   <li><a>ActionDefault</a>: Initialisation value, should not be
--   used.</li>
--   <li><a>ActionCopy</a>: Copy the data.</li>
--   <li><a>ActionMove</a>: Move the data, i.e. first copy it, then delete
--   it from the source.</li>
--   <li><a>ActionLink</a>: Add a link to the data. Note that this is only
--   useful if source and destination agree on what it means.</li>
--   <li><a>ActionPrivate</a>: Special action which tells the source that
--   the destination will do something that the source doesn't
--   understand.</li>
--   <li><a>ActionAsk</a>: Ask the user what to do with the data.</li>
--   </ul>
data DragAction
[ActionDefault] :: DragAction
[ActionCopy] :: DragAction
[ActionMove] :: DragAction
[ActionLink] :: DragAction
[ActionPrivate] :: DragAction
[ActionAsk] :: DragAction

-- | Grid lines.
data TreeViewGridLines
[TreeViewGridLinesNone] :: TreeViewGridLines
[TreeViewGridLinesHorizontal] :: TreeViewGridLines
[TreeViewGridLinesVertical] :: TreeViewGridLines
[TreeViewGridLinesBoth] :: TreeViewGridLines

-- | Creates a new <a>TreeView</a> widget.
treeViewNew :: IO TreeView

-- | Create a new <a>TreeView</a> widget with <tt>model</tt> as the storage
--   model.
treeViewNewWithModel :: TreeModelClass model => model -> IO TreeView

-- | Returns the model that supplies the data for this <a>TreeView</a>.
--   Returns <tt>Nothing</tt> if the model is unset.
treeViewGetModel :: TreeViewClass self => self -> IO (Maybe TreeModel)

-- | Set the <a>TreeModel</a> for the current View.
treeViewSetModel :: (TreeViewClass self, TreeModelClass model) => self -> model -> IO ()

-- | Retrieve a <a>TreeSelection</a> that holds the current selected nodes
--   of the View.
treeViewGetSelection :: TreeViewClass self => self -> IO TreeSelection

-- | Gets the <a>Adjustment</a> currently being used for the horizontal
--   aspect.
treeViewGetHAdjustment :: TreeViewClass self => self -> IO (Maybe Adjustment)

-- | Sets the <a>Adjustment</a> for the current horizontal aspect.
treeViewSetHAdjustment :: TreeViewClass self => self -> Maybe Adjustment -> IO ()

-- | Gets the <a>Adjustment</a> currently being used for the vertical
--   aspect.
treeViewGetVAdjustment :: TreeViewClass self => self -> IO (Maybe Adjustment)

-- | Sets the <a>Adjustment</a> for the current vertical aspect.
treeViewSetVAdjustment :: TreeViewClass self => self -> Maybe Adjustment -> IO ()

-- | Query if the column headers are visible.
treeViewGetHeadersVisible :: TreeViewClass self => self -> IO Bool

-- | Set the visibility state of the column headers.
treeViewSetHeadersVisible :: TreeViewClass self => self -> Bool -> IO ()

-- | Resize the columns to their optimal size.
treeViewColumnsAutosize :: TreeViewClass self => self -> IO ()

-- | Set wether the columns headers are sensitive to mouse clicks.
treeViewSetHeadersClickable :: TreeViewClass self => self -> Bool -> IO ()

-- | Query if visual aid for wide columns is turned on.
treeViewGetRulesHint :: TreeViewClass self => self -> IO Bool

-- | This function tells Gtk+ that the user interface for your application
--   requires users to read across tree rows and associate cells with one
--   another. By default, Gtk+ will then render the tree with alternating
--   row colors. Do <i>not</i> use it just because you prefer the
--   appearance of the ruled tree; that's a question for the theme. Some
--   themes will draw tree rows in alternating colors even when rules are
--   turned off, and users who prefer that appearance all the time can
--   choose those themes. You should call this function only as a
--   <i>semantic</i> hint to the theme engine that your tree makes
--   alternating colors useful from a functional standpoint (since it has
--   lots of columns, generally).
treeViewSetRulesHint :: TreeViewClass self => self -> Bool -> IO ()

-- | Append a new column to the <a>TreeView</a>. Returns the new number of
--   columns.
treeViewAppendColumn :: TreeViewClass self => self -> TreeViewColumn -> IO Int

-- | Remove column <tt>tvc</tt> from the <a>TreeView</a> widget. The number
--   of remaining columns is returned.
treeViewRemoveColumn :: TreeViewClass self => self -> TreeViewColumn -> IO Int

-- | Inserts column <tt>tvc</tt> into the <a>TreeView</a> widget at the
--   position <tt>pos</tt>. Returns the number of columns after insertion.
--   Specify -1 for <tt>pos</tt> to insert the column at the end.
treeViewInsertColumn :: TreeViewClass self => self -> TreeViewColumn -> Int -> IO Int

-- | Retrieve a <a>TreeViewColumn</a>.
--   
--   <ul>
--   <li>Retrieve the <tt>pos</tt> th columns of <a>TreeView</a>. If the
--   index is out of range Nothing is returned.</li>
--   </ul>
treeViewGetColumn :: TreeViewClass self => self -> Int -> IO (Maybe TreeViewColumn)

-- | Return all <a>TreeViewColumn</a>s in this <a>TreeView</a>.
treeViewGetColumns :: TreeViewClass self => self -> IO [TreeViewColumn]

-- | Move a specific column.
--   
--   <ul>
--   <li>Use <tt>treeViewMoveColumnToFront</tt> if you want to move the
--   column to the left end of the <a>TreeView</a>.</li>
--   </ul>
treeViewMoveColumnAfter :: TreeViewClass self => self -> TreeViewColumn -> TreeViewColumn -> IO ()

-- | Move a specific column.
--   
--   <ul>
--   <li>Use <a>treeViewMoveColumnAfter</a> if you want to move the column
--   somewhere else than to the leftmost position.</li>
--   </ul>
treeViewMoveColumnFirst :: TreeViewClass self => self -> TreeViewColumn -> IO ()

-- | Set location of hierarchy controls.
--   
--   <ul>
--   <li>Sets the column to draw the expander arrow at. If <tt>col</tt> is
--   <tt>Nothing</tt>, then the expander arrow is always at the first
--   visible column.</li>
--   </ul>
--   
--   If you do not want expander arrow to appear in your tree, set the
--   expander column to a hidden column.
treeViewSetExpanderColumn :: TreeViewClass self => self -> Maybe TreeViewColumn -> IO ()

-- | Get location of hierarchy controls.
--   
--   <ul>
--   <li>Gets the column to draw the expander arrow at. If <tt>col</tt> is
--   <tt>Nothing</tt>, then the expander arrow is always at the first
--   visible column.</li>
--   </ul>
treeViewGetExpanderColumn :: TreeViewClass self => self -> IO TreeViewColumn

-- | Specify where a column may be dropped.
--   
--   <ul>
--   <li>Sets a user function for determining where a column may be dropped
--   when dragged. This function is called on every column pair in turn at
--   the beginning of a column drag to determine where a drop can take
--   place.</li>
--   <li>The callback function take the <a>TreeViewColumn</a> to be moved,
--   the second and third arguments are the columns on the left and right
--   side of the new location. At most one of them might be
--   <tt>Nothing</tt> which indicates that the column is about to be
--   dropped at the left or right end of the <a>TreeView</a>.</li>
--   <li>The predicate <tt>pred</tt> should return <tt>True</tt> if it is
--   ok to insert the column at this place.</li>
--   <li>Use <tt>Nothing</tt> for the predicate if columns can be inserted
--   anywhere.</li>
--   </ul>
treeViewSetColumnDragFunction :: TreeViewClass self => self -> Maybe (TreeViewColumn -> Maybe TreeViewColumn -> Maybe TreeViewColumn -> IO Bool) -> IO ()

-- | Scroll to a coordinate.
--   
--   <ul>
--   <li>Scrolls the tree view such that the top-left corner of the visible
--   area is <tt>treeX</tt>, <tt>treeY</tt>, where <tt>treeX</tt> and
--   <tt>treeY</tt> are specified in tree window coordinates. The
--   <a>TreeView</a> must be realized before this function is called. If it
--   isn't, you probably want to use <a>treeViewScrollToCell</a>.</li>
--   </ul>
treeViewScrollToPoint :: TreeViewClass self => self -> Int -> Int -> IO ()

-- | Scroll to a cell.
--   
--   Moves the alignments of tree_view to the position specified by
--   mbColumn and mbPath. If mbColumn is Nothing, then no horizontal
--   scrolling occurs. Likewise, if mbPath is Nothing no vertical scrolling
--   occurs. At a minimum, one of mbColumn or mbPath need to be provided.
--   <tt>rowAlign</tt> determines where the row is placed, and
--   <tt>colAlign</tt> determines where column is placed. Both are expected
--   to be between 0.0 and 1.0. 0.0 means left<i>top alignment, 1.0 means
--   right</i>bottom alignment, 0.5 means center.
--   
--   If Nothing is passed instead of <tt>rowAlign</tt> and
--   <tt>colAlign</tt>, then the tree does the minimum amount of work to
--   scroll the cell onto the screen. This means that the cell will be
--   scrolled to the edge closest to its current position. If the cell is
--   currently visible on the screen, nothing is done.
--   
--   This function only works if the model is set, and path is a valid row
--   on the model. If the model changes before the tree_view is realized,
--   the centered path will be modified to reflect this change.
treeViewScrollToCell :: TreeViewClass self => self -> Maybe TreePath -> Maybe TreeViewColumn -> Maybe (Float, Float) -> IO ()

-- | Selects a specific row.
--   
--   <ul>
--   <li>Sets the current keyboard focus to be at <tt>path</tt>, and
--   selects it. This is useful when you want to focus the user's attention
--   on a particular row. If <tt>focusColumn</tt> is given, then the input
--   focus is given to the column specified by it. Additionally, if
--   <tt>focusColumn</tt> is specified, and <tt>startEditing</tt> is
--   <tt>True</tt>, then editing will be started in the specified cell.
--   This function is often followed by a <tt>widgetGrabFocus</tt> to the
--   <a>TreeView</a> in order to give keyboard focus to the widget.</li>
--   </ul>
treeViewSetCursor :: TreeViewClass self => self -> TreePath -> (Maybe (TreeViewColumn, Bool)) -> IO ()

-- | Selects a cell in a specific row.
--   
--   <ul>
--   <li>Similar to <a>treeViewSetCursor</a> but allows a column to
--   containt several <a>CellRenderer</a>s.</li>
--   <li>Only available in Gtk 2.2 and higher.</li>
--   </ul>
treeViewSetCursorOnCell :: (TreeViewClass self, CellRendererClass focusCell) => self -> TreePath -> TreeViewColumn -> focusCell -> Bool -> IO ()

-- | Retrieves the position of the focus.
--   
--   <ul>
--   <li>Returns a pair <tt>(path, column)</tt>.If the cursor is not
--   currently set, <tt>path</tt> will be <tt>[]</tt>. If no column is
--   currently selected, <tt>column</tt> will be <tt>Nothing</tt>.</li>
--   </ul>
treeViewGetCursor :: TreeViewClass self => self -> IO (TreePath, Maybe TreeViewColumn)

-- | Emit the activated signal on a cell.
treeViewRowActivated :: TreeViewClass self => self -> TreePath -> TreeViewColumn -> IO ()

-- | Recursively expands all nodes in the tree view.
treeViewExpandAll :: TreeViewClass self => self -> IO ()

-- | Recursively collapses all visible, expanded nodes in the tree view.
treeViewCollapseAll :: TreeViewClass self => self -> IO ()

-- | Make a certain path visible.
--   
--   <ul>
--   <li>This will expand all parent rows of <tt>tp</tt> as necessary.</li>
--   <li>Only available in Gtk 2.2 and higher.</li>
--   </ul>
treeViewExpandToPath :: TreeViewClass self => self -> TreePath -> IO ()

-- | Opens the row so its children are visible.
treeViewExpandRow :: TreeViewClass self => self -> TreePath -> Bool -> IO Bool

-- | Collapses a row (hides its child rows, if they exist).
treeViewCollapseRow :: TreeViewClass self => self -> TreePath -> IO Bool

-- | Call function for every expaned row.
treeViewMapExpandedRows :: TreeViewClass self => self -> (TreePath -> IO ()) -> IO ()

-- | Check if row is expanded.
treeViewRowExpanded :: TreeViewClass self => self -> TreePath -> IO Bool

-- | Query if rows can be moved around.
--   
--   <ul>
--   <li>See <a>treeViewSetReorderable</a>.</li>
--   </ul>
treeViewGetReorderable :: TreeViewClass self => self -> IO Bool

-- | Check if rows can be moved around.
--   
--   <ul>
--   <li>Set whether the user can use drag and drop (DND) to reorder the
--   rows in the store. This works on both <a>TreeStore</a> and
--   <a>ListStore</a> models. If <tt>ro</tt> is <tt>True</tt>, then the
--   user can reorder the model by dragging and dropping rows. The
--   developer can listen to these changes by connecting to the model's
--   signals. If you need to control which rows may be dragged or where
--   rows may be dropped, you can override the
--   <a>treeDragSourceRowDraggable</a> function in the default DND
--   implementation of the model.</li>
--   </ul>
treeViewSetReorderable :: TreeViewClass self => self -> Bool -> IO ()

-- | Map a pixel to the specific cell.
--   
--   <ul>
--   <li>Finds the path at the <a>Point</a> <tt>(x, y)</tt>. The
--   coordinates <tt>x</tt> and <tt>y</tt> are relative to the top left
--   corner of the <a>TreeView</a> drawing window. As such, coordinates in
--   a mouse click event can be used directly to determine the cell which
--   the user clicked on. This function is useful to realize popup
--   menus.</li>
--   <li>The returned point is the input point relative to the cell's upper
--   left corner. The whole <a>TreeView</a> is divided between all cells.
--   The returned point is relative to the rectangle this cell occupies
--   within the <a>TreeView</a>.</li>
--   </ul>
treeViewGetPathAtPos :: TreeViewClass self => self -> Point -> IO (Maybe (TreePath, TreeViewColumn, Point))

-- | Retrieve the smallest bounding box of a cell.
--   
--   <ul>
--   <li>Fills the bounding rectangle in tree window coordinates for the
--   cell at the row specified by <tt>tp</tt> and the column specified by
--   <tt>tvc</tt>. If <tt>path</tt> is <tt>Nothing</tt> or points to a path
--   not currently displayed, the <tt>y</tt> and <tt>height</tt> fields of
--   the <a>Rectangle</a> will be filled with <tt>0</tt>. The sum of all
--   cell rectangles does not cover the entire tree; there are extra pixels
--   in between rows, for example.</li>
--   </ul>
treeViewGetCellArea :: TreeViewClass self => self -> Maybe TreePath -> TreeViewColumn -> IO Rectangle

-- | Retrieve the largest bounding box of a cell.
--   
--   <ul>
--   <li>Fills the bounding rectangle in tree window coordinates for the
--   cell at the row specified by <tt>tp</tt> and the column specified by
--   <tt>tvc</tt>. If <tt>path</tt> is <tt>Nothing</tt> or points to a path
--   not currently displayed, the <tt>y</tt> and <tt>height</tt> fields of
--   the <a>Rectangle</a> will be filled with <tt>0</tt>. The background
--   areas tile the widget's area to cover the entire tree window (except
--   for the area used for header buttons). Contrast this with
--   <a>treeViewGetCellArea</a>.</li>
--   </ul>
treeViewGetBackgroundArea :: TreeViewClass self => self -> Maybe TreePath -> TreeViewColumn -> IO Rectangle

-- | Retrieve the currently visible area.
--   
--   <ul>
--   <li>The returned rectangle gives the visible part of the tree in tree
--   coordinates.</li>
--   </ul>
treeViewGetVisibleRect :: TreeViewClass self => self -> IO Rectangle

-- | Converts bin window coordinates to coordinates for the tree (the full
--   scrollable area of the tree).
treeViewConvertBinWindowToTreeCoords :: TreeViewClass self => self -> Point -> IO Point

-- | Converts bin window coordinates (see <tt>treeViewGetBinWindow</tt> to
--   widget relative coordinates.
treeViewConvertBinWindowToWidgetCoords :: TreeViewClass self => self -> Point -> IO Point

-- | Converts tree coordinates (coordinates in full scrollable area of the
--   tree) to bin window coordinates.
treeViewConvertTreeToBinWindowCoords :: TreeViewClass self => self -> Point -> IO Point

-- | Converts tree coordinates (coordinates in full scrollable area of the
--   tree) to widget coordinates.
treeViewConvertTreeToWidgetCoords :: TreeViewClass self => self -> Point -> IO Point

-- | Converts widget coordinates to coordinates for the window (see
--   <tt>treeViewGetBinWindow</tt> ).
treeViewConvertWidgetToBinWindowCoords :: TreeViewClass self => self -> Point -> IO Point

-- | Converts widget coordinates to coordinates for the tree (the full
--   scrollable area of the tree).
treeViewConvertWidgetToTreeCoords :: TreeViewClass self => self -> Point -> IO Point

-- | Creates a <a>Pixmap</a> representation of the row at the given path.
--   This image can be used for a drag icon.
--   
--   Removed in Gtk3.
treeViewCreateRowDragIcon :: TreeViewClass self => self -> TreePath -> IO Pixmap

-- | Returns whether or not the tree allows to start interactive searching
--   by typing in text.
--   
--   <ul>
--   <li>If enabled, the user can type in text which will set the cursor to
--   the first matching entry.</li>
--   </ul>
treeViewGetEnableSearch :: TreeViewClass self => self -> IO Bool

-- | If this is set, then the user can type in text to search through the
--   tree interactively (this is sometimes called "typeahead find").
--   
--   Note that even if this is <tt>False</tt>, the user can still initiate
--   a search using the "start-interactive-search" key binding. In any
--   case, a predicate that compares a row of the model with the text the
--   user has typed must be set using <a>treeViewSetSearchEqualFunc</a>.
treeViewSetEnableSearch :: TreeViewClass self => self -> Bool -> IO ()

-- | Gets the column searched on by the interactive search code.
treeViewGetSearchColumn :: (TreeViewClass self, GlibString string) => self -> IO (ColumnId row string)

-- | Sets <tt>column</tt> as the column where the interactive search code
--   should search in.
--   
--   If the sort column is set, users can use the
--   "start-interactive-search" key binding to bring up search popup. The
--   enable-search property controls whether simply typing text will also
--   start an interactive search.
--   
--   Note that <tt>column</tt> refers to a column of the model.
--   Furthermore, the search column is not used if a comparison function is
--   set, see <a>treeViewSetSearchEqualFunc</a>.
treeViewSetSearchColumn :: (TreeViewClass self, GlibString string) => self -> (ColumnId row string) -> IO ()

-- | Set the predicate to test for equality.
--   
--   <ul>
--   <li>The predicate must returns <tt>True</tt> if the text entered by
--   the user and the row of the model match. Calling this function will
--   overwrite the <a>treeViewSearchColumn</a> (which isn't used anyway
--   when a comparison function is installed).</li>
--   </ul>
treeViewSetSearchEqualFunc :: (TreeViewClass self, GlibString string) => self -> Maybe (string -> TreeIter -> IO Bool) -> IO ()

-- | Returns whether fixed height mode is turned on for the tree view.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewGetFixedHeightMode :: TreeViewClass self => self -> IO Bool

-- | Enables or disables the fixed height mode of the tree view. Fixed
--   height mode speeds up <a>TreeView</a> by assuming that all rows have
--   the same height. Only enable this option if all rows are the same
--   height and all columns are of type <tt>TreeViewColumnFixed</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewSetFixedHeightMode :: TreeViewClass self => self -> Bool -> IO ()

-- | Returns whether hover selection mode is turned on for
--   <tt>treeView</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewGetHoverSelection :: TreeViewClass self => self -> IO Bool

-- | Enables of disables the hover selection mode of the tree view. Hover
--   selection makes the selected row follow the pointer. Currently, this
--   works only for the selection modes <tt>SelectionSingle</tt> and
--   <tt>SelectionBrowse</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewSetHoverSelection :: TreeViewClass self => self -> Bool -> IO ()

-- | Returns whether hover expansion mode is turned on for the tree view.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewGetHoverExpand :: TreeViewClass self => self -> IO Bool

-- | Enables of disables the hover expansion mode of the tree view. Hover
--   expansion makes rows expand or collaps if the pointer moves over them.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewSetHoverExpand :: TreeViewClass self => self -> Bool -> IO ()

-- | Returns whether all header columns are clickable.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewGetHeadersClickable :: TreeViewClass self => self -> IO Bool

-- | Return the first and last visible path. Note that there may be
--   invisible paths in between.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
treeViewGetVisibleRange :: TreeViewClass self => self -> IO (TreePath, TreePath)

-- | Turns <tt>treeView</tt> into a drop destination for automatic DND.
treeViewEnableModelDragDest :: TreeViewClass self => self -> TargetList -> [DragAction] -> IO ()

-- | Turns <tt>treeView</tt> into a drag source for automatic DND.
treeViewEnableModelDragSource :: TreeViewClass self => self -> [Modifier] -> TargetList -> [DragAction] -> IO ()

-- | Undoes the effect of <a>treeViewEnableModelDragSource</a>.
treeViewUnsetRowsDragSource :: TreeViewClass self => self -> IO ()

-- | Undoes the effect of <a>treeViewEnableModelDragDest</a>.
treeViewUnsetRowsDragDest :: TreeViewClass self => self -> IO ()

-- | Returns the <a>Entry</a> which is currently in use as interactive
--   search entry for <tt>treeView</tt>. In case the built-in entry is
--   being used, <tt>Nothing</tt> will be returned.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewGetSearchEntry :: TreeViewClass self => self -> IO (Maybe Entry)

-- | Sets the entry which the interactive search code will use for this
--   <tt>treeView</tt>. This is useful when you want to provide a search
--   entry in our interface at all time at a fixed position. Passing
--   <tt>Nothing</tt> for <tt>entry</tt> will make the interactive search
--   code use the built-in popup entry again.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewSetSearchEntry :: (TreeViewClass self, EntryClass entry) => self -> (Maybe entry) -> IO ()

-- | Sets the row separator function, which is used to determine whether a
--   row should be drawn as a separator. If the row separator function is
--   <tt>Nothing</tt>, no separators are drawn. This is the default value.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewSetRowSeparatorFunc :: TreeViewClass self => self -> Maybe (TreeIter -> IO Bool) -> IO ()

-- | Returns whether rubber banding is turned on for <tt>treeView</tt>. If
--   the selection mode is <tt>SelectionMultiple</tt>, rubber banding will
--   allow the user to select multiple rows by dragging the mouse.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewGetRubberBanding :: TreeViewClass self => self -> IO Bool

-- | Enables or disables rubber banding in <tt>treeView</tt>. If the
--   selection mode is <tt>SelectionMultiple</tt>, rubber banding will
--   allow the user to select multiple rows by dragging the mouse.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewSetRubberBanding :: TreeViewClass self => self -> Bool -> IO ()

-- | Returns whether or not tree lines are drawn in <tt>treeView</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewGetEnableTreeLines :: TreeViewClass self => self -> IO Bool

-- | Sets whether to draw lines interconnecting the expanders in
--   <tt>treeView</tt>. This does not have any visible effects for lists.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewSetEnableTreeLines :: TreeViewClass self => self -> Bool -> IO ()

-- | Returns which grid lines are enabled in <tt>treeView</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewGetGridLines :: TreeViewClass self => self -> IO TreeViewGridLines

-- | Sets which grid lines to draw in <tt>treeView</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
treeViewSetGridLines :: TreeViewClass self => self -> TreeViewGridLines -> IO ()

-- | Sets the tip area of <tt>tooltip</tt> to be the area covered by
--   <tt>path</tt>. See also <a>treeViewTooltipColumn</a> for a simpler
--   alternative. See also <tt>tooltipSetTipArea</tt>.
treeViewSetTooltipRow :: TreeViewClass self => self -> Tooltip -> TreePath -> IO ()

-- | Sets the tip area of tooltip to the area path, column and cell have in
--   common. For example if <tt>path</tt> is <tt>Nothing</tt> and
--   <tt>column</tt> is set, the tip area will be set to the full area
--   covered by column. See also <tt>tooltipSetTipArea</tt>. Note that if
--   <tt>path</tt> is not specified and <tt>cell</tt> is set and part of a
--   column containing the expander, the tooltip might not show and hide at
--   the correct position. In such cases <tt>path</tt> must be set to the
--   current node under the mouse cursor for this function to operate
--   correctly. See also <a>treeViewTooltipColumn</a> for a simpler
--   alternative.
treeViewSetTooltipCell :: (TreeViewClass self, TreeViewColumnClass col, CellRendererClass renderer) => self -> Tooltip -> Maybe TreePath -> Maybe col -> Maybe renderer -> IO ()

-- | This function is supposed to be used in a <tt>widgetQueryTooltip</tt>
--   signal handler for this <a>TreeView</a>. The <tt>point</tt> value
--   which is received in the signal handler should be passed to this
--   function without modification. A return value of <tt>Just iter</tt>
--   indicates that there is a tree view row at the given coordinates (if
--   <tt>Just (x,y)</tt> is passed in, denoting a mouse position), resp.
--   the cursor row (if <tt>Nothing</tt> is passed in, denoting a keyboard
--   request).
treeViewGetTooltipContext :: TreeViewClass self => self -> Maybe Point -> IO (Maybe TreeIter)

-- | The model for the tree view.
treeViewModel :: (TreeViewClass self, TreeModelClass model) => ReadWriteAttr self (Maybe TreeModel) model

-- | Horizontal Adjustment for the widget.
treeViewHAdjustment :: TreeViewClass self => Attr self (Maybe Adjustment)

-- | Vertical Adjustment for the widget.
treeViewVAdjustment :: TreeViewClass self => Attr self (Maybe Adjustment)

-- | Show the column header buttons.
--   
--   Default value: <tt>True</tt>
treeViewHeadersVisible :: TreeViewClass self => Attr self Bool

-- | Column headers respond to click events.
--   
--   Default value: <tt>False</tt>
treeViewHeadersClickable :: TreeViewClass self => Attr self Bool

-- | Set the column for the expander column.
treeViewExpanderColumn :: TreeViewClass self => ReadWriteAttr self TreeViewColumn (Maybe TreeViewColumn)

-- | View is reorderable.
--   
--   Default value: <tt>False</tt>
treeViewReorderable :: TreeViewClass self => Attr self Bool

-- | Set a hint to the theme engine to draw rows in alternating colors.
--   
--   Default value: <tt>False</tt>
treeViewRulesHint :: TreeViewClass self => Attr self Bool

-- | View allows user to search through columns interactively.
--   
--   Default value: <tt>True</tt>
treeViewEnableSearch :: TreeViewClass self => Attr self Bool

-- | Model column to search through when searching through code.
--   
--   Default value: <tt>invalidColumnId</tt>
treeViewSearchColumn :: (TreeViewClass self, GlibString string) => Attr self (ColumnId row string)

-- | Setting the <a>treeViewFixedHeightMode</a> property to <tt>True</tt>
--   speeds up <a>TreeView</a> by assuming that all rows have the same
--   height. Only enable this option if all rows are the same height.
--   Please see <a>treeViewSetFixedHeightMode</a> for more information on
--   this option.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
treeViewFixedHeightMode :: TreeViewClass self => Attr self Bool

-- | Enables of disables the hover selection mode of <tt>treeView</tt>.
--   Hover selection makes the selected row follow the pointer. Currently,
--   this works only for the selection modes <tt>SelectionSingle</tt> and
--   <tt>SelectionBrowse</tt>.
--   
--   This mode is primarily intended for <a>TreeView</a>s in popups, e.g.
--   in <a>ComboBox</a> or <a>EntryCompletion</a>.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewHoverSelection :: TreeViewClass self => Attr self Bool

-- | Enables of disables the hover expansion mode of <tt>treeView</tt>.
--   Hover expansion makes rows expand or collaps if the pointer moves over
--   them.
--   
--   This mode is primarily intended for <a>TreeView</a>s in popups, e.g.
--   in <a>ComboBox</a> or <a>EntryCompletion</a>.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
treeViewHoverExpand :: TreeViewClass self => Attr self Bool

-- | View has expanders.
--   
--   Default value: <tt>True</tt>
treeViewShowExpanders :: TreeViewClass self => Attr self Bool

-- | Extra indentation for each level.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
treeViewLevelIndentation :: TreeViewClass self => Attr self Int

-- | Whether to enable selection of multiple items by dragging the mouse
--   pointer.
--   
--   Default value: <tt>False</tt>
treeViewRubberBanding :: TreeViewClass self => Attr self Bool

-- | Whether grid lines should be drawn in the tree view.
--   
--   Default value: <a>TreeViewGridLinesNone</a>
treeViewEnableGridLines :: TreeViewClass self => Attr self TreeViewGridLines

-- | Whether tree lines should be drawn in the tree view.
--   
--   Default value: <tt>False</tt>
treeViewEnableTreeLines :: TreeViewClass self => Attr self Bool

-- | 'gridLines' property. See <a>treeViewGetGridLines</a> and
--   <a>treeViewSetGridLines</a>
treeViewGridLines :: TreeViewClass self => Attr self TreeViewGridLines

-- | 'searchEntry' property. See <a>treeViewGetSearchEntry</a> and
--   <a>treeViewSetSearchEntry</a>
treeViewSearchEntry :: (TreeViewClass self, EntryClass entry) => ReadWriteAttr self (Maybe Entry) (Maybe entry)

-- | The column for which to show tooltips.
--   
--   If you only plan to have simple (text-only) tooltips on full rows, you
--   can use this function to have <a>TreeView</a> handle these
--   automatically for you. <tt>column</tt> should be set to a column in
--   model containing the tooltip texts, or <tt>-1</tt> to disable this
--   feature. When enabled, <tt>widgetHasTooltip</tt> will be set to
--   <tt>True</tt> and this view will connect to the
--   <tt>widgetQueryTooltip</tt> signal handler.
--   
--   Note that the signal handler sets the text as <tt>Markup</tt>, so
--   &amp;, &lt;, etc have to be escaped in the text.
--   
--   Default value: <tt>invalidColumnId</tt>
treeViewTooltipColumn :: (TreeViewClass self, GlibString string) => Attr self (ColumnId row string)

-- | The number of columns of the treeview has changed.
columnsChanged :: TreeViewClass self => Signal self (IO ())

-- | The position of the cursor (focused cell) has changed.
cursorChanged :: TreeViewClass self => Signal self (IO ())

-- | The given row has been collapsed (child nodes are hidden).
rowCollapsed :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO ())

-- | The given row has been expanded (child nodes are shown).
rowExpanded :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO ())

-- | A row was activated.
--   
--   <ul>
--   <li>Activation usually means the user has pressed return on a
--   row.</li>
--   </ul>
rowActivated :: TreeViewClass self => Signal self (TreePath -> TreeViewColumn -> IO ())

-- | The given row is about to be collapsed (hide its children nodes). Use
--   this signal if you need to control the collapsibility of individual
--   rows.
testCollapseRow :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO Bool)

-- | The given row is about to be expanded (show its children nodes). Use
--   this signal if you need to control the expandability of individual
--   rows.
testExpandRow :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO Bool)

-- | <a>treeViewWidgetToTreeCoords</a> has been deprecated since version
--   2.12 and should not be used in newly-written code. Due to historial
--   reasons the name of this function is incorrect. For converting
--   coordinates relative to the widget to bin window coordinates, please
--   see <a>treeViewConvertWidgetToBinWindowCoords</a>.
--   
--   Converts bin window coordinates to coordinates for the tree (the full
--   scrollable area of the tree).
--   
--   Removed in Gtk3.
treeViewWidgetToTreeCoords :: TreeViewClass self => self -> Point -> IO Point

-- | <a>treeViewTreeToWidgetCoords</a> has been deprecated since version
--   2.12 and should not be used in newly-written code. Due to historial
--   reasons the name of this function is incorrect. For converting bin
--   window coordinates to coordinates relative to bin window, please see
--   <a>treeViewConvertBinWindowToWidgetCoords</a>.
--   
--   Converts tree coordinates (coordinates in full scrollable area of the
--   tree) to bin window coordinates.
--   
--   Removed in Gtk3.
treeViewTreeToWidgetCoords :: TreeViewClass self => self -> Point -> IO Point

-- | The user has dragged a column to another position.
onColumnsChanged :: TreeViewClass self => self -> IO () -> IO (ConnectId self)

-- | The user has dragged a column to another position.
afterColumnsChanged :: TreeViewClass self => self -> IO () -> IO (ConnectId self)

-- | The cursor in the tree has moved.
onCursorChanged :: TreeViewClass self => self -> IO () -> IO (ConnectId self)

-- | The cursor in the tree has moved.
afterCursorChanged :: TreeViewClass self => self -> IO () -> IO (ConnectId self)

-- | A row was activated.
--   
--   <ul>
--   <li>Activation usually means the user has pressed return on a
--   row.</li>
--   </ul>
onRowActivated :: TreeViewClass self => self -> (TreePath -> TreeViewColumn -> IO ()) -> IO (ConnectId self)

-- | A row was activated.
--   
--   <ul>
--   <li>Activation usually means the user has pressed return on a
--   row.</li>
--   </ul>
afterRowActivated :: TreeViewClass self => self -> (TreePath -> TreeViewColumn -> IO ()) -> IO (ConnectId self)

-- | Children of this node were hidden.
onRowCollapsed :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO ()) -> IO (ConnectId self)

-- | Children of this node were hidden.
afterRowCollapsed :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO ()) -> IO (ConnectId self)

-- | Children of this node are made visible.
onRowExpanded :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO ()) -> IO (ConnectId self)

-- | Children of this node are made visible.
afterRowExpanded :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO ()) -> IO (ConnectId self)

-- | The user wants to search interactively.
--   
--   <ul>
--   <li>Connect to this signal if you want to provide you own search
--   facility. Note that you must handle all keyboard input yourself.</li>
--   </ul>
onStartInteractiveSearch :: TreeViewClass self => self -> IO () -> IO (ConnectId self)

-- | The user wants to search interactively.
--   
--   <ul>
--   <li>Connect to this signal if you want to provide you own search
--   facility. Note that you must handle all keyboard input yourself.</li>
--   </ul>
afterStartInteractiveSearch :: TreeViewClass self => self -> IO () -> IO (ConnectId self)

-- | Determine if this row should be collapsed.
--   
--   <ul>
--   <li>If the application connects to this function and returns
--   <tt>False</tt>, the specifc row will not be altered.</li>
--   </ul>
onTestCollapseRow :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO Bool) -> IO (ConnectId self)

-- | Determine if this row should be collapsed.
--   
--   <ul>
--   <li>If the application connects to this function and returns
--   <tt>False</tt>, the specifc row will not be altered.</li>
--   </ul>
afterTestCollapseRow :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO Bool) -> IO (ConnectId self)

-- | Determine if this row should be expanded.
--   
--   <ul>
--   <li>If the application connects to this function and returns
--   <tt>False</tt>, the specifc row will not be altered.</li>
--   </ul>
onTestExpandRow :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO Bool) -> IO (ConnectId self)

-- | Determine if this row should be expanded.
--   
--   <ul>
--   <li>If the application connects to this function and returns
--   <tt>False</tt>, the specifc row will not be altered.</li>
--   </ul>
afterTestExpandRow :: TreeViewClass self => self -> (TreeIter -> TreePath -> IO Bool) -> IO (ConnectId self)
instance Enum TreeViewGridLines


-- | New model-based tree/list widget system.
--   
--   This just re-exports the Graphics.UI.Gtk.ModelView.* modules.
--   
--   <ul>
--   <li>Note: From this version of Gtk2Hs this system will be the default
--   so it will not be necessary to explicitly import this module.</li>
--   </ul>
module Graphics.UI.Gtk.ModelView


-- | A menu widget
module Graphics.UI.Gtk.MenuComboToolbar.Menu
data Menu
class MenuShellClass o => MenuClass o
castToMenu :: GObjectClass obj => obj -> Menu
gTypeMenu :: GType
toMenu :: MenuClass o => o -> Menu

-- | Creates a new <a>Menu</a>.
menuNew :: IO Menu

-- | Moves a <a>MenuItem</a> to a new position within the <a>Menu</a>.
menuReorderChild :: (MenuClass self, MenuItemClass child) => self -> child -> Int -> IO ()

-- | Popup a context menu where a button press occurred.
--   
--   <ul>
--   <li>This function must be called in response to a button click. It
--   opens the given menu at a place determined by the last emitted event
--   (hence the requirement that this function is called as response to a
--   button press signal).</li>
--   </ul>
menuPopup :: MenuClass self => self -> Maybe (MouseButton, TimeStamp) -> IO ()

-- | Set the <a>AccelGroup</a> which holds global accelerators for the
--   menu. This accelerator group needs to also be added to all windows
--   that this menu is being used in with <tt>windowAddAccelGroup</tt>, in
--   order for those windows to support all the accelerators contained in
--   this group.
menuSetAccelGroup :: MenuClass self => self -> AccelGroup -> IO ()

-- | Gets the <a>AccelGroup</a> which holds global accelerators for the
--   menu. See <a>menuSetAccelGroup</a>.
menuGetAccelGroup :: MenuClass self => self -> IO AccelGroup

-- | Sets an accelerator path for this menu from which accelerator paths
--   for its immediate children, its menu items, can be constructed. The
--   main purpose of this function is to spare the programmer the
--   inconvenience of having to call <tt>menuItemSetAccelPath</tt> on each
--   menu item that should support runtime user changable accelerators.
--   Instead, by just calling <a>menuSetAccelPath</a> on their parent, each
--   menu item of this menu, that contains a label describing its purpose,
--   automatically gets an accel path assigned.
--   
--   For example, a menu containing menu items "New" and "Exit", will,
--   after calling
--   
--   <pre>
--   menu `menuSetAccelPath` "&lt;Gnumeric-Sheet&gt;/File"
--   </pre>
--   
--   assign its items the accel paths:
--   <tt>"&lt;Gnumeric-Sheet&gt;/File/New"</tt> and
--   <tt>"&lt;Gnumeric-Sheet&gt;/File/Exit"</tt>.
--   
--   Assigning accel paths to menu items then enables the user to change
--   their accelerators at runtime. More details about accelerator paths
--   and their default setups can be found at <tt>accelMapAddEntry</tt>.
menuSetAccelPath :: (MenuClass self, GlibString string) => self -> string -> IO ()

-- | Sets the title string for the menu. The title is displayed when the
--   menu is shown as a tearoff menu.
menuSetTitle :: (MenuClass self, GlibString string) => self -> string -> IO ()

-- | Returns the title of the menu. See <a>menuSetTitle</a>.
menuGetTitle :: (MenuClass self, GlibString string) => self -> IO (Maybe string)

-- | Removes the menu from the screen.
menuPopdown :: MenuClass self => self -> IO ()

-- | Repositions the menu according to its position function.
menuReposition :: MenuClass self => self -> IO ()

-- | Returns the selected menu item from the menu. This is used by the
--   <a>OptionMenu</a>.
menuGetActive :: MenuClass self => self -> IO MenuItem

-- | Selects the specified menu item within the menu. This is used by the
--   <a>OptionMenu</a> and should not be used by anyone else.
menuSetActive :: MenuClass self => self -> Int -> IO ()

-- | Changes the tearoff state of the menu. A menu is normally displayed as
--   drop down menu which persists as long as the menu is active. It can
--   also be displayed as a tearoff menu which persists until it is closed
--   or reattached.
menuSetTearoffState :: MenuClass self => self -> Bool -> IO ()

-- | Returns whether the menu is torn off. See <a>menuSetTearoffState</a>.
menuGetTearoffState :: MenuClass self => self -> IO Bool

-- | Attach this menu to another widget.
menuAttachToWidget :: (MenuClass self, WidgetClass attachWidget) => self -> attachWidget -> IO ()

-- | Detach this menu from the widget it is attached to.
menuDetach :: MenuClass self => self -> IO ()

-- | Get the widget this menu is attached to. Returns Nothing if this is a
--   tearoff (context) menu.
menuGetAttachWidget :: MenuClass self => self -> IO (Maybe Widget)

-- | Sets the <a>Screen</a> on which the menu will be displayed.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
menuSetScreen :: MenuClass self => self -> Maybe Screen -> IO ()

-- | Informs Gtk+ on which monitor a menu should be popped up. See
--   <tt>screenGetMonitorGeometry</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
menuSetMonitor :: MenuClass self => self -> Int -> IO ()

-- | Adds a new <a>MenuItem</a> to a (table) menu. The number of 'cells'
--   that an item will occupy is specified by <tt>leftAttach</tt>,
--   <tt>rightAttach</tt>, <tt>topAttach</tt> and <tt>bottomAttach</tt>.
--   These each represent the leftmost, rightmost, uppermost and lower
--   column and row numbers of the table. (Columns and rows are indexed
--   from zero).
--   
--   Note that this function is not related to <a>menuDetach</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
menuAttach :: (MenuClass self, MenuItemClass child) => self -> child -> Int -> Int -> Int -> Int -> IO ()

-- | Returns a list of the menus which are attached to this widget.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
menuGetForAttachWidget :: WidgetClass widget => widget -> IO [Menu]

-- | A boolean that indicates whether the menu is torn-off.
--   
--   Default value: <tt>False</tt>
menuTearoffState :: MenuClass self => Attr self Bool

-- | 'accelGroup' property. See <a>menuGetAccelGroup</a> and
--   <a>menuSetAccelGroup</a>
menuAccelGroup :: MenuClass self => Attr self AccelGroup

-- | 'active' property. See <a>menuGetActive</a> and <a>menuSetActive</a>
menuActive :: MenuClass self => ReadWriteAttr self MenuItem Int

-- | A title that may be displayed by the window manager when this menu is
--   torn-off.
--   
--   Default value: ""
menuTitle :: (MenuClass self, GlibString string) => Attr self string

-- | The column number to attach the left side of the child to.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
menuChildLeftAttach :: (MenuClass self, WidgetClass child) => child -> Attr self Int

-- | The column number to attach the right side of the child to.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
menuChildRightAttach :: (MenuClass self, WidgetClass child) => child -> Attr self Int

-- | The row number to attach the top of the child to.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
menuChildTopAttach :: (MenuClass self, WidgetClass child) => child -> Attr self Int

-- | The row number to attach the bottom of the child to.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
menuChildBottomAttach :: (MenuClass self, WidgetClass child) => child -> Attr self Int


-- | Storing data on clipboards
module Graphics.UI.Gtk.General.Settings
data Settings
class GObjectClass o => SettingsClass o
castToSettings :: GObjectClass obj => obj -> Settings
gTypeSettings :: GType
toSettings :: SettingsClass o => o -> Settings

-- | Gets the Settings object for the default GDK screen, creating it if
--   necessary. See <a>settingsGetForScreen</a>.
settingsGetDefault :: IO (Maybe Settings)

-- | Gets the Settings object for screen, creating it if necessary.
settingsGetForScreen :: ScreenClass screen => screen -> IO Settings
settingsSetLongProperty :: (SettingsClass settings, GlibString string) => settings -> string -> Int -> string -> IO ()
settingsSetStringProperty :: (SettingsClass settings, GlibString string) => settings -> string -> string -> string -> IO ()


-- | Functions for handling inter-process communication via selections.
module Graphics.UI.Gtk.General.Selection

-- | A number that the application can use to differentiate between
--   different data types or application states.
type InfoId = CUInt

-- | An atom is an index into a global string table. It is possible to
--   associate binary data with each entry. This facility is used for
--   inter-application data exchange such as properties of
--   <a>DrawWindow</a> (using <a>PropertyTag</a>), <a>Clipboard</a> or
--   <a>Drag</a> (<tt>SelectionId</tt> and <tt>TargetId</tt>).
data Atom

-- | A tag that uniquely identifies a target. A target describes the format
--   of the underlying data source, for instance, it might be a string. A
--   single selection may support multiple targets: suppose a new target is
--   created for the Haskell data type <a>Double</a>. In this case, the
--   value of the floating point number could also be offered as a string.
type TargetTag = Atom

-- | A tag that uniquely identifies a selection. A selection denotes the
--   exchange mechanism that is being used, for instance, the clipboard is
--   the most common exchange mechanism. For drag and drop applications, a
--   new selection tag is usually created for each different kind of data
--   that is being exchanged.
type SelectionTag = Atom

-- | A tag that defines the encoding of the binary data. For instance, a
--   string might be encoded as UTF-8 or in a different locale. Each
--   encoding would use the same <a>TargetTag</a> but a different
--   <a>SelectionTypeTag</a>.
type SelectionTypeTag = Atom

-- | A <a>TargetList</a> contains information about all possible formats
--   (represented as <a>TargetTag</a>) that a widget can create or receive
--   in form of a selection.
data TargetList

-- | A monad providing access to selection data.
type SelectionDataM a = ReaderT (Ptr ()) IO a

-- | The <a>TargetFlags</a> enumeration is used to specify constraints on
--   an entry in a <a>TargetList</a>. These flags are only used for drag
--   and drop.
--   
--   <ul>
--   <li>If the <a>TargetSameApp</a> flag is set, the target will only be
--   selected for drags within a single application.</li>
--   <li>If the <a>TargetSameWidget</a> flag is set, the target will only
--   be selected for drags within a single widget.</li>
--   </ul>
data TargetFlags
[TargetSameApp] :: TargetFlags
[TargetSameWidget] :: TargetFlags
[TargetOtherApp] :: TargetFlags
[TargetOtherWidget] :: TargetFlags

-- | If this target is provided by a selection, then the data is a string.
targetString :: TargetTag

-- | The type indicating that the associated data is itself a (list of)
--   <a>Atom</a>s.
selectionTypeAtom :: SelectionTypeTag

-- | The type indicating that the associated data consists of integers.
selectionTypeInteger :: SelectionTypeTag

-- | The type indicating that the associated data is a string without
--   further information on its encoding.
selectionTypeString :: SelectionTypeTag

-- | Create a new <a>TargetTag</a>, <a>SelectionTag</a>,
--   <a>SelectionTypeTag</a> or <a>PropertyTag</a>. Note that creating two
--   target tags with the same name will create the same tag, in
--   particular, the tag will be the same across different applications.
--   Note that the name of an <a>Atom</a> can be printed by <a>show</a>
--   though comparing the atom is merely an integer comparison.
atomNew :: GlibString string => string -> IO Atom

-- | Create a new, empty <a>TargetList</a>.
targetListNew :: IO TargetList

-- | Append another target to the given <a>TargetList</a>.
--   
--   <ul>
--   <li>Note that the <a>TargetFlags</a> are only used for drag and drop,
--   not in normal selection handling.</li>
--   </ul>
targetListAdd :: TargetList -> TargetTag -> [TargetFlags] -> InfoId -> IO ()

-- | Append all text targets supported by the selection mechanism to the
--   target list. All targets are added with the same <a>InfoId</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
targetListAddTextTargets :: TargetList -> InfoId -> IO ()

-- | Append all image targets supported by the selection mechanism to the
--   target list. All targets are added with the same <a>InfoId</a>. If the
--   boolean flag is set, only targets will be added which Gtk+ knows how
--   to convert into a <a>Pixbuf</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
targetListAddImageTargets :: TargetList -> InfoId -> Bool -> IO ()

-- | Append all URI (universal resource indicator, fomerly URL) targets
--   supported by the selection mechanism to the target list. All targets
--   are added with the same <a>InfoId</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
targetListAddUriTargets :: TargetList -> InfoId -> IO ()

-- | Append all rich text targets registered with
--   <a>textBufferRegisterSerializeFormat</a> to the target list. All
--   targets are added with the same <a>InfoId</a>. If the boolean flag is
--   <tt>True</tt> then deserializable rich text formats will be added,
--   serializable formats otherwise.
--   
--   <ul>
--   <li>Since Gtk 2.10.</li>
--   </ul>
targetListAddRichTextTargets :: TextBufferClass tb => TargetList -> InfoId -> Bool -> tb -> IO ()

-- | Remove a target from a target list.
targetListRemove :: TargetList -> TargetTag -> IO ()

-- | Appends a specified target to the list of supported targets for a
--   given widget and selection.
selectionAddTarget :: WidgetClass widget => widget -> SelectionTag -> TargetTag -> InfoId -> IO ()

-- | Remove all targets registered for the given selection for the widget.
selectionClearTargets :: WidgetClass widget => widget -> SelectionTag -> IO ()

-- | Claims ownership of a given selection for a particular widget, or, if
--   widget is <a>Nothing</a>, release ownership of the selection.
selectionOwnerSet :: WidgetClass widget => Maybe widget -> SelectionTag -> TimeStamp -> IO Bool

-- | Set the ownership of a given selection and display.
selectionOwnerSetForDisplay :: WidgetClass widget => Display -> Maybe widget -> SelectionTag -> TimeStamp -> IO Bool

-- | Removes all handlers and unsets ownership of all selections for a
--   widget. Called when widget is being destroyed. This function will not
--   generally be called by applications.
selectionRemoveAll :: WidgetClass widget => widget -> IO ()

-- | Stores new data in the <a>SelectionDataM</a> monad. The stored data
--   may only be an array of integer types that are no larger than 32 bits.
selectionDataSet :: (Integral a, Storable a) => SelectionTypeTag -> [a] -> SelectionDataM ()

-- | Retreives the data in the <a>SelectionDataM</a> monad. The returned
--   array must have elements of the size that were used to set this data.
--   If the size or the type tag does not match, <tt>Nothing</tt> is
--   returned.
--   
--   Removed in Gtk3.
selectionDataGet :: (Integral a, Storable a) => SelectionTypeTag -> SelectionDataM (Maybe [a])

-- | Check if the currently stored data is valid.
--   
--   <ul>
--   <li>If this function returns <tt>False</tt>, no data is set in this
--   selection and <a>selectionDataGet</a> will return <tt>Nothing</tt> no
--   matter what type is requested.</li>
--   </ul>
selectionDataIsValid :: SelectionDataM Bool

-- | Sets the contents of the selection from a string. The string is
--   converted to the form determined by the allowed targets of the
--   selection.
--   
--   <ul>
--   <li>Returns <tt>True</tt> if setting the text was successful.</li>
--   </ul>
selectionDataSetText :: GlibString string => string -> SelectionDataM Bool

-- | Gets the contents of the selection data as a string.
selectionDataGetText :: GlibString string => SelectionDataM (Maybe string)

-- | Sets the contents of the selection from a <a>Pixbuf</a>. The pixbuf is
--   converted to the form determined by the allowed targets of the
--   selection.
--   
--   <ul>
--   <li>Returns <tt>True</tt> if setting the <a>Pixbuf</a> was successful.
--   Since Gtk 2.6.</li>
--   </ul>
selectionDataSetPixbuf :: Pixbuf -> SelectionDataM Bool

-- | Gets the contents of the selection data as a <a>Pixbuf</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
selectionDataGetPixbuf :: SelectionDataM (Maybe Pixbuf)

-- | Sets the contents of the selection from a list of URIs. The string is
--   converted to the form determined by the possible targets of the
--   selection.
--   
--   <ul>
--   <li>Returns <tt>True</tt> if setting the URIs was successful. Since
--   Gtk 2.6.</li>
--   </ul>
selectionDataSetURIs :: GlibString string => [string] -> SelectionDataM Bool

-- | Gets the contents of the selection data as list of URIs. Returns
--   <tt>Nothing</tt> if the selection did not contain any URIs.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
selectionDataGetURIs :: GlibString string => SelectionDataM (Maybe [string])

-- | Given a <a>SelectionDataM</a> holding a list of targets, determines if
--   any of the targets in targets can be used to provide a <a>Pixbuf</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6</li>
--   </ul>
selectionDataTargetsIncludeImage :: Bool -> SelectionDataM Bool

-- | Retrieve the currently set <a>TargetTag</a> in the selection.
selectionDataGetTarget :: SelectionDataM TargetTag

-- | Set the selection to the given <a>TargetTag</a>.
--   
--   Removed in Gtk3.
selectionDataSetTarget :: TargetTag -> SelectionDataM ()

-- | Queries the content type of the selection data as a list of targets.
--   Whenever the application is asked whether certain targets are
--   acceptable, it is handed a selection that contains a list of
--   <a>TargetTag</a>s as payload. A similar result could be achieved using
--   'selectionDataGet selectionTypeAtom'.
selectionDataGetTargets :: SelectionDataM [TargetTag]

-- | Given a <a>SelectionDataM</a> holding a list of targets, determines if
--   any of the targets in targets can be used to provide text.
selectionDataTargetsIncludeText :: SelectionDataM Bool

-- | Given a <a>SelectionDataM</a> holding a list of targets, determines if
--   any of the targets in targets can be used to provide URIs.
--   
--   <ul>
--   <li>Since Gtk 2.10</li>
--   </ul>
selectionDataTargetsIncludeUri :: SelectionDataM Bool

-- | Given a <a>SelectionDataM</a> holding a list of targets, check if,
--   well, dunno really. FIXME: what does the <a>TextBuffer</a> do?
--   
--   <ul>
--   <li>Since Gtk 2.10</li>
--   </ul>
selectionDataTargetsIncludeRichText :: TextBufferClass tb => tb -> SelectionDataM Bool

-- | Emitted in order to ask the application for selection data. Within the
--   handler the function <a>selectionDataSet</a> or one of its derivatives
--   should be called.
selectionGet :: WidgetClass self => Signal self (InfoId -> TimeStamp -> SelectionDataM ())

-- | Pass the supplied selection data to the application. The application
--   is expected to read the data using <a>selectionDataGet</a> or one of
--   its derivatives.
selectionReceived :: WidgetClass self => Signal self (TimeStamp -> SelectionDataM ())


-- | Storing data on clipboards
module Graphics.UI.Gtk.General.Clipboard
data Clipboard
class GObjectClass o => ClipboardClass o
castToClipboard :: GObjectClass obj => obj -> Clipboard
gTypeClipboard :: GType
toClipboard :: ClipboardClass o => o -> Clipboard

-- | The primary selection (the currently highlighted text in X11 that can
--   in many applications be pasted using the middle button).
selectionPrimary :: SelectionTag

-- | The secondary selection. Rarely used.
selectionSecondary :: SelectionTag

-- | The modern clipboard that is filled by copy or cut commands.
selectionClipboard :: SelectionTag

-- | Returns the clipboard object for the given selection. See
--   <a>clipboardGetForDisplay</a> for complete details.
clipboardGet :: SelectionTag -> IO Clipboard

-- | Returns the clipboard object for the given selection. Cut/copy/paste
--   menu items and keyboard shortcuts should use the default clipboard,
--   returned by passing <a>selectionClipboard</a> for <tt>selection</tt>.
--   The currently-selected object or text should be provided on the
--   clipboard identified by <a>selectionPrimary</a>. Cut/copy/paste menu
--   items conceptually copy the contents of the <a>selectionPrimary</a>
--   clipboard to the default clipboard, i.e. they copy the selection to
--   what the user sees as the clipboard.
--   
--   See &lt;http: discussion of the <a>selectionClipboard</a> vs.
--   <a>selectionPrimary</a> selections under the X window system. On Win32
--   the <a>selectionPrimary</a> clipboard is essentially ignored.
--   
--   It's possible to have arbitrary named clipboards; if you do invent new
--   clipboards, you should prefix the selection name with an underscore
--   (because the ICCCM requires that nonstandard atoms are
--   underscore-prefixed), and namespace it as well. For example, if your
--   application called "Foo" has a special-purpose clipboard, you could
--   create it using <a>atomNew</a> "_FOO_SPECIAL_CLIPBOARD".
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
clipboardGetForDisplay :: Display -> SelectionTag -> IO Clipboard

-- | Gets the <a>Display</a> associated with <tt>clipboard</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
clipboardGetDisplay :: ClipboardClass self => self -> IO Display

-- | Virtually sets the contents of the specified clipboard by providing a
--   list of supported formats for the clipboard data and a function to
--   call to get the actual data when it is requested.
clipboardSetWithData :: ClipboardClass self => self -> [(TargetTag, InfoId)] -> (InfoId -> SelectionDataM ()) -> IO () -> IO Bool

-- | Sets the contents of the clipboard to the given UTF-8 string. Gtk+
--   will make a copy of the text and take responsibility for responding
--   for requests for the text, and for converting the text into the
--   requested format.
clipboardSetText :: (ClipboardClass self, GlibString string) => self -> string -> IO ()

-- | Sets the contents of the clipboard to the given <a>Pixbuf</a>. Gtk+
--   will take responsibility for responding for requests for the image,
--   and for converting the image into the requested format.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
clipboardSetImage :: ClipboardClass self => self -> Pixbuf -> IO ()

-- | Requests the contents of clipboard as the given target. When the
--   results of the result are later received the supplied callback will be
--   called.
clipboardRequestContents :: ClipboardClass self => self -> TargetTag -> SelectionDataM () -> IO ()

-- | Requests the contents of the clipboard as text. When the text is later
--   received, it will be converted if it is stored in a different
--   character set if necessary, and <tt>callback</tt> will be called.
--   
--   The <tt>text</tt> parameter to <tt>callback</tt> will contain the
--   resulting text if the request succeeded, or <tt>Nothing</tt> if it
--   failed. This could happen for various reasons, in particular if the
--   clipboard was empty or if the contents of the clipboard could not be
--   converted into text form.
clipboardRequestText :: (ClipboardClass self, GlibString string) => self -> (Maybe string -> IO ()) -> IO ()

-- | Requests the contents of the clipboard as image. When the image is
--   later received, it will be converted to a <a>Pixbuf</a>, and
--   <tt>callback</tt> will be called.
--   
--   The <tt>pixbuf</tt> parameter to <tt>callback</tt> will contain the
--   resulting <a>Pixbuf</a> if the request succeeded, or <tt>Nothing</tt>
--   if it failed. This could happen for various reasons, in particular if
--   the clipboard was empty or if the contents of the clipboard could not
--   be converted into an image.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
clipboardRequestImage :: ClipboardClass self => self -> (Maybe Pixbuf -> IO ()) -> IO ()

-- | Requests the contents of the clipboard as list of supported targets.
--   When the list is later received, <tt>callback</tt> will be called.
--   
--   The <tt>targets</tt> parameter to <tt>callback</tt> will contain the
--   resulting targets if the request succeeded, or <tt>Nothing</tt> if it
--   failed.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
clipboardRequestTargets :: ClipboardClass self => self -> (Maybe [TargetTag] -> IO ()) -> IO ()

-- | Requests the contents of the clipboard as rich text. When the rich
--   text is later received, <tt>callback</tt> will be called.
--   
--   The <tt>text</tt> parameter to <tt>callback</tt> will contain the
--   resulting rich text if the request succeeded, or <tt>Nothing</tt> if
--   it failed. This function can fail for various reasons, in particular
--   if the clipboard was empty or if the contents of the clipboard could
--   not be converted into rich text form.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
clipboardRequestRichText :: (ClipboardClass self, TextBufferClass buffer, GlibString string) => self -> buffer -> (Maybe (TargetTag, string) -> IO ()) -> IO ()

-- | Hints that the clipboard data should be stored somewhere when the
--   application exits or when <a>clipboardStore</a> is called.
--   
--   This value is reset when the clipboard owner changes. Where the
--   clipboard data is stored is platform dependent, see
--   <tt>displayStoreClipboard</tt> for more information.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
clipboardSetCanStore :: ClipboardClass self => self -> Maybe [(TargetTag, InfoId)] -> IO ()

-- | Stores the current clipboard data somewhere so that it will stay
--   around after the application has quit.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
clipboardStore :: ClipboardClass self => self -> IO ()


-- | A StockItem is a resource that is know throughout Gtk.
--   
--   <ul>
--   <li>Defining you own <a>IconSet</a>s as <a>StockItem</a>s will make it
--   possible for Gtk to choose the most appropriate sizes and enables
--   themes to override your built in icons. A couple of constants are
--   defined here as well. They are useful in accessing Gtk's predefined
--   items.</li>
--   </ul>
module Graphics.UI.Gtk.General.StockItems

-- | The description of a stock item.
data StockItem
[StockItem] :: StockId -> DefaultGlibString -> [Modifier] -> KeyVal -> DefaultGlibString -> StockItem
[siStockId] :: StockItem -> StockId
[siLabel] :: StockItem -> DefaultGlibString
[siModifier] :: StockItem -> [Modifier]
[siKeyval] :: StockItem -> KeyVal
[siTransDom] :: StockItem -> DefaultGlibString

-- | A synonym for a standard button or icon.
type StockId = DefaultGlibString

-- | Add new stock items to Gtk.
stockAddItem :: [StockItem] -> IO ()

-- | Lookup an item in stock.
stockLookupItem :: StockId -> IO (Maybe StockItem)

-- | Produce a list of all known stock identifiers.
--   
--   <ul>
--   <li>Retrieve a list of all known stock identifiers. These can either
--   be added by <a>stockAddItem</a> or by adding items to a
--   <a>IconFactory</a>.</li>
--   <li>The list is sorted alphabetically (sorting is not Unicode
--   aware).</li>
--   </ul>
stockListIds :: IO [StockId]

stockAbout :: StockId

stockAdd :: StockId

stockApply :: StockId

stockBold :: StockId

stockCancel :: StockId

stockCapsLockWarning :: StockId

stockCDROM :: StockId

stockClear :: StockId

stockClose :: StockId

stockColorPicker :: StockId

stockConvert :: StockId

stockConnect :: StockId

stockCopy :: StockId

stockCut :: StockId

stockDelete :: StockId

stockDialogAuthentication :: StockId

stockDialogError :: StockId

stockDialogInfo :: StockId

stockDialogQuestion :: StockId

stockDialogWarning :: StockId

stockDirectory :: StockId
stockDiscard :: StockId

stockDisconnect :: StockId

stockDnd :: StockId

stockDndMultiple :: StockId

stockEdit :: StockId

stockExecute :: StockId

stockFile :: StockId

stockFind :: StockId

stockFindAndRelpace :: StockId

stockFloppy :: StockId

stockFullscreen :: StockId

stockGotoBottom :: StockId

stockGotoFirst :: StockId

stockGotoLast :: StockId

stockGotoTop :: StockId

stockGoBack :: StockId

stockGoDown :: StockId

stockGoForward :: StockId

stockGoUp :: StockId

stockHarddisk :: StockId

stockHelp :: StockId

stockHome :: StockId

stockIndent :: StockId

stockIndex :: StockId

stockInfo :: StockId

stockItalic :: StockId

stockJumpTo :: StockId

stockJustifyCenter :: StockId

stockJustifyFill :: StockId

stockJustifyLeft :: StockId

stockJustifyRight :: StockId

stockLeaveFullscreen :: StockId

stockMediaForward :: StockId

stockMediaNext :: StockId

stockMediaPause :: StockId

stockMediaPlay :: StockId

stockMediaPrevious :: StockId

stockMediaRecord :: StockId

stockMediaRewind :: StockId

stockMediaStop :: StockId

stockMissingImage :: StockId

stockNetwork :: StockId

stockNew :: StockId

stockNo :: StockId

stockOk :: StockId

stockOpen :: StockId

stockOrientationLandscape :: StockId

stockOrientationReverseLandscape :: StockId

stockOrientationPortrait :: StockId

stockOrientationReversePortrait :: StockId

stockPageSetup :: StockId

stockPaste :: StockId

stockPreferences :: StockId

stockPrint :: StockId

stockPrintError :: StockId

stockPrintPaused :: StockId

stockPrintReport :: StockId

stockPrintWarning :: StockId

stockPrintPreview :: StockId

stockProperties :: StockId

stockQuit :: StockId

stockRedo :: StockId

stockRefresh :: StockId

stockRemove :: StockId

stockRevertToSaved :: StockId

stockSave :: StockId

stockSaveAs :: StockId

stockSelectAll :: StockId

stockSelectColor :: StockId

stockSelectFont :: StockId

stockSortAscending :: StockId

stockSortDescending :: StockId

stockSpellCheck :: StockId

stockStop :: StockId

stockStrikethrough :: StockId

stockUndelete :: StockId

stockUnderline :: StockId

stockUndo :: StockId

stockUnindent :: StockId

stockYes :: StockId

stockZoom100 :: StockId

stockZoomFit :: StockId

stockZoomIn :: StockId

stockZoomOut :: StockId
instance Storable StockItem


-- | Drag-and-Drop functionality.
--   
--   GTK+ has a rich set of functions for doing inter-process communication
--   via the drag-and-drop metaphor. GTK+ can do drag-and-drop (DND) via
--   multiple protocols. The currently supported protocols are the Xdnd and
--   Motif protocols. As well as the functions listed here, applications
--   may need to use some facilities provided for <tt>Selection</tt>s.
--   Also, the Drag and Drop API makes use of signals in the <a>Widget</a>
--   class.
module Graphics.UI.Gtk.General.Drag
data DragContext
class GObjectClass o => DragContextClass o

-- | Used in <a>DragContext</a> to indicate what the destination should do
--   with the dropped data.
--   
--   <ul>
--   <li><a>ActionDefault</a>: Initialisation value, should not be
--   used.</li>
--   <li><a>ActionCopy</a>: Copy the data.</li>
--   <li><a>ActionMove</a>: Move the data, i.e. first copy it, then delete
--   it from the source.</li>
--   <li><a>ActionLink</a>: Add a link to the data. Note that this is only
--   useful if source and destination agree on what it means.</li>
--   <li><a>ActionPrivate</a>: Special action which tells the source that
--   the destination will do something that the source doesn't
--   understand.</li>
--   <li><a>ActionAsk</a>: Ask the user what to do with the data.</li>
--   </ul>
data DragAction
[ActionDefault] :: DragAction
[ActionCopy] :: DragAction
[ActionMove] :: DragAction
[ActionLink] :: DragAction
[ActionPrivate] :: DragAction
[ActionAsk] :: DragAction

-- | The <a>DestDefaults</a> enumeration specifies the various types of
--   action that will be taken on behalf of the user for a drag destination
--   site.
--   
--   <ul>
--   <li><a>DestDefaultMotion</a>: If set for a widget, GTK+, during a drag
--   over this widget will check if the drag matches this widget's list of
--   possible targets and actions. GTK+ will then call <a>dragStatus</a> as
--   appropriate.</li>
--   <li><a>DestDefaultHighlight</a>: If set for a widget, GTK+ will draw a
--   highlight on this widget as long as a drag is over this widget and the
--   widget drag format and action are acceptable.</li>
--   <li><a>DestDefaultDrop</a>: If set for a widget, when a drop occurs,
--   GTK+ will will check if the drag matches this widget's list of
--   possible targets and actions. If so, GTK+ will call <a>dragGetData</a>
--   on behalf of the widget. Whether or not the drop is successful, GTK+
--   will call <a>dragFinish</a>. If the action was a move, then if the
--   drag was successful, then <tt>True</tt> will be passed for the delete
--   parameter to <a>dragFinish</a></li>
--   <li><a>DestDefaultAll</a>: If set, specifies that all default actions
--   should be taken.</li>
--   </ul>
data DestDefaults
[DestDefaultMotion] :: DestDefaults
[DestDefaultHighlight] :: DestDefaults
[DestDefaultDrop] :: DestDefaults
[DestDefaultAll] :: DestDefaults

-- | Used in <a>DragContext</a> to indicate the protocol according to which
--   DND is done.
data DragProtocol
[DragProtoMotif] :: DragProtocol
[DragProtoXdnd] :: DragProtocol
[DragProtoRootwin] :: DragProtocol
[DragProtoNone] :: DragProtocol
[DragProtoWin32Dropfiles] :: DragProtocol
[DragProtoOle2] :: DragProtocol
[DragProtoLocal] :: DragProtocol
data DragResult
[DragResultSuccess] :: DragResult
[DragResultNoTarget] :: DragResult
[DragResultUserCancelled] :: DragResult
[DragResultTimeoutExpired] :: DragResult
[DragResultGrabBroken] :: DragResult
[DragResultError] :: DragResult
castToDragContext :: GObjectClass obj => obj -> DragContext
gTypeDragContext :: GType
toDragContext :: DragContextClass o => o -> DragContext

-- | A set of actions that the source recommends to be taken. Only valid if
--   <a>dragContextSuggestedAction</a> is set to <a>ActionAsk</a>.
--   
--   Removed in Gtk3.
dragContextActions :: Attr DragContext [DragAction]

-- | The action suggested by the source.
dragContextSuggestedAction :: Attr DragContext DragAction

-- | The action chosen by the destination.
dragContextAction :: Attr DragContext DragAction

-- | Sets a widget as a potential drop destination.
--   
--   <ul>
--   <li>The <a>DestDefaults</a> flags specify what actions Gtk should take
--   on behalf of a widget for drops onto that widget. The given actions
--   and any targets set through <a>dragDestSetTargetList</a> only are used
--   if <a>DestDefaultMotion</a> or <a>DestDefaultDrop</a> are given.</li>
--   <li>Things become more complicated when you try to preview the dragged
--   data, as described in the documentation for <a>dragMotion</a>. The
--   default behaviors described by flags make some assumptions, that can
--   conflict with your own signal handlers. For instance
--   <a>DestDefaultDrop</a> causes invocations of <a>dragStatus</a> in the
--   handler of <a>dragMotion</a>, and invocations of <a>dragFinish</a> in
--   <a>dragDataReceived</a>. Especially the latter is dramatic, when your
--   own <a>dragMotion</a> handler calls <a>dragGetData</a> to inspect the
--   dragged data.</li>
--   </ul>
dragDestSet :: WidgetClass widget => widget -> [DestDefaults] -> [DragAction] -> IO ()

-- | Sets this widget as a proxy for drops to another window.
dragDestSetProxy :: WidgetClass widget => widget -> DrawWindow -> DragProtocol -> Bool -> IO ()

-- | Clears information about a drop destination set with
--   <a>dragDestSet</a>. The widget will no longer receive notification of
--   drags.
dragDestUnset :: WidgetClass widget => widget -> IO ()

-- | Looks for a match between the targets mentioned in the context and the
--   <a>TargetList</a>, returning the first matching target, otherwise
--   returning <tt>Nothing</tt>. If <tt>Nothing</tt> is given as target
--   list, use the value from <tt>destGetTargetList</tt>. Some widgets may
--   have different valid targets for different parts of the widget; in
--   that case, they will have to implement a <a>dragMotion</a> handler
--   that passes the correct target list to this function.
dragDestFindTarget :: (WidgetClass widget, DragContextClass context) => widget -> context -> Maybe TargetList -> IO (Maybe TargetTag)

-- | Returns the list of targets this widget can accept for drag-and-drop.
dragDestGetTargetList :: WidgetClass widget => widget -> IO (Maybe TargetList)

-- | Sets the target types that this widget can accept from drag-and-drop.
--   The widget must first be made into a drag destination with
--   <a>dragDestSet</a>.
dragDestSetTargetList :: WidgetClass widget => widget -> TargetList -> IO ()

-- | Add the text targets supported by the selection mechanism to the
--   target list of the drag source. The targets are added with an
--   <a>InfoId</a> of 0. If you need another value, use
--   <a>targetListAddTextTargets</a> and <a>dragSourceSetTargetList</a>.
dragDestAddTextTargets :: WidgetClass widget => widget -> IO ()

-- | Add image targets supported by the selection mechanism to the target
--   list of the drag source. The targets are added with an <a>InfoId</a>
--   of 0. If you need another value, use <a>targetListAddTextTargets</a>
--   and <a>dragSourceSetTargetList</a>.
dragDestAddImageTargets :: WidgetClass widget => widget -> IO ()

-- | Add URI targets supported by the selection mechanism to the target
--   list of the drag source. The targets are added with an <a>InfoId</a>
--   of 0. If you need another value, use <a>targetListAddTextTargets</a>
--   and <a>dragSourceSetTargetList</a>.
dragDestAddURITargets :: WidgetClass widget => widget -> IO ()

-- | Visualises the actions offered by the drag source.
--   
--   <ul>
--   <li>This function is called by the drag destination in response to
--   <a>dragMotion</a> called by the drag source. The passed-in action is
--   indicated where <tt>Nothing</tt> will show that the drop is not
--   allowed.</li>
--   </ul>
dragStatus :: DragContext -> Maybe DragAction -> TimeStamp -> IO ()

-- | Informs the drag source that the drop is finished, and that the data
--   of the drag will no longer be required.
dragFinish :: DragContextClass context => context -> Bool -> Bool -> TimeStamp -> IO ()

-- | Gets the data associated with a drag. When the data is received or the
--   retrieval fails, GTK+ will emit a <a>dragDataReceived</a> signal.
--   Failure of the retrieval is indicated by passing <tt>Nothing</tt> in
--   the <tt>selectionData</tt> signal. However, when <a>dragGetData</a> is
--   called implicitely because the <a>DestDefaultDrop</a> was set, then
--   the widget will not receive notification of failed drops.
dragGetData :: (WidgetClass widget, DragContextClass context) => widget -> context -> TargetTag -> TimeStamp -> IO ()

-- | Queries he source widget for a drag.
--   
--   <ul>
--   <li>If the drag is occurring within a single application, a pointer to
--   the source widget is returned. Otherwise the return value is
--   <tt>Nothing</tt>.</li>
--   </ul>
dragGetSourceWidget :: DragContextClass context => context -> IO (Maybe Widget)

-- | Draws a highlight around a widget. This will attach handlers to the
--   expose handlers, so the highlight will continue to be displayed until
--   <a>dragUnhighlight</a> is called.
dragHighlight :: WidgetClass widget => widget -> IO ()

-- | Removes a highlight set by <a>dragHighlight</a> from a widget.
dragUnhighlight :: WidgetClass widget => widget -> IO ()

-- | Changes the icon for a drag to a given widget. GTK+ will not destroy
--   the widget, so if you don't want it to persist, you should connect to
--   the <a>dragEnd</a> signal and destroy it yourself.
--   
--   <ul>
--   <li>The function must be called with the context of the source
--   side.</li>
--   </ul>
dragSetIconWidget :: (DragContextClass context, WidgetClass widget) => context -> widget -> Int -> Int -> IO ()

-- | Set the given <a>Pixbuf</a> as the icon for the given drag.
dragSetIconPixbuf :: DragContextClass context => context -> Pixbuf -> Int -> Int -> IO ()

-- | Sets the icon for a given drag from a stock ID.
dragSetIconStock :: DragContextClass context => context -> StockId -> Int -> Int -> IO ()

-- | Sets the icon for a given drag from a named themed icon. See the docs
--   for <a>IconTheme</a> for more details. Note that the size of the icon
--   depends on the icon theme (the icon is loaded at the DND size), thus x
--   and y hot-spots have to be used with care. Since Gtk 2.8.
dragSetIconName :: (DragContextClass context, GlibString string) => context -> string -> Int -> Int -> IO ()

-- | Sets the icon for a particular drag to the default icon. This function
--   must be called with a context for the source side of a drag
dragSetIconDefault :: DragContextClass context => context -> IO ()

-- | Checks to see if a mouse drag starting at <tt>(startX, startY)</tt>
--   and ending at <tt>(currentX, currenty)</tt> has passed the GTK+ drag
--   threshold, and thus should trigger the beginning of a drag-and-drop
--   operation.
dragCheckThreshold :: WidgetClass widget => widget -> Int -> Int -> Int -> Int -> IO Bool

-- | Sets up a widget so that GTK+ will start a drag operation when the
--   user clicks and drags on the widget. The widget must have a window.
--   Note that a set of possible targets have to be set for a drag to be
--   successful.
dragSourceSet :: WidgetClass widget => widget -> [Modifier] -> [DragAction] -> IO ()

-- | Sets the icon that will be used for drags from a particular widget
--   from a <a>Pixbuf</a>.
dragSourceSetIconPixbuf :: WidgetClass widget => widget -> Pixbuf -> IO ()

-- | Sets the icon that will be used for drags from a particular source to
--   a stock icon.
dragSourceSetIconStock :: WidgetClass widget => widget -> StockId -> IO ()

-- | Sets the icon that will be used for drags from a particular source to
--   a themed icon. See the docs for <a>IconTheme</a> for more details.
dragSourceSetIconName :: (WidgetClass widget, GlibString string) => widget -> string -> IO ()

-- | Undoes the effects of <a>dragSourceSet</a>.
dragSourceUnset :: WidgetClass widget => widget -> IO ()

-- | Changes the target types that this widget offers for drag-and-drop.
--   The widget must first be made into a drag source with
--   <a>dragSourceSet</a>.
--   
--   <ul>
--   <li>Since Gtk 2.4.</li>
--   </ul>
dragSourceSetTargetList :: WidgetClass widget => widget -> TargetList -> IO ()

-- | Gets the list of targets this widget can provide for drag-and-drop.
--   
--   <ul>
--   <li>Since Gtk 2.4.</li>
--   </ul>
dragSourceGetTargetList :: WidgetClass widget => widget -> IO (Maybe TargetList)

-- | Add the text targets supported by <a>Selection</a> to the target list
--   of the drag source. The targets are added with <tt>info = 0</tt>. If
--   you need another value, use <a>targetListAddTextTargets</a> and
--   <a>dragSourceSetTargetList</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
dragSourceAddTextTargets :: WidgetClass widget => widget -> IO ()

-- | Add the image targets supported by <tt>Selection</tt> to the target
--   list of the drag source. The targets are added with <tt>info = 0</tt>.
--   If you need another value, use <a>targetListAddTextTargets</a> and
--   <a>dragSourceSetTargetList</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
dragSourceAddImageTargets :: WidgetClass widget => widget -> IO ()

-- | Add the URI targets supported by <tt>Selection</tt> to the target list
--   of the drag source. The targets are added with <tt>info = 0</tt>. If
--   you need another value, use <a>targetListAddTextTargets</a> and
--   <a>dragSourceSetTargetList</a>.
--   
--   <ul>
--   <li>Since Gtk 2.6.</li>
--   </ul>
dragSourceAddURITargets :: WidgetClass widget => widget -> IO ()

-- | The <a>dragBegin</a> signal is emitted on the drag source when a drag
--   is started. A typical reason to connect to this signal is to set up a
--   custom drag icon with <tt>dragSourceSetIcon</tt>.
dragBegin :: WidgetClass self => Signal self (DragContext -> IO ())

-- | The <a>dragDataDelete</a> signal is emitted on the drag source when a
--   drag with the action <a>ActionMove</a> is successfully completed. The
--   signal handler is responsible for deleting the data that has been
--   dropped. What "delete" means, depends on the context of the drag
--   operation.
dragDataDelete :: WidgetClass self => Signal self (DragContext -> IO ())

-- | The <a>dragDataGet</a> signal is emitted on the drag source when the
--   drop site requests the data which is dragged. It is the responsibility
--   of the signal handler to set the selection data in the format which is
--   indicated by <a>InfoId</a>. See <a>selectionDataSet</a> and
--   <a>selectionDataSetText</a>.
dragDataGet :: WidgetClass self => Signal self (DragContext -> InfoId -> TimeStamp -> SelectionDataM ())

-- | The <a>dragDataReceived</a> signal is emitted on the drop site when
--   the dragged data has been received. If the data was received in order
--   to determine whether the drop will be accepted, the handler is
--   expected to call <a>dragStatus</a> and <i>not</i> finish the drag. If
--   the data was received in response to a <a>dragDrop</a> signal (and
--   this is the last target to be received), the handler for this signal
--   is expected to process the received data and then call
--   <a>dragFinish</a>, setting the <tt>success</tt> parameter depending on
--   whether the data was processed successfully.
--   
--   The handler may inspect and modify <a>dragContextAction</a> before
--   calling <a>dragFinish</a>, e.g. to implement <a>ActionAsk</a> as shown
--   in the following example:
dragDataReceived :: WidgetClass self => Signal self (DragContext -> Point -> InfoId -> TimeStamp -> SelectionDataM ())

-- | The <a>dragDrop</a> signal is emitted on the drop site when the user
--   drops the data onto the widget. The signal handler must determine
--   whether the cursor position is in a drop zone or not. If it is not in
--   a drop zone, it returns <tt>False</tt> and no further processing is
--   necessary. Otherwise, the handler returns <tt>True</tt>. In this case,
--   the handler must ensure that <a>dragFinish</a> is called to let the
--   source know that the drop is done. The call to <a>dragFinish</a> can
--   be done either directly or in a <a>dragDataReceived</a> handler which
--   gets triggered by calling <tt>dropGetData</tt> to receive the data for
--   one or more of the supported targets.
dragDrop :: WidgetClass self => Signal self (DragContext -> Point -> TimeStamp -> IO Bool)

-- | The <a>dragEnd</a> signal is emitted on the drag source when a drag is
--   finished. A typical reason to connect to this signal is to undo things
--   done in <a>dragBegin</a>.
dragEnd :: WidgetClass self => Signal self (DragContext -> IO ())

-- | The <a>dragFailed</a> signal is emitted on the drag source when a drag
--   has failed. The signal handler may hook custom code to handle a failed
--   DND operation based on the type of error, it returns <tt>True</tt> is
--   the failure has been already handled (not showing the default "drag
--   operation failed" animation), otherwise it returns <tt>False</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ 2.12.0.</li>
--   </ul>
dragFailed :: WidgetClass self => Signal self (DragContext -> DragResult -> IO Bool)

-- | The <a>dragLeave</a> signal is emitted on the drop site when the
--   cursor leaves the widget. A typical reason to connect to this signal
--   is to undo things done in <a>dragMotion</a>, e.g. undo highlighting
--   with <a>dragUnhighlight</a>
dragLeave :: WidgetClass self => Signal self (DragContext -> TimeStamp -> IO ())

-- | The <a>dragMotion</a> signal is emitted on the drop site when the user
--   moves the cursor over the widget during a drag. The signal handler
--   must determine whether the cursor position is in a drop zone or not.
--   If it is not in a drop zone, it returns <tt>False</tt> and no further
--   processing is necessary. Otherwise, the handler returns <tt>True</tt>.
--   In this case, the handler is responsible for providing the necessary
--   information for displaying feedback to the user, by calling
--   <a>dragStatus</a>. If the decision whether the drop will be accepted
--   or rejected can't be made based solely on the cursor position and the
--   type of the data, the handler may inspect the dragged data by calling
--   <a>dragGetData</a> and defer the <a>dragStatus</a> call to the
--   <a>dragDataReceived</a> handler.
--   
--   Note that there is no <tt>dragEnter</tt> signal. The drag receiver has
--   to keep track of whether he has received any <a>dragMotion</a> signals
--   since the last <a>dragLeave</a> and if not, treat the
--   <a>dragMotion</a> signal as an "enter" signal. Upon an "enter", the
--   handler will typically highlight the drop site with
--   <a>dragHighlight</a>.
dragMotion :: WidgetClass self => Signal self (DragContext -> Point -> TimeStamp -> IO Bool)


-- | A widget displaying an image
module Graphics.UI.Gtk.Display.Image
data Image
class MiscClass o => ImageClass o
castToImage :: GObjectClass obj => obj -> Image
gTypeImage :: GType
toImage :: ImageClass o => o -> Image

-- | Describes the image data representation used by a <a>Image</a>. If you
--   want to get the image from the widget, you can only get the
--   currently-stored representation. e.g. if the <a>imageStorageType</a>
--   is <a>ImagePixbuf</a>, then you can call <a>imageGetPixbuf</a> but not
--   <tt>imageGetStock</tt>. For empty images, you can request any storage
--   type (call any of the "get" functions), but they will all return
--   <tt>Nothing</tt>.
data ImageType
[ImageEmpty] :: ImageType
[ImagePixmap] :: ImageType
[ImageImage] :: ImageType
[ImagePixbuf] :: ImageType
[ImageStock] :: ImageType
[ImageIconSet] :: ImageType
[ImageAnimation] :: ImageType
[ImageIconName] :: ImageType
[ImageGicon] :: ImageType

-- | Creates a new <a>Image</a> displaying the file <tt>filename</tt>. If
--   the file isn't found or can't be loaded, the resulting <a>Image</a>
--   will display a "broken image" icon.
--   
--   If the file contains an animation, the image will contain an
--   animation.
--   
--   If you need to detect failures to load the file, use
--   <a>pixbufNewFromFile</a> to load the file yourself, then create the
--   <a>Image</a> from the pixbuf. (Or for animations, use
--   <a>pixbufAnimationNewFromFile</a>).
--   
--   The storage type (<tt>imageGetStorageType</tt>) of the returned image
--   is not defined, it will be whatever is appropriate for displaying the
--   file.
imageNewFromFile :: GlibFilePath fp => fp -> IO Image

-- | Creates a new <a>Image</a> displaying a <a>Pixbuf</a>.
--   
--   Note that this function just creates an <a>Image</a> from the pixbuf.
--   The <a>Image</a> created will not react to state changes. Should you
--   want that, you should use <tt>imageNewFromIconSet</tt>.
imageNewFromPixbuf :: Pixbuf -> IO Image
imageNewFromAnimation :: (PixbufAnimationClass animation) => animation -> IO Image

-- | Creates a <a>Image</a> displaying a stock icon. If the stock icon name
--   isn't known, the image will be empty.
imageNewFromStock :: StockId -> IconSize -> IO Image

-- | Creates a new empty <a>Image</a> widget.
imageNew :: IO Image

-- | Creates a <a>Image</a> displaying an icon from the current icon theme.
--   If the icon name isn't known, a "broken image" icon will be displayed
--   instead. If the current icon theme is changed, the icon will be
--   updated appropriately.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
imageNewFromIconName :: GlibString string => string -> IconSize -> IO Image

-- | Gets the <a>Pixbuf</a> being displayed by the <a>Image</a>. The
--   storage type of the image must be <a>ImageEmpty</a> or
--   <a>ImagePixbuf</a> (see <tt>imageGetStorageType</tt>).
imageGetPixbuf :: Image -> IO Pixbuf

-- | Overwrite the current content of the <a>Image</a> with a new
--   <a>Pixbuf</a>.
imageSetFromPixbuf :: Image -> Pixbuf -> IO ()
imageSetFromAnimation :: (PixbufAnimationClass animation) => Image -> animation -> IO ()

-- | See <a>imageNewFromFile</a> for details.
imageSetFromFile :: GlibFilePath fp => Image -> fp -> IO ()

-- | See <a>imageNewFromStock</a> for details.
imageSetFromStock :: Image -> StockId -> IconSize -> IO ()

-- | See <a>imageNewFromIconName</a> for details.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
imageSetFromIconName :: GlibString string => Image -> string -> IconSize -> IO ()

-- | Sets the pixel size to use for named icons. If the pixel size is set
--   to a <tt>value /= -1</tt>, it is used instead of the icon size set by
--   <a>imageSetFromIconName</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
imageSetPixelSize :: Image -> Int -> IO ()

-- | Gets the pixel size used for named icons.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
imageGetPixelSize :: Image -> IO Int

-- | Resets the image to be empty.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
imageClear :: Image -> IO ()

-- | The size of an icon in pixels.
--   
--   <ul>
--   <li>This enumeration contains one case that is not exported and which
--   is used when new sizes are registered using
--   <a>iconSizeRegister</a>.</li>
--   <li>Applying <a>show</a> to this type will reveal the name of the size
--   that is registered with Gtk+.</li>
--   </ul>
data IconSize

-- | Don't scale but use any of the available sizes.
[IconSizeInvalid] :: IconSize

-- | Icon size to use in next to menu items in drop-down menus.
[IconSizeMenu] :: IconSize

-- | Icon size for small toolbars.
[IconSizeSmallToolbar] :: IconSize

-- | Icon size for larger toolbars.
[IconSizeLargeToolbar] :: IconSize

-- | Icon size for icons in buttons, next to the label.
[IconSizeButton] :: IconSize

-- | Icon size for icons in drag-and-drop.
[IconSizeDnd] :: IconSize

-- | Icon size for icons next to dialog text.
[IconSizeDialog] :: IconSize
[IconSizeUser] :: Int -> IconSize

-- | A <a>Pixbuf</a> to display.
imagePixbuf :: PixbufClass pixbuf => ReadWriteAttr Image Pixbuf pixbuf

-- | A <a>Pixmap</a> to display.
imagePixmap :: PixmapClass pixmap => ReadWriteAttr Image Pixmap pixmap

-- | Mask bitmap to use with <a>Image</a> or <a>Pixmap</a>.
imageMask :: PixmapClass pixmap => ReadWriteAttr Image Pixmap pixmap
imageAnimation :: (PixbufClass pixbuf, PixbufAnimationClass animation) => ReadWriteAttr Image animation pixbuf

-- | A <a>Image</a> to display.
imageImage :: ImageClass image => ReadWriteAttr Image Image image

-- | Filename to load and display.
--   
--   Default value: ""
imageFile :: GlibString string => Attr Image string

-- | Stock ID for a stock image to display.
--   
--   Default value: ""
imageStock :: GlibString string => Attr Image string

-- | Symbolic size to use for stock icon, icon set or named icon.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 4
imageIconSize :: Attr Image Int

-- | The pixel-size property can be used to specify a fixed size overriding
--   the icon-size property for images of type <a>ImageIconName</a>.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
imagePixelSize :: Attr Image Int

-- | The name of the icon in the icon theme. If the icon theme is changed,
--   the image will be updated automatically.
--   
--   Default value: ""
imageIconName :: GlibString string => Attr Image string

-- | The representation being used for image data.
--   
--   Default value: <a>ImageEmpty</a>
imageStorageType :: ReadAttr Image ImageType
instance Eq ImageType
instance Show ImageType
instance Enum ImageType


-- | Display an icon in the system tray
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.10</li>
--   </ul>
module Graphics.UI.Gtk.Display.StatusIcon
data StatusIcon
class TooltipClass o => StatusIconClass o
castToStatusIcon :: GObjectClass obj => obj -> StatusIcon
gTypeStatusIcon :: GType
toStatusIcon :: StatusIconClass o => o -> StatusIcon

-- | Creates an empty status icon object.
statusIconNew :: IO StatusIcon

-- | Creates a status icon displaying <tt>pixbuf</tt>.
--   
--   The image will be scaled down to fit in the available space in the
--   notification area, if necessary.
statusIconNewFromPixbuf :: Pixbuf -> IO StatusIcon

-- | Creates a status icon displaying the file <tt>filename</tt>.
--   
--   The image will be scaled down to fit in the available space in the
--   notification area, if necessary.
statusIconNewFromFile :: GlibString string => string -> IO StatusIcon
statusIconNewFromStock :: StockId -> IO StatusIcon

-- | Creates a status icon displaying an icon from the current icon theme.
--   If the current icon theme is changed, the icon will be updated
--   appropriately.
statusIconNewFromIconName :: GlibString string => string -> IO StatusIcon

-- | Makes <tt>statusIcon</tt> display <tt>pixbuf</tt>. See
--   <a>statusIconNewFromPixbuf</a> for details.
statusIconSetFromPixbuf :: StatusIconClass self => self -> Pixbuf -> IO ()

-- | Makes <tt>statusIcon</tt> display the file <tt>filename</tt>. See
--   <a>statusIconNewFromFile</a> for details.
statusIconSetFromFile :: (StatusIconClass self, GlibString string) => self -> string -> IO ()

-- | Makes <tt>statusIcon</tt> display the stock icon with the id
--   <tt>stockId</tt>. See <a>statusIconNewFromStock</a> for details.
statusIconSetFromStock :: StatusIconClass self => self -> StockId -> IO ()

-- | Makes <tt>statusIcon</tt> display the icon named <tt>iconName</tt>
--   from the current icon theme. See <a>statusIconNewFromIconName</a> for
--   details.
statusIconSetFromIconName :: (StatusIconClass self, GlibString string) => self -> string -> IO ()

-- | Gets the type of representation being used by the <a>StatusIcon</a> to
--   store image data. If the <a>StatusIcon</a> has no image data, the
--   return value will be <a>ImageEmpty</a>.
statusIconGetStorageType :: StatusIconClass self => self -> IO ImageType
statusIconGetPixbuf :: StatusIconClass self => self -> IO (Maybe Pixbuf)
statusIconGetStock :: StatusIconClass self => self -> IO (Maybe StockId)
statusIconGetIconName :: (StatusIconClass self, GlibString string) => self -> IO (Maybe string)

-- | Gets the size in pixels that is available for the image. Stock icons
--   and named icons adapt their size automatically if the size of the
--   notification area changes. For other storage types, the
--   <tt>sizeChanged</tt> signal can be used to react to size changes.
statusIconGetSize :: StatusIconClass self => self -> IO Int

-- | Sets the tooltip of the status icon.
--   
--   Removed in Gtk3.
statusIconSetTooltip :: (StatusIconClass self, GlibString string) => self -> string -> IO ()

-- | Shows or hides a status icon.
statusIconSetVisible :: StatusIconClass self => self -> Bool -> IO ()

-- | Returns whether the status icon is visible or not. Note that being
--   visible does not guarantee that the user can actually see the icon,
--   see also <a>statusIconIsEmbedded</a>.
statusIconGetVisible :: StatusIconClass self => self -> IO Bool

-- | Makes the status icon start or stop blinking. Note that blinking user
--   interface elements may be problematic for some users, and thus may be
--   turned off, in which case this setting has no effect.
--   
--   Removed in Gtk3.
statusIconSetBlinking :: StatusIconClass self => self -> Bool -> IO ()

-- | Returns whether the icon is blinking, see
--   <a>statusIconSetBlinking</a>.
--   
--   Removed in Gtk3.
statusIconGetBlinking :: StatusIconClass self => self -> IO Bool

-- | Returns whether the status icon is embedded in a notification area.
statusIconIsEmbedded :: StatusIconClass self => self -> IO Bool

-- | Menu positioning function to use with <tt>menuPopup</tt> to position
--   <tt>menu</tt> aligned to the status icon <tt>userData</tt>.
statusIconPositionMenu :: (MenuClass menu, StatusIconClass self) => menu -> self -> IO (Int, Int, Bool)

-- | Obtains information about the location of the status icon on screen.
--   This information can be used to e.g. position popups like notification
--   bubbles.
--   
--   Note that some platforms do not allow Gtk+ to provide this
--   information, and even on platforms that do allow it, the information
--   is not reliable unless the status icon is embedded in a notification
--   area, see <a>statusIconIsEmbedded</a>.
statusIconGetGeometry :: StatusIconClass self => self -> IO (Maybe (Rectangle, Orientation))

-- | Sets the <a>Screen</a> where status icon is displayed; if the icon is
--   already mapped, it will be unmapped, and then remapped on the new
--   screen.
statusIconSetScreen :: (StatusIconClass self, ScreenClass screen) => self -> Maybe screen -> IO ()

-- | Returns the <a>Screen</a> associated with the status icon.
statusIconGetScreen :: StatusIconClass self => self -> IO (Maybe Screen)

-- | Sets text as the contents of the tooltip.
--   
--   This function will take care of setting "has-tooltip" to <a>True</a>
--   and of the default handler for the "query-tooltip" signal.
--   
--   See also the "tooltip-text" property and <tt>tooltipSetText</tt>.
statusIconSetTooltipText :: (StatusIconClass self, GlibString string) => self -> Maybe string -> IO ()

-- | Gets the contents of the tooltip for status icon.
statusIconGetTooltipText :: (StatusIconClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets markup as the contents of the tooltip, which is marked up with
--   the Pango text markup language.
--   
--   This function will take care of setting <a>statusIconHasTooltip</a> to
--   <a>True</a> and of the default handler for the <tt>queryTooltip</tt>
--   signal.
--   
--   See also the <tt>tooltipMarkup</tt> property and
--   <tt>tooltipSetMarkup</tt>.
statusIconSetTooltipMarkup :: (StatusIconClass self, GlibString string) => self -> Maybe string -> IO ()

-- | Gets the contents of the tooltip for status icon.
statusIconGetTooltipMarkup :: (StatusIconClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets the has-tooltip property on the status icon to
--   <tt>hasTooltip</tt>. See <a>statusIconHasTooltip</a> for more
--   information.
statusIconSetHasTooltip :: StatusIconClass self => self -> Bool -> IO ()

-- | Returns the current value of the has-tooltip property. See
--   <a>statusIconHasTooltip</a> for more information.
statusIconGetHasTooltip :: StatusIconClass self => self -> IO Bool

-- | Sets the title of this tray icon. This should be a short,
--   human-readable, localized string describing the tray icon. It may be
--   used by tools like screen readers to render the tray icon.
statusIconSetTitle :: (StatusIconClass self, GlibString string) => self -> Maybe string -> IO ()

-- | Gets the title of this tray icon. See <a>statusIconSetTitle</a>.
statusIconGetTitle :: (StatusIconClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets the name of this tray icon. This should be a string identifying
--   this icon. It is may be used for sorting the icons in the tray and
--   will not be shown to the user.
statusIconSetName :: (StatusIconClass self, GlibString string) => self -> string -> IO ()

-- | A <a>Pixbuf</a> to display.
statusIconPixbuf :: StatusIconClass self => Attr self Pixbuf

-- | Filename to load and display.
--   
--   Default value: <tt>Nothing</tt>
statusIconFile :: (StatusIconClass self, GlibString string) => WriteAttr self (Maybe string)

-- | Stock ID for a stock image to display.
--   
--   Default value: <tt>Nothing</tt>
statusIconStock :: (StatusIconClass self, GlibString string) => Attr self (Maybe string)

-- | The name of the icon from the icon theme.
--   
--   Default value: <tt>Nothing</tt>
statusIconIconName :: (StatusIconClass self, GlibString string) => Attr self (Maybe string)

-- | The representation being used for image data.
--   
--   Default value: <a>ImageEmpty</a>
statusIconStorageType :: StatusIconClass self => ReadAttr self ImageType

-- | The size of the icon.
--   
--   Allowed values: &gt;= 0
--   
--   Default value: 0
statusIconSize :: StatusIconClass self => ReadAttr self Int

-- | Whether or not the status icon is blinking.
--   
--   Default value: <tt>False</tt>
--   
--   Removed in Gtk3.
statusIconBlinking :: StatusIconClass self => Attr self Bool

-- | Whether or not the status icon is visible.
--   
--   Default value: <tt>True</tt>
statusIconVisible :: StatusIconClass self => Attr self Bool

-- | The screen where this status icon will be displayed.
statusIconScreen :: StatusIconClass self => Attr self Screen

-- | Sets the text of tooltip to be the given string.
--   
--   Also see <tt>tooltipSetText</tt>.
--   
--   This is a convenience property which will take care of getting the
--   tooltip shown if the given value is not <a>Nothing</a>. "has-tooltip"
--   will automatically be set to <a>True</a> and the default handler for
--   the "query-tooltip" signal will take care of displaying the tooltip.
--   
--   Note that some platforms have limitations on the length of tooltips
--   that they allow on status icons, e.g. Windows only shows the first 64
--   characters.
--   
--   Default value: <a>Nothing</a>
statusIconTooltipText :: (StatusIconClass self, GlibString string) => Attr self (Maybe string)

-- | Sets the text of tooltip to be the given string, which is marked up
--   with the Pango text markup language. Also see
--   <tt>tooltipSetMarkup</tt>.
--   
--   This is a convenience property which will take care of getting the
--   tooltip shown if the given value is not <a>Nothing</a>. "has-tooltip"
--   will automatically be set to <a>True</a> and the default handler for
--   the "query-tooltip" signal will take care of displaying the tooltip.
--   
--   On some platforms, embedded markup will be ignored.
--   
--   Default value: <a>Nothing</a>
statusIconTooltipMarkup :: (StatusIconClass self, GlibString string) => Attr self (Maybe string)

-- | Enables or disables the emission of "query-tooltip" on status_icon. A
--   value of <a>True</a> indicates that status_icon can have a tooltip, in
--   this case the status icon will be queried using "query-tooltip" to
--   determine whether it will provide a tooltip or not.
--   
--   Note that setting this property to <a>True</a> for the first time will
--   change the event masks of the windows of this status icon to include
--   leave-notify and motion-notify events. This will not be undone when
--   the property is set to <a>False</a> again.
--   
--   Whether this property is respected is platform dependent. For plain
--   text tooltips, use "tooltip-text" in preference.
--   
--   Default value: <a>False</a>
statusIconHasTooltip :: StatusIconClass self => Attr self Bool

-- | The title of this tray icon. This should be a short, human-readable,
--   localized string describing the tray icon. It may be used by tools
--   like screen readers to render the tray icon.
--   
--   Default value: <a>Nothing</a>
statusIconTitle :: (StatusIconClass self, GlibString string) => Attr self (Maybe string)

-- | Gets emitted when the size available for the image changes, e.g.
--   because the notification area got resized.
statusIconSizeChanged :: StatusIconClass self => Signal self (Int -> IO Bool)

-- | Gets emitted when the user activates the status icon. If and how
--   status icons can activated is platform-dependent.
statusIconActivated :: StatusIconClass self => Signal self (IO ())

-- | Deprecated. See <a>statusIconActivated</a>.
statusIconActivate :: StatusIconClass self => Signal self (IO ())

-- | Gets emitted when the user brings up the context menu of the status
--   icon. Whether status icons can have context menus and how these are
--   activated is platform-dependent.
--   
--   The <a>MouseButton</a> and <a>TimeStamp</a> parameters should be
--   passed as the last to arguments to <a>menuPopup</a>.
statusIconPopupMenu :: StatusIconClass self => Signal self (Maybe MouseButton -> TimeStamp -> IO ())

-- | <i>Deprecated: instead of 'onActivate obj' use 'on obj activate'</i>
onActivate :: StatusIconClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterActivate obj' use 'after obj
--   activate'</i>
afterActivate :: StatusIconClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'onPopupMenu obj' use 'on obj popupMenu'</i>
onPopupMenu :: StatusIconClass self => self -> (Maybe MouseButton -> TimeStamp -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterPopupMenu obj' use 'after obj
--   popupMenu'</i>
afterPopupMenu :: StatusIconClass self => self -> (Maybe MouseButton -> TimeStamp -> IO ()) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'onSizeChanged obj' use 'on obj
--   sizeChanged'</i>
onSizeChanged :: StatusIconClass self => self -> (Int -> IO Bool) -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterSizeChanged obj' use 'after obj
--   sizeChanged'</i>
afterSizeChanged :: StatusIconClass self => self -> (Int -> IO Bool) -> IO (ConnectId self)


-- | A widget that creates a signal when clicked on
module Graphics.UI.Gtk.Buttons.Button
data Button
class BinClass o => ButtonClass o
castToButton :: GObjectClass obj => obj -> Button
gTypeButton :: GType
toButton :: ButtonClass o => o -> Button

-- | Creates a new <a>Button</a> widget. To add a child widget to the
--   button, use <a>containerAdd</a>.
buttonNew :: IO Button

-- | Creates a <a>Button</a> widget with a <a>Label</a> child containing
--   the given text.
buttonNewWithLabel :: GlibString string => string -> IO Button

-- | Creates a new <a>Button</a> containing a label. If characters in
--   <tt>label</tt> are preceded by an underscore, they are underlined. If
--   you need a literal underscore character in a label, use '__' (two
--   underscores). The first underlined character represents a keyboard
--   accelerator called a mnemonic. Pressing Alt and that key activates the
--   button.
buttonNewWithMnemonic :: GlibString string => string -> IO Button

-- | Creates a new <a>Button</a> containing the image and text from a stock
--   item.
--   
--   If <tt>stockId</tt> is unknown, then it will be treated as a mnemonic
--   label (as for <a>buttonNewWithMnemonic</a>).
buttonNewFromStock :: StockId -> IO Button

-- | Emits the button pressed signal for the given <a>Button</a>.
buttonPressed :: ButtonClass self => self -> IO ()

-- | Emits the button released signal for the given <a>Button</a>.
buttonReleased :: ButtonClass self => self -> IO ()

-- | Emits the button clicked signal for the given <a>Button</a>.
--   
--   This is similar to calling <a>buttonPressed</a> and
--   <a>buttonReleased</a> in sequence.
buttonClicked :: ButtonClass self => self -> IO ()

-- | Emit the cursor enters signal to the button.
buttonEnter :: ButtonClass self => self -> IO ()

-- | Emit the cursor leaves signal to the button.
buttonLeave :: ButtonClass self => self -> IO ()

-- | I don't have a clue.
data ReliefStyle
[ReliefNormal] :: ReliefStyle
[ReliefHalf] :: ReliefStyle
[ReliefNone] :: ReliefStyle

-- | Sets the relief style of the edges of the given <a>Button</a> widget.
--   Three styles exist, <a>ReliefNormal</a>, <a>ReliefHalf</a>,
--   <a>ReliefNone</a>. The default style is, as one can guess,
--   <a>ReliefNormal</a>.
buttonSetRelief :: ButtonClass self => self -> ReliefStyle -> IO ()

-- | Returns the current relief style of the given <a>Button</a>.
buttonGetRelief :: ButtonClass self => self -> IO ReliefStyle

-- | Sets the text of the label of the button. This text is also used to
--   select the stock item if <a>buttonSetUseStock</a> is used.
--   
--   This will also clear any previously set labels.
buttonSetLabel :: (ButtonClass self, GlibString string) => self -> string -> IO ()

-- | Gets the text from the label of the button, as set by
--   <a>buttonSetLabel</a>. If the label text has not been set the return
--   value will be <tt>""</tt>. This will be the case if you create an
--   empty button with <a>buttonNew</a> to use as a container.
buttonGetLabel :: (ButtonClass self, GlibString string) => self -> IO string

-- | If true, the label set on the button is used as a stock id to select
--   the stock item for the button.
--   
--   Setting this property to <tt>True</tt> will make the button lookup its
--   label in the table of stock items. If there is a match, the button
--   will use the stock item instead of the label. You need to set this
--   flag before you change the label.
buttonSetUseStock :: ButtonClass self => self -> Bool -> IO ()

-- | Returns whether the button label is a stock item.
buttonGetUseStock :: ButtonClass self => self -> IO Bool

-- | If true, an underline in the text of the button label indicates the
--   next character should be used for the mnemonic accelerator key.
--   
--   Setting this property will make the button join any underline
--   character into the following letter and inserting this letter as a
--   keyboard shortcut. You need to set this flag before you change the
--   label.
buttonSetUseUnderline :: ButtonClass self => self -> Bool -> IO ()

-- | Returns whether an embedded underline in the button label indicates a
--   mnemonic. See <a>buttonSetUseUnderline</a>.
buttonGetUseUnderline :: ButtonClass self => self -> IO Bool

-- | Sets whether the button will grab focus when it is clicked with the
--   mouse. Making mouse clicks not grab focus is useful in places like
--   toolbars where you don't want the keyboard focus removed from the main
--   area of the application.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
buttonSetFocusOnClick :: ButtonClass self => self -> Bool -> IO ()

-- | Returns whether the button grabs focus when it is clicked with the
--   mouse. See <a>buttonSetFocusOnClick</a>.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
buttonGetFocusOnClick :: ButtonClass self => self -> IO Bool

-- | Sets the alignment of the child. This has no effect unless the child
--   derives from <a>Misc</a> or <a>Alignment</a>.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
buttonSetAlignment :: ButtonClass self => self -> (Float, Float) -> IO ()

-- | Gets the alignment of the child in the button.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
buttonGetAlignment :: ButtonClass self => self -> IO (Float, Float)

-- | Gets the widget that is currenty set as the image of the button. This
--   may have been explicitly set by <a>buttonSetImage</a> or constructed
--   by <a>buttonNewFromStock</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
buttonGetImage :: ButtonClass self => self -> IO (Maybe Widget)

-- | Set the image of the button to the given widget. Note that it depends
--   on the "gtk-button-images" setting whether the image will be displayed
--   or not.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
buttonSetImage :: (ButtonClass self, WidgetClass image) => self -> image -> IO ()

-- | Position a scale's value is drawn relative to the trough
data PositionType
[PosLeft] :: PositionType
[PosRight] :: PositionType
[PosTop] :: PositionType
[PosBottom] :: PositionType

-- | Sets the position of the image relative to the text inside the button.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
buttonSetImagePosition :: ButtonClass self => self -> PositionType -> IO ()

-- | Gets the position of the image relative to the text inside the button.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
buttonGetImagePosition :: ButtonClass self => self -> IO PositionType

-- | Returns the button's event window if it is realized, <a>Nothing</a>
--   otherwise.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.22</li>
--   </ul>
buttonGetEventWindow :: ButtonClass self => self -> IO (Maybe DrawWindow)

-- | Text of the label widget inside the button, if the button contains a
--   label widget.
--   
--   Default value: <tt>""</tt>
buttonLabel :: (ButtonClass self, GlibString string) => Attr self string

-- | If set, an underline in the text indicates the next character should
--   be used for the mnemonic accelerator key.
--   
--   Default value: <tt>False</tt>
buttonUseUnderline :: ButtonClass self => Attr self Bool

-- | If set, the label is used to pick a stock item instead of being
--   displayed.
--   
--   Default value: <tt>False</tt>
buttonUseStock :: ButtonClass self => Attr self Bool

-- | Whether the button grabs focus when it is clicked with the mouse.
--   
--   Default value: <tt>True</tt>
buttonFocusOnClick :: ButtonClass self => Attr self Bool

-- | The border relief style.
--   
--   Default value: <a>ReliefNormal</a>
buttonRelief :: ButtonClass self => Attr self ReliefStyle

-- | If the child of the button is a <a>Misc</a> or <a>Alignment</a>, 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
buttonXalign :: ButtonClass self => Attr self Float

-- | If the child of the button is a <a>Misc</a> or <a>Alignment</a>, 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
buttonYalign :: ButtonClass self => Attr self Float

-- | Child widget to appear next to the button text.
--   
--   <ul>
--   <li>Available since Gtk version 2.6</li>
--   </ul>
buttonImage :: (ButtonClass self, WidgetClass image) => ReadWriteAttr self (Maybe Widget) image

-- | The position of the image relative to the text inside the button.
--   
--   Default value: <a>PosLeft</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
buttonImagePosition :: ButtonClass self => Attr self PositionType

-- | Emitted when the button has been activated (pressed and released).
buttonActivated :: ButtonClass self => Signal self (IO ())

-- | The button has been depressed (but not necessarily released yet). See
--   <tt>clicked</tt> signal.
onButtonActivate :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The button has been depressed (but not necessarily released yet). See
--   <tt>clicked</tt> signal.
afterButtonActivate :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The button was clicked. This is only emitted if the mouse cursor was
--   over the button when it was released.
onClicked :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The button was clicked. This is only emitted if the mouse cursor was
--   over the button when it was released.
afterClicked :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The cursor enters the button box.
onEnter :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The cursor enters the button box.
afterEnter :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The cursor leaves the button box.
onLeave :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The cursor leaves the button box.
afterLeave :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The button is pressed.
onPressed :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The button is pressed.
afterPressed :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The button is released.
onReleased :: ButtonClass b => b -> IO () -> IO (ConnectId b)

-- | The button is released.
afterReleased :: ButtonClass b => b -> IO () -> IO (ConnectId b)


-- | A menu item with an icon
module Graphics.UI.Gtk.MenuComboToolbar.ImageMenuItem
data ImageMenuItem
class MenuItemClass o => ImageMenuItemClass o
castToImageMenuItem :: GObjectClass obj => obj -> ImageMenuItem
gTypeImageMenuItem :: GType
toImageMenuItem :: ImageMenuItemClass o => o -> ImageMenuItem

-- | Creates a new <a>ImageMenuItem</a> with an empty label.
imageMenuItemNew :: IO ImageMenuItem

-- | Creates a new <a>ImageMenuItem</a> containing the image and text from
--   a stock item.
imageMenuItemNewFromStock :: StockId -> IO ImageMenuItem

-- | Creates a new <a>ImageMenuItem</a> containing a label.
imageMenuItemNewWithLabel :: GlibString string => string -> IO ImageMenuItem

-- | Creates a new <a>ImageMenuItem</a> containing a label. The label will
--   be created using <a>labelNewWithMnemonic</a>, so underscores in
--   <tt>label</tt> indicate the mnemonic for the menu item.
imageMenuItemNewWithMnemonic :: GlibString string => string -> IO ImageMenuItem

-- | Sets the image of the image menu item to the given widget. Note that
--   it depends on the "show-menu-images" setting whether the image will be
--   displayed or not.
imageMenuItemSetImage :: (ImageMenuItemClass self, WidgetClass image) => self -> image -> IO ()

-- | Gets the widget that is currently set as the image. See
--   <a>imageMenuItemSetImage</a>.
imageMenuItemGetImage :: ImageMenuItemClass self => self -> IO (Maybe Widget)

-- | Child widget to appear next to the menu text.
imageMenuItemImage :: (ImageMenuItemClass self, WidgetClass image) => ReadWriteAttr self (Maybe Widget) image


-- | Create bars of buttons and other widgets
module Graphics.UI.Gtk.MenuComboToolbar.Toolbar
data Toolbar
class ContainerClass o => ToolbarClass o
castToToolbar :: GObjectClass obj => obj -> Toolbar
gTypeToolbar :: GType
toToolbar :: ToolbarClass o => o -> Toolbar

-- | Orientation is good
data Orientation
[OrientationHorizontal] :: Orientation
[OrientationVertical] :: Orientation

-- | Where to place the toolbar?
data ToolbarStyle
[ToolbarIcons] :: ToolbarStyle
[ToolbarText] :: ToolbarStyle
[ToolbarBoth] :: ToolbarStyle
[ToolbarBothHoriz] :: ToolbarStyle

-- | Creates a new toolbar.
toolbarNew :: IO Toolbar

-- | Insert a new <a>Button</a> into the <a>Toolbar</a>.
--   
--   The new <a>Button</a> is created at position <tt>pos</tt>, counting
--   from 0.
--   
--   The icon and label for the button is referenced by <tt>stockId</tt>
--   which must be a valid entry in the <a>Toolbar</a>s Style or the
--   default <a>IconFactory</a>.
--   
--   If you whish to have <a>Tooltips</a> added to this button you can
--   specify <tt>Just (tipText, tipPrivate)</tt> , otherwise specify
--   <tt>Nothing</tt>.
--   
--   The newly created <a>Button</a> is returned. Use this button to add an
--   action function with <tt>"connectToClicked"</tt>.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarInsertNewButton :: (ToolbarClass self, GlibString string) => self -> Int -> StockId -> Maybe (string, string) -> IO Button

-- | Append a new <a>Button</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarAppendNewButton :: (ToolbarClass self, GlibString string) => self -> StockId -> Maybe (string, string) -> IO Button

-- | Prepend a new <a>Button</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarPrependNewButton :: (ToolbarClass self, GlibString string) => self -> StockId -> Maybe (string, string) -> IO Button

-- | Insert a new <a>ToggleButton</a> into the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarInsertNewToggleButton :: (ToolbarClass self, GlibString string) => self -> Int -> StockId -> Maybe (string, string) -> IO ToggleButton

-- | Append a new <a>ToggleButton</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarAppendNewToggleButton :: (ToolbarClass self, GlibString string) => self -> StockId -> Maybe (string, string) -> IO ToggleButton

-- | Prepend a new <a>ToggleButton</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarPrependNewToggleButton :: (ToolbarClass self, GlibString string) => self -> StockId -> Maybe (string, string) -> IO ToggleButton

-- | Insert a new <a>RadioButton</a> into the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   The <tt>parent</tt> argument must be set to another <a>RadioButton</a>
--   in the group. If <tt>Nothing</tt> is given, a new group is generated
--   (which is the desired behavious for the first button of a group).
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarInsertNewRadioButton :: (ToolbarClass self, RadioButtonClass rb, GlibString string) => self -> Int -> StockId -> Maybe (string, string) -> Maybe rb -> IO RadioButton

-- | Append a new <a>RadioButton</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarAppendNewRadioButton :: (ToolbarClass self, RadioButtonClass rb, GlibString string) => self -> StockId -> Maybe (string, string) -> Maybe rb -> IO RadioButton

-- | Prepend a new <a>RadioButton</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarPrependNewRadioButton :: (ToolbarClass self, RadioButtonClass rb, GlibString string) => self -> StockId -> Maybe (string, string) -> Maybe rb -> IO RadioButton

-- | Insert an arbitrary widget to the <a>Toolbar</a>.
--   
--   The <a>Widget</a> should not be a button. Adding <a>Button</a>s with
--   the <tt>toolbarInsertButton</tt>,... functions with stock objects is
--   much better as it takes care of theme handling.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarInsertNewWidget :: (ToolbarClass self, WidgetClass w, GlibString string) => self -> Int -> w -> Maybe (string, string) -> IO ()

-- | Append a new <a>Widget</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarAppendNewWidget :: (ToolbarClass self, WidgetClass w, GlibString string) => self -> w -> Maybe (string, string) -> IO ()

-- | Prepend a new <a>Widget</a> to the <a>Toolbar</a>.
--   
--   See <a>toolbarInsertNewButton</a> for details.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   Removed in Gtk3.
toolbarPrependNewWidget :: (ToolbarClass self, WidgetClass w, GlibString string) => self -> w -> Maybe (string, string) -> IO ()

-- | Sets whether a toolbar should appear horizontally or vertically.
--   
--   Removed in Gtk3.
toolbarSetOrientation :: ToolbarClass self => self -> Orientation -> IO ()

-- | Retrieves the current orientation of the toolbar. See
--   <a>toolbarSetOrientation</a>.
--   
--   Removed in Gtk3.
toolbarGetOrientation :: ToolbarClass self => self -> IO Orientation

-- | Alters the view of the toolbar to display either icons only, text
--   only, or both.
toolbarSetStyle :: ToolbarClass self => self -> ToolbarStyle -> IO ()

-- | Retrieves whether the toolbar has text, icons, or both. See
--   <a>toolbarSetStyle</a>.
toolbarGetStyle :: ToolbarClass self => self -> IO ToolbarStyle

-- | Unsets a toolbar style set with <a>toolbarSetStyle</a>, so that user
--   preferences will be used to determine the toolbar style.
toolbarUnsetStyle :: ToolbarClass self => self -> IO ()

-- | Sets if the tooltips of a toolbar should be active or not.
--   
--   Removed in Gtk3.
toolbarSetTooltips :: ToolbarClass self => self -> Bool -> IO ()

-- | Retrieves whether tooltips are enabled. See <a>toolbarSetTooltips</a>.
--   
--   Removed in Gtk3.
toolbarGetTooltips :: ToolbarClass self => self -> IO Bool

-- | The size of an icon in pixels.
--   
--   <ul>
--   <li>This enumeration contains one case that is not exported and which
--   is used when new sizes are registered using
--   <a>iconSizeRegister</a>.</li>
--   <li>Applying <a>show</a> to this type will reveal the name of the size
--   that is registered with Gtk+.</li>
--   </ul>
data IconSize

-- | Don't scale but use any of the available sizes.
[IconSizeInvalid] :: IconSize

-- | Icon size to use in next to menu items in drop-down menus.
[IconSizeMenu] :: IconSize

-- | Icon size for small toolbars.
[IconSizeSmallToolbar] :: IconSize

-- | Icon size for larger toolbars.
[IconSizeLargeToolbar] :: IconSize

-- | Icon size for icons in buttons, next to the label.
[IconSizeButton] :: IconSize

-- | Icon size for icons in drag-and-drop.
[IconSizeDnd] :: IconSize

-- | Icon size for icons next to dialog text.
[IconSizeDialog] :: IconSize
[IconSizeUser] :: Int -> IconSize

-- | This function sets the size of stock icons in the toolbar. You can
--   call it both before you add the icons and after they've been added.
--   The size you set will override user preferences for the default icon
--   size.
--   
--   It might be sensible to restrict oneself to
--   <a>IconSizeSmallToolbar</a> and <a>IconSizeLargeToolbar</a>.
--   
--   <ul>
--   <li>Warning: this function is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
toolbarSetIconSize :: ToolbarClass self => self -> IconSize -> IO ()

-- | Retrieves the icon size for the toolbar. See
--   <a>toolbarSetIconSize</a>.
toolbarGetIconSize :: ToolbarClass self => self -> IO IconSize

-- | Insert a <a>ToolItem</a> into the toolbar at position <tt>pos</tt>. If
--   <tt>pos</tt> is 0 the item is prepended to the start of the toolbar.
--   If <tt>pos</tt> is negative, the item is appended to the end of the
--   toolbar.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
toolbarInsert :: (ToolbarClass self, ToolItemClass item) => self -> item -> Int -> IO ()

-- | Returns the position of <tt>item</tt> on the toolbar, starting from 0.
--   It is an error if <tt>item</tt> is not a child of the toolbar.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
toolbarGetItemIndex :: (ToolbarClass self, ToolItemClass item) => self -> item -> IO Int

-- | Returns the number of items on the toolbar.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
toolbarGetNItems :: ToolbarClass self => self -> IO Int

-- | Returns the <tt>n</tt>'th item on toolbar, or <tt>Nothing</tt> if the
--   toolbar does not contain an <tt>n</tt>'th item.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
toolbarGetNthItem :: ToolbarClass self => self -> Int -> IO (Maybe ToolItem)

-- | Returns the position corresponding to the indicated point on toolbar.
--   This is useful when dragging items to the toolbar: this function
--   returns the position a new item should be inserted.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
toolbarGetDropIndex :: ToolbarClass self => self -> (Int, Int) -> IO Int

-- | Highlights the toolbar to give an idea of what it would look like if
--   <tt>item</tt> was added to toolbar at the position indicated by
--   <tt>index</tt>. If <tt>item</tt> is <tt>Nothing</tt>, highlighting is
--   turned off (and the index is ignored).
--   
--   The <tt>toolItem</tt> passed to this function must not be part of any
--   widget hierarchy. When an item is set as a drop highlight item it can
--   not added to any widget hierarchy or used as highlight item for
--   another toolbar.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
toolbarSetDropHighlightItem :: (ToolbarClass self, ToolItemClass toolItem) => self -> Maybe toolItem -> Int -> IO ()

-- | Sets whether to show an overflow menu when the toolbar doesn't have
--   room for all items on it. If <tt>True</tt>, items that there are not
--   room are available through an overflow menu.
--   
--   <ul>
--   <li>Available since Gtk version 2.4</li>
--   </ul>
toolbarSetShowArrow :: ToolbarClass self => self -> Bool -> IO ()

-- | Returns whether the toolbar has an overflow menu. See
--   <a>toolbarSetShowArrow</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
toolbarGetShowArrow :: ToolbarClass self => self -> IO Bool

-- | I don't have a clue.
data ReliefStyle
[ReliefNormal] :: ReliefStyle
[ReliefHalf] :: ReliefStyle
[ReliefNone] :: ReliefStyle

-- | Returns the relief style of buttons on the toolbar. See
--   <tt>buttonSetRelief</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
toolbarGetReliefStyle :: ToolbarClass self => self -> IO ReliefStyle

-- | The orientation of the toolbar.
--   
--   Default value: <a>OrientationHorizontal</a>
--   
--   Removed in Gtk3.
toolbarOrientation :: ToolbarClass self => Attr self Orientation

-- | If an arrow should be shown if the toolbar doesn't fit.
--   
--   Default value: <tt>True</tt>
toolbarShowArrow :: ToolbarClass self => Attr self Bool

-- | If the tooltips of the toolbar should be active or not.
--   
--   Default value: <tt>True</tt>
--   
--   Removed in Gtk3.
toolbarTooltips :: ToolbarClass self => Attr self Bool

-- | How to draw the toolbar.
--   
--   Default value: <a>ToolbarIcons</a>
toolbarStyle :: ToolbarClass self => Attr self ToolbarStyle

-- | Whether the item should receive extra space when the toolbar grows.
--   
--   Default value: <tt>True</tt>
toolbarChildExpand :: (ToolbarClass self, WidgetClass child) => child -> Attr self Bool

-- | Whether the item should be the same size as other homogeneous items.
--   
--   Default value: <tt>True</tt>
toolbarChildHomogeneous :: (ToolbarClass self, WidgetClass child) => child -> Attr self Bool

-- | Emitted when the orientation of the toolbar changes.
onOrientationChanged :: ToolbarClass self => self -> (Orientation -> IO ()) -> IO (ConnectId self)

-- | Emitted when the orientation of the toolbar changes.
afterOrientationChanged :: ToolbarClass self => self -> (Orientation -> IO ()) -> IO (ConnectId self)

-- | Emitted when the style of the toolbar changes.
onStyleChanged :: ToolbarClass self => self -> (ToolbarStyle -> IO ()) -> IO (ConnectId self)

-- | Emitted when the style of the toolbar changes.
afterStyleChanged :: ToolbarClass self => self -> (ToolbarStyle -> IO ()) -> IO (ConnectId self)

-- | Emitted when the user right-clicks the toolbar or uses the keybinding
--   to display a popup menu.
--   
--   Application developers should handle this signal if they want to
--   display a context menu on the toolbar. The context-menu should appear
--   at the coordinates given by <tt>x</tt> and <tt>y</tt>. The mouse
--   button number is given by the <tt>button</tt> parameter. If the menu
--   was popped up using the keybaord, <tt>button</tt> is -1.
onPopupContextMenu :: ToolbarClass self => self -> (Int -> Int -> Int -> IO Bool) -> IO (ConnectId self)

-- | Emitted when the user right-clicks the toolbar or uses the keybinding
--   to display a popup menu.
--   
--   Application developers should handle this signal if they want to
--   display a context menu on the toolbar. The context-menu should appear
--   at the coordinates given by <tt>x</tt> and <tt>y</tt>. The mouse
--   button number is given by the <tt>button</tt> parameter. If the menu
--   was popped up using the keybaord, <tt>button</tt> is -1.
afterPopupContextMenu :: ToolbarClass self => self -> (Int -> Int -> Int -> IO Bool) -> IO (ConnectId self)


-- | A <a>ToolItem</a> subclass that displays buttons
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.ToolButton
data ToolButton
class ToolItemClass o => ToolButtonClass o
castToToolButton :: GObjectClass obj => obj -> ToolButton
gTypeToolButton :: GType
toToolButton :: ToolButtonClass o => o -> ToolButton

-- | Creates a new <a>ToolButton</a> using <tt>iconWidget</tt> as icon and
--   <tt>label</tt> as label.
toolButtonNew :: (WidgetClass iconWidget, GlibString string) => Maybe iconWidget -> Maybe string -> IO ToolButton

-- | Creates a new <a>ToolButton</a> containing the image and text from a
--   stock item.
--   
--   It is an error if <tt>stockId</tt> is not a name of a stock item.
toolButtonNewFromStock :: StockId -> IO ToolButton

-- | Sets <tt>label</tt> as the label used for the tool button. The "label"
--   property only has an effect if not overridden by a
--   non-<tt>Nothing</tt> "label_widget" property. If both the
--   "label_widget" and "label" properties are <tt>Nothing</tt>, the label
--   is determined by the "stock_id" property. If the "stock_id" property
--   is also <tt>Nothing</tt>, <tt>button</tt> will not have a label.
toolButtonSetLabel :: (ToolButtonClass self, GlibString string) => self -> Maybe string -> IO ()

-- | Returns the label used by the tool button, or <tt>Nothing</tt> if the
--   tool button doesn't have a label. or uses a the label from a stock
--   item.
toolButtonGetLabel :: (ToolButtonClass self, GlibString string) => self -> IO (Maybe string)

-- | If set, an underline in the label property indicates that the next
--   character should be used for the mnemonic accelerator key in the
--   overflow menu. For example, if the label property is "_Open" and
--   <tt>useUnderline</tt> is <tt>True</tt>, the label on the tool button
--   will be "Open" and the item on the overflow menu will have an
--   underlined 'O'.
--   
--   Labels shown on tool buttons never have mnemonics on them; this
--   property only affects the menu item on the overflow menu.
toolButtonSetUseUnderline :: ToolButtonClass self => self -> Bool -> IO ()

-- | Returns whether underscores in the label property are used as
--   mnemonics on menu items on the overflow menu. See
--   <a>toolButtonSetUseUnderline</a>.
toolButtonGetUseUnderline :: ToolButtonClass self => self -> IO Bool

-- | Sets the name of the stock item. See <a>toolButtonNewFromStock</a>.
--   The stock_id property only has an effect if not overridden by
--   non-<tt>Nothing</tt> "label" and "icon_widget" properties.
toolButtonSetStockId :: ToolButtonClass self => self -> Maybe StockId -> IO ()

-- | Returns the name of the stock item. See <a>toolButtonSetStockId</a>.
toolButtonGetStockId :: ToolButtonClass self => self -> IO (Maybe StockId)

-- | Sets <tt>icon</tt> as the widget used as icon on <tt>button</tt>. If
--   <tt>iconWidget</tt> is <tt>Nothing</tt> the icon is determined by the
--   "stock_id" property. If the "stock_id" property is also
--   <tt>Nothing</tt>, the button will not have an icon.
toolButtonSetIconWidget :: (ToolButtonClass self, WidgetClass iconWidget) => self -> Maybe iconWidget -> IO ()

-- | Return the widget used as icon widget on <tt>button</tt>. See
--   <a>toolButtonSetIconWidget</a>.
toolButtonGetIconWidget :: ToolButtonClass self => self -> IO (Maybe Widget)

-- | Sets <tt>labelWidget</tt> as the widget that will be used as the label
--   for <tt>button</tt>. If <tt>labelWidget</tt> is <tt>Nothing</tt> the
--   "label" property is used as label. If "label" is also
--   <tt>Nothing</tt>, the label in the stock item determined by the
--   "stock_id" property is used as label. If "stock_id" is also
--   <tt>Nothing</tt>, <tt>button</tt> does not have a label.
toolButtonSetLabelWidget :: (ToolButtonClass self, WidgetClass labelWidget) => self -> Maybe labelWidget -> IO ()

-- | Returns the widget used as label on <tt>button</tt>. See
--   <a>toolButtonSetLabelWidget</a>.
toolButtonGetLabelWidget :: ToolButtonClass self => self -> IO (Maybe Widget)

-- | Sets the icon for the tool button from a named themed icon. See the
--   docs for <a>IconTheme</a> for more details. The "icon_name" property
--   only has an effect if not overridden by the "label", "icon_widget" and
--   "stock_id" properties.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
toolButtonSetIconName :: (ToolButtonClass self, GlibString string) => self -> string -> IO ()

-- | Returns the name of the themed icon for the tool button, see
--   <a>toolButtonSetIconName</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
toolButtonGetIconName :: (ToolButtonClass self, GlibString string) => self -> IO string

-- | Text to show in the item.
--   
--   Default value: <tt>Nothing</tt>
toolButtonLabel :: (ToolButtonClass self, GlibString string) => Attr self (Maybe string)

-- | If set, an underline in the label property indicates that the next
--   character should be used for the mnemonic accelerator key in the
--   overflow menu.
--   
--   Default value: <tt>False</tt>
toolButtonUseUnderline :: ToolButtonClass self => Attr self Bool

-- | Widget to use as the item label.
toolButtonLabelWidget :: (ToolButtonClass self, WidgetClass labelWidget) => ReadWriteAttr self (Maybe Widget) (Maybe labelWidget)

-- | The stock icon displayed on the item.
--   
--   Default value: <tt>Nothing</tt>
toolButtonStockId :: ToolButtonClass self => ReadWriteAttr self (Maybe StockId) (Maybe StockId)

-- | The name of the themed icon displayed on the item. This property only
--   has an effect if not overridden by "label", "icon_widget" or
--   "stock_id" properties.
--   
--   Default value: ""
toolButtonIconName :: (ToolButtonClass self, GlibString string) => Attr self string

-- | Icon widget to display in the item.
toolButtonIconWidget :: (ToolButtonClass self, WidgetClass iconWidget) => ReadWriteAttr self (Maybe Widget) (Maybe iconWidget)

-- | This signal is emitted when the tool button is clicked with the mouse
--   or activated with the keyboard.
onToolButtonClicked :: ToolButtonClass self => self -> IO () -> IO (ConnectId self)

-- | This signal is emitted when the tool button is clicked with the mouse
--   or activated with the keyboard.
afterToolButtonClicked :: ToolButtonClass self => self -> IO () -> IO (ConnectId self)


-- | A <a>ToolItem</a> containing a button with an additional dropdown menu
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.6</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.MenuToolButton
data MenuToolButton
class ToolButtonClass o => MenuToolButtonClass o
castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButton
gTypeMenuToolButton :: GType
toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButton

-- | Creates a new <a>MenuToolButton</a> using <tt>iconWidget</tt> as icon
--   and <tt>label</tt> as label.
menuToolButtonNew :: (WidgetClass iconWidget, GlibString string) => Maybe iconWidget -> Maybe string -> IO MenuToolButton

-- | Creates a new <a>MenuToolButton</a>. The new <a>MenuToolButton</a>
--   will contain an icon and label from the stock item indicated by
--   <tt>stockId</tt>.
menuToolButtonNewFromStock :: StockId -> IO MenuToolButton

-- | Sets the <a>Menu</a> that is popped up when the user clicks on the
--   arrow. If <tt>menu</tt> is <tt>Nothing</tt>, the arrow button becomes
--   insensitive.
menuToolButtonSetMenu :: (MenuToolButtonClass self, MenuClass menu) => self -> Maybe menu -> IO ()

-- | Gets the <a>Menu</a> associated with <a>MenuToolButton</a>.
menuToolButtonGetMenu :: MenuToolButtonClass self => self -> IO (Maybe Menu)

-- | Sets the <a>Tooltips</a> object to be used for arrow button which pops
--   up the menu. See <a>toolItemSetTooltip</a> for setting a tooltip on
--   the whole <a>MenuToolButton</a>.
menuToolButtonSetArrowTooltip :: (MenuToolButtonClass self, GlibString string) => self -> Tooltips -> string -> string -> IO ()

-- | Sets the tooltip text to be used as tooltip for the arrow button which
--   pops up the menu. See <tt>toolItemSetTooltip</tt> for setting a
--   tooltip on the whole <a>MenuToolButton</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
menuToolButtonSetArrowTooltipText :: (MenuToolButtonClass self, GlibString string) => self -> string -> IO ()

-- | Sets the tooltip markup text to be used as tooltip for the arrow
--   button which pops up the menu. See <tt>toolItemSetTooltip</tt> for
--   setting a tooltip on the whole <a>MenuToolButton</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
menuToolButtonSetArrowTooltipMarkup :: (MenuToolButtonClass self, GlibString markup) => self -> markup -> IO ()

-- | The dropdown menu.
menuToolButtonMenu :: (MenuToolButtonClass self, MenuClass menu) => ReadWriteAttr self (Maybe Menu) (Maybe menu)
onShowMenu :: MenuToolButtonClass self => self -> IO () -> IO (ConnectId self)
afterShowMenu :: MenuToolButtonClass self => self -> IO () -> IO (ConnectId self)


-- | A <a>ToolItem</a> containing a toggle button
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.ToggleToolButton
data ToggleToolButton
class ToolButtonClass o => ToggleToolButtonClass o
castToToggleToolButton :: GObjectClass obj => obj -> ToggleToolButton
gTypeToggleToolButton :: GType
toToggleToolButton :: ToggleToolButtonClass o => o -> ToggleToolButton

-- | Returns a new <a>ToggleToolButton</a>
toggleToolButtonNew :: IO ToggleToolButton

-- | Creates a new <a>ToggleToolButton</a> containing the image and text
--   from a stock item.
--   
--   It is an error if <tt>stockId</tt> is not a name of a stock item.
toggleToolButtonNewFromStock :: StockId -> IO ToggleToolButton

-- | Sets the status of the toggle tool button. Set to <tt>True</tt> if you
--   want the <a>ToggleButton</a> to be 'pressed in', and <tt>False</tt> to
--   raise it. This action causes the toggled signal to be emitted.
toggleToolButtonSetActive :: ToggleToolButtonClass self => self -> Bool -> IO ()

-- | Queries a <a>ToggleToolButton</a> and returns its current state.
--   Returns <tt>True</tt> if the toggle button is pressed in and
--   <tt>False</tt> if it is raised.
toggleToolButtonGetActive :: ToggleToolButtonClass self => self -> IO Bool

-- | If the toggle tool button should be pressed in or not.
--   
--   Default value: <tt>False</tt>
toggleToolButtonActive :: ToggleToolButtonClass self => Attr self Bool

-- | Emitted whenever the toggle tool button changes state.
onToolButtonToggled :: ToggleToolButtonClass self => self -> IO () -> IO (ConnectId self)

-- | Emitted whenever the toggle tool button changes state.
afterToolButtonToggled :: ToggleToolButtonClass self => self -> IO () -> IO (ConnectId self)


-- | A toolbar item that contains a radio button
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.MenuComboToolbar.RadioToolButton
data RadioToolButton
class ToggleToolButtonClass o => RadioToolButtonClass o
castToRadioToolButton :: GObjectClass obj => obj -> RadioToolButton
gTypeRadioToolButton :: GType
toRadioToolButton :: RadioToolButtonClass o => o -> RadioToolButton

-- | Creates a new <a>RadioToolButton</a>, creating a new group.
radioToolButtonNew :: IO RadioToolButton

-- | Creates a new <a>RadioToolButton</a>, creating a new group. The new
--   <a>RadioToolButton</a> will contain an icon and label from the stock
--   item indicated by <tt>stockId</tt>.
radioToolButtonNewFromStock :: StockId -> IO RadioToolButton

-- | Creates a new <a>RadioToolButton</a> adding it to the same group as
--   the group to which <tt>groupMember</tt> belongs.
radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember => groupMember -> IO RadioToolButton

-- | Creates a new <a>RadioToolButton</a> adding it to the same group as
--   the group to which <tt>groupMember</tt> belongs. The new
--   <a>RadioToolButton</a> will contain an icon and label from the stock
--   item indicated by <tt>stockId</tt>.
radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember => groupMember -> StockId -> IO RadioToolButton

-- | Returns the radio button group <tt>button</tt> belongs to.
radioToolButtonGetGroup :: RadioToolButtonClass self => self -> IO [RadioToolButton]

-- | Adds <tt>button</tt> to <tt>group</tt>, removing it from the group it
--   belonged to before.
radioToolButtonSetGroup :: RadioToolButtonClass self => self -> RadioToolButton -> IO ()

-- | Sets a new group for a radio tool button.
radioToolButtonGroup :: RadioToolButtonClass self => ReadWriteAttr self [RadioToolButton] RadioToolButton


-- | An action which can be triggered by a menu or toolbar item
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.ActionMenuToolbar.Action
data Action
class GObjectClass o => ActionClass o
castToAction :: GObjectClass obj => obj -> Action
gTypeAction :: GType
toAction :: ActionClass o => o -> Action

-- | Creates a new <a>Action</a> object. To add the action to a
--   <a>ActionGroup</a> and set the accelerator for the action, call
--   <a>actionGroupAddActionWithAccel</a>. See
--   <a>Graphics.UI.Gtk.ActionMenuToolbar.UIManager#XML-UI</a> for
--   information on allowed action names.
actionNew :: GlibString string => string -> string -> Maybe string -> Maybe StockId -> IO Action

-- | Returns the name of the action.
actionGetName :: (ActionClass self, GlibString string) => self -> IO string

-- | Returns whether the action is effectively sensitive.
actionIsSensitive :: ActionClass self => self -> IO Bool

-- | Returns whether the action itself is sensitive. Note that this doesn't
--   necessarily mean effective sensitivity. See <a>actionIsSensitive</a>
--   for that.
actionGetSensitive :: ActionClass self => self -> IO Bool

-- | Sets the sensitive property of the action to <tt>sensitive</tt>. Note
--   that this doesn't necessarily mean effective sensitivity. See
--   <a>actionIsSensitive</a> for that.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionSetSensitive :: ActionClass self => self -> Bool -> IO ()

-- | Returns whether the action is effectively visible.
actionIsVisible :: ActionClass self => self -> IO Bool

-- | Returns whether the action itself is visible. Note that this doesn't
--   necessarily mean effective visibility. See <a>actionIsSensitive</a>
--   for that.
actionGetVisible :: ActionClass self => self -> IO Bool

-- | Sets the visible property of the action to <tt>visible</tt>. Note that
--   this doesn't necessarily mean effective visibility. See
--   <a>actionIsVisible</a> for that.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionSetVisible :: ActionClass self => self -> Bool -> IO ()

-- | Emits the "activate" signal on the specified action, if it isn't
--   insensitive. This gets called by the proxy widgets when they get
--   activated.
--   
--   It can also be used to manually activate an action.
actionActivate :: ActionClass self => self -> IO ()

-- | Creates a menu item widget that proxies for the given action.
actionCreateMenuItem :: ActionClass self => self -> IO Widget

-- | Creates a toolbar item widget that proxies for the given action.
actionCreateToolItem :: ActionClass self => self -> IO Widget

-- | Connects a widget to an action object as a proxy. Synchronises various
--   properties of the action with the widget (such as label text, icon,
--   tooltip, etc), and attaches a callback so that the action gets
--   activated when the proxy widget does.
--   
--   If the widget is already connected to an action, it is disconnected
--   first.
--   
--   Removed in Gtk3.
actionConnectProxy :: (ActionClass self, WidgetClass proxy) => self -> proxy -> IO ()

-- | Disconnects a proxy widget from an action.
--   
--   Removed in Gtk3.
actionDisconnectProxy :: (ActionClass self, WidgetClass proxy) => self -> proxy -> IO ()

-- | Returns the proxy widgets for an action.
actionGetProxies :: ActionClass self => self -> IO [Widget]

-- | Installs the accelerator for <tt>action</tt> if <tt>action</tt> has an
--   accel path and group. See <a>actionSetAccelPath</a> and
--   <a>actionSetAccelGroup</a>
--   
--   Since multiple proxies may independently trigger the installation of
--   the accelerator, the <tt>action</tt> counts the number of times this
--   function has been called and doesn't remove the accelerator until
--   <a>actionDisconnectAccelerator</a> has been called as many times.
actionConnectAccelerator :: ActionClass self => self -> IO ()

-- | Undoes the effect of one call to <a>actionConnectAccelerator</a>.
actionDisconnectAccelerator :: ActionClass self => self -> IO ()

-- | Returns the accel path for this action.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionGetAccelPath :: (ActionClass self, GlibString string) => self -> IO (Maybe string)

-- | Sets the accel path for this action. All proxy widgets associated with
--   the action will have this accel path, so that their accelerators are
--   consistent.
actionSetAccelPath :: (ActionClass self, GlibString string) => self -> string -> IO ()

-- | Sets the <a>AccelGroup</a> in which the accelerator for this action
--   will be installed.
actionSetAccelGroup :: ActionClass self => self -> AccelGroup -> IO ()

-- | A unique name for the action.
--   
--   Default value: ""
actionName :: GlibString string => ActionClass self => Attr self string

-- | The label used for menu items and buttons that activate this action.
--   
--   Default value: ""
actionLabel :: GlibString string => ActionClass self => Attr self string

-- | A shorter label that may be used on toolbar buttons.
--   
--   Default value: ""
actionShortLabel :: GlibString string => ActionClass self => Attr self string

-- | A tooltip for this action.
--   
--   Default value: <tt>Nothing</tt>
actionTooltip :: GlibString string => ActionClass self => Attr self (Maybe string)

-- | The stock icon displayed in widgets representing this action.
--   
--   Default value: <tt>Nothing</tt>
actionStockId :: GlibString string => ActionClass self => Attr self (Maybe string)

-- | Whether the toolbar item is visible when the toolbar is in a
--   horizontal orientation.
--   
--   Default value: <tt>True</tt>
actionVisibleHorizontal :: ActionClass self => Attr self Bool

-- | When <tt>True</tt>, toolitem proxies for this action are represented
--   in the toolbar overflow menu.
--   
--   Default value: <tt>True</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionVisibleOverflown :: ActionClass self => Attr self Bool

-- | Whether the toolbar item is visible when the toolbar is in a vertical
--   orientation.
--   
--   Default value: <tt>True</tt>
actionVisibleVertical :: ActionClass self => Attr self Bool

-- | Whether the action is considered important. When <tt>True</tt>,
--   toolitem proxies for this action show text in <a>ToolbarBothHoriz</a>
--   mode.
--   
--   Default value: <tt>False</tt>
actionIsImportant :: ActionClass self => Attr self Bool

-- | When <tt>True</tt>, empty menu proxies for this action are hidden.
--   
--   Default value: <tt>True</tt>
actionHideIfEmpty :: ActionClass self => Attr self Bool

-- | Whether the action is enabled.
--   
--   Default value: <tt>True</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionSensitive :: ActionClass self => Attr self Bool

-- | Whether the action is visible.
--   
--   Default value: <tt>True</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionVisible :: ActionClass self => Attr self Bool

-- | 'accelPath' property. See <a>actionGetAccelPath</a> and
--   <a>actionSetAccelPath</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionAccelPath :: GlibString string => ActionClass self => ReadWriteAttr self (Maybe string) string

-- | If <a>True</a>, the action's menu item proxies will ignore the
--   <tt>menuImages</tt> setting and always show their image, if available.
--   
--   Use this property if the menu item would be useless or hard to use
--   without their image.
--   
--   Default value: <a>False</a>
--   
--   Since 2.20
actionAlwaysShowImage :: ActionClass self => Attr self Bool

-- | The "activate" signal is emitted when the action is activated.
actionActivated :: ActionClass self => Signal self (IO ())

-- | The "activate" signal is emitted when the action is activated.
onActionActivate :: ActionClass self => self -> IO () -> IO (ConnectId self)

-- | The "activate" signal is emitted when the action is activated.
afterActionActivate :: ActionClass self => self -> IO () -> IO (ConnectId self)


-- | An action which can be toggled between two states
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.ActionMenuToolbar.ToggleAction
data ToggleAction
class ActionClass o => ToggleActionClass o
castToToggleAction :: GObjectClass obj => obj -> ToggleAction
gTypeToggleAction :: GType
toToggleAction :: ToggleActionClass o => o -> ToggleAction

-- | Creates a new <a>ToggleAction</a> object. To add the action to a
--   <a>ActionGroup</a> and set the accelerator for the action, call
--   <a>actionGroupAddActionWithAccel</a>.
toggleActionNew :: GlibString string => string -> string -> Maybe string -> Maybe StockId -> IO ToggleAction

-- | Emits the "toggled" signal on the toggle action.
toggleActionToggled :: ToggleActionClass self => self -> IO ()

-- | Sets the checked state on the toggle action.
toggleActionSetActive :: ToggleActionClass self => self -> Bool -> IO ()

-- | Returns the checked state of the toggle action.
toggleActionGetActive :: ToggleActionClass self => self -> IO Bool

-- | Sets whether the action should have proxies like a radio action.
toggleActionSetDrawAsRadio :: ToggleActionClass self => self -> Bool -> IO ()

-- | Returns whether the action should have proxies like a radio action.
toggleActionGetDrawAsRadio :: ToggleActionClass self => self -> IO Bool

-- | Whether the proxies for this action look like radio action proxies.
--   
--   Default value: <tt>False</tt>
toggleActionDrawAsRadio :: ToggleActionClass self => Attr self Bool

-- | If the toggle action should be active in or not.
--   
--   Default value: <tt>False</tt>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
toggleActionActive :: ToggleActionClass self => Attr self Bool
actionToggled :: ToggleActionClass self => Signal self (IO ())

-- | <i>Deprecated: instead of 'onActionToggled obj' use 'on obj
--   actionToggled'</i>
onActionToggled :: ToggleActionClass self => self -> IO () -> IO (ConnectId self)

-- | <i>Deprecated: instead of 'afterActionToggled obj' use 'after obj
--   actionToggled'</i>
afterActionToggled :: ToggleActionClass self => self -> IO () -> IO (ConnectId self)


-- | An action of which only one in a group can be active
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.ActionMenuToolbar.RadioAction
data RadioAction
class ToggleActionClass o => RadioActionClass o
castToRadioAction :: GObjectClass obj => obj -> RadioAction
gTypeRadioAction :: GType
toRadioAction :: RadioActionClass o => o -> RadioAction

-- | Creates a new <a>RadioAction</a> object. To add the action to a
--   <a>ActionGroup</a> and set the accelerator for the action, call
--   <a>actionGroupAddActionWithAccel</a>.
radioActionNew :: GlibString string => string -> string -> Maybe string -> Maybe StockId -> Int -> IO RadioAction

-- | Returns the list representing the radio group for this object
radioActionGetGroup :: RadioActionClass self => self -> IO [RadioAction]

-- | Sets the radio group for the radio action object.
radioActionSetGroup :: (RadioActionClass self, RadioActionClass groupMember) => self -> groupMember -> IO ()

-- | Obtains the value property of the currently active member of the group
--   to which the action belongs.
radioActionGetCurrentValue :: RadioActionClass self => self -> IO Int

-- | The value is an arbitrary integer which can be used as a convenient
--   way to determine which action in the group is currently active in an
--   ::activate or ::changed signal handler. See
--   <a>radioActionGetCurrentValue</a> and <tt>RadioActionEntry</tt> for
--   convenient ways to get and set this property.
--   
--   Default value: 0
radioActionValueAttr :: RadioActionClass self => Attr self Int

-- | Sets a new group for a radio action.
radioActionGroup :: RadioActionClass self => ReadWriteAttr self [RadioAction] RadioAction

-- | The value property of the currently active member of the group to
--   which this action belongs.
--   
--   Default value: 0
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
radioActionCurrentValue :: RadioActionClass self => Attr self Int

-- | The <a>radioActionChanged</a> signal is emitted on every member of a
--   radio group when the active member is changed. The signal gets emitted
--   after the <tt>actionActivated</tt> signals for the previous and
--   current active members.
radioActionChanged :: RadioActionClass self => Signal self (RadioAction -> IO ())

-- | The changed signal is emitted on every member of a radio group when
--   the active member is changed. The signal gets emitted after the
--   activate signals for the previous and current active members.
onRadioActionChanged :: RadioActionClass self => self -> (RadioAction -> IO ()) -> IO (ConnectId self)

-- | The changed signal is emitted on every member of a radio group when
--   the active member is changed. The signal gets emitted after the
--   activate signals for the previous and current active members.
afterRadioActionChanged :: RadioActionClass self => self -> (RadioAction -> IO ()) -> IO (ConnectId self)


-- | A group of actions
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.ActionMenuToolbar.ActionGroup
data ActionGroup
class GObjectClass o => ActionGroupClass o
castToActionGroup :: GObjectClass obj => obj -> ActionGroup
gTypeActionGroup :: GType
toActionGroup :: ActionGroupClass o => o -> ActionGroup

-- | A description of an action.
data ActionEntry
[ActionEntry] :: DefaultGlibString -> DefaultGlibString -> Maybe DefaultGlibString -> Maybe DefaultGlibString -> Maybe DefaultGlibString -> IO () -> ActionEntry
[actionEntryName] :: ActionEntry -> DefaultGlibString
[actionEntryLabel] :: ActionEntry -> DefaultGlibString
[actionEntryStockId] :: ActionEntry -> Maybe DefaultGlibString
[actionEntryAccelerator] :: ActionEntry -> Maybe DefaultGlibString
[actionEntryTooltip] :: ActionEntry -> Maybe DefaultGlibString
[actionEntryCallback] :: ActionEntry -> IO ()

-- | A description of an action for an entry that can be toggled.
data ToggleActionEntry
[ToggleActionEntry] :: DefaultGlibString -> DefaultGlibString -> Maybe DefaultGlibString -> Maybe DefaultGlibString -> Maybe DefaultGlibString -> IO () -> Bool -> ToggleActionEntry
[toggleActionName] :: ToggleActionEntry -> DefaultGlibString
[toggleActionLabel] :: ToggleActionEntry -> DefaultGlibString
[toggleActionStockId] :: ToggleActionEntry -> Maybe DefaultGlibString
[toggleActionAccelerator] :: ToggleActionEntry -> Maybe DefaultGlibString
[toggleActionTooltip] :: ToggleActionEntry -> Maybe DefaultGlibString
[toggleActionCallback] :: ToggleActionEntry -> IO ()
[toggleActionIsActive] :: ToggleActionEntry -> Bool

-- | A description of an action for an entry that provides a multiple
--   choice.
data RadioActionEntry
[RadioActionEntry] :: DefaultGlibString -> DefaultGlibString -> Maybe DefaultGlibString -> Maybe DefaultGlibString -> Maybe DefaultGlibString -> Int -> RadioActionEntry
[radioActionName] :: RadioActionEntry -> DefaultGlibString
[radioActionLabel] :: RadioActionEntry -> DefaultGlibString
[radioActionStockId] :: RadioActionEntry -> Maybe DefaultGlibString
[radioActionAccelerator] :: RadioActionEntry -> Maybe DefaultGlibString
[radioActionTooltip] :: RadioActionEntry -> Maybe DefaultGlibString
[radioActionValue] :: RadioActionEntry -> Int

-- | Creates a new <a>ActionGroup</a> object. The name of the action group
--   is used when associating keybindings with the actions.
actionGroupNew :: GlibString string => string -> IO ActionGroup

-- | Gets the name of the action group.
actionGroupGetName :: GlibString string => ActionGroup -> IO string

-- | Returns <tt>True</tt> if the group is sensitive. The constituent
--   actions can only be logically sensitive (see <a>actionIsSensitive</a>)
--   if they are sensitive (see <a>actionGetSensitive</a>) and their group
--   is sensitive.
actionGroupGetSensitive :: ActionGroup -> IO Bool

-- | Changes the sensitivity of <tt>actionGroup</tt>
actionGroupSetSensitive :: ActionGroup -> Bool -> IO ()

-- | Returns <tt>True</tt> if the group is visible. The constituent actions
--   can only be logically visible (see <a>actionIsVisible</a>) if they are
--   visible (see <a>actionGetVisible</a>) and their group is visible.
actionGroupGetVisible :: ActionGroup -> IO Bool

-- | Changes the visible of <tt>actionGroup</tt>.
actionGroupSetVisible :: ActionGroup -> Bool -> IO ()

-- | Looks up an action in the action group by name.
actionGroupGetAction :: GlibString string => ActionGroup -> string -> IO (Maybe Action)

-- | Lists the actions in the action group.
actionGroupListActions :: ActionGroup -> IO [Action]

-- | Adds an action object to the action group. Note that this function
--   does not set up the accel path of the action, which can lead to
--   problems if a user tries to modify the accelerator of a menuitem
--   associated with the action. Therefore you must either set the accel
--   path yourself with <a>actionSetAccelPath</a>, or use
--   <tt><a>actionGroupAddActionWithAccel</a> ... Nothing</tt>.
actionGroupAddAction :: ActionClass action => ActionGroup -> action -> IO ()

-- | Adds an action object to the action group and sets up the accelerator.
--   
--   If <tt>accelerator</tt> is <tt>Nothing</tt>, attempts to use the
--   accelerator associated with the stock id of the action.
--   
--   Accel paths are set to
--   <tt>&lt;Actions&gt;/group-name/action-name</tt>.
actionGroupAddActionWithAccel :: (ActionClass action, GlibString string) => ActionGroup -> action -> Maybe string -> IO ()

-- | Removes an action object from the action group.
actionGroupRemoveAction :: ActionClass action => ActionGroup -> action -> IO ()

-- | This is a convenience function to create a number of actions and add
--   them to the action group.
--   
--   The <a>actionActivated</a> signals of the actions are connected to the
--   callbacks and their accel paths are set to
--   <tt>&lt;Actions&gt;/group-name/action-name</tt>.
actionGroupAddActions :: ActionGroup -> [ActionEntry] -> IO ()

-- | This is a convenience function to create a number of toggle actions
--   and add them to the action group.
--   
--   The <a>actionActivated</a> signals of the actions are connected to the
--   callbacks and their accel paths are set to
--   <tt>&lt;Actions&gt;/group-name/action-name</tt>.
actionGroupAddToggleActions :: ActionGroup -> [ToggleActionEntry] -> IO ()

-- | This is a convenience routine to create a group of radio actions and
--   add them to the action group.
--   
--   The <a>radioActionChanged</a> signal of the first radio action is
--   connected to the <tt>onChange</tt> callback and the accel paths of the
--   actions are set to <tt>&lt;Actions&gt;/group-name/action-name</tt>.
actionGroupAddRadioActions :: ActionGroup -> [RadioActionEntry] -> Int -> (RadioAction -> IO ()) -> IO ()

-- | Sets a function to be used for translating the <tt>label</tt> and
--   <tt>tooltip</tt> of <a>ActionEntry</a>s added by
--   <a>actionGroupAddActions</a>.
--   
--   If you're using 'gettext', it is enough to set the translation domain
--   with <a>actionGroupSetTranslationDomain</a>.
actionGroupSetTranslateFunc :: GlibString string => ActionGroup -> (string -> IO string) -> IO ()

-- | Sets the translation domain and uses 'dgettext' for translating the
--   <tt>label</tt> and <tt>tooltip</tt> of <a>ActionEntry</a>s added by
--   <a>actionGroupAddActions</a>.
--   
--   If you're not using 'gettext' for localization, see
--   <a>actionGroupSetTranslateFunc</a>.
actionGroupSetTranslationDomain :: GlibString string => ActionGroup -> string -> IO ()

-- | Translates a string.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
actionGroupTranslateString :: GlibString string => ActionGroup -> string -> IO string

-- | A name for the action group.
--   
--   Default value: ""
actionGroupName :: GlibString string => Attr ActionGroup string

-- | Whether the action group is enabled.
--   
--   Default value: <tt>True</tt>
actionGroupSensitive :: Attr ActionGroup Bool

-- | Whether the action group is visible.
--   
--   Default value: <tt>True</tt>
actionGroupVisible :: Attr ActionGroup Bool


-- | The base class for all widgets.
module Graphics.UI.Gtk.Abstract.Widget
data Widget
class ObjectClass o => WidgetClass o
castToWidget :: GObjectClass obj => obj -> Widget
gTypeWidget :: GType
toWidget :: WidgetClass o => o -> Widget

-- | Specify which events a widget will emit signals on.
data EventMask
[ExposureMask] :: EventMask
[PointerMotionMask] :: EventMask
[PointerMotionHintMask] :: EventMask
[ButtonMotionMask] :: EventMask
[Button1MotionMask] :: EventMask
[Button2MotionMask] :: EventMask
[Button3MotionMask] :: EventMask
[ButtonPressMask] :: EventMask
[ButtonReleaseMask] :: EventMask
[KeyPressMask] :: EventMask
[KeyReleaseMask] :: EventMask
[EnterNotifyMask] :: EventMask
[LeaveNotifyMask] :: EventMask
[FocusChangeMask] :: EventMask
[StructureMask] :: EventMask
[PropertyChangeMask] :: EventMask
[VisibilityNotifyMask] :: EventMask
[ProximityInMask] :: EventMask
[ProximityOutMask] :: EventMask
[SubstructureMask] :: EventMask
[ScrollMask] :: EventMask
[AllEventsMask] :: EventMask

-- | specify which input extension a widget desires
data ExtensionMode
[ExtensionEventsNone] :: ExtensionMode
[ExtensionEventsAll] :: ExtensionMode
[ExtensionEventsCursor] :: ExtensionMode
type GType = CULong

-- | Key values are the codes which are sent whenever a key is pressed or
--   released.
type KeyVal = Word32
data Region

-- | A <a>Bitmap</a> is a special <a>Pixmap</a> in that the number of bits
--   per pixel is one, that is, a pixel is either set or unset. Whenever a
--   function expects a <a>Bitmap</a>, a <a>Pixmap</a> of depth one must be
--   supplied.
type Bitmap = Pixmap

-- | Requisition
--   
--   <ul>
--   <li>For <a>widgetSizeRequest</a>. The values represent the desired
--   width and height of the widget.</li>
--   </ul>
data Requisition
[Requisition] :: Int -> Int -> Requisition

-- | Rectangle
--   
--   <ul>
--   <li>Specifies x, y, width and height</li>
--   </ul>
data Rectangle :: *
[Rectangle] :: Int -> Int -> Int -> Int -> Rectangle

-- | Color
--   
--   <ul>
--   <li>Specifies a color with three integer values for red, green and
--   blue. All values range from 0 (least intense) to 65535 (highest
--   intensity).</li>
--   </ul>
data Color :: *

-- | The size of an icon in pixels.
--   
--   <ul>
--   <li>This enumeration contains one case that is not exported and which
--   is used when new sizes are registered using
--   <a>iconSizeRegister</a>.</li>
--   <li>Applying <a>show</a> to this type will reveal the name of the size
--   that is registered with Gtk+.</li>
--   </ul>
data IconSize

-- | Don't scale but use any of the available sizes.
[IconSizeInvalid] :: IconSize

-- | Icon size to use in next to menu items in drop-down menus.
[IconSizeMenu] :: IconSize

-- | Icon size for small toolbars.
[IconSizeSmallToolbar] :: IconSize

-- | Icon size for larger toolbars.
[IconSizeLargeToolbar] :: IconSize

-- | Icon size for icons in buttons, next to the label.
[IconSizeButton] :: IconSize

-- | Icon size for icons in drag-and-drop.
[IconSizeDnd] :: IconSize

-- | Icon size for icons next to dialog text.
[IconSizeDialog] :: IconSize
[IconSizeUser] :: Int -> IconSize

-- | Widget states
data StateType
[StateNormal] :: StateType
[StateActive] :: StateType
[StatePrelight] :: StateType
[StateSelected] :: StateType
[StateInsensitive] :: StateType
data TextDirection
[TextDirNone] :: TextDirection
[TextDirLtr] :: TextDirection
[TextDirRtl] :: TextDirection

-- | State of an accelerator
data AccelFlags
[AccelVisible] :: AccelFlags
[AccelLocked] :: AccelFlags
[AccelMask] :: AccelFlags

-- | Editing direction
data DirectionType
[DirTabForward] :: DirectionType
[DirTabBackward] :: DirectionType
[DirUp] :: DirectionType
[DirDown] :: DirectionType
[DirLeft] :: DirectionType
[DirRight] :: DirectionType

-- | A synonym for a standard button or icon.
type StockId = DefaultGlibString

-- | Specify what kind of help the user wants.
data WidgetHelpType
[WidgetHelpTooltip] :: WidgetHelpType
[WidgetHelpWhatsThis] :: WidgetHelpType

-- | Allocation
--   
--   <ul>
--   <li>For Widget's <a>sizeAllocate</a> signal. The <tt>x</tt> and
--   <tt>y</tt> values of the rectangle refer to the widgets position
--   relative to its parent window.</li>
--   </ul>
type Allocation = Rectangle

-- | Flags a widget to be displayed. Any widget that isn't shown will not
--   appear on the screen. If you want to show all the widgets in a
--   container, it's easier to call <a>widgetShowAll</a> on the container,
--   instead of individually showing the widgets.
--   
--   Remember that you have to show the containers containing a widget, in
--   addition to the widget itself, before it will appear onscreen.
--   
--   When a toplevel container is shown, it is immediately realized and
--   mapped; other shown widgets are realized and mapped when their
--   toplevel container is realized and mapped.
widgetShow :: WidgetClass self => self -> IO ()

-- | Shows a widget. If the widget is an unmapped toplevel widget (i.e. a
--   <a>Window</a> that has not yet been shown), enter the main loop and
--   wait for the window to actually be mapped. Be careful; because the
--   main loop is running, anything can happen during this function.
widgetShowNow :: WidgetClass self => self -> IO ()

-- | Reverses the effects of <a>widgetShow</a>, causing the widget to be
--   hidden (invisible to the user).
widgetHide :: WidgetClass self => self -> IO ()

-- | Recursively shows a widget, and any child widgets (if the widget is a
--   container).
widgetShowAll :: WidgetClass self => self -> IO ()

-- | Recursively hides a widget and any child widgets.
--   
--   Removed in Gtk3.
widgetHideAll :: WidgetClass self => self -> IO ()

-- | Destroys a widget. Equivalent to <a>objectDestroy</a>.
--   
--   When a widget is destroyed it will be removed from the screen and
--   unrealized. When a widget is destroyed, it will break any references
--   it holds to other objects.If the widget is inside a container, the
--   widget will be removed from the container. The widget will be garbage
--   collected (finalized) time after your last reference to the widget
--   dissapears.
--   
--   In most cases, only toplevel widgets (windows) require explicit
--   destruction, because when you destroy a toplevel its children will be
--   destroyed as well.
widgetDestroy :: WidgetClass self => self -> IO ()

-- | Send a redraw request to a widget. Equivalent to calling
--   <a>widgetQueueDrawArea</a> for the entire area of a widget.
widgetQueueDraw :: WidgetClass self => self -> IO ()

-- | This function is only for use in widget implementations. Flags a
--   widget to have its size renegotiated; should be called when a widget
--   for some reason has a new size request. For example, when you change
--   the text in a <a>Label</a>, <a>Label</a> queues a resize to ensure
--   there's enough space for the new text.
widgetQueueResize :: WidgetClass self => self -> IO ()

-- | This function works like <a>widgetQueueResize</a>, except that the
--   widget is not invalidated.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
widgetQueueResizeNoRedraw :: WidgetClass self => self -> IO ()

-- | This function is typically used when implementing a <a>Container</a>
--   subclass. Obtains the preferred size of a widget. The container uses
--   this information to arrange its child widgets and decide what size
--   allocations to give them with <a>widgetSizeAllocate</a>.
--   
--   You can also call this function from an application, with some
--   caveats. Most notably, getting a size request requires the widget to
--   be associated with a screen, because font information may be needed.
--   Multihead-aware applications should keep this in mind.
--   
--   Also remember that the size request is not necessarily the size a
--   widget will actually be allocated.
widgetSizeRequest :: WidgetClass self => self -> IO Requisition

-- | This function is only for use in widget implementations. Obtains the
--   chached requisition information in the widget, unless someone has
--   forced a particular geometry on the widget (e.g. with
--   <tt>widgetSetUsize</tt>), in which case it returns that geometry
--   instead of the widget's requisition.
--   
--   This function differs from <a>widgetSizeRequest</a> in that it
--   retrieves the last size request value stored in the widget, while
--   <a>widgetSizeRequest</a> actually emits the <a>sizeRequest</a> signal
--   on the widget to compute the size request (which updates the widget's
--   requisition information).
--   
--   Since this function does not emit the <a>sizeRequest</a> signal, it
--   can only be used when you know that the widget's requisition is
--   up-to-date, that is, <a>widgetSizeRequest</a> has been called since
--   the last time a resize was queued. In general, only container
--   implementations have this information; applications should use
--   <a>widgetSizeRequest</a>.
widgetGetChildRequisition :: WidgetClass self => self -> IO Requisition

-- | This function is only used by <a>Container</a> subclasses, to assign a
--   size and position to their child widgets.
widgetSizeAllocate :: WidgetClass self => self -> Allocation -> IO ()

-- | Installs an accelerator for this <tt>widget</tt> in
--   <tt>accelGroup</tt> that causes <tt>accelSignal</tt> to be emitted if
--   the accelerator is activated. The <tt>accelGroup</tt> needs to be
--   added to the widget's toplevel via <tt>windowAddAccelGroup</tt>, and
--   the signal must be of type <tt>G_RUN_ACTION</tt>. Accelerators added
--   through this function are not user changeable during runtime. If you
--   want to support accelerators that can be changed by the user, use
--   <tt>accelMapAddEntry</tt> and <a>widgetSetAccelPath</a> or
--   <tt>menuItemSetAccelPath</tt> instead.
widgetAddAccelerator :: (WidgetClass self, GlibString string) => self -> string -> AccelGroup -> KeyVal -> [Modifier] -> [AccelFlags] -> IO ()

-- | Removes an accelerator from <tt>widget</tt>, previously installed with
--   <a>widgetAddAccelerator</a>.
widgetRemoveAccelerator :: WidgetClass self => self -> AccelGroup -> KeyVal -> [Modifier] -> IO Bool

-- | Given an accelerator group, <tt>accelGroup</tt>, and an accelerator
--   path, <tt>accelPath</tt>, sets up an accelerator in
--   <tt>accelGroup</tt> so whenever the key binding that is defined for
--   <tt>accelPath</tt> is pressed, <tt>widget</tt> will be activated. This
--   removes any accelerators (for any accelerator group) installed by
--   previous calls to <a>widgetSetAccelPath</a>. Associating accelerators
--   with paths allows them to be modified by the user and the
--   modifications to be saved for future use. (See <tt>accelMapSave</tt>.)
--   
--   This function is a low level function that would most likely be used
--   by a menu creation system like <a>ItemFactory</a>. If you use
--   <a>ItemFactory</a>, setting up accelerator paths will be done
--   automatically.
--   
--   Even when you you aren't using <a>ItemFactory</a>, if you only want to
--   set up accelerators on menu items <tt>menuItemSetAccelPath</tt>
--   provides a somewhat more convenient interface.
widgetSetAccelPath :: (WidgetClass self, GlibString string) => self -> string -> AccelGroup -> IO ()

-- | Determines whether an accelerator that activates the signal identified
--   by <tt>signalId</tt> can currently be activated. This is done by
--   emitting the <tt>canActivateAccel</tt> signal on the widget the signal
--   is attached to; if the signal isn't overridden by a handler or in a
--   derived widget, then the default check is that the widget must be
--   sensitive, and the widget and all its ancestors mapped.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
widgetCanActivateAccel :: WidgetClass self => (ConnectId self) -> IO Bool

-- | For widgets that can be "activated" (buttons, menu items, etc.) this
--   function activates them. Activation is what happens when you press
--   Enter on a widget during key navigation. If <tt>widget</tt> isn't
--   activatable, the function returns <tt>False</tt>.
widgetActivate :: WidgetClass self => self -> IO Bool

-- | Computes the intersection of a widget's area and <tt>area</tt>,
--   returning the intersection, and returns <tt>Nothing</tt> if there was
--   no intersection.
widgetIntersect :: WidgetClass self => self -> Rectangle -> IO (Maybe Rectangle)

-- | Check if the widget intersects with a given area.
widgetHasIntersection :: WidgetClass self => self -> Rectangle -> IO Bool

-- | Determines if the widget is the focus widget within its toplevel.
--   (This does not mean that the <a>widgetHasFocus</a> attribute is
--   necessarily set; <a>widgetHasFocus</a> will only be set if the
--   toplevel widget additionally has the global input focus.)
widgetGetIsFocus :: WidgetClass self => self -> IO Bool

-- | Causes <tt>widget</tt> to have the keyboard focus for the
--   <a>Window</a> it's inside. <tt>widget</tt> must be a focusable widget,
--   such as a <a>Entry</a>; something like <a>Frame</a> won't work. (More
--   precisely, it must have the <a>widgetCanFocus</a> flag set.)
widgetGrabFocus :: WidgetClass self => self -> IO ()

-- | Causes <tt>widget</tt> to become the default widget. <tt>widget</tt>
--   must have the <tt>canDefault</tt> flag set. The default widget is
--   activated when the user presses Enter in a window. Default widgets
--   must be activatable, that is, <a>widgetActivate</a> should affect
--   them.
widgetGrabDefault :: WidgetClass self => self -> IO ()

-- | Widgets can be named, which allows you to refer to them from a gtkrc
--   file. You can apply a style to widgets with a particular name in the
--   gtkrc file. See the documentation for gtkrc files.
--   
--   Note that widget names are separated by periods in paths (see
--   <a>widgetPath</a>), so names with embedded periods may cause
--   confusion.
widgetSetName :: (WidgetClass self, GlibString string) => self -> string -> IO ()

-- | Retrieves the name of a widget. See <a>widgetSetName</a> for the
--   significance of widget names.
widgetGetName :: (WidgetClass self, GlibString string) => self -> IO string

-- | Sets the sensitivity of a widget. A widget is sensitive if the user
--   can interact with it. Insensitive widgets are "grayed out" and the
--   user can't interact with them. Insensitive widgets are known as
--   "inactive", "disabled", or "ghosted" in some other toolkits.
widgetSetSensitive :: WidgetClass self => self -> Bool -> IO ()
widgetSetSensitivity :: WidgetClass self => self -> Bool -> IO ()

-- | Gets the widget's parent window.
widgetGetParentWindow :: WidgetClass self => self -> IO DrawWindow

-- | Retrieves the <a>DrawWindow</a> that the widget draws onto.
--   
--   This function thows an error if the widget has not yet been realized,
--   since a widget does not allocate its window resources until just
--   before it is displayed on the screen. You can use the <a>onRealize</a>
--   signal to give you the opportunity to use a widget's <a>DrawWindow</a>
--   as soon as it has been created but before the widget is displayed.
--   
--   Removed in Gtk3.
widgetGetDrawWindow :: WidgetClass widget => widget -> IO DrawWindow

-- | Disable event signals.
--   
--   <ul>
--   <li>Remove events from the <a>EventMask</a> of this widget. The event
--   mask determines which events a widget will receive. Events are signals
--   that return an <a>Event</a> data type. On connecting to a such a
--   signal, the event mask is automatically adjusted so that he signal is
--   emitted. This function is useful to disable the reception of the
--   signal. It should be called whenever all signals receiving an
--   <a>Event</a> have been disconnected.</li>
--   </ul>
widgetDelEvents :: WidgetClass self => self -> [EventMask] -> IO ()

-- | Enable event signals.
--   
--   <ul>
--   <li>See <a>widgetDelEvents</a>.</li>
--   </ul>
widgetAddEvents :: WidgetClass self => self -> [EventMask] -> IO ()

-- | Get enabled event signals.
--   
--   <ul>
--   <li>See <a>widgetDelEvents</a>.</li>
--   </ul>
widgetGetEvents :: WidgetClass self => self -> IO [EventMask]

-- | Sets the event mask (see <a>EventMask</a>) for a widget. The event
--   mask determines which events a widget will receive. Keep in mind that
--   different widgets have different default event masks, and by changing
--   the event mask you may disrupt a widget's functionality, so be
--   careful. This function must be called while a widget is unrealized.
--   Consider <a>widgetAddEvents</a> for widgets that are already realized,
--   or if you want to preserve the existing event mask. This function
--   can't be used with <tt>NoWindow</tt> widgets; to get events on those
--   widgets, place them inside a <a>EventBox</a> and receive events on the
--   event box.
widgetSetEvents :: WidgetClass self => self -> [EventMask] -> IO ()

-- | Sets the extension events mask to <tt>mode</tt>. See
--   <a>ExtensionMode</a> and <tt>inputSetExtensionEvents</tt>.
widgetSetExtensionEvents :: WidgetClass self => self -> [ExtensionMode] -> IO ()

-- | Retrieves the extension events the widget will receive; see
--   <a>widgetSetExtensionEvents</a>.
widgetGetExtensionEvents :: WidgetClass self => self -> IO [ExtensionMode]

-- | This function returns the topmost widget in the container hierarchy
--   <tt>widget</tt> is a part of. If <tt>widget</tt> has no parent
--   widgets, it will be returned as the topmost widget.
widgetGetToplevel :: WidgetClass self => self -> IO Widget

-- | Gets the first ancestor of <tt>widget</tt> with type
--   <tt>widgetType</tt>. For example, <tt>widgetGetAncestor widget
--   gTypeBox</tt> gets the first <a>Box</a> that's an ancestor of
--   <tt>widget</tt>. See note about checking for a toplevel <a>Window</a>
--   in the docs for <a>widgetGetToplevel</a>.
--   
--   Note that unlike <a>widgetIsAncestor</a>, <a>widgetGetAncestor</a>
--   considers <tt>widget</tt> to be an ancestor of itself.
widgetGetAncestor :: WidgetClass self => self -> GType -> IO (Maybe Widget)

-- | Gets the colormap that will be used to render <tt>widget</tt>.
widgetGetColormap :: WidgetClass self => self -> IO Colormap

-- | Sets the colormap for the widget to the given value. Widget must not
--   have been previously realized. This probably should only be used from
--   an <a>init</a> function (i.e. from the constructor for the widget).
widgetSetColormap :: WidgetClass self => self -> Colormap -> IO ()

-- | Obtains the location of the mouse pointer in widget coordinates.
--   Widget coordinates are a bit odd; for historical reasons, they are
--   defined as <a>widgetGetParentWindow</a> coordinates for widgets that
--   are not <tt>NoWindow</tt> widgets, and are relative to the widget's
--   allocation's (x,y) for widgets that are <tt>NoWindow</tt> widgets.
widgetGetPointer :: WidgetClass self => self -> IO (Int, Int)

-- | Determines whether <tt>widget</tt> is somewhere inside
--   <tt>ancestor</tt>, possibly with intermediate containers.
widgetIsAncestor :: (WidgetClass self, WidgetClass ancestor) => self -> ancestor -> IO Bool

-- | Translate coordinates relative to <tt>srcWidget</tt>'s allocation to
--   coordinates relative to <tt>destWidget</tt>'s allocations. In order to
--   perform this operation, both widgets must be realized, and must share
--   a common toplevel.
widgetTranslateCoordinates :: (WidgetClass self, WidgetClass destWidget) => self -> destWidget -> Int -> Int -> IO (Maybe (Int, Int))

-- | Sets the <a>Style</a> for a widget. You probably don't want to use
--   this function; it interacts badly with themes, because themes work by
--   replacing the <a>Style</a>. Instead, use <a>widgetModifyStyle</a>.
widgetSetStyle :: WidgetClass self => self -> Maybe Style -> IO ()

-- | Retrieve the <a>Style</a> associated with the widget.
widgetGetStyle :: WidgetClass widget => widget -> IO Style

-- | Pushes <tt>cmap</tt> onto a global stack of colormaps; the topmost
--   colormap on the stack will be used to create all widgets. Remove
--   <tt>cmap</tt> with <a>widgetPopColormap</a>. There's little reason to
--   use this function.
widgetPushColormap :: Colormap -> IO ()

-- | Removes a colormap pushed with <a>widgetPushColormap</a>.
widgetPopColormap :: IO ()

-- | Sets the default colormap to use when creating widgets.
--   <a>widgetPushColormap</a> is a better function to use if you only want
--   to affect a few widgets, rather than all widgets.
widgetSetDefaultColormap :: Colormap -> IO ()

-- | Obtains the default colormap used to create widgets.
widgetGetDefaultColormap :: IO Colormap

-- | Returns the default style used by all widgets initially.
widgetGetDefaultStyle :: IO Style

-- | Sets the reading direction on a particular widget. This direction
--   controls the primary direction for widgets containing text, and also
--   the direction in which the children of a container are packed. The
--   ability to set the direction is present in order so that correct
--   localization into languages with right-to-left reading directions can
--   be done. Generally, applications will let the default reading
--   direction present, except for containers where the containers are
--   arranged in an order that is explicitely visual rather than logical
--   (such as buttons for text justification).
--   
--   If the direction is set to <a>TextDirNone</a>, then the value set by
--   <a>widgetSetDefaultDirection</a> will be used.
widgetSetDirection :: WidgetClass self => self -> TextDirection -> IO ()

-- | Gets the reading direction for a particular widget. See
--   <a>widgetSetDirection</a>.
widgetGetDirection :: WidgetClass self => self -> IO TextDirection

-- | Sets the default reading direction for widgets where the direction has
--   not been explicitly set by <a>widgetSetDirection</a>.
widgetSetDefaultDirection :: TextDirection -> IO ()

-- | Obtains the current default reading direction. See
--   <a>widgetSetDefaultDirection</a>.
widgetGetDefaultDirection :: IO TextDirection

-- | Sets a shape for this widget's <a>DrawWindow</a>. This allows for
--   transparent windows etc., see <tt>windowShapeCombineMask</tt> for more
--   information.
widgetShapeCombineMask :: WidgetClass self => self -> Maybe Bitmap -> Int -> Int -> IO ()

-- | Sets an input shape for this widget's GDK window. This allows for
--   windows which react to mouse click in a nonrectangular region, see
--   <tt>windowInputShapeCombineMask</tt> for more information.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
widgetInputShapeCombineMask :: WidgetClass self => self -> Maybe Bitmap -> Int -> Int -> IO ()

-- | Create a <a>Pixmap</a> 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 <tt>pixbufGetFromDrawable</tt> 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
--   <tt>clipRect</tt>. The (x,y) coordinates of <tt>clipRect</tt> are
--   interpreted widget relative. If width or height of <tt>clipRect</tt>
--   are 0 or negative, the width or height of the resulting pixmap will be
--   shrunken by the respective amount. For instance a <tt>clipRect</tt> {
--   +5, +5, -10, -10 } will chop off 5 pixels at each side of the snapshot
--   pixmap. <tt>clipRect</tt> will contain the exact widget-relative
--   snapshot coordinates upon return. A <tt>clipRect</tt> of { -1, -1, 0,
--   0 } can be used to preserve the auto-grown snapshot area and use
--   <tt>clipRect</tt> as a pure output parameter.
--   
--   The returned pixmap can be <a>Nothing</a>, if the resulting
--   <tt>clipArea</tt> was empty.
widgetGetSnapshot :: WidgetClass self => self -> Rectangle -> IO (Maybe Pixmap)

-- | Obtains the full path to <tt>widget</tt>. The path is simply the name
--   of a widget and all its parents in the container hierarchy, separated
--   by periods. The name of a widget comes from <a>widgetGetName</a>.
--   Paths are used to apply styles to a widget in gtkrc configuration
--   files. Widget names are the type of the widget by default (e.g.
--   "GtkButton") or can be set to an application-specific value with
--   <a>widgetSetName</a>. By setting the name of a widget, you allow users
--   or theme authors to apply styles to that specific widget in their
--   gtkrc file. Also returns the path in reverse order, i.e. starting with
--   the widget's name instead of starting with the name of the widget's
--   outermost ancestor.
widgetPath :: (WidgetClass self, GlibString string) => self -> IO (Int, string, string)

-- | Same as <a>widgetPath</a>, but always uses the name of a widget's
--   type, never uses a custom name set with <a>widgetSetName</a>.
widgetClassPath :: (WidgetClass self, GlibString string) => self -> IO (Int, string, string)

-- | Obtains the composite name of a widget.
widgetGetCompositeName :: (WidgetClass self, GlibString string) => self -> IO (Maybe string)

-- | Modifies style values on the widget. Modifications made using this
--   technique take precedence over style values set via an RC file,
--   however, they will be overriden if a style is explicitely set on the
--   widget using <a>widgetSetStyle</a>. The <a>RcStyle</a> structure is
--   designed so each field can either be set or unset, so it is possible,
--   using this function, to modify some style values and leave the others
--   unchanged.
--   
--   Note that modifications made with this function are not cumulative
--   with previous calls to <a>widgetModifyStyle</a> or with such functions
--   as <a>widgetModifyFg</a>. If you wish to retain previous values, you
--   must first call <a>widgetGetModifierStyle</a>, make your modifications
--   to the returned style, then call <a>widgetModifyStyle</a> with that
--   style. On the other hand, if you first call <a>widgetModifyStyle</a>,
--   subsequent calls to such functions <a>widgetModifyFg</a> will have a
--   cumulative effect with the initial modifications.
widgetModifyStyle :: (WidgetClass self, RcStyleClass style) => self -> style -> IO ()

-- | Returns the current modifier style for the widget. (As set by
--   <a>widgetModifyStyle</a>.) If no style has previously set, a new
--   <a>RcStyle</a> will be created with all values unset, and set as the
--   modifier style for the widget. If you make changes to this rc style,
--   you must call <a>widgetModifyStyle</a>, passing in the returned rc
--   style, to make sure that your changes take effect.
--   
--   Caution: passing the style back to <a>widgetModifyStyle</a> will
--   normally end up destroying it, because <a>widgetModifyStyle</a> copies
--   the passed-in style and sets the copy as the new modifier style, thus
--   dropping any reference to the old modifier styl e. Add a reference to
--   the modifier style if you want to keep it alive.
widgetGetModifierStyle :: WidgetClass self => self -> IO RcStyle

-- | Sets the foreground color for a widget in a particular state. All
--   other style values are left untouched. See also
--   <a>widgetModifyStyle</a>.
widgetModifyFg :: WidgetClass self => self -> StateType -> Color -> IO ()

-- | Sets the background color for a widget in a particular state. All
--   other style values are left untouched. See also
--   <a>widgetModifyStyle</a>.
--   
--   Note that "no window" widgets (which have the <tt>NoWindow</tt> flag
--   set) draw on their parent container's window and thus may not draw any
--   background themselves. This is the case for e.g. <a>Label</a>. To
--   modify the background of such widgets, you have to set the background
--   color on their parent; if you want to set the background of a
--   rectangular area around a label, try placing the label in a
--   <a>EventBox</a> widget and setting the background color on that.
widgetModifyBg :: WidgetClass self => self -> StateType -> Color -> IO ()

-- | Sets the text color for a widget in a particular state. All other
--   style values are left untouched. The text color is the foreground
--   color used along with the base color (see <a>widgetModifyBase</a>) for
--   widgets such as <a>Entry</a> and <a>TextView</a>. See also
--   <a>widgetModifyStyle</a>.
widgetModifyText :: WidgetClass self => self -> StateType -> Color -> IO ()

-- | Sets the base color for a widget in a particular state. All other
--   style values are left untouched. The base color is the background
--   color used along with the text color (see <a>widgetModifyText</a>) for
--   widgets such as <a>Entry</a> and <a>TextView</a>. See also
--   <a>widgetModifyStyle</a>.
--   
--   Note that "no window" widgets (which have the <tt>NoWindow</tt> flag
--   set) draw on their parent container's window and thus may not draw any
--   background themselves. This is the case for e.g. <a>Label</a>. To
--   modify the background of such widgets, you have to set the base color
--   on their parent; if you want to set the background of a rectangular
--   area around a label, try placing the label in a <a>EventBox</a> widget
--   and setting the base color on that.
widgetModifyBase :: WidgetClass self => self -> StateType -> Color -> IO ()

-- | Sets the font to use for a widget. All other style values are left
--   untouched. See also <a>widgetModifyStyle</a>.
widgetModifyFont :: WidgetClass self => self -> Maybe FontDescription -> IO ()

-- | Restores the foreground color for a widget in a particular state. This
--   undoes the effects of previous calls to <a>widgetModifyFg</a>.
widgetRestoreFg :: WidgetClass self => self -> StateType -> IO ()

-- | Restores the background color for a widget in a particular state. This
--   undoes the effects of previous calls to <a>widgetModifyBg</a>.
widgetRestoreBg :: WidgetClass self => self -> StateType -> IO ()

-- | Restores the text color for a widget in a particular state. This
--   undoes the effects of previous calls to <a>widgetModifyText</a>.
widgetRestoreText :: WidgetClass self => self -> StateType -> IO ()

-- | Restores the base color for a widget in a particular state. This
--   undoes the effects of previous calls to widgetModifyBase.
widgetRestoreBase :: WidgetClass self => self -> StateType -> IO ()

-- | Creates a new <a>PangoContext</a> with the appropriate colormap, font
--   description, and base direction for drawing text for this widget. See
--   also <a>widgetGetPangoContext</a>.
widgetCreatePangoContext :: WidgetClass self => self -> IO PangoContext

-- | Gets a <a>PangoContext</a> with the appropriate font description and
--   base direction for this widget. Unlike the context returned by
--   <a>widgetCreatePangoContext</a>, this context is owned by the widget
--   (it can be used until the screen for the widget changes or the widget
--   is removed from its toplevel), and will be updated to match any
--   changes to the widget's attributes.
--   
--   If you create and keep a <a>PangoLayout</a> using this context, you
--   must deal with changes to the context by calling
--   <tt>layoutContextChanged</tt> on the layout in response to the
--   <tt>onStyleChanged</tt> and <a>onDirectionChanged</a> signals for the
--   widget.
widgetGetPangoContext :: WidgetClass self => self -> IO PangoContext

-- | Prepare text for display.
--   
--   The <a>PangoLayout</a> represents the rendered text. It can be shown
--   on screen by calling <tt>drawLayout</tt>.
--   
--   The returned <a>PangoLayout</a> shares the same font information
--   (<a>PangoContext</a>) as this widget. If this information changes, the
--   <a>PangoLayout</a> should change. The following code ensures that the
--   displayed text always reflects the widget's settings:
--   
--   <pre>
--   l &lt;- widgetCreateLayout w "My Text."
--   let update = do
--   layoutContextChanged l
--   -- update the Drawables which show this layout
--   w `onDirectionChanged` update
--   w `onStyleChanged` update
--   </pre>
widgetCreateLayout :: (WidgetClass self, GlibString string) => self -> string -> IO PangoLayout

-- | A convenience function that uses the theme engine and RC file settings
--   for <tt>widget</tt> to look up the stock icon and render it to a
--   <a>Pixbuf</a>. The icon should be one of the stock id constants such
--   as <a>stockOpen</a>. <tt>size</tt> should be a size such as
--   <a>IconSizeMenu</a>. <tt>detail</tt> should be a string that
--   identifies the widget or code doing the rendering, so that theme
--   engines can special-case rendering for that widget or code.
--   
--   The pixels in the returned <a>Pixbuf</a> are shared with the rest of
--   the application and should not be modified.
widgetRenderIcon :: (WidgetClass self, GlibString string) => self -> string -> IconSize -> string -> IO (Maybe Pixbuf)

-- | Invalidates the rectangular area of <tt>widget</tt> defined by
--   <tt>x</tt>, <tt>y</tt>, <tt>width</tt> and <tt>height</tt> by calling
--   <a>drawWindowInvalidateRect</a> on the widget's <a>DrawWindow</a> and
--   all its child windows. Once the main loop becomes idle (after the
--   current batch of events has been processed, roughly), the window will
--   receive expose events for the union of all regions that have been
--   invalidated.
--   
--   Normally you would only use this function in widget implementations.
--   In particular, you might use it, or <a>drawWindowInvalidateRect</a>
--   directly, to schedule a redraw of a <a>DrawingArea</a> or some portion
--   thereof.
--   
--   Frequently you can just call <a>windowInvalidateRect</a> or
--   <a>windowInvalidateRegion</a> instead of this function. Those
--   functions will invalidate only a single window, instead of the widget
--   and all its children.
--   
--   The advantage of adding to the invalidated region compared to simply
--   drawing immediately is efficiency; using an invalid region ensures
--   that you only have to redraw one time.
widgetQueueDrawArea :: WidgetClass self => self -> Int -> Int -> Int -> Int -> IO ()

-- | Recursively resets the shape on this widget and its descendants.
widgetResetShapes :: WidgetClass self => self -> IO ()

-- | Sets whether the application intends to draw on the widget in response
--   to an <a>onExpose</a> signal.
--   
--   <ul>
--   <li>This is a hint to the widget and does not affect the behavior of
--   the GTK+ core; many widgets ignore this flag entirely. For widgets
--   that do pay attention to the flag, such as <a>EventBox</a> and
--   <a>Window</a>, the effect is to suppress default themed drawing of the
--   widget's background. (Children of the widget will still be drawn.) The
--   application is then entirely responsible for drawing the widget
--   background.</li>
--   </ul>
widgetSetAppPaintable :: WidgetClass self => self -> Bool -> IO ()

-- | Widgets are double buffered by default; you can use this function to
--   turn off the buffering. "Double buffered" simply means that
--   <a>drawWindowBeginPaintRegion</a> and <a>drawWindowEndPaint</a> are
--   called automatically around expose events sent to the widget.
--   <a>drawWindowBeginPaintRegion</a> diverts all drawing to a widget's
--   window to an offscreen buffer, and <a>drawWindowEndPaint</a> draws the
--   buffer to the screen. The result is that users see the window update
--   in one smooth step, and don't see individual graphics primitives being
--   rendered.
--   
--   In very simple terms, double buffered widgets don't flicker, so you
--   would only use this function to turn off double buffering if you had
--   special needs and really knew what you were doing.
--   
--   Note: if you turn off double-buffering, you have to handle expose
--   events, since even the clearing to the background color or pixmap will
--   not happen automatically (as it is done in
--   <a>drawWindowBeginPaint</a>).
widgetSetDoubleBuffered :: WidgetClass self => self -> Bool -> IO ()

-- | Sets whether the entire widget is queued for drawing when its size
--   allocation changes. By default, this setting is <tt>True</tt> and the
--   entire widget is redrawn on every size change. If your widget leaves
--   the upper left unchanged when made bigger, turning this setting on
--   will improve performance.
--   
--   Note that for "no window" widgets setting this flag to <tt>False</tt>
--   turns off all allocation on resizing: the widget will not even redraw
--   if its position changes; this is to allow containers that don't draw
--   anything to avoid excess invalidations. If you set this flag on a "no
--   window" widget that <i>does</i> draw its window, you are responsible
--   for invalidating both the old and new allocation of the widget when
--   the widget is moved and responsible for invalidating regions newly
--   when the widget increases size.
widgetSetRedrawOnAllocate :: WidgetClass self => self -> Bool -> IO ()

-- | Sets a widgets composite name. A child widget of a container is
--   composite if it serves as an internal widget and, thus, is not added
--   by the user.
widgetSetCompositeName :: (WidgetClass self, GlibString string) => self -> string -> IO ()

-- | Emits the “mnemonic-activate” signal.
--   
--   The default handler for this signal activates the widget if
--   groupCycling is <tt>False</tt>, and just grabs the focus if
--   <tt>groupCycling</tt> is <tt>True</tt>.
widgetMnemonicActivate :: WidgetClass self => self -> Bool -> IO Bool

-- | For widgets that support scrolling, sets the scroll adjustments and
--   returns <tt>True</tt>. For widgets that don't support scrolling, does
--   nothing and returns <tt>False</tt>. Widgets that don't support
--   scrolling can be scrolled by placing them in a <a>Viewport</a>, which
--   does support scrolling.
--   
--   Removed in Gtk3.
widgetSetScrollAdjustments :: WidgetClass self => self -> Maybe Adjustment -> Maybe Adjustment -> IO Bool

-- | Computes the intersection of a widget's area and <tt>region</tt>,
--   returning the intersection. The result may be empty, use
--   <a>regionEmpty</a> to check.
widgetRegionIntersect :: WidgetClass self => self -> Region -> IO Region

-- | Returns the accessible object that describes the widget to an
--   assistive technology.
--   
--   If no accessibility library is loaded (i.e. no ATK implementation
--   library is loaded via GTK_MODULES or via another application library,
--   such as libgnome), then this <a>Object</a> instance may be a no-op.
--   Likewise, if no class-specific <a>Object</a> implementation is
--   available for the widget instance in question, it will inherit an
--   <a>Object</a> implementation from the first ancestor class for which
--   such an implementation is defined.
--   
--   The documentation of the ATK library contains more information about
--   accessible objects and their uses.
--   
--   Returns a GObject in Gtk3.
widgetGetAccessible :: WidgetClass self => self -> IO Object

-- | This function is used by custom widget implementations; if you're
--   writing an app, you'd use <a>widgetGrabFocus</a> to move the focus to
--   a particular widget, and <tt>containerSetFocusChain</tt> to change the
--   focus tab order. So you may want to investigate those functions
--   instead.
--   
--   The "focus" default handler for a widget should return <tt>True</tt>
--   if moving in <tt>direction</tt> left the focus on a focusable location
--   inside that widget, and <tt>False</tt> if moving in <tt>direction</tt>
--   moved the focus outside the widget. If returning <tt>True</tt>,
--   widgets normally call <a>widgetGrabFocus</a> to place the focus
--   accordingly; if returning <tt>False</tt>, they don't modify the
--   current focus location.
widgetChildFocus :: WidgetClass self => self -> DirectionType -> IO Bool

-- | Gets the value set with <a>widgetSetChildVisible</a>. If you feel a
--   need to use this function, your code probably needs reorganization.
--   
--   This function is only useful for container implementations and never
--   should be called by an application.
widgetGetChildVisible :: WidgetClass self => self -> IO Bool

-- | Returns the parent container of <tt>widget</tt>.
--   
--   <ul>
--   <li>Returns the parent container of <tt>widget</tt> if it has
--   one.</li>
--   </ul>
widgetGetParent :: WidgetClass self => self -> IO (Maybe Widget)

-- | Gets the settings object holding the settings (global property
--   settings, RC file information, etc) used for this widget.
--   
--   Note that this function can only be called when the <a>Widget</a> is
--   attached to a toplevel, since the settings object is specific to a
--   particular <a>Screen</a>.
widgetGetSettings :: WidgetClass self => self -> IO Settings

-- | Returns the clipboard object for the given selection to be used with
--   widget. widget must have a <a>Display</a> associated with it, so must
--   be attached to a toplevel window.
widgetGetClipboard :: WidgetClass self => self -> SelectionTag -> IO Clipboard

-- | Get the <a>Display</a> for the toplevel window associated with this
--   widget. This function can only be called after the widget has been
--   added to a widget hierarchy with a <a>Window</a> at the top.
--   
--   In general, you should only create display specific resources when a
--   widget has been realized, and you should free those resources when the
--   widget is unrealized.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
widgetGetDisplay :: WidgetClass self => self -> IO Display

-- | Get the root window where this widget is located. This function can
--   only be called after the widget has been added to a widget heirarchy
--   with <a>Window</a> at the top.
--   
--   The root window is useful for such purposes as creating a popup
--   <a>DrawWindow</a> associated with the window. In general, you should
--   only create display specific resources when a widget has been
--   realized, and you should free those resources when the widget is
--   unrealized.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
widgetGetRootWindow :: WidgetClass self => self -> IO DrawWindow

-- | Get the <a>Screen</a> from the toplevel window associated with this
--   widget. This function can only be called after the widget has been
--   added to a widget hierarchy with a <a>Window</a> at the top.
--   
--   In general, you should only create screen specific resources when a
--   widget has been realized, and you should free those resources when the
--   widget is unrealized.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
widgetGetScreen :: WidgetClass self => self -> IO Screen

-- | Checks whether there is a <a>Screen</a> is associated with this
--   widget. All toplevel widgets have an associated screen, and all
--   widgets added into a heirarchy with a toplevel window at the top.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.2</li>
--   </ul>
widgetHasScreen :: WidgetClass self => self -> IO Bool

-- | Gets the size request that was explicitly set for the widget using
--   <a>widgetSetSizeRequest</a>. A value of -1 for <tt>width</tt> or
--   <tt>height</tt> indicates that that dimension has not been set
--   explicitly and the natural requisition of the widget will be used
--   intead. See <a>widgetSetSizeRequest</a>. To get the size a widget will
--   actually use, call <a>widgetSizeRequest</a> instead of this function.
widgetGetSizeRequest :: WidgetClass self => self -> IO (Int, Int)

-- | Sets whether <tt>widget</tt> should be mapped along with its when its
--   parent is mapped and <tt>widget</tt> has been shown with
--   <a>widgetShow</a>.
--   
--   The child visibility can be set for widget before it is added to a
--   container with <tt>widgetSetParent</tt>, to avoid mapping children
--   unnecessary before immediately unmapping them. However it will be
--   reset to its default state of <tt>True</tt> when the widget is removed
--   from a container.
--   
--   Note that changing the child visibility of a widget does not queue a
--   resize on the widget. Most of the time, the size of a widget is
--   computed from all visible children, whether or not they are mapped. If
--   this is not the case, the container can queue a resize itself.
--   
--   This function is only useful for container implementations and never
--   should be called by an application.
widgetSetChildVisible :: WidgetClass self => self -> Bool -> IO ()

-- | Sets the minimum size of a widget; that is, the widget's size request
--   will be <tt>width</tt> by <tt>height</tt>. You can use this function
--   to force a widget to be either larger or smaller than it normally
--   would be.
--   
--   In most cases, <a>windowSetDefaultSize</a> is a better choice for
--   toplevel windows than this function; setting the default size will
--   still allow users to shrink the window. Setting the size request will
--   force them to leave the window at least as large as the size request.
--   When dealing with window sizes, <a>windowSetGeometryHints</a> can be a
--   useful function as well.
--   
--   Note the inherent danger of setting any fixed size - themes,
--   translations into other languages, different fonts, and user action
--   can all change the appropriate size for a given widget. So, it's
--   basically impossible to hardcode a size that will always be correct.
--   
--   The size request of a widget is the smallest size a widget can accept
--   while still functioning well and drawing itself correctly. However in
--   some strange cases a widget may be allocated less than its requested
--   size, and in many cases a widget may be allocated more space than it
--   requested.
--   
--   If the size request in a given direction is -1 (unset), then the
--   "natural" size request of the widget will be used instead.
--   
--   Widgets can't actually be allocated a size less than 1 by 1, but you
--   can pass 0,0 to this function to mean "as small as possible."
widgetSetSizeRequest :: WidgetClass self => self -> Int -> Int -> IO ()

-- | Sets the <tt>noShowAll</tt> property, which determines whether calls
--   to <a>widgetShowAll</a> and <a>widgetHideAll</a> will affect this
--   widget.
--   
--   This is mostly for use in constructing widget hierarchies with
--   externally controlled visibility, see <a>UIManager</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
widgetSetNoShowAll :: WidgetClass self => self -> Bool -> IO ()

-- | Returns the current value of the <tt>noShowAll</tt> property, which
--   determines whether calls to <a>widgetShowAll</a> and
--   <a>widgetHideAll</a> will affect this widget.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
widgetGetNoShowAll :: WidgetClass self => self -> IO Bool

-- | Returns a list of the widgets, normally labels, for which this widget
--   is a the target of a mnemonic (see for example,
--   <tt>labelSetMnemonicWidget</tt>).
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
widgetListMnemonicLabels :: WidgetClass self => self -> IO [Widget]

-- | Adds a widget to the list of mnemonic labels for this widget. (See
--   <a>widgetListMnemonicLabels</a>). Note the list of mnemonic labels for
--   the widget is cleared when the widget is destroyed, so the caller must
--   make sure to update its internal state at this point as well, by using
--   a connection to the <tt>destroy</tt> signal or a weak notifier.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
widgetAddMnemonicLabel :: (WidgetClass self, WidgetClass label) => self -> label -> IO ()

-- | Removes a widget from the list of mnemonic labels for this widget.
--   (See <a>widgetListMnemonicLabels</a>). The widget must have previously
--   been added to the list with <a>widgetAddMnemonicLabel</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
widgetRemoveMnemonicLabel :: (WidgetClass self, WidgetClass label) => self -> label -> IO ()

-- | Returns the <a>Action</a> that <tt>widget</tt> is a proxy for. See
--   also <tt>actionGetProxies</tt>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
--   
--   Removed in Gtk3.
widgetGetAction :: WidgetClass self => self -> IO (Maybe Action)

-- | Whether <tt>widget</tt> can rely on having its alpha channel drawn
--   correctly. On X11 this function returns whether a compositing manager
--   is running for <tt>widget</tt>'s screen
--   
--   <ul>
--   <li>Available since Gtk+ version 2.10</li>
--   </ul>
widgetIsComposited :: WidgetClass self => self -> IO Bool

-- | Notifies the user about an input-related error on this widget. If the
--   "gtk-error-bell" setting is <tt>True</tt>, it calls
--   <tt>drawWindowBeep</tt>, otherwise it does nothing.
--   
--   Note that the effect of <tt>drawWindow_beep</tt> 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 ()

-- | This function should be called whenever keyboard navigation within a
--   single widget hits a boundary. The function emits the "keynav-failed"
--   signal on the widget and its return value should be interpreted in a
--   way similar to the return value of <a>widgetChildFocus</a>:
--   
--   When <tt>True</tt> is returned, stay in the widget, the failed
--   keyboard navigation is Ok and<i>or there is nowhere we can</i>should
--   move the focus to.
--   
--   When <tt>False</tt> is returned, the caller should continue with
--   keyboard navigation outside the widget, e.g. by calling
--   <a>widgetChildFocus</a> on the widget’s toplevel.
--   
--   The default ::keynav-failed handler returns <tt>True</tt> for
--   <a>DirTabForward</a> and <a>DirTabBackward</a>. For the other values
--   of <a>DirectionType</a> it returns <tt>False</tt>.
--   
--   Whenever the default handler returns <tt>True</tt>, it also calls
--   <a>widgetErrorBell</a> to notify the user of the failed keyboard
--   navigation.
--   
--   A use case for providing an own implementation of ::keynav-failed
--   (either by connecting to it or by overriding it) would be a row of
--   <a>Entry</a> 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 -> IO Bool

-- | Gets the contents of the tooltip for widget.
widgetGetTooltipMarkup :: (WidgetClass self, GlibString markup) => self -> IO (Maybe markup)

-- | Sets <tt>markup</tt> as the contents of the tooltip, which is marked
--   up with the Pango text markup language.
--   
--   This function will take care of setting "has-tooltip" to True and of
--   the default handler for the "query-tooltip" signal.
--   
--   See also the "tooltip-markup" property and <tt>tooltipSetMarkup</tt>.
widgetSetTooltipMarkup :: (WidgetClass self, GlibString markup) => self -> Maybe markup -> IO ()

-- | Gets the contents of the tooltip for widget.
widgetGetTooltipText :: (WidgetClass self, GlibString text) => self -> IO (Maybe text)

-- | Sets <tt>text</tt> as the contents of the tooltip. This function will
--   take care of setting "has-tooltip" to <tt>True</tt> and of the default
--   handler for the "query-tooltip" signal.
--   
--   See also the "tooltip-text" property and <tt>tooltipSetText</tt>.
widgetSetTooltipText :: (WidgetClass widget, GlibString text) => widget -> Maybe text -> IO ()

-- | Returns the <a>Window</a> of the current tooltip. This can be the
--   <a>Window</a> created by default, or the custom tooltip window set
--   using <a>widgetSetTooltipWindow</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
widgetGetTooltipWindow :: WidgetClass self => self -> IO Window

-- | Replaces the default, usually yellow, window used for displaying
--   tooltips with <tt>customWindow</tt>. GTK+ will take care of showing
--   and hiding <tt>customWindow</tt> at the right moment, to behave
--   likewise as the default tooltip window. If <tt>customWindow</tt> is
--   <a>Nothing</a>, the default tooltip window will be used.
--   
--   If the custom window should have the default theming it needs to have
--   the name 'gtk-tooltip', see <a>widgetSetName</a>.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
widgetSetTooltipWindow :: (WidgetClass self, WindowClass customWindow) => self -> Maybe customWindow -> IO ()

-- | Returns the current value of the has-tooltip property. See
--   <a>widgetHasTooltip</a> for more information.
widgetGetHasTooltip :: WidgetClass widget => widget -> IO Bool

-- | Sets the has-tooltip property on <tt>widget</tt> to
--   <tt>hasTooltip</tt>. See <a>widgetHasTooltip</a> for more information.
widgetSetHasTooltip :: WidgetClass widget => widget -> Bool -> IO ()

-- | Triggers a tooltip query on the display where the toplevel of
--   <tt>widget</tt> is located. See <tt>tooltipTriggerTooltipQuery</tt>
--   for more information.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
widgetTriggerTooltipQuery :: WidgetClass self => self -> IO ()

-- | Returns the widget's window if it is realized, Nothing otherwise
--   
--   <ul>
--   <li>Available since Gtk+ version 2.14</li>
--   </ul>
widgetGetWindow :: WidgetClass self => self -> IO (Maybe DrawWindow)

-- | Moves a widget from one <a>Container</a> to another.
widgetReparent :: (WidgetClass self, WidgetClass newParent) => self -> newParent -> IO ()

-- | Check if this widget can receive keyboard input.
widgetGetCanFocus :: WidgetClass self => self -> IO Bool

-- | Set if this widget can receive keyboard input.
--   
--   <ul>
--   <li>To use the <tt>keyPress</tt> event, the widget must be allowed to
--   get the input focus. Once it has the input focus all keyboard input is
--   directed to this widget.</li>
--   </ul>
widgetSetCanFocus :: WidgetClass self => self -> Bool -> IO ()

-- | Retrieves the widget's allocation.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.18</li>
--   </ul>
widgetGetAllocation :: WidgetClass self => self -> IO Allocation

-- | Determines whether the application intends to draw on the widget in an
--   "draw" handler. See <a>widgetSetAppPaintable</a>.
widgetGetAppPaintable :: WidgetClass widget => widget -> IO Bool

-- | Determines whether <tt>widget</tt> can be a default widget. See
--   <a>widgetSetCanDefault</a>.
widgetGetCanDefault :: WidgetClass widget => widget -> IO Bool

-- | Specifies whether <tt>widget</tt> can be a default widget. See
--   <a>widgetGrabDefault</a> for details about the meaning of "default".
widgetSetCanDefault :: WidgetClass widget => widget -> Bool -> IO ()

-- | Determines whether <tt>widget</tt> has a <a>DrawWindow</a> of its own.
--   See <a>widgetSetHasWindow</a>.
widgetGetHasWindow :: WidgetClass widget => widget -> IO Bool

-- | Specifies whether <tt>widget</tt> has a <a>DrawWindow</a> of its own.
--   Note that all realized widgets have a non-((void *)0) "window" pointer
--   (<a>widgetGetWindow</a> never returns a ((void *)0) window when a
--   widget is realized), but for many of them it's actually the
--   <a>DrawWindow</a> of one of its parent widgets. Widgets that do not
--   create a window for themselves in "realize" must announce this by
--   calling this function with <tt>hasWindow</tt> = <tt>False</tt>.
--   
--   This function should only be called by widget implementations, and
--   they should call it in their <tt>init()</tt> function.
widgetSetHasWindow :: WidgetClass widget => widget -> Bool -> IO ()

-- | Returns the <tt>widget</tt>’s sensitivity (in the sense of returning
--   the value that has been set using <a>widgetSetSensitive</a>).
--   
--   The effective sensitivity of a widget is however determined by both
--   its own and its parent widget’s sensitivity. See
--   <a>widgetIsSensitive</a>.
widgetGetSensitive :: WidgetClass widget => widget -> IO Bool

-- | Returns the widget’s effective sensitivity, which means it is
--   sensitive itself and also its parent widget is sensitive.
widgetIsSensitive :: WidgetClass widget => widget -> IO Bool

-- | Retrieve the current state of the widget.
--   
--   <ul>
--   <li>The state refers to different modes of user interaction, see
--   <a>StateType</a> for more information.</li>
--   </ul>
widgetGetState :: WidgetClass self => self -> IO StateType

-- | Determines whether the widget is visible. If you want to take into
--   account whether the widget’s parent is also marked as visible, use
--   <tt>widgetIsVisible</tt> instead.
--   
--   This function does not check if the widget is obscured in any way. See
--   <tt>widgetSetVisible</tt>.
widgetGetVisible :: WidgetClass widget => widget -> IO Bool

-- | Determines whether <tt>widget</tt> is the current default widget
--   within its toplevel. See <a>widgetSetCanDefault</a>.
widgetGetHasDefault :: WidgetClass widget => widget -> IO Bool

-- | Determines if the <tt>widget</tt> has the global input focus. See
--   <a>widgetIsFocus</a> for the difference between having the global
--   input focus, and only having the focus within a toplevel.
widgetGetHasFocus :: WidgetClass widget => widget -> IO Bool

-- | Determines whether the widget is currently grabbing events, so it is
--   the only widget receiving input events (keyboard and mouse).
--   
--   See also <tt>grabAdd</tt>.
widgetHasGrab :: WidgetClass widget => widget -> IO Bool

-- | Determines whether <tt>widget</tt> can be drawn to. A widget can be
--   drawn to if it is mapped and visible.
widgetIsDrawable :: WidgetClass widget => widget -> IO Bool

-- | Determines whether <tt>widget</tt> is a toplevel widget.
--   
--   Currently only <a>Window</a> and <a>Invisible</a> (and out-of-process
--   <tt>Plugs</tt>) are toplevel widgets. Toplevel widgets have no parent
--   widget.
widgetIsToplevel :: WidgetClass widget => widget -> IO Bool

-- | Sets a widget’s window. This function should only be used in a
--   widget’s “realize” implementation. The window passed is usually either
--   new window created with <tt>drawWindowNew</tt>, or the window of its
--   parent widget as returned by <a>widgetGetParentWindow</a>.
--   
--   Widgets must indicate whether they will create their own
--   <a>DrawWindow</a> by calling <a>widgetSetHasWindow</a>. This is
--   usually done in the widget’s init() function.
--   
--   Note that this function does not add any reference to window.
widgetSetWindow :: (WidgetClass widget, DrawWindowClass window) => widget -> window -> IO ()

-- | Specifies whether <tt>widget</tt> will be treated as the default
--   widget within its toplevel when it has the focus, even if another
--   widget is the default.
--   
--   See <a>widgetGrabDefault</a> for details about the meaning of
--   “default”.
widgetSetReceivesDefault :: WidgetClass widget => widget -> Bool -> IO ()

-- | Determines whether <tt>widget</tt> is always treated as the default
--   widget within its toplevel when it has the focus, even if another
--   widget is the default.
--   
--   See <a>widgetSetReceivesDefault</a>.
widgetGetReceivesDefault :: WidgetClass widget => widget -> IO Bool

-- | This function is for use in widget implementations. Sets the state of
--   a widget (insensitive, prelighted, etc.) Usually you should set the
--   state using wrapper functions such as <a>widgetSetSensitive</a>.
widgetSetState :: WidgetClass self => self -> StateType -> IO ()

-- | Retrieve the current state of the widget.
--   
--   <ul>
--   <li>If a widget is turned insensitive, the previous state is stored in
--   a specific location. This function retrieves this previous state.</li>
--   </ul>
--   
--   Removed in Gtk3.
widgetGetSavedState :: WidgetClass w => w -> IO StateType

-- | Returns the current size.
--   
--   <ul>
--   <li>This information may be out of date if the user is resizing the
--   window.</li>
--   </ul>
--   
--   Removed in Gtk3.
widgetGetSize :: WidgetClass widget => widget -> IO (Int, Int)

-- | Rarely-used function. This function is used to emit the event signals
--   on a widget (those signals should never be emitted without using this
--   function to do so). If you want to synthesize an event though, don't
--   use this function; instead, use <tt>mainDoEvent</tt> so the event will
--   behave as if it were in the event queue. Don't synthesize expose
--   events; instead, use <tt>windowInvalidateRect</tt> to invalidate a
--   region of the window.
widgetEvent :: WidgetClass self => self -> EventM t Bool

-- | The name of the widget.
--   
--   Default value: <tt>Nothing</tt>
widgetName :: (WidgetClass self, GlibString string) => Attr self (Maybe string)

-- | The parent widget of this widget. Must be a Container widget.
widgetParent :: (WidgetClass self, ContainerClass container) => ReadWriteAttr self (Maybe Container) (Maybe container)

-- | Override for width request of the widget, or -1 if natural request
--   should be used.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
widgetWidthRequest :: WidgetClass self => Attr self Int

-- | Override for height request of the widget, or -1 if natural request
--   should be used.
--   
--   Allowed values: &gt;= -1
--   
--   Default value: -1
widgetHeightRequest :: WidgetClass self => Attr self Int
widgetMarginLeft :: WidgetClass self => Attr self Int
widgetMarginRight :: WidgetClass self => Attr self Int
widgetMarginTop :: WidgetClass self => Attr self Int
widgetMarginBottom :: WidgetClass self => Attr self Int

-- | Whether the widget is visible.
--   
--   Default value: <tt>False</tt>
widgetVisible :: WidgetClass self => Attr self Bool

-- | The opacity of the widget
--   
--   Default value: <tt>1.0</tt>
widgetOpacity :: WidgetClass self => Attr self Double

-- | Whether the widget responds to input.
--   
--   Default value: <tt>True</tt>
widgetSensitive :: WidgetClass self => Attr self Bool

-- | Whether the application will paint directly on the widget.
--   
--   Default value: <tt>False</tt>
widgetAppPaintable :: WidgetClass self => Attr self Bool

-- | Whether the widget can accept the input focus.
--   
--   Default value: <tt>False</tt>
widgetCanFocus :: WidgetClass self => Attr self Bool

-- | Whether the widget has the input focus.
--   
--   Default value: <tt>False</tt>
widgetHasFocus :: WidgetClass self => Attr self Bool

-- | Whether the widget is the focus widget within the toplevel.
--   
--   Default value: <tt>False</tt>
widgetIsFocus :: WidgetClass self => Attr self Bool

-- | Whether the widget can be the default widget.
--   
--   Default value: <tt>False</tt>
widgetCanDefault :: WidgetClass self => Attr self Bool

-- | Whether the widget is the default widget.
--   
--   Default value: <tt>False</tt>
widgetHasDefault :: WidgetClass self => Attr self Bool

-- | If <tt>True</tt>, the widget will receive the default action when it
--   is focused.
--   
--   Default value: <tt>False</tt>
widgetReceivesDefault :: WidgetClass self => Attr self Bool

-- | Whether the widget is part of a composite widget.
--   
--   Default value: <tt>False</tt>
widgetCompositeChild :: WidgetClass self => ReadAttr self Bool

-- | The style of the widget, which contains information about how it will
--   look (colors etc).
widgetStyle :: WidgetClass self => Attr self Style

-- | The current visual user interaction state of the widget (insensitive,
--   prelighted, selected etc). See <a>StateType</a> for more information.
widgetState :: WidgetClass self => Attr self StateType

-- | The event mask that decides what kind of GdkEvents this widget gets.
--   
--   Default value: <a>StructureMask</a>
widgetEvents :: WidgetClass self => Attr self [EventMask]

-- | The mask that decides what kind of extension events this widget gets.
--   
--   Default value: <a>ExtensionEventsNone</a>
--   
--   Removed in Gtk3.
widgetExtensionEvents :: WidgetClass self => Attr self [ExtensionMode]

-- | Whether to expand in both directions. Setting this sets both
--   <a>widgetHExpand</a> and <a>widgetVExpand</a>
--   
--   Default value: <tt>False</tt>
widgetExpand :: WidgetClass self => Attr self Bool

-- | Whether to expand horizontally. See <tt>widgetSetHExpand</tt>
--   
--   Default value: <tt>False</tt>
widgetHExpand :: WidgetClass self => Attr self Bool

-- | Whether to use the “hexpand” property. See
--   <tt>widgetGetHExpandSet</tt>.
--   
--   Default value: <tt>False</tt>
widgetHExpandSet :: WidgetClass self => Attr self Bool

-- | Whether to expand vertically. See <tt>widgetSetVExpand</tt>.
--   
--   Default value: <tt>False</tt>
widgetVExpand :: WidgetClass self => Attr self Bool

-- | Whether to use the “vexpand” property. See
--   <tt>widgetGetVExpandSet</tt>.
--   
--   Default value: <tt>False</tt>
widgetVExpandSet :: WidgetClass self => Attr self Bool

-- | Whether <a>widgetShowAll</a> should not affect this widget.
--   
--   Default value: <tt>False</tt>
widgetNoShowAll :: WidgetClass self => Attr self Bool

-- | 'childVisible' property. See <a>widgetGetChildVisible</a> and
--   <a>widgetSetChildVisible</a>
widgetChildVisible :: WidgetClass self => Attr self Bool

-- | 'colormap' property. See <a>widgetGetColormap</a> and
--   <a>widgetSetColormap</a>
--   
--   Removed in Gtk3.
widgetColormap :: WidgetClass self => Attr self Colormap

-- | 'compositeName' property. See <a>widgetGetCompositeName</a> and
--   <a>widgetSetCompositeName</a>
widgetCompositeName :: (WidgetClass self, GlibString string) => ReadWriteAttr self (Maybe string) string

-- | 'direction' property. See <a>widgetGetDirection</a> and
--   <a>widgetSetDirection</a>
widgetDirection :: WidgetClass self => Attr self TextDirection

-- | Sets the text of tooltip to be the given string, which is marked up
--   with the Pango text markup language. Also see
--   <tt>tooltipSetMarkup</tt>.
--   
--   This is a convenience property which will take care of getting the
--   tooltip shown if the given string is not "": <tt>hasTooltip</tt> will
--   automatically be set to <a>True</a> and there will be taken care of
--   <a>queryTooltip</a> in the default signal handler.
--   
--   Default value: ""
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
widgetTooltipMarkup :: (WidgetClass self, GlibString markup) => Attr self (Maybe markup)

-- | Sets the text of tooltip to be the given string.
--   
--   Also see <tt>tooltipSetText</tt>.
--   
--   This is a convenience property which will take care of getting the
--   tooltip shown if the given string is not "": <tt>hasTooltip</tt> will
--   automatically be set to <a>True</a> and there will be taken care of
--   <a>queryTooltip</a> in the default signal handler.
--   
--   Default value: ""
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
widgetTooltipText :: (WidgetClass self, GlibString string) => Attr self (Maybe string)

-- | Enables or disables the emission of <a>queryTooltip</a> on widget. A
--   value of <a>True</a> indicates that widget can have a tooltip, in this
--   case the widget will be queried using <a>queryTooltip</a> to determine
--   whether it will provide a tooltip or not.
--   
--   Note that setting this property to <a>True</a> for the first time will
--   change the event masks of the <tt>Windows</tt> of this widget to
--   include leave-notify and motion-notify events. This cannot and will
--   not be undone when the property is set to <a>False</a> again.
--   
--   Default value: <a>False</a>
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
widgetHasTooltip :: WidgetClass self => Attr self Bool

-- | Determines if the widget style has been looked up through the rc
--   mechanism.
widgetHasRcStyle :: WidgetClass self => self -> IO Bool

-- | Determines whether widget is realized.
widgetGetRealized :: WidgetClass self => self -> IO Bool

-- | Whether the widget is mapped.
widgetGetMapped :: WidgetClass self => self -> IO Bool

-- | Marks the <tt>widget</tt> as being realized. This function must only
--   be called after all <tt>DrawWindows</tt> for the widget have been
--   created and registered.
--   
--   This function should only ever be called in a derived widget's
--   “realize” or “unrealize” implementation.
widgetSetRealized :: WidgetClass widget => widget -> Bool -> IO ()

-- | Marks the <tt>widget</tt> as being realized.
--   
--   This function should only ever be called in a derived widget's “map”
--   or “unmap” implementation.
widgetSetMapped :: WidgetClass widget => widget -> Bool -> IO ()

-- | The widget should allocate any resources needed, in particular, the
--   widget's <a>DrawWindow</a> is created. If you connect to this signal
--   and you rely on some of these resources to be present, you have to use
--   <a>after</a>.
realize :: WidgetClass self => Signal self (IO ())

-- | The widget should deallocate any resources. This signal is emitted
--   before the widget is destroyed.
unrealize :: WidgetClass self => Signal self (IO ())

-- | The widget appears on screen.
mapSignal :: WidgetClass self => Signal self (IO ())

-- | The widget disappears from the screen.
unmapSignal :: WidgetClass self => Signal self (IO ())

-- | Query the widget for the size it likes to have.
--   
--   <ul>
--   <li>A parent container emits this signal to its child to query the
--   needed height and width of the child. There is not guarantee that the
--   widget will actually get this area.</li>
--   </ul>
sizeRequest :: WidgetClass self => Signal self (IO Requisition)

-- | Inform widget about the size it has.
--   
--   <ul>
--   <li>After querying a widget for the size it wants to have (through
--   emitting the <tt>"sizeRequest"</tt> signal) a container will emit this
--   signal to inform the widget about the real size it should occupy.</li>
--   </ul>
sizeAllocate :: WidgetClass self => Signal self (Allocation -> IO ())

-- | The widget is shown.
showSignal :: WidgetClass self => Signal self (IO ())

-- | The widget is hidden.
hideSignal :: WidgetClass self => Signal self (IO ())

-- | The widget gains focus via the given user action.
focus :: WidgetClass self => Signal self (DirectionType -> IO Bool)

-- | The state of the widget (input focus, insensitive, etc.) has changed.
stateChanged :: WidgetClass self => Signal self (StateType -> IO ())

-- | The <a>parentSet</a> signal is emitted when a new parent has been set
--   on a widget. The parameter is the new parent.
parentSet :: WidgetClass self => Signal self (Maybe Widget -> IO ())

-- | Emitted when there is a change in the hierarchy to which a widget
--   belong. More precisely, a widget is anchored when its toplevel
--   ancestor is a <a>Window</a>. This signal is emitted when a widget
--   changes from un-anchored to anchored or vice-versa.
hierarchyChanged :: WidgetClass self => Signal self (Maybe Widget -> IO ())

-- | The <a>styleSet</a> signal is emitted when a new style has been set on
--   a widget. Note that style-modifying functions like
--   <a>widgetModifyBase</a> also cause this signal to be emitted.
styleSet :: WidgetClass self => Signal self (Style -> IO ())

-- | The default direction of text writing has changed.
directionChanged :: WidgetClass self => Signal self (TextDirection -> IO ())

-- | The <a>grabNotify</a> signal is emitted when a widget becomes shadowed
--   by a Gtk+ grab (not a pointer or keyboard grab) on another widget, or
--   when it becomes unshadowed due to a grab being removed.
--   
--   A widget is shadowed by a <tt>grabAdd</tt> when the topmost grab
--   widget in the grab stack of its window group is not its ancestor.
grabNotify :: WidgetClass self => Signal self (Bool -> IO ())

-- | This signal gets emitted whenever a widget should pop up a
--   context-sensitive menu. This usually happens through the standard key
--   binding mechanism; by pressing a certain key while a widget is
--   focused, the user can cause the widget to pop up a menu. For example,
--   the <a>Entry</a> widget creates a menu with clipboard commands.
popupMenuSignal :: WidgetClass self => Signal self (IO Bool)

-- | Tell the widget to show an explanatory help text. Should return
--   <tt>True</tt> if help has been shown.
showHelp :: WidgetClass self => Signal self (WidgetHelpType -> IO Bool)

-- | The set of keyboard accelerators has changed.
accelClosuresChanged :: WidgetClass self => Signal self (IO ())

-- | The widget moved to a new screen.
screenChanged :: WidgetClass self => Signal self (Screen -> IO ())

-- | Emitted when <tt>hasTooltip</tt> is <a>True</a> and the
--   <tt>gtkTooltipTimeout</tt> 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
--   <a>True</a> should be returned, <a>False</a> otherwise. Note if widget
--   got focus in keyboard mode, <a>Point</a> is <a>Nothing</a>.
--   
--   The signal handler is free to manipulate tooltip with the therefore
--   destined function calls.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
queryTooltip :: WidgetClass self => Signal self (Widget -> Maybe Point -> Tooltip -> IO Bool)

-- | A mouse button has been depressed while the mouse pointer was within
--   the widget area. Sets the widget's <a>ButtonPressMask</a> flag.
buttonPressEvent :: WidgetClass self => Signal self (EventM EButton Bool)

-- | A mouse button has been released. Sets the widget's
--   <a>ButtonReleaseMask</a> flag.
buttonReleaseEvent :: WidgetClass self => Signal self (EventM EButton Bool)

-- | The size of the window has changed.
configureEvent :: WidgetClass self => Signal self (EventM EConfigure Bool)

-- | The <a>deleteEvent</a> signal is emitted if a user requests that a
--   toplevel window is closed. The default handler for this signal
--   destroys the window. Calling <a>widgetHide</a> and returning
--   <tt>True</tt> on reception of this signal will cause the window to be
--   hidden instead, so that it can later be shown again without
--   reconstructing it.
deleteEvent :: WidgetClass self => Signal self (EventM EAny Bool)

-- | The <a>destroyEvent</a> signal is emitted when a <a>DrawWindow</a> is
--   destroyed. You rarely get this signal, because most widgets disconnect
--   themselves from their window before they destroy it, so no widget owns
--   the window at destroy time. However, you might want to connect to the
--   <tt>objectDestroy</tt> signal of <a>Object</a>.
destroyEvent :: WidgetClass self => Signal self (EventM EAny Bool)

-- | The mouse pointer has entered the widget. Sets the widget's
--   <a>EnterNotifyMask</a> flag.
enterNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)

-- | Instructs the widget to redraw.
--   
--   <ul>
--   <li>The <a>DrawWindow</a> that needs to be redrawn is available via
--   <tt>eventWindow</tt>.</li>
--   <li>The part that needs to be redrawn is available via
--   <a>eventArea</a> and <a>eventRegion</a>. The options are, in order of
--   efficiency: (a) redraw the entire window, (b) ask for the
--   <a>eventArea</a> and redraw that rectangle, (c) ask for the
--   <a>eventRegion</a> and redraw each of those rectangles.</li>
--   </ul>
--   
--   Only the exposed region will be updated; see also
--   <tt>drawWindowBeginPaintRegion</tt>.
exposeEvent :: WidgetClass self => Signal self (EventM EExpose Bool)

-- | The widget gets the input focus. Sets the widget's
--   <a>FocusChangeMask</a> flag.
focusInEvent :: WidgetClass self => Signal self (EventM EFocus Bool)

-- | The widget lost the input focus. Sets the widget's
--   <a>FocusChangeMask</a> flag.
focusOutEvent :: WidgetClass self => Signal self (EventM EFocus Bool)

-- | Emitted when a pointer or keyboard grab on a window belonging to
--   <tt>widget</tt> gets broken.
--   
--   On X11, this happens when the grab window becomes unviewable (i.e. it
--   or one of its ancestors is unmapped), or if the same application grabs
--   the pointer or keyboard again.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.8</li>
--   </ul>
grabBrokenEvent :: WidgetClass self => Signal self (EventM EGrabBroken Bool)

-- | A key has been depressed. Sets the widget's <a>KeyPressMask</a> flag.
keyPressEvent :: WidgetClass self => Signal self (EventM EKey Bool)

-- | A key has been released. Sets the widget's <a>KeyReleaseMask</a> flag.
keyReleaseEvent :: WidgetClass self => Signal self (EventM EKey Bool)

-- | The mouse pointer has left the widget. Sets the widget's
--   <a>LeaveNotifyMask</a> flag.
leaveNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)

-- | The window is put onto the screen.
mapEvent :: WidgetClass self => Signal self (EventM EAny Bool)

-- | The mouse pointer has moved. Since receiving all mouse movements is
--   expensive, it is necessary to specify exactly what mouse motions are
--   required by calling <a>widgetAddEvents</a> on this widget with one or
--   more of the following flags:
--   
--   <ul>
--   <li><a>PointerMotionMask</a>: Track all movements.</li>
--   <li><a>ButtonMotionMask</a>: Only track movements if a button is
--   depressed.</li>
--   <li><a>Button1MotionMask</a>: Only track movements if the left button
--   is depressed.</li>
--   <li><a>Button2MotionMask</a>: Only track movements if the middle
--   button is depressed.</li>
--   <li><a>Button3MotionMask</a>: Only track movements if the right button
--   is depressed. <a>PointerMotionHintMask</a> is a special flag which can
--   be used in combination with any of the above and is used to reduce the
--   number of <a>motionNotifyEvent</a>s received. Normally a
--   <a>motionNotifyEvent</a> event is received each time the mouse moves.
--   However, if the application spends a lot of time processing the event
--   (updating the display, for example), it can lag behind the position of
--   the mouse. When using <a>PointerMotionHintMask</a>, fewer
--   <a>motionNotifyEvent</a>s will be sent, some of which are marked as a
--   hint. To receive more motion events after a motion hint event, the
--   application needs to asks for more, by calling
--   <a>eventRequestMotions</a>. This effectively limits the rate at which
--   new motion events are received. (Note that you don't need to check if
--   the hint is set as <a>eventRequestMotions</a> does so
--   automatically.)</li>
--   </ul>
motionNotifyEvent :: WidgetClass self => Signal self (EventM EMotion Bool)

-- | Generated when the area of a <a>Drawable</a> being copied using, e.g.
--   <a>drawDrawable</a>, is completely available.
noExposeEvent :: WidgetClass self => Signal self (EventM EAny Bool)

-- | The pen of a graphics tablet was put down. Sets the widget's
--   <a>ProximityInMask</a> flag.
proximityInEvent :: WidgetClass self => Signal self (EventM EProximity Bool)

-- | The pen of a graphics tablet was lifted off the tablet. Sets the
--   widget's <a>ProximityOutMask</a> flag.
proximityOutEvent :: WidgetClass self => Signal self (EventM EProximity Bool)

-- | The scroll wheel of the mouse has been used. Sets the widget's
--   <a>ScrollMask</a> flag.
scrollEvent :: WidgetClass self => Signal self (EventM EScroll Bool)

-- | The window is taken off the screen.
unmapEvent :: WidgetClass self => Signal self (EventM EAny Bool)

-- | Emitted when the window visibility status has changed. Sets the
--   widget's <a>VisibilityNotifyMask</a> flag.
visibilityNotifyEvent :: WidgetClass self => Signal self (EventM EVisibility Bool)

-- | Emitted when the state of the window changes, i.e. when it is
--   minimized, moved to the top, etc.
windowStateEvent :: WidgetClass self => Signal self (EventM EWindowState Bool)

-- | A Button was pressed.
--   
--   <ul>
--   <li>This widget is part of a button which was just pressed. The event
--   passed to the user function is a <a>Button</a> event.</li>
--   </ul>
onButtonPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | A Button was pressed.
--   
--   <ul>
--   <li>This widget is part of a button which was just pressed. The event
--   passed to the user function is a <a>Button</a> event.</li>
--   </ul>
afterButtonPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | A Button was released.
onButtonRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | A Button was released.
afterButtonRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onClient :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterClient :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The widget's status has changed.
onConfigure :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The widget's status has changed.
afterConfigure :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | This signal is emitted when the close icon on the surrounding window
--   is pressed. The default action is to emit the <tt>"destroy"</tt>
--   signal.
onDelete :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | This signal is emitted when the close icon on the surrounding window
--   is pressed. The default action is to emit the <tt>"destroy"</tt>
--   signal.
afterDelete :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The widget will be destroyed.
--   
--   <ul>
--   <li>The widget received a destroy event from the window manager.</li>
--   </ul>
onDestroyEvent :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The widget will be destroyed.
--   
--   <ul>
--   <li>The widget received a destroy event from the window manager.</li>
--   </ul>
afterDestroyEvent :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The default text direction was changed.
onDirectionChanged :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The default text direction was changed.
afterDirectionChanged :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Mouse cursor entered widget.
--   
--   <ul>
--   <li>Contains a <a>Crossing</a> event.</li>
--   </ul>
onEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Mouse cursor entered widget.
--   
--   <ul>
--   <li>Contains a <a>Crossing</a> event.</li>
--   </ul>
afterEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Mouse cursor leaves widget.
--   
--   <ul>
--   <li>Contains a <a>Crossing</a> event.</li>
--   </ul>
onLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Mouse cursor leaves widget.
--   
--   <ul>
--   <li>Contains a <a>Crossing</a> event.</li>
--   </ul>
afterLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Instructs the widget to redraw.
--   
--   <ul>
--   <li>This event is useful for the <a>DrawingArea</a>. On receiving this
--   signal the content of the passed Rectangle or Region needs to be
--   redrawn. The return value should be <a>True</a> if the region was
--   completely redrawn and <a>False</a> if other handlers in the chain
--   should be invoked. If a client will redraw the whole area and is not
--   interested in the extra information in <a>Expose</a>, it is more
--   efficient to use <a>onExposeRect</a>.</li>
--   <li>Widgets that are very expensive to re-render, such as an image
--   editor, may prefer to use the <a>onExpose</a> call back which delivers
--   a <a>Region</a> in addition to a <a>Rectangle</a>. A <a>Region</a>
--   consists of several rectangles that need redrawing. The simpler
--   <a>onExposeRect</a> event encodes the area to be redrawn as a bounding
--   rectangle which might be easier to deal with in a particular
--   application.</li>
--   </ul>
onExpose :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Instructs the widget to redraw.
--   
--   <ul>
--   <li>This event is useful for the <a>DrawingArea</a>. On receiving this
--   signal the content of the passed Rectangle or Region needs to be
--   redrawn. The return value should be <a>True</a> if the region was
--   completely redrawn and <a>False</a> if other handlers in the chain
--   should be invoked. If a client will redraw the whole area and is not
--   interested in the extra information in <a>Expose</a>, it is more
--   efficient to use <a>onExposeRect</a>.</li>
--   <li>Widgets that are very expensive to re-render, such as an image
--   editor, may prefer to use the <a>onExpose</a> call back which delivers
--   a <a>Region</a> in addition to a <a>Rectangle</a>. A <a>Region</a>
--   consists of several rectangles that need redrawing. The simpler
--   <a>onExposeRect</a> event encodes the area to be redrawn as a bounding
--   rectangle which might be easier to deal with in a particular
--   application.</li>
--   </ul>
afterExpose :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Expose event delivering a <a>Rectangle</a>.
onExposeRect :: WidgetClass w => w -> (Rectangle -> IO ()) -> IO (ConnectId w)

-- | Expose event delivering a <a>Rectangle</a>.
afterExposeRect :: WidgetClass w => w -> (Rectangle -> IO ()) -> IO (ConnectId w)

-- | This signal is called if the widget receives the input focus.
onFocus :: WidgetClass w => w -> (DirectionType -> IO Bool) -> IO (ConnectId w)

-- | This signal is called if the widget receives the input focus.
afterFocus :: WidgetClass w => w -> (DirectionType -> IO Bool) -> IO (ConnectId w)

-- | Widget gains input focus.
onFocusIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Widget gains input focus.
afterFocusIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Widget looses input focus.
onFocusOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Widget looses input focus.
afterFocusOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The widget is about to receive all events.
--   
--   <ul>
--   <li>It is possible to redirect all input events to one widget to force
--   the user to use only this widget. Such a situation is initiated by
--   <tt>addGrab</tt>.</li>
--   </ul>
onGrabFocus :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The widget is about to receive all events.
--   
--   <ul>
--   <li>It is possible to redirect all input events to one widget to force
--   the user to use only this widget. Such a situation is initiated by
--   <tt>addGrab</tt>.</li>
--   </ul>
afterGrabFocus :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The widget will be destroyed.
--   
--   <ul>
--   <li>This is the last signal this widget will receive.</li>
--   </ul>
onDestroy :: WidgetClass w => w -> (IO ()) -> IO (ConnectId w)

-- | The widget will be destroyed.
--   
--   <ul>
--   <li>This is the last signal this widget will receive.</li>
--   </ul>
afterDestroy :: WidgetClass w => w -> (IO ()) -> IO (ConnectId w)

-- | The widget was asked to hide itself.
--   
--   <ul>
--   <li>This signal is emitted each time <a>widgetHide</a> is called. Use
--   <a>onUnmap</a> when your application needs to be informed when the
--   widget is actually removed from screen.</li>
--   </ul>
onHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The widget was asked to hide itself.
--   
--   <ul>
--   <li>This signal is emitted each time <a>widgetHide</a> is called. Use
--   <a>onUnmap</a> when your application needs to be informed when the
--   widget is actually removed from screen.</li>
--   </ul>
afterHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The toplevel window changed.
--   
--   <ul>
--   <li>When a subtree of widgets is removed or added from a tree with a
--   toplevel window this signal is emitted. It is emitted on each widget
--   in the detached or attached subtree.</li>
--   </ul>
onHierarchyChanged :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The toplevel window changed.
--   
--   <ul>
--   <li>When a subtree of widgets is removed or added from a tree with a
--   toplevel window this signal is emitted. It is emitted on each widget
--   in the detached or attached subtree.</li>
--   </ul>
afterHierarchyChanged :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | A key was pressed.
onKeyPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | A key was pressed.
afterKeyPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | A key was released.
onKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | A key was released.
afterKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onMnemonicActivate :: WidgetClass w => w -> (Bool -> IO Bool) -> IO (ConnectId w)
afterMnemonicActivate :: WidgetClass w => w -> (Bool -> IO Bool) -> IO (ConnectId w)

-- | Track mouse movements.
--   
--   <ul>
--   <li>If <tt>hint</tt> is False, a callback for every movement of the
--   mouse is generated. To avoid a backlog of mouse messages, it is
--   usually sufficient to sent <tt>hint</tt> to True, generating only one
--   event. The application now has to state that it is ready for the next
--   message by calling <a>drawWindowGetPointer</a>.</li>
--   </ul>
onMotionNotify :: WidgetClass w => w -> Bool -> (Event -> IO Bool) -> IO (ConnectId w)

-- | Track mouse movements.
--   
--   <ul>
--   <li>If <tt>hint</tt> is False, a callback for every movement of the
--   mouse is generated. To avoid a backlog of mouse messages, it is
--   usually sufficient to sent <tt>hint</tt> to True, generating only one
--   event. The application now has to state that it is ready for the next
--   message by calling <a>drawWindowGetPointer</a>.</li>
--   </ul>
afterMotionNotify :: WidgetClass w => w -> Bool -> (Event -> IO Bool) -> IO (ConnectId w)
onParentSet :: (WidgetClass w, WidgetClass old) => w -> (old -> IO ()) -> IO (ConnectId w)
afterParentSet :: (WidgetClass w, WidgetClass old) => w -> (old -> IO ()) -> IO (ConnectId w)
onPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The input device became active.
--   
--   <ul>
--   <li>This event indicates that a pen of a graphics tablet or similar
--   device is now touching the tablet.</li>
--   </ul>
onProximityIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The input device became active.
--   
--   <ul>
--   <li>This event indicates that a pen of a graphics tablet or similar
--   device is now touching the tablet.</li>
--   </ul>
afterProximityIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The input device became inactive.
--   
--   <ul>
--   <li>The pen was removed from the graphics tablet's surface.</li>
--   </ul>
onProximityOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The input device became inactive.
--   
--   <ul>
--   <li>The pen was removed from the graphics tablet's surface.</li>
--   </ul>
afterProximityOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | This widget's drawing area is about to be destroyed.
onRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | This widget's drawing area is about to be destroyed.
afterRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The mouse wheel has turned.
--   
--   <ul>
--   <li>The <a>Event</a> is always <a>Scroll</a>.</li>
--   </ul>
onScroll :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The mouse wheel has turned.
--   
--   <ul>
--   <li>The <a>Event</a> is always <a>Scroll</a>.</li>
--   </ul>
afterScroll :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

-- | The widget was asked to show itself.
--   
--   <ul>
--   <li>This signal is emitted each time <a>widgetShow</a> is called. Use
--   <tt>onMap</tt> when your application needs to be informed when the
--   widget is actually shown.</li>
--   </ul>
onShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The widget was asked to show itself.
--   
--   <ul>
--   <li>This signal is emitted each time <a>widgetShow</a> is called. Use
--   <tt>onMap</tt> when your application needs to be informed when the
--   widget is actually shown.</li>
--   </ul>
afterShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | Inform widget about the size it has.
--   
--   <ul>
--   <li>After querying a widget for the size it wants to have (through
--   emitting the <tt>"sizeRequest"</tt> signal) a container will emit this
--   signal to inform the widget about the real size it should occupy.</li>
--   </ul>
onSizeAllocate :: WidgetClass w => w -> (Allocation -> IO ()) -> IO (ConnectId w)

-- | Inform widget about the size it has.
--   
--   <ul>
--   <li>After querying a widget for the size it wants to have (through
--   emitting the <tt>"sizeRequest"</tt> signal) a container will emit this
--   signal to inform the widget about the real size it should occupy.</li>
--   </ul>
afterSizeAllocate :: WidgetClass w => w -> (Allocation -> IO ()) -> IO (ConnectId w)

-- | Query the widget for the size it likes to have.
--   
--   <ul>
--   <li>A parent container emits this signal to its child to query the
--   needed height and width of the child. There is not guarantee that the
--   widget will actually get this area.</li>
--   </ul>
onSizeRequest :: WidgetClass w => w -> (IO Requisition) -> IO (ConnectId w)

-- | Query the widget for the size it likes to have.
--   
--   <ul>
--   <li>A parent container emits this signal to its child to query the
--   needed height and width of the child. There is not guarantee that the
--   widget will actually get this area.</li>
--   </ul>
afterSizeRequest :: WidgetClass w => w -> (IO Requisition) -> IO (ConnectId w)
onStateChanged :: WidgetClass w => w -> (StateType -> IO ()) -> IO (ConnectId w)
afterStateChanged :: WidgetClass w => w -> (StateType -> IO ()) -> IO (ConnectId w)

-- | The widget was removed from screen.
onUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | The widget was removed from screen.
afterUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | This widget's drawing area is about to be destroyed.
onUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)

-- | This widget's drawing area is about to be destroyed.
afterUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onVisibilityNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterVisibilityNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onWindowState :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterWindowState :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
instance Show WidgetHelpType
instance Eq WidgetHelpType
instance Enum WidgetHelpType


-- | A text entry field with a dropdown list
--   
--   <ul>
--   <li>Warning: this module is deprecated and should not be used in
--   newly-written code.</li>
--   </ul>
--   
--   This module is empty in Gtk3 as Combo has been removed.
module Graphics.UI.Gtk.MenuComboToolbar.Combo
data Combo
class HBoxClass o => ComboClass o
castToCombo :: GObjectClass obj => obj -> Combo
gTypeCombo :: GType
toCombo :: ComboClass o => o -> Combo
comboNew :: IO Combo

-- | Insert a set of Strings into the <a>Combo</a> drop down list.
comboSetPopdownStrings :: (ComboClass self, GlibString string) => self -> [string] -> IO ()

-- | Specifies whether the value entered in the text entry field must match
--   one of the values in the list. If this is set then the user will not
--   be able to perform any other action until a valid value has been
--   entered.
--   
--   If an empty field is acceptable, the <tt>okIfEmpty</tt> parameter
--   should be <tt>True</tt>.
comboSetValueInList :: ComboClass self => self -> Bool -> Bool -> IO ()

-- | Specifies if the arrow (cursor) keys can be used to step through the
--   items in the list. This is on by default.
comboSetUseArrows :: ComboClass self => self -> Bool -> IO ()

-- | Obsolete function, does nothing.
comboSetUseArrowsAlways :: ComboClass self => self -> Bool -> IO ()

-- | Specifies whether the text entered into the <a>Entry</a> field and the
--   text in the list items is case sensitive.
--   
--   This may be useful, for example, when you have called
--   <a>comboSetValueInList</a> to limit the values entered, but you are
--   not worried about differences in case.
comboSetCaseSensitive :: ComboClass self => self -> Bool -> IO ()

-- | Stops the <a>Combo</a> widget from showing the popup list when the
--   <a>Entry</a> emits the "activate" signal, i.e. when the Return key is
--   pressed. This may be useful if, for example, you want the Return key
--   to close a dialog instead.
comboDisableActivate :: ComboClass self => self -> IO ()

-- | Whether the arrow keys move through the list of items.
--   
--   Default value: <tt>True</tt>
comboEnableArrowKeys :: ComboClass self => Attr self Bool

-- | Obsolete property, ignored.
--   
--   Default value: <tt>True</tt>
comboEnableArrowsAlways :: ComboClass self => Attr self Bool

-- | Whether list item matching is case sensitive.
--   
--   Default value: <tt>False</tt>
comboCaseSensitive :: ComboClass self => Attr self Bool

-- | Whether an empty value may be entered in this field.
--   
--   Default value: <tt>True</tt>
comboAllowEmpty :: ComboClass self => Attr self Bool

-- | Whether entered values must already be present in the list.
--   
--   Default value: <tt>False</tt>
comboValueInList :: ComboClass self => Attr self Bool


-- | Looking up icons by name
--   
--   <ul>
--   <li>Module available since Gtk+ version 2.4</li>
--   </ul>
module Graphics.UI.Gtk.General.IconTheme
data IconTheme
class GObjectClass o => IconThemeClass o
castToIconTheme :: GObjectClass obj => obj -> IconTheme
toIconTheme :: IconThemeClass o => o -> IconTheme
data IconInfo
data IconLookupFlags
[IconLookupNoSvg] :: IconLookupFlags
[IconLookupForceSvg] :: IconLookupFlags
[IconLookupUseBuiltin] :: IconLookupFlags
[IconLookupGenericFallback] :: IconLookupFlags
[IconLookupForceSize] :: IconLookupFlags
data IconThemeError
[IconThemeNotFound] :: IconThemeError
[IconThemeFailed] :: IconThemeError

-- | Creates a new icon theme object. Icon theme objects are used to lookup
--   up an icon by name in a particular icon theme. Usually, you'll want to
--   use <a>iconThemeGetDefault</a> or <a>iconThemeGetForScreen</a> rather
--   than creating a new icon theme object for scratch.
iconThemeNew :: IO IconTheme
iconInfoNewForPixbuf :: IconThemeClass iconTheme => iconTheme -> Pixbuf -> IO IconInfo

-- | Gets the icon theme for the default screen. See
--   <a>iconThemeGetForScreen</a>.
iconThemeGetDefault :: IO IconTheme

-- | Gets the icon theme object associated with <tt>screen</tt>; if this
--   function has not previously been called for the given screen, a new
--   icon theme object will be created and associated with the screen. Icon
--   theme objects are fairly expensive to create, so using this function
--   is usually a better choice than calling than <a>iconThemeNew</a> and
--   setting the screen yourself; by using this function a single icon
--   theme object will be shared between users.
iconThemeGetForScreen :: Screen -> IO IconTheme

-- | Sets the screen for an icon theme; the screen is used to track the
--   user's currently configured icon theme, which might be different for
--   different screens.
iconThemeSetScreen :: IconThemeClass self => self -> Screen -> IO ()

-- | Sets the search path for the icon theme object. When looking for an
--   icon theme, Gtk+ will search for a subdirectory of one or more of the
--   directories in <tt>path</tt> with the same name as the icon theme.
--   (Themes from multiple of the path elements are combined to allow
--   themes to be extended by adding icons in the user's home directory.)
--   
--   In addition if an icon found isn't found either in the current icon
--   theme or the default icon theme, and an image file with the right name
--   is found directly in one of the elements of <tt>path</tt>, then that
--   image will be used for the icon name. (This is legacy feature, and new
--   icons should be put into the default icon theme, which is called
--   DEFAULT_THEME_NAME, rather than directly on the icon path.)
iconThemeSetSearchPath :: (IconThemeClass self, GlibFilePath fp) => self -> [fp] -> Int -> IO ()

-- | Gets the current search path. See <a>iconThemeSetSearchPath</a>.
iconThemeGetSearchPath :: (IconThemeClass self, GlibFilePath fp) => self -> IO ([fp], Int)

-- | Appends a directory to the search path. See
--   <a>iconThemeSetSearchPath</a>.
iconThemeAppendSearchPath :: (IconThemeClass self, GlibFilePath fp) => self -> fp -> IO ()

-- | Prepends a directory to the search path. See
--   <a>iconThemeSetSearchPath</a>.
iconThemePrependSearchPath :: (IconThemeClass self, GlibFilePath fp) => self -> fp -> IO ()

-- | Sets the name of the icon theme that the <a>IconTheme</a> object uses
--   overriding system configuration. This function cannot be called on the
--   icon theme objects returned from <a>iconThemeGetDefault</a> and
--   <a>iconThemeGetForScreen</a>.
iconThemeSetCustomTheme :: (IconThemeClass self, GlibString string) => self -> (Maybe string) -> IO ()

-- | Checks whether an icon theme includes an icon for a particular name.
iconThemeHasIcon :: (IconThemeClass self, GlibString string) => self -> string -> IO Bool

-- | Looks up a named icon and returns a structure containing information
--   such as the filename of the icon. The icon can then be rendered into a
--   pixbuf using <a>iconInfoLoadIcon</a>. (<a>iconThemeLoadIcon</a>
--   combines these two steps if all you need is the pixbuf.)
iconThemeLookupIcon :: (IconThemeClass self, GlibString string) => self -> string -> Int -> IconLookupFlags -> IO (Maybe IconInfo)

-- | Looks up a named icon and returns a structure containing information
--   such as the filename of the icon. The icon can then be rendered into a
--   pixbuf using <a>iconInfoLoadIcon</a>. (<a>iconThemeLoadIcon</a>
--   combines these two steps if all you need is the pixbuf.)
--   
--   If <tt>iconNames</tt> contains more than one name, this function tries
--   them all in the given order before falling back to inherited icon
--   themes.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
iconThemeChooseIcon :: (IconThemeClass self, GlibString string) => self -> [string] -> Int -> IconLookupFlags -> IO (Maybe IconInfo)

-- | Looks up an icon in an icon theme, scales it to the given size and
--   renders it into a pixbuf. This is a convenience function; if more
--   details about the icon are needed, use <a>iconThemeLookupIcon</a>
--   followed by <a>iconInfoLoadIcon</a>.
--   
--   Note that you probably want to listen for icon theme changes and
--   update the icon. This is usually done by connecting to the
--   <a>Widget</a>::style-set signal. If for some reason you do not want to
--   update the icon when the icon theme changes, you should consider using
--   <tt>pixbufCopy</tt> to make a private copy of the pixbuf returned by
--   this function. Otherwise Gtk+ may need to keep the old icon theme
--   loaded, which would be a waste of memory.
iconThemeLoadIcon :: (IconThemeClass self, GlibString string) => self -> string -> Int -> IconLookupFlags -> IO (Maybe Pixbuf)

-- | Gets the list of contexts available within the current hierarchy of
--   icon themes
--   
--   <ul>
--   <li>Available since Gtk+ version 2.12</li>
--   </ul>
iconThemeListContexts :: (IconThemeClass self, GlibString string) => self -> IO [string]

-- | Lists the icons in the current icon theme. Only a subset of the icons
--   can be listed by providing a context string. The set of values for the
--   context string is system dependent, but will typically include such
--   values as "Applications" and "MimeTypes".
iconThemeListIcons :: (IconThemeClass self, GlibString string) => self -> (Maybe string) -> IO [string]

-- | Returns an list of integers describing the sizes at which the icon is
--   available without scaling. A size of -1 means that the icon is
--   available in a scalable format. The list is zero-terminated.
--   
--   <ul>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
iconThemeGetIconSizes :: (IconThemeClass self, GlibString string) => self -> string -> IO [Int]

-- | Gets the name of an icon that is representative of the current theme
--   (for instance, to use when presenting a list of themes to the user.)
iconThemeGetExampleIconName :: (IconThemeClass self, GlibString string) => self -> IO (Maybe string)

-- | Checks to see if the icon theme has changed; if it has, any currently
--   cached information is discarded and will be reloaded next time
--   <tt>iconTheme</tt> is accessed.
iconThemeRescanIfNeeded :: IconThemeClass self => self -> IO Bool

-- | Registers a built-in icon for icon theme lookups. The idea of built-in
--   icons is to allow an application or library that uses themed icons to
--   function requiring files to be present in the file system. For
--   instance, the default images for all of Gtk+'s stock icons are
--   registered as built-icons.
--   
--   In general, if you use <a>iconThemeAddBuiltinIcon</a> you should also
--   install the icon in the icon theme, so that the icon is generally
--   available.
--   
--   This function will generally be used with pixbufs loaded via
--   <tt>pixbufNewFromInline</tt>.
iconThemeAddBuiltinIcon :: GlibString string => string -> Int -> Pixbuf -> IO ()
iconThemeErrorQuark :: IO Quark
iconInfoCopy :: IconInfo -> IO IconInfo

-- | Fetches the set of attach points for an icon. An attach point is a
--   location in the icon that can be used as anchor points for attaching
--   emblems or overlays to the icon.
iconInfoGetAttachPoints :: IconInfo -> IO (Maybe [Point])

-- | Gets the base size for the icon. The base size is a size for the icon
--   that was specified by the icon theme creator. This may be different
--   than the actual size of image; an example of this is small emblem
--   icons that can be attached to a larger icon. These icons will be given
--   the same base size as the larger icons to which they are attached.
iconInfoGetBaseSize :: IconInfo -> IO Int

-- | Gets the built-in image for this icon, if any. To allow GTK+ to use
--   built in icon images, you must pass the
--   '<tt>IconLookupUseBuiltin'</tt> to <a>iconThemeLookupIcon</a>.
iconInfoGetBuiltinPixbuf :: IconInfo -> IO (Maybe Pixbuf)

-- | Gets the display name for an icon. A display name is a string to be
--   used in place of the icon name in a user visible context like a list
--   of icons.
iconInfoGetDisplayName :: GlibString string => IconInfo -> IO (Maybe string)

-- | Gets the coordinates of a rectangle within the icon that can be used
--   for display of information such as a preview of the contents of a text
--   file. See <a>iconInfoSetRawCoordinates</a> for further information
--   about the coordinate system.
iconInfoGetEmbeddedRect :: IconInfo -> IO (Maybe Rectangle)

-- | Gets the filename for the icon. If the '<tt>IconLookupUseBuiltin'</tt>
--   flag was passed to <a>iconThemeLookupIcon</a>, there may be no
--   filename if a builtin icon is returned; in this case, you should use
--   <a>iconInfoGetBuiltinPixbuf</a>.
iconInfoGetFilename :: GlibString string => IconInfo -> IO (Maybe string)

-- | Looks up an icon in an icon theme, scales it to the given size and
--   renders it into a pixbuf. This is a convenience function; if more
--   details about the icon are needed, use <a>iconThemeLookupIcon</a>
--   followed by <a>iconInfoLoadIcon</a>.
--   
--   Note that you probably want to listen for icon theme changes and
--   update the icon. This is usually done by connecting to the
--   <tt>styleSet</tt> signal. If for some reason you do not want to update
--   the icon when the icon theme changes, you should consider using
--   <tt>pixbufCopy</tt> to make a private copy of the pixbuf returned by
--   this function. Otherwise GTK+ may need to keep the old icon theme
--   loaded, which would be a waste of memory.
iconInfoLoadIcon :: IconInfo -> IO Pixbuf

-- | Sets whether the coordinates returned by
--   <a>iconInfoGetEmbeddedRect</a> and <a>iconInfoGetAttachPoints</a>
--   should be returned in their original form as specified in the icon
--   theme, instead of scaled appropriately for the pixbuf returned by
--   <a>iconInfoLoadIcon</a>.
--   
--   Raw coordinates are somewhat strange; they are specified to be with
--   respect to the unscaled pixmap for PNG and XPM icons, but for SVG
--   icons, they are in a 1000x1000 coordinate space that is scaled to the
--   final size of the icon. You can determine if the icon is an SVG icon
--   by using <a>iconInfoGetFilename</a>, and seeing if it is
--   non-<a>Nothing</a> and ends in '.svg'.
--   
--   This function is provided primarily to allow compatibility wrappers
--   for older API's, and is not expected to be useful for applications.
iconInfoSetRawCoordinates :: IconInfo -> Bool -> IO ()

-- | Emitted when the current icon theme is switched or Gtk+ detects that a
--   change has occurred in the contents of the current icon theme.
iconThemeChanged :: IconThemeClass self => Signal self (IO ())
instance Show IconThemeError
instance Eq IconThemeError
instance Bounded IconThemeError
instance Enum IconThemeError
instance Show IconLookupFlags
instance Eq IconLookupFlags
instance Bounded IconLookupFlags
instance Enum IconLookupFlags


-- | Manipulating stock icons
module Graphics.UI.Gtk.General.IconFactory
data IconFactory
class GObjectClass o => IconFactoryClass o
castToIconFactory :: GObjectClass obj => obj -> IconFactory
gTypeIconFactory :: GType
toIconFactory :: IconFactoryClass o => o -> IconFactory

-- | Create a new IconFactory.
--   
--   <ul>
--   <li>An application should create a new <a>IconFactory</a> and add all
--   needed icons. By calling <a>iconFactoryAddDefault</a> these icons
--   become available as stock objects and can easily be displayed by
--   <a>Image</a>. Furthermore, a theme can override the icons defined by
--   the application.</li>
--   </ul>
iconFactoryNew :: IO IconFactory

-- | Add an IconSet to an IconFactory.
--   
--   In order to use the new stock object, the factory as to be added to
--   the default factories by <a>iconFactoryAddDefault</a>.
iconFactoryAdd :: IconFactory -> StockId -> IconSet -> IO ()

-- | Add all entries of the IconFactory to the applications stock object
--   database.
iconFactoryAddDefault :: IconFactory -> IO ()

-- | Looks up the stock id in the icon factory, returning an icon set if
--   found, otherwise Nothing.
--   
--   For display to the user, you should use <a>styleLookupIconSet</a> on
--   the <a>Style</a> for the widget that will display the icon, instead of
--   using this function directly, so that themes are taken into account.
iconFactoryLookup :: IconFactory -> StockId -> IO (Maybe IconSet)

-- | Looks for an icon in the list of default icon factories.
--   
--   For display to the user, you should use <a>styleLookupIconSet</a> on
--   the <a>Style</a> for the widget that will display the icon, instead of
--   using this function directly, so that themes are taken into account.
iconFactoryLookupDefault :: StockId -> IO (Maybe IconSet)

-- | Remove an IconFactory from the application's stock database.
iconFactoryRemoveDefault :: IconFactory -> IO ()
data IconSet

-- | Create a new IconSet.
--   
--   <ul>
--   <li>Each icon in an application is contained in an <a>IconSet</a>. The
--   <a>IconSet</a> contains several variants (<a>IconSource</a>s) to
--   accomodate for different sizes and states.</li>
--   </ul>
iconSetNew :: IO IconSet

-- | Creates a new <a>IconSet</a> with the given pixbuf as the
--   default/fallback source image. If you don't add any additional
--   <a>IconSource</a> to the icon set, all variants of the icon will be
--   created from the pixbuf, using scaling, pixelation, etc. as required
--   to adjust the icon size or make the icon look insensitive/prelighted.
iconSetNewFromPixbuf :: Pixbuf -> IO IconSet

-- | Add an <a>IconSource</a> (an Icon with attributes) to an
--   <a>IconSet</a>.
--   
--   <ul>
--   <li>If an icon is looked up in the IconSet <tt>set</tt> the best
--   matching IconSource will be taken. It is therefore advisable to add a
--   default (wildcarded) icon, than can be used if no exact match is
--   found.</li>
--   </ul>
iconSetAddSource :: IconSet -> IconSource -> IO ()
iconSetRenderIcon :: WidgetClass widget => IconSet -> TextDirection -> StateType -> IconSize -> widget -> IO Pixbuf

-- | Obtains a list of icon sizes this icon set can render.
iconSetGetSizes :: IconSet -> IO [IconSize]
data IconSource

-- | Create a new IconSource.
--   
--   <ul>
--   <li>An IconSource is a single image that is usually added to an
--   IconSet. Next to the image it contains information about which state,
--   text direction and size it should apply.</li>
--   </ul>
iconSourceNew :: IO IconSource
data TextDirection
[TextDirNone] :: TextDirection
[TextDirLtr] :: TextDirection
[TextDirRtl] :: TextDirection

-- | Retrieve the <a>TextDirection</a> of this IconSource.
--   
--   <ul>
--   <li><tt>Nothing</tt> is returned if no explicit direction was
--   set.</li>
--   </ul>
iconSourceGetDirection :: IconSource -> IO (Maybe TextDirection)

-- | Mark this <a>IconSource</a> that it should only apply to the specified
--   <a>TextDirection</a>.
iconSourceSetDirection :: IconSource -> TextDirection -> IO ()

-- | Reset the specific <a>TextDirection</a> set with
--   <a>iconSourceSetDirection</a>.
iconSourceResetDirection :: IconSource -> IO ()

-- | Retrieve the filename this IconSource was based on.
--   
--   <ul>
--   <li>Returns <tt>Nothing</tt> if the IconSource was generated by a
--   Pixbuf.</li>
--   </ul>
iconSourceGetFilename :: GlibString string => IconSource -> IO (Maybe string)

-- | Load an icon picture from this filename.
iconSourceSetFilename :: GlibFilePath fp => IconSource -> fp -> IO ()

-- | Retrieves the source pixbuf, or Nothing if none is set.
iconSourceGetPixbuf :: IconSource -> IO (Maybe Pixbuf)

-- | Sets a pixbuf to use as a base image when creating icon variants for
--   <a>IconSet</a>.
iconSourceSetPixbuf :: IconSource -> Pixbuf -> IO ()

-- | Retrieve the <a>IconSize</a> of this IconSource.
--   
--   <ul>
--   <li><tt>Nothing</tt> is returned if no explicit size was set (i.e.
--   this <a>IconSource</a> matches all sizes).</li>
--   </ul>
iconSourceGetSize :: IconSource -> IO (Maybe IconSize)

-- | Set this <a>IconSource</a> to a specific size.
iconSourceSetSize :: IconSource -> IconSize -> IO ()

-- | Reset the <a>IconSize</a> of this <a>IconSource</a> so that is matches
--   anything.
iconSourceResetSize :: IconSource -> IO ()

-- | Widget states
data StateType
[StateNormal] :: StateType
[StateActive] :: StateType
[StatePrelight] :: StateType
[StateSelected] :: StateType
[StateInsensitive] :: StateType

-- | Retrieve the <a>StateType</a> of this <a>IconSource</a>.
--   
--   <ul>
--   <li><tt>Nothing</tt> is returned if the <a>IconSource</a> matches all
--   states.</li>
--   </ul>
iconSourceGetState :: IconSource -> IO (Maybe StateType)

-- | Mark this icon to be used only with this specific state.
iconSourceSetState :: IconSource -> StateType -> IO ()

-- | Reset the <a>StateType</a> of this <a>IconSource</a> so that is
--   matches anything.
iconSourceResetState :: IconSource -> IO ()

-- | The size of an icon in pixels.
--   
--   <ul>
--   <li>This enumeration contains one case that is not exported and which
--   is used when new sizes are registered using
--   <a>iconSizeRegister</a>.</li>
--   <li>Applying <a>show</a> to this type will reveal the name of the size
--   that is registered with Gtk+.</li>
--   </ul>
data IconSize

-- | Don't scale but use any of the available sizes.
[IconSizeInvalid] :: IconSize

-- | Icon size to use in next to menu items in drop-down menus.
[IconSizeMenu] :: IconSize

-- | Icon size for small toolbars.
[IconSizeSmallToolbar] :: IconSize

-- | Icon size for larger toolbars.
[IconSizeLargeToolbar] :: IconSize

-- | Icon size for icons in buttons, next to the label.
[IconSizeButton] :: IconSize

-- | Icon size for icons in drag-and-drop.
[IconSizeDnd] :: IconSize

-- | Icon size for icons next to dialog text.
[IconSizeDialog] :: IconSize
[IconSizeUser] :: Int -> IconSize

-- | Check if a given IconSize is registered.
--   
--   <ul>
--   <li>Useful if your application expects a theme to install a set with a
--   specific size. You can test if this actually happend and use another
--   size if not.</li>
--   </ul>
iconSizeCheck :: IconSize -> IO Bool

-- | Register a new IconSize.
iconSizeRegister :: GlibString string => string -> Int -> Int -> IO IconSize

-- | Register an additional alias for a name.
iconSizeRegisterAlias :: GlibString string => IconSize -> string -> IO ()

-- | Lookup an IconSize by name.
--   
--   <ul>
--   <li>This fixed value <tt>iconSizeInvalid</tt> is returned if the name
--   was not found.</li>
--   </ul>
iconSizeFromName :: GlibString string => string -> IO IconSize

-- | Lookup the name of an IconSize.
--   
--   <ul>
--   <li>Returns <tt>Nothing</tt> if the name was not found.</li>
--   </ul>
iconSizeGetName :: GlibString string => IconSize -> IO (Maybe string)
instance Show IconSize


-- | library initialization, main event loop, and events
module Graphics.UI.Gtk.General.General

-- | Initialize the GUI.
--   
--   This must be called before any other function in the Gtk2Hs library.
--   
--   This function initializes the GUI toolkit and parses all Gtk specific
--   arguments. The remaining arguments are returned. If the initialization
--   of the toolkit fails for whatever reason, an exception is thrown.
--   
--   <ul>
--   <li>Throws: <tt>error "Cannot initialize GUI."</tt></li>
--   <li>If you want to use Gtk2Hs and in a multi-threaded application then
--   it is your obligation to ensure that all calls to Gtk+ happen in a
--   single OS thread. If you want to make calls to Gtk2Hs functions from a
--   Haskell thread other than the one that calls this functions and
--   <a>mainGUI</a> then you will have to 'post' your GUI actions to the
--   main GUI thread. You can do this using <a>postGUISync</a> or
--   <a>postGUIAsync</a>. See also <a>threadsEnter</a>.</li>
--   </ul>
initGUI :: IO [String]
unsafeInitGUIForThreadedRTS :: IO [String]

-- | Post an action to be run in the main GUI thread.
--   
--   The current thread blocks until the action completes and the result is
--   returned.
postGUISync :: IO a -> IO a

-- | Post an action to be run in the main GUI thread.
--   
--   The current thread continues and does not wait for the result of the
--   action.
postGUIAsync :: IO () -> IO ()

-- | Acquire the global Gtk lock.
--   
--   <ul>
--   <li>During normal operation, this lock is held by the thread from
--   which all interaction with Gtk is performed. When calling
--   <a>mainGUI</a>, the thread will release this global lock before it
--   waits for user interaction. During this time it is, in principle,
--   possible to use a different OS thread (any other Haskell thread that
--   is bound to the Gtk OS thread will be blocked anyway) to interact with
--   Gtk by explicitly acquiring the lock, calling Gtk functions and
--   releasing the lock. However, the Gtk functions that are called from
--   this different thread may not trigger any calls to the OS since this
--   will lead to a crash on Windows (the Win32 API can only be used from a
--   single thread). Since it is very hard to tell which function only
--   interacts on Gtk data structures and which function call actual OS
--   functions, it is best not to use this feature at all. A better way to
--   perform updates in the background is to spawn a Haskell thread and to
--   perform the update to Gtk widgets using <a>postGUIAsync</a> or
--   <a>postGUISync</a>. These will execute their arguments from the main
--   loop, that is, from the OS thread of Gtk, thereby ensuring that any
--   Gtk and OS function can be called.</li>
--   </ul>
threadsEnter :: IO ()

-- | Release the global Gtk lock.
--   
--   <ul>
--   <li>The use of this function is not recommended. See
--   <a>threadsEnter</a>.</li>
--   </ul>
threadsLeave :: IO ()

-- | Run the Gtk+ main event loop.
mainGUI :: IO ()

-- | Exit the main event loop.
mainQuit :: IO ()

-- | Inquire the number of events pending on the event queue
eventsPending :: IO Int

-- | Inquire the main loop level.
--   
--   <ul>
--   <li>Callbacks that take more time to process can call
--   <a>mainIteration</a> to keep the GUI responsive. Each time the main
--   loop is restarted this way, the main loop counter is increased. This
--   function returns this counter.</li>
--   </ul>
mainLevel :: IO Int

-- | Process an event, block if necessary.
--   
--   <ul>
--   <li>Returns <tt>True</tt> if <a>mainQuit</a> was called while
--   processing the event.</li>
--   </ul>
mainIteration :: IO Bool

-- | Process a single event.
--   
--   <ul>
--   <li>Called with <tt>True</tt>, this function behaves as
--   <a>mainIteration</a> in that it waits until an event is available for
--   processing. It will return immediately, if passed <tt>False</tt>.</li>
--   <li>Returns <tt>True</tt> if the <a>mainQuit</a> was called while
--   processing the event.</li>
--   </ul>
mainIterationDo :: Bool -> IO Bool

-- | Processes a single GDK event. This is public only to allow filtering
--   of events between GDK and GTK+. You will not usually need to call this
--   function directly.
--   
--   While you should not call this function directly, you might want to
--   know how exactly events are handled. So here is what this function
--   does with the event:
--   
--   <ol>
--   <li>Compress enter/leave notify events. If the event passed build an
--   enter/leave pair together with the next event (peeked from GDK) both
--   events are thrown away. This is to avoid a backlog of
--   (de-)highlighting widgets crossed by the pointer.</li>
--   <li>Find the widget which got the event. If the widget can't be
--   determined the event is thrown away unless it belongs to a INCR
--   transaction. In that case it is passed to
--   <tt>selectionIncrEvent</tt>.</li>
--   <li>Then the event is passed on a stack so you can query the currently
--   handled event with <tt>getCurrentEvent</tt>.</li>
--   <li>The event is sent to a widget. If a grab is active all events for
--   widgets that are not in the contained in the grab widget are sent to
--   the latter with a few exceptions:</li>
--   </ol>
--   
--   <ul>
--   <li>Deletion and destruction events are still sent to the event widget
--   for obvious reasons.</li>
--   <li>Events which directly relate to the visual representation of the
--   event widget.</li>
--   <li>Leave events are delivered to the event widget if there was an
--   enter event delivered to it before without the paired leave
--   event.</li>
--   <li>Drag events are not redirected because it is unclear what the
--   semantics of that would be.</li>
--   </ul>
--   
--   Another point of interest might be that all key events are first
--   passed through the key snooper functions if there are any. Read the
--   description of <tt>keySnooperInstall</tt> if you need this feature.
--   
--   <ol>
--   <li>After finishing the delivery the event is popped from the event
--   stack.</li>
--   </ol>
mainDoEvent :: EventM t ()

-- | Trigger destruction of object in case the mainloop at level
--   <tt>mainLevel</tt> is quit.
--   
--   Removed in Gtk3.
quitAddDestroy :: ObjectClass obj => Int -> obj -> IO ()

-- | Registers a function to be called when an instance of the mainloop is
--   left.
--   
--   Removed in Gtk3.
quitAdd :: Int -> (IO Bool) -> IO Int

-- | Removes a quit handler by its identifier.
--   
--   Removed in Gtk3.
quitRemove :: Int -> IO ()

-- | add a grab widget
grabAdd :: WidgetClass wd => wd -> IO ()

-- | inquire current grab widget
grabGetCurrent :: IO (Maybe Widget)

-- | remove a grab widget
grabRemove :: WidgetClass w => w -> IO ()

-- | Priorities for installing callbacks.
type Priority = Int
priorityLow :: Int
priorityDefaultIdle :: Int
priorityHighIdle :: Int
priorityDefault :: Int
priorityHigh :: Int

-- | Sets a function to be called at regular intervals, with the default
--   priority <a>priorityDefault</a>. The function is called repeatedly
--   until it returns <tt>False</tt>, after which point the timeout
--   function will not be called again. The first call to the function will
--   be at the end of the first interval.
--   
--   Note that timeout functions may be delayed, due to the processing of
--   other event sources. Thus they should not be relied on for precise
--   timing. After each call to the timeout function, the time of the next
--   timeout is recalculated based on the current time and the given
--   interval (it does not try to 'catch up' time lost in delays).
--   
--   This function differs from <a>timeoutAdd</a> in that the action will
--   be executed within the global Gtk+ lock. It is therefore possible to
--   call Gtk+ functions from the action.
timeoutAdd :: IO Bool -> Int -> IO HandlerId

-- | Sets a function to be called at regular intervals, with the given
--   priority. The function is called repeatedly until it returns
--   <tt>False</tt>, after which point the timeout function will not be
--   called again. The first call to the function will be at the end of the
--   first interval.
--   
--   Note that timeout functions may be delayed, due to the processing of
--   other event sources. Thus they should not be relied on for precise
--   timing. After each call to the timeout function, the time of the next
--   timeout is recalculated based on the current time and the given
--   interval (it does not try to 'catch up' time lost in delays).
--   
--   This function differs from <a>timeoutAddFull</a> in that the action
--   will be executed within the global Gtk+ lock. It is therefore possible
--   to call Gtk+ functions from the action.
timeoutAddFull :: IO Bool -> Priority -> Int -> IO HandlerId

-- | Remove a previously added timeout handler by its <a>HandlerId</a>.
timeoutRemove :: HandlerId -> IO ()

-- | Add a callback that is called whenever the system is idle.
--   
--   <ul>
--   <li>A priority can be specified via an integer. This should usually be
--   <a>priorityDefaultIdle</a>.</li>
--   <li>If the function returns <tt>False</tt> it will be removed.</li>
--   </ul>
--   
--   This function differs from <a>idleAdd</a> in that the action will be
--   executed within the global Gtk+ lock. It is therefore possible to call
--   Gtk+ functions from the action.
idleAdd :: IO Bool -> Priority -> IO HandlerId

-- | Remove a previously added idle handler by its <a>HandlerId</a>.
idleRemove :: HandlerId -> IO ()

-- | Adds the file descriptor into the main event loop with the given
--   priority.
--   
--   This function differs from <a>inputAdd</a> in that the action will be
--   executed within the global Gtk+ lock. It is therefore possible to call
--   Gtk+ functions from the action.
inputAdd :: FD -> [IOCondition] -> Priority -> IO Bool -> IO HandlerId
inputRemove :: HandlerId -> IO ()

-- | Flags representing a condition to watch for on a file descriptor.
--   
--   <ul>
--   <li><i><tt>IOIn</tt></i> There is data to read.</li>
--   <li><i><tt>IOOut</tt></i> Data can be written (without blocking).</li>
--   <li><i><tt>IOPri</tt></i> There is urgent data to read.</li>
--   <li><i><tt>IOErr</tt></i> Error condition.</li>
--   <li><i><tt>IOHup</tt></i> Hung up (the connection has been broken,
--   usually for pipes and sockets).</li>
--   <li><i><tt>IOInvalid</tt></i> Invalid request. The file descriptor is
--   not open.</li>
--   </ul>
data IOCondition :: *
[IOIn] :: IOCondition
[IOOut] :: IOCondition
[IOPri] :: IOCondition
[IOErr] :: IOCondition
[IOHup] :: IOCondition
[IOInvalid] :: IOCondition
type HandlerId = CUInt
type FD = Int


-- | <a>Pixbuf</a>s are bitmap images in memory.
--   
--   <ul>
--   <li>A Pixbuf is used to represent images. It contains information
--   about the image's pixel data, its color space, bits per sample, width
--   and height, and the rowstride or number of bytes between rows.</li>
--   <li>This module contains functions to scale and crop <a>Pixbuf</a>s
--   and to scale and crop a <a>Pixbuf</a> and compose the result with an
--   existing image.</li>
--   <li><a>Pixbuf</a>s can be displayed on screen by either creating an
--   <a>Image</a> that from the <a>Pixbuf</a> or by rendering (part of) the
--   <a>Pixbuf</a> into a vanilla widget like <a>DrawWindow</a> using
--   <a>drawPixbuf</a>.</li>
--   </ul>
module Graphics.UI.Gtk.Gdk.Pixbuf
data Pixbuf
class GObjectClass o => PixbufClass o
castToPixbuf :: GObjectClass obj => obj -> Pixbuf
gTypePixbuf :: GType
toPixbuf :: PixbufClass o => o -> Pixbuf

-- | Error codes for loading image files.
data PixbufError
[PixbufErrorCorruptImage] :: PixbufError
[PixbufErrorInsufficientMemory] :: PixbufError
[PixbufErrorBadOption] :: PixbufError
[PixbufErrorUnknownType] :: PixbufError
[PixbufErrorUnsupportedOperation] :: PixbufError
[PixbufErrorFailed] :: PixbufError

-- | Enumerate all supported color spaces.
--   
--   <ul>
--   <li>Only RGB is supported right now.</li>
--   </ul>
data Colorspace
[ColorspaceRgb] :: Colorspace

-- | Create a new image in memory.
--   
--   <ul>
--   <li>Creates a new pixbuf structure and allocates a buffer for it. Note
--   that the buffer is not cleared initially.</li>
--   <li>The boolean flag is true if the pixbuf should have an alpha
--   (transparency) channel. The next integer denotes the bits per color
--   sample, e.g. 8 bits per color for 2^24 colors. The last two integers
--   denote the width and height, respectively.</li>
--   </ul>
pixbufNew :: Colorspace -> Bool -> Int -> Int -> Int -> IO Pixbuf
pixbufNewFromData :: Ptr CUChar -> Colorspace -> Bool -> Int -> Int -> Int -> Int -> IO Pixbuf

-- | Load an image synchonously.
--   
--   <ul>
--   <li>Use this function to load only small images as this call will
--   block.</li>
--   <li>If an error occurs, the function will throw an exception that can
--   be caught using e.g. <a>catchGErrorJust</a> and one of the error codes
--   in <a>PixbufError</a>.</li>
--   </ul>
pixbufNewFromFile :: GlibFilePath fp => fp -> IO Pixbuf

-- | Creates a new pixbuf by loading an image from a file. The file format
--   is detected automatically. The image will be scaled to fit in the
--   requested size, preserving the image's aspect ratio.
--   
--   <ul>
--   <li>If an error occurs, the function will throw an exception that can
--   be caught using e.g. <a>catchGErrorJust</a> and one of the error codes
--   in <a>PixbufError</a>.</li>
--   <li>Available since Gtk+ version 2.4</li>
--   </ul>
pixbufNewFromFileAtSize :: GlibString string => string -> Int -> Int -> IO Pixbuf

-- | Creates a new pixbuf by loading an image from a file. The file format
--   is detected automatically. The image will be scaled to fit in the
--   requested size, optionally preserving the image's aspect ratio.
--   
--   When preserving the aspect ratio, a width of -1 will cause the image
--   to be scaled to the exact given height, and a height of -1 will cause
--   the image to be scaled to the exact given width. When not preserving
--   aspect ratio, a width or height of -1 means to not scale the image at
--   all in that dimension. Negative values for width and height are
--   allowed since Gtk+ 2.8.
--   
--   <ul>
--   <li>If an error occurs, the function will throw an exception that can
--   be caught using e.g. <a>catchGErrorJust</a> and one of the error codes
--   in <a>PixbufError</a>.</li>
--   <li>Available since Gtk+ version 2.6</li>
--   </ul>
pixbufNewFromFileAtScale :: GlibString string => string -> Int -> Int -> Bool -> IO Pixbuf

-- | Create a new image from a static pointer.
--   
--   <ul>
--   <li>Like <a>pixbufNewFromXPMData</a>, this function allows to include
--   images in the final binary program. The method used by this function
--   uses a binary representation and therefore needs less space in the
--   final executable. Save the image you want to include as <tt>png</tt>
--   and run:</li>
--   </ul>
--   
--   <pre>
--   @echo #include "my_image.h" &gt; my_image.c
--   gdk-pixbuf-csource --raw --extern --name=my_image myimage.png &gt;&gt; my_image.c
--   </pre>
--   
--   on it. Write a header file <tt>my_image.h</tt> containing:
--   
--   <pre>
--   #include &lt;gdk/gdk.h&gt;
--   extern guint8 my_image[];
--   </pre>
--   
--   and save it in the current directory. The created file can be compiled
--   with:
--   
--   <pre>
--   cc -c my_image.c `pkg-config --cflags gdk-2.0`
--   </pre>
--   
--   into an object file which must be linked into your Haskell program by
--   specifying <tt>my_image.o</tt> and <tt>"-#include my_image.h"</tt> on
--   the command line of GHC. Within you application you delcare a pointer
--   to this image:
--   
--   <pre>
--   foreign label "my_image" myImage :: Ptr InlineImage
--   </pre>
--   
--   Calling <a>pixbufNewFromInline</a> with this pointer will return the
--   image in the object file. Creating the C file with the <tt>--raw</tt>
--   flag will result in a non-compressed image in the object file. The
--   advantage is that the picture will not be copied when this function is
--   called.
pixbufNewFromInline :: Ptr InlineImage -> IO Pixbuf

-- | A dymmy type for inline picture data.
--   
--   <ul>
--   <li>This dummy type is used to declare pointers to image data that is
--   embedded in the executable. See <a>pixbufNewFromInline</a> for an
--   example.</li>
--   </ul>
data InlineImage

-- | Create a restricted view of an image.
--   
--   <ul>
--   <li>This function returns a <a>Pixbuf</a> object which shares the
--   image of the original one but only shows a part of it. Modifying
--   either buffer will affect the other.</li>
--   <li>This function throw an exception if the requested bounds are
--   invalid.</li>
--   </ul>
pixbufNewSubpixbuf :: Pixbuf -> Int -> Int -> Int -> Int -> IO Pixbuf

-- | Create a new image from a string.
--   
--   <ul>
--   <li>Creates a new pixbuf from a string description.</li>
--   </ul>
pixbufNewFromXPMData :: GlibString string => [string] -> IO Pixbuf

-- | Queries the color space of a pixbuf.
pixbufGetColorSpace :: Pixbuf -> IO Colorspace

-- | Queries the number of colors for each pixel.
--   
--   <ul>
--   <li>This function returns 3 for an RGB image without alpha
--   (transparency) channel, 4 for an RGB image with alpha channel.</li>
--   </ul>
pixbufGetNChannels :: Pixbuf -> IO Int

-- | Query if the image has an alpha channel.
--   
--   <ul>
--   <li>The alpha channel determines the opaqueness of the pixel.</li>
--   </ul>
pixbufGetHasAlpha :: Pixbuf -> IO Bool

-- | Queries the number of bits for each color.
--   
--   <ul>
--   <li>Each pixel is has a number of cannels for each pixel, each channel
--   has this many bits.</li>
--   </ul>
pixbufGetBitsPerSample :: Pixbuf -> IO Int

-- | An array that stored the raw pixel data of a <a>Pixbuf</a>.
--   
--   <ul>
--   <li>See <a>pixbufGetPixels</a>.</li>
--   </ul>
data PixbufData i e

-- | Retrieve the internal array of raw image data.
--   
--   <ul>
--   <li>Image data in a pixbuf is stored in memory in uncompressed, packed
--   format. Rows in the image are stored top to bottom, and in each row
--   pixels are stored from left to right. There may be padding at the end
--   of a row. The "rowstride" value of a pixbuf, as returned by
--   <a>pixbufGetRowstride</a>, indicates the number of bytes between
--   rows.</li>
--   <li>The returned array is a flat representation of a three dimensional
--   array: x-coordiante, y-coordinate and several channels for each color.
--   The number of channels is usually 3 for plain RGB data or 4 for RGB
--   data with an alpha channel. To read or write a specific pixel use the
--   formula: <tt>p = y * rowstride + x * nChannels</tt> for the pixel. If
--   the array contains bytes (or <a>Word8</a>s), <tt>p+0</tt> is the red
--   value, <tt>p+1</tt> green, <tt>p+2</tt> blue and <tt>p+3</tt> the
--   alpha (transparency) channel if present. If the alpha channel is
--   present, the array can accessed as an array over <a>Word32</a> to
--   modify a whole pixel at a time. See also <a>pixbufGetBitsPerSample</a>
--   and <a>pixbufGetNChannels</a>.</li>
--   <li>Calling this function without explicitly giving it a type will
--   often lead to a compiler error since the type parameter <tt>e</tt> is
--   underspecified. If this happens the function can be explicitly typed:
--   <tt>pbData &lt;- (pixbufGetPixels pb :: IO (PixbufData Int
--   Word8))</tt></li>
--   <li>If modifying an image through Haskell's array interface is not
--   fast enough, it is possible to use <tt>unsafeRead</tt> and
--   <tt>unsafeWrite</tt> which have the same type signatures as
--   <tt>readArray</tt> and <tt>writeArray</tt>. Note that these are
--   internal functions that might change with GHC.</li>
--   </ul>
pixbufGetPixels :: Storable e => Pixbuf -> IO (PixbufData Int e)

-- | Queries the width of this image.
pixbufGetWidth :: Pixbuf -> IO Int

-- | Queries the height of this image.
pixbufGetHeight :: Pixbuf -> IO Int

-- | Queries the rowstride of this image.
--   
--   <ul>
--   <li>Queries the rowstride of a pixbuf, which is the number of bytes
--   between rows. Use this value to caculate the offset to a certain
--   row.</li>
--   </ul>
pixbufGetRowstride :: Pixbuf -> IO Int

-- | Returns an attribut of an image.
--   
--   <ul>
--   <li>Looks up if some information was stored under the <tt>key</tt>
--   when this image was saved.</li>
--   </ul>
pixbufGetOption :: (GlibString string) => Pixbuf -> string -> IO (Maybe string)

-- | A string representing an image file format.
type ImageFormat = DefaultGlibString
pixbufGetFormats :: [ImageFormat]

-- | Save an image to disk.
--   
--   <ul>
--   <li>The function takes a list of key - value pairs to specify either
--   how an image is saved or to actually save this additional data with
--   the image. JPEG images can be saved with a "quality" parameter; its
--   value should be in the range [0,100]. Text chunks can be attached to
--   PNG images by specifying parameters of the form "tEXt::key", where key
--   is an ASCII string of length 1-79. The values are Unicode
--   strings.</li>
--   <li>If an error occurs, the function will throw an exception that can
--   be caught using e.g. <a>catchGErrorJust</a> and one of the error codes
--   in <a>PixbufError</a>.</li>
--   </ul>
pixbufSave :: (GlibString string, GlibFilePath fp) => Pixbuf -> fp -> ImageFormat -> [(string, string)] -> IO ()

-- | Create a deep copy of an image.
pixbufCopy :: Pixbuf -> IO Pixbuf

-- | How an image is scaled.
--   
--   <ul>
--   <li><i><tt>InterpNearest</tt></i> Nearest neighbor sampling; this is
--   the fastest and lowest quality mode. Quality is normally unacceptable
--   when scaling down, but may be OK when scaling up.</li>
--   <li><i><tt>InterpTiles</tt></i> This is an accurate simulation of the
--   PostScript image operator without any interpolation enabled. Each
--   pixel is rendered as a tiny parallelogram of solid color, the edges of
--   which are implemented with antialiasing. It resembles nearest neighbor
--   for enlargement, and bilinear for reduction.</li>
--   <li><i><tt>InterpBilinear</tt></i> Best quality/speed balance; use
--   this mode by default. Bilinear interpolation. For enlargement, it is
--   equivalent to point-sampling the ideal bilinear-interpolated image.
--   For reduction, it is equivalent to laying down small tiles and
--   integrating over the coverage area.</li>
--   <li><i><tt>InterpHyper</tt></i> This is the slowest and highest
--   quality reconstruction function. It is derived from the hyperbolic
--   filters in Wolberg's "Digital Image Warping", and is formally defined
--   as the hyperbolic-filter sampling the ideal hyperbolic-filter
--   interpolated image (the filter is designed to be idempotent for 1:1
--   pixel mapping).</li>
--   </ul>
data InterpType
[InterpNearest] :: InterpType
[InterpTiles] :: InterpType
[InterpBilinear] :: InterpType
[InterpHyper] :: InterpType

-- | Scale an image.
--   
--   <ul>
--   <li>Creates a new <a>Pixbuf</a> containing a copy of <tt>src</tt>
--   scaled to the given measures. Leaves <tt>src</tt> unaffected.</li>
--   <li><tt>interp</tt> affects the quality and speed of the scaling
--   function. <a>InterpNearest</a> is the fastest option but yields very
--   poor quality when scaling down. <a>InterpBilinear</a> is a good
--   trade-off between speed and quality and should thus be used as a
--   default.</li>
--   </ul>
pixbufScaleSimple :: Pixbuf -> Int -> Int -> InterpType -> IO Pixbuf

-- | Copy a scaled image part to another image.
--   
--   <ul>
--   <li>This function is the generic version of <a>pixbufScaleSimple</a>.
--   It scales <tt>src</tt> by <tt>scaleX</tt> and <tt>scaleY</tt> and
--   translate the image by <tt>offsetX</tt> and <tt>offsetY</tt>. Whatever
--   is in the intersection with the rectangle <tt>destX</tt>,
--   <tt>destY</tt>, <tt>destWidth</tt>, <tt>destHeight</tt> will be
--   rendered into <tt>dest</tt>.</li>
--   <li>The rectangle in the destination is simply overwritten. Use
--   <a>pixbufComposite</a> if you need to blend the source image onto the
--   destination.</li>
--   </ul>
pixbufScale :: Pixbuf -> Pixbuf -> Int -> Int -> Int -> Int -> Double -> Double -> Double -> Double -> InterpType -> IO ()

-- | Blend a scaled image part onto another image.
--   
--   <ul>
--   <li>This function is similar to <a>pixbufScale</a> but allows the
--   original image to "shine through". The <tt>alpha</tt> value determines
--   how opaque the source image is. Passing <tt>0</tt> is equivalent to
--   not calling this function at all, passing <tt>255</tt> has the same
--   effect as calling <a>pixbufScale</a>.</li>
--   </ul>
pixbufComposite :: Pixbuf -> Pixbuf -> Int -> Int -> Int -> Int -> Double -> Double -> Double -> Double -> InterpType -> Word8 -> IO ()

-- | Flips a pixbuf horizontally and returns the result in a new pixbuf.
pixbufFlipHorizontally :: Pixbuf -> IO Pixbuf
pixbufFlipHorazontally :: Pixbuf -> IO Pixbuf

-- | Flips a pixbuf vertically and returns the result in a new pixbuf.
pixbufFlipVertically :: Pixbuf -> IO Pixbuf

-- | Rotates a pixbuf by a multiple of 90 degrees, and returns the result
--   in a new pixbuf.
pixbufRotateSimple :: Pixbuf -> PixbufRotation -> IO Pixbuf

-- | The possible rotations which can be passed to
--   <a>pixbufRotateSimple</a>.
--   
--   To make them easier to use, their numerical values are the actual
--   degrees.
data PixbufRotation
[PixbufRotateNone] :: PixbufRotation
[PixbufRotateCounterclockwise] :: PixbufRotation
[PixbufRotateUpsidedown] :: PixbufRotation
[PixbufRotateClockwise] :: PixbufRotation
pixbufAddAlpha :: Pixbuf -> Maybe (Word8, Word8, Word8) -> IO Pixbuf

-- | Copy a rectangular portion into another <a>Pixbuf</a>.
--   
--   The source <a>Pixbuf</a> remains unchanged. Converion between
--   different formats is done automatically.
pixbufCopyArea :: Pixbuf -> Int -> Int -> Int -> Int -> Pixbuf -> Int -> Int -> IO ()

-- | Fills a <a>Pixbuf</a> with a color.
--   
--   <ul>
--   <li>The passed-in color is a quadruple consisting of the red, green,
--   blue and alpha component of the pixel. If the <a>Pixbuf</a> does not
--   have an alpha channel, the alpha value is ignored.</li>
--   </ul>
pixbufFill :: Pixbuf -> Word8 -> Word8 -> Word8 -> Word8 -> IO ()

-- | Take a screenshot of a <a>Drawable</a>.
--   
--   <ul>
--   <li>This function creates a <a>Pixbuf</a> and fills it with the image
--   currently in the <a>Drawable</a> (which might be invalid if the window
--   is obscured or minimized). Note that this transfers data from the
--   server to the client on X Windows.</li>
--   <li>This function will return a <a>Pixbuf</a> with no alpha channel
--   containing the part of the <a>Drawable</a> specified by the rectangle.
--   The function will return <tt>Nothing</tt> if the window is not
--   currently visible.</li>
--   </ul>
--   
--   Removed in Gtk3.
pixbufGetFromDrawable :: DrawableClass d => d -> Rectangle -> IO (Maybe Pixbuf)

-- | Takes the opacity values in a rectangular portion of a pixbuf and
--   thresholds them to produce a bi-level alpha mask that can be used as a
--   clipping mask for a drawable.
--   
--   Removed in Gtk3.
pixbufRenderThresholdAlpha :: Pixbuf -> Bitmap -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> IO ()

-- | Creates a pixmap and a mask bitmap which are returned and renders a
--   pixbuf and its corresponding thresholded alpha mask to them. This is
--   merely a convenience function; applications that need to render
--   pixbufs with dither offsets or to given drawables should use
--   <a>drawPixbuf</a>, and <a>pixbufRenderThresholdAlpha</a>.
--   
--   The pixmap that is created uses the <a>Colormap</a> specified by
--   colormap. This colormap must match the colormap of the window where
--   the pixmap will eventually be used or an error will result.
--   
--   If the pixbuf does not have an alpha channel, then the returned mask
--   will be <tt>Nothing</tt>.
--   
--   Removed in Gtk3.
pixbufRenderPixmapAndMaskForColormap :: Pixbuf -> Colormap -> Int -> IO (Pixmap, Maybe Bitmap)
instance Enum InterpType
instance Enum Colorspace
instance Enum PixbufError
instance GErrorClass PixbufError
instance Enum PixbufRotation


-- | This module gathers all publicly available functions from the Gtk
--   binding.
module Graphics.UI.Gtk
